From 0a36161e13484a99ccf69bb38f206462d27cc6d6 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 25 Mar 2009 00:35:13 -0400 Subject: Imported Upstream version 5.1.2 --- ext/bcmath/bcmath.c | 10 +- ext/bcmath/php_bcmath.h | 8 +- ext/bz2/bz2.c | 10 +- ext/bz2/bz2_filter.c | 12 +- ext/bz2/php_bz2.h | 8 +- ext/calendar/cal_unix.c | 10 +- ext/calendar/calendar.c | 10 +- ext/calendar/easter.c | 6 +- ext/calendar/tests/jdtojewish.phpt | 2 + ext/com_dotnet/com_com.c | 8 +- ext/com_dotnet/com_dotnet.c | 8 +- ext/com_dotnet/com_extension.c | 10 +- ext/com_dotnet/com_handlers.c | 8 +- ext/com_dotnet/com_iterator.c | 8 +- ext/com_dotnet/com_misc.c | 8 +- ext/com_dotnet/com_olechar.c | 8 +- ext/com_dotnet/com_persist.c | 8 +- ext/com_dotnet/com_saproxy.c | 8 +- ext/com_dotnet/com_typeinfo.c | 8 +- ext/com_dotnet/com_variant.c | 8 +- ext/com_dotnet/com_wrapper.c | 8 +- ext/com_dotnet/php_com_dotnet.h | 8 +- ext/com_dotnet/php_com_dotnet_internal.h | 8 +- ext/ctype/ctype.c | 8 +- ext/ctype/php_ctype.h | 6 +- ext/ctype/tests/bug25745.phpt | 2 + ext/ctype/tests/bug34645.phpt | 2 + ext/curl/interface.c | 12 +- ext/curl/multi.c | 8 +- ext/curl/php_curl.h | 8 +- ext/curl/streams.c | 8 +- ext/date/config.m4 | 4 +- ext/date/config.w32 | 4 +- ext/date/lib/astro.c | 303 + ext/date/lib/astro.h | 51 + ext/date/lib/dow.c | 8 +- ext/date/lib/parse_date.c | 26355 ++++++++---------- ext/date/lib/parse_date.c.orig | 27833 +++++++++---------- ext/date/lib/parse_date.re | 151 +- ext/date/lib/parse_tz.c | 32 +- ext/date/lib/timelib.c | 16 +- ext/date/lib/timelib.h | 24 +- ext/date/lib/timelib_structs.h | 8 +- ext/date/lib/timezonedb.h | 1975 +- ext/date/lib/timezonemap.h | 2 +- ext/date/lib/tm2unixtime.c | 8 +- ext/date/lib/unixtime2tm.c | 59 +- ext/date/php_date.c | 468 +- ext/date/php_date.h | 15 +- ext/date/tests/bug14561.phpt | 4 +- ext/date/tests/bug35414.phpt | 16 + ext/date/tests/bug35422.phpt | 12 + ext/date/tests/bug35425.phpt | 30 + ext/date/tests/bug35456.phpt | 16 + ext/date/tests/bug35499.phpt | 16 + ext/date/tests/bug35624.phpt | 29 + ext/date/tests/bug35630.phpt | 11 + ext/date/tests/bug35699.phpt | 14 + ext/date/tests/bug35705.phpt | 11 + ext/date/tests/bug35885.phpt | 14 + ext/date/tests/bug35887.phpt | 11 + ext/date/tests/date_default_timezone_get-1.phpt | 8 +- ext/date/tests/date_default_timezone_get-2.phpt | 2 +- ext/date/tests/date_default_timezone_set-1.phpt | 6 +- ext/date/tests/mktime-2.phpt | 2 +- ext/date/tests/mktime-3.phpt | 4 +- ext/dba/config.m4 | 18 +- ext/dba/dba.c | 22 +- ext/dba/dba_cdb.c | 8 +- ext/dba/dba_db1.c | 8 +- ext/dba/dba_db2.c | 8 +- ext/dba/dba_db3.c | 8 +- ext/dba/dba_db4.c | 17 +- ext/dba/dba_dbm.c | 8 +- ext/dba/dba_flatfile.c | 8 +- ext/dba/dba_gdbm.c | 8 +- ext/dba/dba_inifile.c | 8 +- ext/dba/dba_ndbm.c | 8 +- ext/dba/dba_qdbm.c | 8 +- ext/dba/libcdb/cdb.c | 10 +- ext/dba/libcdb/cdb.h | 8 +- ext/dba/libcdb/cdb_make.c | 10 +- ext/dba/libcdb/cdb_make.h | 8 +- ext/dba/libcdb/uint32.c | 8 +- ext/dba/libcdb/uint32.h | 8 +- ext/dba/libflatfile/flatfile.c | 10 +- ext/dba/libflatfile/flatfile.h | 8 +- ext/dba/libinifile/inifile.c | 10 +- ext/dba/libinifile/inifile.h | 8 +- ext/dba/php_dba.h | 8 +- ext/dba/tests/dba_db4.phpt | 18 +- ext/dba/tests/dba_handler.inc | 2 +- ext/dbase/dbase.c | 10 +- ext/dbase/php_dbase.h | 8 +- ext/dom/attr.c | 8 +- ext/dom/cdatasection.c | 8 +- ext/dom/characterdata.c | 8 +- ext/dom/comment.c | 8 +- ext/dom/document.c | 8 +- ext/dom/documentfragment.c | 8 +- ext/dom/documenttype.c | 8 +- ext/dom/dom_ce.h | 8 +- ext/dom/dom_fe.h | 8 +- ext/dom/dom_iterators.c | 12 +- ext/dom/dom_properties.h | 8 +- ext/dom/domconfiguration.c | 8 +- ext/dom/domerror.c | 8 +- ext/dom/domerrorhandler.c | 8 +- ext/dom/domexception.c | 8 +- ext/dom/domimplementation.c | 8 +- ext/dom/domimplementationlist.c | 8 +- ext/dom/domimplementationsource.c | 8 +- ext/dom/domlocator.c | 8 +- ext/dom/domstringlist.c | 8 +- ext/dom/element.c | 8 +- ext/dom/entity.c | 8 +- ext/dom/entityreference.c | 8 +- ext/dom/namednodemap.c | 8 +- ext/dom/namelist.c | 8 +- ext/dom/node.c | 10 +- ext/dom/nodelist.c | 10 +- ext/dom/notation.c | 8 +- ext/dom/php_dom.c | 14 +- ext/dom/php_dom.h | 8 +- ext/dom/processinginstruction.c | 8 +- ext/dom/string_extend.c | 8 +- ext/dom/tests/dom_set_attr_node.phpt | 6 +- ext/dom/text.c | 8 +- ext/dom/typeinfo.c | 8 +- ext/dom/userdatahandler.c | 8 +- ext/dom/xml_common.h | 8 +- ext/dom/xpath.c | 8 +- ext/exif/exif.c | 20 +- ext/exif/php_exif.h | 8 +- ext/fbsql/php_fbsql.c | 14 +- ext/fbsql/php_fbsql.h | 8 +- ext/fdf/fdf.c | 10 +- ext/fdf/php_fdf.h | 8 +- ext/filepro/filepro.c | 10 +- ext/filepro/php_filepro.h | 8 +- ext/ftp/ftp.c | 8 +- ext/ftp/ftp.h | 8 +- ext/ftp/php_ftp.c | 12 +- ext/ftp/php_ftp.h | 8 +- ext/gd/config.m4 | 12 +- ext/gd/gd.c | 35 +- ext/gd/gd_ctx.c | 9 +- ext/gd/libgd/gd_topal.c | 3 + ext/gd/libgd/xbm.c | 8 +- ext/gd/php_gd.h | 8 +- ext/gd/tests/colormatch.phpt | 21 + ext/gd/tests/copypalette.phpt | 44 + ext/gd/tests/createfromstring.phpt | 63 + ext/gd/tests/pngcomp.phpt | 34 + ext/gd/tests/src.png | Bin 0 -> 9 bytes ext/gettext/gettext.c | 10 +- ext/gettext/php_gettext.h | 8 +- ext/gmp/gmp.c | 8 +- ext/gmp/php_gmp.h | 6 +- ext/hash/CREDITS | 2 + ext/hash/EXPERIMENTAL | 0 ext/hash/README | 19 + ext/hash/bench.php | 92 + ext/hash/config.m4 | 26 + ext/hash/config.w32 | 12 + ext/hash/hash.c | 660 + ext/hash/hash_adler32.c | 66 + ext/hash/hash_crc32.c | 84 + ext/hash/hash_gost.c | 321 + ext/hash/hash_haval.c | 550 + ext/hash/hash_md.c | 589 + ext/hash/hash_ripemd.c | 433 + ext/hash/hash_salsa.c | 222 + ext/hash/hash_sha.c | 934 + ext/hash/hash_snefru.c | 212 + ext/hash/hash_tiger.c | 285 + ext/hash/hash_whirlpool.c | 452 + ext/hash/package.xml | 95 + ext/hash/php_hash.h | 144 + ext/hash/php_hash_adler32.h | 43 + ext/hash/php_hash_crc32.h | 44 + ext/hash/php_hash_crc32_tables.h | 149 + ext/hash/php_hash_gost.h | 47 + ext/hash/php_hash_gost_tables.h | 138 + ext/hash/php_hash_haval.h | 59 + ext/hash/php_hash_md.h | 88 + ext/hash/php_hash_ripemd.h | 46 + ext/hash/php_hash_salsa.h | 51 + ext/hash/php_hash_sha.h | 86 + ext/hash/php_hash_snefru.h | 51 + ext/hash/php_hash_snefru_tables.h | 942 + ext/hash/php_hash_tiger.h | 49 + ext/hash/php_hash_tiger_tables.h | 549 + ext/hash/php_hash_types.h | 67 + ext/hash/php_hash_whirlpool.h | 48 + ext/hash/php_hash_whirlpool_tables.h | 585 + ext/hash/tests/adler32.phpt | 22 + ext/hash/tests/crc32.phpt | 36 + ext/hash/tests/gost.phpt | 20 + ext/hash/tests/haval.phpt | 76 + ext/hash/tests/hmac-md5.phpt | 20 + ext/hash/tests/md4.phpt | 24 + ext/hash/tests/md5.phpt | 16 + ext/hash/tests/ripemd128.phpt | 25 + ext/hash/tests/ripemd160.phpt | 25 + ext/hash/tests/sha1.phpt | 21 + ext/hash/tests/sha256.phpt | 22 + ext/hash/tests/sha384.phpt | 21 + ext/hash/tests/sha512.phpt | 21 + ext/hash/tests/snefru.phpt | 18 + ext/hash/tests/tiger.phpt | 18 + ext/hash/tests/whirlpool.phpt | 14 + ext/hwapi/hwapi.cpp | 140 +- ext/hwapi/php_hwapi.h | 8 +- ext/iconv/config.m4 | 71 +- ext/iconv/iconv.c | 12 +- ext/iconv/php_iconv.h | 8 +- ext/iconv/tests/iconv003.phpt | 2 + ext/iconv/tests/iconv004.phpt | 2 + ext/iconv/tests/iconv_mime_decode_headers.phpt | 2 +- ext/imap/php_imap.c | 45 +- ext/imap/php_imap.h | 8 +- ext/imap/tests/bug35669.phpt | 68 + ext/informix/ifx.ec | 20 +- ext/informix/php_informix.h | 8 +- ext/informix/php_informix_includes.h | 8 +- ext/interbase/ibase_blobs.c | 8 +- ext/interbase/ibase_events.c | 8 +- ext/interbase/ibase_query.c | 8 +- ext/interbase/ibase_service.c | 8 +- ext/interbase/interbase.c | 18 +- ext/interbase/interbase.rc | 8 +- ext/interbase/php_ibase_includes.h | 8 +- ext/interbase/php_ibase_udf.c | 8 +- ext/interbase/php_interbase.h | 8 +- ext/ldap/ldap.c | 17 +- ext/ldap/php_ldap.h | 8 +- ext/libxml/libxml.c | 10 +- ext/libxml/php_libxml.h | 8 +- ext/libxml/php_libxml2.def | 3113 +-- ext/mbstring/config.m4 | 3 +- ext/mbstring/config.w32 | 4 +- ext/mbstring/libmbfl/mbfl/mbfilter.c | 37 +- ext/mbstring/libmbfl/mbfl/mbfilter.h | 5 +- ext/mbstring/libmbfl/mbfl/mbfl_language.c | 2 + ext/mbstring/libmbfl/mbfl/mbfl_language.h | 1 + ext/mbstring/libmbfl/nls/nls_tr.c | 21 + ext/mbstring/libmbfl/nls/nls_tr.h | 8 + ext/mbstring/mb_gpc.c | 10 +- ext/mbstring/mb_gpc.h | 6 +- ext/mbstring/mbstring.c | 77 +- ext/mbstring/mbstring.h | 9 +- ext/mbstring/php_mbregex.c | 8 +- ext/mbstring/php_mbregex.h | 8 +- ext/mbstring/php_unicode.c | 53 +- ext/mbstring/php_unicode.h | 6 +- ext/mbstring/tests/bug28220.phpt | 2 + ext/mbstring/tests/bug30549.phpt | 2 + ext/mbstring/tests/bug31911.phpt | 2 + ext/mbstring/tests/mb_strcut.phpt | 2 +- ext/mcrypt/mcrypt.c | 98 +- ext/mcrypt/php_mcrypt.h | 8 +- ext/mcrypt/tests/bug35496.phpt | 14 + ext/mhash/mhash.c | 10 +- ext/mhash/php_mhash.h | 8 +- ext/mime_magic/mime_magic.c | 10 +- ext/mime_magic/php_mime_magic.h | 8 +- ext/mime_magic/phpmimemagic.h | 8 +- ext/ming/config.m4 | 28 +- ext/ming/ming.c | 8 +- ext/ming/php_ming.h | 8 +- ext/msession/msession.c | 8 +- ext/msession/php_msession.h | 6 +- ext/msession/reqclient.h | 6 +- ext/msql/php_msql.c | 120 +- ext/msql/php_msql.h | 8 +- ext/mssql/php_mssql.c | 31 +- ext/mssql/php_mssql.h | 15 +- ext/mysql/php_mysql.c | 37 +- ext/mysql/php_mysql.h | 8 +- ext/mysqli/config.m4 | 6 +- ext/mysqli/mysqli.c | 16 +- ext/mysqli/mysqli_api.c | 97 +- ext/mysqli/mysqli_driver.c | 8 +- ext/mysqli/mysqli_embedded.c | 6 +- ext/mysqli/mysqli_exception.c | 8 +- ext/mysqli/mysqli_fe.c | 41 +- ext/mysqli/mysqli_nonapi.c | 14 +- ext/mysqli/mysqli_prop.c | 8 +- ext/mysqli/mysqli_repl.c | 8 +- ext/mysqli/mysqli_report.c | 10 +- ext/mysqli/mysqli_report.h | 8 +- ext/mysqli/mysqli_warning.c | 8 +- ext/mysqli/php_mysqli.h | 31 +- ext/mysqli/tests/004.phpt | 37 +- ext/mysqli/tests/009.phpt | 2 +- ext/mysqli/tests/013.phpt | 15 +- ext/mysqli/tests/bug35103.phpt | 68 + ext/mysqli/tests/bug35517.phpt | 29 + ext/mysqli/tests/bug35759.phpt | 44 + ext/ncurses/ncurses.c | 6 +- ext/ncurses/ncurses_fe.c | 8 +- ext/ncurses/ncurses_functions.c | 40 +- ext/ncurses/php_ncurses.h | 8 +- ext/ncurses/php_ncurses_fe.h | 6 +- ext/oci8/CREDITS | 2 +- ext/oci8/README | 61 + ext/oci8/config.m4 | 144 +- ext/oci8/config.w32 | 8 +- ext/oci8/oci8.c | 7518 +---- ext/oci8/oci8.dsp | 28 +- ext/oci8/oci8_collection.c | 611 + ext/oci8/oci8_interface.c | 2129 ++ ext/oci8/oci8_lob.c | 712 + ext/oci8/oci8_statement.c | 1351 + ext/oci8/package.xml | 234 +- ext/oci8/php_oci8.h | 201 +- ext/oci8/php_oci8_int.h | 423 + ext/oci8/tests/array_bind_001.phpt | 69 + ext/oci8/tests/array_bind_002.phpt | 77 + ext/oci8/tests/array_bind_003.phpt | 73 + ext/oci8/tests/array_bind_004.phpt | 65 + ext/oci8/tests/array_bind_005.phpt | 74 + ext/oci8/tests/array_bind_006.phpt | 74 + ext/oci8/tests/array_bind_007.phpt | 77 + ext/oci8/tests/array_bind_008.phpt | 78 + ext/oci8/tests/array_bind_009.phpt | 17 + ext/oci8/tests/array_bind_010.phpt | 36 + ext/oci8/tests/array_bind_011.phpt | 67 + ext/oci8/tests/array_bind_012.phpt | 26 + ext/oci8/tests/array_bind_date.phpt | 74 + ext/oci8/tests/array_bind_date1.phpt | 74 + ext/oci8/tests/array_bind_float.phpt | 74 + ext/oci8/tests/array_bind_float1.phpt | 74 + ext/oci8/tests/array_bind_int.phpt | 74 + ext/oci8/tests/array_bind_int1.phpt | 74 + ext/oci8/tests/array_bind_str.phpt | 74 + ext/oci8/tests/array_bind_str1.phpt | 74 + ext/oci8/tests/bind_empty.phpt | 39 + ext/oci8/tests/bug26133.phpt | 26 +- ext/oci8/tests/bug27303.phpt | 252 + ext/oci8/tests/bug27303_2.phpt | 252 + ext/oci8/tests/bug27303_3.phpt | 252 + ext/oci8/tests/bug27303_4.phpt | 252 + ext/oci8/tests/bug32325.phpt | 39 + ext/oci8/tests/close.phpt | 17 + ext/oci8/tests/coll_001.phpt | 27 + ext/oci8/tests/coll_002.phpt | 30 + ext/oci8/tests/coll_002_func.phpt | 30 + ext/oci8/tests/coll_003.phpt | 34 + ext/oci8/tests/coll_003_func.phpt | 34 + ext/oci8/tests/coll_004.phpt | 29 + ext/oci8/tests/coll_004_func.phpt | 29 + ext/oci8/tests/coll_005.phpt | 27 + ext/oci8/tests/coll_006.phpt | 30 + ext/oci8/tests/coll_006_func.phpt | 30 + ext/oci8/tests/coll_007.phpt | 34 + ext/oci8/tests/coll_008.phpt | 29 + ext/oci8/tests/coll_009.phpt | 42 + ext/oci8/tests/coll_009_func.phpt | 42 + ext/oci8/tests/coll_010.phpt | 41 + ext/oci8/tests/coll_010_func.phpt | 41 + ext/oci8/tests/coll_011.phpt | 43 + ext/oci8/tests/coll_011_func.phpt | 43 + ext/oci8/tests/coll_012.phpt | 41 + ext/oci8/tests/coll_012_func.phpt | 41 + ext/oci8/tests/coll_013.phpt | 38 + ext/oci8/tests/coll_013_func.phpt | 38 + ext/oci8/tests/coll_014.phpt | 38 + ext/oci8/tests/coll_014_func.phpt | 38 + ext/oci8/tests/coll_015.phpt | 38 + ext/oci8/tests/coll_015_func.phpt | 38 + ext/oci8/tests/coll_016.phpt | 48 + ext/oci8/tests/coll_016_func.phpt | 48 + ext/oci8/tests/coll_017.phpt | 38 + ext/oci8/tests/coll_017_func.phpt | 38 + ext/oci8/tests/commit.phpt | 148 + ext/oci8/tests/commit_old.phpt | 146 + ext/oci8/tests/connect.inc | 24 +- ext/oci8/tests/connect.phpt | 22 + ext/oci8/tests/connect_1.phpt | 35 + ext/oci8/tests/connect_1_old.phpt | 35 + ext/oci8/tests/connect_old.phpt | 22 + ext/oci8/tests/connect_without_oracle_home.phpt | 25 + .../tests/connect_without_oracle_home_old.phpt | 25 + ext/oci8/tests/create_table.inc | 13 +- ext/oci8/tests/create_type.inc | 17 + ext/oci8/tests/cursor_bind.phpt | 99 + ext/oci8/tests/cursor_bind_err.phpt | 48 + ext/oci8/tests/cursors.phpt | 59 + ext/oci8/tests/cursors_old.phpt | 64 + ext/oci8/tests/debug.phpt | 31 + ext/oci8/tests/default_prefetch.phpt | 50 + ext/oci8/tests/default_prefetch1.phpt | 50 + ext/oci8/tests/default_prefetch2.phpt | 53 + ext/oci8/tests/define.phpt | 41 + ext/oci8/tests/define_old.phpt | 41 + ext/oci8/tests/descriptors.phpt | 49 + ext/oci8/tests/drop_table.inc | 6 +- ext/oci8/tests/drop_type.inc | 12 + ext/oci8/tests/error.phpt | 40 + ext/oci8/tests/error1.phpt | 18 + ext/oci8/tests/error_old.phpt | 40 + ext/oci8/tests/exec_fetch.phpt | 19 + ext/oci8/tests/execute_mode.phpt | 19 + ext/oci8/tests/fetch.phpt | 56 + ext/oci8/tests/fetch_all.phpt | 149 + ext/oci8/tests/fetch_array.phpt | 230 + ext/oci8/tests/fetch_assoc.phpt | 64 + ext/oci8/tests/fetch_into.phpt | 82 + ext/oci8/tests/fetch_into1.phpt | 192 + ext/oci8/tests/fetch_into2.phpt | 70 + ext/oci8/tests/fetch_object.phpt | 64 + ext/oci8/tests/fetch_row.phpt | 64 + ext/oci8/tests/field_funcs.phpt | 105 + ext/oci8/tests/field_funcs1.phpt | 179 + ext/oci8/tests/field_funcs_old.phpt | 105 + ext/oci8/tests/lob_001.phpt | Bin 0 -> 1256 bytes ext/oci8/tests/lob_002.phpt | 66 + ext/oci8/tests/lob_003.phpt | Bin 0 -> 1628 bytes ext/oci8/tests/lob_004.phpt | 80 + ext/oci8/tests/lob_005.phpt | 52 + ext/oci8/tests/lob_006.phpt | Bin 0 -> 1694 bytes ext/oci8/tests/lob_007.phpt | 66 + ext/oci8/tests/lob_008.phpt | 65 + ext/oci8/tests/lob_009.phpt | 69 + ext/oci8/tests/lob_009.txt | 6 + ext/oci8/tests/lob_010.phpt | 46 + ext/oci8/tests/lob_011.phpt | 76 + ext/oci8/tests/lob_012.phpt | 50 + ext/oci8/tests/lob_013.phpt | 54 + ext/oci8/tests/lob_014.phpt | 58 + ext/oci8/tests/lob_015.phpt | 51 + ext/oci8/tests/lob_016.phpt | 67 + ext/oci8/tests/lob_017.phpt | 69 + ext/oci8/tests/lob_018.phpt | 67 + ext/oci8/tests/lob_temp.phpt | 36 + ext/oci8/tests/lob_temp1.phpt | 32 + ext/oci8/tests/num.phpt | 66 + ext/oci8/tests/oci_execute_segfault.phpt | 30 + ext/oci8/tests/old_oci_close.phpt | 23 + ext/oci8/tests/old_oci_close1.phpt | 25 + ext/oci8/tests/password.phpt | 30 + ext/oci8/tests/password_new.phpt | 30 + ext/oci8/tests/password_old.phpt | 30 + ext/oci8/tests/persistent.phpt | 26 + ext/oci8/tests/prefetch.phpt | 51 + ext/oci8/tests/prefetch_old.phpt | 51 + ext/oci8/tests/privileged_connect.phpt | 25 + ext/oci8/tests/privileged_connect1.phpt | 27 + ext/oci8/tests/select_null.phpt | 23 + ext/oci8/tests/serverversion.phpt | 30 + ext/oci8/tests/statement_cache.phpt | 35 + ext/oci8/tests/statement_type.phpt | 46 + ext/oci8/tests/statement_type_old.phpt | 46 + ext/oci8/tests/uncommitted.phpt | 16 + ext/odbc/birdstep.c | 10 +- ext/odbc/config.m4 | 4 +- ext/odbc/php_birdstep.h | 8 +- ext/odbc/php_odbc.c | 112 +- ext/odbc/php_odbc.h | 8 +- ext/odbc/php_odbc_includes.h | 8 +- ext/openssl/openssl.c | 11 +- ext/openssl/php_openssl.h | 8 +- ext/openssl/tests/001.phpt | 6 +- ext/openssl/tests/bug25614.phpt | 5 +- ext/openssl/tests/skipif.inc | 11 - ext/openssl/xp_ssl.c | 8 +- ext/pcntl/pcntl.c | 10 +- ext/pcntl/php_pcntl.h | 8 +- ext/pcntl/php_signal.c | 8 +- ext/pcntl/php_signal.h | 8 +- ext/pcre/config.w32 | 3 +- ext/pcre/config0.m4 | 4 +- ext/pcre/php_pcre.c | 10 +- ext/pcre/php_pcre.def | 11 + ext/pcre/php_pcre.h | 8 +- ext/pdo/package.xml | 116 - ext/pdo/package2.xml | 131 + ext/pdo/pdo.c | 12 +- ext/pdo/pdo_dbh.c | 34 +- ext/pdo/pdo_sql_parser.c | 12 +- ext/pdo/pdo_sql_parser.c.orig | 30 +- ext/pdo/pdo_sql_parser.re | 8 +- ext/pdo/pdo_sqlstate.c | 8 +- ext/pdo/pdo_stmt.c | 75 +- ext/pdo/php_pdo.h | 8 +- ext/pdo/php_pdo_driver.h | 15 +- ext/pdo/php_pdo_int.h | 14 +- ext/pdo/tests/pdo_test.inc | 4 + ext/pdo_dblib/dblib_driver.c | 8 +- ext/pdo_dblib/dblib_stmt.c | 8 +- ext/pdo_dblib/package.xml | 60 - ext/pdo_dblib/package2.xml | 76 + ext/pdo_dblib/pdo_dblib.c | 12 +- ext/pdo_dblib/php_pdo_dblib.h | 8 +- ext/pdo_dblib/php_pdo_dblib_int.h | 8 +- ext/pdo_firebird/firebird_driver.c | 8 +- ext/pdo_firebird/firebird_statement.c | 8 +- ext/pdo_firebird/package.xml | 57 - ext/pdo_firebird/package2.xml | 69 + ext/pdo_firebird/pdo_firebird.c | 10 +- ext/pdo_firebird/php_pdo_firebird.h | 8 +- ext/pdo_firebird/php_pdo_firebird_int.h | 8 +- ext/pdo_firebird/tests/common.phpt | 2 +- ext/pdo_mysql/config.m4 | 18 +- ext/pdo_mysql/mysql_driver.c | 10 +- ext/pdo_mysql/mysql_statement.c | 21 +- ext/pdo_mysql/package.xml | 67 - ext/pdo_mysql/package2.xml | 85 + ext/pdo_mysql/pdo_mysql.c | 12 +- ext/pdo_mysql/php_pdo_mysql.h | 8 +- ext/pdo_mysql/php_pdo_mysql_int.h | 8 +- ext/pdo_oci/config.m4 | 63 +- ext/pdo_oci/oci_driver.c | 12 +- ext/pdo_oci/oci_statement.c | 8 +- ext/pdo_oci/package.xml | 53 - ext/pdo_oci/package2.xml | 69 + ext/pdo_oci/pdo_oci.c | 12 +- ext/pdo_oci/php_pdo_oci.h | 8 +- ext/pdo_oci/php_pdo_oci_int.h | 8 +- ext/pdo_odbc/odbc_driver.c | 45 +- ext/pdo_odbc/package.xml | 51 - ext/pdo_odbc/package2.xml | 69 + ext/pdo_odbc/pdo_odbc.c | 4 +- ext/pdo_pgsql/package.xml | 63 - ext/pdo_pgsql/package2.xml | 79 + ext/pdo_pgsql/pdo_pgsql.c | 12 +- ext/pdo_pgsql/pgsql_driver.c | 223 +- ext/pdo_pgsql/pgsql_statement.c | 124 +- ext/pdo_pgsql/php_pdo_pgsql.h | 8 +- ext/pdo_pgsql/php_pdo_pgsql_int.h | 30 +- ext/pdo_pgsql/tests/bug_33876.phpt | 2 + ext/pdo_pgsql/tests/common.phpt | 1 + ext/pdo_pgsql/tests/config.inc | 14 + ext/pdo_pgsql/tests/large_objects.phpt | 61 + ext/pdo_sqlite/config.m4 | 10 +- ext/pdo_sqlite/package.xml | 177 - ext/pdo_sqlite/package2.xml | 187 + ext/pdo_sqlite/pdo_sqlite.c | 14 +- ext/pdo_sqlite/php_pdo_sqlite.h | 8 +- ext/pdo_sqlite/php_pdo_sqlite_int.h | 8 +- ext/pdo_sqlite/sqlite/VERSION | 2 +- ext/pdo_sqlite/sqlite/src/pager.c | 2 +- ext/pdo_sqlite/sqlite/src/parse.c | 778 +- ext/pdo_sqlite/sqlite_driver.c | 23 +- ext/pdo_sqlite/sqlite_statement.c | 8 +- ext/pdo_sqlite/tests/bug35336.phpt | 4 + ext/pgsql/config.m4 | 6 +- ext/pgsql/pgsql.c | 32 +- ext/pgsql/php_pgsql.h | 8 +- ext/pgsql/tests/09notice.phpt | 1 + ext/pgsql/tests/80_bug27597.phpt | 2 +- ext/pgsql/tests/80_bug32223.phpt | 1 + ext/pgsql/tests/80_bug32223b.phpt | 8 +- ext/posix/php_posix.h | 8 +- ext/posix/posix.c | 12 +- ext/pspell/php_pspell.h | 8 +- ext/pspell/pspell.c | 10 +- ext/readline/config.m4 | 12 +- ext/readline/php_readline.h | 8 +- ext/readline/readline.c | 20 +- ext/recode/php_recode.h | 8 +- ext/recode/recode.c | 10 +- ext/reflection/CREDITS | 2 + ext/reflection/config.m4 | 13 + ext/reflection/config.w32 | 9 + ext/reflection/php_reflection.c | 4281 +++ ext/reflection/php_reflection.h | 55 + ext/reflection/tests/001.phpt | 89 + ext/reflection/tests/002.phpt | 63 + ext/reflection/tests/003.phpt | 31 + ext/reflection/tests/004.phpt | 42 + ext/reflection/tests/005.phpt | 54 + ext/reflection/tests/006.phpt | 103 + ext/reflection/tests/bug26640.phpt | 25 + ext/reflection/tests/bug26695.phpt | 25 + ext/reflection/tests/bug29268.phpt | 26 + ext/reflection/tests/bug29523.phpt | 38 + ext/reflection/tests/bug29828.phpt | 35 + ext/reflection/tests/bug30146.phpt | 23 + ext/reflection/tests/bug30148.phpt | 35 + ext/reflection/tests/bug30209.phpt | 31 + ext/reflection/tests/bug30856.phpt | 20 + ext/reflection/tests/bug30961.phpt | 20 + ext/reflection/tests/bug31651.phpt | 24 + ext/reflection/tests/bug32981.phpt | 34 + ext/reflection/tests/bug33312.phpt | 20 + ext/reflection/tests/bug33389.phpt | 97 + ext/reflection/tests/exception.inc | 16 + ext/reflection/tests/parameters_001.phpt | 38 + ext/reflection/tests/property_exists.phpt | 222 + ext/reflection/tests/static_properties_002.phpt | 62 + ext/session/mod_files.c | 8 +- ext/session/mod_files.h | 8 +- ext/session/mod_mm.c | 8 +- ext/session/mod_mm.h | 8 +- ext/session/mod_user.c | 8 +- ext/session/mod_user.h | 8 +- ext/session/php_session.h | 8 +- ext/session/session.c | 10 +- ext/shmop/php_shmop.h | 6 +- ext/shmop/shmop.c | 10 +- ext/simplexml/php_simplexml.h | 8 +- ext/simplexml/php_simplexml_exports.h | 8 +- ext/simplexml/simplexml.c | 575 +- ext/simplexml/tests/000.phpt | 254 + ext/simplexml/tests/000.xml | 16 + ext/simplexml/tests/001.phpt | 68 +- ext/simplexml/tests/002.phpt | 68 +- ext/simplexml/tests/003.phpt | 80 +- ext/simplexml/tests/004.phpt | 63 +- ext/simplexml/tests/005.phpt | 2 +- ext/simplexml/tests/006.phpt | 2 +- ext/simplexml/tests/007.phpt | 9 +- ext/simplexml/tests/008.phpt | 2 +- ext/simplexml/tests/009.phpt | 4 +- ext/simplexml/tests/010.phpt | 63 +- ext/simplexml/tests/011.phpt | 2 +- ext/simplexml/tests/012.phpt | 3 +- ext/simplexml/tests/013.phpt | 2 +- ext/simplexml/tests/014a.phpt | 2 +- ext/simplexml/tests/014b.phpt | 2 +- ext/simplexml/tests/019.phpt | 2 +- ext/simplexml/tests/020.phpt | 2 +- ext/simplexml/tests/021.phpt | 2 +- ext/simplexml/tests/022.phpt | 36 +- ext/simplexml/tests/023.phpt | 7 +- ext/simplexml/tests/024.phpt | 175 + ext/simplexml/tests/025.phpt | 92 + ext/simplexml/tests/bug27010.phpt | 4 +- ext/simplexml/tests/bug35785.phpt | 23 + ext/simplexml/tests/profile11.phpt | 31 +- ext/simplexml/tests/simplexml_import_dom.phpt | 2 +- ext/skeleton/skeleton.c | 2 +- ext/snmp/config.m4 | 4 +- ext/snmp/php_snmp.h | 8 +- ext/snmp/snmp.c | 10 +- ext/snmp/winsnmp.c | 4 +- ext/soap/interop/client_round2_interop.php | 4 +- ext/soap/interop/client_round2_params.php | 4 +- ext/soap/interop/client_round2_results.php | 4 +- ext/soap/interop/client_round2_run.php | 4 +- ext/soap/interop/server_round2_base.php | 4 +- ext/soap/interop/server_round2_groupB.php | 4 +- ext/soap/interop/server_round2_groupC.php | 4 +- ext/soap/php_encoding.c | 10 +- ext/soap/php_encoding.h | 8 +- ext/soap/php_http.c | 14 +- ext/soap/php_http.h | 8 +- ext/soap/php_packet_soap.c | 8 +- ext/soap/php_packet_soap.h | 8 +- ext/soap/php_schema.c | 14 +- ext/soap/php_schema.h | 8 +- ext/soap/php_sdl.c | 50 +- ext/soap/php_sdl.h | 8 +- ext/soap/php_soap.h | 8 +- ext/soap/php_xml.c | 8 +- ext/soap/php_xml.h | 8 +- ext/soap/soap.c | 30 +- ext/sockets/php_sockets.h | 8 +- ext/sockets/php_sockets_win.c | 8 +- ext/sockets/php_sockets_win.h | 8 +- ext/sockets/sockets.c | 33 +- ext/sockets/unix_socket_constants.h | 8 +- ext/sockets/win32_socket_constants.h | 8 +- ext/spl/config.m4 | 22 +- ext/spl/examples/directorygraphiterator.inc | 4 +- ext/spl/examples/directorytreeiterator.inc | 4 +- ext/spl/examples/nocvsdir.php | 7 +- ext/spl/internal/iteratoriterator.inc | 4 +- ext/spl/internal/limititerator.inc | 2 +- ext/spl/php_spl.c | 46 +- ext/spl/php_spl.h | 6 +- ext/spl/spl_array.c | 8 +- ext/spl/spl_array.h | 8 +- ext/spl/spl_directory.c | 1496 +- ext/spl/spl_directory.h | 80 +- ext/spl/spl_engine.c | 6 +- ext/spl/spl_engine.h | 8 +- ext/spl/spl_exceptions.c | 8 +- ext/spl/spl_exceptions.h | 8 +- ext/spl/spl_functions.c | 14 +- ext/spl/spl_functions.h | 14 +- ext/spl/spl_iterators.c | 129 +- ext/spl/spl_iterators.h | 8 +- ext/spl/spl_observer.c | 53 +- ext/spl/spl_observer.h | 8 +- ext/spl/spl_sxe.c | 8 +- ext/spl/spl_sxe.h | 8 +- ext/spl/tests/array_015.phpt | 2 + ext/spl/tests/array_016.phpt | 2 +- ext/spl/tests/bug31185.phpt | 2 + ext/spl/tests/bug31346.phpt | 2 + ext/spl/tests/bug31348.phpt | 2 + ext/spl/tests/bug31926.phpt | 2 + ext/spl/tests/bug32134.phpt | 2 + ext/spl/tests/bug32394.phpt | 2 + ext/spl/tests/bug33136.phpt | 2 + ext/spl/tests/bug34548.phpt | 2 + ext/spl/tests/fileobject_001.phpt | 2 + ext/spl/tests/fileobject_002.phpt | 2 + ext/spl/tests/iterator_010.phpt | 2 + ext/spl/tests/iterator_011.phpt | 2 + ext/spl/tests/iterator_012.phpt | 2 + ext/spl/tests/iterator_013.phpt | 2 + ext/spl/tests/iterator_014.phpt | 2 + ext/spl/tests/iterator_015.phpt | 2 + ext/spl/tests/iterator_016.phpt | 2 + ext/spl/tests/iterator_017.phpt | 2 + ext/spl/tests/iterator_018.phpt | 2 + ext/spl/tests/iterator_019.phpt | 2 + ext/spl/tests/iterator_020.phpt | 2 + ext/spl/tests/iterator_021.phpt | 2 + ext/spl/tests/iterator_022.phpt | 2 + ext/spl/tests/iterator_023.phpt | 2 + ext/spl/tests/iterator_024.phpt | 2 + ext/spl/tests/iterator_025.phpt | 2 + ext/spl/tests/iterator_026.phpt | 2 + ext/spl/tests/iterator_028.phpt | 60 +- ext/spl/tests/observer_001.phpt | 2 + ext/spl/tests/observer_002.phpt | 2 + ext/spl/tests/spl_001.phpt | 2 + ext/spl/tests/spl_002.phpt | 2 + ext/spl/tests/spl_autoload_001.phpt | 2 + ext/spl/tests/spl_autoload_002.phpt | 5 +- ext/spl/tests/spl_autoload_003.phpt | 2 + ext/spl/tests/spl_autoload_004.phpt | 15 +- ext/spl/tests/spl_autoload_005.phpt | 2 + ext/spl/tests/spl_autoload_006.phpt | 2 + ext/spl/tests/spl_autoload_007.phpt | 140 + ext/spl/tests/sxe_001.phpt | 63 +- ext/spl/tests/sxe_004.phpt | 59 - ext/sqlite/config.m4 | 9 +- ext/sqlite/libsqlite/VERSION | 2 +- ext/sqlite/libsqlite/src/os.c | 1 + ext/sqlite/libsqlite/src/pager.c | 4 +- ext/sqlite/libsqlite/src/parse.c | 1749 +- ext/sqlite/libsqlite/src/sqlite.w32.h | 4 +- ext/sqlite/libsqlite/src/sqliteInt.h | 4 +- ext/sqlite/libsqlite/src/util.c | 13 +- ext/sqlite/pdo_sqlite2.c | 18 +- ext/sqlite/php_sqlite.h | 10 +- ext/sqlite/sess_sqlite.c | 8 +- ext/sqlite/sqlite.c | 164 +- ext/sqlite/tests/blankdb.inc | 16 +- ext/sqlite/tests/blankdb_oo.inc | 10 +- ext/sqlite/tests/bug28112.phpt | 2 + ext/standard/Makefile.frag | 4 +- ext/standard/array.c | 58 +- ext/standard/assert.c | 10 +- ext/standard/base64.c | 8 +- ext/standard/base64.h | 8 +- ext/standard/basic_functions.c | 110 +- ext/standard/basic_functions.h | 8 +- ext/standard/browscap.c | 24 +- ext/standard/config.m4 | 6 +- ext/standard/config.w32 | 4 +- ext/standard/crc32.c | 8 +- ext/standard/crc32.h | 8 +- ext/standard/credits.c | 8 +- ext/standard/credits.h | 8 +- ext/standard/credits_ext.h | 8 +- ext/standard/crypt.c | 8 +- ext/standard/css.c | 8 +- ext/standard/css.h | 8 +- ext/standard/cyr_convert.c | 10 +- ext/standard/cyr_convert.h | 8 +- ext/standard/datetime.c | 165 +- ext/standard/datetime.h | 14 +- ext/standard/dir.c | 14 +- ext/standard/dl.c | 8 +- ext/standard/dl.h | 8 +- ext/standard/dns.c | 20 +- ext/standard/dns.h | 8 +- ext/standard/exec.c | 16 +- ext/standard/exec.h | 10 +- ext/standard/file.c | 12 +- ext/standard/file.h | 8 +- ext/standard/filestat.c | 24 +- ext/standard/filters.c | 8 +- ext/standard/flock_compat.c | 8 +- ext/standard/flock_compat.h | 8 +- ext/standard/formatted_print.c | 8 +- ext/standard/fsock.c | 8 +- ext/standard/fsock.h | 8 +- ext/standard/ftok.c | 8 +- ext/standard/ftp_fopen_wrapper.c | 8 +- ext/standard/head.c | 8 +- ext/standard/head.h | 8 +- ext/standard/html.c | 8 +- ext/standard/html.h | 8 +- ext/standard/http.c | 33 +- ext/standard/http_fopen_wrapper.c | 87 +- ext/standard/image.c | 12 +- ext/standard/incomplete_class.c | 8 +- ext/standard/info.c | 10 +- ext/standard/info.h | 8 +- ext/standard/iptc.c | 10 +- ext/standard/lcg.c | 8 +- ext/standard/levenshtein.c | 8 +- ext/standard/link.c | 8 +- ext/standard/mail.c | 8 +- ext/standard/math.c | 8 +- ext/standard/md5.c | 8 +- ext/standard/md5.h | 8 +- ext/standard/metaphone.c | 8 +- ext/standard/microtime.c | 8 +- ext/standard/microtime.h | 8 +- ext/standard/pack.c | 18 +- ext/standard/pack.h | 8 +- ext/standard/pageinfo.c | 8 +- ext/standard/pageinfo.h | 8 +- ext/standard/php_array.h | 8 +- ext/standard/php_assert.h | 8 +- ext/standard/php_browscap.h | 8 +- ext/standard/php_crypt.h | 8 +- ext/standard/php_dir.h | 8 +- ext/standard/php_ext_syslog.h | 8 +- ext/standard/php_filestat.h | 10 +- ext/standard/php_fopen_wrapper.c | 8 +- ext/standard/php_fopen_wrappers.h | 8 +- ext/standard/php_ftok.h | 8 +- ext/standard/php_http.h | 10 +- ext/standard/php_image.h | 8 +- ext/standard/php_incomplete_class.h | 8 +- ext/standard/php_iptc.h | 8 +- ext/standard/php_lcg.h | 8 +- ext/standard/php_link.h | 8 +- ext/standard/php_mail.h | 8 +- ext/standard/php_math.h | 8 +- ext/standard/php_metaphone.h | 8 +- ext/standard/php_rand.h | 8 +- ext/standard/php_smart_str.h | 8 +- ext/standard/php_smart_str_public.h | 8 +- ext/standard/php_standard.h | 9 +- ext/standard/php_string.h | 12 +- ext/standard/php_sunfuncs.h | 42 - ext/standard/php_type.h | 8 +- ext/standard/php_uuencode.h | 8 +- ext/standard/php_var.h | 8 +- ext/standard/php_versioning.h | 8 +- ext/standard/proc_open.c | 8 +- ext/standard/proc_open.h | 8 +- ext/standard/quot_print.c | 10 +- ext/standard/quot_print.h | 8 +- ext/standard/rand.c | 8 +- ext/standard/reg.c | 12 +- ext/standard/reg.h | 8 +- ext/standard/scanf.c | 16 +- ext/standard/scanf.h | 10 +- ext/standard/sha1.c | 8 +- ext/standard/sha1.h | 8 +- ext/standard/soundex.c | 8 +- ext/standard/streamsfuncs.c | 8 +- ext/standard/streamsfuncs.h | 8 +- ext/standard/string.c | 45 +- ext/standard/sunfuncs.c | 244 - ext/standard/syslog.c | 8 +- ext/standard/tests/array/bug35014.phpt | 6 +- ext/standard/tests/array/bug35014_64bit.phpt | 36 + ext/standard/tests/array/bug35821.phpt | 33 + ext/standard/tests/file/bug35740.phpt | 14 + ext/standard/tests/file/bug35781.phpt | 24 + ext/standard/tests/file/proc_open01.phpt | 4 +- ext/standard/tests/filters/bug35916.phpt | 42 + ext/standard/tests/general_functions/bug27678.phpt | 14 + ext/standard/tests/general_functions/bug32647.phpt | 20 +- .../tests/general_functions/sunfuncts.phpt | 48 +- ext/standard/tests/strings/bug35817.phpt | 29 + ext/standard/tests/strings/http_build_query.phpt | 15 + ext/standard/tests/strings/str_word_count.phpt | 30 +- ext/standard/tests/strings/url_t.phpt | 13 + ext/standard/type.c | 18 +- ext/standard/uniqid.c | 8 +- ext/standard/uniqid.h | 8 +- ext/standard/url.c | 50 +- ext/standard/url.h | 17 +- ext/standard/url_scanner.c | 8 +- ext/standard/url_scanner.h | 8 +- ext/standard/url_scanner_ex.c | 14 +- ext/standard/url_scanner_ex.c.orig | 126 +- ext/standard/url_scanner_ex.h | 8 +- ext/standard/url_scanner_ex.re | 8 +- ext/standard/user_filters.c | 8 +- ext/standard/uuencode.c | 8 +- ext/standard/var.c | 8 +- ext/standard/var_unserializer.c | 12 +- ext/standard/var_unserializer.c.orig | 72 +- ext/standard/var_unserializer.re | 8 +- ext/standard/versioning.c | 8 +- ext/sybase/php_sybase_db.c | 44 +- ext/sybase/php_sybase_db.h | 8 +- ext/sybase_ct/php_sybase_ct.c | 24 +- ext/sybase_ct/php_sybase_ct.h | 10 +- ext/sysvmsg/php_sysvmsg.h | 8 +- ext/sysvmsg/sysvmsg.c | 15 +- ext/sysvsem/php_sysvsem.h | 8 +- ext/sysvsem/sysvsem.c | 22 +- ext/sysvshm/php_sysvshm.h | 8 +- ext/sysvshm/sysvshm.c | 10 +- ext/tidy/php_tidy.h | 8 +- ext/tidy/tidy.c | 18 +- ext/tokenizer/php_tokenizer.h | 8 +- ext/tokenizer/tests/001.phpt | 263 + ext/tokenizer/tests/002.phpt | 788 + ext/tokenizer/tests/003.phpt | 42 + ext/tokenizer/tests/bug26463.phpt | 64 +- ext/tokenizer/tokenizer.c | 10 +- ext/wddx/config.m4 | 4 +- ext/wddx/php_wddx.h | 8 +- ext/wddx/php_wddx_api.h | 8 +- ext/wddx/tests/001.phpt | 2 + ext/wddx/tests/bug27287.phpt | 2 + ext/wddx/tests/bug34306.phpt | 2 + ext/wddx/tests/bug35410.phpt | 76 + ext/wddx/tests/bug35410_64bit.phpt | 76 + ext/wddx/wddx.c | 14 +- ext/xml/compat.c | 13 +- ext/xml/config.m4 | 4 +- ext/xml/expat_compat.h | 8 +- ext/xml/php_xml.h | 10 +- ext/xml/tests/bug25666.phpt | 3 +- ext/xml/tests/bug26528.phpt | 4 + ext/xml/tests/bug26614.phpt | 5 +- ext/xml/tests/bug26614_libxml.phpt | 5 +- ext/xml/tests/bug27908.phpt | 4 + ext/xml/tests/bug30266.phpt | 4 + ext/xml/tests/bug32001.phpt | 85 +- ext/xml/tests/bug32001b.phpt | 184 + ext/xml/tests/bug35447.phpt | 49 + ext/xml/tests/xml001.phpt | 16 +- ext/xml/tests/xml002.phpt | 16 +- ext/xml/tests/xml003.phpt | 16 +- ext/xml/tests/xml009.phpt | 1 + ext/xml/tests/xml010.phpt | 1 + ext/xml/xml.c | 10 +- ext/xmlreader/config.m4 | 7 +- ext/xmlreader/config.w32 | 4 +- ext/xmlreader/php_xmlreader.c | 72 +- ext/xmlreader/php_xmlreader.h | 8 +- ext/xmlreader/tests/001.phpt | 29 + ext/xmlreader/tests/002.phpt | 41 + ext/xmlreader/tests/003.phpt | 84 + ext/xmlreader/tests/004.phpt | 44 + ext/xmlreader/tests/005.phpt | 37 + ext/xmlreader/tests/006.phpt | 36 + ext/xmlreader/tests/007.phpt | 57 + ext/xmlreader/tests/008.phpt | 71 + ext/xmlreader/tests/009.phpt | 28 + ext/xmlreader/tests/010.phpt | 27 + ext/xmlreader/tests/dtdexample.dtd | 8 + ext/xmlreader/tests/relaxNG.rng | 11 + ext/xmlreader/tests/relaxNG2.rng | 23 + ext/xmlreader/tests/relaxNG3.rng | 8 + ext/xmlrpc/config.m4 | 4 +- ext/xmlrpc/libxmlrpc/xml_to_soap.c | 2 +- ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c | 7 +- ext/xmlrpc/php_xmlrpc.h | 8 +- ext/xmlrpc/xmlrpc-epi-php.c | 12 +- ext/xmlwriter/CREDITS | 3 + ext/xmlwriter/TODO | 5 + ext/xmlwriter/config.m4 | 26 + ext/xmlwriter/config.w32 | 18 + ext/xmlwriter/examples/xmlwriter_file.php | 44 + ext/xmlwriter/examples/xmlwriter_mem.php | 39 + ext/xmlwriter/examples/xmlwriter_mem_ns.php | 30 + ext/xmlwriter/examples/xmlwriter_oo.php | 9 + ext/xmlwriter/package.xml | 107 + ext/xmlwriter/package2.xml | 94 + ext/xmlwriter/php_xmlwriter.c | 1852 ++ ext/xmlwriter/php_xmlwriter.h | 115 + ext/xmlwriter/tests/001.phpt | 25 + ext/xmlwriter/tests/002.phpt | 22 + ext/xmlwriter/tests/003.phpt | 35 + ext/xmlwriter/tests/004.phpt | 36 + ext/xmlwriter/tests/005.phpt | 33 + ext/xmlwriter/tests/006.phpt | 26 + ext/xmlwriter/tests/007.phpt | 38 + ext/xmlwriter/tests/008.phpt | 34 + ext/xmlwriter/tests/009.phpt | 43 + ext/xmlwriter/tests/OO_001.phpt | 26 + ext/xmlwriter/tests/OO_002.phpt | 22 + ext/xmlwriter/tests/OO_003.phpt | 37 + ext/xmlwriter/tests/OO_004.phpt | 37 + ext/xmlwriter/tests/OO_005.phpt | 33 + ext/xmlwriter/tests/OO_006.phpt | 27 + ext/xmlwriter/tests/OO_007.phpt | 39 + ext/xmlwriter/tests/OO_008.phpt | 35 + ext/xmlwriter/tests/OO_009.phpt | 43 + ext/xmlwriter/xmlwriter.dsp | 113 + ext/xsl/php_xsl.c | 18 +- ext/xsl/php_xsl.h | 8 +- ext/xsl/xsl_fe.h | 8 +- ext/xsl/xsltprocessor.c | 8 +- ext/zlib/config0.m4 | 4 +- ext/zlib/php_zlib.def | 3 + ext/zlib/php_zlib.h | 8 +- ext/zlib/tests/compress_zlib_wrapper.phpt | 2 + ext/zlib/zlib.c | 10 +- ext/zlib/zlib_filter.c | 8 +- ext/zlib/zlib_fopen_wrapper.c | 8 +- 1002 files changed, 71355 insertions(+), 45945 deletions(-) create mode 100644 ext/date/lib/astro.c create mode 100644 ext/date/lib/astro.h create mode 100644 ext/date/tests/bug35414.phpt create mode 100644 ext/date/tests/bug35422.phpt create mode 100644 ext/date/tests/bug35425.phpt create mode 100644 ext/date/tests/bug35456.phpt create mode 100644 ext/date/tests/bug35499.phpt create mode 100644 ext/date/tests/bug35624.phpt create mode 100644 ext/date/tests/bug35630.phpt create mode 100644 ext/date/tests/bug35699.phpt create mode 100644 ext/date/tests/bug35705.phpt create mode 100644 ext/date/tests/bug35885.phpt create mode 100644 ext/date/tests/bug35887.phpt create mode 100644 ext/gd/tests/colormatch.phpt create mode 100644 ext/gd/tests/copypalette.phpt create mode 100644 ext/gd/tests/createfromstring.phpt create mode 100644 ext/gd/tests/pngcomp.phpt create mode 100644 ext/gd/tests/src.png create mode 100644 ext/hash/CREDITS create mode 100644 ext/hash/EXPERIMENTAL create mode 100644 ext/hash/README create mode 100644 ext/hash/bench.php create mode 100644 ext/hash/config.m4 create mode 100644 ext/hash/config.w32 create mode 100644 ext/hash/hash.c create mode 100644 ext/hash/hash_adler32.c create mode 100644 ext/hash/hash_crc32.c create mode 100644 ext/hash/hash_gost.c create mode 100644 ext/hash/hash_haval.c create mode 100644 ext/hash/hash_md.c create mode 100644 ext/hash/hash_ripemd.c create mode 100644 ext/hash/hash_salsa.c create mode 100644 ext/hash/hash_sha.c create mode 100644 ext/hash/hash_snefru.c create mode 100644 ext/hash/hash_tiger.c create mode 100644 ext/hash/hash_whirlpool.c create mode 100644 ext/hash/package.xml create mode 100644 ext/hash/php_hash.h create mode 100644 ext/hash/php_hash_adler32.h create mode 100644 ext/hash/php_hash_crc32.h create mode 100644 ext/hash/php_hash_crc32_tables.h create mode 100644 ext/hash/php_hash_gost.h create mode 100644 ext/hash/php_hash_gost_tables.h create mode 100644 ext/hash/php_hash_haval.h create mode 100644 ext/hash/php_hash_md.h create mode 100644 ext/hash/php_hash_ripemd.h create mode 100644 ext/hash/php_hash_salsa.h create mode 100644 ext/hash/php_hash_sha.h create mode 100644 ext/hash/php_hash_snefru.h create mode 100644 ext/hash/php_hash_snefru_tables.h create mode 100644 ext/hash/php_hash_tiger.h create mode 100644 ext/hash/php_hash_tiger_tables.h create mode 100644 ext/hash/php_hash_types.h create mode 100644 ext/hash/php_hash_whirlpool.h create mode 100644 ext/hash/php_hash_whirlpool_tables.h create mode 100644 ext/hash/tests/adler32.phpt create mode 100644 ext/hash/tests/crc32.phpt create mode 100644 ext/hash/tests/gost.phpt create mode 100644 ext/hash/tests/haval.phpt create mode 100644 ext/hash/tests/hmac-md5.phpt create mode 100644 ext/hash/tests/md4.phpt create mode 100644 ext/hash/tests/md5.phpt create mode 100644 ext/hash/tests/ripemd128.phpt create mode 100644 ext/hash/tests/ripemd160.phpt create mode 100644 ext/hash/tests/sha1.phpt create mode 100644 ext/hash/tests/sha256.phpt create mode 100644 ext/hash/tests/sha384.phpt create mode 100644 ext/hash/tests/sha512.phpt create mode 100644 ext/hash/tests/snefru.phpt create mode 100644 ext/hash/tests/tiger.phpt create mode 100644 ext/hash/tests/whirlpool.phpt create mode 100644 ext/imap/tests/bug35669.phpt create mode 100644 ext/mbstring/libmbfl/nls/nls_tr.c create mode 100644 ext/mbstring/libmbfl/nls/nls_tr.h create mode 100644 ext/mcrypt/tests/bug35496.phpt create mode 100644 ext/mysqli/tests/bug35103.phpt create mode 100644 ext/mysqli/tests/bug35517.phpt create mode 100644 ext/mysqli/tests/bug35759.phpt create mode 100644 ext/oci8/README create mode 100644 ext/oci8/oci8_collection.c create mode 100644 ext/oci8/oci8_interface.c create mode 100644 ext/oci8/oci8_lob.c create mode 100644 ext/oci8/oci8_statement.c create mode 100644 ext/oci8/php_oci8_int.h create mode 100644 ext/oci8/tests/array_bind_001.phpt create mode 100644 ext/oci8/tests/array_bind_002.phpt create mode 100644 ext/oci8/tests/array_bind_003.phpt create mode 100644 ext/oci8/tests/array_bind_004.phpt create mode 100644 ext/oci8/tests/array_bind_005.phpt create mode 100644 ext/oci8/tests/array_bind_006.phpt create mode 100644 ext/oci8/tests/array_bind_007.phpt create mode 100644 ext/oci8/tests/array_bind_008.phpt create mode 100644 ext/oci8/tests/array_bind_009.phpt create mode 100644 ext/oci8/tests/array_bind_010.phpt create mode 100644 ext/oci8/tests/array_bind_011.phpt create mode 100644 ext/oci8/tests/array_bind_012.phpt create mode 100644 ext/oci8/tests/array_bind_date.phpt create mode 100644 ext/oci8/tests/array_bind_date1.phpt create mode 100644 ext/oci8/tests/array_bind_float.phpt create mode 100644 ext/oci8/tests/array_bind_float1.phpt create mode 100644 ext/oci8/tests/array_bind_int.phpt create mode 100644 ext/oci8/tests/array_bind_int1.phpt create mode 100644 ext/oci8/tests/array_bind_str.phpt create mode 100644 ext/oci8/tests/array_bind_str1.phpt create mode 100644 ext/oci8/tests/bind_empty.phpt create mode 100644 ext/oci8/tests/bug27303.phpt create mode 100644 ext/oci8/tests/bug27303_2.phpt create mode 100644 ext/oci8/tests/bug27303_3.phpt create mode 100644 ext/oci8/tests/bug27303_4.phpt create mode 100644 ext/oci8/tests/bug32325.phpt create mode 100644 ext/oci8/tests/close.phpt create mode 100644 ext/oci8/tests/coll_001.phpt create mode 100644 ext/oci8/tests/coll_002.phpt create mode 100644 ext/oci8/tests/coll_002_func.phpt create mode 100644 ext/oci8/tests/coll_003.phpt create mode 100644 ext/oci8/tests/coll_003_func.phpt create mode 100644 ext/oci8/tests/coll_004.phpt create mode 100644 ext/oci8/tests/coll_004_func.phpt create mode 100644 ext/oci8/tests/coll_005.phpt create mode 100644 ext/oci8/tests/coll_006.phpt create mode 100644 ext/oci8/tests/coll_006_func.phpt create mode 100644 ext/oci8/tests/coll_007.phpt create mode 100644 ext/oci8/tests/coll_008.phpt create mode 100644 ext/oci8/tests/coll_009.phpt create mode 100644 ext/oci8/tests/coll_009_func.phpt create mode 100644 ext/oci8/tests/coll_010.phpt create mode 100644 ext/oci8/tests/coll_010_func.phpt create mode 100644 ext/oci8/tests/coll_011.phpt create mode 100644 ext/oci8/tests/coll_011_func.phpt create mode 100644 ext/oci8/tests/coll_012.phpt create mode 100644 ext/oci8/tests/coll_012_func.phpt create mode 100644 ext/oci8/tests/coll_013.phpt create mode 100644 ext/oci8/tests/coll_013_func.phpt create mode 100644 ext/oci8/tests/coll_014.phpt create mode 100644 ext/oci8/tests/coll_014_func.phpt create mode 100644 ext/oci8/tests/coll_015.phpt create mode 100644 ext/oci8/tests/coll_015_func.phpt create mode 100644 ext/oci8/tests/coll_016.phpt create mode 100644 ext/oci8/tests/coll_016_func.phpt create mode 100644 ext/oci8/tests/coll_017.phpt create mode 100644 ext/oci8/tests/coll_017_func.phpt create mode 100644 ext/oci8/tests/commit.phpt create mode 100644 ext/oci8/tests/commit_old.phpt create mode 100644 ext/oci8/tests/connect.phpt create mode 100644 ext/oci8/tests/connect_1.phpt create mode 100644 ext/oci8/tests/connect_1_old.phpt create mode 100644 ext/oci8/tests/connect_old.phpt create mode 100644 ext/oci8/tests/connect_without_oracle_home.phpt create mode 100644 ext/oci8/tests/connect_without_oracle_home_old.phpt create mode 100644 ext/oci8/tests/create_type.inc create mode 100644 ext/oci8/tests/cursor_bind.phpt create mode 100644 ext/oci8/tests/cursor_bind_err.phpt create mode 100644 ext/oci8/tests/cursors.phpt create mode 100644 ext/oci8/tests/cursors_old.phpt create mode 100644 ext/oci8/tests/debug.phpt create mode 100644 ext/oci8/tests/default_prefetch.phpt create mode 100644 ext/oci8/tests/default_prefetch1.phpt create mode 100644 ext/oci8/tests/default_prefetch2.phpt create mode 100644 ext/oci8/tests/define.phpt create mode 100644 ext/oci8/tests/define_old.phpt create mode 100644 ext/oci8/tests/descriptors.phpt create mode 100644 ext/oci8/tests/drop_type.inc create mode 100644 ext/oci8/tests/error.phpt create mode 100644 ext/oci8/tests/error1.phpt create mode 100644 ext/oci8/tests/error_old.phpt create mode 100644 ext/oci8/tests/exec_fetch.phpt create mode 100644 ext/oci8/tests/execute_mode.phpt create mode 100644 ext/oci8/tests/fetch.phpt create mode 100644 ext/oci8/tests/fetch_all.phpt create mode 100644 ext/oci8/tests/fetch_array.phpt create mode 100644 ext/oci8/tests/fetch_assoc.phpt create mode 100644 ext/oci8/tests/fetch_into.phpt create mode 100644 ext/oci8/tests/fetch_into1.phpt create mode 100644 ext/oci8/tests/fetch_into2.phpt create mode 100644 ext/oci8/tests/fetch_object.phpt create mode 100644 ext/oci8/tests/fetch_row.phpt create mode 100644 ext/oci8/tests/field_funcs.phpt create mode 100644 ext/oci8/tests/field_funcs1.phpt create mode 100644 ext/oci8/tests/field_funcs_old.phpt create mode 100644 ext/oci8/tests/lob_001.phpt create mode 100644 ext/oci8/tests/lob_002.phpt create mode 100644 ext/oci8/tests/lob_003.phpt create mode 100644 ext/oci8/tests/lob_004.phpt create mode 100644 ext/oci8/tests/lob_005.phpt create mode 100644 ext/oci8/tests/lob_006.phpt create mode 100644 ext/oci8/tests/lob_007.phpt create mode 100644 ext/oci8/tests/lob_008.phpt create mode 100644 ext/oci8/tests/lob_009.phpt create mode 100644 ext/oci8/tests/lob_009.txt create mode 100644 ext/oci8/tests/lob_010.phpt create mode 100644 ext/oci8/tests/lob_011.phpt create mode 100644 ext/oci8/tests/lob_012.phpt create mode 100644 ext/oci8/tests/lob_013.phpt create mode 100644 ext/oci8/tests/lob_014.phpt create mode 100644 ext/oci8/tests/lob_015.phpt create mode 100644 ext/oci8/tests/lob_016.phpt create mode 100644 ext/oci8/tests/lob_017.phpt create mode 100644 ext/oci8/tests/lob_018.phpt create mode 100644 ext/oci8/tests/lob_temp.phpt create mode 100644 ext/oci8/tests/lob_temp1.phpt create mode 100644 ext/oci8/tests/num.phpt create mode 100644 ext/oci8/tests/oci_execute_segfault.phpt create mode 100644 ext/oci8/tests/old_oci_close.phpt create mode 100644 ext/oci8/tests/old_oci_close1.phpt create mode 100644 ext/oci8/tests/password.phpt create mode 100644 ext/oci8/tests/password_new.phpt create mode 100644 ext/oci8/tests/password_old.phpt create mode 100644 ext/oci8/tests/persistent.phpt create mode 100644 ext/oci8/tests/prefetch.phpt create mode 100644 ext/oci8/tests/prefetch_old.phpt create mode 100644 ext/oci8/tests/privileged_connect.phpt create mode 100644 ext/oci8/tests/privileged_connect1.phpt create mode 100644 ext/oci8/tests/select_null.phpt create mode 100644 ext/oci8/tests/serverversion.phpt create mode 100644 ext/oci8/tests/statement_cache.phpt create mode 100644 ext/oci8/tests/statement_type.phpt create mode 100644 ext/oci8/tests/statement_type_old.phpt create mode 100644 ext/oci8/tests/uncommitted.phpt delete mode 100644 ext/openssl/tests/skipif.inc create mode 100644 ext/pcre/php_pcre.def delete mode 100755 ext/pdo/package.xml create mode 100644 ext/pdo/package2.xml delete mode 100644 ext/pdo_dblib/package.xml create mode 100644 ext/pdo_dblib/package2.xml delete mode 100644 ext/pdo_firebird/package.xml create mode 100644 ext/pdo_firebird/package2.xml delete mode 100644 ext/pdo_mysql/package.xml create mode 100644 ext/pdo_mysql/package2.xml delete mode 100755 ext/pdo_oci/package.xml create mode 100644 ext/pdo_oci/package2.xml delete mode 100755 ext/pdo_odbc/package.xml create mode 100644 ext/pdo_odbc/package2.xml delete mode 100644 ext/pdo_pgsql/package.xml create mode 100644 ext/pdo_pgsql/package2.xml create mode 100644 ext/pdo_pgsql/tests/config.inc create mode 100644 ext/pdo_pgsql/tests/large_objects.phpt delete mode 100755 ext/pdo_sqlite/package.xml create mode 100644 ext/pdo_sqlite/package2.xml create mode 100755 ext/reflection/CREDITS create mode 100755 ext/reflection/config.m4 create mode 100755 ext/reflection/config.w32 create mode 100644 ext/reflection/php_reflection.c create mode 100644 ext/reflection/php_reflection.h create mode 100755 ext/reflection/tests/001.phpt create mode 100755 ext/reflection/tests/002.phpt create mode 100755 ext/reflection/tests/003.phpt create mode 100755 ext/reflection/tests/004.phpt create mode 100755 ext/reflection/tests/005.phpt create mode 100755 ext/reflection/tests/006.phpt create mode 100755 ext/reflection/tests/bug26640.phpt create mode 100755 ext/reflection/tests/bug26695.phpt create mode 100755 ext/reflection/tests/bug29268.phpt create mode 100755 ext/reflection/tests/bug29523.phpt create mode 100755 ext/reflection/tests/bug29828.phpt create mode 100755 ext/reflection/tests/bug30146.phpt create mode 100755 ext/reflection/tests/bug30148.phpt create mode 100755 ext/reflection/tests/bug30209.phpt create mode 100755 ext/reflection/tests/bug30856.phpt create mode 100755 ext/reflection/tests/bug30961.phpt create mode 100755 ext/reflection/tests/bug31651.phpt create mode 100755 ext/reflection/tests/bug32981.phpt create mode 100755 ext/reflection/tests/bug33312.phpt create mode 100755 ext/reflection/tests/bug33389.phpt create mode 100644 ext/reflection/tests/exception.inc create mode 100755 ext/reflection/tests/parameters_001.phpt create mode 100755 ext/reflection/tests/property_exists.phpt create mode 100755 ext/reflection/tests/static_properties_002.phpt create mode 100755 ext/simplexml/tests/000.phpt create mode 100755 ext/simplexml/tests/000.xml create mode 100755 ext/simplexml/tests/024.phpt create mode 100755 ext/simplexml/tests/025.phpt create mode 100755 ext/simplexml/tests/bug35785.phpt create mode 100755 ext/spl/tests/spl_autoload_007.phpt delete mode 100644 ext/standard/php_sunfuncs.h delete mode 100644 ext/standard/sunfuncs.c create mode 100644 ext/standard/tests/array/bug35014_64bit.phpt create mode 100644 ext/standard/tests/array/bug35821.phpt create mode 100644 ext/standard/tests/file/bug35740.phpt create mode 100644 ext/standard/tests/file/bug35781.phpt create mode 100644 ext/standard/tests/filters/bug35916.phpt create mode 100644 ext/standard/tests/general_functions/bug27678.phpt create mode 100644 ext/standard/tests/strings/bug35817.phpt create mode 100644 ext/standard/tests/strings/http_build_query.phpt create mode 100644 ext/tokenizer/tests/001.phpt create mode 100644 ext/tokenizer/tests/002.phpt create mode 100644 ext/tokenizer/tests/003.phpt create mode 100755 ext/wddx/tests/bug35410.phpt create mode 100755 ext/wddx/tests/bug35410_64bit.phpt create mode 100755 ext/xml/tests/bug32001b.phpt create mode 100644 ext/xml/tests/bug35447.phpt create mode 100644 ext/xmlreader/tests/001.phpt create mode 100644 ext/xmlreader/tests/002.phpt create mode 100644 ext/xmlreader/tests/003.phpt create mode 100644 ext/xmlreader/tests/004.phpt create mode 100644 ext/xmlreader/tests/005.phpt create mode 100644 ext/xmlreader/tests/006.phpt create mode 100644 ext/xmlreader/tests/007.phpt create mode 100644 ext/xmlreader/tests/008.phpt create mode 100644 ext/xmlreader/tests/009.phpt create mode 100644 ext/xmlreader/tests/010.phpt create mode 100644 ext/xmlreader/tests/dtdexample.dtd create mode 100644 ext/xmlreader/tests/relaxNG.rng create mode 100644 ext/xmlreader/tests/relaxNG2.rng create mode 100644 ext/xmlreader/tests/relaxNG3.rng create mode 100644 ext/xmlwriter/CREDITS create mode 100644 ext/xmlwriter/TODO create mode 100644 ext/xmlwriter/config.m4 create mode 100644 ext/xmlwriter/config.w32 create mode 100644 ext/xmlwriter/examples/xmlwriter_file.php create mode 100644 ext/xmlwriter/examples/xmlwriter_mem.php create mode 100644 ext/xmlwriter/examples/xmlwriter_mem_ns.php create mode 100644 ext/xmlwriter/examples/xmlwriter_oo.php create mode 100644 ext/xmlwriter/package.xml create mode 100644 ext/xmlwriter/package2.xml create mode 100644 ext/xmlwriter/php_xmlwriter.c create mode 100644 ext/xmlwriter/php_xmlwriter.h create mode 100644 ext/xmlwriter/tests/001.phpt create mode 100644 ext/xmlwriter/tests/002.phpt create mode 100644 ext/xmlwriter/tests/003.phpt create mode 100644 ext/xmlwriter/tests/004.phpt create mode 100644 ext/xmlwriter/tests/005.phpt create mode 100644 ext/xmlwriter/tests/006.phpt create mode 100644 ext/xmlwriter/tests/007.phpt create mode 100644 ext/xmlwriter/tests/008.phpt create mode 100644 ext/xmlwriter/tests/009.phpt create mode 100644 ext/xmlwriter/tests/OO_001.phpt create mode 100644 ext/xmlwriter/tests/OO_002.phpt create mode 100644 ext/xmlwriter/tests/OO_003.phpt create mode 100644 ext/xmlwriter/tests/OO_004.phpt create mode 100644 ext/xmlwriter/tests/OO_005.phpt create mode 100644 ext/xmlwriter/tests/OO_006.phpt create mode 100644 ext/xmlwriter/tests/OO_007.phpt create mode 100644 ext/xmlwriter/tests/OO_008.phpt create mode 100644 ext/xmlwriter/tests/OO_009.phpt create mode 100644 ext/xmlwriter/xmlwriter.dsp (limited to 'ext') diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 42bbe4465..2f7b95d21 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bcmath.c,v 1.62 2005/08/03 14:06:38 sniper Exp $ */ +/* $Id: bcmath.c,v 1.62.2.2 2006/01/01 12:50:00 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,7 +33,7 @@ ZEND_DECLARE_MODULE_GLOBALS(bcmath); -function_entry bcmath_functions[] = { +zend_function_entry bcmath_functions[] = { PHP_FE(bcadd, NULL) PHP_FE(bcsub, NULL) PHP_FE(bcmul, NULL) diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h index cab97b09d..b6f144350 100644 --- a/ext/bcmath/php_bcmath.h +++ b/ext/bcmath/php_bcmath.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bcmath.h,v 1.20 2005/08/03 14:06:39 sniper Exp $ */ +/* $Id: php_bcmath.h,v 1.20.2.1 2006/01/01 12:50:00 sniper Exp $ */ #ifndef PHP_BCMATH_H #define PHP_BCMATH_H diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 2dd8dd858..9dbf51655 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c,v 1.14.2.1 2005/10/25 15:53:06 iliaa Exp $ */ +/* $Id: bz2.c,v 1.14.2.3 2006/01/01 12:50:00 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -40,7 +40,7 @@ #define PHP_BZ_ERRSTR 1 #define PHP_BZ_ERRBOTH 2 -function_entry bz2_functions[] = { +zend_function_entry bz2_functions[] = { PHP_FE(bzopen, NULL) PHP_FE(bzread, NULL) PHP_FALIAS(bzwrite, fwrite, NULL) diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index 78e4ba3c4..53802a9e6 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,11 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2_filter.c,v 1.3 2005/08/03 14:06:39 sniper Exp $ */ +/* $Id: bz2_filter.c,v 1.3.2.2 2006/01/01 12:50:00 sniper Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "php.h" #include "php_bz2.h" diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h index fc598923c..9ad1fcfa0 100644 --- a/ext/bz2/php_bz2.h +++ b/ext/bz2/php_bz2.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bz2.h,v 1.7 2005/08/03 14:06:39 sniper Exp $ */ +/* $Id: php_bz2.h,v 1.7.2.1 2006/01/01 12:50:00 sniper Exp $ */ #ifndef PHP_BZ2_H #define PHP_BZ2_H diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index a455eb09a..b4d920add 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -28,7 +28,7 @@ Convert UNIX timestamp to Julian Day */ PHP_FUNCTION(unixtojd) { - pval *timestamp; + zval *timestamp; long jdate; time_t t; struct tm *ta, tmbuf; @@ -60,7 +60,7 @@ PHP_FUNCTION(unixtojd) Convert Julian Day to UNIX timestamp */ PHP_FUNCTION(jdtounix) { - pval *jday; + zval *jday; long uday; if ((ZEND_NUM_ARGS()!= 1) || (zend_get_parameters(ht, 1, &jday) != SUCCESS)) { diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index c1bb37153..97e66a45c 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ | Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: calendar.c,v 1.46 2005/08/03 14:06:40 sniper Exp $ */ +/* $Id: calendar.c,v 1.46.2.2 2006/01/01 12:50:00 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -35,7 +35,7 @@ #include -function_entry calendar_functions[] = { +zend_function_entry calendar_functions[] = { PHP_FE(jdtogregorian, NULL) PHP_FE(gregoriantojd, NULL) PHP_FE(jdtojulian, NULL) diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 225904489..21779d11d 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/calendar/tests/jdtojewish.phpt b/ext/calendar/tests/jdtojewish.phpt index c6dc1fd59..484b95749 100644 --- a/ext/calendar/tests/jdtojewish.phpt +++ b/ext/calendar/tests/jdtojewish.phpt @@ -1,5 +1,7 @@ --TEST-- jdtojewish() function +--SKIPIF-- + --FILE-- --FILE-- --FILE-- | + +----------------------------------------------------------------------+ + */ + +/* $Id: astro.c,v 1.1.2.4 2006/01/04 21:31:29 derick Exp $ */ + +#include +#include +#include "timelib.h" + +#define days_since_2000_Jan_0(y,m,d) \ + (367L*(y)-((7*((y)+(((m)+9)/12)))/4)+((275*(m))/9)+(d)-730530L) + +#ifndef PI + #define PI 3.1415926535897932384 +#endif + +#define RADEG ( 180.0 / PI ) +#define DEGRAD ( PI / 180.0 ) + +/* The trigonometric functions in degrees */ + +#define sind(x) sin((x)*DEGRAD) +#define cosd(x) cos((x)*DEGRAD) +#define tand(x) tan((x)*DEGRAD) + +#define atand(x) (RADEG*atan(x)) +#define asind(x) (RADEG*asin(x)) +#define acosd(x) (RADEG*acos(x)) +#define atan2d(y,x) (RADEG*atan2(y,x)) + + +/* Following are some macros around the "workhorse" function __daylen__ */ +/* They mainly fill in the desired values for the reference altitude */ +/* below the horizon, and also selects whether this altitude should */ +/* refer to the Sun's center or its upper limb. */ + + +#include "astro.h" + +/******************************************************************/ +/* This function reduces any angle to within the first revolution */ +/* by subtracting or adding even multiples of 360.0 until the */ +/* result is >= 0.0 and < 360.0 */ +/******************************************************************/ + +#define INV360 (1.0 / 360.0) + +/*****************************************/ +/* Reduce angle to within 0..360 degrees */ +/*****************************************/ +static double astro_revolution(double x) +{ + return (x - 360.0 * floor(x * INV360)); +} + +/*********************************************/ +/* Reduce angle to within +180..+180 degrees */ +/*********************************************/ +static double astro_rev180( double x ) +{ + return (x - 360.0 * floor(x * INV360 + 0.5)); +} + +/*******************************************************************/ +/* This function computes GMST0, the Greenwich Mean Sidereal Time */ +/* at 0h UT (i.e. the sidereal time at the Greenwhich meridian at */ +/* 0h UT). GMST is then the sidereal time at Greenwich at any */ +/* time of the day. I've generalized GMST0 as well, and define it */ +/* as: GMST0 = GMST - UT -- this allows GMST0 to be computed at */ +/* other times than 0h UT as well. While this sounds somewhat */ +/* contradictory, it is very practical: instead of computing */ +/* GMST like: */ +/* */ +/* GMST = (GMST0) + UT * (366.2422/365.2422) */ +/* */ +/* where (GMST0) is the GMST last time UT was 0 hours, one simply */ +/* computes: */ +/* */ +/* GMST = GMST0 + UT */ +/* */ +/* where GMST0 is the GMST "at 0h UT" but at the current moment! */ +/* Defined in this way, GMST0 will increase with about 4 min a */ +/* day. It also happens that GMST0 (in degrees, 1 hr = 15 degr) */ +/* is equal to the Sun's mean longitude plus/minus 180 degrees! */ +/* (if we neglect aberration, which amounts to 20 seconds of arc */ +/* or 1.33 seconds of time) */ +/* */ +/*******************************************************************/ + +static double astro_GMST0(double d) +{ + double sidtim0; + /* Sidtime at 0h UT = L (Sun's mean longitude) + 180.0 degr */ + /* L = M + w, as defined in sunpos(). Since I'm too lazy to */ + /* add these numbers, I'll let the C compiler do it for me. */ + /* Any decent C compiler will add the constants at compile */ + /* time, imposing no runtime or code overhead. */ + sidtim0 = astro_revolution((180.0 + 356.0470 + 282.9404) + (0.9856002585 + 4.70935E-5) * d); + return sidtim0; +} + +/* This function computes the Sun's position at any instant */ + +/******************************************************/ +/* Computes the Sun's ecliptic longitude and distance */ +/* at an instant given in d, number of days since */ +/* 2000 Jan 0.0. The Sun's ecliptic latitude is not */ +/* computed, since it's always very near 0. */ +/******************************************************/ +static void astro_sunpos(double d, double *lon, double *r) +{ + double M, /* Mean anomaly of the Sun */ + w, /* Mean longitude of perihelion */ + /* Note: Sun's mean longitude = M + w */ + e, /* Eccentricity of Earth's orbit */ + E, /* Eccentric anomaly */ + x, y, /* x, y coordinates in orbit */ + v; /* True anomaly */ + + /* Compute mean elements */ + M = astro_revolution(356.0470 + 0.9856002585 * d); + w = 282.9404 + 4.70935E-5 * d; + e = 0.016709 - 1.151E-9 * d; + + /* Compute true longitude and radius vector */ + E = M + e * RADEG * sind(M) * (1.0 + e * cosd(M)); + x = cosd(E) - e; + y = sqrt(1.0 - e*e) * sind(E); + *r = sqrt(x*x + y*y); /* Solar distance */ + v = atan2d(y, x); /* True anomaly */ + *lon = v + w; /* True solar longitude */ + if (*lon >= 360.0) { + *lon -= 360.0; /* Make it 0..360 degrees */ + } +} + +static void astro_sun_RA_dec(double d, double *RA, double *dec, double *r) +{ + double lon, obl_ecl, x, y, z; + + /* Compute Sun's ecliptical coordinates */ + astro_sunpos(d, &lon, r); + + /* Compute ecliptic rectangular coordinates (z=0) */ + x = *r * cosd(lon); + y = *r * sind(lon); + + /* Compute obliquity of ecliptic (inclination of Earth's axis) */ + obl_ecl = 23.4393 - 3.563E-7 * d; + + /* Convert to equatorial rectangular coordinates - x is unchanged */ + z = y * sind(obl_ecl); + y = y * cosd(obl_ecl); + + /* Convert to spherical coordinates */ + *RA = atan2d(y, x); + *dec = atan2d(z, sqrt(x*x + y*y)); +} + +/** + * Note: timestamp = unixtimestamp (NEEDS to be 00:00:00 UT) + * Eastern longitude positive, Western longitude negative + * Northern latitude positive, Southern latitude negative + * The longitude value IS critical in this function! + * altit = the altitude which the Sun should cross + * Set to -35/60 degrees for rise/set, -6 degrees + * for civil, -12 degrees for nautical and -18 + * degrees for astronomical twilight. + * upper_limb: non-zero -> upper limb, zero -> center + * Set to non-zero (e.g. 1) when computing rise/set + * times, and to zero when computing start/end of + * twilight. + * *rise = where to store the rise time + * *set = where to store the set time + * Both times are relative to the specified altitude, + * and thus this function can be used to compute + * various twilight times, as well as rise/set times + * Return value: 0 = sun rises/sets this day, times stored at + * *trise and *tset. + * +1 = sun above the specified "horizon" 24 hours. + * *trise set to time when the sun is at south, + * minus 12 hours while *tset is set to the south + * time plus 12 hours. "Day" length = 24 hours + * -1 = sun is below the specified "horizon" 24 hours + * "Day" length = 0 hours, *trise and *tset are + * both set to the time when the sun is at south. + * + */ +int timelib_astro_rise_set_altitude(timelib_time *t_loc, double lon, double lat, double altit, int upper_limb, double *h_rise, double *h_set, timelib_sll *ts_rise, timelib_sll *ts_set, timelib_sll *ts_transit) +{ + double d, /* Days since 2000 Jan 0.0 (negative before) */ + sr, /* Solar distance, astronomical units */ + sRA, /* Sun's Right Ascension */ + sdec, /* Sun's declination */ + sradius, /* Sun's apparent radius */ + t, /* Diurnal arc */ + tsouth, /* Time when Sun is at south */ + sidtime; /* Local sidereal time */ + timelib_time *t_utc; + timelib_sll timestamp, old_sse; + + int rc = 0; /* Return cde from function - usually 0 */ + + /* Normalize time */ + old_sse = t_loc->sse; + t_loc->h = 12; + t_loc->i = t_loc->s = 0; + timelib_update_ts(t_loc, NULL); + + /* Calculate TS belonging to UTC 00:00 of the current day */ + t_utc = timelib_time_ctor(); + t_utc->y = t_loc->y; + t_utc->m = t_loc->m; + t_utc->d = t_loc->d; + t_utc->h = t_utc->i = t_utc->s = 0; + timelib_update_ts(t_utc, NULL); + + /* Compute d of 12h local mean solar time */ + timestamp = t_loc->sse; + d = timelib_ts_to_juliandate(timestamp) - lon/360.0; + + /* Compute local sidereal time of this moment */ + sidtime = astro_revolution(astro_GMST0(d) + 180.0 + lon); + + /* Compute Sun's RA + Decl at this moment */ + astro_sun_RA_dec( d, &sRA, &sdec, &sr ); + + /* Compute time when Sun is at south - in hours UT */ + tsouth = 12.0 - astro_rev180(sidtime - sRA) / 15.0; + + /* Compute the Sun's apparent radius, degrees */ + sradius = 0.2666 / sr; + + /* Do correction to upper limb, if necessary */ + if (upper_limb) { + altit -= sradius; + } + + /* Compute the diurnal arc that the Sun traverses to reach */ + /* the specified altitude altit: */ + { + double cost; + cost = (sind(altit) - sind(lat) * sind(sdec)) / (cosd(lat) * cosd(sdec)); + *ts_transit = t_utc->sse + (tsouth * 3600); + if (cost >= 1.0) { + rc = -1; + t = 0.0; /* Sun always below altit */ + + *ts_rise = *ts_set = t_utc->sse + (tsouth * 3600); + } else if (cost <= -1.0) { + rc = +1; + t = 12.0; /* Sun always above altit */ + + *ts_rise = t_loc->sse - (12 * 3600); + *ts_set = t_loc->sse + (12 * 3600); + } else { + t = acosd(cost) / 15.0; /* The diurnal arc, hours */ + + /* Store rise and set times - as Unix Timestamp */ + *ts_rise = ((tsouth - t) * 3600) + t_utc->sse; + *ts_set = ((tsouth + t) * 3600) + t_utc->sse; + + *h_rise = (tsouth - t); + *h_set = (tsouth + t); + } + } + + /* Kill temporary time and restore original sse */ + timelib_time_dtor(t_utc); + t_loc->sse = old_sse; + + return rc; +} + +double timelib_ts_to_juliandate(timelib_sll ts) +{ + double tmp; + + tmp = ts; + tmp /= 86400; + tmp += 2440587.5; + tmp -= 2451543; + + return tmp; +} diff --git a/ext/date/lib/astro.h b/ext/date/lib/astro.h new file mode 100644 index 000000000..7b85c76b7 --- /dev/null +++ b/ext/date/lib/astro.h @@ -0,0 +1,51 @@ +/* This macro computes the length of the day, from sunrise to sunset. */ +/* Sunrise/set is considered to occur when the Sun's upper limb is */ +/* 35 arc minutes below the horizon (this accounts for the refraction */ +/* of the Earth's atmosphere). */ +#define day_length(year,month,day,lon,lat) \ + __daylen__( year, month, day, lon, lat, -35.0/60.0, 1 ) + +/* This macro computes the length of the day, including civil twilight. */ +/* Civil twilight starts/ends when the Sun's center is 6 degrees below */ +/* the horizon. */ +#define day_civil_twilight_length(year,month,day,lon,lat) \ + __daylen__( year, month, day, lon, lat, -6.0, 0 ) + +/* This macro computes the length of the day, incl. nautical twilight. */ +/* Nautical twilight starts/ends when the Sun's center is 12 degrees */ +/* below the horizon. */ +#define day_nautical_twilight_length(year,month,day,lon,lat) \ + __daylen__( year, month, day, lon, lat, -12.0, 0 ) + +/* This macro computes the length of the day, incl. astronomical twilight. */ +/* Astronomical twilight starts/ends when the Sun's center is 18 degrees */ +/* below the horizon. */ +#define day_astronomical_twilight_length(year,month,day,lon,lat) \ + __daylen__( year, month, day, lon, lat, -18.0, 0 ) + + +/* This macro computes times for sunrise/sunset. */ +/* Sunrise/set is considered to occur when the Sun's upper limb is */ +/* 35 arc minutes below the horizon (this accounts for the refraction */ +/* of the Earth's atmosphere). */ +#define timelib_astro_sun_rise_set(ts,lon,lat,hrise,hset,rise,set) \ + timelib_astro_rise_set_altitude( ts, lon, lat, -35.0/60.0, 1, hrise, hset, rise, set ) + +/* This macro computes the start and end times of civil twilight. */ +/* Civil twilight starts/ends when the Sun's center is 6 degrees below */ +/* the horizon. */ +#define civil_twilight(ts,lon,lat,start,end) \ + timelib_astro_rise_set_altitude( ts, lon, lat, -6.0, 0, start, end ) + +/* This macro computes the start and end times of nautical twilight. */ +/* Nautical twilight starts/ends when the Sun's center is 12 degrees */ +/* below the horizon. */ +#define nautical_twilight(ts,lon,lat,start,end) \ + timelib_astro_rise_set_altitude( ts, lon, lat, -12.0, 0, start, end ) + +/* This macro computes the start and end times of astronomical twilight. */ +/* Astronomical twilight starts/ends when the Sun's center is 18 degrees */ +/* below the horizon. */ +#define astronomical_twilight(ts,lon,lat,start,end) \ + timelib_astro_rise_set_altitude( ts, lon, lat, -18.0, 0, start, end ) + diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c index 51f3267a0..c8ad75a80 100644 --- a/ext/date/lib/dow.c +++ b/ext/date/lib/dow.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dow.c,v 1.8.2.2 2005/09/02 09:33:08 derick Exp $ */ +/* $Id: dow.c,v 1.8.2.3 2006/01/01 12:50:01 sniper Exp $ */ #include "timelib.h" diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index fe08aaab5..56329be88 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,14 +1,14 @@ -/* Generated by re2c 0.9.10.dev on Thu Nov 17 13:55:10 2005 */ +/* Generated by re2c 0.9.12 on Wed Jan 4 15:16:35 2006 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,11 +17,12 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.c,v 1.29.2.10 2005/11/17 13:04:25 derick Exp $ */ +/* $Id: parse_date.c,v 1.29.2.24 2006/01/04 21:31:29 derick Exp $ */ #include "timelib.h" #include +#include #ifdef HAVE_STDLIB_H #include @@ -171,6 +172,10 @@ static timelib_tz_lookup_table timelib_timezone_fallbackmap[] = { { NULL, 0, 0, NULL }, }; +static timelib_tz_lookup_table timelib_timezone_utc[] = { + { "utc", 0, 0, "UTC" }, +}; + static timelib_relunit const timelib_relunit_lookup[] = { { "sec", TIMELIB_SECOND, 1 }, { "secs", TIMELIB_SECOND, 1 }, @@ -196,12 +201,19 @@ static timelib_relunit const timelib_relunit_lookup[] = { { "years", TIMELIB_YEAR, 1 }, { "monday", TIMELIB_WEEKDAY, 1 }, + { "mon", TIMELIB_WEEKDAY, 1 }, { "tuesday", TIMELIB_WEEKDAY, 2 }, + { "tue", TIMELIB_WEEKDAY, 2 }, { "wednesday", TIMELIB_WEEKDAY, 3 }, + { "wed", TIMELIB_WEEKDAY, 3 }, { "thursday", TIMELIB_WEEKDAY, 4 }, + { "thu", TIMELIB_WEEKDAY, 4 }, { "friday", TIMELIB_WEEKDAY, 5 }, + { "fri", TIMELIB_WEEKDAY, 5 }, { "saturday", TIMELIB_WEEKDAY, 6 }, + { "sat", TIMELIB_WEEKDAY, 6 }, { "sunday", TIMELIB_WEEKDAY, 0 }, + { "sun", TIMELIB_WEEKDAY, 0 }, { NULL, 0, 0 } }; @@ -370,6 +382,16 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) return tmp_nr; } +static void timelib_skip_day_suffix(char **ptr) +{ + if (isspace(**ptr)) { + return; + } + if (!strncasecmp(*ptr, "nd", 2) || !strncasecmp(*ptr, "rd", 2) ||!strncasecmp(*ptr, "st", 2) || !strncasecmp(*ptr, "th", 2)) { + *ptr += 2; + } +} + static double timelib_get_frac_nr(char **ptr, int max_length) { char *begin, *end, *str; @@ -430,11 +452,18 @@ static long timelib_parse_tz_cor(char **ptr) break; case 3: case 4: - tmp = strtol(begin, NULL, 10); - return HOUR(tmp / 100) + tmp % 100; + if (begin[1] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10); + return tmp; + } else if (begin[2] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); + return tmp; + } else { + tmp = strtol(begin, NULL, 10); + return HOUR(tmp / 100) + tmp % 100; + } case 5: - tmp = HOUR(strtol(begin, NULL, 10)) + - strtol(begin + 3, NULL, 10); + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); return tmp; } return 0; @@ -564,6 +593,10 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in int first_found = 0; timelib_tz_lookup_table *tp, *first_found_elem; timelib_tz_lookup_table *fmp; + + if (strcasecmp("utc", word) == 0 || strcasecmp("gmt", word) == 0) { + return timelib_timezone_utc; + } for (tp = timelib_timezone_lookup; tp->name; tp++) { if (strcasecmp(word, tp->name) == 0) { @@ -582,6 +615,7 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in if (first_found) { return first_found_elem; } + /* Still didn't find anything, let's find the zone solely based on * offset/isdst then */ for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) { @@ -710,16 +744,16 @@ std: 0, 0, 0, 0, 0, 0, 0, 0, 208, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 64, 192, 0, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 0, 0, 0, 0, 0, 0, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 8, 136, 8, 8, 8, - 136, 8, 8, 8, 8, 8, 136, 8, - 8, 8, 136, 136, 136, 8, 8, 8, - 8, 8, 8, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 160, 32, 32, 32, + 160, 32, 32, 32, 32, 32, 160, 32, + 32, 32, 160, 160, 160, 32, 32, 32, + 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -740,7 +774,7 @@ std: { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; YYDEBUG(1, *YYCURSOR); @@ -750,78 +784,85 @@ yy0: yych = *YYCURSOR; YYDEBUG(-1, yych); switch(yych){ - case 0x00: case 0x0A: goto yy46; - case ' ': case ',': case '.': goto yy44; - case '(': goto yy41; - case '+': case '-': goto yy40; - case '0': goto yy9; - case '1': goto yy10; - case '2': goto yy11; - case '3': goto yy12; + case 0x00: case 0x0A: goto yy48; + case ' ': goto yy45; + case '(': goto yy42; + case '+': case '-': goto yy41; + case ',': case '.': goto yy47; + case '0': goto yy13; + case '1': goto yy14; + case '2': goto yy15; + case '3': goto yy16; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy13; - case '@': goto yy7; - case 'A': goto yy22; + case '9': goto yy17; + case '@': goto yy11; + case 'A': goto yy25; case 'B': case 'C': case 'G': case 'H': case 'K': case 'Q': - case 'R': case 'U': case 'Y': - case 'Z': goto yy42; - case 'D': goto yy29; - case 'E': goto yy32; - case 'F': goto yy19; - case 'I': goto yy14; - case 'J': goto yy17; - case 'L': goto yy34; - case 'M': goto yy21; - case 'N': goto yy28; - case 'O': goto yy26; - case 'P': goto yy36; - case 'S': goto yy24; - case 'T': goto yy31; - case 'V': goto yy15; - case 'W': goto yy38; - case 'X': goto yy16; - case 'a': goto yy23; + case 'R': case 'U': case 'Z': goto yy43; + case 'D': goto yy31; + case 'E': goto yy35; + case 'F': goto yy23; + case 'I': goto yy18; + case 'J': goto yy21; + case 'L': goto yy37; + case 'M': goto yy7; + case 'N': goto yy5; + case 'O': goto yy29; + case 'P': goto yy39; + case 'S': goto yy27; + case 'T': goto yy9; + case 'V': goto yy19; + case 'W': goto yy33; + case 'X': goto yy20; + case 'Y': goto yy2; + case 'a': goto yy26; case 'b': case 'c': case 'g': case 'h': case 'i': case 'k': case 'q': case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy43; - case 'd': goto yy30; - case 'e': goto yy33; - case 'f': goto yy20; - case 'j': goto yy18; - case 'l': goto yy35; - case 'm': goto yy5; - case 'n': goto yy4; - case 'o': goto yy27; - case 'p': goto yy37; - case 's': goto yy25; - case 't': goto yy6; - case 'w': goto yy39; - case 'y': goto yy2; - default: goto yy48; + case 'v': case 'x': case 'z': goto yy44; + case 'd': goto yy32; + case 'e': goto yy36; + case 'f': goto yy24; + case 'j': goto yy22; + case 'l': goto yy38; + case 'm': goto yy8; + case 'n': goto yy6; + case 'o': goto yy30; + case 'p': goto yy40; + case 's': goto yy28; + case 't': goto yy10; + case 'w': goto yy34; + case 'y': goto yy4; + default: goto yy50; } yy2: YYDEBUG(2, *YYCURSOR); ++YYCURSOR; - if((yych = *YYCURSOR) <= 'Z'){ - if(yych == ')') goto yy49; - if(yych >= 'A') goto yy50; - goto yy3; + if((yych = *YYCURSOR) <= 'E'){ + if(yych <= ')'){ + if(yych >= ')') goto yy132; + goto yy3; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy1283; + } } else { if(yych <= 'd'){ - if(yych >= 'a') goto yy50; + if(yych <= 'Z') goto yy133; + if(yych >= 'a') goto yy136; goto yy3; } else { - if(yych <= 'e') goto yy1333; - if(yych <= 'z') goto yy50; + if(yych <= 'e') goto yy1292; + if(yych <= 'z') goto yy136; goto yy3; } } @@ -840,127 +881,272 @@ yy3: yy4: YYDEBUG(4, *YYCURSOR); yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy1283; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; + } else { + if(yych <= 'e') goto yy1283; + if(yych <= 'z') goto yy133; + goto yy3; + } + } +yy5: + YYDEBUG(5, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= 'O'){ if(yych <= 'D'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy610; - goto yy50; + if(yych <= 'E') goto yy1254; + goto yy133; } else { - if(yych <= 'I') goto yy611; - if(yych <= 'N') goto yy50; - goto yy606; + if(yych <= 'I') goto yy1255; + if(yych <= 'N') goto yy133; + goto yy1253; } } } else { if(yych <= 'h'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'e') goto yy610; - goto yy50; + if(yych == 'e') goto yy1270; + goto yy136; } } else { if(yych <= 'n'){ - if(yych <= 'i') goto yy611; - goto yy50; + if(yych <= 'i') goto yy1271; + goto yy136; } else { - if(yych <= 'o') goto yy1327; - if(yych <= 'z') goto yy50; + if(yych <= 'o') goto yy1269; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy5: - YYDEBUG(5, *YYCURSOR); +yy6: + YYDEBUG(6, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'O'){ + if(yych <= 'D'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy133; } else { - if(yych <= 'A') goto yy705; - if(yych == 'O') goto yy708; - goto yy50; + if(yych <= 'H'){ + if(yych <= 'E') goto yy1254; + goto yy133; + } else { + if(yych <= 'I') goto yy1255; + if(yych <= 'N') goto yy133; + goto yy1253; + } } } else { - if(yych <= 'i'){ + if(yych <= 'h'){ + if(yych <= '`'){ + if(yych <= 'Z') goto yy133; + goto yy3; + } else { + if(yych == 'e') goto yy1254; + goto yy133; + } + } else { + if(yych <= 'n'){ + if(yych <= 'i') goto yy1255; + goto yy133; + } else { + if(yych <= 'o') goto yy1253; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy7: + YYDEBUG(7, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1225; + } else { + if(yych == 'I') goto yy1226; + if(yych <= 'N') goto yy133; + goto yy1227; + } + } else { + if(yych <= 'h'){ + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'a') goto yy705; - if(yych <= 'h') goto yy50; - goto yy1321; + if(yych <= 'a') goto yy1239; + goto yy136; } else { - if(yych == 'o') goto yy708; - if(yych <= 'z') goto yy50; - goto yy3; + if(yych <= 'n'){ + if(yych <= 'i') goto yy1240; + goto yy136; + } else { + if(yych <= 'o') goto yy1241; + if(yych <= 'z') goto yy136; + goto yy3; + } } } -yy6: - YYDEBUG(6, *YYCURSOR); +yy8: + YYDEBUG(8, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1225; + } else { + if(yych == 'I') goto yy1226; + if(yych <= 'N') goto yy133; + goto yy1227; + } + } else { + if(yych <= 'h'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + if(yych <= 'a') goto yy1225; + goto yy133; + } else { + if(yych <= 'n'){ + if(yych <= 'i') goto yy1226; + goto yy133; + } else { + if(yych <= 'o') goto yy1227; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy9: + YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ + if(yych <= 'W'){ if(yych <= 'G'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'E') goto yy472; - goto yy50; + if(yych == 'E') goto yy1161; + goto yy133; } } else { - if(yych <= 'U'){ - if(yych <= 'H') goto yy473; - if(yych <= 'T') goto yy50; - goto yy474; + if(yych <= 'O'){ + if(yych <= 'H') goto yy1162; + if(yych <= 'N') goto yy133; + goto yy1163; } else { - if(yych == 'W') goto yy475; - goto yy50; + if(yych == 'U') goto yy1164; + if(yych <= 'V') goto yy133; + goto yy1165; } } } else { if(yych <= 'n'){ - if(yych <= 'e'){ + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'd') goto yy50; - goto yy472; + goto yy136; } else { - if(yych == 'h') goto yy473; - goto yy50; + if(yych <= 'e') goto yy1194; + if(yych == 'h') goto yy1195; + goto yy136; } } else { if(yych <= 'u'){ - if(yych <= 'o') goto yy1309; - if(yych <= 't') goto yy50; - goto yy474; + if(yych <= 'o') goto yy1196; + if(yych <= 't') goto yy136; + goto yy1197; } else { - if(yych == 'w') goto yy475; - if(yych <= 'z') goto yy50; + if(yych == 'w') goto yy1198; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy7: - YYDEBUG(7, *YYCURSOR); +yy10: + YYDEBUG(10, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'W'){ + if(yych <= 'G'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'E') goto yy1161; + goto yy133; + } + } else { + if(yych <= 'O'){ + if(yych <= 'H') goto yy1162; + if(yych <= 'N') goto yy133; + goto yy1163; + } else { + if(yych == 'U') goto yy1164; + if(yych <= 'V') goto yy133; + goto yy1165; + } + } + } else { + if(yych <= 'n'){ + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; + } else { + if(yych <= 'e') goto yy1161; + if(yych == 'h') goto yy1162; + goto yy133; + } + } else { + if(yych <= 'u'){ + if(yych <= 'o') goto yy1163; + if(yych <= 't') goto yy133; + goto yy1164; + } else { + if(yych == 'w') goto yy1165; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy11: + YYDEBUG(11, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '-') goto yy1305; - if(yych <= '0') goto yy8; - if(yych <= '9') goto yy1306; - goto yy8; -yy8: - YYDEBUG(8, *YYCURSOR); + if(yych == '-') goto yy1157; + if(yych <= '0') goto yy12; + if(yych <= '9') goto yy1158; + goto yy12; +yy12: + YYDEBUG(12, *YYCURSOR); { /* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */ s->errors++; goto std; } -yy9: - YYDEBUG(9, *YYCURSOR); +yy13: + YYDEBUG(13, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -985,14 +1171,11 @@ yy9: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1262; - case '-': goto yy789; - case '.': goto yy1271; - case '/': goto yy788; - case '0': goto yy1304; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': case 'w': case 'y': goto yy1121; + case '-': goto yy615; + case '.': goto yy1123; + case '/': goto yy614; + case '0': goto yy1156; case '1': case '2': case '3': @@ -1001,12 +1184,16 @@ yy9: case '6': case '7': case '8': - case '9': goto yy1303; - case ':': goto yy1272; - default: goto yy8; + case '9': goto yy1155; + case ':': goto yy1124; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy10: - YYDEBUG(10, *YYCURSOR); +yy14: + YYDEBUG(14, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1032,29 +1219,30 @@ yy10: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': - case '2': goto yy1303; + case '2': goto yy1155; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1270; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy1122; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy11: - YYDEBUG(11, *YYCURSOR); +yy15: + YYDEBUG(15, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1080,29 +1268,30 @@ yy11: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': case '2': - case '3': goto yy1270; + case '3': goto yy1122; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1260; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy1119; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy12: - YYDEBUG(12, *YYCURSOR); +yy16: + YYDEBUG(16, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1128,16 +1317,13 @@ yy12: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': - case '1': goto yy1260; + case '1': goto yy1119; case '2': case '3': case '4': @@ -1145,12 +1331,16 @@ yy12: case '6': case '7': case '8': - case '9': goto yy787; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy611; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy13: - YYDEBUG(13, *YYCURSOR); +yy17: + YYDEBUG(17, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1176,14 +1366,11 @@ yy13: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': case '2': @@ -1193,1807 +1380,1463 @@ yy13: case '6': case '7': case '8': - case '9': goto yy787; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy611; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy14: - YYDEBUG(14, *YYCURSOR); +yy18: + YYDEBUG(18, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'H'){ if(yych <= '.'){ if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych == ')') goto yy360; + goto yy359; } else { if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; + if(yych <= '9') goto yy359; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } } else { if(yych <= 'W'){ - if(yych <= 'I') goto yy780; - if(yych == 'V') goto yy779; - goto yy50; + if(yych <= 'I') goto yy602; + if(yych == 'V') goto yy601; + goto yy133; } else { if(yych <= 'Z'){ - if(yych <= 'X') goto yy779; - goto yy50; + if(yych <= 'X') goto yy601; + goto yy133; } else { if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy15: - YYDEBUG(15, *YYCURSOR); +yy19: + YYDEBUG(19, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '9'){ if(yych <= ')'){ if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; + if(yych <= '(') goto yy359; + goto yy360; } else { if(yych == '/') goto yy3; - goto yy509; + goto yy359; } } else { if(yych <= 'I'){ if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy50; - goto yy777; + if(yych <= 'H') goto yy133; + goto yy599; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } -yy16: - YYDEBUG(16, *YYCURSOR); +yy20: + YYDEBUG(20, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '9'){ if(yych <= ')'){ if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; + if(yych <= '(') goto yy359; + goto yy360; } else { if(yych == '/') goto yy3; - goto yy509; + goto yy359; } } else { if(yych <= 'I'){ if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy50; - goto yy775; + if(yych <= 'H') goto yy133; + goto yy597; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } -yy17: - YYDEBUG(17, *YYCURSOR); +yy21: + YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'A') goto yy758; - if(yych <= 'T') goto yy50; - goto yy757; + if(yych <= 'A') goto yy580; + if(yych <= 'T') goto yy133; + goto yy579; } } else { if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy767; + goto yy589; } else { - if(yych == 'u') goto yy766; - if(yych <= 'z') goto yy53; + if(yych == 'u') goto yy588; + if(yych <= 'z') goto yy136; goto yy3; } } -yy18: - YYDEBUG(18, *YYCURSOR); +yy22: + YYDEBUG(22, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'A') goto yy758; - if(yych <= 'T') goto yy50; - goto yy757; + if(yych <= 'A') goto yy580; + if(yych <= 'T') goto yy133; + goto yy579; } } else { if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy758; + goto yy580; } else { - if(yych == 'u') goto yy757; - if(yych <= 'z') goto yy50; + if(yych == 'u') goto yy579; + if(yych <= 'z') goto yy133; goto yy3; } } -yy19: - YYDEBUG(19, *YYCURSOR); +yy23: + YYDEBUG(23, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy721; + if(yych <= 'D') goto yy133; + goto yy541; } } else { if(yych <= 'N'){ - if(yych == 'I') goto yy722; - goto yy50; + if(yych == 'I') goto yy542; + goto yy133; } else { - if(yych <= 'O') goto yy723; - if(yych <= 'Q') goto yy50; - goto yy724; + if(yych <= 'O') goto yy543; + if(yych <= 'Q') goto yy133; + goto yy544; } } } else { if(yych <= 'i'){ if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'e') goto yy739; - if(yych <= 'h') goto yy53; - goto yy740; + if(yych <= 'e') goto yy560; + if(yych <= 'h') goto yy136; + goto yy561; } } else { if(yych <= 'q'){ - if(yych == 'o') goto yy741; - goto yy53; + if(yych == 'o') goto yy562; + goto yy136; } else { - if(yych <= 'r') goto yy742; - if(yych <= 'z') goto yy53; + if(yych <= 'r') goto yy563; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy20: - YYDEBUG(20, *YYCURSOR); +yy24: + YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy721; + if(yych <= 'D') goto yy133; + goto yy541; } } else { if(yych <= 'N'){ - if(yych == 'I') goto yy722; - goto yy50; + if(yych == 'I') goto yy542; + goto yy133; } else { - if(yych <= 'O') goto yy723; - if(yych <= 'Q') goto yy50; - goto yy724; + if(yych <= 'O') goto yy543; + if(yych <= 'Q') goto yy133; + goto yy544; } } } else { if(yych <= 'i'){ if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'e') goto yy721; - if(yych <= 'h') goto yy50; - goto yy722; + if(yych <= 'e') goto yy541; + if(yych <= 'h') goto yy133; + goto yy542; } } else { if(yych <= 'q'){ - if(yych == 'o') goto yy723; - goto yy50; + if(yych == 'o') goto yy543; + goto yy133; } else { - if(yych <= 'r') goto yy724; - if(yych <= 'z') goto yy50; + if(yych <= 'r') goto yy544; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy21: - YYDEBUG(21, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy705; - if(yych <= 'N') goto yy50; - goto yy708; - } - } else { - if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy706; - } else { - if(yych == 'o') goto yy707; - if(yych <= 'z') goto yy53; - goto yy3; - } - } -yy22: - YYDEBUG(22, *YYCURSOR); +yy25: + YYDEBUG(25, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'F'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'O'){ - if(yych <= 'G') goto yy688; - goto yy50; + if(yych <= 'G') goto yy524; + goto yy133; } else { - if(yych <= 'P') goto yy687; - if(yych <= 'T') goto yy50; - goto yy686; + if(yych <= 'P') goto yy523; + if(yych <= 'T') goto yy133; + goto yy522; } } } else { if(yych <= 'o'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'g') goto yy698; - goto yy53; + if(yych == 'g') goto yy534; + goto yy136; } } else { if(yych <= 't'){ - if(yych <= 'p') goto yy697; - goto yy53; + if(yych <= 'p') goto yy533; + goto yy136; } else { - if(yych <= 'u') goto yy696; - if(yych <= 'z') goto yy53; + if(yych <= 'u') goto yy532; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy23: - YYDEBUG(23, *YYCURSOR); +yy26: + YYDEBUG(26, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'F'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'O'){ - if(yych <= 'G') goto yy688; - goto yy50; + if(yych <= 'G') goto yy524; + goto yy133; } else { - if(yych <= 'P') goto yy687; - if(yych <= 'T') goto yy50; - goto yy686; + if(yych <= 'P') goto yy523; + if(yych <= 'T') goto yy133; + goto yy522; } } } else { if(yych <= 'o'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'g') goto yy688; - goto yy50; + if(yych == 'g') goto yy524; + goto yy133; } } else { if(yych <= 't'){ - if(yych <= 'p') goto yy687; - goto yy50; + if(yych <= 'p') goto yy523; + goto yy133; } else { - if(yych <= 'u') goto yy686; - if(yych <= 'z') goto yy50; + if(yych <= 'u') goto yy522; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy24: - YYDEBUG(24, *YYCURSOR); +yy27: + YYDEBUG(27, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'D'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy639; - goto yy50; + if(yych <= 'A') goto yy469; + goto yy133; } } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy638; - goto yy50; + if(yych <= 'E') goto yy468; + goto yy133; } else { - if(yych <= 'I') goto yy640; - if(yych <= 'T') goto yy50; - goto yy641; + if(yych <= 'I') goto yy470; + if(yych <= 'T') goto yy133; + goto yy471; } } } else { if(yych <= 'e'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy663; - if(yych <= 'd') goto yy53; - goto yy662; + if(yych <= 'a') goto yy496; + if(yych <= 'd') goto yy136; + goto yy495; } } else { if(yych <= 't'){ - if(yych == 'i') goto yy664; - goto yy53; + if(yych == 'i') goto yy497; + goto yy136; } else { - if(yych <= 'u') goto yy665; - if(yych <= 'z') goto yy53; + if(yych <= 'u') goto yy498; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy25: - YYDEBUG(25, *YYCURSOR); +yy28: + YYDEBUG(28, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'D'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy639; - goto yy50; + if(yych <= 'A') goto yy469; + goto yy133; } } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy638; - goto yy50; + if(yych <= 'E') goto yy468; + goto yy133; } else { - if(yych <= 'I') goto yy640; - if(yych <= 'T') goto yy50; - goto yy641; + if(yych <= 'I') goto yy470; + if(yych <= 'T') goto yy133; + goto yy471; } } } else { if(yych <= 'e'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy639; - if(yych <= 'd') goto yy50; - goto yy638; + if(yych <= 'a') goto yy469; + if(yych <= 'd') goto yy133; + goto yy468; } } else { if(yych <= 't'){ - if(yych == 'i') goto yy640; - goto yy50; + if(yych == 'i') goto yy470; + goto yy133; } else { - if(yych <= 'u') goto yy641; - if(yych <= 'z') goto yy50; + if(yych <= 'u') goto yy471; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy26: - YYDEBUG(26, *YYCURSOR); +yy29: + YYDEBUG(29, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'C'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy50; - goto yy628; + if(yych <= 'B') goto yy133; + goto yy458; } } else { if(yych <= 'b'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'c') goto yy633; - if(yych <= 'z') goto yy53; + if(yych <= 'c') goto yy463; + if(yych <= 'z') goto yy136; goto yy3; } } -yy27: - YYDEBUG(27, *YYCURSOR); +yy30: + YYDEBUG(30, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'C'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy50; - goto yy628; + if(yych <= 'B') goto yy133; + goto yy458; } } else { if(yych <= 'b'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'c') goto yy628; - if(yych <= 'z') goto yy50; + if(yych <= 'c') goto yy458; + if(yych <= 'z') goto yy133; goto yy3; } } -yy28: - YYDEBUG(28, *YYCURSOR); +yy31: + YYDEBUG(31, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'D'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy50; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'H'){ - if(yych <= 'E') goto yy610; - goto yy50; - } else { - if(yych <= 'I') goto yy611; - if(yych <= 'N') goto yy50; - goto yy606; - } + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy356; } } else { - if(yych <= 'h'){ - if(yych <= '`'){ - if(yych <= 'Z') goto yy50; - goto yy3; - } else { - if(yych == 'e') goto yy608; - goto yy53; - } + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy136; } else { - if(yych <= 'n'){ - if(yych <= 'i') goto yy609; - goto yy53; - } else { - if(yych <= 'o') goto yy607; - if(yych <= 'z') goto yy53; - goto yy3; - } + if(yych <= 'e') goto yy451; + if(yych <= 'z') goto yy136; + goto yy3; } } -yy29: - YYDEBUG(29, *YYCURSOR); +yy32: + YYDEBUG(32, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy506; + if(yych <= 'D') goto yy133; + goto yy356; } } else { if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy133; } else { - if(yych <= 'e') goto yy599; - if(yych <= 'z') goto yy53; + if(yych <= 'e') goto yy356; + if(yych <= 'z') goto yy133; goto yy3; } } -yy30: - YYDEBUG(30, *YYCURSOR); +yy33: + YYDEBUG(33, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy506; + if(yych <= 'D') goto yy133; + goto yy339; } } else { if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy136; } else { - if(yych <= 'e') goto yy506; - if(yych <= 'z') goto yy50; + if(yych <= 'e') goto yy348; + if(yych <= 'z') goto yy136; goto yy3; } } -yy31: - YYDEBUG(31, *YYCURSOR); +yy34: + YYDEBUG(34, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'W'){ - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy472; - } + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'T'){ - if(yych == 'H') goto yy473; - goto yy50; - } else { - if(yych <= 'U') goto yy474; - if(yych <= 'V') goto yy50; - goto yy475; - } + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy339; } } else { - if(yych <= 'h'){ - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy53; - } else { - if(yych <= 'e') goto yy468; - if(yych <= 'g') goto yy53; - goto yy469; - } + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; } else { - if(yych <= 'v'){ - if(yych == 'u') goto yy470; - goto yy53; - } else { - if(yych <= 'w') goto yy471; - if(yych <= 'z') goto yy53; - goto yy3; - } + if(yych <= 'e') goto yy339; + if(yych <= 'z') goto yy133; + goto yy3; } } -yy32: - YYDEBUG(32, *YYCURSOR); +yy35: + YYDEBUG(35, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'L'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'I') goto yy456; - if(yych <= 'K') goto yy50; - goto yy457; + if(yych == 'I') goto yy321; + if(yych <= 'K') goto yy133; + goto yy322; } } else { if(yych <= 'i'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy53; - goto yy462; + if(yych <= 'h') goto yy136; + goto yy330; } else { - if(yych == 'l') goto yy463; - if(yych <= 'z') goto yy53; + if(yych == 'l') goto yy331; + if(yych <= 'z') goto yy136; goto yy3; } } -yy33: - YYDEBUG(33, *YYCURSOR); +yy36: + YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'L'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'I') goto yy456; - if(yych <= 'K') goto yy50; - goto yy457; + if(yych == 'I') goto yy321; + if(yych <= 'K') goto yy133; + goto yy322; } } else { if(yych <= 'i'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy50; - goto yy456; + if(yych <= 'h') goto yy133; + goto yy321; } else { - if(yych == 'l') goto yy457; - if(yych <= 'z') goto yy50; + if(yych == 'l') goto yy322; + if(yych <= 'z') goto yy133; goto yy3; } } -yy34: - YYDEBUG(34, *YYCURSOR); +yy37: + YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'A'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy450; + goto yy315; } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy453; - if(yych <= 'z') goto yy53; + if(yych <= 'a') goto yy318; + if(yych <= 'z') goto yy136; goto yy3; } } -yy35: - YYDEBUG(35, *YYCURSOR); +yy38: + YYDEBUG(38, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'A'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy450; + goto yy315; } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy450; - if(yych <= 'z') goto yy50; + if(yych <= 'a') goto yy315; + if(yych <= 'z') goto yy133; goto yy3; } } -yy36: - YYDEBUG(36, *YYCURSOR); +yy39: + YYDEBUG(39, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy50; - goto yy170; + if(yych <= 'Q') goto yy133; + goto yy153; } } else { if(yych <= 'q'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'r') goto yy311; - if(yych <= 'z') goto yy53; + if(yych <= 'r') goto yy235; + if(yych <= 'z') goto yy136; goto yy3; } } -yy37: - YYDEBUG(37, *YYCURSOR); +yy40: + YYDEBUG(40, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy50; - goto yy170; + if(yych <= 'Q') goto yy133; + goto yy153; } } else { if(yych <= 'q'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy50; - } else { - if(yych <= 'r') goto yy170; - if(yych <= 'z') goto yy50; - goto yy3; - } - } -yy38: - YYDEBUG(38, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy152; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy53; - } else { - if(yych <= 'e') goto yy162; - if(yych <= 'z') goto yy53; - goto yy3; - } - } -yy39: - YYDEBUG(39, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy152; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'e') goto yy152; - if(yych <= 'z') goto yy50; + if(yych <= 'r') goto yy153; + if(yych <= 'z') goto yy133; goto yy3; } } -yy40: - YYDEBUG(40, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy8; - if(yych <= '1') goto yy64; - if(yych <= '2') goto yy65; - if(yych <= '9') goto yy66; - goto yy8; yy41: YYDEBUG(41, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '@') goto yy8; - if(yych <= 'Z') goto yy63; - if(yych <= '`') goto yy8; - if(yych <= 'z') goto yy63; - goto yy8; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; + } + if(yych <= '/') goto yy12; + if(yych <= '1') goto yy146; + if(yych <= '2') goto yy147; + if(yych <= '9') goto yy148; + goto yy12; yy42: YYDEBUG(42, *YYCURSOR); yych = *++YYCURSOR; + if(yych <= '@') goto yy12; + if(yych <= 'Z') goto yy145; + if(yych <= '`') goto yy12; + if(yych <= 'z') goto yy145; + goto yy12; +yy43: + YYDEBUG(43, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } -yy43: - YYDEBUG(43, *YYCURSOR); +yy44: + YYDEBUG(44, *YYCURSOR); yych = *++YYCURSOR; if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy50; + if(yych <= 'z') goto yy133; goto yy3; } -yy44: - YYDEBUG(44, *YYCURSOR); - ++YYCURSOR; - goto yy45; yy45: YYDEBUG(45, *YYCURSOR); - -{ - goto std; + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; } + if(yych <= '/') goto yy46; + if(yych <= '9') goto yy51; + goto yy46; yy46: YYDEBUG(46, *YYCURSOR); - ++YYCURSOR; - goto yy47; -yy47: - YYDEBUG(47, *YYCURSOR); { - s->pos = cursor; s->line++; goto std; } +yy47: + YYDEBUG(47, *YYCURSOR); + yych = *++YYCURSOR; + goto yy46; yy48: YYDEBUG(48, *YYCURSOR); - yych = *++YYCURSOR; - goto yy8; + ++YYCURSOR; + goto yy49; yy49: YYDEBUG(49, *YYCURSOR); - yych = *++YYCURSOR; - goto yy3; + +{ + s->pos = cursor; s->line++; + goto std; + } yy50: YYDEBUG(50, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy51; - } + goto yy12; yy51: YYDEBUG(51, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy52; - } + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; + goto yy52; yy52: YYDEBUG(52, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == ')') goto yy49; - goto yy3; + if(yybm[0+yych] & 8) { + goto yy51; + } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': case 't': goto yy65; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } yy53: YYDEBUG(53, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy3; - } - } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy51; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy54; - } + YYCURSOR = YYMARKER; + switch(yyaccept){ + case 26: goto yy1291; + case 24: goto yy1260; + case 25: goto yy1268; + case 23: goto yy1184; + case 22: goto yy1181; + case 11: goto yy634; + case 20: goto yy1127; + case 21: goto yy1135; + case 13: goto yy784; + case 18: goto yy1024; + case 12: goto yy775; + case 8: goto yy420; + case 17: goto yy889; + case 6: goto yy363; + case 10: goto yy620; + case 16: goto yy922; + case 19: goto yy933; + case 15: goto yy915; + case 14: goto yy880; + case 9: goto yy526; + case 5: goto yy341; + case 4: goto yy172; + case 1: goto yy3; + case 7: goto yy385; + case 3: goto yy69; + case 2: goto yy46; + case 0: goto yy12; } yy54: YYDEBUG(54, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych != '/') goto yy3; - goto yy55; - } - } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy55: - YYDEBUG(55, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych <= '@') goto yy56; - if(yych <= 'Z') goto yy57; - goto yy56; + goto yy55; +yy55: + YYDEBUG(55, *YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; + } + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy51; + goto yy53; yy56: YYDEBUG(56, *YYCURSOR); - YYCURSOR = YYMARKER; - switch(yyaccept){ - case 11: goto yy808; - case 20: goto yy1275; - case 21: goto yy1283; - case 12: goto yy953; - case 18: goto yy1182; - case 8: goto yy568; - case 17: goto yy1047; - case 6: goto yy513; - case 10: goto yy794; - case 16: goto yy1080; - case 19: goto yy1091; - case 15: goto yy1073; - case 13: goto yy986; - case 14: goto yy1038; - case 9: goto yy690; - case 5: goto yy193; - case 4: goto yy161; - case 3: goto yy154; - case 1: goto yy3; - case 7: goto yy531; - case 2: goto yy88; - case 0: goto yy8; - } -yy57: - YYDEBUG(57, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); yych = *YYCURSOR; - if(yybm[0+yych] & 8) { - goto yy58; + goto yy57; +yy57: + YYDEBUG(57, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': case 't': goto yy65; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + default: goto yy53; } - goto yy56; yy58: YYDEBUG(58, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy59; -yy59: - YYDEBUG(59, *YYCURSOR); - if(yybm[0+yych] & 8) { - goto yy58; - } - if(yych == '/') goto yy55; - if(yych == '_') goto yy55; - goto yy3; -yy60: - YYDEBUG(60, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; - } else { - if(yych <= '_'){ - if(yych <= '^') goto yy3; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; } else { - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy61; + if(yych <= 'E') goto yy120; + if(yych <= 'T') goto yy53; + goto yy118; + } + } else { + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; + } else { + if(yych <= 'e') goto yy120; + if(yych == 'u') goto yy118; + goto yy53; + } + } +yy59: + YYDEBUG(59, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; + } else { + if(yych <= 'i'){ + if(yych <= 'h') goto yy53; + goto yy110; + } else { + if(yych == 'o') goto yy109; + goto yy53; } } +yy60: + YYDEBUG(60, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy107; + if(yych == 'o') goto yy107; + goto yy53; yy61: YYDEBUG(61, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy62; + yych = *++YYCURSOR; + if(yych == 'A') goto yy106; + if(yych == 'a') goto yy106; + goto yy53; yy62: YYDEBUG(62, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy61; - goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy98; + if(yych == 'e') goto yy98; + goto yy53; yy63: YYDEBUG(63, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'R'){ + if(yych == 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; } else { - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy50; - goto yy3; + if(yych <= 'o'){ + if(yych <= 'n') goto yy53; + goto yy83; + } else { + if(yych == 'r') goto yy82; + goto yy53; + } } yy64: YYDEBUG(64, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy150; - case '6': - case '7': - case '8': - case '9': goto yy66; - case ':': goto yy67; - default: goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy79; + if(yych == 'e') goto yy79; + goto yy53; yy65: YYDEBUG(65, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': goto yy150; - case '4': - case '5': goto yy68; - case '6': - case '7': - case '8': - case '9': goto yy79; - case ':': goto yy67; - default: goto yy3; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'H') goto yy66; + if(yych <= 'T') goto yy53; + goto yy67; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy66; + } else { + if(yych == 'u') goto yy67; + goto yy53; + } } yy66: YYDEBUG(66, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy68; - case '6': - case '7': - case '8': - case '9': goto yy79; - case ':': goto yy67; - default: goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'U') goto yy74; + if(yych == 'u') goto yy74; + goto yy53; yy67: YYDEBUG(67, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy3; - if(yych <= '5') goto yy149; - goto yy3; + yych = *++YYCURSOR; + if(yych == 'E') goto yy68; + if(yych != 'e') goto yy53; + goto yy68; yy68: YYDEBUG(68, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy148; - goto yy70; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'S') goto yy70; + if(yych == 's') goto yy70; + goto yy69; yy69: YYDEBUG(69, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy70; + +{ + timelib_ull i; + DEBUG_OUTPUT("relative"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + + while(*ptr) { + i = timelib_get_unsigned_nr((char **) &ptr, 24); + timelib_eat_spaces((char **) &ptr); + timelib_set_relative((char **) &ptr, i, 0, s); + } + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } yy70: YYDEBUG(70, *YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': case 't': goto yy78; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy71; + if(yych != 'd') goto yy53; + goto yy71; yy71: YYDEBUG(71, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy136; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy136; - if(yych == 'u') goto yy135; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy72; + if(yych != 'a') goto yy53; + goto yy72; yy72: YYDEBUG(72, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy126; - } else { - if(yych == 'o') goto yy125; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych != 'y') goto yy53; + goto yy73; yy73: YYDEBUG(73, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy123; - if(yych == 'o') goto yy123; - goto yy56; + yych = *++YYCURSOR; + goto yy69; yy74: YYDEBUG(74, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy122; - if(yych == 'a') goto yy122; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'R') goto yy75; + if(yych != 'r') goto yy69; + goto yy75; yy75: YYDEBUG(75, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy114; - if(yych == 'e') goto yy114; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy76; + if(yych != 's') goto yy53; + goto yy76; yy76: YYDEBUG(76, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; - } else { - if(yych <= 'o'){ - if(yych <= 'n') goto yy56; - goto yy99; - } else { - if(yych == 'r') goto yy98; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy77; + if(yych != 'd') goto yy53; + goto yy77; yy77: YYDEBUG(77, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy95; - if(yych == 'e') goto yy95; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy78; + if(yych != 'a') goto yy53; + goto yy78; yy78: YYDEBUG(78, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych == 'H') goto yy81; - if(yych <= 'T') goto yy56; - goto yy82; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy81; - } else { - if(yych == 'u') goto yy82; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy79: YYDEBUG(79, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'A') goto yy80; + if(yych != 'a') goto yy53; goto yy80; yy80: YYDEBUG(80, *YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': case 't': goto yy78; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy81; + if(yych != 'r') goto yy53; + goto yy81; yy81: YYDEBUG(81, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy90; - if(yych == 'u') goto yy90; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy73; + if(yych == 's') goto yy73; + goto yy69; yy82: YYDEBUG(82, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy83; - if(yych != 'e') goto yy56; - goto yy83; + yych = *++YYCURSOR; + if(yych == 'I') goto yy95; + if(yych == 'i') goto yy95; + goto yy53; yy83: YYDEBUG(83, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy84; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy84; + if(yych != 'r') goto yy53; goto yy84; yy84: YYDEBUG(84, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy85; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy85; + if(yych != 't') goto yy53; goto yy85; yy85: YYDEBUG(85, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy86; - if(yych != 'a') goto yy56; - goto yy86; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy87; + if(yych <= 'M') goto yy53; + goto yy86; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy87; + } else { + if(yych != 'n') goto yy53; + goto yy86; + } + } yy86: YYDEBUG(86, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych != 'y') goto yy56; - goto yy87; + yych = *++YYCURSOR; + if(yych == 'I') goto yy92; + if(yych == 'i') goto yy92; + goto yy53; yy87: YYDEBUG(87, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych == '+') goto yy89; - if(yych == '-') goto yy89; + yych = *++YYCURSOR; + if(yych == 'N') goto yy88; + if(yych != 'n') goto yy53; goto yy88; yy88: YYDEBUG(88, *YYCURSOR); - -{ - timelib_ull i; - DEBUG_OUTPUT("relative"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_unsigned_nr((char **) &ptr, 24); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, 0, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } + yych = *++YYCURSOR; + if(yych == 'I') goto yy89; + if(yych != 'i') goto yy53; + goto yy89; yy89: YYDEBUG(89, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy90; + if(yych != 'g') goto yy53; + goto yy90; yy90: YYDEBUG(90, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy91; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy91; + if(yych != 'h') goto yy53; goto yy91; yy91: YYDEBUG(91, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy92; - if(yych != 's') goto yy56; - goto yy92; + yych = *++YYCURSOR; + if(yych == 'T') goto yy81; + if(yych == 't') goto yy81; + goto yy53; yy92: YYDEBUG(92, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy93; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy93; + if(yych != 'g') goto yy53; goto yy93; yy93: YYDEBUG(93, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy94; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy94; + if(yych != 'h') goto yy53; goto yy94; yy94: YYDEBUG(94, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy81; + if(yych == 't') goto yy81; + goto yy53; yy95: YYDEBUG(95, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy96; - if(yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy96; + if(yych != 'd') goto yy69; goto yy96; yy96: YYDEBUG(96, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy97; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy97; + if(yych != 'a') goto yy53; goto yy97; yy97: YYDEBUG(97, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= '-'){ - if(yych == '+') goto yy89; - if(yych <= ',') goto yy88; - goto yy89; - } else { - if(yych <= 'S'){ - if(yych <= 'R') goto yy88; - goto yy87; - } else { - if(yych == 's') goto yy87; - goto yy88; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy98: YYDEBUG(98, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy111; - if(yych == 'i') goto yy111; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy53; + if(yych <= 'D') goto yy100; + goto yy99; + } else { + if(yych <= 'c') goto yy53; + if(yych <= 'd') goto yy100; + if(yych >= 'f') goto yy53; + goto yy99; + } yy99: YYDEBUG(99, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy100; - if(yych != 'r') goto yy56; - goto yy100; + yych = *++YYCURSOR; + if(yych == 'K') goto yy81; + if(yych == 'k') goto yy81; + goto yy53; yy100: YYDEBUG(100, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy101; - if(yych != 't') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'N') goto yy101; + if(yych != 'n') goto yy69; goto yy101; yy101: YYDEBUG(101, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'N'){ - if(yych == 'H') goto yy103; - if(yych <= 'M') goto yy56; - goto yy102; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy103; - } else { - if(yych != 'n') goto yy56; - goto yy102; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy102; + if(yych != 'e') goto yy53; + goto yy102; yy102: YYDEBUG(102, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy108; - if(yych == 'i') goto yy108; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy103; + if(yych != 's') goto yy53; + goto yy103; yy103: YYDEBUG(103, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy104; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy104; + if(yych != 'd') goto yy53; goto yy104; yy104: YYDEBUG(104, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy105; - if(yych != 'i') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy105; + if(yych != 'a') goto yy53; goto yy105; yy105: YYDEBUG(105, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy106; - if(yych != 'g') goto yy56; - goto yy106; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy106: YYDEBUG(106, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy107; - if(yych != 'h') goto yy56; - goto yy107; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy81; + if(yych == 'y') goto yy81; + goto yy53; yy107: YYDEBUG(107, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy97; - if(yych == 't') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy108; + if(yych != 'u') goto yy53; + goto yy108; yy108: YYDEBUG(108, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy109; - if(yych != 'g') goto yy56; - goto yy109; + yych = *++YYCURSOR; + if(yych == 'R') goto yy81; + if(yych == 'r') goto yy81; + goto yy53; yy109: YYDEBUG(109, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy110; - if(yych != 'h') goto yy56; - goto yy110; + yych = *++YYCURSOR; + if(yych == 'N') goto yy114; + if(yych == 'n') goto yy114; + goto yy53; yy110: YYDEBUG(110, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy97; - if(yych == 't') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy111; + if(yych != 'n') goto yy53; + goto yy111; yy111: YYDEBUG(111, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy112; - if(yych != 'd') goto yy56; - goto yy112; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych == 'S') goto yy73; + if(yych <= 'T') goto yy69; + goto yy112; + } else { + if(yych <= 's'){ + if(yych <= 'r') goto yy69; + goto yy73; + } else { + if(yych != 'u') goto yy69; + goto yy112; + } + } yy112: YYDEBUG(112, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy113; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy113; + if(yych != 't') goto yy53; goto yy113; yy113: YYDEBUG(113, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy81; + if(yych == 'e') goto yy81; + goto yy53; yy114: YYDEBUG(114, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'E'){ - if(yych <= 'C') goto yy56; - if(yych <= 'D') goto yy116; - goto yy115; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == 'D') goto yy115; + if(yych <= 'S') goto yy69; + goto yy116; } else { - if(yych <= 'c') goto yy56; - if(yych <= 'd') goto yy116; - if(yych >= 'f') goto yy56; - goto yy115; + if(yych <= 'd'){ + if(yych <= 'c') goto yy69; + goto yy115; + } else { + if(yych == 't') goto yy116; + goto yy69; + } } yy115: YYDEBUG(115, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'K') goto yy97; - if(yych == 'k') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy117; + if(yych == 'a') goto yy117; + goto yy53; yy116: YYDEBUG(116, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy117; - if(yych != 'n') goto yy56; - goto yy117; + yych = *++YYCURSOR; + if(yych == 'H') goto yy81; + if(yych == 'h') goto yy81; + goto yy53; yy117: YYDEBUG(117, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy118; - if(yych != 'e') goto yy56; - goto yy118; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy118: YYDEBUG(118, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy119; - if(yych != 's') goto yy56; - goto yy119; + yych = *++YYCURSOR; + if(yych == 'N') goto yy129; + if(yych == 'n') goto yy129; + goto yy53; yy119: YYDEBUG(119, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy120; - if(yych != 'd') goto yy56; - goto yy120; + yych = *++YYCURSOR; + if(yych == 'T') goto yy124; + if(yych == 't') goto yy124; + goto yy53; yy120: YYDEBUG(120, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy121; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy121; + if(yych != 'c') goto yy53; goto yy121; yy121: YYDEBUG(121, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == 'O') goto yy122; + if(yych <= 'R') goto yy69; + goto yy73; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy69; + goto yy122; + } else { + if(yych == 's') goto yy73; + goto yy69; + } + } yy122: YYDEBUG(122, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy97; - if(yych == 'y') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy123; + if(yych != 'n') goto yy53; + goto yy123; yy123: YYDEBUG(123, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy124; - if(yych != 'u') goto yy56; - goto yy124; + yych = *++YYCURSOR; + if(yych == 'D') goto yy81; + if(yych == 'd') goto yy81; + goto yy53; yy124: YYDEBUG(124, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy97; - if(yych == 'r') goto yy97; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy125; + if(yych != 'u') goto yy69; + goto yy125; yy125: YYDEBUG(125, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy130; - if(yych == 'n') goto yy130; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy126; + if(yych != 'r') goto yy53; + goto yy126; yy126: YYDEBUG(126, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy127; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy127; + if(yych != 'd') goto yy53; goto yy127; yy127: YYDEBUG(127, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'S'){ - if(yych <= ','){ - if(yych == '+') goto yy89; - goto yy88; - } else { - if(yych <= '-') goto yy89; - if(yych <= 'R') goto yy88; - goto yy87; - } - } else { - if(yych <= 'r'){ - if(yych != 'U') goto yy88; - goto yy128; - } else { - if(yych <= 's') goto yy87; - if(yych != 'u') goto yy88; - goto yy128; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy128; + if(yych != 'a') goto yy53; + goto yy128; yy128: YYDEBUG(128, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy129; - if(yych != 't') goto yy56; - goto yy129; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy129: YYDEBUG(129, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy97; - if(yych == 'e') goto yy97; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy130; + if(yych != 'd') goto yy69; + goto yy130; yy130: YYDEBUG(130, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'T'){ - if(yych == 'D') goto yy131; - if(yych <= 'S') goto yy56; - goto yy132; - } else { - if(yych <= 'd'){ - if(yych <= 'c') goto yy56; - goto yy131; - } else { - if(yych == 't') goto yy132; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy131; + if(yych != 'a') goto yy53; + goto yy131; yy131: YYDEBUG(131, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy133; - if(yych == 'a') goto yy133; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy132: YYDEBUG(132, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy97; - if(yych == 'h') goto yy97; - goto yy56; + yych = *++YYCURSOR; + goto yy3; yy133: YYDEBUG(133, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; -yy134: - YYDEBUG(134, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy143; - if(yych == 't') goto yy143; - goto yy56; -yy135: + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy134; + } +yy134: + YYDEBUG(134, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy135; + } +yy135: YYDEBUG(135, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy140; - if(yych == 'n') goto yy140; - goto yy56; + yych = *++YYCURSOR; + if(yych == ')') goto yy132; + goto yy3; yy136: YYDEBUG(136, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'C') goto yy137; - if(yych != 'c') goto yy56; - goto yy137; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } + } else { + if(yych <= '_'){ + if(yych <= 'Z') goto yy134; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy137; + } + } yy137: YYDEBUG(137, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'O'){ - if(yych <= ','){ - if(yych == '+') goto yy89; - goto yy88; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '-') goto yy89; - if(yych <= 'N') goto yy88; + if(yych != '/') goto yy3; goto yy138; } } else { - if(yych <= 'n'){ - if(yych == 'S') goto yy87; - goto yy88; + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; } else { - if(yych <= 'o') goto yy138; - if(yych == 's') goto yy87; - goto yy88; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy142; + goto yy3; } } yy138: @@ -3001,1968 +2844,1837 @@ yy138: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'N') goto yy139; - if(yych != 'n') goto yy56; + if(yych <= '@') goto yy53; + if(yych >= '[') goto yy53; goto yy139; yy139: YYDEBUG(139, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'D') goto yy97; - if(yych == 'd') goto yy97; - goto yy56; + if(yybm[0+yych] & 32) { + goto yy140; + } + goto yy53; yy140: YYDEBUG(140, *YYCURSOR); - ++YYCURSOR; + yyaccept = 1; + YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'D') goto yy141; - if(yych != 'd') goto yy56; goto yy141; yy141: YYDEBUG(141, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy142; - if(yych != 'a') goto yy56; - goto yy142; + if(yybm[0+yych] & 32) { + goto yy140; + } + if(yych == '/') goto yy138; + if(yych == '_') goto yy138; + goto yy3; yy142: YYDEBUG(142, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy143; + } + } yy143: YYDEBUG(143, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'U') goto yy144; - if(yych != 'u') goto yy56; goto yy144; yy144: YYDEBUG(144, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy145; - if(yych != 'r') goto yy56; - goto yy145; + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy53; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy143; + goto yy53; + } yy145: YYDEBUG(145, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy146; - if(yych != 'd') goto yy56; - goto yy146; + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy133; + goto yy3; + } yy146: YYDEBUG(146, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy147; - if(yych != 'a') goto yy56; - goto yy147; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy148; + case ':': goto yy149; + default: goto yy3; + } yy147: YYDEBUG(147, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': goto yy148; + case '4': + case '5': goto yy150; + case '6': + case '7': + case '8': + case '9': goto yy151; + case ':': goto yy149; + default: goto yy3; + } yy148: YYDEBUG(148, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': goto yy150; + case '6': + case '7': + case '8': + case '9': goto yy151; + case ':': goto yy149; + default: goto yy3; + } +yy149: + YYDEBUG(149, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy3; + if(yych <= '5') goto yy152; + if(yych <= '9') goto yy132; + goto yy3; +yy150: + YYDEBUG(150, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy151; + default: goto yy3; + } +yy151: + YYDEBUG(151, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; } if(yych <= 'X'){ if(yych <= 'G'){ if(yych <= 'C'){ - if(yych == ' ') goto yy70; + if(yych == ' ') goto yy57; goto yy3; } else { if(yych == 'E') goto yy3; - if(yych <= 'F') goto yy70; + if(yych <= 'F') goto yy57; goto yy3; } } else { if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; goto yy3; } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; goto yy3; } } } else { if(yych <= 'l'){ if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; goto yy3; } else { if(yych == 'g') goto yy3; - if(yych <= 'h') goto yy70; + if(yych <= 'h') goto yy57; goto yy3; } } else { if(yych <= 'v'){ - if(yych <= 'm') goto yy70; + if(yych <= 'm') goto yy57; if(yych <= 'r') goto yy3; - if(yych <= 't') goto yy70; + if(yych <= 't') goto yy57; goto yy3; } else { if(yych == 'x') goto yy3; - if(yych <= 'y') goto yy70; + if(yych <= 'y') goto yy57; goto yy3; } } } -yy149: - YYDEBUG(149, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy49; - goto yy56; -yy150: - YYDEBUG(150, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy151; - case '6': - case '7': - case '8': - case '9': goto yy148; - case ':': goto yy67; - default: goto yy3; - } -yy151: - YYDEBUG(151, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy148; - default: goto yy3; - } yy152: YYDEBUG(152, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'D'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy132; + goto yy3; +yy153: + YYDEBUG(153, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'C') goto yy51; - goto yy153; + if(yych <= 'D') goto yy134; + goto yy154; } } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy51; + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; if(yych <= '`') goto yy3; - goto yy51; + goto yy134; } else { - if(yych <= 'd') goto yy153; - if(yych <= 'z') goto yy51; + if(yych <= 'e') goto yy154; + if(yych <= 'z') goto yy134; goto yy3; } } -yy153: - YYDEBUG(153, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= 'N'){ +yy154: + YYDEBUG(154, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'V'){ if(yych <= ')'){ - if(yych >= ')') goto yy49; - goto yy154; + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '@') goto yy154; - if(yych <= 'M') goto yy52; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; goto yy155; } } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy52; - if(yych >= 'a') goto yy52; - goto yy154; + if(yych <= 'u'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'n') goto yy155; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'v') goto yy155; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy154: - YYDEBUG(154, *YYCURSOR); - -{ - DEBUG_OUTPUT("dayabbr"); - goto std; - } yy155: YYDEBUG(155, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == ')') goto yy49; + if(yych <= 'H'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'E') goto yy156; - if(yych != 'e') goto yy3; + if(yych <= 'I') goto yy156; + if(yych != 'i') goto yy3; goto yy156; } yy156: YYDEBUG(156, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy157; - if(yych != 's') goto yy56; + if(yych == 'O') goto yy157; + if(yych != 'o') goto yy53; goto yy157; yy157: YYDEBUG(157, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy158; - if(yych != 'd') goto yy56; + if(yych == 'U') goto yy158; + if(yych != 'u') goto yy53; goto yy158; yy158: YYDEBUG(158, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy159; - if(yych != 'a') goto yy56; + if(yych == 'S') goto yy159; + if(yych != 's') goto yy53; goto yy159; yy159: YYDEBUG(159, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych != 'y') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; goto yy160; yy160: YYDEBUG(160, *YYCURSOR); - ++YYCURSOR; - goto yy161; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy159; + case 'D': case 'd': goto yy164; + case 'F': case 'f': goto yy166; + case 'H': case 'h': goto yy163; + case 'M': case 'm': goto yy162; + case 'S': case 's': goto yy161; + case 'T': case 't': goto yy168; + case 'W': case 'w': goto yy165; + case 'Y': case 'y': goto yy167; + default: goto yy53; + } yy161: YYDEBUG(161, *YYCURSOR); - -{ - const timelib_relunit* relunit; - DEBUG_OUTPUT("dayfull"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - relunit = timelib_lookup_relunit((char**) &ptr); - s->time->relative.weekday = relunit->multiplier; - s->time->relative.weekday_behavior = 1; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -yy162: - YYDEBUG(162, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy222; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'C') goto yy51; - goto yy153; + if(yych <= 'E') goto yy223; + if(yych <= 'T') goto yy53; + goto yy221; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'd'){ + if(yych == 'a') goto yy222; + goto yy53; } else { - if(yych == 'd') goto yy163; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'e') goto yy223; + if(yych == 'u') goto yy221; + goto yy53; } } -yy163: - YYDEBUG(163, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'M') goto yy52; - goto yy155; - } +yy162: + YYDEBUG(162, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy213; + if(yych <= 'N') goto yy53; + goto yy212; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'i'){ + if(yych <= 'h') goto yy53; + goto yy213; } else { - if(yych == 'n') goto yy164; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych == 'o') goto yy212; + goto yy53; } } +yy163: + YYDEBUG(163, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy210; + if(yych == 'o') goto yy210; + goto yy53; yy164: YYDEBUG(164, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'D') goto yy3; - goto yy156; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'e') goto yy165; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy209; + if(yych == 'a') goto yy209; + goto yy53; yy165: YYDEBUG(165, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy157; - if(yych != 's') goto yy62; - goto yy166; + if(yych == 'E') goto yy201; + if(yych == 'e') goto yy201; + goto yy53; yy166: YYDEBUG(166, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy158; - if(yych != 'd') goto yy62; - goto yy167; + if(yych <= 'R'){ + if(yych == 'O') goto yy186; + if(yych <= 'Q') goto yy53; + goto yy185; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy53; + goto yy186; + } else { + if(yych == 'r') goto yy185; + goto yy53; + } + } yy167: YYDEBUG(167, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy159; - if(yych != 'a') goto yy62; - goto yy168; + if(yych == 'E') goto yy182; + if(yych == 'e') goto yy182; + goto yy53; yy168: YYDEBUG(168, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych != 'y') goto yy62; - goto yy169; -yy169: - YYDEBUG(169, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy161; + if(yych <= 'U'){ + if(yych == 'H') goto yy169; + if(yych <= 'T') goto yy53; + goto yy170; } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy161; - if(yych <= 'z') goto yy61; - goto yy161; + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy169; + } else { + if(yych == 'u') goto yy170; + goto yy53; + } } +yy169: + YYDEBUG(169, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'U') goto yy177; + if(yych == 'u') goto yy177; + goto yy53; yy170: YYDEBUG(170, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy171; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'e') goto yy171; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'E') goto yy171; + if(yych != 'e') goto yy53; + goto yy171; yy171: YYDEBUG(171, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy172; - } - } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'v') goto yy172; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'S') goto yy173; + if(yych == 's') goto yy173; + goto yy172; yy172: YYDEBUG(172, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'I') goto yy173; - if(yych != 'i') goto yy3; - goto yy173; + +{ + timelib_sll i; + int behavior; + DEBUG_OUTPUT("relativetext"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + + while(*ptr) { + i = timelib_get_relative_text((char **) &ptr, &behavior); + timelib_eat_spaces((char **) &ptr); + timelib_set_relative((char **) &ptr, i, behavior, s); + } + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } yy173: YYDEBUG(173, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy174; - if(yych != 'o') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy174; + if(yych != 'd') goto yy53; goto yy174; yy174: YYDEBUG(174, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy175; - if(yych != 'u') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy175; + if(yych != 'a') goto yy53; goto yy175; yy175: YYDEBUG(175, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy176; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych != 'y') goto yy53; goto yy176; yy176: YYDEBUG(176, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy177; + yych = *++YYCURSOR; + goto yy172; yy177: YYDEBUG(177, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy176; - case 'D': case 'd': goto yy181; - case 'F': case 'f': goto yy183; - case 'H': case 'h': goto yy180; - case 'M': case 'm': goto yy179; - case 'S': case 's': goto yy178; - case 'T': case 't': goto yy185; - case 'W': case 'w': goto yy182; - case 'Y': case 'y': goto yy184; - default: goto yy56; - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'R') goto yy178; + if(yych != 'r') goto yy172; + goto yy178; yy178: YYDEBUG(178, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy297; - goto yy56; - } else { - if(yych <= 'E') goto yy299; - if(yych <= 'T') goto yy56; - goto yy298; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy297; - goto yy56; - } else { - if(yych <= 'e') goto yy299; - if(yych == 'u') goto yy298; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'S') goto yy179; + if(yych != 's') goto yy53; + goto yy179; yy179: YYDEBUG(179, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy289; - if(yych <= 'N') goto yy56; - goto yy288; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy289; - } else { - if(yych == 'o') goto yy288; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy180; + if(yych != 'd') goto yy53; + goto yy180; yy180: YYDEBUG(180, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy286; - if(yych == 'o') goto yy286; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy181; + if(yych != 'a') goto yy53; + goto yy181; yy181: YYDEBUG(181, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy285; - if(yych == 'a') goto yy285; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy182: YYDEBUG(182, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy277; - if(yych == 'e') goto yy277; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy183; + if(yych != 'a') goto yy53; + goto yy183; yy183: YYDEBUG(183, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'O') goto yy262; - if(yych <= 'Q') goto yy56; - goto yy261; - } else { - if(yych <= 'o'){ - if(yych <= 'n') goto yy56; - goto yy262; - } else { - if(yych == 'r') goto yy261; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych != 'r') goto yy53; + goto yy184; yy184: YYDEBUG(184, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy256; - if(yych == 'e') goto yy256; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy176; + if(yych == 's') goto yy176; + goto yy172; yy185: YYDEBUG(185, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych == 'H') goto yy186; - if(yych <= 'T') goto yy56; - goto yy187; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy186; - } else { - if(yych == 'u') goto yy187; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'I') goto yy198; + if(yych == 'i') goto yy198; + goto yy53; yy186: YYDEBUG(186, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy251; - if(yych == 'u') goto yy251; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy187; + if(yych != 'r') goto yy53; + goto yy187; yy187: YYDEBUG(187, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy188; - if(yych != 'e') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy188; + if(yych != 't') goto yy53; goto yy188; yy188: YYDEBUG(188, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy189; - if(yych != 's') goto yy56; - goto yy189; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy190; + if(yych <= 'M') goto yy53; + goto yy189; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy190; + } else { + if(yych != 'n') goto yy53; + goto yy189; + } + } yy189: YYDEBUG(189, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy190; - if(yych != 'd') goto yy56; - goto yy190; + yych = *++YYCURSOR; + if(yych == 'I') goto yy195; + if(yych == 'i') goto yy195; + goto yy53; yy190: YYDEBUG(190, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy191; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy191; + if(yych != 'n') goto yy53; goto yy191; yy191: YYDEBUG(191, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych != 'y') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy192; + if(yych != 'i') goto yy53; goto yy192; yy192: YYDEBUG(192, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy196; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'G') goto yy193; + if(yych != 'g') goto yy53; + goto yy193; yy193: YYDEBUG(193, *YYCURSOR); - -{ - timelib_sll i; - int behavior; - DEBUG_OUTPUT("relativetext"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_relative_text((char **) &ptr, &behavior); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, behavior, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy194; + if(yych != 'h') goto yy53; + goto yy194; yy194: YYDEBUG(194, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy242; - if(yych <= 'N') goto yy56; - goto yy243; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy242; - } else { - if(yych == 'o') goto yy243; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy184; + goto yy53; yy195: YYDEBUG(195, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'I'){ - if(yych == 'E') goto yy238; - if(yych <= 'H') goto yy56; - goto yy237; - } else { - if(yych <= 'e'){ - if(yych <= 'd') goto yy56; - goto yy238; - } else { - if(yych == 'i') goto yy237; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'G') goto yy196; + if(yych != 'g') goto yy53; + goto yy196; yy196: YYDEBUG(196, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'I'){ - if(yych == 'E') goto yy226; - if(yych <= 'H') goto yy56; - goto yy227; - } else { - if(yych <= 'e'){ - if(yych <= 'd') goto yy56; - goto yy226; - } else { - if(yych == 'i') goto yy227; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy197; + if(yych != 'h') goto yy53; + goto yy197; yy197: YYDEBUG(197, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'W'){ - if(yych <= 'G'){ - if(yych == 'E') goto yy217; - goto yy56; - } else { - if(yych <= 'H') goto yy215; - if(yych <= 'V') goto yy56; - goto yy216; - } - } else { - if(yych <= 'g'){ - if(yych == 'e') goto yy217; - goto yy56; - } else { - if(yych <= 'h') goto yy215; - if(yych == 'w') goto yy216; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy184; + goto yy53; yy198: YYDEBUG(198, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'L'){ - if(yych == 'I') goto yy207; - if(yych <= 'K') goto yy56; - goto yy206; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy207; - } else { - if(yych == 'l') goto yy206; - goto yy56; - } - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy199; + if(yych != 'd') goto yy172; + goto yy199; yy199: YYDEBUG(199, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy204; - if(yych == 'a') goto yy204; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy200; + if(yych != 'a') goto yy53; + goto yy200; yy200: YYDEBUG(200, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy201; - if(yych != 'r') goto yy56; - goto yy201; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy201: YYDEBUG(201, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy202; - if(yych != 'e') goto yy56; - goto yy202; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy53; + if(yych <= 'D') goto yy203; + goto yy202; + } else { + if(yych <= 'c') goto yy53; + if(yych <= 'd') goto yy203; + if(yych >= 'f') goto yy53; + goto yy202; + } yy202: YYDEBUG(202, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'V') goto yy203; - if(yych != 'v') goto yy56; - goto yy203; + yych = *++YYCURSOR; + if(yych == 'K') goto yy184; + if(yych == 'k') goto yy184; + goto yy53; yy203: YYDEBUG(203, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy173; - if(yych == 'i') goto yy173; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'N') goto yy204; + if(yych != 'n') goto yy172; + goto yy204; yy204: YYDEBUG(204, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy205; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy205; + if(yych != 'e') goto yy53; goto yy205; yy205: YYDEBUG(205, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy206; + if(yych != 's') goto yy53; + goto yy206; yy206: YYDEBUG(206, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy210; - if(yych == 'e') goto yy210; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy207; + if(yych != 'd') goto yy53; + goto yy207; yy207: YYDEBUG(207, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy208; - if(yych != 'g') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy208; + if(yych != 'a') goto yy53; goto yy208; yy208: YYDEBUG(208, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy209; - if(yych != 'h') goto yy56; - goto yy209; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy209: YYDEBUG(209, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy184; + if(yych == 'y') goto yy184; + goto yy53; yy210: YYDEBUG(210, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'V') goto yy211; - if(yych != 'v') goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy211; + if(yych != 'u') goto yy53; goto yy211; yy211: YYDEBUG(211, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy212; - if(yych != 'e') goto yy56; - goto yy212; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych == 'r') goto yy184; + goto yy53; yy212: YYDEBUG(212, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy213; - if(yych != 'n') goto yy56; - goto yy213; + yych = *++YYCURSOR; + if(yych == 'N') goto yy217; + if(yych == 'n') goto yy217; + goto yy53; yy213: YYDEBUG(213, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy214; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy214; + if(yych != 'n') goto yy53; goto yy214; yy214: YYDEBUG(214, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych == 'S') goto yy176; + if(yych <= 'T') goto yy172; + goto yy215; + } else { + if(yych <= 's'){ + if(yych <= 'r') goto yy172; + goto yy176; + } else { + if(yych != 'u') goto yy172; + goto yy215; + } + } yy215: YYDEBUG(215, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy224; - if(yych == 'i') goto yy224; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy216; + if(yych != 't') goto yy53; + goto yy216; yy216: YYDEBUG(216, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy220; - if(yych == 'e') goto yy220; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy184; + if(yych == 'e') goto yy184; + goto yy53; yy217: YYDEBUG(217, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy218; - if(yych != 'n') goto yy56; - goto yy218; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == 'D') goto yy218; + if(yych <= 'S') goto yy172; + goto yy219; + } else { + if(yych <= 'd'){ + if(yych <= 'c') goto yy172; + goto yy218; + } else { + if(yych == 't') goto yy219; + goto yy172; + } + } yy218: YYDEBUG(218, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy219; - if(yych != 't') goto yy56; - goto yy219; + yych = *++YYCURSOR; + if(yych == 'A') goto yy220; + if(yych == 'a') goto yy220; + goto yy53; yy219: YYDEBUG(219, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy184; + if(yych == 'h') goto yy184; + goto yy53; yy220: YYDEBUG(220, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'L') goto yy221; - if(yych != 'l') goto yy56; - goto yy221; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy221: YYDEBUG(221, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'F') goto yy222; - if(yych != 'f') goto yy56; - goto yy222; + yych = *++YYCURSOR; + if(yych == 'N') goto yy232; + if(yych == 'n') goto yy232; + goto yy53; yy222: YYDEBUG(222, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy223; - if(yych != 't') goto yy56; - goto yy223; + yych = *++YYCURSOR; + if(yych == 'T') goto yy227; + if(yych == 't') goto yy227; + goto yy53; yy223: YYDEBUG(223, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy224; + if(yych != 'c') goto yy53; + goto yy224; yy224: YYDEBUG(224, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'S'){ - if(yych <= 'Q') goto yy56; - if(yych >= 'S') goto yy176; - goto yy225; + if(yych == 'O') goto yy225; + if(yych <= 'R') goto yy172; + goto yy176; } else { - if(yych <= 'q') goto yy56; - if(yych <= 'r') goto yy225; - if(yych <= 's') goto yy176; - goto yy56; + if(yych <= 'o'){ + if(yych <= 'n') goto yy172; + goto yy225; + } else { + if(yych == 's') goto yy176; + goto yy172; + } } yy225: YYDEBUG(225, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy226; + if(yych != 'n') goto yy53; + goto yy226; yy226: YYDEBUG(226, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'V'){ - if(yych == 'C') goto yy230; - if(yych <= 'U') goto yy56; - goto yy231; - } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy230; - } else { - if(yych == 'v') goto yy231; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy184; + if(yych == 'd') goto yy184; + goto yy53; yy227: YYDEBUG(227, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'X') goto yy228; - if(yych != 'x') goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy228; + if(yych != 'u') goto yy172; goto yy228; yy228: YYDEBUG(228, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy229; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy229; + if(yych != 'r') goto yy53; goto yy229; yy229: YYDEBUG(229, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy230; + if(yych != 'd') goto yy53; + goto yy230; yy230: YYDEBUG(230, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy235; - if(yych == 'o') goto yy235; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy231; + if(yych != 'a') goto yy53; + goto yy231; yy231: YYDEBUG(231, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy232; - if(yych != 'e') goto yy56; - goto yy232; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy232: YYDEBUG(232, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy233; - if(yych != 'n') goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy233; + if(yych != 'd') goto yy172; goto yy233; yy233: YYDEBUG(233, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy234; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy234; + if(yych != 'a') goto yy53; goto yy234; yy234: YYDEBUG(234, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy235: YYDEBUG(235, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy236; - if(yych != 'n') goto yy56; - goto yy236; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy154; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy236; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy236: YYDEBUG(236, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'V'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy155; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'v') goto yy237; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy237: YYDEBUG(237, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy240; - if(yych == 'n') goto yy240; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'H') goto yy3; + goto yy156; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'i') goto yy238; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy238: YYDEBUG(238, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'X') goto yy239; - if(yych != 'x') goto yy56; + yych = *++YYCURSOR; + if(yych == 'O') goto yy157; + if(yych != 'o') goto yy144; goto yy239; yy239: YYDEBUG(239, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy158; + if(yych != 'u') goto yy144; + goto yy240; yy240: YYDEBUG(240, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy241; - if(yych != 't') goto yy56; - goto yy241; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'S') goto yy159; + goto yy53; + } + } else { + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 's') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } + } yy241: YYDEBUG(241, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'h'){ + if(yych <= '`'){ + if(yych <= '/'){ + if(yych <= '.') goto yy160; + goto yy138; + } else { + if(yych == '_') goto yy138; + goto yy160; + } + } else { + if(yych <= 'e'){ + if(yych == 'd') goto yy245; + goto yy143; + } else { + if(yych <= 'f') goto yy247; + if(yych <= 'g') goto yy143; + goto yy244; + } + } + } else { + if(yych <= 't'){ + if(yych <= 'm'){ + if(yych <= 'l') goto yy143; + goto yy243; + } else { + if(yych <= 'r') goto yy143; + if(yych >= 't') goto yy249; + goto yy242; + } + } else { + if(yych <= 'x'){ + if(yych == 'w') goto yy246; + goto yy143; + } else { + if(yych <= 'y') goto yy248; + if(yych <= 'z') goto yy143; + goto yy160; + } + } + } yy242: YYDEBUG(242, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'F') goto yy248; - if(yych <= 'Q') goto yy56; - goto yy247; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy222; + goto yy144; + } else { + if(yych <= 'E') goto yy223; + if(yych <= 'T') goto yy144; + goto yy221; + } } else { - if(yych <= 'f'){ - if(yych <= 'e') goto yy56; - goto yy248; + if(yych <= 'd'){ + if(yych == 'a') goto yy301; + goto yy144; } else { - if(yych == 'r') goto yy247; - goto yy56; + if(yych <= 'e') goto yy302; + if(yych == 'u') goto yy303; + goto yy144; } } yy243: YYDEBUG(243, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy244; - if(yych != 'u') goto yy56; - goto yy244; + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy213; + if(yych <= 'N') goto yy144; + goto yy212; + } else { + if(yych <= 'i'){ + if(yych <= 'h') goto yy144; + goto yy292; + } else { + if(yych == 'o') goto yy293; + goto yy144; + } + } yy244: YYDEBUG(244, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy245; - if(yych != 'r') goto yy56; - goto yy245; + yych = *++YYCURSOR; + if(yych == 'O') goto yy210; + if(yych == 'o') goto yy290; + goto yy144; yy245: YYDEBUG(245, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy246; - if(yych != 't') goto yy56; - goto yy246; + yych = *++YYCURSOR; + if(yych == 'A') goto yy209; + if(yych == 'a') goto yy289; + goto yy144; yy246: YYDEBUG(246, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy201; + if(yych == 'e') goto yy281; + goto yy144; yy247: YYDEBUG(247, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy250; - if(yych == 's') goto yy250; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych == 'O') goto yy186; + if(yych <= 'Q') goto yy144; + goto yy185; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy144; + goto yy265; + } else { + if(yych == 'r') goto yy266; + goto yy144; + } + } yy248: YYDEBUG(248, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy249; - if(yych != 't') goto yy56; - goto yy249; + yych = *++YYCURSOR; + if(yych == 'E') goto yy182; + if(yych == 'e') goto yy262; + goto yy144; yy249: YYDEBUG(249, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'H') goto yy169; + if(yych <= 'T') goto yy144; + goto yy170; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy144; + goto yy250; + } else { + if(yych == 'u') goto yy251; + goto yy144; + } + } yy250: YYDEBUG(250, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy177; + if(yych == 'u') goto yy257; + goto yy144; yy251: YYDEBUG(251, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy252; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy171; + if(yych != 'e') goto yy144; goto yy252; yy252: YYDEBUG(252, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy253; - if(yych != 's') goto yy56; - goto yy253; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'S') goto yy173; + goto yy172; + } + } else { + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 's') goto yy253; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy253: YYDEBUG(253, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy254; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy174; + if(yych != 'd') goto yy144; goto yy254; yy254: YYDEBUG(254, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy255; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy175; + if(yych != 'a') goto yy144; goto yy255; yy255: YYDEBUG(255, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych != 'y') goto yy144; + goto yy256; yy256: YYDEBUG(256, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy257; - if(yych != 'a') goto yy56; - goto yy257; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'z') goto yy143; + goto yy172; + } yy257: YYDEBUG(257, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy258; - if(yych != 'r') goto yy56; - goto yy258; -yy258: - YYDEBUG(258, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - default: goto yy193; - } -yy259: - YYDEBUG(259, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy260; - case 'F': case 'f': goto yy194; - case 'I': case 'i': goto yy227; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy196; - case 'T': case 't': goto yy197; - default: goto yy193; - } -yy260: - YYDEBUG(260, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'V'){ - if(yych <= 'I'){ - if(yych == 'C') goto yy230; - if(yych <= 'H') goto yy56; - goto yy207; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; } else { - if(yych == 'L') goto yy206; - if(yych <= 'U') goto yy56; - goto yy231; + if(yych == 'R') goto yy178; + goto yy172; } } else { - if(yych <= 'i'){ - if(yych == 'c') goto yy230; - if(yych <= 'h') goto yy56; - goto yy207; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy206; - } else { - if(yych == 'v') goto yy231; - goto yy56; - } + if(yych <= 'r') goto yy258; + if(yych <= 'z') goto yy143; + goto yy172; } } +yy258: + YYDEBUG(258, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'S') goto yy179; + if(yych != 's') goto yy144; + goto yy259; +yy259: + YYDEBUG(259, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy180; + if(yych != 'd') goto yy144; + goto yy260; +yy260: + YYDEBUG(260, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy181; + if(yych != 'a') goto yy144; + goto yy261; yy261: YYDEBUG(261, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy274; - if(yych == 'i') goto yy274; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy262: YYDEBUG(262, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy263; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy183; + if(yych != 'a') goto yy144; goto yy263; yy263: YYDEBUG(263, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy264; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych != 'r') goto yy144; goto yy264; yy264: YYDEBUG(264, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'N'){ - if(yych == 'H') goto yy266; - if(yych <= 'M') goto yy56; - goto yy265; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'S') goto yy176; + goto yy172; + } } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy266; + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; } else { - if(yych != 'n') goto yy56; - goto yy265; + if(yych <= 's') goto yy256; + if(yych <= 'z') goto yy143; + goto yy172; } } yy265: YYDEBUG(265, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy271; - if(yych == 'i') goto yy271; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy187; + if(yych == 'r') goto yy270; + goto yy144; yy266: YYDEBUG(266, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy267; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy198; + if(yych != 'i') goto yy144; goto yy267; yy267: YYDEBUG(267, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy268; - if(yych != 'i') goto yy56; - goto yy268; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'D') goto yy199; + goto yy172; + } + } else { + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'd') goto yy268; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy268: YYDEBUG(268, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy269; - if(yych != 'g') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy200; + if(yych != 'a') goto yy144; goto yy269; yy269: YYDEBUG(269, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy270; - if(yych != 'h') goto yy56; - goto yy270; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy270: YYDEBUG(270, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy258; - if(yych == 't') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy188; + if(yych != 't') goto yy144; + goto yy271; yy271: YYDEBUG(271, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy272; - if(yych != 'g') goto yy56; - goto yy272; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy190; + if(yych <= 'M') goto yy144; + goto yy189; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy144; + goto yy273; + } else { + if(yych != 'n') goto yy144; + goto yy272; + } + } yy272: YYDEBUG(272, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy273; - if(yych != 'h') goto yy56; - goto yy273; + yych = *++YYCURSOR; + if(yych == 'I') goto yy195; + if(yych == 'i') goto yy278; + goto yy144; yy273: YYDEBUG(273, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy258; - if(yych == 't') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy191; + if(yych != 'n') goto yy144; + goto yy274; yy274: YYDEBUG(274, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy275; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy192; + if(yych != 'i') goto yy144; goto yy275; yy275: YYDEBUG(275, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy276; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy193; + if(yych != 'g') goto yy144; goto yy276; yy276: YYDEBUG(276, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy194; + if(yych != 'h') goto yy144; + goto yy277; yy277: YYDEBUG(277, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'E'){ - if(yych <= 'C') goto yy56; - if(yych <= 'D') goto yy279; - goto yy278; - } else { - if(yych <= 'c') goto yy56; - if(yych <= 'd') goto yy279; - if(yych >= 'f') goto yy56; - goto yy278; - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy264; + goto yy144; yy278: YYDEBUG(278, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'K') goto yy258; - if(yych == 'k') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy196; + if(yych != 'g') goto yy144; + goto yy279; yy279: YYDEBUG(279, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy280; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy197; + if(yych != 'h') goto yy144; goto yy280; yy280: YYDEBUG(280, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy281; - if(yych != 'e') goto yy56; - goto yy281; + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy264; + goto yy144; yy281: YYDEBUG(281, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy282; - if(yych != 's') goto yy56; - goto yy282; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy144; + if(yych <= 'D') goto yy203; + goto yy202; + } else { + if(yych <= 'c') goto yy144; + if(yych <= 'd') goto yy283; + if(yych >= 'f') goto yy144; + goto yy282; + } yy282: YYDEBUG(282, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy283; - if(yych != 'd') goto yy56; - goto yy283; + yych = *++YYCURSOR; + if(yych == 'K') goto yy184; + if(yych == 'k') goto yy264; + goto yy144; yy283: YYDEBUG(283, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy284; - if(yych != 'a') goto yy56; - goto yy284; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'N') goto yy204; + goto yy172; + } + } else { + if(yych <= 'm'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'n') goto yy284; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy284: YYDEBUG(284, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy205; + if(yych != 'e') goto yy144; + goto yy285; yy285: YYDEBUG(285, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy258; - if(yych == 'y') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy206; + if(yych != 's') goto yy144; + goto yy286; yy286: YYDEBUG(286, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy287; - if(yych != 'u') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy207; + if(yych != 'd') goto yy144; goto yy287; yy287: YYDEBUG(287, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy258; - if(yych == 'r') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy208; + if(yych != 'a') goto yy144; + goto yy288; yy288: YYDEBUG(288, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy293; - if(yych == 'n') goto yy293; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy289: YYDEBUG(289, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy290; - if(yych != 'n') goto yy56; - goto yy290; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy184; + if(yych == 'y') goto yy264; + goto yy144; yy290: YYDEBUG(290, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - case 'U': case 'u': goto yy291; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'U') goto yy211; + if(yych != 'u') goto yy144; + goto yy291; yy291: YYDEBUG(291, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy292; - if(yych != 't') goto yy56; - goto yy292; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych == 'r') goto yy264; + goto yy144; yy292: YYDEBUG(292, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy258; - if(yych == 'e') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy214; + if(yych == 'n') goto yy298; + goto yy144; yy293: YYDEBUG(293, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'T'){ - if(yych == 'D') goto yy294; - if(yych <= 'S') goto yy56; - goto yy295; + yych = *++YYCURSOR; + if(yych == 'N') goto yy217; + if(yych != 'n') goto yy144; + goto yy294; +yy294: + YYDEBUG(294, *YYCURSOR); + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'C'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'D') goto yy218; + if(yych == 'T') goto yy219; + goto yy172; + } } else { if(yych <= 'd'){ - if(yych <= 'c') goto yy56; - goto yy294; + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'c') goto yy143; + goto yy295; } else { - if(yych == 't') goto yy295; - goto yy56; + if(yych == 't') goto yy296; + if(yych <= 'z') goto yy143; + goto yy172; } } -yy294: - YYDEBUG(294, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy296; - if(yych == 'a') goto yy296; - goto yy56; yy295: YYDEBUG(295, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy258; - if(yych == 'h') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy220; + if(yych == 'a') goto yy297; + goto yy144; yy296: YYDEBUG(296, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy184; + if(yych == 'h') goto yy264; + goto yy144; yy297: YYDEBUG(297, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy306; - if(yych == 't') goto yy306; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy298: YYDEBUG(298, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy303; - if(yych == 'n') goto yy303; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'R'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'S') goto yy176; + if(yych == 'U') goto yy215; + goto yy172; + } + } else { + if(yych <= 's'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'r') goto yy143; + goto yy256; + } else { + if(yych == 'u') goto yy299; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy299: YYDEBUG(299, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'C') goto yy300; - if(yych != 'c') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy216; + if(yych != 't') goto yy144; goto yy300; yy300: YYDEBUG(300, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'O': case 'o': goto yy301; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy184; + if(yych == 'e') goto yy264; + goto yy144; yy301: YYDEBUG(301, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy302; - if(yych != 'n') goto yy56; - goto yy302; + yych = *++YYCURSOR; + if(yych == 'T') goto yy227; + if(yych == 't') goto yy310; + goto yy144; yy302: YYDEBUG(302, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy258; - if(yych == 'd') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy224; + if(yych == 'c') goto yy307; + goto yy144; yy303: YYDEBUG(303, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy304; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy232; + if(yych != 'n') goto yy144; goto yy304; yy304: YYDEBUG(304, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy305; - if(yych != 'a') goto yy56; - goto yy305; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'D') goto yy233; + goto yy172; + } + } else { + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'd') goto yy305; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy305: YYDEBUG(305, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy234; + if(yych != 'a') goto yy144; + goto yy306; yy306: YYDEBUG(306, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy307; - if(yych != 'u') goto yy56; - goto yy307; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy307: YYDEBUG(307, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy308; - if(yych != 'r') goto yy56; - goto yy308; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'N'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'O') goto yy225; + if(yych == 'S') goto yy176; + goto yy172; + } + } else { + if(yych <= 'o'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'n') goto yy143; + goto yy308; + } else { + if(yych == 's') goto yy256; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy308: YYDEBUG(308, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy309; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy226; + if(yych != 'n') goto yy144; goto yy309; yy309: YYDEBUG(309, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy310; - if(yych != 'a') goto yy56; - goto yy310; + yych = *++YYCURSOR; + if(yych == 'D') goto yy184; + if(yych == 'd') goto yy264; + goto yy144; yy310: YYDEBUG(310, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'U') goto yy228; + goto yy172; + } + } else { + if(yych <= 't'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'u') goto yy311; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy311: YYDEBUG(311, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych == 'R') goto yy229; + if(yych != 'r') goto yy144; + goto yy312; +yy312: + YYDEBUG(312, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy230; + if(yych != 'd') goto yy144; + goto yy313; +yy313: + YYDEBUG(313, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy231; + if(yych != 'a') goto yy144; + goto yy314; +yy314: + YYDEBUG(314, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; +yy315: + YYDEBUG(315, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '/') goto yy55; if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy171; + if(yych <= 'R') goto yy134; + goto yy316; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 's') goto yy316; + if(yych <= 'z') goto yy134; goto yy3; + } + } +yy316: + YYDEBUG(316, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } + } else { + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych == 'e') goto yy312; - if(yych <= 'z') goto yy54; + if(yych <= 't') goto yy317; + if(yych <= 'z') goto yy135; goto yy3; } } -yy312: - YYDEBUG(312, *YYCURSOR); +yy317: + YYDEBUG(317, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy160; + case ')': goto yy132; + default: goto yy3; + } +yy318: + YYDEBUG(318, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy172; + if(yych <= 'R') goto yy134; + goto yy316; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'v') goto yy313; - if(yych <= 'z') goto yy60; + if(yych == 's') goto yy319; + if(yych <= 'z') goto yy137; goto yy3; } } -yy313: - YYDEBUG(313, *YYCURSOR); +yy319: + YYDEBUG(319, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'I'){ + if(yych <= 'T'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'H') goto yy3; - goto yy173; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'i') goto yy314; - if(yych <= 'z') goto yy61; + if(yych == 't') goto yy320; + if(yych <= 'z') goto yy142; goto yy3; } } -yy314: - YYDEBUG(314, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'O') goto yy174; - goto yy56; - } - } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'o') goto yy315; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy315: - YYDEBUG(315, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'U') goto yy175; - goto yy56; - } - } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'u') goto yy316; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy316: - YYDEBUG(316, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'S') goto yy176; - goto yy56; - } - } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 's') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy317: - YYDEBUG(317, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy320: + YYDEBUG(320, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch(yych){ - case ' ': goto yy176; - case '/': case '_': goto yy55; - case 'D': goto yy181; - case 'F': goto yy183; - case 'H': goto yy180; - case 'M': goto yy179; - case 'S': goto yy178; - case 'T': goto yy185; - case 'W': goto yy182; - case 'Y': goto yy184; + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': goto yy160; + case ')': goto yy132; + case '/': case '_': goto yy138; case 'a': case 'b': case 'c': case 'e': case 'g': case 'i': @@ -4973,2164 +4685,1097 @@ yy317: case 'p': case 'q': case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy61; - case 'd': goto yy321; - case 'f': goto yy323; - case 'h': goto yy320; - case 'm': goto yy319; - case 's': goto yy318; - case 't': goto yy325; - case 'w': goto yy322; - case 'y': goto yy324; - default: goto yy56; - } -yy318: - YYDEBUG(318, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'A'){ - if(yych == '/') goto yy55; - if(yych <= '@') goto yy56; - goto yy297; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy56; - goto yy299; - } else { - if(yych == 'U') goto yy298; - goto yy56; - } - } - } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'a') goto yy436; - goto yy61; - } else { - if(yych <= 't'){ - if(yych <= 'e') goto yy437; - goto yy61; - } else { - if(yych <= 'u') goto yy438; - if(yych <= 'z') goto yy61; - goto yy56; - } - } - } -yy319: - YYDEBUG(319, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'I') goto yy289; - if(yych == 'O') goto yy288; - goto yy56; - } - } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy427; - } else { - if(yych == 'o') goto yy428; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy320: - YYDEBUG(320, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'O') goto yy286; - goto yy56; - } - } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'o') goto yy425; - if(yych <= 'z') goto yy61; - goto yy56; - } + case 'v': case 'x': case 'z': goto yy143; + case 'd': goto yy245; + case 'f': goto yy247; + case 'h': goto yy244; + case 'm': goto yy243; + case 's': goto yy242; + case 't': goto yy249; + case 'w': goto yy246; + case 'y': goto yy248; + default: goto yy3; } yy321: YYDEBUG(321, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'G'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'A') goto yy285; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy328; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'a') goto yy424; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'g') goto yy328; + if(yych <= 'z') goto yy134; + goto yy3; } } yy322: YYDEBUG(322, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'E') goto yy277; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy323; } } else { if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'e') goto yy416; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'e') goto yy323; + if(yych <= 'z') goto yy134; + goto yy3; } } yy323: YYDEBUG(323, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'N'){ - if(yych == '/') goto yy55; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'V'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'O') goto yy262; - if(yych == 'R') goto yy261; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy324; } } else { - if(yych <= 'o'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'n') goto yy61; - goto yy400; + if(yych <= 'u'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych == 'r') goto yy401; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'v') goto yy324; + if(yych <= 'z') goto yy135; + goto yy3; } } yy324: YYDEBUG(324, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy256; - goto yy56; - } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy395; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'E') goto yy325; + if(yych != 'e') goto yy3; + goto yy325; } yy325: YYDEBUG(325, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'G'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'H') goto yy186; - if(yych == 'U') goto yy187; - goto yy56; - } - } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'g') goto yy61; - goto yy326; - } else { - if(yych == 'u') goto yy327; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'N') goto yy326; + if(yych != 'n') goto yy53; + goto yy326; yy326: YYDEBUG(326, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'U') goto yy251; - goto yy56; - } - } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'u') goto yy390; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy327; + if(yych != 't') goto yy53; + goto yy327; yy327: YYDEBUG(327, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy188; - goto yy56; - } - } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy328; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; yy328: YYDEBUG(328, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'H'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'S') goto yy189; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'G') goto yy135; + goto yy329; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'g'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 's') goto yy329; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h') goto yy329; + if(yych <= 'z') goto yy135; + goto yy3; } } yy329: YYDEBUG(329, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy190; - goto yy56; - } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy330; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'T') goto yy159; + if(yych == 't') goto yy159; + goto yy3; } yy330: YYDEBUG(330, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'A') goto yy191; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy328; } } else { if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'a') goto yy331; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'g') goto yy337; + if(yych <= 'z') goto yy137; + goto yy3; } } yy331: YYDEBUG(331, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy323; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy332; + if(yych <= 'z') goto yy137; + goto yy3; } } yy332: YYDEBUG(332, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy196; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy338; - case 't': goto yy339; - default: goto yy193; - } -yy333: - YYDEBUG(333, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'V'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'I') goto yy207; - if(yych == 'L') goto yy206; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy324; } } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy382; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'l') goto yy381; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'v') goto yy333; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy334: - YYDEBUG(334, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; +yy333: + YYDEBUG(333, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'I') goto yy242; - if(yych == 'O') goto yy243; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy325; } } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy372; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'o') goto yy373; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy334; + if(yych <= 'z') goto yy143; + goto yy3; } } +yy334: + YYDEBUG(334, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy326; + if(yych != 'n') goto yy144; + goto yy335; yy335: YYDEBUG(335, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'T') goto yy327; + if(yych != 't') goto yy144; + goto yy336; +yy336: + YYDEBUG(336, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'A') goto yy204; - goto yy56; + if(yych == 'H') goto yy159; + goto yy53; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'a') goto yy370; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy336: - YYDEBUG(336, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'D'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'E') goto yy238; - if(yych == 'I') goto yy237; - goto yy56; - } - } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'd') goto yy61; - goto yy366; - } else { - if(yych == 'i') goto yy365; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; } } yy337: YYDEBUG(337, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'R') goto yy201; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'G') goto yy135; + goto yy329; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'r') goto yy362; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'h') goto yy338; + if(yych <= 'z') goto yy142; + goto yy3; } } yy338: YYDEBUG(338, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'D'){ - if(yych == '/') goto yy55; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'E') goto yy226; - if(yych == 'I') goto yy227; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy159; } } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'd') goto yy61; - goto yy351; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'i') goto yy352; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; } } yy339: YYDEBUG(339, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'E'){ - if(yych == '/') goto yy55; - if(yych <= 'D') goto yy56; - goto yy217; + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'H'){ - if(yych <= 'G') goto yy56; - goto yy215; - } else { - if(yych == 'W') goto yy216; - goto yy56; - } + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy340; } } else { - if(yych <= 'g'){ - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych == 'e') goto yy342; - goto yy61; - } + if(yych <= 'c'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'v'){ - if(yych >= 'i') goto yy61; - goto yy340; - } else { - if(yych <= 'w') goto yy341; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'd') goto yy340; + if(yych <= 'z') goto yy134; + goto yy3; } } yy340: YYDEBUG(340, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if((yych = *YYCURSOR) <= 'N'){ + if(yych <= ')'){ + if(yych >= ')') goto yy132; + goto yy341; } else { - if(yych == 'I') goto yy224; - goto yy56; + if(yych <= '@') goto yy341; + if(yych <= 'M') goto yy135; + goto yy342; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych >= 'a') goto yy135; + goto yy341; } else { - if(yych <= 'i') goto yy349; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n') goto yy342; + if(yych <= 'z') goto yy135; + goto yy341; } } yy341: YYDEBUG(341, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy220; - goto yy56; - } - } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy345; - if(yych <= 'z') goto yy61; - goto yy56; - } + +{ + const timelib_relunit* relunit; + DEBUG_OUTPUT("daytext"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + TIMELIB_HAVE_WEEKDAY_RELATIVE(); + TIMELIB_UNHAVE_TIME(); + relunit = timelib_lookup_relunit((char**) &ptr); + s->time->relative.weekday = relunit->multiplier; + s->time->relative.weekday_behavior = 1; + + TIMELIB_DEINIT; + return TIMELIB_WEEKDAY; } yy342: YYDEBUG(342, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy218; - goto yy56; - } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy343; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'E') goto yy343; + if(yych != 'e') goto yy3; + goto yy343; } yy343: YYDEBUG(343, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy219; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy344; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'S') goto yy344; + if(yych != 's') goto yy53; + goto yy344; yy344: YYDEBUG(344, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy345; + if(yych != 'd') goto yy53; + goto yy345; yy345: YYDEBUG(345, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'L') goto yy221; - goto yy56; - } - } else { - if(yych <= 'k'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'l') goto yy346; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy346; + if(yych != 'a') goto yy53; + goto yy346; yy346: YYDEBUG(346, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'F') goto yy222; - goto yy56; - } - } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'f') goto yy347; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych != 'y') goto yy53; + goto yy347; yy347: YYDEBUG(347, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy223; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy348; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy341; yy348: YYDEBUG(348, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy340; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'd') goto yy349; + if(yych <= 'z') goto yy137; + goto yy3; } } yy349: YYDEBUG(349, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'Q'){ - if(yych == '/') goto yy55; - goto yy56; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych <= 'R') goto yy225; - if(yych <= 'S') goto yy176; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'M') goto yy135; + goto yy342; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych <= 'r') goto yy350; - if(yych <= 's') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy350; + if(yych <= 'z') goto yy142; + goto yy341; } } yy350: YYDEBUG(350, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'D') goto yy176; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy343; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'd') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy351; + if(yych <= 'z') goto yy143; + goto yy3; } } yy351: YYDEBUG(351, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'S') goto yy344; + if(yych != 's') goto yy144; + goto yy352; +yy352: + YYDEBUG(352, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy345; + if(yych != 'd') goto yy144; + goto yy353; +yy353: + YYDEBUG(353, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy346; + if(yych != 'a') goto yy144; + goto yy354; +yy354: + YYDEBUG(354, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych != 'y') goto yy144; + goto yy355; +yy355: + YYDEBUG(355, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= '^'){ - if(yych <= 'B'){ - if(yych == '/') goto yy55; - goto yy56; + if(yych == '/') goto yy138; + goto yy341; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy341; + if(yych <= 'z') goto yy143; + goto yy341; + } +yy356: + YYDEBUG(356, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'C'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'C') goto yy230; - if(yych == 'V') goto yy231; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'B') goto yy134; + goto yy357; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'b') goto yy61; - goto yy355; + if(yych <= 'b'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych == 'v') goto yy356; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy352: - YYDEBUG(352, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'X') goto yy228; - goto yy56; - } - } else { - if(yych <= 'w'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'x') goto yy353; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy353: - YYDEBUG(353, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy229; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy354; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy354: - YYDEBUG(354, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy355: - YYDEBUG(355, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'O') goto yy235; - goto yy56; - } - } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'o') goto yy360; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy356: - YYDEBUG(356, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy232; - goto yy56; - } - } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy357; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'c') goto yy357; + if(yych <= 'z') goto yy134; + goto yy3; } } yy357: YYDEBUG(357, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'N') goto yy233; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'E') goto yy366; + goto yy135; } else { - if(yych <= 'n') goto yy358; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy366; + if(yych <= 'z') goto yy135; + goto yy3; + } } } yy358: YYDEBUG(358, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 17) YYFILL(17); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy234; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy359; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + goto yy359; yy359: YYDEBUG(359, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yybm[0+yych] & 64) { + goto yy358; } + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy362; + if(yych <= '3') goto yy364; + if(yych <= '9') goto yy365; + goto yy53; yy360: YYDEBUG(360, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy236; - goto yy56; - } - } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy361; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 0x1F) goto yy3; + if(yych == '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; yy361: YYDEBUG(361, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy176; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy359; + if(yych <= '0') goto yy440; + if(yych <= '2') goto yy441; + if(yych <= '3') goto yy442; + goto yy359; yy362: YYDEBUG(362, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if((yych = *YYCURSOR) <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy422; } else { - if(yych == 'E') goto yy202; - goto yy56; + if(yych <= '2') goto yy439; + if(yych <= '9') goto yy422; + goto yy378; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'e') goto yy363; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy363: YYDEBUG(363, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'V') goto yy203; - goto yy56; - } - } else { - if(yych <= 'u'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'v') goto yy364; - if(yych <= 'z') goto yy61; - goto yy56; - } + +{ + DEBUG_OUTPUT("datetextual | datenoyear"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_TEXT; } yy364: YYDEBUG(364, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy422; } else { - if(yych == 'I') goto yy173; - goto yy56; + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'i') goto yy314; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy365: YYDEBUG(365, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy370; } else { - if(yych == 'N') goto yy240; - goto yy56; + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'n') goto yy368; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy366: YYDEBUG(366, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'X') goto yy239; - goto yy56; - } + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'w'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'x') goto yy367; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'M') goto yy367; + if(yych != 'm') goto yy3; + goto yy367; } yy367: YYDEBUG(367, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy176; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'B') goto yy368; + if(yych != 'b') goto yy53; + goto yy368; yy368: YYDEBUG(368, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy241; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy369; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy369; + if(yych != 'e') goto yy53; + goto yy369; yy369: YYDEBUG(369, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; yy370: YYDEBUG(370, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'S') goto yy205; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 's') goto yy371; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy421; + if(yych <= ':') goto yy383; + goto yy363; } yy371: YYDEBUG(371, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy176; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '3') goto yy421; + if(yych <= '9') goto yy418; + if(yych <= ':') goto yy383; + goto yy363; } yy372: YYDEBUG(372, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'E'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'F') goto yy248; - if(yych == 'R') goto yy247; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'e') goto yy61; - goto yy377; - } else { - if(yych == 'r') goto yy378; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy418; + if(yych <= ':') goto yy383; + goto yy363; } yy373: YYDEBUG(373, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'U') goto yy244; - goto yy56; - } - } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'u') goto yy374; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy378; yy374: YYDEBUG(374, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy245; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy375; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy378; yy375: YYDEBUG(375, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy246; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy376; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy378; yy376: YYDEBUG(376, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy378; yy377: YYDEBUG(377, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 14) YYFILL(14); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy249; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy380; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + goto yy378; yy378: YYDEBUG(378, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'S') goto yy250; - goto yy56; - } - } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 's') goto yy379; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yybm[0+yych] & 128) { + goto yy377; } + if(yych <= '/') goto yy363; + if(yych <= '1') goto yy379; + if(yych <= '2') goto yy380; + if(yych <= '9') goto yy381; + goto yy363; yy379: YYDEBUG(379, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy176; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy417; + if(yych <= ':') goto yy383; + goto yy363; } yy380: YYDEBUG(380, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '3') goto yy417; + if(yych <= '9') goto yy382; + if(yych <= ':') goto yy383; + goto yy363; } yy381: YYDEBUG(381, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy210; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy385; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy382; + if(yych <= ':') goto yy383; + goto yy363; } yy382: YYDEBUG(382, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'G') goto yy208; - goto yy56; - } - } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'g') goto yy383; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych <= '9') goto yy415; + goto yy363; yy383: YYDEBUG(383, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy209; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy384; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy384; + if(yych <= '9') goto yy386; + goto yy53; yy384: YYDEBUG(384, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy176; - goto yy56; - } + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy386; + if(yych <= ':') goto yy387; + goto yy385; } yy385: YYDEBUG(385, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'V') goto yy211; - goto yy56; + +{ + int tz_not_found; + DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 8); + } } - } else { - if(yych <= 'u'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'v') goto yy386; - if(yych <= 'z') goto yy61; - goto yy56; + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; } + TIMELIB_DEINIT; + return TIMELIB_SHORTDATE_WITH_TIME; } yy386: YYDEBUG(386, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy387; + if(yych != ':') goto yy385; + goto yy387; +yy387: + YYDEBUG(387, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy388; + if(yych <= '6') goto yy389; + if(yych <= '9') goto yy390; + goto yy53; +yy388: + YYDEBUG(388, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy391; + goto yy385; +yy389: + YYDEBUG(389, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '0') goto yy391; + goto yy385; +yy390: + YYDEBUG(390, *YYCURSOR); + yych = *++YYCURSOR; + goto yy385; +yy391: + YYDEBUG(391, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '+'){ + if(yych <= '\''){ + if(yych != ' ') goto yy385; + goto yy392; } else { - if(yych == 'E') goto yy212; - goto yy56; + if(yych <= '(') goto yy395; + if(yych <= '*') goto yy385; + goto yy394; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych == '-') goto yy394; + goto yy385; } else { - if(yych <= 'e') goto yy387; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy397; + goto yy385; } } -yy387: - YYDEBUG(387, *YYCURSOR); +yy392: + YYDEBUG(392, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + goto yy393; +yy393: + YYDEBUG(393, *YYCURSOR); + if(yych <= '+'){ + if(yych <= '\''){ + if(yych == ' ') goto yy392; + goto yy53; } else { - if(yych == 'N') goto yy213; - goto yy56; + if(yych <= '(') goto yy395; + if(yych <= '*') goto yy53; + goto yy394; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych != '-') goto yy53; + goto yy394; } else { - if(yych <= 'n') goto yy388; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy388: - YYDEBUG(388, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy214; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy389; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy389: - YYDEBUG(389, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy176; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy390: - YYDEBUG(390, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy252; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy391; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy391: - YYDEBUG(391, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'S') goto yy253; - goto yy56; - } - } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 's') goto yy392; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy392: - YYDEBUG(392, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy254; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy393; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy393: - YYDEBUG(393, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy255; - goto yy56; - } - } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy394; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy397; + goto yy53; } } yy394: YYDEBUG(394, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy410; + if(yych <= '2') goto yy411; + if(yych <= '9') goto yy412; + goto yy53; yy395: YYDEBUG(395, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy257; - goto yy56; - } - } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy396; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '@') goto yy53; + if(yych <= 'Z') goto yy397; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy397; + goto yy53; yy396: YYDEBUG(396, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy258; - goto yy56; - } + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'Z') goto yy398; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy401; + goto yy385; } yy397: YYDEBUG(397, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - default: goto yy193; + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy398; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy398; } yy398: YYDEBUG(398, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy260; - case 'F': goto yy194; - case 'I': goto yy227; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy196; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy399; - case 'f': goto yy334; - case 'i': goto yy352; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy338; - case 't': goto yy339; - default: goto yy193; + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy399; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy399; } yy399: YYDEBUG(399, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'C') goto yy230; - goto yy56; - } - } else { - if(yych <= 'L'){ - if(yych <= 'I') goto yy207; - if(yych <= 'K') goto yy56; - goto yy206; - } else { - if(yych == 'V') goto yy231; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; } else { - if(yych <= 'i'){ - if(yych <= 'b'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'c') goto yy355; - if(yych <= 'h') goto yy61; - goto yy382; - } - } else { - if(yych <= 'u'){ - if(yych == 'l') goto yy381; - goto yy61; - } else { - if(yych <= 'v') goto yy356; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych <= 'Z') goto yy400; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy400; } yy400: YYDEBUG(400, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy263; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy405; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == ')') goto yy390; + goto yy385; yy401: YYDEBUG(401, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy385; + goto yy390; } else { - if(yych == 'I') goto yy274; - goto yy56; + if(yych == '/') goto yy403; + goto yy385; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'Z') goto yy399; + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 'i') goto yy402; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy402; } } yy402: YYDEBUG(402, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy385; + goto yy390; } else { - if(yych == 'D') goto yy275; - goto yy56; + if(yych != '/') goto yy385; + goto yy403; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'Z') goto yy400; + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 'd') goto yy403; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy407; + goto yy385; } } yy403: @@ -7138,1206 +5783,606 @@ yy403: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy276; - goto yy56; - } - } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy404; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych <= '@') goto yy53; + if(yych >= '[') goto yy53; + goto yy404; yy404: YYDEBUG(404, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych <= '`') goto yy53; + if(yych >= '{') goto yy53; + goto yy405; yy405: YYDEBUG(405, *YYCURSOR); - ++YYCURSOR; + yyaccept = 7; + YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; + goto yy406; +yy406: + YYDEBUG(406, *YYCURSOR); if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy264; - goto yy56; - } + if(yych == '/') goto yy403; + goto yy385; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_') goto yy403; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy405; + goto yy385; + } +yy407: + YYDEBUG(407, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == ')') goto yy390; + if(yych <= '.') goto yy385; + goto yy403; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 't') goto yy406; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy408; } } -yy406: - YYDEBUG(406, *YYCURSOR); +yy408: + YYDEBUG(408, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; + goto yy409; +yy409: + YYDEBUG(409, *YYCURSOR); if(yych <= '^'){ - if(yych <= 'G'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'H') goto yy266; - if(yych == 'N') goto yy265; - goto yy56; - } + if(yych == '/') goto yy403; + goto yy53; } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'g') goto yy61; - goto yy408; - } else { - if(yych == 'n') goto yy407; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy407: - YYDEBUG(407, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'I') goto yy271; - goto yy56; - } - } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'i') goto yy413; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy408: - YYDEBUG(408, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy267; - goto yy56; - } - } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy409; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy409: - YYDEBUG(409, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'I') goto yy268; - goto yy56; - } - } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'i') goto yy410; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '_') goto yy403; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy408; + goto yy53; } yy410: YYDEBUG(410, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'G') goto yy269; - goto yy56; - } - } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'g') goto yy411; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy412; + if(yych <= ':') goto yy413; + goto yy385; yy411: YYDEBUG(411, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy270; - goto yy56; - } + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy385; + if(yych >= '4') goto yy414; + goto yy412; } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy412; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy390; + if(yych <= ':') goto yy413; + goto yy385; } yy412: YYDEBUG(412, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy258; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '5') goto yy414; + if(yych <= '9') goto yy390; + if(yych >= ';') goto yy385; + goto yy413; yy413: YYDEBUG(413, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'G') goto yy272; - goto yy56; - } - } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'g') goto yy414; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '5') goto yy414; + if(yych <= '9') goto yy390; + goto yy385; yy414: YYDEBUG(414, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy273; - goto yy56; - } - } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy415; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy390; + goto yy385; yy415: YYDEBUG(415, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy258; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych >= ':') goto yy363; + goto yy416; yy416: YYDEBUG(416, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'C'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'D') goto yy279; - if(yych <= 'E') goto yy278; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy418; - if(yych <= 'e') goto yy417; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy363; yy417: YYDEBUG(417, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'K') goto yy258; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'j'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'k') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy383; + goto yy363; } yy418: YYDEBUG(418, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy280; - goto yy56; - } - } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy419; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych >= ':') goto yy363; + goto yy419; yy419: YYDEBUG(419, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy281; - goto yy56; - } - } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy420; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if((yych = *YYCURSOR) <= '/') goto yy420; + if(yych <= '9') goto yy416; + goto yy420; yy420: YYDEBUG(420, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'S') goto yy282; - goto yy56; - } - } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 's') goto yy421; - if(yych <= 'z') goto yy61; - goto yy56; - } + +{ + DEBUG_OUTPUT("datenoday"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->d = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_NO_DAY; } yy421: YYDEBUG(421, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy283; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy422; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy419; + if(yych <= ':') goto yy383; + goto yy363; } yy422: YYDEBUG(422, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ':'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych != '.') goto yy378; + goto yy423; } else { - if(yych == 'A') goto yy284; - goto yy56; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + if(yych <= '9') goto yy426; + goto yy383; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'q'){ + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'a') goto yy423; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy423: YYDEBUG(423, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } + yych = *++YYCURSOR; + if(yych <= '2'){ + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy429; + goto yy430; } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '5') goto yy431; + if(yych <= '9') goto yy432; + goto yy378; } yy424: YYDEBUG(424, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy258; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy428; + if(yych <= ':') goto yy383; + goto yy363; } yy425: YYDEBUG(425, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'U') goto yy287; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'u') goto yy426; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '3') goto yy428; + if(yych <= '9') goto yy427; + if(yych <= ':') goto yy383; + goto yy363; } yy426: YYDEBUG(426, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy258; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy427; + if(yych <= ':') goto yy383; + goto yy363; } yy427: YYDEBUG(427, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy290; - goto yy56; - } - } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy433; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy420; + if(yych <= '9') goto yy415; + goto yy420; yy428: YYDEBUG(428, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy293; - goto yy56; - } + yyaccept = 8; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy420; } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy429; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy383; + goto yy420; } yy429: YYDEBUG(429, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'C'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'D') goto yy294; - if(yych == 'T') goto yy295; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'c') goto yy61; - goto yy430; - } else { - if(yych == 't') goto yy431; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy438; + if(yych <= ':') goto yy433; + goto yy363; } yy430: YYDEBUG(430, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy296; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy432; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '3') goto yy438; + if(yych <= '9') goto yy437; + if(yych <= ':') goto yy433; + goto yy363; } yy431: YYDEBUG(431, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'H') goto yy258; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'h') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy437; + if(yych <= ':') goto yy433; + goto yy363; } yy432: YYDEBUG(432, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych != '.') goto yy363; + goto yy433; } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy382; + if(yych >= ';') goto yy363; + goto yy433; } yy433: YYDEBUG(433, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'U': goto yy291; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - case 'u': goto yy434; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy434; + if(yych <= '6') goto yy435; + if(yych <= '9') goto yy386; + goto yy53; yy434: YYDEBUG(434, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy292; - goto yy56; - } + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy435; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy436; + if(yych <= ':') goto yy387; + goto yy385; } yy435: YYDEBUG(435, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy258; - goto yy56; - } + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '0') goto yy391; + if(yych == ':') goto yy387; + goto yy385; } yy436: YYDEBUG(436, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '-'){ + if(yych <= '('){ + if(yych == ' ') goto yy392; + if(yych <= '\'') goto yy385; + goto yy395; } else { - if(yych == 'T') goto yy306; - goto yy56; + if(yych == '+') goto yy394; + if(yych <= ',') goto yy385; + goto yy394; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych <= '.') goto yy387; + if(yych == ':') goto yy387; + goto yy385; } else { - if(yych <= 't') goto yy445; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy397; + goto yy385; } } yy437: YYDEBUG(437, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'C') goto yy300; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy363; } else { - if(yych <= 'b'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'c') goto yy442; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy387; + goto yy363; } yy438: YYDEBUG(438, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'N') goto yy303; - goto yy56; - } + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'n') goto yy439; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy433; + goto yy363; } yy439: YYDEBUG(439, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ':'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych == '.') goto yy423; + goto yy378; } else { - if(yych == 'D') goto yy304; - goto yy56; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + if(yych <= '9') goto yy426; + goto yy383; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'd') goto yy440; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy440: YYDEBUG(440, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + if(yych <= '0') goto yy422; + goto yy443; } else { - if(yych == 'A') goto yy305; - goto yy56; + if(yych <= '2') goto yy450; + if(yych <= '9') goto yy443; + goto yy378; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'a') goto yy441; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy441: YYDEBUG(441, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy443; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych <= '2') goto yy450; + if(yych <= '9') goto yy443; + goto yy378; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy442: YYDEBUG(442, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'O': goto yy301; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'o': goto yy443; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - default: goto yy193; - } -yy443: - YYDEBUG(443, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy443; } else { - if(yych == 'N') goto yy302; - goto yy56; + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'n') goto yy444; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy444: - YYDEBUG(444, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy443: + YYDEBUG(443, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= '.'){ + if(yych <= ',') goto yy378; + if(yych >= '.') goto yy423; + goto yy444; } else { - if(yych == 'D') goto yy258; - goto yy56; + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + goto yy426; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= ':') goto yy383; + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'd') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } +yy444: + YYDEBUG(444, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy445; yy445: YYDEBUG(445, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'U') goto yy307; - goto yy56; - } - } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'u') goto yy446; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if((yych = *YYCURSOR) <= '/') goto yy446; + if(yych <= '9') goto yy447; + goto yy446; yy446: YYDEBUG(446, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy308; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy447; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy447: - YYDEBUG(447, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy309; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy448; - if(yych <= 'z') goto yy61; - goto yy56; - } + +{ + DEBUG_OUTPUT("pgtextshort"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_TEXT; } +yy447: + YYDEBUG(447, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy446; + if(yych >= ':') goto yy446; + goto yy448; yy448: YYDEBUG(448, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy310; - goto yy56; - } - } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy449; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy446; + if(yych >= ':') goto yy446; + goto yy449; yy449: YYDEBUG(449, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yych = *++YYCURSOR; + goto yy446; yy450: YYDEBUG(450, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= '.'){ + if(yych <= ',') goto yy378; + if(yych <= '-') goto yy444; + goto yy423; } else { - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy51; - goto yy451; + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + goto yy426; } } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'q'){ + if(yych <= ':') goto yy383; + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 's') goto yy451; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } yy451: YYDEBUG(451, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych <= 'B') goto yy134; + goto yy357; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy452; - if(yych <= 'z') goto yy52; + if(yych == 'c') goto yy452; + if(yych <= 'z') goto yy137; goto yy3; } } @@ -8345,161 +6390,131 @@ yy452: YYDEBUG(452, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy177; - case ')': goto yy49; - default: goto yy3; - } -yy453: - YYDEBUG(453, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy51; - goto yy451; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy366; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych == 's') goto yy454; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy453; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy454: - YYDEBUG(454, *YYCURSOR); +yy453: + YYDEBUG(453, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ + if(yych <= 'M'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych <= '/') goto yy138; + if(yych <= 'L') goto yy3; + goto yy367; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 't') goto yy455; - if(yych <= 'z') goto yy60; + if(yych == 'm') goto yy454; + if(yych <= 'z') goto yy143; goto yy3; } } +yy454: + YYDEBUG(454, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy368; + if(yych != 'b') goto yy144; + goto yy455; yy455: YYDEBUG(455, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': goto yy177; - case ')': goto yy49; - case '/': case '_': goto yy55; - case 'a': - case 'b': - case 'c': case 'e': case 'g': case 'i': - case 'j': - case 'k': - case 'l': case 'n': - case 'o': - case 'p': - case 'q': - case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy61; - case 'd': goto yy321; - case 'f': goto yy323; - case 'h': goto yy320; - case 'm': goto yy319; - case 's': goto yy318; - case 't': goto yy325; - case 'w': goto yy322; - case 'y': goto yy324; - default: goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy369; + if(yych != 'e') goto yy144; + goto yy456; yy456: YYDEBUG(456, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'G'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy460; + if(yych == 'R') goto yy358; + goto yy53; } } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'g') goto yy460; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } yy457: YYDEBUG(457, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy458; - } + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy359; } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'e') goto yy458; - if(yych <= 'z') goto yy51; - goto yy3; - } + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy359; + if(yych <= 'z') goto yy143; + goto yy359; } yy458: YYDEBUG(458, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'V'){ + if(yych <= 'T'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; + if(yych <= 'S') goto yy134; goto yy459; } } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy52; + if(yych <= 's'){ + if(yych <= 'Z') goto yy134; if(yych <= '`') goto yy3; - goto yy52; + goto yy134; } else { - if(yych <= 'v') goto yy459; - if(yych <= 'z') goto yy52; + if(yych <= 't') goto yy459; + if(yych <= 'z') goto yy134; goto yy3; } } @@ -8507,11178 +6522,10996 @@ yy459: YYDEBUG(459, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'E') goto yy212; - if(yych == 'e') goto yy212; - goto yy3; - } -yy460: - YYDEBUG(460, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '@') goto yy3; - if(yych <= 'G') goto yy52; - goto yy461; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'g'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'O') goto yy135; + goto yy460; } else { - if(yych <= 'h') goto yy461; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 'n'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'o') goto yy460; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy461: - YYDEBUG(461, *YYCURSOR); +yy460: + YYDEBUG(460, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; + if(yych <= 'A'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy3; + if(yych <= 'B') goto yy461; + if(yych != 'b') goto yy3; + goto yy461; } +yy461: + YYDEBUG(461, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy462; + if(yych != 'e') goto yy53; + goto yy462; yy462: YYDEBUG(462, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; +yy463: + YYDEBUG(463, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ + if(yych <= 'T'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy460; + if(yych <= 'S') goto yy134; + goto yy459; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'g') goto yy466; - if(yych <= 'z') goto yy54; + if(yych == 't') goto yy464; + if(yych <= 'z') goto yy137; goto yy3; } } -yy463: - YYDEBUG(463, *YYCURSOR); +yy464: + YYDEBUG(464, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy458; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= 'O'){ + if(yych <= 'N') goto yy135; + goto yy460; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych == 'e') goto yy464; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'n'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'o') goto yy465; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy464: - YYDEBUG(464, *YYCURSOR); +yy465: + YYDEBUG(465, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ + if(yych <= 'B'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy459; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'v') goto yy465; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy465: - YYDEBUG(465, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'D') goto yy3; - goto yy212; + if(yych <= '/') goto yy138; + if(yych <= 'A') goto yy3; + goto yy461; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'e') goto yy387; - if(yych <= 'z') goto yy61; + if(yych == 'b') goto yy466; + if(yych <= 'z') goto yy143; goto yy3; } } yy466: YYDEBUG(466, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'G') goto yy52; - goto yy461; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy467; - if(yych <= 'z') goto yy60; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy462; + if(yych != 'e') goto yy144; + goto yy467; yy467: YYDEBUG(467, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy176; + if(yych == 'R') goto yy358; + goto yy53; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych == 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } yy468: YYDEBUG(468, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; + yych = *++YYCURSOR; + if(yych <= 'V'){ + if(yych <= 'B'){ + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy489; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy504; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy469: - YYDEBUG(469, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + goto yy134; } else { - if(yych <= 'H'){ - if(yych <= '@') goto yy3; - goto yy51; + if(yych <= 'O'){ + if(yych <= 'C') goto yy483; + goto yy134; } else { - if(yych <= 'I') goto yy482; - if(yych <= 'T') goto yy51; - goto yy483; + if(yych <= 'P') goto yy482; + if(yych <= 'U') goto yy134; + goto yy484; } } } else { - if(yych <= 'h'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; + if(yych <= 'o'){ + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; goto yy3; } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; + if(yych == 'c') goto yy483; + goto yy134; } } else { - if(yych <= 't'){ - if(yych <= 'i') goto yy497; - goto yy54; + if(yych <= 'u'){ + if(yych <= 'p') goto yy482; + goto yy134; } else { - if(yych <= 'u') goto yy498; - if(yych <= 'z') goto yy54; + if(yych <= 'v') goto yy484; + if(yych <= 'z') goto yy134; goto yy3; } } } -yy470: - YYDEBUG(470, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy469: + YYDEBUG(469, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '/') goto yy55; if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy478; + if(yych <= 'S') goto yy134; + goto yy477; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 's'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych == 'e') goto yy493; - if(yych <= 'z') goto yy54; + if(yych <= 't') goto yy477; + if(yych <= 'z') goto yy134; goto yy3; } } -yy471: - YYDEBUG(471, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy470: + YYDEBUG(470, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'X'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '/') goto yy55; if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy476; + if(yych <= 'W') goto yy134; + goto yy475; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'w'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych == 'e') goto yy491; - if(yych <= 'z') goto yy54; + if(yych <= 'x') goto yy475; + if(yych <= 'z') goto yy134; goto yy3; } } -yy472: - YYDEBUG(472, *YYCURSOR); +yy471: + YYDEBUG(471, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'N'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy489; + if(yych <= 'M') goto yy134; + goto yy472; } } else { if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; + if(yych <= 'Z') goto yy134; if(yych <= '`') goto yy3; - goto yy51; + goto yy134; } else { - if(yych <= 'n') goto yy489; - if(yych <= 'z') goto yy51; + if(yych <= 'n') goto yy472; + if(yych <= 'z') goto yy134; goto yy3; } } -yy473: - YYDEBUG(473, *YYCURSOR); +yy472: + YYDEBUG(472, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych == 'I') goto yy482; - if(yych <= 'T') goto yy51; - goto yy483; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy473; } } else { - if(yych <= 'i'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy51; - goto yy482; + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych == 'u') goto yy483; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'd') goto yy473; + if(yych <= 'z') goto yy135; + goto yy341; } } +yy473: + YYDEBUG(473, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'A') goto yy474; + if(yych != 'a') goto yy3; + goto yy474; + } yy474: YYDEBUG(474, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy478; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'e') goto yy478; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy475: YYDEBUG(475, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ + if(yych <= 'T'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; + if(yych <= 'S') goto yy135; goto yy476; } } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; if(yych <= '`') goto yy3; - goto yy51; + goto yy135; } else { - if(yych <= 'e') goto yy476; - if(yych <= 'z') goto yy51; + if(yych <= 't') goto yy476; + if(yych <= 'z') goto yy135; goto yy3; } } yy476: YYDEBUG(476, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'K') goto yy52; - goto yy477; - } - } else { - if(yych <= 'k'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'l') goto yy477; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy477: - YYDEBUG(477, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych == ')') goto yy49; + if(yych <= 'G'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'F') goto yy222; - if(yych == 'f') goto yy222; + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; goto yy3; } -yy478: - YYDEBUG(478, *YYCURSOR); +yy477: + YYDEBUG(477, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ + if(yych <= 'U'){ if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych <= '@') goto yy154; - if(yych <= 'R') goto yy52; - goto yy479; + if(yych <= '@') goto yy341; + if(yych <= 'T') goto yy135; + goto yy478; } } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= 't'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych <= 's') goto yy479; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'u') goto yy478; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy479: - YYDEBUG(479, *YYCURSOR); +yy478: + YYDEBUG(478, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ - if(yych == ')') goto yy49; + if(yych <= 'Q'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'D') goto yy480; - if(yych != 'd') goto yy3; - goto yy480; + if(yych <= 'R') goto yy479; + if(yych != 'r') goto yy3; + goto yy479; } +yy479: + YYDEBUG(479, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy480; + if(yych != 'd') goto yy53; + goto yy480; yy480: YYDEBUG(480, *YYCURSOR); yych = *++YYCURSOR; if(yych == 'A') goto yy481; - if(yych != 'a') goto yy56; + if(yych != 'a') goto yy53; goto yy481; yy481: YYDEBUG(481, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy482: YYDEBUG(482, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= 'Q') goto yy52; - if(yych <= 'R') goto yy488; - goto yy452; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'T') goto yy490; + goto yy135; } else { - if(yych <= 'r') goto yy488; - if(yych <= 's') goto yy452; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 's'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy490; + if(yych <= 'z') goto yy135; + goto yy3; + } } } yy483: YYDEBUG(483, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'R'){ + if(yych <= 'O'){ if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '@') goto yy154; - if(yych <= 'Q') goto yy52; - goto yy484; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy488; } } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= 'n'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'r') goto yy484; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'o') goto yy488; + if(yych <= 'z') goto yy135; + goto yy3; } } yy484: YYDEBUG(484, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'S') goto yy485; - if(yych != 's') goto yy3; - goto yy485; - } -yy485: - YYDEBUG(485, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy486; - if(yych != 'd') goto yy56; - goto yy486; -yy486: - YYDEBUG(486, *YYCURSOR); + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy135; + goto yy485; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy485; + if(yych <= 'z') goto yy135; + goto yy3; + } + } +yy485: + YYDEBUG(485, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'N') goto yy486; + if(yych != 'n') goto yy3; + goto yy486; + } +yy486: + YYDEBUG(486, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy487; - if(yych != 'a') goto yy56; + if(yych == 'T') goto yy487; + if(yych != 't') goto yy53; goto yy487; yy487: YYDEBUG(487, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; yy488: YYDEBUG(488, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ - if(yych == ')') goto yy49; + if(yych <= 'M'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy3; + if(yych <= 'N') goto yy489; + if(yych != 'n') goto yy3; + goto yy489; } yy489: YYDEBUG(489, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ + if(yych == 'D') goto yy159; + if(yych == 'd') goto yy159; + goto yy53; +yy490: + YYDEBUG(490, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '.'){ if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy490; + if(yych == '-') goto yy361; + goto yy359; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy490; - if(yych <= 'z') goto yy52; + if(yych <= 'D'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy359; goto yy3; + } else { + if(yych <= 'E') goto yy491; + if(yych != 'e') goto yy3; + goto yy491; } } -yy490: - YYDEBUG(490, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } yy491: YYDEBUG(491, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'M') goto yy492; + if(yych != 'm') goto yy53; + goto yy492; +yy492: + YYDEBUG(492, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy493; + if(yych != 'b') goto yy53; + goto yy493; +yy493: + YYDEBUG(493, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy494; + if(yych != 'e') goto yy53; + goto yy494; +yy494: + YYDEBUG(494, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; +yy495: + YYDEBUG(495, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'V'){ + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'K') goto yy52; - goto yy477; + if(yych <= 'O'){ + if(yych == 'C') goto yy483; + goto yy134; + } else { + if(yych <= 'P') goto yy482; + if(yych <= 'U') goto yy134; + goto yy484; + } } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'c'){ + if(yych <= '_'){ + if(yych <= 'Z') goto yy134; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych <= 'b') goto yy137; + goto yy510; + } } else { - if(yych == 'l') goto yy492; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych <= 'u'){ + if(yych == 'p') goto yy509; + goto yy137; + } else { + if(yych <= 'v') goto yy511; + if(yych <= 'z') goto yy137; + goto yy3; + } } } -yy492: - YYDEBUG(492, *YYCURSOR); +yy496: + YYDEBUG(496, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'F'){ + if(yych <= 'T'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'E') goto yy3; - goto yy222; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy134; + goto yy477; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'f') goto yy347; - if(yych <= 'z') goto yy61; + if(yych == 't') goto yy504; + if(yych <= 'z') goto yy137; goto yy3; } } -yy493: - YYDEBUG(493, *YYCURSOR); - yyaccept = 3; +yy497: + YYDEBUG(497, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ + if(yych <= 'X'){ if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'R') goto yy52; - goto yy479; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; + goto yy475; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 's') goto yy494; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych == 'x') goto yy502; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy494: - YYDEBUG(494, *YYCURSOR); +yy498: + YYDEBUG(498, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ + if(yych <= 'N'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'C') goto yy3; - goto yy480; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy472; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'd') goto yy495; - if(yych <= 'z') goto yy61; + if(yych == 'n') goto yy499; + if(yych <= 'z') goto yy137; goto yy3; } } -yy495: - YYDEBUG(495, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy481; - if(yych != 'a') goto yy62; - goto yy496; -yy496: - YYDEBUG(496, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy497: - YYDEBUG(497, *YYCURSOR); - yyaccept = 1; +yy499: + YYDEBUG(499, *YYCURSOR); + yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - if(yych <= 'R') goto yy488; - goto yy452; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy473; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy60; - goto yy503; - } else { - if(yych <= 's') goto yy455; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych == 'd') goto yy500; + if(yych <= 'z') goto yy142; + goto yy341; } } -yy498: - YYDEBUG(498, *YYCURSOR); - yyaccept = 3; +yy500: + YYDEBUG(500, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ + if(yych <= 'A'){ if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'Q') goto yy52; - goto yy484; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy474; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'r') goto yy499; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych <= 'a') goto yy501; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy499: - YYDEBUG(499, *YYCURSOR); +yy501: + YYDEBUG(501, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy502: + YYDEBUG(502, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ + if(yych <= 'T'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'R') goto yy3; - goto yy485; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy476; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 's') goto yy500; - if(yych <= 'z') goto yy61; + if(yych == 't') goto yy503; + if(yych <= 'z') goto yy142; goto yy3; } } -yy500: - YYDEBUG(500, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy486; - if(yych != 'd') goto yy62; - goto yy501; -yy501: - YYDEBUG(501, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy487; - if(yych != 'a') goto yy62; - goto yy502; -yy502: - YYDEBUG(502, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; yy503: YYDEBUG(503, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ + if(yych <= 'H'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'C') goto yy3; - goto yy176; + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'd') goto yy317; - if(yych <= 'z') goto yy61; + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; goto yy3; } } yy504: YYDEBUG(504, *YYCURSOR); - yyaccept = 1; + yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ + if(yych <= 'U'){ if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy490; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'T') goto yy135; + goto yy478; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych == 't') goto yy505; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych == 'u') goto yy505; + if(yych <= 'z') goto yy142; + goto yy341; } } yy505: YYDEBUG(505, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ + if(yych <= 'R'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; + if(yych <= '/') goto yy138; + if(yych <= 'Q') goto yy3; + goto yy479; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; + if(yych == 'r') goto yy506; + if(yych <= 'z') goto yy143; goto yy3; } } yy506: YYDEBUG(506, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'C'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy51; - goto yy507; - } - } else { - if(yych <= 'b'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'c') goto yy507; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'D') goto yy480; + if(yych != 'd') goto yy144; + goto yy507; yy507: YYDEBUG(507, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy481; + if(yych != 'a') goto yy144; + goto yy508; +yy508: + YYDEBUG(508, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy509: + YYDEBUG(509, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ + if(yych <= '@'){ if(yych <= ','){ if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy516; - goto yy52; + if(yych <= '_'){ + if(yych <= 'T'){ + if(yych <= 'S') goto yy135; + goto yy490; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'd'){ + if(yych <= 's'){ if(yych <= '`') goto yy3; - goto yy52; + goto yy142; } else { - if(yych <= 'e') goto yy516; - if(yych <= 'z') goto yy52; + if(yych <= 't') goto yy517; + if(yych <= 'z') goto yy142; goto yy3; } } } -yy508: - YYDEBUG(508, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 17) YYFILL(17); - yych = *YYCURSOR; - goto yy509; -yy509: - YYDEBUG(509, *YYCURSOR); - if(yybm[0+yych] & 64) { - goto yy508; - } - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy512; - if(yych <= '3') goto yy514; - if(yych <= '9') goto yy515; - goto yy56; yy510: YYDEBUG(510, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 0x1F) goto yy3; - if(yych == '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy488; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'o') goto yy515; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy511: YYDEBUG(511, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy509; - if(yych <= '0') goto yy588; - if(yych <= '2') goto yy589; - if(yych <= '3') goto yy590; - goto yy509; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy135; + goto yy485; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy512; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy512: YYDEBUG(512, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy524; - if(yych == '2') goto yy587; - if(yych <= '9') goto yy570; - goto yy524; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'M') goto yy3; + goto yy486; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy513; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy513: YYDEBUG(513, *YYCURSOR); - -{ - DEBUG_OUTPUT("datetextual | datenoyear"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy487; + if(yych != 't') goto yy144; + goto yy514; yy514: YYDEBUG(514, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy570; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'H') goto yy159; + goto yy53; + } + } else { + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } + } yy515: YYDEBUG(515, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy520; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; -yy516: - YYDEBUG(516, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'M') goto yy3; + goto yy489; + } } else { - if(yych <= 'M') goto yy517; - if(yych != 'm') goto yy3; - goto yy517; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy516; + if(yych <= 'z') goto yy143; + goto yy3; + } + } +yy516: + YYDEBUG(516, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'D') goto yy159; + goto yy53; + } + } else { + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'd') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy517: YYDEBUG(517, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy518; - if(yych != 'b') goto yy56; - goto yy518; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy138; + goto yy359; + } + } else { + if(yych <= '_'){ + if(yych == 'E') goto yy491; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy143; + } else { + if(yych <= 'e') goto yy518; + if(yych <= 'z') goto yy143; + goto yy3; + } + } + } yy518: YYDEBUG(518, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy519; - if(yych != 'e') goto yy56; + if(yych == 'M') goto yy492; + if(yych != 'm') goto yy144; goto yy519; yy519: YYDEBUG(519, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; + if(yych == 'B') goto yy493; + if(yych != 'b') goto yy144; + goto yy520; yy520: YYDEBUG(520, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; - } else { - if(yych <= '9') goto yy569; - if(yych <= ':') goto yy529; - goto yy513; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy494; + if(yych != 'e') goto yy144; + goto yy521; yy521: YYDEBUG(521, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'R') goto yy358; + goto yy53; + } } else { - if(yych <= '3') goto yy569; - if(yych <= '9') goto yy566; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy522: YYDEBUG(522, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + yych = *++YYCURSOR; + if(yych <= 'G'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy529; + } } else { - if(yych <= '9') goto yy566; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'g') goto yy529; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy523: YYDEBUG(523, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 14) YYFILL(14); - yych = *YYCURSOR; - goto yy524; + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy134; + goto yy527; + } + } else { + if(yych <= 'q'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'r') goto yy527; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy524: YYDEBUG(524, *YYCURSOR); - if(yybm[0+yych] & 128) { - goto yy523; + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy134; + goto yy525; + } + } else { + if(yych <= 'n'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'o') goto yy525; + if(yych <= 'z') goto yy134; + goto yy3; + } } - if(yych <= '/') goto yy513; - if(yych <= '1') goto yy525; - if(yych <= '2') goto yy526; - if(yych <= '9') goto yy527; - goto yy513; yy525: YYDEBUG(525, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '@'){ + if(yych == ')') goto yy132; + goto yy526; } else { - if(yych <= '9') goto yy565; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy526; + if(yych <= 'z') goto yy135; + goto yy526; } yy526: YYDEBUG(526, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; - } else { - if(yych <= '3') goto yy565; - if(yych <= '9') goto yy528; - if(yych <= ':') goto yy529; - goto yy513; + +{ + DEBUG_OUTPUT("ago"); + TIMELIB_INIT; + s->time->relative.y = 0 - s->time->relative.y; + s->time->relative.m = 0 - s->time->relative.m; + s->time->relative.d = 0 - s->time->relative.d; + s->time->relative.h = 0 - s->time->relative.h; + s->time->relative.i = 0 - s->time->relative.i; + s->time->relative.s = 0 - s->time->relative.s; + s->time->relative.weekday = 0 - s->time->relative.weekday; + TIMELIB_DEINIT; + return TIMELIB_AGO; } yy527: YYDEBUG(527, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } } else { - if(yych <= '9') goto yy528; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'I') goto yy135; + goto yy528; + } else { + if(yych <= 'h'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'i') goto yy528; + if(yych <= 'z') goto yy135; + goto yy3; + } + } } yy528: YYDEBUG(528, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych <= '9') goto yy563; - goto yy513; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'K'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'L') goto yy358; + if(yych == 'l') goto yy358; + goto yy3; + } yy529: YYDEBUG(529, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy530; - if(yych <= '9') goto yy532; - goto yy56; -yy530: - YYDEBUG(530, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } } else { - if(yych <= '9') goto yy532; - if(yych <= ':') goto yy533; - goto yy531; - } -yy531: - YYDEBUG(531, *YYCURSOR); - -{ - int tz_not_found; - DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'U') goto yy135; + goto yy530; + } else { + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'u') goto yy530; + if(yych <= 'z') goto yy135; + goto yy3; } } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_SHORTDATE_WITH_TIME; } +yy530: + YYDEBUG(530, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'S') goto yy531; + if(yych != 's') goto yy3; + goto yy531; + } +yy531: + YYDEBUG(531, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy358; + if(yych == 't') goto yy358; + goto yy53; yy532: YYDEBUG(532, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy533; - if(yych != ':') goto yy531; - goto yy533; + if(yych <= 'G'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy529; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'g') goto yy538; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy533: YYDEBUG(533, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy534; - if(yych <= '6') goto yy535; - if(yych <= '9') goto yy536; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy134; + goto yy527; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'r') goto yy536; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy534: YYDEBUG(534, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '9') goto yy537; - goto yy531; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy134; + goto yy525; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'o') goto yy535; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy535: YYDEBUG(535, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy537; - goto yy531; + yyaccept = 9; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy526; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy526; + } + } else { + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy526; + goto yy138; + } else { + if(yych <= '`') goto yy526; + if(yych <= 'z') goto yy142; + goto yy526; + } + } yy536: YYDEBUG(536, *YYCURSOR); - yych = *++YYCURSOR; - goto yy531; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } + } else { + if(yych <= '_'){ + if(yych <= 'I'){ + if(yych <= 'H') goto yy135; + goto yy528; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'h'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'i') goto yy537; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } yy537: YYDEBUG(537, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '+'){ - if(yych <= '\''){ - if(yych != ' ') goto yy531; - goto yy538; + if(yych <= 'L'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '(') goto yy541; - if(yych <= '*') goto yy531; - goto yy540; + if(yych <= '/') goto yy138; + if(yych <= 'K') goto yy3; + goto yy358; } } else { - if(yych <= '@'){ - if(yych == '-') goto yy540; - goto yy531; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy543; - goto yy531; + if(yych == 'l') goto yy457; + if(yych <= 'z') goto yy143; + goto yy3; } } yy538: YYDEBUG(538, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; - goto yy539; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } + } else { + if(yych <= '_'){ + if(yych <= 'U'){ + if(yych <= 'T') goto yy135; + goto yy530; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'u') goto yy539; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } yy539: YYDEBUG(539, *YYCURSOR); - if(yych <= '+'){ - if(yych <= '\''){ - if(yych == ' ') goto yy538; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '(') goto yy541; - if(yych <= '*') goto yy56; - goto yy540; + if(yych <= '/') goto yy138; + if(yych <= 'R') goto yy3; + goto yy531; } } else { - if(yych <= '@'){ - if(yych != '-') goto yy56; - goto yy540; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy543; - goto yy56; + if(yych == 's') goto yy540; + if(yych <= 'z') goto yy143; + goto yy3; } } yy540: YYDEBUG(540, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy556; - if(yych <= '2') goto yy557; - if(yych <= '9') goto yy558; - goto yy56; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'T') goto yy358; + goto yy53; + } + } else { + if(yych <= 's'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 't') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; + } + } yy541: YYDEBUG(541, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@') goto yy56; - if(yych <= 'Z') goto yy543; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy543; - goto yy56; + if(yych <= 'B'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'A') goto yy134; + goto yy555; + } + } else { + if(yych <= 'a'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'b') goto yy555; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy542: YYDEBUG(542, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; + if(yych <= 'R'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'F') goto yy552; + if(yych <= 'Q') goto yy134; + goto yy551; + } } else { - if(yych <= 'Z') goto yy544; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy547; - goto yy531; + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'e') goto yy134; + goto yy552; + } else { + if(yych == 'r') goto yy551; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy543: YYDEBUG(543, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; + if(yych <= 'U'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'T') goto yy134; + goto yy548; + } } else { - if(yych <= 'Z') goto yy544; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy544; + if(yych <= 't'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'u') goto yy548; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy544: YYDEBUG(544, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; + if(yych <= 'I'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy545; + } } else { - if(yych <= 'Z') goto yy545; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy545; + if(yych <= 'h'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'i') goto yy545; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy545: YYDEBUG(545, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; - } else { - if(yych <= 'Z') goto yy546; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy546; - } -yy546: - YYDEBUG(546, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == ')') goto yy536; - goto yy531; -yy547: - YYDEBUG(547, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ + if(yych <= 'D'){ if(yych <= ')'){ - if(yych <= '(') goto yy531; - goto yy536; + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych == '/') goto yy549; - goto yy531; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy546; } } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy545; - if(yych <= '^') goto yy531; - goto yy549; + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy548; + if(yych <= 'd') goto yy546; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy548: - YYDEBUG(548, *YYCURSOR); - yyaccept = 7; +yy546: + YYDEBUG(546, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'A') goto yy547; + if(yych != 'a') goto yy3; + goto yy547; + } +yy547: + YYDEBUG(547, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; +yy548: + YYDEBUG(548, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'R'){ if(yych <= ')'){ - if(yych <= '(') goto yy531; - goto yy536; + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych != '/') goto yy531; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; goto yy549; } } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy546; - if(yych <= '^') goto yy531; - goto yy549; + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy553; - goto yy531; + if(yych <= 'r') goto yy549; + if(yych <= 'z') goto yy135; + goto yy3; } } yy549: YYDEBUG(549, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '@') goto yy56; - if(yych >= '[') goto yy56; - goto yy550; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'T') goto yy550; + if(yych != 't') goto yy3; + goto yy550; + } yy550: YYDEBUG(550, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '`') goto yy56; - if(yych >= '{') goto yy56; - goto yy551; + yych = *++YYCURSOR; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; yy551: YYDEBUG(551, *YYCURSOR); - yyaccept = 7; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy552; + yych = *++YYCURSOR; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy135; + goto yy554; + } + } else { + if(yych <= 'r'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 's') goto yy554; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy552: YYDEBUG(552, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy549; - goto yy531; + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy553; + } } else { - if(yych <= '_') goto yy549; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy551; - goto yy531; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy553; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy553: YYDEBUG(553, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == ')') goto yy536; - if(yych <= '.') goto yy531; - goto yy549; + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '_'){ - if(yych <= '^') goto yy531; - goto yy549; - } else { - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy554; - } + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; } yy554: YYDEBUG(554, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy555; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'T') goto yy159; + if(yych == 't') goto yy159; + goto yy3; + } yy555: YYDEBUG(555, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy549; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } } else { - if(yych <= '_') goto yy549; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy554; - goto yy56; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'R') goto yy135; + goto yy556; + } else { + if(yych <= 'q'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'r') goto yy556; + if(yych <= 'z') goto yy135; + goto yy3; + } + } } yy556: YYDEBUG(556, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy561; - if(yych <= '9') goto yy558; - if(yych <= ':') goto yy559; - goto yy531; -yy557: - YYDEBUG(557, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy531; - if(yych <= '3') goto yy561; - goto yy560; + if(yych <= 'T'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == ':') goto yy559; - goto yy531; + if(yych <= 'U') goto yy557; + if(yych != 'u') goto yy3; + goto yy557; } +yy557: + YYDEBUG(557, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy558; + if(yych != 'a') goto yy53; + goto yy558; yy558: YYDEBUG(558, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy560; - if(yych != ':') goto yy531; + yych = *++YYCURSOR; + if(yych == 'R') goto yy559; + if(yych != 'r') goto yy53; goto yy559; yy559: YYDEBUG(559, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy531; - if(yych >= '6') goto yy531; - goto yy560; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy358; + if(yych == 'y') goto yy358; + goto yy53; yy560: YYDEBUG(560, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy536; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'B'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'A') goto yy134; + goto yy555; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'b') goto yy574; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy561: YYDEBUG(561, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy562; - if(yych <= '9') goto yy536; - if(yych <= ':') goto yy559; - goto yy531; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'E'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'F') goto yy552; + if(yych <= 'Q') goto yy134; + goto yy551; + } + } + } else { + if(yych <= 'e'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'q'){ + if(yych <= 'f') goto yy571; + goto yy137; + } else { + if(yych <= 'r') goto yy570; + if(yych <= 'z') goto yy137; + goto yy3; + } + } + } yy562: YYDEBUG(562, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '9') goto yy536; - goto yy531; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'T') goto yy134; + goto yy548; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'u') goto yy567; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy563: YYDEBUG(563, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych >= ':') goto yy513; - goto yy564; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy545; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'i') goto yy564; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy564: YYDEBUG(564, *YYCURSOR); - yych = *++YYCURSOR; - goto yy513; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy546; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 'd') goto yy565; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy565: YYDEBUG(565, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy547; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych <= 'a') goto yy566; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy566: YYDEBUG(566, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych >= ':') goto yy513; - goto yy567; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; yy567: YYDEBUG(567, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy568; - if(yych <= '9') goto yy564; - goto yy568; -yy568: - YYDEBUG(568, *YYCURSOR); - -{ - DEBUG_OUTPUT("datenoday"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; + goto yy549; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'r') goto yy568; + if(yych <= 'z') goto yy142; + goto yy3; + } + } +yy568: + YYDEBUG(568, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy550; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy569; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy569: YYDEBUG(569, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'H') goto yy159; + goto yy53; + } } else { - if(yych <= '9') goto yy567; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy570: YYDEBUG(570, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '1'){ - if(yych == '.') goto yy571; - if(yych <= '/') goto yy524; - goto yy572; + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy135; + goto yy554; + } } else { - if(yych <= '2') goto yy573; - if(yych <= '9') goto yy574; - if(yych <= ':') goto yy529; - goto yy524; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 's') goto yy573; + if(yych <= 'z') goto yy142; + goto yy3; + } } yy571: YYDEBUG(571, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy577; - goto yy578; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy553; + } } else { - if(yych <= '5') goto yy579; - if(yych <= '9') goto yy580; - goto yy524; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy572; + if(yych <= 'z') goto yy142; + goto yy3; + } } yy572: YYDEBUG(572, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; + } } else { - if(yych <= '9') goto yy576; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy573: YYDEBUG(573, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy159; + } } else { - if(yych <= '3') goto yy576; - if(yych <= '9') goto yy575; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy574: YYDEBUG(574, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } } else { - if(yych <= '9') goto yy575; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '_'){ + if(yych <= 'R'){ + if(yych <= 'Q') goto yy135; + goto yy556; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'q'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'r') goto yy575; + if(yych <= 'z') goto yy142; + goto yy3; + } + } } yy575: YYDEBUG(575, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy568; - if(yych <= '9') goto yy563; - goto yy568; -yy576: - YYDEBUG(576, *YYCURSOR); - yyaccept = 8; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy568; + if(yych <= 'U'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'T') goto yy3; + goto yy557; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy529; - goto yy568; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'u') goto yy576; + if(yych <= 'z') goto yy143; + goto yy3; + } } +yy576: + YYDEBUG(576, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy558; + if(yych != 'a') goto yy144; + goto yy577; yy577: YYDEBUG(577, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; - } else { - if(yych <= '9') goto yy586; - if(yych <= ':') goto yy581; - goto yy513; - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy559; + if(yych != 'r') goto yy144; + goto yy578; yy578: YYDEBUG(578, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'Y') goto yy358; + goto yy53; + } } else { - if(yych <= '3') goto yy586; - if(yych <= '9') goto yy585; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'x'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'y') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy579: YYDEBUG(579, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'L') goto yy586; + if(yych <= 'M') goto yy134; + goto yy585; + } } else { - if(yych <= '9') goto yy585; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'l'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'k') goto yy134; + goto yy586; + } else { + if(yych == 'n') goto yy585; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy580: YYDEBUG(580, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych != '.') goto yy513; - goto yy581; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy581; + } } else { - if(yych <= '9') goto yy528; - if(yych >= ';') goto yy513; - goto yy581; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy581; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy581: YYDEBUG(581, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy582; - if(yych <= '6') goto yy583; - if(yych <= '9') goto yy532; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } + } else { + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'U') goto yy135; + goto yy582; + } else { + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'u') goto yy582; + if(yych <= 'z') goto yy135; + goto yy3; + } + } + } yy582: YYDEBUG(582, *YYCURSOR); - yyaccept = 7; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '9') goto yy584; - if(yych <= ':') goto yy533; - goto yy531; + if(yych <= 'A') goto yy583; + if(yych != 'a') goto yy3; + goto yy583; } yy583: YYDEBUG(583, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; - } else { - if(yych <= '0') goto yy537; - if(yych == ':') goto yy533; - goto yy531; - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy584; + if(yych != 'r') goto yy53; + goto yy584; yy584: YYDEBUG(584, *YYCURSOR); - yyaccept = 7; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy358; + if(yych == 'y') goto yy358; + goto yy53; +yy585: + YYDEBUG(585, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '-'){ - if(yych <= '('){ - if(yych == ' ') goto yy538; - if(yych <= '\'') goto yy531; - goto yy541; + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == '+') goto yy540; - if(yych <= ',') goto yy531; - goto yy540; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '@'){ - if(yych <= '.') goto yy533; - if(yych == ':') goto yy533; - goto yy531; - } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy543; - goto yy531; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'E') goto yy587; + goto yy135; + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy587; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy585: - YYDEBUG(585, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy513; - } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy533; - goto yy513; - } yy586: YYDEBUG(586, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'Y') goto yy135; + goto yy587; + } else { + if(yych <= 'x'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'y') goto yy587; + if(yych <= 'z') goto yy135; + goto yy3; + } + } } yy587: YYDEBUG(587, *YYCURSOR); - yyaccept = 6; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '1'){ - if(yych == '.') goto yy571; - if(yych <= '/') goto yy524; - goto yy572; + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '2') goto yy573; - if(yych <= '9') goto yy574; - if(yych <= ':') goto yy529; - goto yy524; + if(yych == '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; } yy588: YYDEBUG(588, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy524; - if(yych <= '0') goto yy570; - goto yy591; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'K'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'L') goto yy586; + if(yych <= 'M') goto yy134; + goto yy585; + } + } } else { - if(yych <= '2') goto yy598; - if(yych <= '9') goto yy591; - goto yy524; + if(yych <= 'k'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'm'){ + if(yych <= 'l') goto yy595; + goto yy137; + } else { + if(yych <= 'n') goto yy594; + if(yych <= 'z') goto yy137; + goto yy3; + } + } } yy589: YYDEBUG(589, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych == '2') goto yy598; - if(yych <= '9') goto yy591; - goto yy524; -yy590: - YYDEBUG(590, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy591; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; -yy591: - YYDEBUG(591, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case '-': goto yy592; - case '.': goto yy571; - case '0': - case '1': goto yy572; - case '2': goto yy573; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy574; - case ':': goto yy529; - default: goto yy524; - } -yy592: - YYDEBUG(592, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy593; -yy593: - YYDEBUG(593, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy594; - if(yych <= '9') goto yy595; - goto yy594; -yy594: - YYDEBUG(594, *YYCURSOR); - -{ - DEBUG_OUTPUT("pgtextshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; - } -yy595: - YYDEBUG(595, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy594; - if(yych >= ':') goto yy594; - goto yy596; -yy596: - YYDEBUG(596, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy594; - if(yych >= ':') goto yy594; - goto yy597; -yy597: - YYDEBUG(597, *YYCURSOR); - yych = *++YYCURSOR; - goto yy594; -yy598: - YYDEBUG(598, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case '-': goto yy592; - case '.': goto yy571; - case '0': - case '1': goto yy572; - case '2': goto yy573; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy574; - case ':': goto yy529; - default: goto yy524; - } -yy599: - YYDEBUG(599, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ + if(yych <= 'N'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy51; - goto yy507; + if(yych <= 'M') goto yy134; + goto yy581; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'c') goto yy600; - if(yych <= 'z') goto yy54; + if(yych == 'n') goto yy590; + if(yych <= 'z') goto yy137; goto yy3; } } -yy600: - YYDEBUG(600, *YYCURSOR); +yy590: + YYDEBUG(590, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '@'){ if(yych <= ','){ if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych == ')') goto yy360; + goto yy359; } else { if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; + if(yych <= '-') goto yy361; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; goto yy3; } } } else { if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy516; + if(yych <= 'U'){ + if(yych <= 'T') goto yy135; + goto yy582; } else { - if(yych <= 'Z') goto yy52; + if(yych <= 'Z') goto yy135; if(yych <= '^') goto yy3; - goto yy55; + goto yy138; } } else { - if(yych <= 'd'){ + if(yych <= 't'){ if(yych <= '`') goto yy3; - goto yy60; + goto yy142; } else { - if(yych <= 'e') goto yy601; - if(yych <= 'z') goto yy60; + if(yych <= 'u') goto yy591; + if(yych <= 'z') goto yy142; goto yy3; } } } -yy601: - YYDEBUG(601, *YYCURSOR); +yy591: + YYDEBUG(591, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ + if(yych <= 'A'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'L') goto yy3; - goto yy517; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy583; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'm') goto yy602; - if(yych <= 'z') goto yy61; + if(yych <= 'a') goto yy592; + if(yych <= 'z') goto yy143; goto yy3; } } -yy602: - YYDEBUG(602, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy518; - if(yych != 'b') goto yy62; - goto yy603; -yy603: - YYDEBUG(603, *YYCURSOR); +yy592: + YYDEBUG(592, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy519; - if(yych != 'e') goto yy62; - goto yy604; -yy604: - YYDEBUG(604, *YYCURSOR); + if(yych == 'R') goto yy584; + if(yych != 'r') goto yy144; + goto yy593; +yy593: + YYDEBUG(593, *YYCURSOR); yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'R') goto yy508; - goto yy56; + if(yych == 'Y') goto yy358; + goto yy53; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'x'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'y') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy605: - YYDEBUG(605, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy509; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy509; - if(yych <= 'z') goto yy61; - goto yy509; - } -yy606: - YYDEBUG(606, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; +yy594: + YYDEBUG(594, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy51; - goto yy618; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy587; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'v') goto yy618; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy596; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy607: - YYDEBUG(607, *YYCURSOR); +yy595: + YYDEBUG(595, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy51; - goto yy618; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= 'Y'){ + if(yych <= 'X') goto yy135; + goto yy587; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych == 'v') goto yy619; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'x'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'y') goto yy596; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy608: - YYDEBUG(608, *YYCURSOR); +yy596: + YYDEBUG(596, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy614; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy138; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= '9') goto yy359; + if(yych <= '^') goto yy3; + goto yy138; } else { - if(yych == 'x') goto yy617; - if(yych <= 'z') goto yy54; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy143; goto yy3; } } -yy609: - YYDEBUG(609, *YYCURSOR); +yy597: + YYDEBUG(597, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy612; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy615; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy610: - YYDEBUG(610, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'X'){ + if(yych <= '9'){ if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy614; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'w'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy598; } else { - if(yych <= 'x') goto yy614; - if(yych <= 'z') goto yy51; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy611: - YYDEBUG(611, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; +yy598: + YYDEBUG(598, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy612; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy3; } } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'Z'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + goto yy135; } else { - if(yych <= 'n') goto yy612; - if(yych <= 'z') goto yy51; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; goto yy3; } } -yy612: - YYDEBUG(612, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ +yy599: + YYDEBUG(599, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy613; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy600; } else { - if(yych <= 't') goto yy613; - if(yych <= 'z') goto yy52; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy613: - YYDEBUG(613, *YYCURSOR); +yy600: + YYDEBUG(600, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } -yy614: - YYDEBUG(614, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ + if(yych <= '9'){ if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy135; + goto yy587; } else { - if(yych <= 't') goto yy452; - if(yych <= 'z') goto yy52; + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; goto yy3; } } -yy615: - YYDEBUG(615, *YYCURSOR); +yy601: + YYDEBUG(601, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy613; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy3; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'Z'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + goto yy134; } else { - if(yych == 't') goto yy616; - if(yych <= 'z') goto yy60; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy616: - YYDEBUG(616, *YYCURSOR); +yy602: + YYDEBUG(602, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy598; } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy617: - YYDEBUG(617, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy603: + YYDEBUG(603, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; + goto yy604; +yy604: + YYDEBUG(604, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy603; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy624; + case 'D': case 'd': goto yy608; + case 'F': case 'f': goto yy609; + case 'H': case 'h': goto yy60; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy607; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'P': case 'p': goto yy628; + case 'S': case 's': goto yy605; + case 'T': case 't': goto yy65; + case 'V': goto yy621; + case 'W': case 'w': goto yy62; + case 'X': goto yy622; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } +yy605: + YYDEBUG(605, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych <= 'E') goto yy1118; + if(yych <= 'T') goto yy53; + goto yy118; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; } else { - if(yych == 't') goto yy455; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych <= 'e') goto yy1118; + if(yych == 'u') goto yy118; + goto yy53; } } -yy618: - YYDEBUG(618, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; +yy606: + YYDEBUG(606, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '`'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych <= 'E') goto yy1118; + if(yych == 'U') goto yy118; + goto yy53; } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy620; - goto yy52; + if(yych <= 'e'){ + if(yych <= 'a') goto yy119; + if(yych <= 'd') goto yy53; + goto yy1118; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy620; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 's') goto yy53; + if(yych <= 't') goto yy843; + if(yych <= 'u') goto yy118; + goto yy53; } } -yy619: - YYDEBUG(619, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; +yy607: + YYDEBUG(607, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'H'){ + if(yych == 'A') goto yy715; + goto yy53; } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } + if(yych <= 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; } } else { - if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy620; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } + if(yych <= 'h'){ + if(yych == 'a') goto yy715; + goto yy53; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'e') goto yy621; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych <= 'i') goto yy110; + if(yych == 'o') goto yy109; + goto yy53; } } -yy620: - YYDEBUG(620, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych == ')') goto yy49; - goto yy3; +yy608: + YYDEBUG(608, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych == 'A') goto yy106; + if(yych <= 'D') goto yy53; + goto yy702; } else { - if(yych <= 'M') goto yy622; - if(yych == 'm') goto yy622; - goto yy3; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy106; + } else { + if(yych == 'e') goto yy702; + goto yy53; + } } -yy621: - YYDEBUG(621, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy609: + YYDEBUG(609, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= 'N'){ + if(yych == 'E') goto yy718; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= 'L') goto yy3; - goto yy622; + if(yych <= 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'n'){ + if(yych == 'e') goto yy718; + goto yy53; } else { - if(yych == 'm') goto yy623; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych <= 'o') goto yy83; + if(yych == 'r') goto yy82; + goto yy53; + } + } +yy610: + YYDEBUG(610, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'H') goto yy66; + if(yych <= 'T') goto yy53; + goto yy67; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy1117; + } else { + if(yych == 'u') goto yy67; + goto yy53; + } + } +yy611: + YYDEBUG(611, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy851; + goto yy57; +yy612: + YYDEBUG(612, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'c'){ + if(yych == 'O') goto yy655; + goto yy53; + } else { + if(yych <= 'd') goto yy843; + if(yych == 'o') goto yy655; + goto yy53; + } +yy613: + YYDEBUG(613, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'd') goto yy843; + goto yy53; +yy614: + YYDEBUG(614, *YYCURSOR); + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': + case '1': + case '2': goto yy783; + case '3': goto yy785; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy786; + case 'A': case 'a': goto yy790; + case 'D': case 'd': goto yy794; + case 'F': case 'f': goto yy788; + case 'J': case 'j': goto yy787; + case 'M': case 'm': goto yy789; + case 'N': case 'n': goto yy793; + case 'O': case 'o': goto yy792; + case 'S': case 's': goto yy791; + default: goto yy53; + } +yy615: + YYDEBUG(615, *YYCURSOR); + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy734; + case '1': goto yy735; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy736; + case 'A': case 'a': goto yy740; + case 'D': case 'd': goto yy744; + case 'F': case 'f': goto yy738; + case 'J': case 'j': goto yy737; + case 'M': case 'm': goto yy739; + case 'N': case 'n': goto yy743; + case 'O': case 'o': goto yy742; + case 'S': case 's': goto yy741; + default: goto yy617; + } +yy616: + YYDEBUG(616, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; + goto yy617; +yy617: + YYDEBUG(617, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy699; + case 'D': case 'd': goto yy701; + case 'F': case 'f': goto yy697; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy698; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'S': case 's': goto yy700; + case 'V': goto yy621; + case 'X': goto yy622; + default: goto yy53; + } +yy618: + YYDEBUG(618, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '1'){ + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy693; + goto yy694; + } else { + if(yych <= '5') goto yy695; + if(yych <= '9') goto yy696; + goto yy617; + } +yy619: + YYDEBUG(619, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych >= ' ') goto yy657; + goto yy620; + } else { + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; + } + } else { + if(yych <= 'V'){ + if(yych <= 'I') goto yy692; + if(yych >= 'V') goto yy665; + goto yy620; + } else { + if(yych == 'X') goto yy665; + goto yy620; } } +yy620: + YYDEBUG(620, *YYCURSOR); + +{ + DEBUG_OUTPUT("datenoyearrev"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); + s->time->m = timelib_get_month((char **) &ptr); + TIMELIB_DEINIT; + return TIMELIB_DATE_TEXT; + } +yy621: + YYDEBUG(621, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; + } else { + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy690; + goto yy620; + } yy622: YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy624; - if(yych == 'b') goto yy624; - goto yy56; + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; + } else { + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy689; + goto yy620; + } yy623: YYDEBUG(623, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy624; - if(yych == 'b') goto yy625; - goto yy62; + if(yych <= 'U'){ + if(yych == 'A') goto yy682; + if(yych <= 'T') goto yy53; + goto yy681; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy682; + } else { + if(yych == 'u') goto yy681; + goto yy53; + } + } yy624: YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy626; - if(yych == 'e') goto yy626; - goto yy56; + if(yych <= 'T'){ + if(yych <= 'L'){ + if(yych == '.') goto yy629; + goto yy53; + } else { + if(yych <= 'M') goto yy630; + if(yych == 'P') goto yy675; + goto yy53; + } + } else { + if(yych <= 'o'){ + if(yych <= 'U') goto yy674; + if(yych == 'm') goto yy630; + goto yy53; + } else { + if(yych <= 'p') goto yy675; + if(yych == 'u') goto yy674; + goto yy53; + } + } yy625: YYDEBUG(625, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy626; - if(yych == 'e') goto yy627; - goto yy62; + if(yych == 'C') goto yy669; + if(yych == 'c') goto yy669; + goto yy53; yy626: YYDEBUG(626, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; + if(yych == 'O') goto yy655; + if(yych == 'o') goto yy655; + goto yy53; yy627: YYDEBUG(627, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy633; + if(yych <= '9') goto yy635; + goto yy53; yy628: YYDEBUG(628, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy629; - } + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy629; } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 't') goto yy629; - if(yych <= 'z') goto yy51; - goto yy3; - } + if(yych <= 'M') goto yy630; + if(yych == 'm') goto yy630; + goto yy53; } yy629: YYDEBUG(629, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'O') goto yy52; - goto yy630; - } else { - if(yych <= 'n'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'o') goto yy630; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } + yych = *++YYCURSOR; + if(yych == 'M') goto yy630; + if(yych != 'm') goto yy53; + goto yy630; yy630: YYDEBUG(630, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'B') goto yy631; - if(yych != 'b') goto yy3; - goto yy631; - } + ++YYCURSOR; + if((yych = *YYCURSOR) == '.') goto yy632; + goto yy631; yy631: YYDEBUG(631, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy632; - if(yych != 'e') goto yy56; - goto yy632; + +{ + DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + } + } + s->time->h += timelib_meridian((char **) &ptr, s->time->h); + TIMELIB_DEINIT; + return TIMELIB_TIME12; + } yy632: YYDEBUG(632, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; + goto yy631; yy633: YYDEBUG(633, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy629; - } + if(yych <= '/'){ + if(yych == '.') goto yy636; + goto yy634; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy634; - if(yych <= 'z') goto yy54; - goto yy3; - } + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; } yy634: YYDEBUG(634, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'O'){ - if(yych <= 'N') goto yy52; - goto yy630; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'n'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'o') goto yy635; - if(yych <= 'z') goto yy60; - goto yy3; + +{ + int tz_not_found; + DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 8); } } - } -yy635: - YYDEBUG(635, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'A') goto yy3; - goto yy631; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'b') goto yy636; - if(yych <= 'z') goto yy61; - goto yy3; + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; } + TIMELIB_DEINIT; + return TIMELIB_TIME24_WITH_ZONE; } +yy635: + YYDEBUG(635, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy636; + if(yych != ':') goto yy634; + goto yy636; yy636: YYDEBUG(636, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy632; - if(yych != 'e') goto yy62; - goto yy637; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy637; + if(yych <= '6') goto yy638; + if(yych <= '9') goto yy639; + goto yy53; yy637: YYDEBUG(637, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy643; + goto yy634; yy638: YYDEBUG(638, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= 'B'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'O'){ - if(yych <= 'C') goto yy653; - goto yy51; - } else { - if(yych <= 'P') goto yy652; - if(yych <= 'U') goto yy51; - goto yy654; - } - } - } else { - if(yych <= 'o'){ - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych == 'c') goto yy653; - goto yy51; - } - } else { - if(yych <= 'u'){ - if(yych <= 'p') goto yy652; - goto yy51; - } else { - if(yych <= 'v') goto yy654; - if(yych <= 'z') goto yy51; - goto yy3; - } - } - } + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych == '0') goto yy643; + goto yy634; yy639: YYDEBUG(639, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy647; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 't') goto yy647; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != '.') goto yy634; + goto yy640; yy640: YYDEBUG(640, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'X'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy645; - } - } else { - if(yych <= 'w'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'x') goto yy645; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy641; yy641: YYDEBUG(641, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy642; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy642; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy642; yy642: YYDEBUG(642, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy641; + goto yy634; +yy643: + YYDEBUG(643, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '-'){ + if(yych != ' ') goto yy634; + goto yy644; } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy643; + if(yych <= '.') goto yy640; + if(yych <= '@') goto yy634; + goto yy646; } } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= '`'){ + if(yych == 'P') goto yy646; + goto yy634; } else { - if(yych <= 'd') goto yy643; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'a') goto yy646; + if(yych == 'p') goto yy646; + goto yy634; } } -yy643: - YYDEBUG(643, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy644; - if(yych != 'a') goto yy3; - goto yy644; - } yy644: YYDEBUG(644, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + goto yy645; yy645: YYDEBUG(645, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 'O'){ + if(yych <= ' '){ + if(yych <= 0x1F) goto yy53; + goto yy644; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; + if(yych != 'A') goto yy53; goto yy646; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'a'){ + if(yych <= 'P') goto yy646; + if(yych <= '`') goto yy53; + goto yy646; } else { - if(yych <= 't') goto yy646; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych != 'p') goto yy53; + goto yy646; } } yy646: YYDEBUG(646, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy647; } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; + if(yych <= 'M') goto yy648; + if(yych == 'm') goto yy648; + goto yy53; } yy647: YYDEBUG(647, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych == 'M') goto yy648; + if(yych != 'm') goto yy53; + goto yy648; +yy648: + YYDEBUG(648, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '.') goto yy632; + goto yy631; +yy649: + YYDEBUG(649, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= '-'){ + if(yych != ' ') goto yy634; + goto yy650; } else { - if(yych <= '@') goto yy154; - if(yych <= 'T') goto yy52; - goto yy648; + if(yych <= '.') goto yy636; + if(yych == ':') goto yy636; + goto yy634; } } else { - if(yych <= 't'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= '`'){ + if(yych <= 'A') goto yy652; + if(yych == 'P') goto yy652; + goto yy634; } else { - if(yych <= 'u') goto yy648; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'a') goto yy652; + if(yych == 'p') goto yy652; + goto yy634; } } -yy648: - YYDEBUG(648, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Q'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'R') goto yy649; - if(yych != 'r') goto yy3; - goto yy649; - } -yy649: - YYDEBUG(649, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy650; - if(yych != 'd') goto yy56; - goto yy650; yy650: YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy651; - if(yych != 'a') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; goto yy651; yy651: YYDEBUG(651, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy652: - YYDEBUG(652, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych <= 'O'){ + if(yych <= ' '){ + if(yych <= 0x1F) goto yy53; + goto yy650; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych != 'A') goto yy53; + goto yy652; } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'T') goto yy657; - goto yy52; + if(yych <= 'a'){ + if(yych <= 'P') goto yy652; + if(yych <= '`') goto yy53; + goto yy652; } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy657; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych != 'p') goto yy53; + goto yy652; } } -yy653: - YYDEBUG(653, *YYCURSOR); +yy652: + YYDEBUG(652, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy52; - goto yy656; - } + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy653; } else { - if(yych <= 'n'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'o') goto yy656; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 'M') goto yy654; + if(yych == 'm') goto yy654; + goto yy53; } +yy653: + YYDEBUG(653, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'M') goto yy654; + if(yych != 'm') goto yy53; + goto yy654; yy654: YYDEBUG(654, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy52; - goto yy655; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy655; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + if(yych == '.') goto yy632; + goto yy631; yy655: YYDEBUG(655, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'N') goto yy233; - if(yych == 'n') goto yy233; - goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'V') goto yy656; + if(yych != 'v') goto yy53; + goto yy656; yy656: YYDEBUG(656, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'N') goto yy236; - if(yych == 'n') goto yy236; - goto yy3; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy661; + } else { + if(yych == 'e') goto yy661; + goto yy620; + } } yy657: YYDEBUG(657, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - goto yy509; - } - } else { - if(yych <= 'D'){ - if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } else { - if(yych <= 'E') goto yy658; - if(yych != 'e') goto yy3; - goto yy658; - } - } + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + goto yy658; yy658: YYDEBUG(658, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'M') goto yy659; - if(yych != 'm') goto yy56; + if(yych <= 0x1F) goto yy53; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy659; yy659: YYDEBUG(659, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy660; - if(yych != 'b') goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy660; + if(yych <= '9') goto yy666; goto yy660; yy660: YYDEBUG(660, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy661; - if(yych != 'e') goto yy56; - goto yy661; + +{ + DEBUG_OUTPUT("datefull"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); + s->time->m = timelib_get_month((char **) &ptr); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_FULL; + } yy661: YYDEBUG(661, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; + if(yych == 'M') goto yy662; + if(yych != 'm') goto yy53; + goto yy662; yy662: YYDEBUG(662, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy3; - } - } else { - if(yych <= 'O'){ - if(yych == 'C') goto yy653; - goto yy51; - } else { - if(yych <= 'P') goto yy652; - if(yych <= 'U') goto yy51; - goto yy654; - } - } - } else { - if(yych <= 'c'){ - if(yych <= '_'){ - if(yych <= 'Z') goto yy51; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'b') goto yy54; - goto yy677; - } - } else { - if(yych <= 'u'){ - if(yych == 'p') goto yy676; - goto yy54; - } else { - if(yych <= 'v') goto yy678; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } + yych = *++YYCURSOR; + if(yych == 'B') goto yy663; + if(yych != 'b') goto yy53; + goto yy663; yy663: YYDEBUG(663, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy647; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy671; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy664; + if(yych != 'e') goto yy53; + goto yy664; yy664: YYDEBUG(664, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy645; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'x') goto yy669; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy665; + if(yych != 'r') goto yy53; + goto yy665; yy665: YYDEBUG(665, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy642; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy666; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; yy666: YYDEBUG(666, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy643; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'd') goto yy667; - if(yych <= 'z') goto yy60; - goto yy154; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych >= ':') goto yy660; + goto yy667; yy667: YYDEBUG(667, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy644; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy668; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych >= ':') goto yy660; + goto yy668; yy668: YYDEBUG(668, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; + goto yy660; yy669: YYDEBUG(669, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy646; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy670; - if(yych <= 'z') goto yy60; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy670; + if(yych != 't') goto yy53; + goto yy670; yy670: YYDEBUG(670, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'O'){ + if(yych <= 'N') goto yy620; + goto yy671; } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych != 'o') goto yy620; + goto yy671; } } yy671: YYDEBUG(671, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'T') goto yy52; - goto yy648; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'u') goto yy672; - if(yych <= 'z') goto yy60; - goto yy154; - } - } + yych = *++YYCURSOR; + if(yych == 'B') goto yy672; + if(yych != 'b') goto yy53; + goto yy672; yy672: YYDEBUG(672, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'Q') goto yy3; - goto yy649; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'r') goto yy673; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy673; + if(yych != 'e') goto yy53; + goto yy673; yy673: YYDEBUG(673, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy650; - if(yych != 'd') goto yy62; - goto yy674; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; yy674: YYDEBUG(674, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy651; - if(yych != 'a') goto yy62; - goto yy675; + if(yych == 'G') goto yy678; + if(yych == 'g') goto yy678; + goto yy53; yy675: YYDEBUG(675, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; + if(yych == 'R') goto yy676; + if(yych != 'r') goto yy53; + goto yy676; yy676: YYDEBUG(676, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '_'){ - if(yych <= 'T'){ - if(yych <= 'S') goto yy52; - goto yy657; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } + if(yych <= 'I'){ + if(yych <= 'H') goto yy620; + goto yy677; } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 't') goto yy681; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych != 'i') goto yy620; + goto yy677; } } yy677: YYDEBUG(677, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'O'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy52; - goto yy656; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'o') goto yy680; - if(yych <= 'z') goto yy60; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'L') goto yy665; + if(yych == 'l') goto yy665; + goto yy53; yy678: YYDEBUG(678, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy52; - goto yy655; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'U'){ + if(yych <= 'T') goto yy620; + goto yy679; } else { - if(yych == 'e') goto yy679; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych != 'u') goto yy620; + goto yy679; } } yy679: YYDEBUG(679, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'M') goto yy3; - goto yy233; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy358; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'S') goto yy680; + if(yych != 's') goto yy53; + goto yy680; yy680: YYDEBUG(680, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'M') goto yy3; - goto yy236; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy361; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy665; + if(yych == 't') goto yy665; + goto yy53; yy681: YYDEBUG(681, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy55; - goto yy509; - } + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy688; + if(yych <= 'M') goto yy53; + goto yy687; } else { - if(yych <= '_'){ - if(yych == 'E') goto yy658; - if(yych <= '^') goto yy3; - goto yy55; + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy688; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy61; - } else { - if(yych <= 'e') goto yy682; - if(yych <= 'z') goto yy61; - goto yy3; - } + if(yych == 'n') goto yy687; + goto yy53; } } yy682: YYDEBUG(682, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy659; - if(yych != 'm') goto yy62; + if(yych == 'N') goto yy683; + if(yych != 'n') goto yy53; goto yy683; yy683: YYDEBUG(683, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy660; - if(yych != 'b') goto yy62; - goto yy684; + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; + } else { + if(yych <= 'U'){ + if(yych <= 'T') goto yy620; + goto yy684; + } else { + if(yych != 'u') goto yy620; + goto yy684; + } + } yy684: YYDEBUG(684, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy661; - if(yych != 'e') goto yy62; + if(yych == 'A') goto yy685; + if(yych != 'a') goto yy53; goto yy685; yy685: YYDEBUG(685, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych == 'R') goto yy686; + if(yych != 'r') goto yy53; + goto yy686; yy686: YYDEBUG(686, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'G'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy693; - } - } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'g') goto yy693; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'Y') goto yy665; + if(yych == 'y') goto yy665; + goto yy53; yy687: YYDEBUG(687, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy51; - goto yy691; - } + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy665; } else { - if(yych <= 'r') goto yy691; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'e') goto yy665; + goto yy620; } } yy688: YYDEBUG(688, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy51; - goto yy689; - } + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'n'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'Y'){ + if(yych <= 'X') goto yy620; + goto yy665; } else { - if(yych <= 'o') goto yy689; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'y') goto yy665; + goto yy620; } } yy689: YYDEBUG(689, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '@'){ - if(yych == ')') goto yy49; - goto yy690; + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy690; - if(yych <= 'z') goto yy52; - goto yy690; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } yy690: YYDEBUG(690, *YYCURSOR); - -{ - DEBUG_OUTPUT("ago"); - TIMELIB_INIT; - s->time->relative.y = 0 - s->time->relative.y; - s->time->relative.m = 0 - s->time->relative.m; - s->time->relative.d = 0 - s->time->relative.d; - s->time->relative.h = 0 - s->time->relative.h; - s->time->relative.i = 0 - s->time->relative.i; - s->time->relative.s = 0 - s->time->relative.s; - s->time->relative.weekday = 0 - s->time->relative.weekday; - TIMELIB_DEINIT; - return TIMELIB_AGO; + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; + } else { + if(yych <= '9') goto yy659; + if(yych != 'I') goto yy620; + goto yy691; } yy691: YYDEBUG(691, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'I') goto yy52; - goto yy692; - } else { - if(yych <= 'h'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'i') goto yy692; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } yy692: YYDEBUG(692, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'K'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= 'L') goto yy508; - if(yych == 'l') goto yy508; - goto yy3; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } yy693: YYDEBUG(693, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'U') goto yy52; - goto yy694; - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'u') goto yy694; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + if(yych <= '9') goto yy733; + if(yych <= ':') goto yy636; + goto yy634; } yy694: YYDEBUG(694, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; } else { - if(yych <= 'S') goto yy695; - if(yych != 's') goto yy3; - goto yy695; + if(yych <= '2') goto yy733; + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; } yy695: YYDEBUG(695, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy508; - if(yych == 't') goto yy508; - goto yy56; -yy696: - YYDEBUG(696, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy693; - } + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'g') goto yy702; - if(yych <= 'z') goto yy54; - goto yy3; - } + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; } +yy696: + YYDEBUG(696, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy724; + if(yych == ':') goto yy636; + goto yy634; yy697: YYDEBUG(697, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy51; - goto yy691; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'r') goto yy700; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy718; + if(yych == 'e') goto yy718; + goto yy53; yy698: YYDEBUG(698, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'O'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy51; - goto yy689; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'o') goto yy699; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy715; + if(yych == 'a') goto yy715; + goto yy53; yy699: YYDEBUG(699, *YYCURSOR); - yyaccept = 9; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy690; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy690; - } + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy675; + if(yych <= 'T') goto yy53; + goto yy674; } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy690; - goto yy55; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy675; } else { - if(yych <= '`') goto yy690; - if(yych <= 'z') goto yy60; - goto yy690; + if(yych == 'u') goto yy674; + goto yy53; } } yy700: YYDEBUG(700, *YYCURSOR); - yyaccept = 1; + yych = *++YYCURSOR; + if(yych == 'E') goto yy708; + if(yych == 'e') goto yy708; + goto yy53; +yy701: + YYDEBUG(701, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy702; + if(yych != 'e') goto yy53; + goto yy702; +yy702: + YYDEBUG(702, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'C') goto yy703; + if(yych != 'c') goto yy53; + goto yy703; +yy703: + YYDEBUG(703, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'I'){ - if(yych <= 'H') goto yy52; - goto yy692; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'h'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'i') goto yy701; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy701: - YYDEBUG(701, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'K') goto yy3; - goto yy508; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'l') goto yy605; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy702: - YYDEBUG(702, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'U'){ - if(yych <= 'T') goto yy52; - goto yy694; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'u') goto yy703; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy703: - YYDEBUG(703, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'R') goto yy3; - goto yy695; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy704; } else { - if(yych == 's') goto yy704; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych != 'e') goto yy620; + goto yy704; } } yy704: YYDEBUG(704, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy508; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } + if(yych == 'M') goto yy705; + if(yych != 'm') goto yy53; + goto yy705; yy705: YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych == 'R') goto yy715; - if(yych <= 'X') goto yy51; - goto yy717; - } - } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'q') goto yy51; - goto yy715; - } else { - if(yych == 'y') goto yy717; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'B') goto yy706; + if(yych != 'b') goto yy53; + goto yy706; yy706: YYDEBUG(706, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Y'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; - } else { - if(yych <= 'Q'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'R') goto yy715; - if(yych <= 'X') goto yy51; - goto yy717; - } - } - } else { - if(yych <= 'q'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } - } else { - if(yych <= 'x'){ - if(yych <= 'r') goto yy716; - goto yy54; - } else { - if(yych <= 'y') goto yy718; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy707; + if(yych != 'e') goto yy53; + goto yy707; yy707: YYDEBUG(707, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy709; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy712; - if(yych <= 'z') goto yy54; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; yy708: YYDEBUG(708, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy709; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy709; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'P') goto yy709; + if(yych != 'p') goto yy53; + goto yy709; yy709: YYDEBUG(709, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy710; - } + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= 'T'){ + if(yych <= 'S') goto yy620; + goto yy710; } else { - if(yych <= 'd') goto yy710; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych != 't') goto yy620; + goto yy710; } } yy710: YYDEBUG(710, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'A') goto yy711; - if(yych != 'a') goto yy3; - goto yy711; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy711; + } else { + if(yych != 'e') goto yy620; + goto yy711; + } } yy711: YYDEBUG(711, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; + if(yych == 'M') goto yy712; + if(yych != 'm') goto yy53; + goto yy712; yy712: YYDEBUG(712, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy710; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'd') goto yy713; - if(yych <= 'z') goto yy60; - goto yy154; - } - } + yych = *++YYCURSOR; + if(yych == 'B') goto yy713; + if(yych != 'b') goto yy53; + goto yy713; yy713: YYDEBUG(713, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy711; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy714; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy714; + if(yych != 'e') goto yy53; + goto yy714; yy714: YYDEBUG(714, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; yy715: YYDEBUG(715, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } + yych = *++YYCURSOR; + if(yych <= 'Y'){ + if(yych == 'R') goto yy716; + if(yych <= 'X') goto yy53; + goto yy665; } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'C') goto yy719; - goto yy52; + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy716; } else { - if(yych <= 'b'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'c') goto yy719; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych == 'y') goto yy665; + goto yy53; } } yy716: YYDEBUG(716, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '_'){ - if(yych <= 'C'){ - if(yych <= 'B') goto yy52; - goto yy719; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } + if(yych <= 'C'){ + if(yych <= 'B') goto yy620; + goto yy717; } else { - if(yych <= 'b'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'c') goto yy720; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych != 'c') goto yy620; + goto yy717; } } yy717: YYDEBUG(717, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - goto yy509; - } - } else { - if(yych <= '@'){ - if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy665; + if(yych == 'h') goto yy665; + goto yy53; yy718: YYDEBUG(718, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - if(yych <= '.') goto yy509; - goto yy55; - } - } else { - if(yych <= '^'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - if(yych <= 'Z') goto yy52; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy60; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'B') goto yy719; + if(yych != 'b') goto yy53; + goto yy719; yy719: YYDEBUG(719, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy508; - if(yych == 'h') goto yy508; - goto yy3; - } -yy720: - YYDEBUG(720, *YYCURSOR); - yyaccept = 1; + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy508; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'R'){ + if(yych <= 'Q') goto yy620; + goto yy720; } else { - if(yych == 'h') goto yy605; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych != 'r') goto yy620; + goto yy720; } } +yy720: + YYDEBUG(720, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'U') goto yy721; + if(yych != 'u') goto yy53; + goto yy721; yy721: YYDEBUG(721, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'B'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy51; - goto yy734; - } - } else { - if(yych <= 'a'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'b') goto yy734; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'A') goto yy722; + if(yych != 'a') goto yy53; + goto yy722; yy722: YYDEBUG(722, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych == 'F') goto yy731; - if(yych <= 'Q') goto yy51; - goto yy730; - } - } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'e') goto yy51; - goto yy731; - } else { - if(yych == 'r') goto yy730; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'R') goto yy723; + if(yych != 'r') goto yy53; + goto yy723; yy723: YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'T') goto yy51; - goto yy728; - } - } else { - if(yych <= 't'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'u') goto yy728; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'Y') goto yy665; + if(yych == 'y') goto yy665; + goto yy53; yy724: YYDEBUG(724, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'I'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy725; - } - } else { - if(yych <= 'h'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'i') goto yy725; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy725; + if(yych <= '6') goto yy726; + if(yych <= '9') goto yy727; + goto yy53; yy725: YYDEBUG(725, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy726; - } - } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; - } else { - if(yych <= 'd') goto yy726; - if(yych <= 'z') goto yy52; - goto yy154; - } - } + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy732; + goto yy634; yy726: YYDEBUG(726, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych == '.') goto yy640; + goto yy634; } else { - if(yych <= 'A') goto yy727; - if(yych != 'a') goto yy3; - goto yy727; + if(yych <= '0') goto yy732; + if(yych <= '9') goto yy728; + goto yy634; } yy727: YYDEBUG(727, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych >= ':') goto yy634; + goto yy728; yy728: YYDEBUG(728, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - goto yy729; - } - } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'r') goto yy729; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy729; + if(yych <= '9') goto yy730; + goto yy729; yy729: YYDEBUG(729, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'T') goto yy246; - if(yych == 't') goto yy246; - goto yy3; + +{ + DEBUG_OUTPUT("pointed date"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_FULL_POINTED; } yy730: YYDEBUG(730, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy52; - goto yy733; - } - } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 's') goto yy733; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + if(yych <= '/') goto yy729; + if(yych >= ':') goto yy729; + goto yy731; yy731: YYDEBUG(731, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + goto yy729; +yy732: + YYDEBUG(732, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= '-'){ + if(yych == ' ') goto yy644; + goto yy634; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy732; + if(yych <= '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy730; + goto yy634; } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych <= 'A') goto yy646; + if(yych == 'P') goto yy646; + goto yy634; } else { - if(yych <= 't') goto yy732; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 'a') goto yy646; + if(yych == 'p') goto yy646; + goto yy634; } } -yy732: - YYDEBUG(732, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } yy733: YYDEBUG(733, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy3; - } -yy734: - YYDEBUG(734, *YYCURSOR); - yyaccept = 1; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych <= '@'){ + if(yych <= '-'){ + if(yych == ' ') goto yy650; + goto yy634; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych <= '.') goto yy724; + if(yych == ':') goto yy636; + goto yy634; } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'R') goto yy52; - goto yy735; + if(yych <= '`'){ + if(yych <= 'A') goto yy652; + if(yych == 'P') goto yy652; + goto yy634; } else { - if(yych <= 'q'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'r') goto yy735; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 'a') goto yy652; + if(yych == 'p') goto yy652; + goto yy634; } } +yy734: + YYDEBUG(734, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy773; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy736; + goto yy53; yy735: YYDEBUG(735, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'U') goto yy736; - if(yych != 'u') goto yy3; - goto yy736; - } + yych = *++YYCURSOR; + if(yych == '-') goto yy773; + if(yych <= '/') goto yy53; + if(yych >= '3') goto yy53; + goto yy736; yy736: YYDEBUG(736, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy737; - if(yych != 'a') goto yy56; - goto yy737; + if(yych == '-') goto yy773; + goto yy53; yy737: YYDEBUG(737, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy738; - if(yych != 'r') goto yy56; - goto yy738; + if(yych <= 'U'){ + if(yych == 'A') goto yy769; + if(yych <= 'T') goto yy53; + goto yy768; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy769; + } else { + if(yych == 'u') goto yy768; + goto yy53; + } + } yy738: YYDEBUG(738, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy508; - if(yych == 'y') goto yy508; - goto yy56; + if(yych == 'E') goto yy766; + if(yych == 'e') goto yy766; + goto yy53; yy739: YYDEBUG(739, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy51; - goto yy734; - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy763; + if(yych == 'a') goto yy763; + goto yy53; +yy740: + YYDEBUG(740, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy760; + if(yych <= 'T') goto yy53; + goto yy759; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy760; } else { - if(yych == 'b') goto yy752; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych == 'u') goto yy759; + goto yy53; } } -yy740: - YYDEBUG(740, *YYCURSOR); - yyaccept = 1; +yy741: + YYDEBUG(741, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy756; + if(yych == 'e') goto yy756; + goto yy53; +yy742: + YYDEBUG(742, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'C') goto yy754; + if(yych == 'c') goto yy754; + goto yy53; +yy743: + YYDEBUG(743, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy752; + if(yych == 'o') goto yy752; + goto yy53; +yy744: + YYDEBUG(744, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy745; + if(yych != 'e') goto yy53; + goto yy745; +yy745: + YYDEBUG(745, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'C') goto yy746; + if(yych != 'c') goto yy53; + goto yy746; +yy746: + YYDEBUG(746, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= 'E'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'F') goto yy731; - if(yych <= 'Q') goto yy51; - goto yy730; - } + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= 'e'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy704; } else { - if(yych <= 'q'){ - if(yych <= 'f') goto yy749; - goto yy54; - } else { - if(yych <= 'r') goto yy748; - if(yych <= 'z') goto yy54; - goto yy3; - } + if(yych == 'e') goto yy704; + goto yy620; } } -yy741: - YYDEBUG(741, *YYCURSOR); - yyaccept = 1; +yy747: + YYDEBUG(747, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy658; + if(yych <= '0') goto yy748; + if(yych <= '2') goto yy749; + if(yych <= '3') goto yy750; + goto yy658; +yy748: + YYDEBUG(748, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '0') goto yy666; + if(yych <= '9') goto yy751; + goto yy660; +yy749: + YYDEBUG(749, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '9') goto yy751; + goto yy660; +yy750: + YYDEBUG(750, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '1') goto yy751; + if(yych <= '9') goto yy666; + goto yy660; +yy751: + YYDEBUG(751, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '9') goto yy667; + goto yy660; +yy752: + YYDEBUG(752, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'V') goto yy753; + if(yych != 'v') goto yy53; + goto yy753; +yy753: + YYDEBUG(753, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'T') goto yy51; - goto yy728; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy661; } else { - if(yych == 'u') goto yy746; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych == 'e') goto yy661; + goto yy620; } } -yy742: - YYDEBUG(742, *YYCURSOR); - yyaccept = 1; +yy754: + YYDEBUG(754, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy755; + if(yych != 't') goto yy53; + goto yy755; +yy755: + YYDEBUG(755, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'I'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy725; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'O'){ + if(yych <= '9') goto yy659; + if(yych <= 'N') goto yy620; + goto yy671; } else { - if(yych == 'i') goto yy743; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych == 'o') goto yy671; + goto yy620; } } -yy743: - YYDEBUG(743, *YYCURSOR); - yyaccept = 3; +yy756: + YYDEBUG(756, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'P') goto yy757; + if(yych != 'p') goto yy53; + goto yy757; +yy757: + YYDEBUG(757, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy726; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'T'){ + if(yych <= '9') goto yy659; + if(yych <= 'S') goto yy620; + goto yy758; } else { - if(yych == 'd') goto yy744; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych != 't') goto yy620; + goto yy758; } } -yy744: - YYDEBUG(744, *YYCURSOR); - yyaccept = 1; +yy758: + YYDEBUG(758, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy727; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy711; } else { - if(yych <= 'a') goto yy745; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych == 'e') goto yy711; + goto yy620; } } -yy745: - YYDEBUG(745, *YYCURSOR); +yy759: + YYDEBUG(759, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy746: - YYDEBUG(746, *YYCURSOR); - yyaccept = 1; + if(yych == 'G') goto yy762; + if(yych == 'g') goto yy762; + goto yy53; +yy760: + YYDEBUG(760, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy761; + if(yych != 'r') goto yy53; + goto yy761; +yy761: + YYDEBUG(761, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - goto yy729; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '9') goto yy659; + if(yych <= 'H') goto yy620; + goto yy677; } else { - if(yych == 'r') goto yy747; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych == 'i') goto yy677; + goto yy620; } } -yy747: - YYDEBUG(747, *YYCURSOR); - yyaccept = 1; +yy762: + YYDEBUG(762, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy246; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'U'){ + if(yych <= '9') goto yy659; + if(yych <= 'T') goto yy620; + goto yy679; } else { - if(yych == 't') goto yy376; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych == 'u') goto yy679; + goto yy620; } } -yy748: - YYDEBUG(748, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy52; - goto yy733; - } +yy763: + YYDEBUG(763, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'Y'){ + if(yych == 'R') goto yy764; + if(yych <= 'X') goto yy53; + goto yy765; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy764; } else { - if(yych == 's') goto yy751; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych == 'y') goto yy765; + goto yy53; } } -yy749: - YYDEBUG(749, *YYCURSOR); - yyaccept = 1; +yy764: + YYDEBUG(764, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy732; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'C'){ + if(yych <= '9') goto yy659; + if(yych <= 'B') goto yy620; + goto yy717; } else { - if(yych == 't') goto yy750; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych == 'c') goto yy717; + goto yy620; } } -yy750: - YYDEBUG(750, *YYCURSOR); - yyaccept = 1; +yy765: + YYDEBUG(765, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } + if(yych <= '-'){ + if(yych <= 0x1F) goto yy620; + if(yych <= ',') goto yy657; + goto yy747; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; } -yy751: - YYDEBUG(751, *YYCURSOR); - yyaccept = 1; +yy766: + YYDEBUG(766, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy767; + if(yych != 'b') goto yy53; + goto yy767; +yy767: + YYDEBUG(767, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy176; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'R'){ + if(yych <= '9') goto yy659; + if(yych <= 'Q') goto yy620; + goto yy720; } else { - if(yych == 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych == 'r') goto yy720; + goto yy620; } } -yy752: - YYDEBUG(752, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } +yy768: + YYDEBUG(768, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy772; + if(yych <= 'M') goto yy53; + goto yy771; } else { - if(yych <= '_'){ - if(yych <= 'R'){ - if(yych <= 'Q') goto yy52; - goto yy735; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy772; } else { - if(yych <= 'q'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'r') goto yy753; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych == 'n') goto yy771; + goto yy53; } } -yy753: - YYDEBUG(753, *YYCURSOR); - yyaccept = 1; +yy769: + YYDEBUG(769, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy770; + if(yych != 'n') goto yy53; + goto yy770; +yy770: + YYDEBUG(770, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych <= '/') goto yy55; - if(yych <= 'T') goto yy3; - goto yy736; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'U'){ + if(yych <= '9') goto yy659; + if(yych <= 'T') goto yy620; + goto yy684; } else { - if(yych == 'u') goto yy754; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych == 'u') goto yy684; + goto yy620; } } -yy754: - YYDEBUG(754, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy737; - if(yych != 'a') goto yy62; - goto yy755; -yy755: - YYDEBUG(755, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy738; - if(yych != 'r') goto yy62; - goto yy756; -yy756: - YYDEBUG(756, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy771: + YYDEBUG(771, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych == 'Y') goto yy508; - goto yy56; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy665; } else { - if(yych <= 'y') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy665; + goto yy620; } } -yy757: - YYDEBUG(757, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; +yy772: + YYDEBUG(772, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych == 'L') goto yy764; - if(yych <= 'M') goto yy51; - goto yy763; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= 'l'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'k') goto yy51; - goto yy764; + if(yych <= 'Y'){ + if(yych <= '9') goto yy659; + if(yych <= 'X') goto yy620; + goto yy665; } else { - if(yych == 'n') goto yy763; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'y') goto yy665; + goto yy620; } } -yy758: - YYDEBUG(758, *YYCURSOR); +yy773: + YYDEBUG(773, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy759; - } + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy774; + if(yych <= '3') goto yy776; + if(yych <= '9') goto yy777; + goto yy53; +yy774: + YYDEBUG(774, *YYCURSOR); + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy775; + if(yych <= '9') goto yy777; + if(yych >= 'n') goto yy779; + goto yy775; } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'r'){ + if(yych >= 'r') goto yy780; + goto yy775; } else { - if(yych <= 'n') goto yy759; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; } } -yy759: - YYDEBUG(759, *YYCURSOR); - yyaccept = 1; +yy775: + YYDEBUG(775, *YYCURSOR); + +{ + DEBUG_OUTPUT("gnudateshort"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_ISO_DATE; + } +yy776: + YYDEBUG(776, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } + if(yych <= 'n'){ + if(yych <= '/') goto yy775; + if(yych <= '1') goto yy777; + if(yych <= 'm') goto yy775; + goto yy779; } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'U') goto yy52; - goto yy760; + if(yych <= 'r'){ + if(yych <= 'q') goto yy775; + goto yy780; } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'u') goto yy760; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; } } -yy760: - YYDEBUG(760, *YYCURSOR); - yyaccept = 1; +yy777: + YYDEBUG(777, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'q'){ + if(yych == 'n') goto yy779; + goto yy775; } else { - if(yych <= 'A') goto yy761; - if(yych != 'a') goto yy3; - goto yy761; + if(yych <= 'r') goto yy780; + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; } -yy761: - YYDEBUG(761, *YYCURSOR); +yy778: + YYDEBUG(778, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy762; - if(yych != 'r') goto yy56; - goto yy762; -yy762: - YYDEBUG(762, *YYCURSOR); + if(yych == 't') goto yy782; + goto yy53; +yy779: + YYDEBUG(779, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy508; - if(yych == 'y') goto yy508; - goto yy56; -yy763: - YYDEBUG(763, *YYCURSOR); - yyaccept = 1; + if(yych == 'd') goto yy782; + goto yy53; +yy780: + YYDEBUG(780, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'd') goto yy782; + goto yy53; +yy781: + YYDEBUG(781, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != 'h') goto yy53; + goto yy782; +yy782: + YYDEBUG(782, *YYCURSOR); + yych = *++YYCURSOR; + goto yy775; +yy783: + YYDEBUG(783, *YYCURSOR); + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych <= 'n'){ + if(yych <= '/'){ + if(yych >= '/') goto yy837; + goto yy784; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych <= '9') goto yy786; + if(yych >= 'n') goto yy834; + goto yy784; } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy765; - goto yy52; + if(yych <= 'r'){ + if(yych >= 'r') goto yy835; + goto yy784; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy765; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } } -yy764: - YYDEBUG(764, *YYCURSOR); - yyaccept = 1; +yy784: + YYDEBUG(784, *YYCURSOR); + +{ + DEBUG_OUTPUT("americanshort | american"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + if (*ptr == '/') { + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + } + TIMELIB_DEINIT; + return TIMELIB_AMERICAN; + } +yy785: + YYDEBUG(785, *YYCURSOR); + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych <= 'n'){ + if(yych <= '/'){ + if(yych <= '.') goto yy784; + goto yy837; } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; + if(yych <= '1') goto yy786; + if(yych <= 'm') goto yy784; + goto yy834; } } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'Y') goto yy52; - goto yy765; + if(yych <= 'r'){ + if(yych <= 'q') goto yy784; + goto yy835; } else { - if(yych <= 'x'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'y') goto yy765; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } } -yy765: - YYDEBUG(765, *YYCURSOR); - yyaccept = 1; +yy786: + YYDEBUG(786, *YYCURSOR); + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; + if(yych <= 'n'){ + if(yych == '/') goto yy837; + if(yych <= 'm') goto yy784; + goto yy834; } else { - if(yych == '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } -yy766: - YYDEBUG(766, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + if(yych <= 'r'){ + if(yych <= 'q') goto yy784; + goto yy835; } else { - if(yych <= 'K'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'L') goto yy764; - if(yych <= 'M') goto yy51; - goto yy763; - } + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } - } else { - if(yych <= 'k'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } - } else { - if(yych <= 'm'){ - if(yych <= 'l') goto yy773; - goto yy54; - } else { - if(yych <= 'n') goto yy772; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } -yy767: - YYDEBUG(767, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy759; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy768; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy768: - YYDEBUG(768, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'U'){ - if(yych <= 'T') goto yy52; - goto yy760; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'u') goto yy769; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy769: - YYDEBUG(769, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy761; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy770; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy770: - YYDEBUG(770, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy762; - if(yych != 'r') goto yy62; - goto yy771; -yy771: - YYDEBUG(771, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy508; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy772: - YYDEBUG(772, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'e') goto yy774; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy773: - YYDEBUG(773, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'Y'){ - if(yych <= 'X') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'x'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'y') goto yy774; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy774: - YYDEBUG(774, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy55; - } - } else { - if(yych <= '_'){ - if(yych <= '9') goto yy509; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy775: - YYDEBUG(775, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy776; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy776: - YYDEBUG(776, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy3; - } - } else { - if(yych <= 'Z'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy777: - YYDEBUG(777, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy778; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy778: - YYDEBUG(778, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy779: - YYDEBUG(779, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy3; - } - } else { - if(yych <= 'Z'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy780: - YYDEBUG(780, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy776; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy781: - YYDEBUG(781, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy782; -yy782: - YYDEBUG(782, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy781; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy798; - case 'D': case 'd': goto yy785; - case 'F': case 'f': goto yy786; - case 'H': case 'h': goto yy73; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy784; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'P': case 'p': goto yy802; - case 'S': case 's': goto yy783; - case 'T': case 't': goto yy78; - case 'V': goto yy795; - case 'W': case 'w': goto yy75; - case 'X': goto yy796; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } -yy783: - YYDEBUG(783, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy1259; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy1259; - if(yych == 'u') goto yy135; - goto yy56; - } - } -yy784: - YYDEBUG(784, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'H'){ - if(yych == 'A') goto yy889; - goto yy56; - } else { - if(yych <= 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } - } else { - if(yych <= 'h'){ - if(yych == 'a') goto yy889; - goto yy56; - } else { - if(yych <= 'i') goto yy126; - if(yych == 'o') goto yy125; - goto yy56; - } - } -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych == 'A') goto yy122; - if(yych <= 'D') goto yy56; - goto yy876; + } +yy787: + YYDEBUG(787, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'A') goto yy832; + if(yych <= 'T') goto yy53; + goto yy831; } else { if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy122; - } else { - if(yych == 'e') goto yy876; - goto yy56; - } - } -yy786: - YYDEBUG(786, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= 'N'){ - if(yych == 'E') goto yy892; - goto yy56; - } else { - if(yych <= 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; - } - } else { - if(yych <= 'n'){ - if(yych == 'e') goto yy892; - goto yy56; + if(yych <= '`') goto yy53; + goto yy832; } else { - if(yych <= 'o') goto yy99; - if(yych == 'r') goto yy98; - goto yy56; + if(yych == 'u') goto yy831; + goto yy53; } } -yy787: - YYDEBUG(787, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1009; - goto yy70; yy788: YYDEBUG(788, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': goto yy952; - case '3': goto yy954; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy955; - case 'A': case 'a': goto yy959; - case 'D': case 'd': goto yy963; - case 'F': case 'f': goto yy957; - case 'J': case 'j': goto yy956; - case 'M': case 'm': goto yy958; - case 'N': case 'n': goto yy962; - case 'O': case 'o': goto yy961; - case 'S': case 's': goto yy960; - default: goto yy56; - } + if(yych == 'E') goto yy830; + if(yych == 'e') goto yy830; + goto yy53; yy789: YYDEBUG(789, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy908; - case '1': goto yy909; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy914; - case 'D': case 'd': goto yy918; - case 'F': case 'f': goto yy912; - case 'J': case 'j': goto yy911; - case 'M': case 'm': goto yy913; - case 'N': case 'n': goto yy917; - case 'O': case 'o': goto yy916; - case 'S': case 's': goto yy915; - default: goto yy791; - } + if(yych == 'A') goto yy829; + if(yych == 'a') goto yy829; + goto yy53; yy790: YYDEBUG(790, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy791; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy828; + if(yych <= 'T') goto yy53; + goto yy827; + } else { + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy828; + } else { + if(yych == 'u') goto yy827; + goto yy53; + } + } yy791: YYDEBUG(791, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy873; - case 'D': case 'd': goto yy875; - case 'F': case 'f': goto yy871; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy872; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'S': case 's': goto yy874; - case 'V': goto yy795; - case 'X': goto yy796; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy825; + if(yych == 'e') goto yy825; + goto yy53; yy792: YYDEBUG(792, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy867; - goto yy868; - } else { - if(yych <= '5') goto yy869; - if(yych <= '9') goto yy870; - goto yy791; - } + if(yych == 'C') goto yy824; + if(yych == 'c') goto yy824; + goto yy53; yy793: YYDEBUG(793, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych >= ' ') goto yy831; - goto yy794; - } else { - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; - } - } else { - if(yych <= 'V'){ - if(yych <= 'I') goto yy866; - if(yych >= 'V') goto yy839; - goto yy794; - } else { - if(yych == 'X') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych == 'O') goto yy823; + if(yych == 'o') goto yy823; + goto yy53; yy794: YYDEBUG(794, *YYCURSOR); - -{ - DEBUG_OUTPUT("datenoyearrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy795; + if(yych != 'e') goto yy53; + goto yy795; yy795: YYDEBUG(795, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy864; - goto yy794; - } + yych = *++YYCURSOR; + if(yych == 'C') goto yy796; + if(yych != 'c') goto yy53; + goto yy796; yy796: YYDEBUG(796, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy863; - goto yy794; - } + yych = *++YYCURSOR; + if(yych != '/') goto yy53; + goto yy797; yy797: YYDEBUG(797, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy856; - if(yych <= 'T') goto yy56; - goto yy855; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy856; - } else { - if(yych == 'u') goto yy855; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy798; yy798: YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= 'L'){ - if(yych == '.') goto yy803; - goto yy56; - } else { - if(yych <= 'M') goto yy804; - if(yych == 'P') goto yy849; - goto yy56; - } - } else { - if(yych <= 'o'){ - if(yych <= 'U') goto yy848; - if(yych == 'm') goto yy804; - goto yy56; - } else { - if(yych <= 'p') goto yy849; - if(yych == 'u') goto yy848; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy799; yy799: YYDEBUG(799, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy843; - if(yych == 'c') goto yy843; - goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy800; yy800: YYDEBUG(800, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy829; - if(yych == 'o') goto yy829; - goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy801; yy801: YYDEBUG(801, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy807; - if(yych <= '9') goto yy809; - goto yy56; + if(yych != ':') goto yy53; + goto yy802; yy802: YYDEBUG(802, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy803; - } else { - if(yych <= 'M') goto yy804; - if(yych == 'm') goto yy804; - goto yy56; - } + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy803; + if(yych <= '2') goto yy804; + goto yy53; yy803: YYDEBUG(803, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy804; - if(yych != 'm') goto yy56; - goto yy804; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy805; + goto yy53; yy804: YYDEBUG(804, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) == '.') goto yy806; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '4') goto yy53; goto yy805; yy805: YYDEBUG(805, *YYCURSOR); - -{ - DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - } - } - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - TIMELIB_DEINIT; - return TIMELIB_TIME12; - } + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy806; yy806: YYDEBUG(806, *YYCURSOR); yych = *++YYCURSOR; - goto yy805; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; + goto yy807; yy807: YYDEBUG(807, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy810; - goto yy808; - } else { - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy808; yy808: YYDEBUG(808, *YYCURSOR); - -{ - int tz_not_found; - DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_TIME24_WITH_ZONE; - } + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy809; yy809: YYDEBUG(809, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy810; - if(yych != ':') goto yy808; - goto yy810; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy810; + if(yych <= '6') goto yy811; + goto yy53; yy810: YYDEBUG(810, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy811; - if(yych <= '6') goto yy812; - if(yych <= '9') goto yy813; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy812; + goto yy53; yy811: YYDEBUG(811, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy817; - goto yy808; + yych = *++YYCURSOR; + if(yych != '0') goto yy53; + goto yy812; yy812: YYDEBUG(812, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych == '0') goto yy817; - goto yy808; + yych = *++YYCURSOR; + if(yych != ' ') goto yy53; + goto yy813; yy813: YYDEBUG(813, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != '.') goto yy808; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); + yych = *YYCURSOR; goto yy814; yy814: YYDEBUG(814, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy815; + if(yych <= '*'){ + if(yych == ' ') goto yy813; + goto yy53; + } else { + if(yych == ',') goto yy53; + if(yych >= '.') goto yy53; + goto yy815; + } yy815: YYDEBUG(815, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy816; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy816; + if(yych <= '2') goto yy818; + if(yych <= '9') goto yy819; + goto yy53; yy816: YYDEBUG(816, *YYCURSOR); - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy815; - goto yy808; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy817; + if(yych <= '9') goto yy819; + if(yych <= ':') goto yy820; + goto yy817; yy817: YYDEBUG(817, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '-'){ - if(yych != ' ') goto yy808; - goto yy818; - } else { - if(yych <= '.') goto yy814; - if(yych <= '@') goto yy808; - goto yy820; - } - } else { - if(yych <= '`'){ - if(yych == 'P') goto yy820; - goto yy808; - } else { - if(yych <= 'a') goto yy820; - if(yych == 'p') goto yy820; - goto yy808; - } - } -yy818: - YYDEBUG(818, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy819; -yy819: - YYDEBUG(819, *YYCURSOR); - if(yych <= 'O'){ - if(yych <= ' '){ - if(yych <= 0x1F) goto yy56; - goto yy818; - } else { - if(yych != 'A') goto yy56; - goto yy820; - } + +{ + int tz_not_found; + DEBUG_OUTPUT("clf"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->m = timelib_get_month((char **) &ptr); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + TIMELIB_DEINIT; + return TIMELIB_CLF; + } +yy818: + YYDEBUG(818, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy817; + if(yych >= '4') goto yy821; + goto yy819; } else { - if(yych <= 'a'){ - if(yych <= 'P') goto yy820; - if(yych <= '`') goto yy56; - goto yy820; - } else { - if(yych != 'p') goto yy56; - goto yy820; - } + if(yych <= '9') goto yy822; + if(yych <= ':') goto yy820; + goto yy817; } +yy819: + YYDEBUG(819, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy817; + if(yych <= '5') goto yy821; + if(yych <= '9') goto yy822; + if(yych >= ';') goto yy817; + goto yy820; yy820: YYDEBUG(820, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy821; - } else { - if(yych <= 'M') goto yy822; - if(yych == 'm') goto yy822; - goto yy56; - } + if(yych <= '/') goto yy817; + if(yych <= '5') goto yy821; + if(yych <= '9') goto yy822; + goto yy817; yy821: YYDEBUG(821, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy822; - if(yych != 'm') goto yy56; + if(yych <= '/') goto yy817; + if(yych >= ':') goto yy817; goto yy822; yy822: YYDEBUG(822, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy806; - goto yy805; + goto yy817; yy823: YYDEBUG(823, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych != ' ') goto yy808; - goto yy824; - } else { - if(yych <= '.') goto yy810; - if(yych == ':') goto yy810; - goto yy808; - } - } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy826; - if(yych == 'P') goto yy826; - goto yy808; - } else { - if(yych <= 'a') goto yy826; - if(yych == 'p') goto yy826; - goto yy808; - } - } + yych = *++YYCURSOR; + if(yych == 'V') goto yy796; + if(yych == 'v') goto yy796; + goto yy53; yy824: YYDEBUG(824, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy825; + yych = *++YYCURSOR; + if(yych == 'T') goto yy796; + if(yych == 't') goto yy796; + goto yy53; yy825: YYDEBUG(825, *YYCURSOR); - if(yych <= 'O'){ - if(yych <= ' '){ - if(yych <= 0x1F) goto yy56; - goto yy824; - } else { - if(yych != 'A') goto yy56; - goto yy826; - } - } else { - if(yych <= 'a'){ - if(yych <= 'P') goto yy826; - if(yych <= '`') goto yy56; - goto yy826; - } else { - if(yych != 'p') goto yy56; - goto yy826; - } - } + yych = *++YYCURSOR; + if(yych == 'P') goto yy826; + if(yych != 'p') goto yy53; + goto yy826; yy826: YYDEBUG(826, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy827; + if(yych <= 'S'){ + if(yych == '/') goto yy797; + goto yy53; } else { - if(yych <= 'M') goto yy828; - if(yych == 'm') goto yy828; - goto yy56; + if(yych <= 'T') goto yy796; + if(yych == 't') goto yy796; + goto yy53; } yy827: YYDEBUG(827, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy828; - if(yych != 'm') goto yy56; - goto yy828; + if(yych == 'G') goto yy796; + if(yych == 'g') goto yy796; + goto yy53; yy828: YYDEBUG(828, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy806; - goto yy805; + if(yych == 'R') goto yy796; + if(yych == 'r') goto yy796; + goto yy53; yy829: YYDEBUG(829, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy830; - if(yych != 'v') goto yy56; - goto yy830; -yy830: - YYDEBUG(830, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + if(yych <= 'Y'){ + if(yych == 'R') goto yy796; + if(yych <= 'X') goto yy53; + goto yy796; } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy835; + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy796; } else { - if(yych == 'e') goto yy835; - goto yy794; + if(yych == 'y') goto yy796; + goto yy53; } } +yy830: + YYDEBUG(830, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy796; + if(yych == 'b') goto yy796; + goto yy53; yy831: YYDEBUG(831, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy832; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy796; + if(yych <= 'M') goto yy53; + goto yy796; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy796; + } else { + if(yych == 'n') goto yy796; + goto yy53; + } + } yy832: YYDEBUG(832, *YYCURSOR); - if(yych <= 0x1F) goto yy56; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy833; + yych = *++YYCURSOR; + if(yych == 'N') goto yy796; + if(yych == 'n') goto yy796; + goto yy53; yy833: YYDEBUG(833, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy834; - if(yych <= '9') goto yy840; - goto yy834; + yych = *++YYCURSOR; + if(yych == 't') goto yy842; + goto yy53; yy834: YYDEBUG(834, *YYCURSOR); - -{ - DEBUG_OUTPUT("datefull"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL; - } + yych = *++YYCURSOR; + if(yych == 'd') goto yy842; + goto yy53; yy835: YYDEBUG(835, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy836; - if(yych != 'm') goto yy56; - goto yy836; + if(yych == 'd') goto yy842; + goto yy53; yy836: YYDEBUG(836, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy837; - if(yych != 'b') goto yy56; - goto yy837; + if(yych == 'h') goto yy842; + goto yy53; yy837: YYDEBUG(837, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy838; - if(yych != 'e') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy838; yy838: YYDEBUG(838, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych != 'r') goto yy56; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; goto yy839; yy839: YYDEBUG(839, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; + yych = *++YYCURSOR; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; + goto yy840; yy840: YYDEBUG(840, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych >= ':') goto yy834; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; goto yy841; yy841: YYDEBUG(841, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych >= ':') goto yy834; - goto yy842; + goto yy784; yy842: YYDEBUG(842, *YYCURSOR); - yych = *++YYCURSOR; - goto yy834; + yyaccept = 13; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '/') goto yy837; + goto yy784; yy843: YYDEBUG(843, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy844; - if(yych != 't') goto yy56; + if(yych <= '-') goto yy617; + if(yych <= '.') goto yy845; + if(yych >= '0') goto yy617; goto yy844; yy844: YYDEBUG(844, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'O'){ - if(yych <= 'N') goto yy794; - goto yy845; - } else { - if(yych != 'o') goto yy794; - goto yy845; - } + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case 'A': case 'a': goto yy790; + case 'D': case 'd': goto yy794; + case 'F': case 'f': goto yy788; + case 'J': case 'j': goto yy787; + case 'M': case 'm': goto yy789; + case 'N': case 'n': goto yy793; + case 'O': case 'o': goto yy792; + case 'S': case 's': goto yy791; + default: goto yy53; } yy845: YYDEBUG(845, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy846; - if(yych != 'b') goto yy56; - goto yy846; + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy846; + if(yych <= '1') goto yy847; + if(yych <= '9') goto yy848; + goto yy617; yy846: YYDEBUG(846, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy847; - if(yych != 'e') goto yy56; - goto yy847; + if(yych == '.') goto yy849; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy848; + goto yy53; yy847: YYDEBUG(847, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + if(yych == '.') goto yy849; + if(yych <= '/') goto yy53; + if(yych >= '3') goto yy53; + goto yy848; yy848: YYDEBUG(848, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy852; - if(yych == 'g') goto yy852; - goto yy56; + if(yych != '.') goto yy53; + goto yy849; yy849: YYDEBUG(849, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy850; - if(yych != 'r') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy850; yy850: YYDEBUG(850, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'I'){ - if(yych <= 'H') goto yy794; - goto yy851; - } else { - if(yych != 'i') goto yy794; - goto yy851; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy729; + if(yych <= '9') goto yy728; + goto yy729; yy851: YYDEBUG(851, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'L') goto yy839; - if(yych == 'l') goto yy839; - goto yy56; + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy879; + goto yy57; yy852: YYDEBUG(852, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'U'){ - if(yych <= 'T') goto yy794; - goto yy853; - } else { - if(yych != 'u') goto yy794; - goto yy853; - } + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy734; + case '1': goto yy735; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy736; + case 'A': case 'a': goto yy856; + case 'D': case 'd': goto yy860; + case 'F': case 'f': goto yy854; + case 'J': case 'j': goto yy853; + case 'M': case 'm': goto yy855; + case 'N': case 'n': goto yy859; + case 'O': case 'o': goto yy858; + case 'S': case 's': goto yy857; + default: goto yy53; } yy853: YYDEBUG(853, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy854; - if(yych != 's') goto yy56; - goto yy854; + if(yych <= 'U'){ + if(yych == 'A') goto yy878; + if(yych <= 'T') goto yy53; + goto yy877; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy878; + } else { + if(yych == 'u') goto yy877; + goto yy53; + } + } yy854: YYDEBUG(854, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy839; - if(yych == 't') goto yy839; - goto yy56; + if(yych == 'E') goto yy876; + if(yych == 'e') goto yy876; + goto yy53; yy855: YYDEBUG(855, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy862; - if(yych <= 'M') goto yy56; - goto yy861; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy862; - } else { - if(yych == 'n') goto yy861; - goto yy56; - } - } + if(yych == 'A') goto yy875; + if(yych == 'a') goto yy875; + goto yy53; yy856: YYDEBUG(856, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy857; - if(yych != 'n') goto yy56; - goto yy857; -yy857: - YYDEBUG(857, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + if(yych <= 'U'){ + if(yych == 'P') goto yy874; + if(yych <= 'T') goto yy53; + goto yy873; } else { - if(yych <= 'U'){ - if(yych <= 'T') goto yy794; - goto yy858; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy874; } else { - if(yych != 'u') goto yy794; - goto yy858; + if(yych == 'u') goto yy873; + goto yy53; } } +yy857: + YYDEBUG(857, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy871; + if(yych == 'e') goto yy871; + goto yy53; yy858: YYDEBUG(858, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy859; - if(yych != 'a') goto yy56; - goto yy859; + if(yych == 'C') goto yy870; + if(yych == 'c') goto yy870; + goto yy53; yy859: YYDEBUG(859, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy860; - if(yych != 'r') goto yy56; - goto yy860; + if(yych == 'O') goto yy869; + if(yych == 'o') goto yy869; + goto yy53; yy860: YYDEBUG(860, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy839; - if(yych == 'y') goto yy839; - goto yy56; + if(yych == 'E') goto yy861; + if(yych != 'e') goto yy53; + goto yy861; yy861: YYDEBUG(861, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy839; - } else { - if(yych == 'e') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych == 'C') goto yy862; + if(yych != 'c') goto yy53; + goto yy862; yy862: YYDEBUG(862, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'Y'){ - if(yych <= 'X') goto yy794; - goto yy839; - } else { - if(yych == 'y') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych != '-') goto yy53; + goto yy863; yy863: YYDEBUG(863, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy864; + if(yych <= '2') goto yy865; + if(yych <= '3') goto yy866; + goto yy53; yy864: YYDEBUG(864, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych != 'I') goto yy794; - goto yy865; - } + yych = *++YYCURSOR; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy867; + goto yy53; yy865: YYDEBUG(865, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy867; + goto yy53; yy866: YYDEBUG(866, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '2') goto yy53; + goto yy867; yy867: YYDEBUG(867, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '9') goto yy907; - if(yych <= ':') goto yy810; - goto yy808; - } + ++YYCURSOR; + goto yy868; yy868: YYDEBUG(868, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '2') goto yy907; - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; + +{ + DEBUG_OUTPUT("pgtextreverse"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_TEXT; } yy869: YYDEBUG(869, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych == 'V') goto yy862; + if(yych == 'v') goto yy862; + goto yy53; yy870: YYDEBUG(870, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy898; - if(yych == ':') goto yy810; - goto yy808; + yych = *++YYCURSOR; + if(yych == 'T') goto yy862; + if(yych == 't') goto yy862; + goto yy53; yy871: YYDEBUG(871, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy892; - if(yych == 'e') goto yy892; - goto yy56; + if(yych == 'P') goto yy872; + if(yych != 'p') goto yy53; + goto yy872; yy872: YYDEBUG(872, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy889; - if(yych == 'a') goto yy889; - goto yy56; + if(yych <= 'S'){ + if(yych == '-') goto yy863; + goto yy53; + } else { + if(yych <= 'T') goto yy862; + if(yych == 't') goto yy862; + goto yy53; + } yy873: YYDEBUG(873, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy849; - if(yych <= 'T') goto yy56; - goto yy848; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy849; - } else { - if(yych == 'u') goto yy848; - goto yy56; - } - } + if(yych == 'G') goto yy862; + if(yych == 'g') goto yy862; + goto yy53; yy874: YYDEBUG(874, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy882; - if(yych == 'e') goto yy882; - goto yy56; + if(yych == 'R') goto yy862; + if(yych == 'r') goto yy862; + goto yy53; yy875: YYDEBUG(875, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy876; - if(yych != 'e') goto yy56; - goto yy876; + if(yych <= 'Y'){ + if(yych == 'R') goto yy862; + if(yych <= 'X') goto yy53; + goto yy862; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy862; + } else { + if(yych == 'y') goto yy862; + goto yy53; + } + } yy876: YYDEBUG(876, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy877; - if(yych != 'c') goto yy56; - goto yy877; + if(yych == 'B') goto yy862; + if(yych == 'b') goto yy862; + goto yy53; yy877: YYDEBUG(877, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy862; + if(yych <= 'M') goto yy53; + goto yy862; } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy878; + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy862; } else { - if(yych != 'e') goto yy794; - goto yy878; + if(yych == 'n') goto yy862; + goto yy53; } } yy878: YYDEBUG(878, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy879; - if(yych != 'm') goto yy56; - goto yy879; + if(yych == 'N') goto yy862; + if(yych == 'n') goto yy862; + goto yy53; yy879: YYDEBUG(879, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy880; - if(yych != 'b') goto yy56; - goto yy880; + yyaccept = 14; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': case 'A': case 'D': case 'F': case 'H': + case 'I': + case 'J': case 'M': + case 'N': + case 'O': case 'S': + case 'T': case 'V': case 'X': + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': + case 'n': + case 'o': case 's': + case 't': case 'w': case 'y': goto yy884; + case '-': goto yy881; + case '.': goto yy887; + case '/': goto yy882; + case '0': goto yy900; + case '1': goto yy901; + case '2': goto yy902; + case '3': goto yy903; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy51; + case 'W': goto yy904; + default: goto yy880; + } yy880: YYDEBUG(880, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy881; - if(yych != 'e') goto yy56; - goto yy881; + +{ + DEBUG_OUTPUT("year4"); + TIMELIB_INIT; + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_DEINIT; + return TIMELIB_CLF; + } yy881: YYDEBUG(881, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy1046; + case '1': goto yy1047; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy1048; + case 'A': case 'a': goto yy1041; + case 'D': case 'd': goto yy1045; + case 'F': case 'f': goto yy1039; + case 'J': case 'j': goto yy1038; + case 'M': case 'm': goto yy1040; + case 'N': case 'n': goto yy1044; + case 'O': case 'o': goto yy1043; + case 'S': case 's': goto yy1042; + default: goto yy886; + } yy882: YYDEBUG(882, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy883; - if(yych != 'p') goto yy56; - goto yy883; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy1019; + if(yych <= '1') goto yy1020; + if(yych <= '9') goto yy1021; + goto yy53; yy883: YYDEBUG(883, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'T'){ - if(yych <= 'S') goto yy794; - goto yy884; - } else { - if(yych != 't') goto yy794; - goto yy884; - } - } + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; + goto yy884; yy884: YYDEBUG(884, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy885; - } else { - if(yych != 'e') goto yy794; - goto yy885; - } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy883; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy885; + case 'A': case 'a': goto yy895; + case 'D': case 'd': goto yy899; + case 'F': case 'f': goto yy893; + case 'H': case 'h': goto yy60; + case 'I': goto yy888; + case 'J': case 'j': goto yy892; + case 'M': case 'm': goto yy894; + case 'N': case 'n': goto yy898; + case 'O': case 'o': goto yy897; + case 'S': case 's': goto yy896; + case 'T': case 't': goto yy65; + case 'V': goto yy890; + case 'W': case 'w': goto yy62; + case 'X': goto yy891; + case 'Y': case 'y': goto yy64; + default: goto yy53; } yy885: YYDEBUG(885, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'M') goto yy886; - if(yych != 'm') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); + yych = *YYCURSOR; goto yy886; yy886: YYDEBUG(886, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy887; - if(yych != 'b') goto yy56; - goto yy887; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy885; + case 'A': case 'a': goto yy895; + case 'D': case 'd': goto yy1011; + case 'F': case 'f': goto yy1008; + case 'I': goto yy888; + case 'J': case 'j': goto yy892; + case 'M': case 'm': goto yy1009; + case 'N': case 'n': goto yy898; + case 'O': case 'o': goto yy897; + case 'S': case 's': goto yy1010; + case 'V': goto yy890; + case 'X': goto yy891; + default: goto yy53; + } yy887: YYDEBUG(887, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy888; - if(yych != 'e') goto yy56; - goto yy888; + if(yych <= '/') goto yy886; + if(yych <= '0') goto yy1005; + if(yych <= '2') goto yy1006; + if(yych <= '3') goto yy1007; + goto yy886; yy888: YYDEBUG(888, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) <= 'U'){ + if(yych == 'I') goto yy1004; + goto yy889; + } else { + if(yych == 'W') goto yy889; + if(yych <= 'X') goto yy958; + goto yy889; + } yy889: YYDEBUG(889, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy890; - if(yych <= 'X') goto yy56; - goto yy839; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy890; - } else { - if(yych == 'y') goto yy839; - goto yy56; - } + +{ + DEBUG_OUTPUT("datenodayrev"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_NO_DAY; } yy890: YYDEBUG(890, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'C'){ - if(yych <= 'B') goto yy794; - goto yy891; - } else { - if(yych != 'c') goto yy794; - goto yy891; - } - } + yych = *++YYCURSOR; + if(yych == 'I') goto yy1002; + goto yy889; yy891: YYDEBUG(891, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'H') goto yy839; - if(yych == 'h') goto yy839; - goto yy56; + if(yych == 'I') goto yy1001; + goto yy889; yy892: YYDEBUG(892, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy893; - if(yych != 'b') goto yy56; - goto yy893; + if(yych <= 'U'){ + if(yych == 'A') goto yy994; + if(yych <= 'T') goto yy53; + goto yy993; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy994; + } else { + if(yych == 'u') goto yy993; + goto yy53; + } + } yy893: YYDEBUG(893, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= 'N'){ + if(yych == 'E') goto yy987; + goto yy53; + } else { + if(yych <= 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; + } } else { - if(yych <= 'R'){ - if(yych <= 'Q') goto yy794; - goto yy894; + if(yych <= 'n'){ + if(yych == 'e') goto yy987; + goto yy53; } else { - if(yych != 'r') goto yy794; - goto yy894; + if(yych <= 'o') goto yy83; + if(yych == 'r') goto yy82; + goto yy53; } } yy894: YYDEBUG(894, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'U') goto yy895; - if(yych != 'u') goto yy56; - goto yy895; + if(yych <= 'O'){ + if(yych <= 'H'){ + if(yych == 'A') goto yy984; + goto yy53; + } else { + if(yych <= 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; + } + } else { + if(yych <= 'h'){ + if(yych == 'a') goto yy984; + goto yy53; + } else { + if(yych <= 'i') goto yy110; + if(yych == 'o') goto yy109; + goto yy53; + } + } yy895: YYDEBUG(895, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy896; - if(yych != 'a') goto yy56; - goto yy896; + if(yych <= 'U'){ + if(yych == 'P') goto yy978; + if(yych <= 'T') goto yy53; + goto yy977; + } else { + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy978; + } else { + if(yych == 'u') goto yy977; + goto yy53; + } + } yy896: YYDEBUG(896, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy897; - if(yych != 'r') goto yy56; - goto yy897; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; + } else { + if(yych <= 'E') goto yy970; + if(yych <= 'T') goto yy53; + goto yy118; + } + } else { + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; + } else { + if(yych <= 'e') goto yy970; + if(yych == 'u') goto yy118; + goto yy53; + } + } yy897: YYDEBUG(897, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy839; - if(yych == 'y') goto yy839; - goto yy56; + if(yych == 'C') goto yy965; + if(yych == 'c') goto yy965; + goto yy53; yy898: YYDEBUG(898, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy899; - if(yych <= '6') goto yy900; - if(yych <= '9') goto yy901; - goto yy56; + if(yych == 'O') goto yy959; + if(yych == 'o') goto yy959; + goto yy53; yy899: YYDEBUG(899, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy906; - goto yy808; -yy900: - YYDEBUG(900, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy814; - goto yy808; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych == 'A') goto yy106; + if(yych <= 'D') goto yy53; + goto yy952; } else { - if(yych <= '0') goto yy906; - if(yych <= '9') goto yy902; - goto yy808; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy106; + } else { + if(yych == 'e') goto yy952; + goto yy53; + } } +yy900: + YYDEBUG(900, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy950; + if(yych <= '9') goto yy951; + goto yy57; yy901: YYDEBUG(901, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych >= ':') goto yy808; - goto yy902; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '2') goto yy917; + if(yych <= '9') goto yy916; + goto yy57; yy902: YYDEBUG(902, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy903; - if(yych <= '9') goto yy904; - goto yy903; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy916; + goto yy57; yy903: YYDEBUG(903, *YYCURSOR); - -{ - DEBUG_OUTPUT("pointed date"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL_POINTED; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '5') goto yy912; + if(yych <= '6') goto yy913; + if(yych <= '9') goto yy51; + goto yy57; yy904: YYDEBUG(904, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy903; - if(yych >= ':') goto yy903; - goto yy905; -yy905: - YYDEBUG(905, *YYCURSOR); - yych = *++YYCURSOR; - goto yy903; -yy906: - YYDEBUG(906, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych == ' ') goto yy818; - goto yy808; - } else { - if(yych <= '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy904; - goto yy808; - } - } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy820; - if(yych == 'P') goto yy820; - goto yy808; - } else { - if(yych <= 'a') goto yy820; - if(yych == 'p') goto yy820; - goto yy808; - } - } -yy907: - YYDEBUG(907, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych == ' ') goto yy824; - goto yy808; - } else { - if(yych <= '.') goto yy898; - if(yych == ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy905; + if(yych <= '4') goto yy906; + goto yy907; } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy826; - if(yych == 'P') goto yy826; - goto yy808; + if(yych <= 'E'){ + if(yych <= 'D') goto yy53; + goto yy98; } else { - if(yych <= 'a') goto yy826; - if(yych == 'p') goto yy826; - goto yy808; + if(yych == 'e') goto yy98; + goto yy53; } } +yy905: + YYDEBUG(905, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy908; + goto yy53; +yy906: + YYDEBUG(906, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy908; + goto yy53; +yy907: + YYDEBUG(907, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '4') goto yy53; + goto yy908; yy908: YYDEBUG(908, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy910; - goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy909; + if(yych <= '7') goto yy910; + goto yy909; yy909: YYDEBUG(909, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy910; + +{ + timelib_sll w, d; + DEBUG_OUTPUT("isoweek"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + TIMELIB_HAVE_RELATIVE(); + + s->time->y = timelib_get_nr((char **) &ptr, 4); + w = timelib_get_nr((char **) &ptr, 2); + d = 1; + s->time->m = 1; + s->time->d = 1; + s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); + + TIMELIB_DEINIT; + return TIMELIB_ISO_WEEK; + } yy910: YYDEBUG(910, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - goto yy56; + ++YYCURSOR; + goto yy911; yy911: YYDEBUG(911, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy943; - if(yych <= 'T') goto yy56; - goto yy942; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy943; - } else { - if(yych == 'u') goto yy942; - goto yy56; - } + +{ + timelib_sll w, d; + DEBUG_OUTPUT("isoweekday"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + TIMELIB_HAVE_RELATIVE(); + + s->time->y = timelib_get_nr((char **) &ptr, 4); + w = timelib_get_nr((char **) &ptr, 2); + d = timelib_get_nr((char **) &ptr, 1); + s->time->m = 1; + s->time->d = 1; + s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); + + TIMELIB_DEINIT; + return TIMELIB_ISO_WEEK; } yy912: YYDEBUG(912, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy940; - if(yych == 'e') goto yy940; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy914; + goto yy57; yy913: YYDEBUG(913, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy937; - if(yych == 'a') goto yy937; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '6') goto yy914; + if(yych <= '9') goto yy51; + goto yy57; yy914: YYDEBUG(914, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy934; - if(yych <= 'T') goto yy56; - goto yy933; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + if(yych <= 'X'){ + if(yych <= 'G'){ + if(yych <= 'C'){ + if(yych == ' ') goto yy57; + goto yy915; + } else { + if(yych == 'E') goto yy915; + if(yych <= 'F') goto yy57; + goto yy915; + } + } else { + if(yych <= 'R'){ + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; + goto yy915; + } else { + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; + goto yy915; + } + } } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy934; + if(yych <= 'l'){ + if(yych <= 'e'){ + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; + goto yy915; + } else { + if(yych == 'g') goto yy915; + if(yych <= 'h') goto yy57; + goto yy915; + } } else { - if(yych == 'u') goto yy933; - goto yy56; + if(yych <= 'v'){ + if(yych <= 'm') goto yy57; + if(yych <= 'r') goto yy915; + if(yych <= 't') goto yy57; + goto yy915; + } else { + if(yych == 'x') goto yy915; + if(yych <= 'y') goto yy57; + goto yy915; + } } } yy915: YYDEBUG(915, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy930; - if(yych == 'e') goto yy930; - goto yy56; + +{ + DEBUG_OUTPUT("pgydotd"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->d = timelib_get_nr((char **) &ptr, 3); + s->time->m = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_YEARDAY; + } yy916: YYDEBUG(916, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy928; - if(yych == 'c') goto yy928; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy914; + goto yy57; yy917: YYDEBUG(917, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy926; - if(yych == 'o') goto yy926; - goto yy56; + if(yych <= '2'){ + if(yych <= '/') goto yy57; + if(yych >= '1') goto yy919; + goto yy918; + } else { + if(yych <= '3') goto yy920; + if(yych <= '9') goto yy914; + goto yy57; + } yy918: YYDEBUG(918, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy919; - if(yych != 'e') goto yy56; - goto yy919; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy51; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy921; + default: goto yy915; + } yy919: YYDEBUG(919, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy920; - if(yych != 'c') goto yy56; - goto yy920; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy921; + default: goto yy915; + } yy920: YYDEBUG(920, *YYCURSOR); - yyaccept = 10; + yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy878; - } else { - if(yych == 'e') goto yy878; - goto yy794; - } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': goto yy921; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy51; + default: goto yy915; } yy921: YYDEBUG(921, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy832; - if(yych <= '0') goto yy922; - if(yych <= '2') goto yy923; - if(yych <= '3') goto yy924; - goto yy832; + yyaccept = 16; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': goto yy923; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + case 't': goto yy924; + default: goto yy922; + } yy922: YYDEBUG(922, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '0') goto yy840; - if(yych <= '9') goto yy925; - goto yy834; + +{ + DEBUG_OUTPUT("datenocolon"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_DEINIT; + return TIMELIB_DATE_NOCOLON; + } yy923: YYDEBUG(923, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '9') goto yy925; - goto yy834; + if(yych <= 'H'){ + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy940; + goto yy941; + } else { + if(yych <= '9') goto yy942; + if(yych <= 'G') goto yy53; + goto yy66; + } + } else { + if(yych <= 'g'){ + if(yych == 'U') goto yy67; + goto yy53; + } else { + if(yych <= 'h') goto yy66; + if(yych == 'u') goto yy67; + goto yy53; + } + } yy924: YYDEBUG(924, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '1') goto yy925; - if(yych <= '9') goto yy840; - goto yy834; + if(yych <= 'H'){ + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '2') goto yy926; + goto yy925; + } else { + if(yych <= '9') goto yy927; + if(yych <= 'G') goto yy53; + goto yy66; + } + } else { + if(yych <= 'g'){ + if(yych == 'U') goto yy67; + goto yy53; + } else { + if(yych <= 'h') goto yy66; + if(yych == 'u') goto yy67; + goto yy53; + } + } yy925: YYDEBUG(925, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '9') goto yy841; - goto yy834; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy934; + if(yych <= '9') goto yy927; + goto yy53; yy926: YYDEBUG(926, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy927; - if(yych != 'v') goto yy56; - goto yy927; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy934; + if(yych <= '5') goto yy928; + goto yy53; yy927: YYDEBUG(927, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy835; - } else { - if(yych == 'e') goto yy835; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; + goto yy928; yy928: YYDEBUG(928, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy929; - if(yych != 't') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy929; yy929: YYDEBUG(929, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'O'){ - if(yych <= '9') goto yy833; - if(yych <= 'N') goto yy794; - goto yy845; - } else { - if(yych == 'o') goto yy845; - goto yy794; - } - } -yy930: - YYDEBUG(930, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'P') goto yy931; - if(yych != 'p') goto yy56; - goto yy931; -yy931: - YYDEBUG(931, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'T'){ - if(yych <= '9') goto yy833; - if(yych <= 'S') goto yy794; - goto yy932; - } else { - if(yych != 't') goto yy794; - goto yy932; - } - } -yy932: - YYDEBUG(932, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy885; - } else { - if(yych == 'e') goto yy885; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy930; + if(yych <= '6') goto yy931; + goto yy53; +yy930: + YYDEBUG(930, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy932; + goto yy53; +yy931: + YYDEBUG(931, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != '0') goto yy53; + goto yy932; +yy932: + YYDEBUG(932, *YYCURSOR); + ++YYCURSOR; + goto yy933; yy933: YYDEBUG(933, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy936; - if(yych == 'g') goto yy936; - goto yy56; + +{ + int tz_not_found; + DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 9); + if (*ptr) { /* timezone is optional */ + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + } + } + TIMELIB_DEINIT; + return TIMELIB_XMLRPC_SOAP; + } yy934: YYDEBUG(934, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy935; - if(yych != 'r') goto yy56; - goto yy935; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy935; + if(yych <= '9') goto yy929; + goto yy53; yy935: YYDEBUG(935, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'I'){ - if(yych <= '9') goto yy833; - if(yych <= 'H') goto yy794; - goto yy851; - } else { - if(yych == 'i') goto yy851; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy936; + if(yych <= '6') goto yy937; + if(yych <= '9') goto yy929; + goto yy53; yy936: YYDEBUG(936, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'U'){ - if(yych <= '9') goto yy833; - if(yych <= 'T') goto yy794; - goto yy853; - } else { - if(yych == 'u') goto yy853; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy938; + if(yych <= '6') goto yy939; + if(yych <= '9') goto yy932; + goto yy53; yy937: YYDEBUG(937, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy938; - if(yych <= 'X') goto yy56; - goto yy939; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy938; - } else { - if(yych == 'y') goto yy939; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy938; + if(yych <= '5') goto yy930; + if(yych <= '6') goto yy931; + goto yy53; yy938: YYDEBUG(938, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'C'){ - if(yych <= '9') goto yy833; - if(yych <= 'B') goto yy794; - goto yy891; - } else { - if(yych == 'c') goto yy891; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy939: YYDEBUG(939, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '-'){ - if(yych <= 0x1F) goto yy794; - if(yych <= ',') goto yy831; - goto yy921; - } else { - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; - } + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy933; yy940: YYDEBUG(940, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy941; - if(yych != 'b') goto yy56; - goto yy941; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy949; + if(yych <= '9') goto yy942; + if(yych <= ':') goto yy943; + goto yy53; yy941: YYDEBUG(941, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy949; + goto yy928; } else { - if(yych <= 'R'){ - if(yych <= '9') goto yy833; - if(yych <= 'Q') goto yy794; - goto yy894; - } else { - if(yych == 'r') goto yy894; - goto yy794; - } + if(yych == ':') goto yy943; + goto yy53; } yy942: YYDEBUG(942, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy946; - if(yych <= 'M') goto yy56; - goto yy945; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy946; - } else { - if(yych == 'n') goto yy945; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy928; + if(yych != ':') goto yy53; + goto yy943; yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy944; - if(yych != 'n') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; goto yy944; yy944: YYDEBUG(944, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'U'){ - if(yych <= '9') goto yy833; - if(yych <= 'T') goto yy794; - goto yy858; - } else { - if(yych == 'u') goto yy858; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy945; yy945: YYDEBUG(945, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy839; - } else { - if(yych == 'e') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy946; yy946: YYDEBUG(946, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'Y'){ - if(yych <= '9') goto yy833; - if(yych <= 'X') goto yy794; - goto yy839; - } else { - if(yych == 'y') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy947; + if(yych <= '6') goto yy948; + goto yy53; yy947: YYDEBUG(947, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy948; - if(yych <= '3') goto yy950; - if(yych <= '9') goto yy951; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy932; + goto yy53; yy948: YYDEBUG(948, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy949; - if(yych <= '9') goto yy951; - goto yy949; + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy53; yy949: YYDEBUG(949, *YYCURSOR); - -{ - DEBUG_OUTPUT("gnudateshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy935; + if(yych <= '9') goto yy929; + if(yych <= ':') goto yy943; + goto yy53; yy950: YYDEBUG(950, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych >= '2') goto yy949; - goto yy951; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy51; + if(yych <= '9') goto yy914; + goto yy57; yy951: YYDEBUG(951, *YYCURSOR); yych = *++YYCURSOR; - goto yy949; + if(yych <= '2'){ + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy918; + goto yy919; + } else { + if(yych <= '3') goto yy920; + if(yych <= '9') goto yy914; + goto yy57; + } yy952: YYDEBUG(952, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.') goto yy953; - if(yych <= '/') goto yy1004; - if(yych <= '9') goto yy955; + yych = *++YYCURSOR; + if(yych == 'C') goto yy953; + if(yych != 'c') goto yy53; goto yy953; yy953: YYDEBUG(953, *YYCURSOR); - -{ - DEBUG_OUTPUT("americanshort | american"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '/') { - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - } - TIMELIB_DEINIT; - return TIMELIB_AMERICAN; - } + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy954; + if(yych != 'e') goto yy889; + goto yy954; yy954: YYDEBUG(954, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.') goto yy953; - if(yych <= '/') goto yy1004; - if(yych >= '2') goto yy953; + yych = *++YYCURSOR; + if(yych == 'M') goto yy955; + if(yych != 'm') goto yy53; goto yy955; yy955: YYDEBUG(955, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '/') goto yy1004; - goto yy953; + yych = *++YYCURSOR; + if(yych == 'B') goto yy956; + if(yych != 'b') goto yy53; + goto yy956; yy956: YYDEBUG(956, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1003; - if(yych <= 'T') goto yy56; - goto yy1002; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1003; - } else { - if(yych == 'u') goto yy1002; - goto yy56; - } - } + if(yych == 'E') goto yy957; + if(yych != 'e') goto yy53; + goto yy957; yy957: YYDEBUG(957, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1001; - if(yych == 'e') goto yy1001; - goto yy56; + if(yych == 'R') goto yy958; + if(yych != 'r') goto yy53; + goto yy958; yy958: YYDEBUG(958, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy1000; - if(yych == 'a') goto yy1000; - goto yy56; + goto yy889; yy959: YYDEBUG(959, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy999; - if(yych <= 'T') goto yy56; - goto yy998; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy999; - } else { - if(yych == 'u') goto yy998; - goto yy56; - } - } + if(yych == 'V') goto yy960; + if(yych != 'v') goto yy53; + goto yy960; yy960: YYDEBUG(960, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy996; - if(yych == 'e') goto yy996; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy961; + if(yych != 'e') goto yy889; + goto yy961; yy961: YYDEBUG(961, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy995; - if(yych == 'c') goto yy995; - goto yy56; + if(yych == 'M') goto yy962; + if(yych != 'm') goto yy53; + goto yy962; yy962: YYDEBUG(962, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy994; - if(yych == 'o') goto yy994; - goto yy56; + if(yych == 'B') goto yy963; + if(yych != 'b') goto yy53; + goto yy963; yy963: YYDEBUG(963, *YYCURSOR); yych = *++YYCURSOR; if(yych == 'E') goto yy964; - if(yych != 'e') goto yy56; + if(yych != 'e') goto yy53; goto yy964; yy964: YYDEBUG(964, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy965; - if(yych != 'c') goto yy56; - goto yy965; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy965: YYDEBUG(965, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; + if(yych == 'T') goto yy966; + if(yych != 't') goto yy53; goto yy966; yy966: YYDEBUG(966, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'O') goto yy967; + if(yych != 'o') goto yy889; goto yy967; yy967: YYDEBUG(967, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'B') goto yy968; + if(yych != 'b') goto yy53; goto yy968; yy968: YYDEBUG(968, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'E') goto yy969; + if(yych != 'e') goto yy53; goto yy969; yy969: YYDEBUG(969, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy970; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy970: YYDEBUG(970, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy971; + if(yych <= 'P'){ + if(yych == 'C') goto yy121; + if(yych <= 'O') goto yy53; + goto yy971; + } else { + if(yych <= 'c'){ + if(yych <= 'b') goto yy53; + goto yy121; + } else { + if(yych != 'p') goto yy53; + goto yy971; + } + } yy971: YYDEBUG(971, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy972; - if(yych <= '2') goto yy973; - goto yy56; + if(yych == 'T') goto yy972; + if(yych != 't') goto yy889; + goto yy972; yy972: YYDEBUG(972, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy974; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy973; + if(yych != 'e') goto yy889; + goto yy973; yy973: YYDEBUG(973, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '4') goto yy56; + if(yych == 'M') goto yy974; + if(yych != 'm') goto yy53; goto yy974; yy974: YYDEBUG(974, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'B') goto yy975; + if(yych != 'b') goto yy53; goto yy975; yy975: YYDEBUG(975, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych == 'E') goto yy976; + if(yych != 'e') goto yy53; goto yy976; yy976: YYDEBUG(976, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy977; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy977: YYDEBUG(977, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy978; + if(yych == 'G') goto yy981; + if(yych == 'g') goto yy981; + goto yy53; yy978: YYDEBUG(978, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy979; - if(yych <= '6') goto yy980; - goto yy56; + if(yych == 'R') goto yy979; + if(yych != 'r') goto yy53; + goto yy979; yy979: YYDEBUG(979, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy981; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'I') goto yy980; + if(yych != 'i') goto yy889; + goto yy980; yy980: YYDEBUG(980, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy981; + if(yych == 'L') goto yy958; + if(yych == 'l') goto yy958; + goto yy53; yy981: YYDEBUG(981, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ' ') goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy982; + if(yych != 'u') goto yy889; goto yy982; yy982: YYDEBUG(982, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'S') goto yy983; + if(yych != 's') goto yy53; goto yy983; yy983: YYDEBUG(983, *YYCURSOR); - if(yych <= '*'){ - if(yych == ' ') goto yy982; - goto yy56; - } else { - if(yych == ',') goto yy56; - if(yych >= '.') goto yy56; - goto yy984; - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy958; + if(yych == 't') goto yy958; + goto yy53; yy984: YYDEBUG(984, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy985; - if(yych <= '2') goto yy987; - if(yych <= '9') goto yy988; - goto yy56; + if(yych <= 'Y'){ + if(yych == 'R') goto yy985; + if(yych <= 'X') goto yy53; + goto yy958; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy985; + } else { + if(yych == 'y') goto yy958; + goto yy53; + } + } yy985: YYDEBUG(985, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy986; - if(yych <= '5') goto yy992; - if(yych <= '9') goto yy988; - if(yych <= ':') goto yy989; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'C') goto yy986; + if(yych != 'c') goto yy889; goto yy986; yy986: - YYDEBUG(986, *YYCURSOR); - -{ - int tz_not_found; - DEBUG_OUTPUT("clf"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - TIMELIB_DEINIT; - return TIMELIB_CLF; - } -yy987: - YYDEBUG(987, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy986; - if(yych <= '3') goto yy992; - goto yy990; - } else { - if(yych == ':') goto yy989; - goto yy986; - } + YYDEBUG(986, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'H') goto yy958; + if(yych == 'h') goto yy958; + goto yy53; +yy987: + YYDEBUG(987, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy988; + if(yych != 'b') goto yy53; + goto yy988; yy988: YYDEBUG(988, *YYCURSOR); - yyaccept = 13; + yyaccept = 17; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy986; - if(yych <= '5') goto yy990; - if(yych != ':') goto yy986; + if(yych == 'R') goto yy989; + if(yych != 'r') goto yy889; goto yy989; yy989: YYDEBUG(989, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy986; - if(yych >= '6') goto yy986; + yych = *++YYCURSOR; + if(yych == 'U') goto yy990; + if(yych != 'u') goto yy53; goto yy990; yy990: YYDEBUG(990, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'A') goto yy991; + if(yych != 'a') goto yy53; goto yy991; yy991: YYDEBUG(991, *YYCURSOR); yych = *++YYCURSOR; - goto yy986; + if(yych == 'R') goto yy992; + if(yych != 'r') goto yy53; + goto yy992; yy992: YYDEBUG(992, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy986; - if(yych <= '5') goto yy993; - if(yych <= '9') goto yy991; - if(yych <= ':') goto yy989; - goto yy986; + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy53; yy993: YYDEBUG(993, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy986; - if(yych <= '9') goto yy991; - goto yy986; + if(yych <= 'N'){ + if(yych == 'L') goto yy1000; + if(yych <= 'M') goto yy53; + goto yy999; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy1000; + } else { + if(yych == 'n') goto yy999; + goto yy53; + } + } yy994: YYDEBUG(994, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy965; - if(yych == 'v') goto yy965; - goto yy56; + if(yych == 'N') goto yy995; + if(yych != 'n') goto yy53; + goto yy995; yy995: YYDEBUG(995, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy965; - if(yych == 't') goto yy965; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy996; + if(yych != 'u') goto yy889; + goto yy996; yy996: YYDEBUG(996, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy997; - if(yych != 'p') goto yy56; + if(yych == 'A') goto yy997; + if(yych != 'a') goto yy53; goto yy997; yy997: YYDEBUG(997, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych == '/') goto yy966; - goto yy56; - } else { - if(yych <= 'T') goto yy965; - if(yych == 't') goto yy965; - goto yy56; - } + if(yych == 'R') goto yy998; + if(yych != 'r') goto yy53; + goto yy998; yy998: YYDEBUG(998, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy965; - if(yych == 'g') goto yy965; - goto yy56; + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy53; yy999: YYDEBUG(999, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy965; - if(yych == 'r') goto yy965; - goto yy56; + if(yych == 'E') goto yy958; + if(yych == 'e') goto yy958; + goto yy889; yy1000: YYDEBUG(1000, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy965; - if(yych <= 'X') goto yy56; - goto yy965; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy965; - } else { - if(yych == 'y') goto yy965; - goto yy56; - } - } + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy889; yy1001: YYDEBUG(1001, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy965; - if(yych == 'b') goto yy965; - goto yy56; + if(yych == 'I') goto yy958; + goto yy889; yy1002: YYDEBUG(1002, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy965; - if(yych <= 'M') goto yy56; - goto yy965; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy965; - } else { - if(yych == 'n') goto yy965; - goto yy56; - } - } + if(yych != 'I') goto yy889; + goto yy1003; yy1003: YYDEBUG(1003, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy965; - if(yych == 'n') goto yy965; - goto yy56; + if(yych == 'I') goto yy958; + goto yy889; yy1004: YYDEBUG(1004, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1005; + if(yych == 'I') goto yy958; + goto yy889; yy1005: YYDEBUG(1005, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1006; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy1018; + if(yych <= '9') goto yy1017; + goto yy53; yy1006: YYDEBUG(1006, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1007; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1016; + goto yy53; yy1007: YYDEBUG(1007, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1008; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1014; + if(yych <= '6') goto yy1013; + goto yy53; yy1008: YYDEBUG(1008, *YYCURSOR); yych = *++YYCURSOR; - goto yy953; + if(yych == 'E') goto yy987; + if(yych == 'e') goto yy987; + goto yy53; yy1009: YYDEBUG(1009, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1037; - goto yy70; + if(yych == 'A') goto yy984; + if(yych == 'a') goto yy984; + goto yy53; yy1010: YYDEBUG(1010, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy908; - case '1': goto yy909; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy1014; - case 'D': case 'd': goto yy1018; - case 'F': case 'f': goto yy1012; - case 'J': case 'j': goto yy1011; - case 'M': case 'm': goto yy1013; - case 'N': case 'n': goto yy1017; - case 'O': case 'o': goto yy1016; - case 'S': case 's': goto yy1015; - default: goto yy56; - } + if(yych == 'E') goto yy1012; + if(yych == 'e') goto yy1012; + goto yy53; yy1011: YYDEBUG(1011, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1036; - if(yych <= 'T') goto yy56; - goto yy1035; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1036; - } else { - if(yych == 'u') goto yy1035; - goto yy56; - } - } + if(yych == 'E') goto yy952; + if(yych == 'e') goto yy952; + goto yy53; yy1012: YYDEBUG(1012, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1034; - if(yych == 'e') goto yy1034; - goto yy56; + if(yych == 'P') goto yy971; + if(yych == 'p') goto yy971; + goto yy53; yy1013: YYDEBUG(1013, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy1033; - if(yych == 'a') goto yy1033; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '6') goto yy1015; + goto yy53; yy1014: YYDEBUG(1014, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1032; - if(yych <= 'T') goto yy56; - goto yy1031; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1032; - } else { - if(yych == 'u') goto yy1031; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy1015; yy1015: YYDEBUG(1015, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1029; - if(yych == 'e') goto yy1029; - goto yy56; + goto yy915; yy1016: YYDEBUG(1016, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1028; - if(yych == 'c') goto yy1028; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1017: YYDEBUG(1017, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy1027; - if(yych == 'o') goto yy1027; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1018: YYDEBUG(1018, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1019; - if(yych != 'e') goto yy56; - goto yy1019; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1019: YYDEBUG(1019, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1020; - if(yych != 'c') goto yy56; - goto yy1020; + if(yych <= '.') goto yy53; + if(yych <= '/') goto yy1022; + if(yych <= '0') goto yy1021; + if(yych <= '9') goto yy1032; + goto yy53; yy1020: YYDEBUG(1020, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '-') goto yy56; - goto yy1021; + if(yych <= '.') goto yy53; + if(yych <= '/') goto yy1022; + if(yych <= '2') goto yy1032; + goto yy53; yy1021: YYDEBUG(1021, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1022; - if(yych <= '2') goto yy1023; - if(yych <= '3') goto yy1024; - goto yy56; + if(yych != '/') goto yy53; + goto yy1022; yy1022: YYDEBUG(1022, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1025; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1023; + if(yych <= '3') goto yy1025; + if(yych <= '9') goto yy1026; + goto yy53; yy1023: YYDEBUG(1023, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1025; - goto yy56; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '9') goto yy1026; + if(yych >= 'n') goto yy1028; + goto yy1024; + } else { + if(yych <= 'r'){ + if(yych >= 'r') goto yy1029; + goto yy1024; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } yy1024: YYDEBUG(1024, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '2') goto yy56; - goto yy1025; -yy1025: - YYDEBUG(1025, *YYCURSOR); - ++YYCURSOR; - goto yy1026; -yy1026: - YYDEBUG(1026, *YYCURSOR); { - DEBUG_OUTPUT("pgtextreverse"); + DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); + s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; + return TIMELIB_ISO_DATE; + } +yy1025: + YYDEBUG(1025, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '1') goto yy1026; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } +yy1026: + YYDEBUG(1026, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'q'){ + if(yych == 'n') goto yy1028; + goto yy1024; + } else { + if(yych <= 'r') goto yy1029; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } yy1027: YYDEBUG(1027, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy1020; - if(yych == 'v') goto yy1020; - goto yy56; + if(yych == 't') goto yy1031; + goto yy53; yy1028: YYDEBUG(1028, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1020; - if(yych == 't') goto yy1020; - goto yy56; + if(yych == 'd') goto yy1031; + goto yy53; yy1029: YYDEBUG(1029, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy1030; - if(yych != 'p') goto yy56; - goto yy1030; + if(yych == 'd') goto yy1031; + goto yy53; yy1030: YYDEBUG(1030, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych == '-') goto yy1021; - goto yy56; - } else { - if(yych <= 'T') goto yy1020; - if(yych == 't') goto yy1020; - goto yy56; - } + if(yych != 'h') goto yy53; + goto yy1031; yy1031: YYDEBUG(1031, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy1020; - if(yych == 'g') goto yy1020; - goto yy56; + goto yy1024; yy1032: YYDEBUG(1032, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1020; - if(yych == 'r') goto yy1020; - goto yy56; + if(yych != '/') goto yy53; + goto yy1033; yy1033: YYDEBUG(1033, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1020; - if(yych <= 'X') goto yy56; - goto yy1020; + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '1') goto yy1035; + goto yy1034; + } else { + if(yych <= '3') goto yy1036; + if(yych <= '9') goto yy1026; + goto yy53; + } +yy1034: + YYDEBUG(1034, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '0'){ + if(yych <= '/') goto yy1024; + goto yy1026; + } else { + if(yych <= '9') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; + } } else { if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1020; + if(yych <= 'q') goto yy1024; + goto yy1029; } else { - if(yych == 'y') goto yy1020; - goto yy56; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } } -yy1034: - YYDEBUG(1034, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1020; - if(yych == 'b') goto yy1020; - goto yy56; yy1035: YYDEBUG(1035, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1020; - if(yych <= 'M') goto yy56; - goto yy1020; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '9') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy1020; + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; } else { - if(yych == 'n') goto yy1020; - goto yy56; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } } yy1036: YYDEBUG(1036, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'N') goto yy1020; - if(yych == 'n') goto yy1020; - goto yy56; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '1') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } yy1037: YYDEBUG(1037, *YYCURSOR); - yyaccept = 14; + yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': case 'A': case 'D': case 'F': case 'H': - case 'I': - case 'J': case 'M': - case 'N': - case 'O': case 'S': - case 'T': case 'V': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1042; - case '-': goto yy1039; - case '.': goto yy1045; - case '/': goto yy1040; - case '0': goto yy1058; - case '1': goto yy1059; - case '2': goto yy1060; - case '3': goto yy1061; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'W': goto yy1062; - default: goto yy1038; + if(yych <= 'n'){ + if(yych == '/') goto yy1031; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } } yy1038: YYDEBUG(1038, *YYCURSOR); - -{ - DEBUG_OUTPUT("year4"); - TIMELIB_INIT; - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_DEINIT; - return TIMELIB_CLF; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'A') goto yy1113; + if(yych <= 'T') goto yy53; + goto yy1112; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy1113; + } else { + if(yych == 'u') goto yy1112; + goto yy53; + } } yy1039: YYDEBUG(1039, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy1199; - case '1': goto yy1200; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy1194; - case 'D': case 'd': goto yy1198; - case 'F': case 'f': goto yy1192; - case 'J': case 'j': goto yy1191; - case 'M': case 'm': goto yy1193; - case 'N': case 'n': goto yy1197; - case 'O': case 'o': goto yy1196; - case 'S': case 's': goto yy1195; - default: goto yy1044; - } + if(yych == 'E') goto yy1110; + if(yych == 'e') goto yy1110; + goto yy53; yy1040: YYDEBUG(1040, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1177; - if(yych <= '1') goto yy1178; - if(yych <= '9') goto yy1179; - goto yy56; + if(yych == 'A') goto yy1107; + if(yych == 'a') goto yy1107; + goto yy53; yy1041: YYDEBUG(1041, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - goto yy1042; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy1104; + if(yych <= 'T') goto yy53; + goto yy1103; + } else { + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy1104; + } else { + if(yych == 'u') goto yy1103; + goto yy53; + } + } yy1042: YYDEBUG(1042, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy1041; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy1043; - case 'A': case 'a': goto yy1053; - case 'D': case 'd': goto yy1057; - case 'F': case 'f': goto yy1051; - case 'H': case 'h': goto yy73; - case 'I': goto yy1046; - case 'J': case 'j': goto yy1050; - case 'M': case 'm': goto yy1052; - case 'N': case 'n': goto yy1056; - case 'O': case 'o': goto yy1055; - case 'S': case 's': goto yy1054; - case 'T': case 't': goto yy78; - case 'V': goto yy1048; - case 'W': case 'w': goto yy75; - case 'X': goto yy1049; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy1100; + if(yych == 'e') goto yy1100; + goto yy53; yy1043: YYDEBUG(1043, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - goto yy1044; + yych = *++YYCURSOR; + if(yych == 'C') goto yy1098; + if(yych == 'c') goto yy1098; + goto yy53; yy1044: YYDEBUG(1044, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy1043; - case 'A': case 'a': goto yy1053; - case 'D': case 'd': goto yy1169; - case 'F': case 'f': goto yy1166; - case 'I': goto yy1046; - case 'J': case 'j': goto yy1050; - case 'M': case 'm': goto yy1167; - case 'N': case 'n': goto yy1056; - case 'O': case 'o': goto yy1055; - case 'S': case 's': goto yy1168; - case 'V': goto yy1048; - case 'X': goto yy1049; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'O') goto yy1096; + if(yych == 'o') goto yy1096; + goto yy53; yy1045: YYDEBUG(1045, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1044; - if(yych <= '0') goto yy1163; - if(yych <= '2') goto yy1164; - if(yych <= '3') goto yy1165; - goto yy1044; + if(yych == 'E') goto yy1094; + if(yych == 'e') goto yy1094; + goto yy53; yy1046: YYDEBUG(1046, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= 'U'){ - if(yych == 'I') goto yy1162; - goto yy1047; - } else { - if(yych == 'W') goto yy1047; - if(yych <= 'X') goto yy1116; - goto yy1047; - } -yy1047: - YYDEBUG(1047, *YYCURSOR); - -{ - DEBUG_OUTPUT("datenodayrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; + yych = *++YYCURSOR; + if(yych <= '/'){ + if(yych == '-') goto yy1049; + goto yy53; + } else { + if(yych <= '0') goto yy1048; + if(yych <= '9') goto yy1068; + goto yy53; } +yy1047: + YYDEBUG(1047, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy1049; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1068; + goto yy53; yy1048: YYDEBUG(1048, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1160; - goto yy1047; + if(yych != '-') goto yy53; + goto yy1049; yy1049: YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1159; - goto yy1047; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1050; + if(yych <= '3') goto yy1051; + if(yych <= '9') goto yy1052; + goto yy53; yy1050: YYDEBUG(1050, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1152; - if(yych <= 'T') goto yy56; - goto yy1151; + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + goto yy1052; + } else { + if(yych == 'T') goto yy1057; + goto yy775; + } } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1152; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych == 'u') goto yy1151; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1051: YYDEBUG(1051, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= 'N'){ - if(yych == 'E') goto yy1145; - goto yy56; + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy775; + goto yy1052; } else { - if(yych <= 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'n'){ - if(yych == 'e') goto yy1145; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'o') goto yy99; - if(yych == 'r') goto yy98; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1052: YYDEBUG(1052, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'H'){ - if(yych == 'A') goto yy1142; - goto yy56; - } else { - if(yych <= 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych == 'T') goto yy1057; + if(yych <= 'm') goto yy775; + goto yy1054; } else { - if(yych <= 'h'){ - if(yych == 'a') goto yy1142; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'i') goto yy126; - if(yych == 'o') goto yy125; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1053: YYDEBUG(1053, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1136; - if(yych <= 'T') goto yy56; - goto yy1135; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1136; - } else { - if(yych == 'u') goto yy1135; - goto yy56; - } - } + if(yych == 't') goto yy1067; + goto yy53; yy1054: YYDEBUG(1054, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy1128; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy1128; - if(yych == 'u') goto yy135; - goto yy56; - } - } + if(yych == 'd') goto yy1067; + goto yy53; yy1055: YYDEBUG(1055, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1123; - if(yych == 'c') goto yy1123; - goto yy56; + if(yych == 'd') goto yy1067; + goto yy53; yy1056: YYDEBUG(1056, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy1117; - if(yych == 'o') goto yy1117; - goto yy56; + if(yych == 'h') goto yy1067; + goto yy53; yy1057: YYDEBUG(1057, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych == 'A') goto yy122; - if(yych <= 'D') goto yy56; - goto yy1110; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy122; - } else { - if(yych == 'e') goto yy1110; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1058; + if(yych <= '2') goto yy1059; + if(yych <= '9') goto yy1060; + goto yy53; yy1058: YYDEBUG(1058, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1108; - if(yych <= '9') goto yy1109; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1060; + if(yych <= ':') goto yy1061; + goto yy53; yy1059: YYDEBUG(1059, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '2') goto yy1075; - if(yych <= '9') goto yy1074; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy1060; + if(yych == ':') goto yy1061; + goto yy53; yy1060: YYDEBUG(1060, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1074; - goto yy70; + if(yych != ':') goto yy53; + goto yy1061; yy1061: YYDEBUG(1061, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '5') goto yy1070; - if(yych <= '6') goto yy1071; - if(yych <= '9') goto yy79; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1062; + if(yych <= '9') goto yy1063; + goto yy53; yy1062: YYDEBUG(1062, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '5'){ - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1063; - if(yych <= '4') goto yy1064; - goto yy1065; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy56; - goto yy114; - } else { - if(yych == 'e') goto yy114; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1063; + if(yych <= ':') goto yy1064; + goto yy53; yy1063: YYDEBUG(1063, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1066; - goto yy56; + if(yych != ':') goto yy53; + goto yy1064; yy1064: YYDEBUG(1064, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1066; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1065; + if(yych <= '6') goto yy1066; + if(yych <= '9') goto yy932; + goto yy53; yy1065: YYDEBUG(1065, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '4') goto yy56; - goto yy1066; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy1066: YYDEBUG(1066, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy1067; - if(yych <= '7') goto yy1068; - goto yy1067; + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy933; yy1067: YYDEBUG(1067, *YYCURSOR); - -{ - timelib_sll w, d; - DEBUG_OUTPUT("isoweek"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = 1; - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; - } + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'T') goto yy1057; + goto yy775; yy1068: YYDEBUG(1068, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if(yych != '-') goto yy53; goto yy1069; yy1069: YYDEBUG(1069, *YYCURSOR); - -{ - timelib_sll w, d; - DEBUG_OUTPUT("isoweekday"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = timelib_get_nr((char **) &ptr, 1); - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; + yych = *++YYCURSOR; + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '1') goto yy1071; + goto yy1070; + } else { + if(yych <= '3') goto yy1072; + if(yych <= '9') goto yy1052; + goto yy53; } yy1070: YYDEBUG(1070, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1072; - goto yy70; -yy1071: - YYDEBUG(1071, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '6') goto yy1072; - if(yych <= '9') goto yy79; - goto yy70; -yy1072: - YYDEBUG(1072, *YYCURSOR); - yyaccept = 15; + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'X'){ - if(yych <= 'G'){ - if(yych <= 'C'){ - if(yych == ' ') goto yy70; - goto yy1073; - } else { - if(yych == 'E') goto yy1073; - if(yych <= 'F') goto yy70; - goto yy1073; - } + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + if(yych <= '0') goto yy1052; + goto yy1073; } else { - if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; - goto yy1073; - } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; - goto yy1073; - } + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'l'){ - if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; - goto yy1073; - } else { - if(yych == 'g') goto yy1073; - if(yych <= 'h') goto yy70; - goto yy1073; - } + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'v'){ - if(yych <= 'm') goto yy70; - if(yych <= 'r') goto yy1073; - if(yych <= 't') goto yy70; - goto yy1073; - } else { - if(yych == 'x') goto yy1073; - if(yych <= 'y') goto yy70; - goto yy1073; - } + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } -yy1073: - YYDEBUG(1073, *YYCURSOR); - -{ - DEBUG_OUTPUT("pgydotd"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = timelib_get_nr((char **) &ptr, 3); - s->time->m = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_YEARDAY; - } -yy1074: - YYDEBUG(1074, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1072; - goto yy70; -yy1075: - YYDEBUG(1075, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy70; - if(yych >= '1') goto yy1077; - goto yy1076; - } else { - if(yych <= '3') goto yy1078; - if(yych <= '9') goto yy1072; - goto yy70; - } -yy1076: - YYDEBUG(1076, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy79; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1079; - default: goto yy1073; - } -yy1077: - YYDEBUG(1077, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1079; - default: goto yy1073; - } -yy1078: - YYDEBUG(1078, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': goto yy1079; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - default: goto yy1073; - } -yy1079: - YYDEBUG(1079, *YYCURSOR); - yyaccept = 16; +yy1071: + YYDEBUG(1071, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': goto yy1081; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - case 't': goto yy1082; - default: goto yy1080; - } -yy1080: - YYDEBUG(1080, *YYCURSOR); - -{ - DEBUG_OUTPUT("datenocolon"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_DEINIT; - return TIMELIB_DATE_NOCOLON; - } -yy1081: - YYDEBUG(1081, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1098; - goto yy1099; + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + goto yy1073; + } else { + if(yych == 'T') goto yy1057; + goto yy775; + } + } else { + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; + } else { + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; + } + } +yy1072: + YYDEBUG(1072, *YYCURSOR); + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy775; + goto yy1073; } else { - if(yych <= '9') goto yy1100; - if(yych <= 'G') goto yy56; - goto yy81; + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'g'){ - if(yych == 'U') goto yy82; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'h') goto yy81; - if(yych == 'u') goto yy82; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } -yy1082: - YYDEBUG(1082, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '2') goto yy1084; - goto yy1083; - } else { - if(yych <= '9') goto yy1085; - if(yych <= 'G') goto yy56; - goto yy81; - } +yy1073: + YYDEBUG(1073, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych == 'T') goto yy1074; + if(yych <= 'm') goto yy1024; + goto yy1054; } else { - if(yych <= 'g'){ - if(yych == 'U') goto yy82; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1055; } else { - if(yych <= 'h') goto yy81; - if(yych == 'u') goto yy82; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy1024; } } +yy1074: + YYDEBUG(1074, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1075; + if(yych <= '2') goto yy1076; + if(yych <= '9') goto yy1060; + goto yy53; +yy1075: + YYDEBUG(1075, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1077; + if(yych <= ':') goto yy1061; + goto yy53; +yy1076: + YYDEBUG(1076, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy1077; + if(yych == ':') goto yy1061; + goto yy53; +yy1077: + YYDEBUG(1077, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy1078; +yy1078: + YYDEBUG(1078, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1079; + if(yych <= '9') goto yy1063; + goto yy53; +yy1079: + YYDEBUG(1079, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1080; + if(yych <= ':') goto yy1064; + goto yy53; +yy1080: + YYDEBUG(1080, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy1081; +yy1081: + YYDEBUG(1081, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1082; + if(yych <= '6') goto yy1083; + if(yych <= '9') goto yy932; + goto yy53; +yy1082: + YYDEBUG(1082, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1084; + goto yy933; yy1083: YYDEBUG(1083, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1092; - if(yych <= '9') goto yy1085; - goto yy56; + if(yych != '0') goto yy933; + goto yy1084; yy1084: YYDEBUG(1084, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1092; - if(yych <= '5') goto yy1086; - goto yy56; + yyaccept = 19; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != '.') goto yy933; + goto yy1085; yy1085: YYDEBUG(1085, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy1086; yy1086: YYDEBUG(1086, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + yyaccept = 19; + YYMARKER = ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); + yych = *YYCURSOR; goto yy1087; yy1087: YYDEBUG(1087, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1088; - if(yych <= '6') goto yy1089; - goto yy56; + if(yych <= ','){ + if(yych != '+') goto yy933; + goto yy1088; + } else { + if(yych <= '-') goto yy1088; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1086; + goto yy933; + } yy1088: YYDEBUG(1088, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1089; + if(yych <= '2') goto yy1090; + if(yych <= '9') goto yy1091; + goto yy53; yy1089: YYDEBUG(1089, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy1090; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1091; + if(yych <= ':') goto yy1092; + goto yy933; yy1090: YYDEBUG(1090, *YYCURSOR); - ++YYCURSOR; - goto yy1091; + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy933; + if(yych >= '4') goto yy1093; + goto yy1091; + } else { + if(yych <= '9') goto yy932; + if(yych <= ':') goto yy1092; + goto yy933; + } yy1091: YYDEBUG(1091, *YYCURSOR); - -{ - int tz_not_found; - DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 9); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_XMLRPC_SOAP; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '5') goto yy1093; + if(yych <= '9') goto yy932; + if(yych >= ';') goto yy933; + goto yy1092; yy1092: YYDEBUG(1092, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; + if(yych <= '/') goto yy933; if(yych <= '5') goto yy1093; - if(yych <= '9') goto yy1087; - goto yy56; + if(yych <= '9') goto yy932; + goto yy933; yy1093: YYDEBUG(1093, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1094; - if(yych <= '6') goto yy1095; - if(yych <= '9') goto yy1087; - goto yy56; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy1094: YYDEBUG(1094, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1096; - if(yych <= '6') goto yy1097; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych == 'C') goto yy1095; + if(yych != 'c') goto yy53; + goto yy1095; yy1095: YYDEBUG(1095, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1096; - if(yych <= '5') goto yy1088; - if(yych <= '6') goto yy1089; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy954; + if(yych == 'e') goto yy954; + goto yy889; + } yy1096: YYDEBUG(1096, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '9') goto yy1090; - goto yy1091; + if(yych == 'V') goto yy1097; + if(yych != 'v') goto yy53; + goto yy1097; yy1097: YYDEBUG(1097, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy1091; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy961; + if(yych == 'e') goto yy961; + goto yy889; + } yy1098: YYDEBUG(1098, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1107; - if(yych <= '9') goto yy1100; - if(yych <= ':') goto yy1101; - goto yy56; + if(yych == 'T') goto yy1099; + if(yych != 't') goto yy53; + goto yy1099; yy1099: YYDEBUG(1099, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '5'){ - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1107; - goto yy1086; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych == '-') goto yy863; + goto yy889; } else { - if(yych == ':') goto yy1101; - goto yy56; + if(yych <= 'O') goto yy967; + if(yych == 'o') goto yy967; + goto yy889; } yy1100: YYDEBUG(1100, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1086; - if(yych != ':') goto yy56; + if(yych == 'P') goto yy1101; + if(yych != 'p') goto yy53; goto yy1101; yy1101: YYDEBUG(1101, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; - goto yy1102; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'T') goto yy1102; + if(yych != 't') goto yy889; + goto yy1102; + } yy1102: YYDEBUG(1102, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1103; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy973; + if(yych == 'e') goto yy973; + goto yy889; + } yy1103: YYDEBUG(1103, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1104; + if(yych == 'G') goto yy1106; + if(yych == 'g') goto yy1106; + goto yy53; yy1104: YYDEBUG(1104, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1105; - if(yych <= '6') goto yy1106; - goto yy56; + if(yych == 'R') goto yy1105; + if(yych != 'r') goto yy53; + goto yy1105; yy1105: YYDEBUG(1105, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'I') goto yy980; + if(yych == 'i') goto yy980; + goto yy889; + } yy1106: YYDEBUG(1106, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'U') goto yy982; + if(yych == 'u') goto yy982; + goto yy889; + } yy1107: YYDEBUG(1107, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1093; - if(yych <= '9') goto yy1087; - if(yych <= ':') goto yy1101; - goto yy56; + if(yych <= 'Y'){ + if(yych == 'R') goto yy1108; + if(yych <= 'X') goto yy53; + goto yy1109; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy1108; + } else { + if(yych == 'y') goto yy1109; + goto yy53; + } + } yy1108: YYDEBUG(1108, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy79; - if(yych <= '9') goto yy1072; - goto yy70; -yy1109: - YYDEBUG(1109, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1076; - goto yy1077; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'B'){ + if(yych == '-') goto yy863; + goto yy889; } else { - if(yych <= '3') goto yy1078; - if(yych <= '9') goto yy1072; - goto yy70; + if(yych <= 'C') goto yy986; + if(yych == 'c') goto yy986; + goto yy889; } +yy1109: + YYDEBUG(1109, *YYCURSOR); + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '-') goto yy863; + goto yy889; yy1110: YYDEBUG(1110, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1111; - if(yych != 'c') goto yy56; + if(yych == 'B') goto yy1111; + if(yych != 'b') goto yy53; goto yy1111; yy1111: YYDEBUG(1111, *YYCURSOR); yyaccept = 17; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1112; - if(yych != 'e') goto yy1047; - goto yy1112; + if(yych <= 'Q'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'R') goto yy989; + if(yych == 'r') goto yy989; + goto yy889; + } yy1112: YYDEBUG(1112, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1113; - if(yych != 'm') goto yy56; - goto yy1113; + if(yych <= 'N'){ + if(yych == 'L') goto yy1116; + if(yych <= 'M') goto yy53; + goto yy1115; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy1116; + } else { + if(yych == 'n') goto yy1115; + goto yy53; + } + } yy1113: YYDEBUG(1113, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1114; - if(yych != 'b') goto yy56; + if(yych == 'N') goto yy1114; + if(yych != 'n') goto yy53; goto yy1114; yy1114: YYDEBUG(1114, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1115; - if(yych != 'e') goto yy56; - goto yy1115; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'U') goto yy996; + if(yych == 'u') goto yy996; + goto yy889; + } yy1115: YYDEBUG(1115, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych != 'r') goto yy56; - goto yy1116; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy958; + if(yych == 'e') goto yy958; + goto yy889; + } yy1116: YYDEBUG(1116, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1047; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'X'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy889; + } yy1117: YYDEBUG(1117, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy1118; - if(yych != 'v') goto yy56; - goto yy1118; + if(yych <= 'T'){ + if(yych <= '-') goto yy617; + if(yych <= '.') goto yy845; + if(yych <= '/') goto yy844; + goto yy617; + } else { + if(yych <= 'U') goto yy74; + if(yych == 'u') goto yy74; + goto yy617; + } yy1118: YYDEBUG(1118, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1119; - if(yych != 'e') goto yy1047; - goto yy1119; + yych = *++YYCURSOR; + if(yych <= 'P'){ + if(yych == 'C') goto yy121; + if(yych <= 'O') goto yy53; + goto yy709; + } else { + if(yych <= 'c'){ + if(yych <= 'b') goto yy53; + goto yy121; + } else { + if(yych == 'p') goto yy709; + goto yy53; + } + } yy1119: YYDEBUG(1119, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1120; - if(yych != 'm') goto yy56; - goto yy1120; + if(yych <= 'm'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy845; + } else { + if(yych <= '/') goto yy844; + if(yych <= '9') goto yy851; + goto yy1121; + } + } else { + if(yych <= 'r'){ + if(yych <= 'n') goto yy612; + if(yych <= 'q') goto yy1121; + goto yy613; + } else { + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1120: YYDEBUG(1120, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1121; - if(yych != 'b') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; goto yy1121; yy1121: YYDEBUG(1121, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1122; - if(yych != 'e') goto yy56; - goto yy1122; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy1120; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy699; + case 'D': case 'd': goto yy608; + case 'F': case 'f': goto yy609; + case 'H': case 'h': goto yy60; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy607; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'S': case 's': goto yy605; + case 'T': case 't': goto yy65; + case 'V': goto yy621; + case 'W': case 'w': goto yy62; + case 'X': goto yy622; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } yy1122: YYDEBUG(1122, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy1123; + } else { + if(yych <= '/') goto yy844; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy1124; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy1121; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1123: YYDEBUG(1123, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1124; - if(yych != 't') goto yy56; - goto yy1124; + if(yych <= '1'){ + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy1147; + goto yy1148; + } else { + if(yych <= '5') goto yy1149; + if(yych <= '9') goto yy1150; + goto yy617; + } yy1124: YYDEBUG(1124, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'O') goto yy1125; - if(yych != 'o') goto yy1047; - goto yy1125; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1142; + if(yych <= '9') goto yy1143; + goto yy53; yy1125: YYDEBUG(1125, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1126; - if(yych != 'b') goto yy56; + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych >= ':') goto yy57; goto yy1126; yy1126: YYDEBUG(1126, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1127; - if(yych != 'e') goto yy56; - goto yy1127; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': case 'A': case 'D': case 'F': case 'H': + case 'I': + case 'J': case 'M': + case 'N': + case 'O': case 'S': + case 'T': case 'V': case 'X': + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': + case 'n': + case 'o': case 's': + case 't': case 'w': case 'y': goto yy884; + case '-': goto yy881; + case '.': goto yy887; + case '/': goto yy882; + case '0': goto yy1128; + case '1': goto yy1129; + case '2': goto yy1130; + case '3': goto yy1131; + case '4': + case '5': goto yy1132; + case '6': goto yy1133; + case '7': + case '8': + case '9': goto yy51; + case 'W': goto yy904; + default: goto yy1127; + } yy1127: YYDEBUG(1127, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + +{ + DEBUG_OUTPUT("gnunocolon"); + TIMELIB_INIT; + switch (s->time->have_time) { + case 0: + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = 0; + break; + case 1: + s->time->y = timelib_get_nr((char **) &ptr, 4); + break; + default: + TIMELIB_DEINIT; + return TIMELIB_ERROR; + } + s->time->have_time++; + TIMELIB_DEINIT; + return TIMELIB_GNU_NOCOLON; + } yy1128: YYDEBUG(1128, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'P'){ - if(yych == 'C') goto yy137; - if(yych <= 'O') goto yy56; - goto yy1129; - } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy137; - } else { - if(yych != 'p') goto yy56; - goto yy1129; - } - } + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy1140; + if(yych <= '9') goto yy1141; + goto yy57; yy1129: YYDEBUG(1129, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1130; - if(yych != 't') goto yy1047; - goto yy1130; + if(yych <= '/') goto yy57; + if(yych <= '2') goto yy1139; + if(yych <= '9') goto yy1138; + goto yy57; yy1130: YYDEBUG(1130, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1131; - if(yych != 'e') goto yy1047; - goto yy1131; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy1138; + goto yy57; yy1131: YYDEBUG(1131, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1132; - if(yych != 'm') goto yy56; - goto yy1132; + if(yych <= '/') goto yy57; + if(yych <= '5') goto yy1136; + if(yych <= '6') goto yy1137; + if(yych <= '9') goto yy1134; + goto yy57; yy1132: YYDEBUG(1132, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1133; - if(yych != 'b') goto yy56; - goto yy1133; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy1134; + goto yy57; yy1133: YYDEBUG(1133, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1134; - if(yych != 'e') goto yy56; - goto yy1134; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy1134; + if(yych <= '9') goto yy51; + goto yy57; yy1134: YYDEBUG(1134, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + if(yych <= 'X'){ + if(yych <= 'G'){ + if(yych <= 'C'){ + if(yych == ' ') goto yy57; + goto yy1135; + } else { + if(yych == 'E') goto yy1135; + if(yych <= 'F') goto yy57; + goto yy1135; + } + } else { + if(yych <= 'R'){ + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; + goto yy1135; + } else { + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; + goto yy1135; + } + } + } else { + if(yych <= 'l'){ + if(yych <= 'e'){ + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; + goto yy1135; + } else { + if(yych == 'g') goto yy1135; + if(yych <= 'h') goto yy57; + goto yy1135; + } + } else { + if(yych <= 'v'){ + if(yych <= 'm') goto yy57; + if(yych <= 'r') goto yy1135; + if(yych <= 't') goto yy57; + goto yy1135; + } else { + if(yych == 'x') goto yy1135; + if(yych <= 'y') goto yy57; + goto yy1135; + } + } + } yy1135: YYDEBUG(1135, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy1139; - if(yych == 'g') goto yy1139; - goto yy56; + +{ + int tz_not_found; + DEBUG_OUTPUT("iso8601nocolon"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + } + TIMELIB_DEINIT; + return TIMELIB_ISO_NOCOLON; + } yy1136: YYDEBUG(1136, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1137; - if(yych != 'r') goto yy56; - goto yy1137; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1137: YYDEBUG(1137, *YYCURSOR); - yyaccept = 17; + yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'I') goto yy1138; - if(yych != 'i') goto yy1047; - goto yy1138; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': goto yy914; + case '7': + case '8': + case '9': goto yy51; + default: goto yy1135; + } yy1138: YYDEBUG(1138, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'L') goto yy1116; - if(yych == 'l') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1139: YYDEBUG(1139, *YYCURSOR); - yyaccept = 17; + yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'U') goto yy1140; - if(yych != 'u') goto yy1047; - goto yy1140; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy918; + case '1': + case '2': goto yy919; + case '3': goto yy920; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1140: YYDEBUG(1140, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'S') goto yy1141; - if(yych != 's') goto yy56; - goto yy1141; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy51; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1141: YYDEBUG(1141, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy1116; - if(yych == 't') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy918; + case '1': + case '2': goto yy919; + case '3': goto yy920; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1142: YYDEBUG(1142, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1143; - if(yych <= 'X') goto yy56; - goto yy1116; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1144; + goto yy634; } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1143; - } else { - if(yych == 'y') goto yy1116; - goto yy56; - } + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; } yy1143: YYDEBUG(1143, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'C') goto yy1144; - if(yych != 'c') goto yy1047; + if(yych == '.') goto yy1144; + if(yych != ':') goto yy634; goto yy1144; yy1144: YYDEBUG(1144, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'H') goto yy1116; - if(yych == 'h') goto yy1116; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1145; + if(yych <= '6') goto yy1146; + if(yych <= '9') goto yy639; + goto yy53; yy1145: YYDEBUG(1145, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1146; - if(yych != 'b') goto yy56; - goto yy1146; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy639; + goto yy634; yy1146: YYDEBUG(1146, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'R') goto yy1147; - if(yych != 'r') goto yy1047; - goto yy1147; + if(yych == '.') goto yy640; + if(yych == '0') goto yy639; + goto yy634; yy1147: YYDEBUG(1147, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'U') goto yy1148; - if(yych != 'u') goto yy56; - goto yy1148; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '9') goto yy1150; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1148: YYDEBUG(1148, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1149; - if(yych != 'a') goto yy56; - goto yy1149; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '2') goto yy1150; + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1149: YYDEBUG(1149, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1150; - if(yych != 'r') goto yy56; - goto yy1150; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1150: YYDEBUG(1150, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy56; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy1151; + if(yych == ':') goto yy1144; + goto yy634; yy1151: YYDEBUG(1151, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1158; - if(yych <= 'M') goto yy56; - goto yy1157; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy1158; - } else { - if(yych == 'n') goto yy1157; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1152; + if(yych <= '6') goto yy1153; + if(yych <= '9') goto yy727; + goto yy53; yy1152: YYDEBUG(1152, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'N') goto yy1153; - if(yych != 'n') goto yy56; - goto yy1153; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy1154; + goto yy634; yy1153: YYDEBUG(1153, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'U') goto yy1154; - if(yych != 'u') goto yy1047; - goto yy1154; + if(yych <= '/'){ + if(yych == '.') goto yy640; + goto yy634; + } else { + if(yych <= '0') goto yy1154; + if(yych <= '9') goto yy728; + goto yy634; + } yy1154: YYDEBUG(1154, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1155; - if(yych != 'a') goto yy56; - goto yy1155; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy730; + goto yy634; yy1155: YYDEBUG(1155, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1156; - if(yych != 'r') goto yy56; - goto yy1156; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy604; + if(yych <= '-') goto yy615; + goto yy618; + } else { + if(yych <= '/') goto yy614; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy627; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy604; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy604; + } + } yy1156: YYDEBUG(1156, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy56; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy1123; + } else { + if(yych <= '/') goto yy614; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy1124; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy1121; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1157: YYDEBUG(1157, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1116; - if(yych == 'e') goto yy1116; - goto yy1047; + if(yych <= '0') goto yy53; + if(yych >= ':') goto yy53; + goto yy1158; yy1158: YYDEBUG(1158, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy1047; + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy1159; yy1159: YYDEBUG(1159, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= '/') goto yy1160; + if(yych <= '9') goto yy1158; + goto yy1160; yy1160: YYDEBUG(1160, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'I') goto yy1047; - goto yy1161; + +{ + timelib_ull i; + + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + TIMELIB_UNHAVE_DATE(); + TIMELIB_UNHAVE_TIME(); + + i = timelib_get_unsigned_nr((char **) &ptr, 24); + s->time->y = 1970; + s->time->m = 1; + s->time->d = 1; + s->time->h = s->time->i = s->time->s = 0; + s->time->f = 0.0; + s->time->relative.s += i; + s->time->is_localtime = 1; + s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; + s->time->z = 0; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } yy1161: YYDEBUG(1161, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1192; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1192; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1162: YYDEBUG(1162, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= 'U'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'I') goto yy1186; + if(yych <= 'T') goto yy134; + goto yy1185; + } + } else { + if(yych <= 'i'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'h') goto yy134; + goto yy1186; + } else { + if(yych == 'u') goto yy1185; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1163: YYDEBUG(1163, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1176; - if(yych <= '9') goto yy1175; - goto yy56; + if(yych <= 'M'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'D') goto yy1174; + if(yych <= 'L') goto yy134; + goto yy1175; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'c') goto yy134; + goto yy1174; + } else { + if(yych == 'm') goto yy1175; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1164: YYDEBUG(1164, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1174; - goto yy56; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1170; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'e') goto yy1170; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1165: YYDEBUG(1165, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1172; - if(yych <= '6') goto yy1171; - goto yy56; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1166; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'e') goto yy1166; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1166: YYDEBUG(1166, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1145; - if(yych == 'e') goto yy1145; - goto yy56; + if(yych <= 'L'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'K') goto yy135; + goto yy1167; + } + } else { + if(yych <= 'k'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'l') goto yy1167; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1167: YYDEBUG(1167, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1142; - if(yych == 'a') goto yy1142; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'F') goto yy1168; + if(yych != 'f') goto yy3; + goto yy1168; + } yy1168: YYDEBUG(1168, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1170; - if(yych == 'e') goto yy1170; - goto yy56; + if(yych == 'T') goto yy1169; + if(yych != 't') goto yy53; + goto yy1169; yy1169: YYDEBUG(1169, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1110; - if(yych == 'e') goto yy1110; - goto yy56; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; yy1170: YYDEBUG(1170, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy1129; - if(yych == 'p') goto yy1129; - goto yy56; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'R') goto yy135; + goto yy1171; + } + } else { + if(yych <= 'r'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 's') goto yy1171; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1171: YYDEBUG(1171, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '6') goto yy1173; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'D') goto yy1172; + if(yych != 'd') goto yy3; + goto yy1172; + } yy1172: YYDEBUG(1172, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'A') goto yy1173; + if(yych != 'a') goto yy53; goto yy1173; yy1173: YYDEBUG(1173, *YYCURSOR); yych = *++YYCURSOR; - goto yy1073; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1174: YYDEBUG(1174, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1182; + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + goto yy3; + } else { + if(yych <= 'a') goto yy1182; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1175: YYDEBUG(1175, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + if(yych <= 'O'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy1176; + } + } else { + if(yych <= 'n'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'o') goto yy1176; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1176: YYDEBUG(1176, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Q'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'R') goto yy1177; + if(yych != 'r') goto yy3; + goto yy1177; + } yy1177: YYDEBUG(1177, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '.') goto yy56; - if(yych <= '/') goto yy1180; - if(yych <= '0') goto yy1179; - if(yych <= '9') goto yy1185; - goto yy56; + if(yych == 'R') goto yy1178; + if(yych != 'r') goto yy53; + goto yy1178; yy1178: YYDEBUG(1178, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '.') goto yy56; - if(yych <= '/') goto yy1180; - if(yych <= '2') goto yy1185; - goto yy56; + if(yych == 'O') goto yy1179; + if(yych != 'o') goto yy53; + goto yy1179; yy1179: YYDEBUG(1179, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; + if(yych == 'W') goto yy1180; + if(yych != 'w') goto yy53; goto yy1180; yy1180: YYDEBUG(1180, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy1181; - if(yych <= '3') goto yy1183; - if(yych <= '9') goto yy1184; - goto yy56; + ++YYCURSOR; + goto yy1181; yy1181: YYDEBUG(1181, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy1182; - if(yych <= '9') goto yy1184; - goto yy1182; -yy1182: - YYDEBUG(1182, *YYCURSOR); { - DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash"); + DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_HAVE_RELATIVE(); + TIMELIB_UNHAVE_TIME(); + + s->time->relative.d = 1; TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; + return TIMELIB_RELATIVE; + } +yy1182: + YYDEBUG(1182, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'X'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Y') goto yy1183; + if(yych != 'y') goto yy3; + goto yy1183; } yy1183: YYDEBUG(1183, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych >= '2') goto yy1182; + ++YYCURSOR; goto yy1184; yy1184: YYDEBUG(1184, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1182; + +{ + DEBUG_OUTPUT("midnight | today"); + TIMELIB_INIT; + TIMELIB_UNHAVE_TIME(); + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } yy1185: YYDEBUG(1185, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; - goto yy1186; + if(yych <= 'R'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'Q') goto yy135; + goto yy1188; + } + } else { + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 'r') goto yy1188; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1186: YYDEBUG(1186, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '1') goto yy1188; - goto yy1187; + if(yych <= 'S'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Q') goto yy135; + if(yych >= 'S') goto yy317; + goto yy1187; + } } else { - if(yych <= '3') goto yy1189; - if(yych <= '9') goto yy1184; - goto yy56; + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'r') goto yy1187; + if(yych <= 's') goto yy317; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1187: YYDEBUG(1187, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych <= '0') goto yy1184; - if(yych <= '9') goto yy1190; - goto yy1182; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'D') goto yy159; + if(yych == 'd') goto yy159; + goto yy3; + } yy1188: YYDEBUG(1188, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych <= '9') goto yy1190; - goto yy1182; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'S') goto yy1189; + if(yych != 's') goto yy3; + goto yy1189; + } yy1189: YYDEBUG(1189, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych >= '2') goto yy1182; + if(yych == 'D') goto yy1190; + if(yych != 'd') goto yy53; goto yy1190; yy1190: YYDEBUG(1190, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '/') goto yy1184; - goto yy1182; + if(yych == 'A') goto yy1191; + if(yych != 'a') goto yy53; + goto yy1191; yy1191: YYDEBUG(1191, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1255; - if(yych <= 'T') goto yy56; - goto yy1254; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1255; - } else { - if(yych == 'u') goto yy1254; - goto yy56; - } - } + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1192: YYDEBUG(1192, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1252; - if(yych == 'e') goto yy1252; - goto yy56; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1193; + } + } else { + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy1193; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1193: YYDEBUG(1193, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1249; - if(yych == 'a') goto yy1249; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; + } yy1194: YYDEBUG(1194, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1246; - if(yych <= 'T') goto yy56; - goto yy1245; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1192; + } } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1246; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'u') goto yy1245; - goto yy56; + if(yych == 'n') goto yy1223; + if(yych <= 'z') goto yy137; + goto yy3; } } yy1195: YYDEBUG(1195, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1242; - if(yych == 'e') goto yy1242; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'H'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'I') goto yy1186; + if(yych <= 'T') goto yy134; + goto yy1185; + } + } + } else { + if(yych <= 'h'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 't'){ + if(yych <= 'i') goto yy1217; + goto yy137; + } else { + if(yych <= 'u') goto yy1216; + if(yych <= 'z') goto yy137; + goto yy3; + } + } + } yy1196: YYDEBUG(1196, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy1240; - if(yych == 'c') goto yy1240; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'C'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'D') goto yy1174; + if(yych <= 'L') goto yy134; + goto yy1175; + } + } + } else { + if(yych <= 'c'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'l'){ + if(yych <= 'd') goto yy1207; + goto yy137; + } else { + if(yych <= 'm') goto yy1208; + if(yych <= 'z') goto yy137; + goto yy3; + } + } + } yy1197: YYDEBUG(1197, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'O') goto yy1238; - if(yych == 'o') goto yy1238; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1170; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy1203; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy1198: YYDEBUG(1198, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1236; - if(yych == 'e') goto yy1236; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1166; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy1199; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy1199: YYDEBUG(1199, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych == '-') goto yy947; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'K') goto yy135; + goto yy1167; + } } else { - if(yych <= '0') goto yy910; - if(yych <= '9') goto yy1201; - goto yy56; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'l') goto yy1200; + if(yych <= 'z') goto yy142; + goto yy3; + } } yy1200: YYDEBUG(1200, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy1201; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'F'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'E') goto yy3; + goto yy1168; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'f') goto yy1201; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1201: YYDEBUG(1201, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '-') goto yy56; + if(yych == 'T') goto yy1169; + if(yych != 't') goto yy144; goto yy1202; yy1202: YYDEBUG(1202, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '1') goto yy1204; - goto yy1203; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'H') goto yy159; + goto yy53; + } } else { - if(yych <= '3') goto yy1205; - if(yych <= '9') goto yy951; - goto yy56; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy1203: YYDEBUG(1203, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych <= '0') goto yy951; - if(yych <= '9') goto yy1206; - goto yy949; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'R') goto yy135; + goto yy1171; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 's') goto yy1204; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1204: YYDEBUG(1204, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych <= '9') goto yy1206; - goto yy949; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'C') goto yy3; + goto yy1172; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy1205; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1205: YYDEBUG(1205, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych >= '2') goto yy949; + if(yych == 'A') goto yy1173; + if(yych != 'a') goto yy144; goto yy1206; yy1206: YYDEBUG(1206, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'T') goto yy1182; - goto yy1207; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; yy1207: YYDEBUG(1207, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1208; - if(yych <= '2') goto yy1209; - if(yych <= '9') goto yy1210; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy1182; + } + } else { + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych <= 'a') goto yy1214; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1208: YYDEBUG(1208, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1217; - if(yych <= ':') goto yy1211; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy1176; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'o') goto yy1209; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1209: YYDEBUG(1209, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1217; - if(yych == ':') goto yy1211; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'Q') goto yy3; + goto yy1177; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'r') goto yy1210; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1210: YYDEBUG(1210, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'R') goto yy1178; + if(yych != 'r') goto yy144; goto yy1211; yy1211: YYDEBUG(1211, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych == 'O') goto yy1179; + if(yych != 'o') goto yy144; goto yy1212; yy1212: YYDEBUG(1212, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'W') goto yy1180; + if(yych != 'w') goto yy144; goto yy1213; yy1213: YYDEBUG(1213, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1214; + yyaccept = 22; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1181; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1181; + if(yych <= 'z') goto yy143; + goto yy1181; + } yy1214: YYDEBUG(1214, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1215; - if(yych <= '6') goto yy1216; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Y'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'X') goto yy3; + goto yy1183; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'y') goto yy1215; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1215: YYDEBUG(1215, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + yyaccept = 23; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1184; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1184; + if(yych <= 'z') goto yy143; + goto yy1184; + } yy1216: YYDEBUG(1216, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy56; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'Q') goto yy135; + goto yy1188; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 'r') goto yy1219; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1217: YYDEBUG(1217, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1218; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; + if(yych <= 'R') goto yy1187; + goto yy317; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy142; + goto yy1218; + } else { + if(yych <= 's') goto yy320; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } yy1218: YYDEBUG(1218, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; - goto yy1219; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'C') goto yy3; + goto yy159; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1219: YYDEBUG(1219, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1220; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'R') goto yy3; + goto yy1189; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 's') goto yy1220; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1220: YYDEBUG(1220, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'D') goto yy1190; + if(yych != 'd') goto yy144; goto yy1221; yy1221: YYDEBUG(1221, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1222; - if(yych <= '6') goto yy1223; - goto yy56; + if(yych == 'A') goto yy1191; + if(yych != 'a') goto yy144; + goto yy1222; yy1222: YYDEBUG(1222, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1224; - goto yy56; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; yy1223: YYDEBUG(1223, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy1224; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1193; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy1224; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1224: YYDEBUG(1224, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '.') goto yy1091; - goto yy1225; + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1225: YYDEBUG(1225, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1226; + if(yych <= 'Y'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'R') goto yy1236; + if(yych <= 'X') goto yy134; + goto yy1237; + } + } else { + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'q') goto yy134; + goto yy1236; + } else { + if(yych == 'y') goto yy1237; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1226: YYDEBUG(1226, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; - goto yy1227; + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy1231; + } + } else { + if(yych <= 'c'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'd') goto yy1231; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1227: YYDEBUG(1227, *YYCURSOR); - if(yych <= ','){ - if(yych != '+') goto yy56; - goto yy1228; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1228; + } } else { - if(yych <= '-') goto yy1228; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1226; - goto yy56; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1228; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy1228: YYDEBUG(1228, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1229; - if(yych <= '2') goto yy1230; - if(yych <= '9') goto yy1231; - goto yy56; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy1229; + } + } else { + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 'd') goto yy1229; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1229: YYDEBUG(1229, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1234; - if(yych <= '9') goto yy1231; - if(yych <= ':') goto yy1232; - goto yy1091; -yy1230: - YYDEBUG(1230, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy1091; - if(yych <= '3') goto yy1234; - goto yy1233; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == ':') goto yy1232; - goto yy1091; + if(yych <= 'A') goto yy1230; + if(yych != 'a') goto yy3; + goto yy1230; } +yy1230: + YYDEBUG(1230, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1231: YYDEBUG(1231, *YYCURSOR); - yyaccept = 19; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1233; - if(yych != ':') goto yy1091; - goto yy1232; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1232; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'n') goto yy1232; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1232: YYDEBUG(1232, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy1091; - if(yych >= '6') goto yy1091; - goto yy1233; + if(yych <= 'H'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'I') goto yy1233; + if(yych != 'i') goto yy3; + goto yy1233; + } yy1233: YYDEBUG(1233, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych == 'G') goto yy1234; + if(yych != 'g') goto yy53; + goto yy1234; yy1234: YYDEBUG(1234, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1235; - if(yych <= '9') goto yy1090; - if(yych <= ':') goto yy1232; - goto yy1091; + if(yych == 'H') goto yy1235; + if(yych != 'h') goto yy53; + goto yy1235; yy1235: YYDEBUG(1235, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '9') goto yy1090; - goto yy1091; + if(yych == 'T') goto yy1183; + if(yych == 't') goto yy1183; + goto yy53; yy1236: YYDEBUG(1236, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy1237; - if(yych != 'c') goto yy56; - goto yy1237; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } + } else { + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'C') goto yy1238; + goto yy135; + } else { + if(yych <= 'b'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'c') goto yy1238; + if(yych <= 'z') goto yy135; + goto yy3; + } + } + } yy1237: YYDEBUG(1237, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; + } else { + if(yych == '-') goto yy361; + goto yy359; + } + } else { + if(yych <= '@'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; + goto yy3; + } + } +yy1238: + YYDEBUG(1238, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'H') goto yy358; + if(yych == 'h') goto yy358; + goto yy3; + } +yy1239: + YYDEBUG(1239, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Y'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'Q'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'R') goto yy1236; + if(yych <= 'X') goto yy134; + goto yy1237; + } + } } else { - if(yych <= 'E') goto yy1112; - if(yych == 'e') goto yy1112; - goto yy1047; + if(yych <= 'q'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'x'){ + if(yych <= 'r') goto yy1250; + goto yy137; + } else { + if(yych <= 'y') goto yy1251; + if(yych <= 'z') goto yy137; + goto yy3; + } + } } -yy1238: - YYDEBUG(1238, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'V') goto yy1239; - if(yych != 'v') goto yy56; - goto yy1239; -yy1239: - YYDEBUG(1239, *YYCURSOR); - yyaccept = 17; +yy1240: + YYDEBUG(1240, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy1231; + } } else { - if(yych <= 'E') goto yy1119; - if(yych == 'e') goto yy1119; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy1245; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1240: - YYDEBUG(1240, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy1241; - if(yych != 't') goto yy56; - goto yy1241; yy1241: YYDEBUG(1241, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'N'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1228; + } } else { - if(yych <= 'O') goto yy1125; - if(yych == 'o') goto yy1125; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1242; + if(yych <= 'z') goto yy137; + goto yy3; + } } yy1242: YYDEBUG(1242, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'P') goto yy1243; - if(yych != 'p') goto yy56; - goto yy1243; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy1229; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 'd') goto yy1243; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1243: YYDEBUG(1243, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy1230; + } } else { - if(yych <= 'T') goto yy1244; - if(yych != 't') goto yy1047; - goto yy1244; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych <= 'a') goto yy1244; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy1244: YYDEBUG(1244, *YYCURSOR); - yyaccept = 17; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy1245: + YYDEBUG(1245, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1232; + } } else { - if(yych <= 'E') goto yy1131; - if(yych == 'e') goto yy1131; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1246; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1245: - YYDEBUG(1245, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy1248; - if(yych == 'g') goto yy1248; - goto yy56; yy1246: YYDEBUG(1246, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1247; - if(yych != 'r') goto yy56; - goto yy1247; -yy1247: - YYDEBUG(1247, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'H') goto yy3; + goto yy1233; + } } else { - if(yych <= 'I') goto yy1138; - if(yych == 'i') goto yy1138; - goto yy1047; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'i') goto yy1247; + if(yych <= 'z') goto yy143; + goto yy3; + } } +yy1247: + YYDEBUG(1247, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'G') goto yy1234; + if(yych != 'g') goto yy144; + goto yy1248; yy1248: YYDEBUG(1248, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych == '-') goto yy1021; - goto yy1047; - } else { - if(yych <= 'U') goto yy1140; - if(yych == 'u') goto yy1140; - goto yy1047; - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy1235; + if(yych != 'h') goto yy144; + goto yy1249; yy1249: YYDEBUG(1249, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1250; - if(yych <= 'X') goto yy56; - goto yy1251; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1250; - } else { - if(yych == 'y') goto yy1251; - goto yy56; - } - } + if(yych == 'T') goto yy1183; + if(yych == 't') goto yy1215; + goto yy144; yy1250: YYDEBUG(1250, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } } else { - if(yych <= 'C') goto yy1144; - if(yych == 'c') goto yy1144; - goto yy1047; + if(yych <= '_'){ + if(yych <= 'C'){ + if(yych <= 'B') goto yy135; + goto yy1238; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'b'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'c') goto yy1252; + if(yych <= 'z') goto yy142; + goto yy3; + } + } } yy1251: YYDEBUG(1251, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '/'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; + } else { + if(yych == '-') goto yy361; + if(yych <= '.') goto yy359; + goto yy138; + } + } else { + if(yych <= '^'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + if(yych <= 'Z') goto yy135; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1252: YYDEBUG(1252, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1253; - if(yych != 'b') goto yy56; - goto yy1253; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy358; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy457; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1253: YYDEBUG(1253, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Q'){ - if(yych == '-') goto yy1021; - goto yy1047; + yych = *++YYCURSOR; + if(yych <= 'W'){ + if(yych <= 'N'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'O') goto yy1261; + if(yych <= 'U') goto yy134; + if(yych <= 'V') goto yy1262; + goto yy1259; + } } else { - if(yych <= 'R') goto yy1147; - if(yych == 'r') goto yy1147; - goto yy1047; + if(yych <= 'o'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'n') goto yy134; + goto yy1261; + } else { + if(yych <= 'v'){ + if(yych <= 'u') goto yy134; + goto yy1262; + } else { + if(yych <= 'w') goto yy1259; + if(yych <= 'z') goto yy134; + goto yy3; + } + } } yy1254: YYDEBUG(1254, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1258; - if(yych <= 'M') goto yy56; - goto yy1257; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; + if(yych <= 'X'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; goto yy1258; + } + } else { + if(yych <= 'w'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych == 'n') goto yy1257; - goto yy56; + if(yych <= 'x') goto yy1258; + if(yych <= 'z') goto yy134; + goto yy3; } } yy1255: YYDEBUG(1255, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy1256; - if(yych != 'n') goto yy56; - goto yy1256; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1256; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1256; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1256: YYDEBUG(1256, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); + yych = *++YYCURSOR; if(yych <= 'T'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1257; + } } else { - if(yych <= 'U') goto yy1154; - if(yych == 'u') goto yy1154; - goto yy1047; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy1257; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1257: YYDEBUG(1257, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'E') goto yy1116; - if(yych == 'e') goto yy1116; - goto yy1047; + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; } yy1258: YYDEBUG(1258, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych == '-') goto yy1021; - goto yy1047; + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } } else { - if(yych <= 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy1047; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy317; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1259: YYDEBUG(1259, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'P'){ - if(yych == 'C') goto yy137; - if(yych <= 'O') goto yy56; - goto yy883; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '@'){ + if(yych == ')') goto yy132; + goto yy1260; } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy137; - } else { - if(yych == 'p') goto yy883; - goto yy56; - } + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy1260; + if(yych <= 'z') goto yy135; + goto yy1260; } yy1260: YYDEBUG(1260, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '.'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - goto yy1263; - } else { - if(yych <= '/') goto yy1264; - if(yych <= '9') goto yy1009; - goto yy1262; + +{ + DEBUG_OUTPUT("now"); + TIMELIB_INIT; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } yy1261: YYDEBUG(1261, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy1262; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1267; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'n') goto yy1267; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1262: YYDEBUG(1262, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy1261; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy873; - case 'D': case 'd': goto yy785; - case 'F': case 'f': goto yy786; - case 'H': case 'h': goto yy73; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy784; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'S': case 's': goto yy783; - case 'T': case 't': goto yy78; - case 'V': goto yy795; - case 'W': case 'w': goto yy75; - case 'X': goto yy796; - case 'Y': case 'y': goto yy77; - default: goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } + } else { + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'E') goto yy135; + goto yy1263; + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy1263; + if(yych <= 'z') goto yy135; + goto yy3; + } + } } yy1263: YYDEBUG(1263, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy1265; - if(yych <= '1') goto yy1266; - if(yych <= '9') goto yy1267; - goto yy791; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'M') goto yy1264; + if(yych != 'm') goto yy3; + goto yy1264; + } yy1264: YYDEBUG(1264, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'A': case 'a': goto yy959; - case 'D': case 'd': goto yy963; - case 'F': case 'f': goto yy957; - case 'J': case 'j': goto yy956; - case 'M': case 'm': goto yy958; - case 'N': case 'n': goto yy962; - case 'O': case 'o': goto yy961; - case 'S': case 's': goto yy960; - default: goto yy56; - } + if(yych == 'B') goto yy1265; + if(yych != 'b') goto yy53; + goto yy1265; yy1265: YYDEBUG(1265, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy1268; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1267; - goto yy56; + if(yych == 'E') goto yy1266; + if(yych != 'e') goto yy53; + goto yy1266; yy1266: YYDEBUG(1266, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy1268; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy1267; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; yy1267: YYDEBUG(1267, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != '.') goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) == ')') goto yy132; goto yy1268; yy1268: YYDEBUG(1268, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1269; -yy1269: - YYDEBUG(1269, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy903; - if(yych <= '9') goto yy902; - goto yy903; -yy1270: - YYDEBUG(1270, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - if(yych >= '/') goto yy1264; - goto yy1271; - } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy1272; - goto yy1262; - } -yy1271: - YYDEBUG(1271, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy1295; - goto yy1296; - } else { - if(yych <= '5') goto yy1297; - if(yych <= '9') goto yy1298; - goto yy791; - } -yy1272: - YYDEBUG(1272, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1290; - if(yych <= '9') goto yy1291; - goto yy56; -yy1273: - YYDEBUG(1273, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych >= ':') goto yy70; - goto yy1274; -yy1274: - YYDEBUG(1274, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': case 'A': case 'D': case 'F': case 'H': - case 'I': - case 'J': case 'M': - case 'N': - case 'O': case 'S': - case 'T': case 'V': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1042; - case '-': goto yy1039; - case '.': goto yy1045; - case '/': goto yy1040; - case '0': goto yy1276; - case '1': goto yy1277; - case '2': goto yy1278; - case '3': goto yy1279; - case '4': - case '5': goto yy1280; - case '6': goto yy1281; - case '7': - case '8': - case '9': goto yy79; - case 'W': goto yy1062; - default: goto yy1275; - } -yy1275: - YYDEBUG(1275, *YYCURSOR); - -{ - DEBUG_OUTPUT("gnunocolon"); - TIMELIB_INIT; - switch (s->time->have_time) { - case 0: - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = 0; - break; - case 1: - s->time->y = timelib_get_nr((char **) &ptr, 4); - break; - default: - TIMELIB_DEINIT; - return TIMELIB_ERROR; - } - s->time->have_time++; - TIMELIB_DEINIT; - return TIMELIB_GNU_NOCOLON; - } -yy1276: - YYDEBUG(1276, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1288; - if(yych <= '9') goto yy1289; - goto yy70; -yy1277: - YYDEBUG(1277, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '2') goto yy1287; - if(yych <= '9') goto yy1286; - goto yy70; -yy1278: - YYDEBUG(1278, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1286; - goto yy70; -yy1279: - YYDEBUG(1279, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '5') goto yy1284; - if(yych <= '6') goto yy1285; - if(yych <= '9') goto yy1282; - goto yy70; -yy1280: - YYDEBUG(1280, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1282; - goto yy70; -yy1281: - YYDEBUG(1281, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1282; - if(yych <= '9') goto yy79; - goto yy70; -yy1282: - YYDEBUG(1282, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'X'){ - if(yych <= 'G'){ - if(yych <= 'C'){ - if(yych == ' ') goto yy70; - goto yy1283; - } else { - if(yych == 'E') goto yy1283; - if(yych <= 'F') goto yy70; - goto yy1283; - } - } else { - if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; - goto yy1283; - } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; - goto yy1283; - } - } - } else { - if(yych <= 'l'){ - if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; - goto yy1283; - } else { - if(yych == 'g') goto yy1283; - if(yych <= 'h') goto yy70; - goto yy1283; - } - } else { - if(yych <= 'v'){ - if(yych <= 'm') goto yy70; - if(yych <= 'r') goto yy1283; - if(yych <= 't') goto yy70; - goto yy1283; - } else { - if(yych == 'x') goto yy1283; - if(yych <= 'y') goto yy70; - goto yy1283; - } - } - } -yy1283: - YYDEBUG(1283, *YYCURSOR); { - int tz_not_found; - DEBUG_OUTPUT("iso8601nocolon"); + DEBUG_OUTPUT("noon"); TIMELIB_INIT; + TIMELIB_UNHAVE_TIME(); TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_ISO_NOCOLON; - } -yy1284: - YYDEBUG(1284, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; - } -yy1285: - YYDEBUG(1285, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': goto yy1072; - case '7': - case '8': - case '9': goto yy79; - default: goto yy1283; + s->time->h = 12; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } -yy1286: - YYDEBUG(1286, *YYCURSOR); - yyaccept = 21; +yy1269: + YYDEBUG(1269, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'W'){ + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } + } else { + if(yych <= 'O'){ + if(yych <= 'N') goto yy134; + goto yy1261; + } else { + if(yych <= 'U') goto yy134; + if(yych <= 'V') goto yy1262; + goto yy1259; + } + } + } else { + if(yych <= 'n'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'v'){ + if(yych <= 'o') goto yy1276; + if(yych <= 'u') goto yy137; + goto yy1277; + } else { + if(yych <= 'w') goto yy1275; + if(yych <= 'z') goto yy137; + goto yy3; + } + } } -yy1287: - YYDEBUG(1287, *YYCURSOR); - yyaccept = 21; +yy1270: + YYDEBUG(1270, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy1076; - case '1': - case '2': goto yy1077; - case '3': goto yy1078; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'X'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; + goto yy1258; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'x') goto yy1274; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1288: - YYDEBUG(1288, *YYCURSOR); - yyaccept = 21; +yy1271: + YYDEBUG(1271, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy79; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1256; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1272; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1289: - YYDEBUG(1289, *YYCURSOR); - yyaccept = 21; +yy1272: + YYDEBUG(1272, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy1076; - case '1': - case '2': goto yy1077; - case '3': goto yy1078; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1257; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy1273; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1290: - YYDEBUG(1290, *YYCURSOR); - yyaccept = 11; +yy1273: + YYDEBUG(1273, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1292; - goto yy808; + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; + } } else { - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } } -yy1291: - YYDEBUG(1291, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy1292; - if(yych != ':') goto yy808; - goto yy1292; -yy1292: - YYDEBUG(1292, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1293; - if(yych <= '6') goto yy1294; - if(yych <= '9') goto yy813; - goto yy56; -yy1293: - YYDEBUG(1293, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy813; - goto yy808; -yy1294: - YYDEBUG(1294, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych == '0') goto yy813; - goto yy808; -yy1295: - YYDEBUG(1295, *YYCURSOR); - yyaccept = 11; +yy1274: + YYDEBUG(1274, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } } else { - if(yych <= '9') goto yy1298; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy320; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1296: - YYDEBUG(1296, *YYCURSOR); - yyaccept = 11; +yy1275: + YYDEBUG(1275, *YYCURSOR); + yyaccept = 24; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy1260; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy1260; + } } else { - if(yych <= '2') goto yy1298; - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy1260; + goto yy138; + } else { + if(yych <= '`') goto yy1260; + if(yych <= 'z') goto yy142; + goto yy1260; + } } -yy1297: - YYDEBUG(1297, *YYCURSOR); - yyaccept = 11; +yy1276: + YYDEBUG(1276, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1267; + } } else { - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1282; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1298: - YYDEBUG(1298, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy1299; - if(yych == ':') goto yy1292; - goto yy808; -yy1299: - YYDEBUG(1299, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1300; - if(yych <= '6') goto yy1301; - if(yych <= '9') goto yy901; - goto yy56; -yy1300: - YYDEBUG(1300, *YYCURSOR); - yyaccept = 11; +yy1277: + YYDEBUG(1277, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy1302; - goto yy808; -yy1301: - YYDEBUG(1301, *YYCURSOR); - yyaccept = 11; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } + } else { + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy1263; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy1278; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } +yy1278: + YYDEBUG(1278, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy814; - goto yy808; + if(yych <= 'M'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'L') goto yy3; + goto yy1264; + } } else { - if(yych <= '0') goto yy1302; - if(yych <= '9') goto yy902; - goto yy808; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'm') goto yy1279; + if(yych <= 'z') goto yy143; + goto yy3; + } } -yy1302: - YYDEBUG(1302, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy904; - goto yy808; -yy1303: - YYDEBUG(1303, *YYCURSOR); +yy1279: + YYDEBUG(1279, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych <= ',') goto yy782; - if(yych <= '-') goto yy789; - if(yych <= '.') goto yy792; - goto yy788; + if(yych == 'B') goto yy1265; + if(yych != 'b') goto yy144; + goto yy1280; +yy1280: + YYDEBUG(1280, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy1266; + if(yych != 'e') goto yy144; + goto yy1281; +yy1281: + YYDEBUG(1281, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'R') goto yy358; + goto yy53; + } } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy801; - goto yy782; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; + } } -yy1304: - YYDEBUG(1304, *YYCURSOR); - yych = *++YYCURSOR; +yy1282: + YYDEBUG(1282, *YYCURSOR); + yyaccept = 25; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - if(yych <= '.') goto yy1271; - goto yy788; - } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy1272; - goto yy1262; - } -yy1305: - YYDEBUG(1305, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych >= ':') goto yy56; - goto yy1306; -yy1306: - YYDEBUG(1306, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy1307; -yy1307: - YYDEBUG(1307, *YYCURSOR); - if(yych <= '/') goto yy1308; - if(yych <= '9') goto yy1306; - goto yy1308; -yy1308: - YYDEBUG(1308, *YYCURSOR); - -{ - timelib_ull i; - - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_DATE(); - TIMELIB_UNHAVE_TIME(); - - i = timelib_get_unsigned_nr((char **) &ptr, 24); - s->time->y = 1970; - s->time->m = 1; - s->time->d = 1; - s->time->h = s->time->i = s->time->s = 0; - s->time->f = 0.0; - s->time->relative.s += i; - s->time->is_localtime = 1; - s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; - s->time->z = 0; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych == ')') goto yy132; + if(yych <= '.') goto yy1268; + goto yy138; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy1268; + goto yy138; + } else { + if(yych <= '`') goto yy1268; + if(yych <= 'z') goto yy143; + goto yy1268; + } } -yy1309: - YYDEBUG(1309, *YYCURSOR); +yy1283: + YYDEBUG(1283, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '`'){ + if(yych <= 'S'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Z') goto yy51; - goto yy3; + if(yych <= 'R') goto yy134; + goto yy1284; } } else { - if(yych <= 'l'){ - if(yych != 'd') goto yy51; - goto yy1310; + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'm') goto yy1311; - if(yych <= 'z') goto yy51; + if(yych <= 's') goto yy1284; + if(yych <= 'z') goto yy134; goto yy3; } } -yy1310: - YYDEBUG(1310, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'a') goto yy1318; - if(yych <= 'z') goto yy52; - goto yy3; - } -yy1311: - YYDEBUG(1311, *YYCURSOR); +yy1284: + YYDEBUG(1284, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1285; + } } else { - if(yych <= 'n'){ + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; if(yych <= '`') goto yy3; - goto yy52; + goto yy135; } else { - if(yych <= 'o') goto yy1312; - if(yych <= 'z') goto yy52; + if(yych <= 't') goto yy1285; + if(yych <= 'z') goto yy135; goto yy3; } } -yy1312: - YYDEBUG(1312, *YYCURSOR); +yy1285: + YYDEBUG(1285, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'r') goto yy3; - goto yy1313; -yy1313: - YYDEBUG(1313, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'r') goto yy56; - goto yy1314; -yy1314: - YYDEBUG(1314, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'o') goto yy56; - goto yy1315; -yy1315: - YYDEBUG(1315, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'w') goto yy56; - goto yy1316; -yy1316: - YYDEBUG(1316, *YYCURSOR); - ++YYCURSOR; - goto yy1317; -yy1317: - YYDEBUG(1317, *YYCURSOR); - -{ - DEBUG_OUTPUT("tomorrow"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = 1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'E') goto yy1286; + if(yych != 'e') goto yy3; + goto yy1286; } -yy1318: - YYDEBUG(1318, *YYCURSOR); +yy1286: + YYDEBUG(1286, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy1287; + if(yych != 'r') goto yy53; + goto yy1287; +yy1287: + YYDEBUG(1287, *YYCURSOR); yych = *++YYCURSOR; - if(yych == ')') goto yy49; - if(yych != 'y') goto yy3; - goto yy1319; -yy1319: - YYDEBUG(1319, *YYCURSOR); + if(yych == 'D') goto yy1288; + if(yych != 'd') goto yy53; + goto yy1288; +yy1288: + YYDEBUG(1288, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy1289; + if(yych != 'a') goto yy53; + goto yy1289; +yy1289: + YYDEBUG(1289, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy1290; + if(yych != 'y') goto yy53; + goto yy1290; +yy1290: + YYDEBUG(1290, *YYCURSOR); ++YYCURSOR; - goto yy1320; -yy1320: - YYDEBUG(1320, *YYCURSOR); + goto yy1291; +yy1291: + YYDEBUG(1291, *YYCURSOR); { - DEBUG_OUTPUT("midnight | today"); + DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); TIMELIB_UNHAVE_TIME(); + s->time->relative.d = -1; TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -yy1321: - YYDEBUG(1321, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'c'){ - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'd') goto yy1322; - if(yych <= 'z') goto yy51; +yy1292: + YYDEBUG(1292, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy134; + goto yy1284; } - } -yy1322: - YYDEBUG(1322, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; } else { - if(yych <= 'm'){ - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'n') goto yy1323; - if(yych <= 'z') goto yy52; + if(yych == 's') goto yy1293; + if(yych <= 'z') goto yy137; goto yy3; } } -yy1323: - YYDEBUG(1323, *YYCURSOR); +yy1293: + YYDEBUG(1293, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'i') goto yy3; - goto yy1324; -yy1324: - YYDEBUG(1324, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'g') goto yy56; - goto yy1325; -yy1325: - YYDEBUG(1325, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'h') goto yy56; - goto yy1326; -yy1326: - YYDEBUG(1326, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 't') goto yy1319; - goto yy56; -yy1327: - YYDEBUG(1327, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '`'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'V') goto yy618; - if(yych <= 'Z') goto yy51; - goto yy3; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1285; } } else { - if(yych <= 'u'){ - if(yych == 'o') goto yy1330; - goto yy51; - } else { - if(yych <= 'v') goto yy618; - if(yych <= 'w') goto yy1328; - if(yych <= 'z') goto yy51; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; goto yy3; - } - } -yy1328: - YYDEBUG(1328, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '@'){ - if(yych == ')') goto yy49; - goto yy1329; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy1329; - if(yych <= 'z') goto yy52; - goto yy1329; - } -yy1329: - YYDEBUG(1329, *YYCURSOR); - -{ - DEBUG_OUTPUT("now"); - TIMELIB_INIT; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -yy1330: - YYDEBUG(1330, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= 'm'){ - if(yych <= '`') goto yy3; - goto yy52; } else { - if(yych <= 'n') goto yy1331; - if(yych <= 'z') goto yy52; + if(yych == 't') goto yy1294; + if(yych <= 'z') goto yy142; goto yy3; } } -yy1331: - YYDEBUG(1331, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) == ')') goto yy49; - goto yy1332; -yy1332: - YYDEBUG(1332, *YYCURSOR); - -{ - DEBUG_OUTPUT("noon"); - TIMELIB_INIT; - TIMELIB_UNHAVE_TIME(); - TIMELIB_HAVE_TIME(); - s->time->h = 12; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -yy1333: - YYDEBUG(1333, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'r'){ - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 's') goto yy1334; - if(yych <= 'z') goto yy51; +yy1294: + YYDEBUG(1294, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy1286; } - } -yy1334: - YYDEBUG(1334, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy1335; - if(yych <= 'z') goto yy52; + if(yych == 'e') goto yy1295; + if(yych <= 'z') goto yy143; goto yy3; } } -yy1335: - YYDEBUG(1335, *YYCURSOR); - yyaccept = 1; +yy1295: + YYDEBUG(1295, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy1287; + if(yych != 'r') goto yy144; + goto yy1296; +yy1296: + YYDEBUG(1296, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy1288; + if(yych != 'd') goto yy144; + goto yy1297; +yy1297: + YYDEBUG(1297, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy1289; + if(yych != 'a') goto yy144; + goto yy1298; +yy1298: + YYDEBUG(1298, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy1290; + if(yych != 'y') goto yy144; + goto yy1299; +yy1299: + YYDEBUG(1299, *YYCURSOR); + yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'e') goto yy3; - goto yy1336; -yy1336: - YYDEBUG(1336, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'r') goto yy56; - goto yy1337; -yy1337: - YYDEBUG(1337, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'd') goto yy56; - goto yy1338; -yy1338: - YYDEBUG(1338, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'a') goto yy56; - goto yy1339; -yy1339: - YYDEBUG(1339, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'y') goto yy56; - goto yy1340; -yy1340: - YYDEBUG(1340, *YYCURSOR); - ++YYCURSOR; - goto yy1341; -yy1341: - YYDEBUG(1341, *YYCURSOR); - -{ - DEBUG_OUTPUT("yesterday"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = -1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1291; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1291; + if(yych <= 'z') goto yy143; + goto yy1291; } } } @@ -19688,16 +17521,32 @@ yy1341: #define YYMAXFILL 26 -timelib_time* timelib_strtotime(char *s, int *errors, timelib_tzdb *tzdb) +timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; int t; + char *e = s + len - 1; + + while (isspace(*s) && s < e) { + s++; + } + while (isspace(*e) && e > s) { + e--; + } + if (e - s < 1) { + *errors = 1; + in.time = timelib_time_ctor(); + in.time->y = in.time->d = in.time->m = in.time->h = in.time->i = in.time->s = in.time->f = in.time->z = in.time->dst = -1; + in.time->is_localtime = in.time->zone_type = 0; + return in.time; + } + e++; memset(&in, 0, sizeof(in)); - in.str = malloc(strlen(s) + YYMAXFILL); - memset(in.str, 0, strlen(s) + YYMAXFILL); - memcpy(in.str, s, strlen(s)); - in.lim = in.str + strlen(s) + YYMAXFILL; + in.str = malloc((e - s) + YYMAXFILL); + memset(in.str, 0, (e - s) + YYMAXFILL); + memcpy(in.str, s, (e - s)); + in.lim = in.str + (e - s) + YYMAXFILL; in.cur = in.str; in.time = timelib_time_ctor(); in.time->y = -1; diff --git a/ext/date/lib/parse_date.c.orig b/ext/date/lib/parse_date.c.orig index 45228fba2..61769557e 100644 --- a/ext/date/lib/parse_date.c.orig +++ b/ext/date/lib/parse_date.c.orig @@ -1,15 +1,15 @@ -/* Generated by re2c 0.9.10.dev on Thu Nov 17 13:55:10 2005 */ +/* Generated by re2c 0.9.12 on Wed Jan 4 15:16:35 2006 */ #line 1 "ext/date/lib/parse_date.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,11 +18,12 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.c,v 1.29.2.10 2005/11/17 13:04:25 derick Exp $ */ +/* $Id: parse_date.c,v 1.29.2.24 2006/01/04 21:31:29 derick Exp $ */ #include "timelib.h" #include +#include #ifdef HAVE_STDLIB_H #include @@ -172,6 +173,10 @@ static timelib_tz_lookup_table timelib_timezone_fallbackmap[] = { { NULL, 0, 0, NULL }, }; +static timelib_tz_lookup_table timelib_timezone_utc[] = { + { "utc", 0, 0, "UTC" }, +}; + static timelib_relunit const timelib_relunit_lookup[] = { { "sec", TIMELIB_SECOND, 1 }, { "secs", TIMELIB_SECOND, 1 }, @@ -197,12 +202,19 @@ static timelib_relunit const timelib_relunit_lookup[] = { { "years", TIMELIB_YEAR, 1 }, { "monday", TIMELIB_WEEKDAY, 1 }, + { "mon", TIMELIB_WEEKDAY, 1 }, { "tuesday", TIMELIB_WEEKDAY, 2 }, + { "tue", TIMELIB_WEEKDAY, 2 }, { "wednesday", TIMELIB_WEEKDAY, 3 }, + { "wed", TIMELIB_WEEKDAY, 3 }, { "thursday", TIMELIB_WEEKDAY, 4 }, + { "thu", TIMELIB_WEEKDAY, 4 }, { "friday", TIMELIB_WEEKDAY, 5 }, + { "fri", TIMELIB_WEEKDAY, 5 }, { "saturday", TIMELIB_WEEKDAY, 6 }, + { "sat", TIMELIB_WEEKDAY, 6 }, { "sunday", TIMELIB_WEEKDAY, 0 }, + { "sun", TIMELIB_WEEKDAY, 0 }, { NULL, 0, 0 } }; @@ -371,6 +383,16 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) return tmp_nr; } +static void timelib_skip_day_suffix(char **ptr) +{ + if (isspace(**ptr)) { + return; + } + if (!strncasecmp(*ptr, "nd", 2) || !strncasecmp(*ptr, "rd", 2) ||!strncasecmp(*ptr, "st", 2) || !strncasecmp(*ptr, "th", 2)) { + *ptr += 2; + } +} + static double timelib_get_frac_nr(char **ptr, int max_length) { char *begin, *end, *str; @@ -431,11 +453,18 @@ static long timelib_parse_tz_cor(char **ptr) break; case 3: case 4: - tmp = strtol(begin, NULL, 10); - return HOUR(tmp / 100) + tmp % 100; + if (begin[1] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10); + return tmp; + } else if (begin[2] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); + return tmp; + } else { + tmp = strtol(begin, NULL, 10); + return HOUR(tmp / 100) + tmp % 100; + } case 5: - tmp = HOUR(strtol(begin, NULL, 10)) + - strtol(begin + 3, NULL, 10); + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); return tmp; } return 0; @@ -565,6 +594,10 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in int first_found = 0; timelib_tz_lookup_table *tp, *first_found_elem; timelib_tz_lookup_table *fmp; + + if (strcasecmp("utc", word) == 0 || strcasecmp("gmt", word) == 0) { + return timelib_timezone_utc; + } for (tp = timelib_timezone_lookup; tp->name; tp++) { if (strcasecmp(word, tp->name) == 0) { @@ -583,6 +616,7 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in if (first_found) { return first_found_elem; } + /* Still didn't find anything, let's find the zone solely based on * offset/isdst then */ for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) { @@ -701,7 +735,7 @@ static int scan(Scanner *s) std: s->tok = cursor; s->len = 0; -#line 808 "ext/date/lib/parse_date.re" +#line 844 "ext/date/lib/parse_date.re" { @@ -712,16 +746,16 @@ std: 0, 0, 0, 0, 0, 0, 0, 0, 208, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 64, 192, 0, - 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 0, 0, 0, 0, 0, 0, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 8, 136, 8, 8, 8, - 136, 8, 8, 8, 8, 8, 136, 8, - 8, 8, 136, 136, 136, 8, 8, 8, - 8, 8, 8, 0, 0, 0, 0, 0, + 0, 32, 32, 32, 160, 32, 32, 32, + 160, 32, 32, 32, 32, 32, 160, 32, + 32, 32, 160, 160, 160, 32, 32, 32, + 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -740,10 +774,10 @@ std: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 744 "ext/date/lib/parse_date.c" +#line 778 "ext/date/lib/parse_date.c" { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; YYDEBUG(1, *YYCURSOR); @@ -753,85 +787,92 @@ yy0: yych = *YYCURSOR; YYDEBUG(-1, yych); switch(yych){ - case 0x00: case 0x0A: goto yy46; - case ' ': case ',': case '.': goto yy44; - case '(': goto yy41; - case '+': case '-': goto yy40; - case '0': goto yy9; - case '1': goto yy10; - case '2': goto yy11; - case '3': goto yy12; + case 0x00: case 0x0A: goto yy48; + case ' ': goto yy45; + case '(': goto yy42; + case '+': case '-': goto yy41; + case ',': case '.': goto yy47; + case '0': goto yy13; + case '1': goto yy14; + case '2': goto yy15; + case '3': goto yy16; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy13; - case '@': goto yy7; - case 'A': goto yy22; + case '9': goto yy17; + case '@': goto yy11; + case 'A': goto yy25; case 'B': case 'C': case 'G': case 'H': case 'K': case 'Q': - case 'R': case 'U': case 'Y': - case 'Z': goto yy42; - case 'D': goto yy29; - case 'E': goto yy32; - case 'F': goto yy19; - case 'I': goto yy14; - case 'J': goto yy17; - case 'L': goto yy34; - case 'M': goto yy21; - case 'N': goto yy28; - case 'O': goto yy26; - case 'P': goto yy36; - case 'S': goto yy24; - case 'T': goto yy31; - case 'V': goto yy15; - case 'W': goto yy38; - case 'X': goto yy16; - case 'a': goto yy23; + case 'R': case 'U': case 'Z': goto yy43; + case 'D': goto yy31; + case 'E': goto yy35; + case 'F': goto yy23; + case 'I': goto yy18; + case 'J': goto yy21; + case 'L': goto yy37; + case 'M': goto yy7; + case 'N': goto yy5; + case 'O': goto yy29; + case 'P': goto yy39; + case 'S': goto yy27; + case 'T': goto yy9; + case 'V': goto yy19; + case 'W': goto yy33; + case 'X': goto yy20; + case 'Y': goto yy2; + case 'a': goto yy26; case 'b': case 'c': case 'g': case 'h': case 'i': case 'k': case 'q': case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy43; - case 'd': goto yy30; - case 'e': goto yy33; - case 'f': goto yy20; - case 'j': goto yy18; - case 'l': goto yy35; - case 'm': goto yy5; - case 'n': goto yy4; - case 'o': goto yy27; - case 'p': goto yy37; - case 's': goto yy25; - case 't': goto yy6; - case 'w': goto yy39; - case 'y': goto yy2; - default: goto yy48; + case 'v': case 'x': case 'z': goto yy44; + case 'd': goto yy32; + case 'e': goto yy36; + case 'f': goto yy24; + case 'j': goto yy22; + case 'l': goto yy38; + case 'm': goto yy8; + case 'n': goto yy6; + case 'o': goto yy30; + case 'p': goto yy40; + case 's': goto yy28; + case 't': goto yy10; + case 'w': goto yy34; + case 'y': goto yy4; + default: goto yy50; } yy2: YYDEBUG(2, *YYCURSOR); ++YYCURSOR; - if((yych = *YYCURSOR) <= 'Z'){ - if(yych == ')') goto yy49; - if(yych >= 'A') goto yy50; - goto yy3; + if((yych = *YYCURSOR) <= 'E'){ + if(yych <= ')'){ + if(yych >= ')') goto yy132; + goto yy3; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy1283; + } } else { if(yych <= 'd'){ - if(yych >= 'a') goto yy50; + if(yych <= 'Z') goto yy133; + if(yych >= 'a') goto yy136; goto yy3; } else { - if(yych <= 'e') goto yy1333; - if(yych <= 'z') goto yy50; + if(yych <= 'e') goto yy1292; + if(yych <= 'z') goto yy136; goto yy3; } } yy3: YYDEBUG(3, *YYCURSOR); -#line 1306 "ext/date/lib/parse_date.re" +#line 1339 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -841,133 +882,278 @@ yy3: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 838 "ext/date/lib/parse_date.c" +#line 879 "ext/date/lib/parse_date.c" yy4: YYDEBUG(4, *YYCURSOR); yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy1283; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; + } else { + if(yych <= 'e') goto yy1283; + if(yych <= 'z') goto yy133; + goto yy3; + } + } +yy5: + YYDEBUG(5, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= 'O'){ if(yych <= 'D'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy610; - goto yy50; + if(yych <= 'E') goto yy1254; + goto yy133; } else { - if(yych <= 'I') goto yy611; - if(yych <= 'N') goto yy50; - goto yy606; + if(yych <= 'I') goto yy1255; + if(yych <= 'N') goto yy133; + goto yy1253; } } } else { if(yych <= 'h'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'e') goto yy610; - goto yy50; + if(yych == 'e') goto yy1270; + goto yy136; } } else { if(yych <= 'n'){ - if(yych <= 'i') goto yy611; - goto yy50; + if(yych <= 'i') goto yy1271; + goto yy136; } else { - if(yych <= 'o') goto yy1327; - if(yych <= 'z') goto yy50; + if(yych <= 'o') goto yy1269; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy5: - YYDEBUG(5, *YYCURSOR); +yy6: + YYDEBUG(6, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'O'){ + if(yych <= 'D'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy133; } else { - if(yych <= 'A') goto yy705; - if(yych == 'O') goto yy708; - goto yy50; + if(yych <= 'H'){ + if(yych <= 'E') goto yy1254; + goto yy133; + } else { + if(yych <= 'I') goto yy1255; + if(yych <= 'N') goto yy133; + goto yy1253; + } } } else { - if(yych <= 'i'){ + if(yych <= 'h'){ + if(yych <= '`'){ + if(yych <= 'Z') goto yy133; + goto yy3; + } else { + if(yych == 'e') goto yy1254; + goto yy133; + } + } else { + if(yych <= 'n'){ + if(yych <= 'i') goto yy1255; + goto yy133; + } else { + if(yych <= 'o') goto yy1253; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy7: + YYDEBUG(7, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1225; + } else { + if(yych == 'I') goto yy1226; + if(yych <= 'N') goto yy133; + goto yy1227; + } + } else { + if(yych <= 'h'){ + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'a') goto yy705; - if(yych <= 'h') goto yy50; - goto yy1321; + if(yych <= 'a') goto yy1239; + goto yy136; } else { - if(yych == 'o') goto yy708; - if(yych <= 'z') goto yy50; - goto yy3; + if(yych <= 'n'){ + if(yych <= 'i') goto yy1240; + goto yy136; + } else { + if(yych <= 'o') goto yy1241; + if(yych <= 'z') goto yy136; + goto yy3; + } } } -yy6: - YYDEBUG(6, *YYCURSOR); +yy8: + YYDEBUG(8, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1225; + } else { + if(yych == 'I') goto yy1226; + if(yych <= 'N') goto yy133; + goto yy1227; + } + } else { + if(yych <= 'h'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + if(yych <= 'a') goto yy1225; + goto yy133; + } else { + if(yych <= 'n'){ + if(yych <= 'i') goto yy1226; + goto yy133; + } else { + if(yych <= 'o') goto yy1227; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy9: + YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ + if(yych <= 'W'){ if(yych <= 'G'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'E') goto yy472; - goto yy50; + if(yych == 'E') goto yy1161; + goto yy133; } } else { - if(yych <= 'U'){ - if(yych <= 'H') goto yy473; - if(yych <= 'T') goto yy50; - goto yy474; + if(yych <= 'O'){ + if(yych <= 'H') goto yy1162; + if(yych <= 'N') goto yy133; + goto yy1163; } else { - if(yych == 'W') goto yy475; - goto yy50; + if(yych == 'U') goto yy1164; + if(yych <= 'V') goto yy133; + goto yy1165; } } } else { if(yych <= 'n'){ - if(yych <= 'e'){ + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'd') goto yy50; - goto yy472; + goto yy136; } else { - if(yych == 'h') goto yy473; - goto yy50; + if(yych <= 'e') goto yy1194; + if(yych == 'h') goto yy1195; + goto yy136; } } else { if(yych <= 'u'){ - if(yych <= 'o') goto yy1309; - if(yych <= 't') goto yy50; - goto yy474; + if(yych <= 'o') goto yy1196; + if(yych <= 't') goto yy136; + goto yy1197; } else { - if(yych == 'w') goto yy475; - if(yych <= 'z') goto yy50; + if(yych == 'w') goto yy1198; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy7: - YYDEBUG(7, *YYCURSOR); +yy10: + YYDEBUG(10, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'W'){ + if(yych <= 'G'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'E') goto yy1161; + goto yy133; + } + } else { + if(yych <= 'O'){ + if(yych <= 'H') goto yy1162; + if(yych <= 'N') goto yy133; + goto yy1163; + } else { + if(yych == 'U') goto yy1164; + if(yych <= 'V') goto yy133; + goto yy1165; + } + } + } else { + if(yych <= 'n'){ + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; + } else { + if(yych <= 'e') goto yy1161; + if(yych == 'h') goto yy1162; + goto yy133; + } + } else { + if(yych <= 'u'){ + if(yych <= 'o') goto yy1163; + if(yych <= 't') goto yy133; + goto yy1164; + } else { + if(yych == 'w') goto yy1165; + if(yych <= 'z') goto yy133; + goto yy3; + } + } + } +yy11: + YYDEBUG(11, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '-') goto yy1305; - if(yych <= '0') goto yy8; - if(yych <= '9') goto yy1306; - goto yy8; -yy8: - YYDEBUG(8, *YYCURSOR); + if(yych == '-') goto yy1157; + if(yych <= '0') goto yy12; + if(yych <= '9') goto yy1158; + goto yy12; +yy12: + YYDEBUG(12, *YYCURSOR); -#line 1372 "ext/date/lib/parse_date.re" +#line 1405 "ext/date/lib/parse_date.re" { /* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */ s->errors++; goto std; } -#line 952 "ext/date/lib/parse_date.c" -yy9: - YYDEBUG(9, *YYCURSOR); +#line 1130 "ext/date/lib/parse_date.c" +yy13: + YYDEBUG(13, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -992,14 +1178,11 @@ yy9: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1262; - case '-': goto yy789; - case '.': goto yy1271; - case '/': goto yy788; - case '0': goto yy1304; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': case 'w': case 'y': goto yy1121; + case '-': goto yy615; + case '.': goto yy1123; + case '/': goto yy614; + case '0': goto yy1156; case '1': case '2': case '3': @@ -1008,12 +1191,16 @@ yy9: case '6': case '7': case '8': - case '9': goto yy1303; - case ':': goto yy1272; - default: goto yy8; + case '9': goto yy1155; + case ':': goto yy1124; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy10: - YYDEBUG(10, *YYCURSOR); +yy14: + YYDEBUG(14, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1039,29 +1226,30 @@ yy10: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': - case '2': goto yy1303; + case '2': goto yy1155; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1270; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy1122; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy11: - YYDEBUG(11, *YYCURSOR); +yy15: + YYDEBUG(15, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1087,29 +1275,30 @@ yy11: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': case '2': - case '3': goto yy1270; + case '3': goto yy1122; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1260; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy1119; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy12: - YYDEBUG(12, *YYCURSOR); +yy16: + YYDEBUG(16, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1135,16 +1324,13 @@ yy12: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': - case '1': goto yy1260; + case '1': goto yy1119; case '2': case '3': case '4': @@ -1152,12 +1338,16 @@ yy12: case '6': case '7': case '8': - case '9': goto yy787; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy611; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy13: - YYDEBUG(13, *YYCURSOR); +yy17: + YYDEBUG(17, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); @@ -1183,14 +1373,11 @@ yy13: case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': - case 'p': case 's': - case 't': case 'w': case 'y': goto yy782; - case '-': goto yy789; - case '.': goto yy792; - case '/': goto yy788; + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': case 'o': + case 'p': case 'w': case 'y': goto yy604; + case '-': goto yy615; + case '.': goto yy618; + case '/': goto yy614; case '0': case '1': case '2': @@ -1200,1813 +1387,1469 @@ yy13: case '6': case '7': case '8': - case '9': goto yy787; - case ':': goto yy801; - default: goto yy8; + case '9': goto yy611; + case ':': goto yy627; + case 'n': goto yy612; + case 'r': goto yy613; + case 's': goto yy606; + case 't': goto yy610; + default: goto yy12; } -yy14: - YYDEBUG(14, *YYCURSOR); +yy18: + YYDEBUG(18, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'H'){ if(yych <= '.'){ if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; + if(yych == ')') goto yy360; + goto yy359; } else { if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; + if(yych <= '9') goto yy359; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } } else { if(yych <= 'W'){ - if(yych <= 'I') goto yy780; - if(yych == 'V') goto yy779; - goto yy50; + if(yych <= 'I') goto yy602; + if(yych == 'V') goto yy601; + goto yy133; } else { if(yych <= 'Z'){ - if(yych <= 'X') goto yy779; - goto yy50; + if(yych <= 'X') goto yy601; + goto yy133; } else { if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy15: - YYDEBUG(15, *YYCURSOR); +yy19: + YYDEBUG(19, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '9'){ if(yych <= ')'){ if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; + if(yych <= '(') goto yy359; + goto yy360; } else { if(yych == '/') goto yy3; - goto yy509; + goto yy359; } } else { if(yych <= 'I'){ if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy50; - goto yy777; + if(yych <= 'H') goto yy133; + goto yy599; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } -yy16: - YYDEBUG(16, *YYCURSOR); +yy20: + YYDEBUG(20, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '9'){ if(yych <= ')'){ if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; + if(yych <= '(') goto yy359; + goto yy360; } else { if(yych == '/') goto yy3; - goto yy509; + goto yy359; } } else { if(yych <= 'I'){ if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy50; - goto yy775; + if(yych <= 'H') goto yy133; + goto yy597; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } } -yy17: - YYDEBUG(17, *YYCURSOR); +yy21: + YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'A') goto yy758; - if(yych <= 'T') goto yy50; - goto yy757; + if(yych <= 'A') goto yy580; + if(yych <= 'T') goto yy133; + goto yy579; } } else { if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy767; + goto yy589; } else { - if(yych == 'u') goto yy766; - if(yych <= 'z') goto yy53; + if(yych == 'u') goto yy588; + if(yych <= 'z') goto yy136; goto yy3; } } -yy18: - YYDEBUG(18, *YYCURSOR); +yy22: + YYDEBUG(22, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'A') goto yy758; - if(yych <= 'T') goto yy50; - goto yy757; + if(yych <= 'A') goto yy580; + if(yych <= 'T') goto yy133; + goto yy579; } } else { if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy758; + goto yy580; } else { - if(yych == 'u') goto yy757; - if(yych <= 'z') goto yy50; + if(yych == 'u') goto yy579; + if(yych <= 'z') goto yy133; goto yy3; } } -yy19: - YYDEBUG(19, *YYCURSOR); +yy23: + YYDEBUG(23, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy721; + if(yych <= 'D') goto yy133; + goto yy541; } } else { if(yych <= 'N'){ - if(yych == 'I') goto yy722; - goto yy50; + if(yych == 'I') goto yy542; + goto yy133; } else { - if(yych <= 'O') goto yy723; - if(yych <= 'Q') goto yy50; - goto yy724; + if(yych <= 'O') goto yy543; + if(yych <= 'Q') goto yy133; + goto yy544; } } } else { if(yych <= 'i'){ if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'e') goto yy739; - if(yych <= 'h') goto yy53; - goto yy740; + if(yych <= 'e') goto yy560; + if(yych <= 'h') goto yy136; + goto yy561; } } else { if(yych <= 'q'){ - if(yych == 'o') goto yy741; - goto yy53; + if(yych == 'o') goto yy562; + goto yy136; } else { - if(yych <= 'r') goto yy742; - if(yych <= 'z') goto yy53; + if(yych <= 'r') goto yy563; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy20: - YYDEBUG(20, *YYCURSOR); +yy24: + YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy721; + if(yych <= 'D') goto yy133; + goto yy541; } } else { if(yych <= 'N'){ - if(yych == 'I') goto yy722; - goto yy50; + if(yych == 'I') goto yy542; + goto yy133; } else { - if(yych <= 'O') goto yy723; - if(yych <= 'Q') goto yy50; - goto yy724; + if(yych <= 'O') goto yy543; + if(yych <= 'Q') goto yy133; + goto yy544; } } } else { if(yych <= 'i'){ if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'e') goto yy721; - if(yych <= 'h') goto yy50; - goto yy722; + if(yych <= 'e') goto yy541; + if(yych <= 'h') goto yy133; + goto yy542; } } else { if(yych <= 'q'){ - if(yych == 'o') goto yy723; - goto yy50; + if(yych == 'o') goto yy543; + goto yy133; } else { - if(yych <= 'r') goto yy724; - if(yych <= 'z') goto yy50; + if(yych <= 'r') goto yy544; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy21: - YYDEBUG(21, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy705; - if(yych <= 'N') goto yy50; - goto yy708; - } - } else { - if(yych <= 'a'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy706; - } else { - if(yych == 'o') goto yy707; - if(yych <= 'z') goto yy53; - goto yy3; - } - } -yy22: - YYDEBUG(22, *YYCURSOR); +yy25: + YYDEBUG(25, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'F'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'O'){ - if(yych <= 'G') goto yy688; - goto yy50; + if(yych <= 'G') goto yy524; + goto yy133; } else { - if(yych <= 'P') goto yy687; - if(yych <= 'T') goto yy50; - goto yy686; + if(yych <= 'P') goto yy523; + if(yych <= 'T') goto yy133; + goto yy522; } } } else { if(yych <= 'o'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'g') goto yy698; - goto yy53; + if(yych == 'g') goto yy534; + goto yy136; } } else { if(yych <= 't'){ - if(yych <= 'p') goto yy697; - goto yy53; + if(yych <= 'p') goto yy533; + goto yy136; } else { - if(yych <= 'u') goto yy696; - if(yych <= 'z') goto yy53; + if(yych <= 'u') goto yy532; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy23: - YYDEBUG(23, *YYCURSOR); +yy26: + YYDEBUG(26, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'F'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy50; + goto yy133; } else { if(yych <= 'O'){ - if(yych <= 'G') goto yy688; - goto yy50; + if(yych <= 'G') goto yy524; + goto yy133; } else { - if(yych <= 'P') goto yy687; - if(yych <= 'T') goto yy50; - goto yy686; + if(yych <= 'P') goto yy523; + if(yych <= 'T') goto yy133; + goto yy522; } } } else { if(yych <= 'o'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych == 'g') goto yy688; - goto yy50; + if(yych == 'g') goto yy524; + goto yy133; } } else { if(yych <= 't'){ - if(yych <= 'p') goto yy687; - goto yy50; + if(yych <= 'p') goto yy523; + goto yy133; } else { - if(yych <= 'u') goto yy686; - if(yych <= 'z') goto yy50; + if(yych <= 'u') goto yy522; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy24: - YYDEBUG(24, *YYCURSOR); +yy27: + YYDEBUG(27, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'D'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy639; - goto yy50; + if(yych <= 'A') goto yy469; + goto yy133; } } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy638; - goto yy50; + if(yych <= 'E') goto yy468; + goto yy133; } else { - if(yych <= 'I') goto yy640; - if(yych <= 'T') goto yy50; - goto yy641; + if(yych <= 'I') goto yy470; + if(yych <= 'T') goto yy133; + goto yy471; } } } else { if(yych <= 'e'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy663; - if(yych <= 'd') goto yy53; - goto yy662; + if(yych <= 'a') goto yy496; + if(yych <= 'd') goto yy136; + goto yy495; } } else { if(yych <= 't'){ - if(yych == 'i') goto yy664; - goto yy53; + if(yych == 'i') goto yy497; + goto yy136; } else { - if(yych <= 'u') goto yy665; - if(yych <= 'z') goto yy53; + if(yych <= 'u') goto yy498; + if(yych <= 'z') goto yy136; goto yy3; } } } -yy25: - YYDEBUG(25, *YYCURSOR); +yy28: + YYDEBUG(28, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'U'){ if(yych <= 'D'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy639; - goto yy50; + if(yych <= 'A') goto yy469; + goto yy133; } } else { if(yych <= 'H'){ - if(yych <= 'E') goto yy638; - goto yy50; + if(yych <= 'E') goto yy468; + goto yy133; } else { - if(yych <= 'I') goto yy640; - if(yych <= 'T') goto yy50; - goto yy641; + if(yych <= 'I') goto yy470; + if(yych <= 'T') goto yy133; + goto yy471; } } } else { if(yych <= 'e'){ if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy639; - if(yych <= 'd') goto yy50; - goto yy638; + if(yych <= 'a') goto yy469; + if(yych <= 'd') goto yy133; + goto yy468; } } else { if(yych <= 't'){ - if(yych == 'i') goto yy640; - goto yy50; + if(yych == 'i') goto yy470; + goto yy133; } else { - if(yych <= 'u') goto yy641; - if(yych <= 'z') goto yy50; + if(yych <= 'u') goto yy471; + if(yych <= 'z') goto yy133; goto yy3; } } } -yy26: - YYDEBUG(26, *YYCURSOR); +yy29: + YYDEBUG(29, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'C'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy50; - goto yy628; + if(yych <= 'B') goto yy133; + goto yy458; } } else { if(yych <= 'b'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'c') goto yy633; - if(yych <= 'z') goto yy53; + if(yych <= 'c') goto yy463; + if(yych <= 'z') goto yy136; goto yy3; } } -yy27: - YYDEBUG(27, *YYCURSOR); +yy30: + YYDEBUG(30, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'C'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy50; - goto yy628; + if(yych <= 'B') goto yy133; + goto yy458; } } else { if(yych <= 'b'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'c') goto yy628; - if(yych <= 'z') goto yy50; + if(yych <= 'c') goto yy458; + if(yych <= 'z') goto yy133; goto yy3; } } -yy28: - YYDEBUG(28, *YYCURSOR); +yy31: + YYDEBUG(31, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'D'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy50; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'H'){ - if(yych <= 'E') goto yy610; - goto yy50; - } else { - if(yych <= 'I') goto yy611; - if(yych <= 'N') goto yy50; - goto yy606; - } + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy356; } } else { - if(yych <= 'h'){ - if(yych <= '`'){ - if(yych <= 'Z') goto yy50; - goto yy3; - } else { - if(yych == 'e') goto yy608; - goto yy53; - } + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy136; } else { - if(yych <= 'n'){ - if(yych <= 'i') goto yy609; - goto yy53; - } else { - if(yych <= 'o') goto yy607; - if(yych <= 'z') goto yy53; - goto yy3; - } + if(yych <= 'e') goto yy451; + if(yych <= 'z') goto yy136; + goto yy3; } } -yy29: - YYDEBUG(29, *YYCURSOR); +yy32: + YYDEBUG(32, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy506; + if(yych <= 'D') goto yy133; + goto yy356; } } else { if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy133; } else { - if(yych <= 'e') goto yy599; - if(yych <= 'z') goto yy53; + if(yych <= 'e') goto yy356; + if(yych <= 'z') goto yy133; goto yy3; } } -yy30: - YYDEBUG(30, *YYCURSOR); +yy33: + YYDEBUG(33, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy506; + if(yych <= 'D') goto yy133; + goto yy339; } } else { if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy136; } else { - if(yych <= 'e') goto yy506; - if(yych <= 'z') goto yy50; + if(yych <= 'e') goto yy348; + if(yych <= 'z') goto yy136; goto yy3; } } -yy31: - YYDEBUG(31, *YYCURSOR); +yy34: + YYDEBUG(34, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'W'){ - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy472; - } + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'T'){ - if(yych == 'H') goto yy473; - goto yy50; - } else { - if(yych <= 'U') goto yy474; - if(yych <= 'V') goto yy50; - goto yy475; - } + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy133; + goto yy339; } } else { - if(yych <= 'h'){ - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy53; - } else { - if(yych <= 'e') goto yy468; - if(yych <= 'g') goto yy53; - goto yy469; - } + if(yych <= 'd'){ + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + goto yy133; } else { - if(yych <= 'v'){ - if(yych == 'u') goto yy470; - goto yy53; - } else { - if(yych <= 'w') goto yy471; - if(yych <= 'z') goto yy53; - goto yy3; - } + if(yych <= 'e') goto yy339; + if(yych <= 'z') goto yy133; + goto yy3; } } -yy32: - YYDEBUG(32, *YYCURSOR); +yy35: + YYDEBUG(35, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'L'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'I') goto yy456; - if(yych <= 'K') goto yy50; - goto yy457; + if(yych == 'I') goto yy321; + if(yych <= 'K') goto yy133; + goto yy322; } } else { if(yych <= 'i'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy53; - goto yy462; + if(yych <= 'h') goto yy136; + goto yy330; } else { - if(yych == 'l') goto yy463; - if(yych <= 'z') goto yy53; + if(yych == 'l') goto yy331; + if(yych <= 'z') goto yy136; goto yy3; } } -yy33: - YYDEBUG(33, *YYCURSOR); +yy36: + YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'L'){ if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'I') goto yy456; - if(yych <= 'K') goto yy50; - goto yy457; + if(yych == 'I') goto yy321; + if(yych <= 'K') goto yy133; + goto yy322; } } else { if(yych <= 'i'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy50; - goto yy456; + if(yych <= 'h') goto yy133; + goto yy321; } else { - if(yych == 'l') goto yy457; - if(yych <= 'z') goto yy50; + if(yych == 'l') goto yy322; + if(yych <= 'z') goto yy133; goto yy3; } } -yy34: - YYDEBUG(34, *YYCURSOR); +yy37: + YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'A'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy450; + goto yy315; } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy453; - if(yych <= 'z') goto yy53; + if(yych <= 'a') goto yy318; + if(yych <= 'z') goto yy136; goto yy3; } } -yy35: - YYDEBUG(35, *YYCURSOR); +yy38: + YYDEBUG(38, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'A'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; if(yych <= '@') goto yy3; - goto yy450; + goto yy315; } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; goto yy3; } else { - if(yych <= 'a') goto yy450; - if(yych <= 'z') goto yy50; + if(yych <= 'a') goto yy315; + if(yych <= 'z') goto yy133; goto yy3; } } -yy36: - YYDEBUG(36, *YYCURSOR); +yy39: + YYDEBUG(39, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy50; - goto yy170; + if(yych <= 'Q') goto yy133; + goto yy153; } } else { if(yych <= 'q'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy53; + goto yy136; } else { - if(yych <= 'r') goto yy311; - if(yych <= 'z') goto yy53; + if(yych <= 'r') goto yy235; + if(yych <= 'z') goto yy136; goto yy3; } } -yy37: - YYDEBUG(37, *YYCURSOR); +yy40: + YYDEBUG(40, *YYCURSOR); yych = *++YYCURSOR; if(yych <= 'R'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy50; - goto yy170; + if(yych <= 'Q') goto yy133; + goto yy153; } } else { if(yych <= 'q'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy50; - } else { - if(yych <= 'r') goto yy170; - if(yych <= 'z') goto yy50; - goto yy3; - } - } -yy38: - YYDEBUG(38, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy152; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - goto yy53; - } else { - if(yych <= 'e') goto yy162; - if(yych <= 'z') goto yy53; - goto yy3; - } - } -yy39: - YYDEBUG(39, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy50; - goto yy152; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - goto yy50; + goto yy133; } else { - if(yych <= 'e') goto yy152; - if(yych <= 'z') goto yy50; + if(yych <= 'r') goto yy153; + if(yych <= 'z') goto yy133; goto yy3; } } -yy40: - YYDEBUG(40, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy8; - if(yych <= '1') goto yy64; - if(yych <= '2') goto yy65; - if(yych <= '9') goto yy66; - goto yy8; yy41: YYDEBUG(41, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '@') goto yy8; - if(yych <= 'Z') goto yy63; - if(yych <= '`') goto yy8; - if(yych <= 'z') goto yy63; - goto yy8; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; + } + if(yych <= '/') goto yy12; + if(yych <= '1') goto yy146; + if(yych <= '2') goto yy147; + if(yych <= '9') goto yy148; + goto yy12; yy42: YYDEBUG(42, *YYCURSOR); yych = *++YYCURSOR; + if(yych <= '@') goto yy12; + if(yych <= 'Z') goto yy145; + if(yych <= '`') goto yy12; + if(yych <= 'z') goto yy145; + goto yy12; +yy43: + YYDEBUG(43, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy53; + if(yych <= 'z') goto yy136; goto yy3; } -yy43: - YYDEBUG(43, *YYCURSOR); +yy44: + YYDEBUG(44, *YYCURSOR); yych = *++YYCURSOR; if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'Z') goto yy50; + if(yych <= 'Z') goto yy133; if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy50; + if(yych <= 'z') goto yy133; goto yy3; } -yy44: - YYDEBUG(44, *YYCURSOR); - ++YYCURSOR; - goto yy45; yy45: YYDEBUG(45, *YYCURSOR); - -#line 1361 "ext/date/lib/parse_date.re" -{ - goto std; + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; } -#line 1916 "ext/date/lib/parse_date.c" + if(yych <= '/') goto yy46; + if(yych <= '9') goto yy51; + goto yy46; yy46: YYDEBUG(46, *YYCURSOR); - ++YYCURSOR; - goto yy47; -yy47: - YYDEBUG(47, *YYCURSOR); -#line 1366 "ext/date/lib/parse_date.re" +#line 1394 "ext/date/lib/parse_date.re" { - s->pos = cursor; s->line++; goto std; } -#line 1925 "ext/date/lib/parse_date.c" +#line 2009 "ext/date/lib/parse_date.c" +yy47: + YYDEBUG(47, *YYCURSOR); + yych = *++YYCURSOR; + goto yy46; yy48: YYDEBUG(48, *YYCURSOR); - yych = *++YYCURSOR; - goto yy8; + ++YYCURSOR; + goto yy49; yy49: YYDEBUG(49, *YYCURSOR); - yych = *++YYCURSOR; - goto yy3; + +#line 1399 "ext/date/lib/parse_date.re" +{ + s->pos = cursor; s->line++; + goto std; + } +#line 2020 "ext/date/lib/parse_date.c" yy50: YYDEBUG(50, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy51; - } + goto yy12; yy51: YYDEBUG(51, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy52; - } + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; + goto yy52; yy52: YYDEBUG(52, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == ')') goto yy49; - goto yy3; + if(yybm[0+yych] & 8) { + goto yy51; + } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': case 't': goto yy65; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } yy53: YYDEBUG(53, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy3; - } - } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy51; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy54; - } + YYCURSOR = YYMARKER; + switch(yyaccept){ + case 26: goto yy1291; + case 24: goto yy1260; + case 25: goto yy1268; + case 23: goto yy1184; + case 22: goto yy1181; + case 11: goto yy634; + case 20: goto yy1127; + case 21: goto yy1135; + case 13: goto yy784; + case 18: goto yy1024; + case 12: goto yy775; + case 8: goto yy420; + case 17: goto yy889; + case 6: goto yy363; + case 10: goto yy620; + case 16: goto yy922; + case 19: goto yy933; + case 15: goto yy915; + case 14: goto yy880; + case 9: goto yy526; + case 5: goto yy341; + case 4: goto yy172; + case 1: goto yy3; + case 7: goto yy385; + case 3: goto yy69; + case 2: goto yy46; + case 0: goto yy12; } yy54: YYDEBUG(54, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych != '/') goto yy3; - goto yy55; - } - } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy55: - YYDEBUG(55, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych <= '@') goto yy56; - if(yych <= 'Z') goto yy57; - goto yy56; + goto yy55; +yy55: + YYDEBUG(55, *YYCURSOR); + if(yybm[0+yych] & 16) { + goto yy54; + } + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy51; + goto yy53; yy56: YYDEBUG(56, *YYCURSOR); - YYCURSOR = YYMARKER; - switch(yyaccept){ - case 11: goto yy808; - case 20: goto yy1275; - case 21: goto yy1283; - case 12: goto yy953; - case 18: goto yy1182; - case 8: goto yy568; - case 17: goto yy1047; - case 6: goto yy513; - case 10: goto yy794; - case 16: goto yy1080; - case 19: goto yy1091; - case 15: goto yy1073; - case 13: goto yy986; - case 14: goto yy1038; - case 9: goto yy690; - case 5: goto yy193; - case 4: goto yy161; - case 3: goto yy154; - case 1: goto yy3; - case 7: goto yy531; - case 2: goto yy88; - case 0: goto yy8; - } -yy57: - YYDEBUG(57, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); yych = *YYCURSOR; - if(yybm[0+yych] & 8) { - goto yy58; + goto yy57; +yy57: + YYDEBUG(57, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': case 't': goto yy65; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + default: goto yy53; } - goto yy56; yy58: YYDEBUG(58, *YYCURSOR); - yyaccept = 1; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy59; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; + } else { + if(yych <= 'E') goto yy120; + if(yych <= 'T') goto yy53; + goto yy118; + } + } else { + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; + } else { + if(yych <= 'e') goto yy120; + if(yych == 'u') goto yy118; + goto yy53; + } + } yy59: YYDEBUG(59, *YYCURSOR); - if(yybm[0+yych] & 8) { - goto yy58; - } - if(yych == '/') goto yy55; - if(yych == '_') goto yy55; - goto yy3; -yy60: - YYDEBUG(60, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; } else { - if(yych <= '_'){ - if(yych <= '^') goto yy3; - goto yy55; + if(yych <= 'i'){ + if(yych <= 'h') goto yy53; + goto yy110; } else { - if(yych <= '`') goto yy3; - if(yych >= '{') goto yy3; - goto yy61; + if(yych == 'o') goto yy109; + goto yy53; } } +yy60: + YYDEBUG(60, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy107; + if(yych == 'o') goto yy107; + goto yy53; yy61: YYDEBUG(61, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy62; + yych = *++YYCURSOR; + if(yych == 'A') goto yy106; + if(yych == 'a') goto yy106; + goto yy53; yy62: YYDEBUG(62, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy61; - goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy98; + if(yych == 'e') goto yy98; + goto yy53; yy63: YYDEBUG(63, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'R'){ + if(yych == 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; } else { - if(yych <= 'Z') goto yy50; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy50; - goto yy3; + if(yych <= 'o'){ + if(yych <= 'n') goto yy53; + goto yy83; + } else { + if(yych == 'r') goto yy82; + goto yy53; + } } yy64: YYDEBUG(64, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy150; - case '6': - case '7': - case '8': - case '9': goto yy66; - case ':': goto yy67; - default: goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy79; + if(yych == 'e') goto yy79; + goto yy53; yy65: YYDEBUG(65, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': goto yy150; - case '4': - case '5': goto yy68; - case '6': - case '7': - case '8': - case '9': goto yy79; - case ':': goto yy67; - default: goto yy3; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'H') goto yy66; + if(yych <= 'T') goto yy53; + goto yy67; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy66; + } else { + if(yych == 'u') goto yy67; + goto yy53; + } } yy66: YYDEBUG(66, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy68; - case '6': - case '7': - case '8': - case '9': goto yy79; - case ':': goto yy67; - default: goto yy3; - } + yych = *++YYCURSOR; + if(yych == 'U') goto yy74; + if(yych == 'u') goto yy74; + goto yy53; yy67: YYDEBUG(67, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy3; - if(yych <= '5') goto yy149; - goto yy3; + yych = *++YYCURSOR; + if(yych == 'E') goto yy68; + if(yych != 'e') goto yy53; + goto yy68; yy68: YYDEBUG(68, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy148; - goto yy70; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'S') goto yy70; + if(yych == 's') goto yy70; + goto yy69; yy69: YYDEBUG(69, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy70; + +#line 1378 "ext/date/lib/parse_date.re" +{ + timelib_ull i; + DEBUG_OUTPUT("relative"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + + while(*ptr) { + i = timelib_get_unsigned_nr((char **) &ptr, 24); + timelib_eat_spaces((char **) &ptr); + timelib_set_relative((char **) &ptr, i, 0, s); + } + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } +#line 2205 "ext/date/lib/parse_date.c" yy70: YYDEBUG(70, *YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': case 't': goto yy78; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy71; + if(yych != 'd') goto yy53; + goto yy71; yy71: YYDEBUG(71, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy136; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy136; - if(yych == 'u') goto yy135; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy72; + if(yych != 'a') goto yy53; + goto yy72; yy72: YYDEBUG(72, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy126; - } else { - if(yych == 'o') goto yy125; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych != 'y') goto yy53; + goto yy73; yy73: YYDEBUG(73, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy123; - if(yych == 'o') goto yy123; - goto yy56; + yych = *++YYCURSOR; + goto yy69; yy74: YYDEBUG(74, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy122; - if(yych == 'a') goto yy122; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'R') goto yy75; + if(yych != 'r') goto yy69; + goto yy75; yy75: YYDEBUG(75, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy114; - if(yych == 'e') goto yy114; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy76; + if(yych != 's') goto yy53; + goto yy76; yy76: YYDEBUG(76, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; - } else { - if(yych <= 'o'){ - if(yych <= 'n') goto yy56; - goto yy99; - } else { - if(yych == 'r') goto yy98; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy77; + if(yych != 'd') goto yy53; + goto yy77; yy77: YYDEBUG(77, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy95; - if(yych == 'e') goto yy95; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy78; + if(yych != 'a') goto yy53; + goto yy78; yy78: YYDEBUG(78, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych == 'H') goto yy81; - if(yych <= 'T') goto yy56; - goto yy82; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy81; - } else { - if(yych == 'u') goto yy82; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy79: YYDEBUG(79, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'A') goto yy80; + if(yych != 'a') goto yy53; goto yy80; yy80: YYDEBUG(80, *YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': case 't': goto yy78; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy81; + if(yych != 'r') goto yy53; + goto yy81; yy81: YYDEBUG(81, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy90; - if(yych == 'u') goto yy90; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy73; + if(yych == 's') goto yy73; + goto yy69; yy82: YYDEBUG(82, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy83; - if(yych != 'e') goto yy56; - goto yy83; + yych = *++YYCURSOR; + if(yych == 'I') goto yy95; + if(yych == 'i') goto yy95; + goto yy53; yy83: YYDEBUG(83, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy84; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy84; + if(yych != 'r') goto yy53; goto yy84; yy84: YYDEBUG(84, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy85; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy85; + if(yych != 't') goto yy53; goto yy85; yy85: YYDEBUG(85, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy86; - if(yych != 'a') goto yy56; - goto yy86; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy87; + if(yych <= 'M') goto yy53; + goto yy86; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy87; + } else { + if(yych != 'n') goto yy53; + goto yy86; + } + } yy86: YYDEBUG(86, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych != 'y') goto yy56; - goto yy87; + yych = *++YYCURSOR; + if(yych == 'I') goto yy92; + if(yych == 'i') goto yy92; + goto yy53; yy87: YYDEBUG(87, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych == '+') goto yy89; - if(yych == '-') goto yy89; + yych = *++YYCURSOR; + if(yych == 'N') goto yy88; + if(yych != 'n') goto yy53; goto yy88; yy88: YYDEBUG(88, *YYCURSOR); - -#line 1345 "ext/date/lib/parse_date.re" -{ - timelib_ull i; - DEBUG_OUTPUT("relative"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_unsigned_nr((char **) &ptr, 24); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, 0, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 2351 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych == 'I') goto yy89; + if(yych != 'i') goto yy53; + goto yy89; yy89: YYDEBUG(89, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy90; + if(yych != 'g') goto yy53; + goto yy90; yy90: YYDEBUG(90, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy91; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy91; + if(yych != 'h') goto yy53; goto yy91; yy91: YYDEBUG(91, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy92; - if(yych != 's') goto yy56; - goto yy92; + yych = *++YYCURSOR; + if(yych == 'T') goto yy81; + if(yych == 't') goto yy81; + goto yy53; yy92: YYDEBUG(92, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy93; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy93; + if(yych != 'g') goto yy53; goto yy93; yy93: YYDEBUG(93, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy94; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy94; + if(yych != 'h') goto yy53; goto yy94; yy94: YYDEBUG(94, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy81; + if(yych == 't') goto yy81; + goto yy53; yy95: YYDEBUG(95, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy96; - if(yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy96; + if(yych != 'd') goto yy69; goto yy96; yy96: YYDEBUG(96, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy97; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy97; + if(yych != 'a') goto yy53; goto yy97; yy97: YYDEBUG(97, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= '-'){ - if(yych == '+') goto yy89; - if(yych <= ',') goto yy88; - goto yy89; - } else { - if(yych <= 'S'){ - if(yych <= 'R') goto yy88; - goto yy87; - } else { - if(yych == 's') goto yy87; - goto yy88; - } - } + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy98: YYDEBUG(98, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy111; - if(yych == 'i') goto yy111; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy53; + if(yych <= 'D') goto yy100; + goto yy99; + } else { + if(yych <= 'c') goto yy53; + if(yych <= 'd') goto yy100; + if(yych >= 'f') goto yy53; + goto yy99; + } yy99: YYDEBUG(99, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy100; - if(yych != 'r') goto yy56; - goto yy100; + yych = *++YYCURSOR; + if(yych == 'K') goto yy81; + if(yych == 'k') goto yy81; + goto yy53; yy100: YYDEBUG(100, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy101; - if(yych != 't') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'N') goto yy101; + if(yych != 'n') goto yy69; goto yy101; yy101: YYDEBUG(101, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'N'){ - if(yych == 'H') goto yy103; - if(yych <= 'M') goto yy56; - goto yy102; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy103; - } else { - if(yych != 'n') goto yy56; - goto yy102; - } - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy102; + if(yych != 'e') goto yy53; + goto yy102; yy102: YYDEBUG(102, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy108; - if(yych == 'i') goto yy108; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy103; + if(yych != 's') goto yy53; + goto yy103; yy103: YYDEBUG(103, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy104; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy104; + if(yych != 'd') goto yy53; goto yy104; yy104: YYDEBUG(104, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy105; - if(yych != 'i') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy105; + if(yych != 'a') goto yy53; goto yy105; yy105: YYDEBUG(105, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy106; - if(yych != 'g') goto yy56; - goto yy106; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy106: YYDEBUG(106, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy107; - if(yych != 'h') goto yy56; - goto yy107; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy81; + if(yych == 'y') goto yy81; + goto yy53; yy107: YYDEBUG(107, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy97; - if(yych == 't') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy108; + if(yych != 'u') goto yy53; + goto yy108; yy108: YYDEBUG(108, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy109; - if(yych != 'g') goto yy56; - goto yy109; + yych = *++YYCURSOR; + if(yych == 'R') goto yy81; + if(yych == 'r') goto yy81; + goto yy53; yy109: YYDEBUG(109, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy110; - if(yych != 'h') goto yy56; - goto yy110; + yych = *++YYCURSOR; + if(yych == 'N') goto yy114; + if(yych == 'n') goto yy114; + goto yy53; yy110: YYDEBUG(110, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy97; - if(yych == 't') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy111; + if(yych != 'n') goto yy53; + goto yy111; yy111: YYDEBUG(111, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy112; - if(yych != 'd') goto yy56; - goto yy112; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych == 'S') goto yy73; + if(yych <= 'T') goto yy69; + goto yy112; + } else { + if(yych <= 's'){ + if(yych <= 'r') goto yy69; + goto yy73; + } else { + if(yych != 'u') goto yy69; + goto yy112; + } + } yy112: YYDEBUG(112, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy113; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy113; + if(yych != 't') goto yy53; goto yy113; yy113: YYDEBUG(113, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy81; + if(yych == 'e') goto yy81; + goto yy53; yy114: YYDEBUG(114, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'E'){ - if(yych <= 'C') goto yy56; - if(yych <= 'D') goto yy116; - goto yy115; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == 'D') goto yy115; + if(yych <= 'S') goto yy69; + goto yy116; } else { - if(yych <= 'c') goto yy56; - if(yych <= 'd') goto yy116; - if(yych >= 'f') goto yy56; - goto yy115; + if(yych <= 'd'){ + if(yych <= 'c') goto yy69; + goto yy115; + } else { + if(yych == 't') goto yy116; + goto yy69; + } } yy115: YYDEBUG(115, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'K') goto yy97; - if(yych == 'k') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy117; + if(yych == 'a') goto yy117; + goto yy53; yy116: YYDEBUG(116, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy117; - if(yych != 'n') goto yy56; - goto yy117; + yych = *++YYCURSOR; + if(yych == 'H') goto yy81; + if(yych == 'h') goto yy81; + goto yy53; yy117: YYDEBUG(117, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy118; - if(yych != 'e') goto yy56; - goto yy118; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy118: YYDEBUG(118, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy119; - if(yych != 's') goto yy56; - goto yy119; + yych = *++YYCURSOR; + if(yych == 'N') goto yy129; + if(yych == 'n') goto yy129; + goto yy53; yy119: YYDEBUG(119, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy120; - if(yych != 'd') goto yy56; - goto yy120; + yych = *++YYCURSOR; + if(yych == 'T') goto yy124; + if(yych == 't') goto yy124; + goto yy53; yy120: YYDEBUG(120, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy121; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy121; + if(yych != 'c') goto yy53; goto yy121; yy121: YYDEBUG(121, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == 'O') goto yy122; + if(yych <= 'R') goto yy69; + goto yy73; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy69; + goto yy122; + } else { + if(yych == 's') goto yy73; + goto yy69; + } + } yy122: YYDEBUG(122, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy97; - if(yych == 'y') goto yy97; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy123; + if(yych != 'n') goto yy53; + goto yy123; yy123: YYDEBUG(123, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy124; - if(yych != 'u') goto yy56; - goto yy124; + yych = *++YYCURSOR; + if(yych == 'D') goto yy81; + if(yych == 'd') goto yy81; + goto yy53; yy124: YYDEBUG(124, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy97; - if(yych == 'r') goto yy97; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy125; + if(yych != 'u') goto yy69; + goto yy125; yy125: YYDEBUG(125, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy130; - if(yych == 'n') goto yy130; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy126; + if(yych != 'r') goto yy53; + goto yy126; yy126: YYDEBUG(126, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy127; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy127; + if(yych != 'd') goto yy53; goto yy127; yy127: YYDEBUG(127, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'S'){ - if(yych <= ','){ - if(yych == '+') goto yy89; - goto yy88; - } else { - if(yych <= '-') goto yy89; - if(yych <= 'R') goto yy88; - goto yy87; - } - } else { - if(yych <= 'r'){ - if(yych != 'U') goto yy88; - goto yy128; - } else { - if(yych <= 's') goto yy87; - if(yych != 'u') goto yy88; - goto yy128; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy128; + if(yych != 'a') goto yy53; + goto yy128; yy128: YYDEBUG(128, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy129; - if(yych != 't') goto yy56; - goto yy129; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy129: YYDEBUG(129, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy97; - if(yych == 'e') goto yy97; - goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy130; + if(yych != 'd') goto yy69; + goto yy130; yy130: YYDEBUG(130, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'T'){ - if(yych == 'D') goto yy131; - if(yych <= 'S') goto yy56; - goto yy132; - } else { - if(yych <= 'd'){ - if(yych <= 'c') goto yy56; - goto yy131; - } else { - if(yych == 't') goto yy132; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy131; + if(yych != 'a') goto yy53; + goto yy131; yy131: YYDEBUG(131, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy133; - if(yych == 'a') goto yy133; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy73; + if(yych == 'y') goto yy73; + goto yy53; yy132: YYDEBUG(132, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy97; - if(yych == 'h') goto yy97; - goto yy56; + yych = *++YYCURSOR; + goto yy3; yy133: YYDEBUG(133, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy134; + } yy134: YYDEBUG(134, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy143; - if(yych == 't') goto yy143; - goto yy56; -yy135: + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy135; + } +yy135: YYDEBUG(135, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy140; - if(yych == 'n') goto yy140; - goto yy56; + yych = *++YYCURSOR; + if(yych == ')') goto yy132; + goto yy3; yy136: YYDEBUG(136, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'C') goto yy137; - if(yych != 'c') goto yy56; - goto yy137; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } + } else { + if(yych <= '_'){ + if(yych <= 'Z') goto yy134; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy137; + } + } yy137: YYDEBUG(137, *YYCURSOR); - yyaccept = 2; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'O'){ - if(yych <= ','){ - if(yych == '+') goto yy89; - goto yy88; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '-') goto yy89; - if(yych <= 'N') goto yy88; + if(yych != '/') goto yy3; goto yy138; } } else { - if(yych <= 'n'){ - if(yych == 'S') goto yy87; - goto yy88; + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; } else { - if(yych <= 'o') goto yy138; - if(yych == 's') goto yy87; - goto yy88; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy142; + goto yy3; } } yy138: @@ -3014,16770 +2857,14774 @@ yy138: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'N') goto yy139; - if(yych != 'n') goto yy56; + if(yych <= '@') goto yy53; + if(yych >= '[') goto yy53; goto yy139; yy139: YYDEBUG(139, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'D') goto yy97; - if(yych == 'd') goto yy97; - goto yy56; + if(yybm[0+yych] & 32) { + goto yy140; + } + goto yy53; yy140: YYDEBUG(140, *YYCURSOR); - ++YYCURSOR; + yyaccept = 1; + YYMARKER = ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'D') goto yy141; - if(yych != 'd') goto yy56; goto yy141; yy141: YYDEBUG(141, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy142; - if(yych != 'a') goto yy56; - goto yy142; + if(yybm[0+yych] & 32) { + goto yy140; + } + if(yych == '/') goto yy138; + if(yych == '_') goto yy138; + goto yy3; yy142: YYDEBUG(142, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych >= '{') goto yy3; + goto yy143; + } + } yy143: YYDEBUG(143, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych == 'U') goto yy144; - if(yych != 'u') goto yy56; goto yy144; yy144: YYDEBUG(144, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy145; - if(yych != 'r') goto yy56; - goto yy145; + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy53; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy143; + goto yy53; + } yy145: YYDEBUG(145, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy146; - if(yych != 'd') goto yy56; - goto yy146; + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Z') goto yy133; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy133; + goto yy3; + } yy146: YYDEBUG(146, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy147; - if(yych != 'a') goto yy56; - goto yy147; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy148; + case ':': goto yy149; + default: goto yy3; + } yy147: YYDEBUG(147, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy87; - if(yych == 'y') goto yy87; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': goto yy148; + case '4': + case '5': goto yy150; + case '6': + case '7': + case '8': + case '9': goto yy151; + case ':': goto yy149; + default: goto yy3; + } yy148: YYDEBUG(148, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': goto yy150; + case '6': + case '7': + case '8': + case '9': goto yy151; + case ':': goto yy149; + default: goto yy3; + } +yy149: + YYDEBUG(149, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy3; + if(yych <= '5') goto yy152; + if(yych <= '9') goto yy132; + goto yy3; +yy150: + YYDEBUG(150, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy151; + default: goto yy3; + } +yy151: + YYDEBUG(151, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; } if(yych <= 'X'){ if(yych <= 'G'){ if(yych <= 'C'){ - if(yych == ' ') goto yy70; + if(yych == ' ') goto yy57; goto yy3; } else { if(yych == 'E') goto yy3; - if(yych <= 'F') goto yy70; + if(yych <= 'F') goto yy57; goto yy3; } } else { if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; goto yy3; } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; goto yy3; } } } else { if(yych <= 'l'){ if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; goto yy3; } else { if(yych == 'g') goto yy3; - if(yych <= 'h') goto yy70; + if(yych <= 'h') goto yy57; goto yy3; } } else { if(yych <= 'v'){ - if(yych <= 'm') goto yy70; + if(yych <= 'm') goto yy57; if(yych <= 'r') goto yy3; - if(yych <= 't') goto yy70; + if(yych <= 't') goto yy57; goto yy3; } else { if(yych == 'x') goto yy3; - if(yych <= 'y') goto yy70; + if(yych <= 'y') goto yy57; goto yy3; } } } -yy149: - YYDEBUG(149, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy49; - goto yy56; -yy150: - YYDEBUG(150, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': goto yy151; - case '6': - case '7': - case '8': - case '9': goto yy148; - case ':': goto yy67; - default: goto yy3; - } -yy151: - YYDEBUG(151, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy148; - default: goto yy3; - } yy152: YYDEBUG(152, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'D'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy132; + goto yy3; +yy153: + YYDEBUG(153, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'E'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'C') goto yy51; - goto yy153; + if(yych <= 'D') goto yy134; + goto yy154; } } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy51; + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; if(yych <= '`') goto yy3; - goto yy51; + goto yy134; } else { - if(yych <= 'd') goto yy153; - if(yych <= 'z') goto yy51; + if(yych <= 'e') goto yy154; + if(yych <= 'z') goto yy134; goto yy3; } } -yy153: - YYDEBUG(153, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= 'N'){ +yy154: + YYDEBUG(154, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'V'){ if(yych <= ')'){ - if(yych >= ')') goto yy49; - goto yy154; + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '@') goto yy154; - if(yych <= 'M') goto yy52; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; goto yy155; } } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy52; - if(yych >= 'a') goto yy52; - goto yy154; + if(yych <= 'u'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'n') goto yy155; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'v') goto yy155; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy154: - YYDEBUG(154, *YYCURSOR); - -#line 1300 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("dayabbr"); - goto std; - } -#line 2927 "ext/date/lib/parse_date.c" yy155: YYDEBUG(155, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == ')') goto yy49; + if(yych <= 'H'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= 'E') goto yy156; - if(yych != 'e') goto yy3; + if(yych <= 'I') goto yy156; + if(yych != 'i') goto yy3; goto yy156; } yy156: YYDEBUG(156, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy157; - if(yych != 's') goto yy56; + if(yych == 'O') goto yy157; + if(yych != 'o') goto yy53; goto yy157; yy157: YYDEBUG(157, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy158; - if(yych != 'd') goto yy56; + if(yych == 'U') goto yy158; + if(yych != 'u') goto yy53; goto yy158; yy158: YYDEBUG(158, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy159; - if(yych != 'a') goto yy56; + if(yych == 'S') goto yy159; + if(yych != 's') goto yy53; goto yy159; yy159: YYDEBUG(159, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych != 'y') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; goto yy160; yy160: YYDEBUG(160, *YYCURSOR); - ++YYCURSOR; - goto yy161; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy159; + case 'D': case 'd': goto yy164; + case 'F': case 'f': goto yy166; + case 'H': case 'h': goto yy163; + case 'M': case 'm': goto yy162; + case 'S': case 's': goto yy161; + case 'T': case 't': goto yy168; + case 'W': case 'w': goto yy165; + case 'Y': case 'y': goto yy167; + default: goto yy53; + } yy161: YYDEBUG(161, *YYCURSOR); - -#line 1283 "ext/date/lib/parse_date.re" -{ - const timelib_relunit* relunit; - DEBUG_OUTPUT("dayfull"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - relunit = timelib_lookup_relunit((char**) &ptr); - s->time->relative.weekday = relunit->multiplier; - s->time->relative.weekday_behavior = 1; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 2973 "ext/date/lib/parse_date.c" -yy162: - YYDEBUG(162, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy222; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'C') goto yy51; - goto yy153; + if(yych <= 'E') goto yy223; + if(yych <= 'T') goto yy53; + goto yy221; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'd'){ + if(yych == 'a') goto yy222; + goto yy53; } else { - if(yych == 'd') goto yy163; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'e') goto yy223; + if(yych == 'u') goto yy221; + goto yy53; } } -yy163: - YYDEBUG(163, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'M') goto yy52; - goto yy155; - } +yy162: + YYDEBUG(162, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy213; + if(yych <= 'N') goto yy53; + goto yy212; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'i'){ + if(yych <= 'h') goto yy53; + goto yy213; } else { - if(yych == 'n') goto yy164; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych == 'o') goto yy212; + goto yy53; } } +yy163: + YYDEBUG(163, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy210; + if(yych == 'o') goto yy210; + goto yy53; yy164: YYDEBUG(164, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'D') goto yy3; - goto yy156; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'e') goto yy165; - if(yych <= 'z') goto yy61; - goto yy3; - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy209; + if(yych == 'a') goto yy209; + goto yy53; yy165: YYDEBUG(165, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy157; - if(yych != 's') goto yy62; - goto yy166; + if(yych == 'E') goto yy201; + if(yych == 'e') goto yy201; + goto yy53; yy166: YYDEBUG(166, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'D') goto yy158; - if(yych != 'd') goto yy62; - goto yy167; + if(yych <= 'R'){ + if(yych == 'O') goto yy186; + if(yych <= 'Q') goto yy53; + goto yy185; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy53; + goto yy186; + } else { + if(yych == 'r') goto yy185; + goto yy53; + } + } yy167: YYDEBUG(167, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy159; - if(yych != 'a') goto yy62; - goto yy168; + if(yych == 'E') goto yy182; + if(yych == 'e') goto yy182; + goto yy53; yy168: YYDEBUG(168, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych != 'y') goto yy62; - goto yy169; -yy169: - YYDEBUG(169, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy161; + if(yych <= 'U'){ + if(yych == 'H') goto yy169; + if(yych <= 'T') goto yy53; + goto yy170; } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy161; - if(yych <= 'z') goto yy61; - goto yy161; + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy169; + } else { + if(yych == 'u') goto yy170; + goto yy53; + } } +yy169: + YYDEBUG(169, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'U') goto yy177; + if(yych == 'u') goto yy177; + goto yy53; yy170: YYDEBUG(170, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy171; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'e') goto yy171; - if(yych <= 'z') goto yy51; - goto yy3; - } - } + if(yych == 'E') goto yy171; + if(yych != 'e') goto yy53; + goto yy171; yy171: YYDEBUG(171, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy172; - } - } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'v') goto yy172; - if(yych <= 'z') goto yy52; - goto yy3; - } - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'S') goto yy173; + if(yych == 's') goto yy173; + goto yy172; yy172: YYDEBUG(172, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'I') goto yy173; - if(yych != 'i') goto yy3; - goto yy173; + +#line 1322 "ext/date/lib/parse_date.re" +{ + timelib_sll i; + int behavior; + DEBUG_OUTPUT("relativetext"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + + while(*ptr) { + i = timelib_get_relative_text((char **) &ptr, &behavior); + timelib_eat_spaces((char **) &ptr); + timelib_set_relative((char **) &ptr, i, behavior, s); + } + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } +#line 2959 "ext/date/lib/parse_date.c" yy173: YYDEBUG(173, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy174; - if(yych != 'o') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy174; + if(yych != 'd') goto yy53; goto yy174; yy174: YYDEBUG(174, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy175; - if(yych != 'u') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy175; + if(yych != 'a') goto yy53; goto yy175; yy175: YYDEBUG(175, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy176; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych != 'y') goto yy53; goto yy176; yy176: YYDEBUG(176, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy177; + yych = *++YYCURSOR; + goto yy172; yy177: YYDEBUG(177, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy176; - case 'D': case 'd': goto yy181; - case 'F': case 'f': goto yy183; - case 'H': case 'h': goto yy180; - case 'M': case 'm': goto yy179; - case 'S': case 's': goto yy178; - case 'T': case 't': goto yy185; - case 'W': case 'w': goto yy182; - case 'Y': case 'y': goto yy184; - default: goto yy56; - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'R') goto yy178; + if(yych != 'r') goto yy172; + goto yy178; yy178: YYDEBUG(178, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy297; - goto yy56; - } else { - if(yych <= 'E') goto yy299; - if(yych <= 'T') goto yy56; - goto yy298; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy297; - goto yy56; - } else { - if(yych <= 'e') goto yy299; - if(yych == 'u') goto yy298; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'S') goto yy179; + if(yych != 's') goto yy53; + goto yy179; yy179: YYDEBUG(179, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy289; - if(yych <= 'N') goto yy56; - goto yy288; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy289; - } else { - if(yych == 'o') goto yy288; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy180; + if(yych != 'd') goto yy53; + goto yy180; yy180: YYDEBUG(180, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy286; - if(yych == 'o') goto yy286; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy181; + if(yych != 'a') goto yy53; + goto yy181; yy181: YYDEBUG(181, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy285; - if(yych == 'a') goto yy285; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy182: YYDEBUG(182, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy277; - if(yych == 'e') goto yy277; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy183; + if(yych != 'a') goto yy53; + goto yy183; yy183: YYDEBUG(183, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'O') goto yy262; - if(yych <= 'Q') goto yy56; - goto yy261; - } else { - if(yych <= 'o'){ - if(yych <= 'n') goto yy56; - goto yy262; - } else { - if(yych == 'r') goto yy261; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych != 'r') goto yy53; + goto yy184; yy184: YYDEBUG(184, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy256; - if(yych == 'e') goto yy256; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy176; + if(yych == 's') goto yy176; + goto yy172; yy185: YYDEBUG(185, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'U'){ - if(yych == 'H') goto yy186; - if(yych <= 'T') goto yy56; - goto yy187; - } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy186; - } else { - if(yych == 'u') goto yy187; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'I') goto yy198; + if(yych == 'i') goto yy198; + goto yy53; yy186: YYDEBUG(186, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy251; - if(yych == 'u') goto yy251; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy187; + if(yych != 'r') goto yy53; + goto yy187; yy187: YYDEBUG(187, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy188; - if(yych != 'e') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy188; + if(yych != 't') goto yy53; goto yy188; yy188: YYDEBUG(188, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy189; - if(yych != 's') goto yy56; - goto yy189; -yy189: + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy190; + if(yych <= 'M') goto yy53; + goto yy189; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy190; + } else { + if(yych != 'n') goto yy53; + goto yy189; + } + } +yy189: YYDEBUG(189, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy190; - if(yych != 'd') goto yy56; - goto yy190; + yych = *++YYCURSOR; + if(yych == 'I') goto yy195; + if(yych == 'i') goto yy195; + goto yy53; yy190: YYDEBUG(190, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy191; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy191; + if(yych != 'n') goto yy53; goto yy191; yy191: YYDEBUG(191, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych != 'y') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy192; + if(yych != 'i') goto yy53; goto yy192; yy192: YYDEBUG(192, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy196; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'G') goto yy193; + if(yych != 'g') goto yy53; + goto yy193; yy193: YYDEBUG(193, *YYCURSOR); - -#line 1266 "ext/date/lib/parse_date.re" -{ - timelib_sll i; - int behavior; - DEBUG_OUTPUT("relativetext"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_relative_text((char **) &ptr, &behavior); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, behavior, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 3315 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych == 'H') goto yy194; + if(yych != 'h') goto yy53; + goto yy194; yy194: YYDEBUG(194, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'O'){ - if(yych == 'I') goto yy242; - if(yych <= 'N') goto yy56; - goto yy243; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy242; - } else { - if(yych == 'o') goto yy243; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy184; + goto yy53; yy195: YYDEBUG(195, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'I'){ - if(yych == 'E') goto yy238; - if(yych <= 'H') goto yy56; - goto yy237; - } else { - if(yych <= 'e'){ - if(yych <= 'd') goto yy56; - goto yy238; - } else { - if(yych == 'i') goto yy237; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'G') goto yy196; + if(yych != 'g') goto yy53; + goto yy196; yy196: YYDEBUG(196, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'I'){ - if(yych == 'E') goto yy226; - if(yych <= 'H') goto yy56; - goto yy227; - } else { - if(yych <= 'e'){ - if(yych <= 'd') goto yy56; - goto yy226; - } else { - if(yych == 'i') goto yy227; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy197; + if(yych != 'h') goto yy53; + goto yy197; yy197: YYDEBUG(197, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'W'){ - if(yych <= 'G'){ - if(yych == 'E') goto yy217; - goto yy56; - } else { - if(yych <= 'H') goto yy215; - if(yych <= 'V') goto yy56; - goto yy216; - } - } else { - if(yych <= 'g'){ - if(yych == 'e') goto yy217; - goto yy56; - } else { - if(yych <= 'h') goto yy215; - if(yych == 'w') goto yy216; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy184; + goto yy53; yy198: YYDEBUG(198, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'L'){ - if(yych == 'I') goto yy207; - if(yych <= 'K') goto yy56; - goto yy206; - } else { - if(yych <= 'i'){ - if(yych <= 'h') goto yy56; - goto yy207; - } else { - if(yych == 'l') goto yy206; - goto yy56; - } - } + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy199; + if(yych != 'd') goto yy172; + goto yy199; yy199: YYDEBUG(199, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy204; - if(yych == 'a') goto yy204; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy200; + if(yych != 'a') goto yy53; + goto yy200; yy200: YYDEBUG(200, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy201; - if(yych != 'r') goto yy56; - goto yy201; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy201: YYDEBUG(201, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy202; - if(yych != 'e') goto yy56; - goto yy202; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy53; + if(yych <= 'D') goto yy203; + goto yy202; + } else { + if(yych <= 'c') goto yy53; + if(yych <= 'd') goto yy203; + if(yych >= 'f') goto yy53; + goto yy202; + } yy202: YYDEBUG(202, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'V') goto yy203; - if(yych != 'v') goto yy56; - goto yy203; + yych = *++YYCURSOR; + if(yych == 'K') goto yy184; + if(yych == 'k') goto yy184; + goto yy53; yy203: YYDEBUG(203, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy173; - if(yych == 'i') goto yy173; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'N') goto yy204; + if(yych != 'n') goto yy172; + goto yy204; yy204: YYDEBUG(204, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy205; - if(yych != 's') goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy205; + if(yych != 'e') goto yy53; goto yy205; yy205: YYDEBUG(205, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy206; + if(yych != 's') goto yy53; + goto yy206; yy206: YYDEBUG(206, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy210; - if(yych == 'e') goto yy210; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy207; + if(yych != 'd') goto yy53; + goto yy207; yy207: YYDEBUG(207, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy208; - if(yych != 'g') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy208; + if(yych != 'a') goto yy53; goto yy208; yy208: YYDEBUG(208, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy209; - if(yych != 'h') goto yy56; - goto yy209; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy209: YYDEBUG(209, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy184; + if(yych == 'y') goto yy184; + goto yy53; yy210: YYDEBUG(210, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'V') goto yy211; - if(yych != 'v') goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy211; + if(yych != 'u') goto yy53; goto yy211; yy211: YYDEBUG(211, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy212; - if(yych != 'e') goto yy56; - goto yy212; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych == 'r') goto yy184; + goto yy53; yy212: YYDEBUG(212, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy213; - if(yych != 'n') goto yy56; - goto yy213; + yych = *++YYCURSOR; + if(yych == 'N') goto yy217; + if(yych == 'n') goto yy217; + goto yy53; yy213: YYDEBUG(213, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy214; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy214; + if(yych != 'n') goto yy53; goto yy214; yy214: YYDEBUG(214, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych == 'S') goto yy176; + if(yych <= 'T') goto yy172; + goto yy215; + } else { + if(yych <= 's'){ + if(yych <= 'r') goto yy172; + goto yy176; + } else { + if(yych != 'u') goto yy172; + goto yy215; + } + } yy215: YYDEBUG(215, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy224; - if(yych == 'i') goto yy224; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy216; + if(yych != 't') goto yy53; + goto yy216; yy216: YYDEBUG(216, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy220; - if(yych == 'e') goto yy220; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy184; + if(yych == 'e') goto yy184; + goto yy53; yy217: YYDEBUG(217, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy218; - if(yych != 'n') goto yy56; - goto yy218; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == 'D') goto yy218; + if(yych <= 'S') goto yy172; + goto yy219; + } else { + if(yych <= 'd'){ + if(yych <= 'c') goto yy172; + goto yy218; + } else { + if(yych == 't') goto yy219; + goto yy172; + } + } yy218: YYDEBUG(218, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy219; - if(yych != 't') goto yy56; - goto yy219; + yych = *++YYCURSOR; + if(yych == 'A') goto yy220; + if(yych == 'a') goto yy220; + goto yy53; yy219: YYDEBUG(219, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy184; + if(yych == 'h') goto yy184; + goto yy53; yy220: YYDEBUG(220, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'L') goto yy221; - if(yych != 'l') goto yy56; - goto yy221; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy221: YYDEBUG(221, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'F') goto yy222; - if(yych != 'f') goto yy56; - goto yy222; + yych = *++YYCURSOR; + if(yych == 'N') goto yy232; + if(yych == 'n') goto yy232; + goto yy53; yy222: YYDEBUG(222, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy223; - if(yych != 't') goto yy56; - goto yy223; + yych = *++YYCURSOR; + if(yych == 'T') goto yy227; + if(yych == 't') goto yy227; + goto yy53; yy223: YYDEBUG(223, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy224; + if(yych != 'c') goto yy53; + goto yy224; yy224: YYDEBUG(224, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'S'){ - if(yych <= 'Q') goto yy56; - if(yych >= 'S') goto yy176; - goto yy225; + if(yych == 'O') goto yy225; + if(yych <= 'R') goto yy172; + goto yy176; } else { - if(yych <= 'q') goto yy56; - if(yych <= 'r') goto yy225; - if(yych <= 's') goto yy176; - goto yy56; + if(yych <= 'o'){ + if(yych <= 'n') goto yy172; + goto yy225; + } else { + if(yych == 's') goto yy176; + goto yy172; + } } yy225: YYDEBUG(225, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy226; + if(yych != 'n') goto yy53; + goto yy226; yy226: YYDEBUG(226, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'V'){ - if(yych == 'C') goto yy230; - if(yych <= 'U') goto yy56; - goto yy231; - } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy230; - } else { - if(yych == 'v') goto yy231; - goto yy56; - } - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy184; + if(yych == 'd') goto yy184; + goto yy53; yy227: YYDEBUG(227, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'X') goto yy228; - if(yych != 'x') goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy228; + if(yych != 'u') goto yy172; goto yy228; yy228: YYDEBUG(228, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy229; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy229; + if(yych != 'r') goto yy53; goto yy229; yy229: YYDEBUG(229, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy230; + if(yych != 'd') goto yy53; + goto yy230; yy230: YYDEBUG(230, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'O') goto yy235; - if(yych == 'o') goto yy235; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy231; + if(yych != 'a') goto yy53; + goto yy231; yy231: YYDEBUG(231, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy232; - if(yych != 'e') goto yy56; - goto yy232; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy232: YYDEBUG(232, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy233; - if(yych != 'n') goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'D') goto yy233; + if(yych != 'd') goto yy172; goto yy233; yy233: YYDEBUG(233, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy234; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy234; + if(yych != 'a') goto yy53; goto yy234; yy234: YYDEBUG(234, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy176; + goto yy53; yy235: YYDEBUG(235, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy236; - if(yych != 'n') goto yy56; - goto yy236; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy154; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy236; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy236: YYDEBUG(236, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'V'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy155; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'v') goto yy237; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy237: YYDEBUG(237, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy240; - if(yych == 'n') goto yy240; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'H') goto yy3; + goto yy156; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'i') goto yy238; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy238: YYDEBUG(238, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'X') goto yy239; - if(yych != 'x') goto yy56; + yych = *++YYCURSOR; + if(yych == 'O') goto yy157; + if(yych != 'o') goto yy144; goto yy239; yy239: YYDEBUG(239, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy158; + if(yych != 'u') goto yy144; + goto yy240; yy240: YYDEBUG(240, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy241; - if(yych != 't') goto yy56; - goto yy241; + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'S') goto yy159; + goto yy53; + } + } else { + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 's') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } + } yy241: YYDEBUG(241, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'h'){ + if(yych <= '`'){ + if(yych <= '/'){ + if(yych <= '.') goto yy160; + goto yy138; + } else { + if(yych == '_') goto yy138; + goto yy160; + } + } else { + if(yych <= 'e'){ + if(yych == 'd') goto yy245; + goto yy143; + } else { + if(yych <= 'f') goto yy247; + if(yych <= 'g') goto yy143; + goto yy244; + } + } + } else { + if(yych <= 't'){ + if(yych <= 'm'){ + if(yych <= 'l') goto yy143; + goto yy243; + } else { + if(yych <= 'r') goto yy143; + if(yych >= 't') goto yy249; + goto yy242; + } + } else { + if(yych <= 'x'){ + if(yych == 'w') goto yy246; + goto yy143; + } else { + if(yych <= 'y') goto yy248; + if(yych <= 'z') goto yy143; + goto yy160; + } + } + } yy242: YYDEBUG(242, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'R'){ - if(yych == 'F') goto yy248; - if(yych <= 'Q') goto yy56; - goto yy247; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy222; + goto yy144; + } else { + if(yych <= 'E') goto yy223; + if(yych <= 'T') goto yy144; + goto yy221; + } } else { - if(yych <= 'f'){ - if(yych <= 'e') goto yy56; - goto yy248; + if(yych <= 'd'){ + if(yych == 'a') goto yy301; + goto yy144; } else { - if(yych == 'r') goto yy247; - goto yy56; + if(yych <= 'e') goto yy302; + if(yych == 'u') goto yy303; + goto yy144; } } yy243: YYDEBUG(243, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy244; - if(yych != 'u') goto yy56; - goto yy244; + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych == 'I') goto yy213; + if(yych <= 'N') goto yy144; + goto yy212; + } else { + if(yych <= 'i'){ + if(yych <= 'h') goto yy144; + goto yy292; + } else { + if(yych == 'o') goto yy293; + goto yy144; + } + } yy244: YYDEBUG(244, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy245; - if(yych != 'r') goto yy56; - goto yy245; + yych = *++YYCURSOR; + if(yych == 'O') goto yy210; + if(yych == 'o') goto yy290; + goto yy144; yy245: YYDEBUG(245, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy246; - if(yych != 't') goto yy56; - goto yy246; + yych = *++YYCURSOR; + if(yych == 'A') goto yy209; + if(yych == 'a') goto yy289; + goto yy144; yy246: YYDEBUG(246, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy201; + if(yych == 'e') goto yy281; + goto yy144; yy247: YYDEBUG(247, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy250; - if(yych == 's') goto yy250; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych == 'O') goto yy186; + if(yych <= 'Q') goto yy144; + goto yy185; + } else { + if(yych <= 'o'){ + if(yych <= 'n') goto yy144; + goto yy265; + } else { + if(yych == 'r') goto yy266; + goto yy144; + } + } yy248: YYDEBUG(248, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy249; - if(yych != 't') goto yy56; - goto yy249; + yych = *++YYCURSOR; + if(yych == 'E') goto yy182; + if(yych == 'e') goto yy262; + goto yy144; yy249: YYDEBUG(249, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'H') goto yy169; + if(yych <= 'T') goto yy144; + goto yy170; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy144; + goto yy250; + } else { + if(yych == 'u') goto yy251; + goto yy144; + } + } yy250: YYDEBUG(250, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'U') goto yy177; + if(yych == 'u') goto yy257; + goto yy144; yy251: YYDEBUG(251, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy252; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy171; + if(yych != 'e') goto yy144; goto yy252; yy252: YYDEBUG(252, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy253; - if(yych != 's') goto yy56; - goto yy253; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'S') goto yy173; + goto yy172; + } + } else { + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 's') goto yy253; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy253: YYDEBUG(253, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy254; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy174; + if(yych != 'd') goto yy144; goto yy254; yy254: YYDEBUG(254, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy255; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy175; + if(yych != 'a') goto yy144; goto yy255; yy255: YYDEBUG(255, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych != 'y') goto yy144; + goto yy256; yy256: YYDEBUG(256, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy257; - if(yych != 'a') goto yy56; - goto yy257; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'z') goto yy143; + goto yy172; + } yy257: YYDEBUG(257, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy258; - if(yych != 'r') goto yy56; - goto yy258; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'R') goto yy178; + goto yy172; + } + } else { + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'r') goto yy258; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy258: YYDEBUG(258, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'S') goto yy179; + if(yych != 's') goto yy144; + goto yy259; yy259: YYDEBUG(259, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy260; - case 'F': case 'f': goto yy194; - case 'I': case 'i': goto yy227; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy196; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'D') goto yy180; + if(yych != 'd') goto yy144; + goto yy260; yy260: YYDEBUG(260, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'V'){ - if(yych <= 'I'){ - if(yych == 'C') goto yy230; - if(yych <= 'H') goto yy56; - goto yy207; - } else { - if(yych == 'L') goto yy206; - if(yych <= 'U') goto yy56; - goto yy231; - } - } else { - if(yych <= 'i'){ - if(yych == 'c') goto yy230; - if(yych <= 'h') goto yy56; - goto yy207; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy206; - } else { - if(yych == 'v') goto yy231; - goto yy56; - } - } - } + yych = *++YYCURSOR; + if(yych == 'A') goto yy181; + if(yych != 'a') goto yy144; + goto yy261; yy261: YYDEBUG(261, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy274; - if(yych == 'i') goto yy274; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy262: YYDEBUG(262, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy263; - if(yych != 'r') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy183; + if(yych != 'a') goto yy144; goto yy263; yy263: YYDEBUG(263, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy264; - if(yych != 't') goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych != 'r') goto yy144; goto yy264; yy264: YYDEBUG(264, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'N'){ - if(yych == 'H') goto yy266; - if(yych <= 'M') goto yy56; - goto yy265; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'S') goto yy176; + goto yy172; + } } else { - if(yych <= 'h'){ - if(yych <= 'g') goto yy56; - goto yy266; + if(yych <= 'r'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; } else { - if(yych != 'n') goto yy56; - goto yy265; + if(yych <= 's') goto yy256; + if(yych <= 'z') goto yy143; + goto yy172; } } yy265: YYDEBUG(265, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy271; - if(yych == 'i') goto yy271; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'R') goto yy187; + if(yych == 'r') goto yy270; + goto yy144; yy266: YYDEBUG(266, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy267; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy198; + if(yych != 'i') goto yy144; goto yy267; yy267: YYDEBUG(267, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'I') goto yy268; - if(yych != 'i') goto yy56; - goto yy268; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'D') goto yy199; + goto yy172; + } + } else { + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'd') goto yy268; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy268: YYDEBUG(268, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy269; - if(yych != 'g') goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy200; + if(yych != 'a') goto yy144; goto yy269; yy269: YYDEBUG(269, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy270; - if(yych != 'h') goto yy56; - goto yy270; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy270: YYDEBUG(270, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy258; - if(yych == 't') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy188; + if(yych != 't') goto yy144; + goto yy271; yy271: YYDEBUG(271, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'G') goto yy272; - if(yych != 'g') goto yy56; - goto yy272; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'H') goto yy190; + if(yych <= 'M') goto yy144; + goto yy189; + } else { + if(yych <= 'h'){ + if(yych <= 'g') goto yy144; + goto yy273; + } else { + if(yych != 'n') goto yy144; + goto yy272; + } + } yy272: YYDEBUG(272, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy273; - if(yych != 'h') goto yy56; - goto yy273; + yych = *++YYCURSOR; + if(yych == 'I') goto yy195; + if(yych == 'i') goto yy278; + goto yy144; yy273: YYDEBUG(273, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy258; - if(yych == 't') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy191; + if(yych != 'n') goto yy144; + goto yy274; yy274: YYDEBUG(274, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy275; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'I') goto yy192; + if(yych != 'i') goto yy144; goto yy275; yy275: YYDEBUG(275, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy276; - if(yych != 'a') goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy193; + if(yych != 'g') goto yy144; goto yy276; yy276: YYDEBUG(276, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy194; + if(yych != 'h') goto yy144; + goto yy277; yy277: YYDEBUG(277, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'E'){ - if(yych <= 'C') goto yy56; - if(yych <= 'D') goto yy279; - goto yy278; - } else { - if(yych <= 'c') goto yy56; - if(yych <= 'd') goto yy279; - if(yych >= 'f') goto yy56; - goto yy278; - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy264; + goto yy144; yy278: YYDEBUG(278, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'K') goto yy258; - if(yych == 'k') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'G') goto yy196; + if(yych != 'g') goto yy144; + goto yy279; yy279: YYDEBUG(279, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy280; - if(yych != 'n') goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy197; + if(yych != 'h') goto yy144; goto yy280; yy280: YYDEBUG(280, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy281; - if(yych != 'e') goto yy56; - goto yy281; + yych = *++YYCURSOR; + if(yych == 'T') goto yy184; + if(yych == 't') goto yy264; + goto yy144; yy281: YYDEBUG(281, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'S') goto yy282; - if(yych != 's') goto yy56; - goto yy282; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= 'C') goto yy144; + if(yych <= 'D') goto yy203; + goto yy202; + } else { + if(yych <= 'c') goto yy144; + if(yych <= 'd') goto yy283; + if(yych >= 'f') goto yy144; + goto yy282; + } yy282: YYDEBUG(282, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy283; - if(yych != 'd') goto yy56; - goto yy283; + yych = *++YYCURSOR; + if(yych == 'K') goto yy184; + if(yych == 'k') goto yy264; + goto yy144; yy283: YYDEBUG(283, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy284; - if(yych != 'a') goto yy56; - goto yy284; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'N') goto yy204; + goto yy172; + } + } else { + if(yych <= 'm'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'n') goto yy284; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy284: YYDEBUG(284, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'E') goto yy205; + if(yych != 'e') goto yy144; + goto yy285; yy285: YYDEBUG(285, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy258; - if(yych == 'y') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'S') goto yy206; + if(yych != 's') goto yy144; + goto yy286; yy286: YYDEBUG(286, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy287; - if(yych != 'u') goto yy56; + yych = *++YYCURSOR; + if(yych == 'D') goto yy207; + if(yych != 'd') goto yy144; goto yy287; yy287: YYDEBUG(287, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy258; - if(yych == 'r') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy208; + if(yych != 'a') goto yy144; + goto yy288; yy288: YYDEBUG(288, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy293; - if(yych == 'n') goto yy293; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy289: YYDEBUG(289, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy290; - if(yych != 'n') goto yy56; - goto yy290; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy184; + if(yych == 'y') goto yy264; + goto yy144; yy290: YYDEBUG(290, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - case 'U': case 'u': goto yy291; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'U') goto yy211; + if(yych != 'u') goto yy144; + goto yy291; yy291: YYDEBUG(291, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy292; - if(yych != 't') goto yy56; - goto yy292; + yych = *++YYCURSOR; + if(yych == 'R') goto yy184; + if(yych == 'r') goto yy264; + goto yy144; yy292: YYDEBUG(292, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'E') goto yy258; - if(yych == 'e') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy214; + if(yych == 'n') goto yy298; + goto yy144; yy293: YYDEBUG(293, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= 'T'){ - if(yych == 'D') goto yy294; - if(yych <= 'S') goto yy56; - goto yy295; + yych = *++YYCURSOR; + if(yych == 'N') goto yy217; + if(yych != 'n') goto yy144; + goto yy294; +yy294: + YYDEBUG(294, *YYCURSOR); + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'C'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'D') goto yy218; + if(yych == 'T') goto yy219; + goto yy172; + } } else { if(yych <= 'd'){ - if(yych <= 'c') goto yy56; - goto yy294; + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'c') goto yy143; + goto yy295; } else { - if(yych == 't') goto yy295; - goto yy56; + if(yych == 't') goto yy296; + if(yych <= 'z') goto yy143; + goto yy172; } } -yy294: - YYDEBUG(294, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy296; - if(yych == 'a') goto yy296; - goto yy56; yy295: YYDEBUG(295, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'H') goto yy258; - if(yych == 'h') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy220; + if(yych == 'a') goto yy297; + goto yy144; yy296: YYDEBUG(296, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'H') goto yy184; + if(yych == 'h') goto yy264; + goto yy144; yy297: YYDEBUG(297, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'T') goto yy306; - if(yych == 't') goto yy306; - goto yy56; -yy298: + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; +yy298: YYDEBUG(298, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy303; - if(yych == 'n') goto yy303; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'R'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'S') goto yy176; + if(yych == 'U') goto yy215; + goto yy172; + } + } else { + if(yych <= 's'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'r') goto yy143; + goto yy256; + } else { + if(yych == 'u') goto yy299; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy299: YYDEBUG(299, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'C') goto yy300; - if(yych != 'c') goto yy56; + yych = *++YYCURSOR; + if(yych == 'T') goto yy216; + if(yych != 't') goto yy144; goto yy300; yy300: YYDEBUG(300, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'E': case 'e': goto yy198; - case 'F': case 'f': goto yy194; - case 'L': case 'l': goto yy199; - case 'N': case 'n': goto yy195; - case 'O': case 'o': goto yy301; - case 'P': case 'p': goto yy200; - case 'S': case 's': goto yy259; - case 'T': case 't': goto yy197; - default: goto yy193; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy184; + if(yych == 'e') goto yy264; + goto yy144; yy301: YYDEBUG(301, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'N') goto yy302; - if(yych != 'n') goto yy56; - goto yy302; + yych = *++YYCURSOR; + if(yych == 'T') goto yy227; + if(yych == 't') goto yy310; + goto yy144; yy302: YYDEBUG(302, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy258; - if(yych == 'd') goto yy258; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'C') goto yy224; + if(yych == 'c') goto yy307; + goto yy144; yy303: YYDEBUG(303, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy304; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy232; + if(yych != 'n') goto yy144; goto yy304; yy304: YYDEBUG(304, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy305; - if(yych != 'a') goto yy56; - goto yy305; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'D') goto yy233; + goto yy172; + } + } else { + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'd') goto yy305; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy305: YYDEBUG(305, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yych = *++YYCURSOR; + if(yych == 'A') goto yy234; + if(yych != 'a') goto yy144; + goto yy306; yy306: YYDEBUG(306, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'U') goto yy307; - if(yych != 'u') goto yy56; - goto yy307; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; yy307: YYDEBUG(307, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'R') goto yy308; - if(yych != 'r') goto yy56; - goto yy308; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= 'N'){ + if(yych == '/') goto yy138; + goto yy172; + } else { + if(yych <= 'O') goto yy225; + if(yych == 'S') goto yy176; + goto yy172; + } + } else { + if(yych <= 'o'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + if(yych <= 'n') goto yy143; + goto yy308; + } else { + if(yych == 's') goto yy256; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy308: YYDEBUG(308, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'D') goto yy309; - if(yych != 'd') goto yy56; + yych = *++YYCURSOR; + if(yych == 'N') goto yy226; + if(yych != 'n') goto yy144; goto yy309; yy309: YYDEBUG(309, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'A') goto yy310; - if(yych != 'a') goto yy56; - goto yy310; + yych = *++YYCURSOR; + if(yych == 'D') goto yy184; + if(yych == 'd') goto yy264; + goto yy144; yy310: YYDEBUG(310, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych == 'Y') goto yy192; - if(yych == 'y') goto yy192; - goto yy56; + yyaccept = 4; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy172; + goto yy138; + } else { + if(yych == 'U') goto yy228; + goto yy172; + } + } else { + if(yych <= 't'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy172; + goto yy143; + } else { + if(yych <= 'u') goto yy311; + if(yych <= 'z') goto yy143; + goto yy172; + } + } yy311: YYDEBUG(311, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + yych = *++YYCURSOR; + if(yych == 'R') goto yy229; + if(yych != 'r') goto yy144; + goto yy312; +yy312: + YYDEBUG(312, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy230; + if(yych != 'd') goto yy144; + goto yy313; +yy313: + YYDEBUG(313, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy231; + if(yych != 'a') goto yy144; + goto yy314; +yy314: + YYDEBUG(314, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy176; + if(yych == 'y') goto yy256; + goto yy144; +yy315: + YYDEBUG(315, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= '/') goto yy55; if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy171; + if(yych <= 'R') goto yy134; + goto yy316; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 's') goto yy316; + if(yych <= 'z') goto yy134; goto yy3; + } + } +yy316: + YYDEBUG(316, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'e') goto yy312; - if(yych <= 'z') goto yy54; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } + } else { + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy317; + if(yych <= 'z') goto yy135; goto yy3; } } -yy312: - YYDEBUG(312, *YYCURSOR); +yy317: + YYDEBUG(317, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy160; + case ')': goto yy132; + default: goto yy3; + } +yy318: + YYDEBUG(318, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy172; + if(yych <= 'R') goto yy134; + goto yy316; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'v') goto yy313; - if(yych <= 'z') goto yy60; + if(yych == 's') goto yy319; + if(yych <= 'z') goto yy137; goto yy3; } } -yy313: - YYDEBUG(313, *YYCURSOR); +yy319: + YYDEBUG(319, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'I'){ + if(yych <= 'T'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; - if(yych <= 'H') goto yy3; - goto yy173; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 'i') goto yy314; - if(yych <= 'z') goto yy61; + if(yych == 't') goto yy320; + if(yych <= 'z') goto yy142; goto yy3; } } -yy314: - YYDEBUG(314, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy320: + YYDEBUG(320, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': goto yy160; + case ')': goto yy132; + case '/': case '_': goto yy138; + case 'a': + case 'b': + case 'c': case 'e': case 'g': case 'i': + case 'j': + case 'k': + case 'l': case 'n': + case 'o': + case 'p': + case 'q': + case 'r': case 'u': + case 'v': case 'x': case 'z': goto yy143; + case 'd': goto yy245; + case 'f': goto yy247; + case 'h': goto yy244; + case 'm': goto yy243; + case 's': goto yy242; + case 't': goto yy249; + case 'w': goto yy246; + case 'y': goto yy248; + default: goto yy3; + } +yy321: + YYDEBUG(321, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'G'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'O') goto yy174; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy328; } } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'o') goto yy315; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'g') goto yy328; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy315: - YYDEBUG(315, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy322: + YYDEBUG(322, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'U') goto yy175; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy323; } } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'u') goto yy316; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'e') goto yy323; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy316: - YYDEBUG(316, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy323: + YYDEBUG(323, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'V'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'S') goto yy176; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy324; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'u'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 's') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'v') goto yy324; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy317: - YYDEBUG(317, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy176; - case '/': case '_': goto yy55; - case 'D': goto yy181; - case 'F': goto yy183; - case 'H': goto yy180; - case 'M': goto yy179; - case 'S': goto yy178; - case 'T': goto yy185; - case 'W': goto yy182; - case 'Y': goto yy184; - case 'a': - case 'b': - case 'c': case 'e': case 'g': case 'i': - case 'j': - case 'k': - case 'l': case 'n': - case 'o': - case 'p': - case 'q': - case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy61; - case 'd': goto yy321; - case 'f': goto yy323; - case 'h': goto yy320; - case 'm': goto yy319; - case 's': goto yy318; - case 't': goto yy325; - case 'w': goto yy322; - case 'y': goto yy324; - default: goto yy56; +yy324: + YYDEBUG(324, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'E') goto yy325; + if(yych != 'e') goto yy3; + goto yy325; } -yy318: - YYDEBUG(318, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'A'){ - if(yych == '/') goto yy55; - if(yych <= '@') goto yy56; - goto yy297; +yy325: + YYDEBUG(325, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy326; + if(yych != 'n') goto yy53; + goto yy326; +yy326: + YYDEBUG(326, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy327; + if(yych != 't') goto yy53; + goto yy327; +yy327: + YYDEBUG(327, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; +yy328: + YYDEBUG(328, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'H'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy56; - goto yy299; - } else { - if(yych == 'U') goto yy298; - goto yy56; - } + if(yych <= '@') goto yy3; + if(yych <= 'G') goto yy135; + goto yy329; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'a') goto yy436; - goto yy61; + if(yych <= 'g'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 't'){ - if(yych <= 'e') goto yy437; - goto yy61; - } else { - if(yych <= 'u') goto yy438; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'h') goto yy329; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy319: - YYDEBUG(319, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'I') goto yy289; - if(yych == 'O') goto yy288; - goto yy56; - } +yy329: + YYDEBUG(329, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy427; - } else { - if(yych == 'o') goto yy428; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'T') goto yy159; + if(yych == 't') goto yy159; + goto yy3; } -yy320: - YYDEBUG(320, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy330: + YYDEBUG(330, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'O') goto yy286; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy328; } } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'o') goto yy425; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'g') goto yy337; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy321: - YYDEBUG(321, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy331: + YYDEBUG(331, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'A') goto yy285; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy323; } } else { if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'a') goto yy424; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy332; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy322: - YYDEBUG(322, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy332: + YYDEBUG(332, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'V'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy277; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'U') goto yy135; + goto yy324; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy416; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'v') goto yy333; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy323: - YYDEBUG(323, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'N'){ - if(yych == '/') goto yy55; - goto yy56; +yy333: + YYDEBUG(333, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'O') goto yy262; - if(yych == 'R') goto yy261; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy325; } } else { - if(yych <= 'o'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'n') goto yy61; - goto yy400; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'r') goto yy401; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy334; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy324: - YYDEBUG(324, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy334: + YYDEBUG(334, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy326; + if(yych != 'n') goto yy144; + goto yy335; +yy335: + YYDEBUG(335, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy327; + if(yych != 't') goto yy144; + goto yy336; +yy336: + YYDEBUG(336, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'E') goto yy256; - goto yy56; + if(yych == 'H') goto yy159; + goto yy53; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'e') goto yy395; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy325: - YYDEBUG(325, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'G'){ - if(yych == '/') goto yy55; - goto yy56; +yy337: + YYDEBUG(337, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'H') goto yy186; - if(yych == 'U') goto yy187; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'G') goto yy135; + goto yy329; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'g') goto yy61; - goto yy326; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'u') goto yy327; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'h') goto yy338; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy326: - YYDEBUG(326, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy338: + YYDEBUG(338, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'U') goto yy251; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy159; } } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'u') goto yy390; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy327: - YYDEBUG(327, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy339: + YYDEBUG(339, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'E') goto yy188; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy340; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'c'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'e') goto yy328; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd') goto yy340; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy328: - YYDEBUG(328, *YYCURSOR); +yy340: + YYDEBUG(340, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if((yych = *YYCURSOR) <= 'N'){ + if(yych <= ')'){ + if(yych >= ')') goto yy132; + goto yy341; } else { - if(yych == 'S') goto yy189; - goto yy56; + if(yych <= '@') goto yy341; + if(yych <= 'M') goto yy135; + goto yy342; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych >= 'a') goto yy135; + goto yy341; } else { - if(yych <= 's') goto yy329; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n') goto yy342; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy329: - YYDEBUG(329, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy190; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy330; - if(yych <= 'z') goto yy61; - goto yy56; - } +yy341: + YYDEBUG(341, *YYCURSOR); + +#line 1306 "ext/date/lib/parse_date.re" +{ + const timelib_relunit* relunit; + DEBUG_OUTPUT("daytext"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + TIMELIB_HAVE_WEEKDAY_RELATIVE(); + TIMELIB_UNHAVE_TIME(); + relunit = timelib_lookup_relunit((char**) &ptr); + s->time->relative.weekday = relunit->multiplier; + s->time->relative.weekday_behavior = 1; + + TIMELIB_DEINIT; + return TIMELIB_WEEKDAY; } -yy330: - YYDEBUG(330, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'A') goto yy191; - goto yy56; - } +#line 4396 "ext/date/lib/parse_date.c" +yy342: + YYDEBUG(342, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych <= 'a') goto yy331; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'E') goto yy343; + if(yych != 'e') goto yy3; + goto yy343; } -yy331: - YYDEBUG(331, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy343: + YYDEBUG(343, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'S') goto yy344; + if(yych != 's') goto yy53; + goto yy344; +yy344: + YYDEBUG(344, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy345; + if(yych != 'd') goto yy53; + goto yy345; +yy345: + YYDEBUG(345, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy346; + if(yych != 'a') goto yy53; + goto yy346; +yy346: + YYDEBUG(346, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych != 'y') goto yy53; + goto yy347; +yy347: + YYDEBUG(347, *YYCURSOR); + yych = *++YYCURSOR; + goto yy341; +yy348: + YYDEBUG(348, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy340; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'd') goto yy349; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy332: - YYDEBUG(332, *YYCURSOR); +yy349: + YYDEBUG(349, *YYCURSOR); yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy196; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy338; - case 't': goto yy339; - default: goto yy193; - } -yy333: - YYDEBUG(333, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych <= 'I') goto yy207; - if(yych == 'L') goto yy206; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'M') goto yy135; + goto yy342; } } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy382; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych == 'l') goto yy381; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy350; + if(yych <= 'z') goto yy142; + goto yy341; } } -yy334: - YYDEBUG(334, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych == '/') goto yy55; - goto yy56; +yy350: + YYDEBUG(350, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'I') goto yy242; - if(yych == 'O') goto yy243; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy343; } } else { - if(yych <= 'i'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'h') goto yy61; - goto yy372; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'o') goto yy373; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy351; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy335: - YYDEBUG(335, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy351: + YYDEBUG(351, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'S') goto yy344; + if(yych != 's') goto yy144; + goto yy352; +yy352: + YYDEBUG(352, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy345; + if(yych != 'd') goto yy144; + goto yy353; +yy353: + YYDEBUG(353, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy346; + if(yych != 'a') goto yy144; + goto yy354; +yy354: + YYDEBUG(354, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych != 'y') goto yy144; + goto yy355; +yy355: + YYDEBUG(355, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych == '/') goto yy138; + goto yy341; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy341; + if(yych <= 'z') goto yy143; + goto yy341; + } +yy356: + YYDEBUG(356, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'C'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'A') goto yy204; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'B') goto yy134; + goto yy357; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'b'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'a') goto yy370; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'c') goto yy357; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy336: - YYDEBUG(336, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'D'){ - if(yych == '/') goto yy55; - goto yy56; +yy357: + YYDEBUG(357, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= 'E') goto yy238; - if(yych == 'I') goto yy237; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'd') goto yy61; - goto yy366; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'E') goto yy366; + goto yy135; } else { - if(yych == 'i') goto yy365; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy366; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy337: - YYDEBUG(337, *YYCURSOR); +yy358: + YYDEBUG(358, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 17) YYFILL(17); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + goto yy359; +yy359: + YYDEBUG(359, *YYCURSOR); + if(yybm[0+yych] & 64) { + goto yy358; + } + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy362; + if(yych <= '3') goto yy364; + if(yych <= '9') goto yy365; + goto yy53; +yy360: + YYDEBUG(360, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 0x1F) goto yy3; + if(yych == '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; +yy361: + YYDEBUG(361, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy359; + if(yych <= '0') goto yy440; + if(yych <= '2') goto yy441; + if(yych <= '3') goto yy442; + goto yy359; +yy362: + YYDEBUG(362, *YYCURSOR); + ++YYCURSOR; + if((yych = *YYCURSOR) <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy422; } else { - if(yych == 'R') goto yy201; - goto yy56; + if(yych <= '2') goto yy439; + if(yych <= '9') goto yy422; + goto yy378; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'r') goto yy362; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy338: - YYDEBUG(338, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'D'){ - if(yych == '/') goto yy55; - goto yy56; +yy363: + YYDEBUG(363, *YYCURSOR); + +#line 1125 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("datetextual | datenoyear"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_TEXT; + } +#line 4626 "ext/date/lib/parse_date.c" +yy364: + YYDEBUG(364, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy422; } else { - if(yych <= 'E') goto yy226; - if(yych == 'I') goto yy227; - goto yy56; + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'd') goto yy61; - goto yy351; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych == 'i') goto yy352; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy339: - YYDEBUG(339, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'E'){ - if(yych == '/') goto yy55; - if(yych <= 'D') goto yy56; - goto yy217; +yy365: + YYDEBUG(365, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy370; } else { - if(yych <= 'H'){ - if(yych <= 'G') goto yy56; - goto yy215; - } else { - if(yych == 'W') goto yy216; - goto yy56; - } + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 'g'){ - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; - } else { - if(yych == 'e') goto yy342; - goto yy61; - } + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'v'){ - if(yych >= 'i') goto yy61; - goto yy340; - } else { - if(yych <= 'w') goto yy341; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy340: - YYDEBUG(340, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'I') goto yy224; - goto yy56; - } +yy366: + YYDEBUG(366, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'i') goto yy349; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'M') goto yy367; + if(yych != 'm') goto yy3; + goto yy367; } -yy341: - YYDEBUG(341, *YYCURSOR); +yy367: + YYDEBUG(367, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy368; + if(yych != 'b') goto yy53; + goto yy368; +yy368: + YYDEBUG(368, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy369; + if(yych != 'e') goto yy53; + goto yy369; +yy369: + YYDEBUG(369, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; +yy370: + YYDEBUG(370, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy421; + if(yych <= ':') goto yy383; + goto yy363; + } +yy371: + YYDEBUG(371, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '3') goto yy421; + if(yych <= '9') goto yy418; + if(yych <= ':') goto yy383; + goto yy363; + } +yy372: + YYDEBUG(372, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy418; + if(yych <= ':') goto yy383; + goto yy363; + } +yy373: + YYDEBUG(373, *YYCURSOR); + yych = *++YYCURSOR; + goto yy378; +yy374: + YYDEBUG(374, *YYCURSOR); + yych = *++YYCURSOR; + goto yy378; +yy375: + YYDEBUG(375, *YYCURSOR); + yych = *++YYCURSOR; + goto yy378; +yy376: + YYDEBUG(376, *YYCURSOR); + yych = *++YYCURSOR; + goto yy378; +yy377: + YYDEBUG(377, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 14) YYFILL(14); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'E') goto yy220; - goto yy56; - } + goto yy378; +yy378: + YYDEBUG(378, *YYCURSOR); + if(yybm[0+yych] & 128) { + goto yy377; + } + if(yych <= '/') goto yy363; + if(yych <= '1') goto yy379; + if(yych <= '2') goto yy380; + if(yych <= '9') goto yy381; + goto yy363; +yy379: + YYDEBUG(379, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'e') goto yy345; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '9') goto yy417; + if(yych <= ':') goto yy383; + goto yy363; + } +yy380: + YYDEBUG(380, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '3') goto yy417; + if(yych <= '9') goto yy382; + if(yych <= ':') goto yy383; + goto yy363; + } +yy381: + YYDEBUG(381, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy382; + if(yych <= ':') goto yy383; + goto yy363; + } +yy382: + YYDEBUG(382, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych <= '9') goto yy415; + goto yy363; +yy383: + YYDEBUG(383, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy384; + if(yych <= '9') goto yy386; + goto yy53; +yy384: + YYDEBUG(384, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; + } else { + if(yych <= '9') goto yy386; + if(yych <= ':') goto yy387; + goto yy385; + } +yy385: + YYDEBUG(385, *YYCURSOR); + +#line 1350 "ext/date/lib/parse_date.re" +{ + int tz_not_found; + DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 8); + } + } + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; } + TIMELIB_DEINIT; + return TIMELIB_SHORTDATE_WITH_TIME; } -yy342: - YYDEBUG(342, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +#line 4820 "ext/date/lib/parse_date.c" +yy386: + YYDEBUG(386, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy387; + if(yych != ':') goto yy385; + goto yy387; +yy387: + YYDEBUG(387, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy388; + if(yych <= '6') goto yy389; + if(yych <= '9') goto yy390; + goto yy53; +yy388: + YYDEBUG(388, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy391; + goto yy385; +yy389: + YYDEBUG(389, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '0') goto yy391; + goto yy385; +yy390: + YYDEBUG(390, *YYCURSOR); + yych = *++YYCURSOR; + goto yy385; +yy391: + YYDEBUG(391, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '+'){ + if(yych <= '\''){ + if(yych != ' ') goto yy385; + goto yy392; } else { - if(yych == 'N') goto yy218; - goto yy56; + if(yych <= '(') goto yy395; + if(yych <= '*') goto yy385; + goto yy394; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych == '-') goto yy394; + goto yy385; } else { - if(yych <= 'n') goto yy343; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy397; + goto yy385; } } -yy343: - YYDEBUG(343, *YYCURSOR); +yy392: + YYDEBUG(392, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + goto yy393; +yy393: + YYDEBUG(393, *YYCURSOR); + if(yych <= '+'){ + if(yych <= '\''){ + if(yych == ' ') goto yy392; + goto yy53; } else { - if(yych == 'T') goto yy219; - goto yy56; + if(yych <= '(') goto yy395; + if(yych <= '*') goto yy53; + goto yy394; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych != '-') goto yy53; + goto yy394; } else { - if(yych <= 't') goto yy344; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy397; + goto yy53; } } -yy344: - YYDEBUG(344, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy394: + YYDEBUG(394, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy410; + if(yych <= '2') goto yy411; + if(yych <= '9') goto yy412; + goto yy53; +yy395: + YYDEBUG(395, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@') goto yy53; + if(yych <= 'Z') goto yy397; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy397; + goto yy53; +yy396: + YYDEBUG(396, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy398; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy401; + goto yy385; + } +yy397: + YYDEBUG(397, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy398; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy398; + } +yy398: + YYDEBUG(398, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy399; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy399; + } +yy399: + YYDEBUG(399, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '@'){ + if(yych == ')') goto yy390; + goto yy385; + } else { + if(yych <= 'Z') goto yy400; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy400; + } +yy400: + YYDEBUG(400, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == ')') goto yy390; + goto yy385; +yy401: + YYDEBUG(401, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy385; + goto yy390; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych == '/') goto yy403; + goto yy385; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'Z') goto yy399; + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy402; } } -yy345: - YYDEBUG(345, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy402: + YYDEBUG(402, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy385; + goto yy390; } else { - if(yych == 'L') goto yy221; - goto yy56; + if(yych != '/') goto yy385; + goto yy403; } } else { - if(yych <= 'k'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'Z') goto yy400; + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 'l') goto yy346; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy407; + goto yy385; } } -yy346: - YYDEBUG(346, *YYCURSOR); +yy403: + YYDEBUG(403, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'F') goto yy222; - goto yy56; - } - } else { - if(yych <= 'e'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'f') goto yy347; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy347: - YYDEBUG(347, *YYCURSOR); + if(yych <= '@') goto yy53; + if(yych >= '[') goto yy53; + goto yy404; +yy404: + YYDEBUG(404, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; + if(yych <= '`') goto yy53; + if(yych >= '{') goto yy53; + goto yy405; +yy405: + YYDEBUG(405, *YYCURSOR); + yyaccept = 7; + YYMARKER = ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy406; +yy406: + YYDEBUG(406, *YYCURSOR); if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy223; - goto yy56; - } + if(yych == '/') goto yy403; + goto yy385; } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_') goto yy403; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy405; + goto yy385; + } +yy407: + YYDEBUG(407, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == ')') goto yy390; + if(yych <= '.') goto yy385; + goto yy403; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy385; + goto yy403; } else { - if(yych <= 't') goto yy348; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy385; + if(yych >= '{') goto yy385; + goto yy408; } } -yy348: - YYDEBUG(348, *YYCURSOR); +yy408: + YYDEBUG(408, *YYCURSOR); ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; + goto yy409; +yy409: + YYDEBUG(409, *YYCURSOR); if(yych <= '^'){ + if(yych == '/') goto yy403; + goto yy53; + } else { + if(yych <= '_') goto yy403; + if(yych <= '`') goto yy53; + if(yych <= 'z') goto yy408; + goto yy53; + } +yy410: + YYDEBUG(410, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy412; + if(yych <= ':') goto yy413; + goto yy385; +yy411: + YYDEBUG(411, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy385; + if(yych >= '4') goto yy414; + goto yy412; + } else { + if(yych <= '9') goto yy390; + if(yych <= ':') goto yy413; + goto yy385; + } +yy412: + YYDEBUG(412, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '5') goto yy414; + if(yych <= '9') goto yy390; + if(yych >= ';') goto yy385; + goto yy413; +yy413: + YYDEBUG(413, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '5') goto yy414; + if(yych <= '9') goto yy390; + goto yy385; +yy414: + YYDEBUG(414, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy385; + if(yych <= '9') goto yy390; + goto yy385; +yy415: + YYDEBUG(415, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych >= ':') goto yy363; + goto yy416; +yy416: + YYDEBUG(416, *YYCURSOR); + yych = *++YYCURSOR; + goto yy363; +yy417: + YYDEBUG(417, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy383; + goto yy363; + } +yy418: + YYDEBUG(418, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy363; + if(yych >= ':') goto yy363; + goto yy419; +yy419: + YYDEBUG(419, *YYCURSOR); + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy420; + if(yych <= '9') goto yy416; + goto yy420; +yy420: + YYDEBUG(420, *YYCURSOR); + +#line 1099 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("datenoday"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->d = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_NO_DAY; + } +#line 5106 "ext/date/lib/parse_date.c" +yy421: + YYDEBUG(421, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy419; + if(yych <= ':') goto yy383; + goto yy363; + } +yy422: + YYDEBUG(422, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ':'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych != '.') goto yy378; + goto yy423; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + if(yych <= '9') goto yy426; + goto yy383; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy349: - YYDEBUG(349, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'Q'){ - if(yych == '/') goto yy55; - goto yy56; +yy423: + YYDEBUG(423, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '2'){ + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy429; + goto yy430; + } else { + if(yych <= '5') goto yy431; + if(yych <= '9') goto yy432; + goto yy378; + } +yy424: + YYDEBUG(424, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy428; + if(yych <= ':') goto yy383; + goto yy363; + } +yy425: + YYDEBUG(425, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '3') goto yy428; + if(yych <= '9') goto yy427; + if(yych <= ':') goto yy383; + goto yy363; + } +yy426: + YYDEBUG(426, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy363; + } else { + if(yych <= '9') goto yy427; + if(yych <= ':') goto yy383; + goto yy363; + } +yy427: + YYDEBUG(427, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy420; + if(yych <= '9') goto yy415; + goto yy420; +yy428: + YYDEBUG(428, *YYCURSOR); + yyaccept = 8; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy383; + goto yy420; + } else { + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy383; + goto yy420; + } +yy429: + YYDEBUG(429, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; + } else { + if(yych <= '9') goto yy438; + if(yych <= ':') goto yy433; + goto yy363; + } +yy430: + YYDEBUG(430, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; + } else { + if(yych <= '3') goto yy438; + if(yych <= '9') goto yy437; + if(yych <= ':') goto yy433; + goto yy363; + } +yy431: + YYDEBUG(431, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; + } else { + if(yych <= '9') goto yy437; + if(yych <= ':') goto yy433; + goto yy363; + } +yy432: + YYDEBUG(432, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych != '.') goto yy363; + goto yy433; + } else { + if(yych <= '9') goto yy382; + if(yych >= ';') goto yy363; + goto yy433; + } +yy433: + YYDEBUG(433, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy434; + if(yych <= '6') goto yy435; + if(yych <= '9') goto yy386; + goto yy53; +yy434: + YYDEBUG(434, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; + } else { + if(yych <= '9') goto yy436; + if(yych <= ':') goto yy387; + goto yy385; + } +yy435: + YYDEBUG(435, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy385; + } else { + if(yych <= '0') goto yy391; + if(yych == ':') goto yy387; + goto yy385; + } +yy436: + YYDEBUG(436, *YYCURSOR); + yyaccept = 7; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '-'){ + if(yych <= '('){ + if(yych == ' ') goto yy392; + if(yych <= '\'') goto yy385; + goto yy395; } else { - if(yych <= 'R') goto yy225; - if(yych <= 'S') goto yy176; - goto yy56; + if(yych == '+') goto yy394; + if(yych <= ',') goto yy385; + goto yy394; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '@'){ + if(yych <= '.') goto yy387; + if(yych == ':') goto yy387; + goto yy385; } else { - if(yych <= 'r') goto yy350; - if(yych <= 's') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'Z') goto yy396; + if(yych <= '`') goto yy385; + if(yych <= 'z') goto yy397; + goto yy385; } } -yy350: - YYDEBUG(350, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ +yy437: + YYDEBUG(437, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy387; + goto yy363; + } else { + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy387; + goto yy363; + } +yy438: + YYDEBUG(438, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy433; + goto yy363; + } else { + if(yych <= '9') goto yy415; + if(yych <= ':') goto yy433; + goto yy363; + } +yy439: + YYDEBUG(439, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ':'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych == '.') goto yy423; + goto yy378; } else { - if(yych == 'D') goto yy176; - goto yy56; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + if(yych <= '9') goto yy426; + goto yy383; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'd') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy351: - YYDEBUG(351, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'B'){ - if(yych == '/') goto yy55; - goto yy56; +yy440: + YYDEBUG(440, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + if(yych <= '0') goto yy422; + goto yy443; } else { - if(yych <= 'C') goto yy230; - if(yych == 'V') goto yy231; - goto yy56; + if(yych <= '2') goto yy450; + if(yych <= '9') goto yy443; + goto yy378; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'b') goto yy61; - goto yy355; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych == 'v') goto yy356; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy352: - YYDEBUG(352, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy441: + YYDEBUG(441, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy443; } else { - if(yych == 'X') goto yy228; - goto yy56; + if(yych <= '2') goto yy450; + if(yych <= '9') goto yy443; + goto yy378; } } else { - if(yych <= 'w'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 'x') goto yy353; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy353: - YYDEBUG(353, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy442: + YYDEBUG(442, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy378; + goto yy443; } else { - if(yych == 'T') goto yy229; - goto yy56; + if(yych <= '2') goto yy371; + if(yych <= '9') goto yy372; + goto yy378; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'n') goto yy374; + if(yych <= 'q') goto yy378; + goto yy375; } else { - if(yych <= 't') goto yy354; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy354: - YYDEBUG(354, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy443: + YYDEBUG(443, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= '.'){ + if(yych <= ',') goto yy378; + if(yych >= '.') goto yy423; + goto yy444; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + goto yy426; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= ':') goto yy383; + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy355: - YYDEBUG(355, *YYCURSOR); +yy444: + YYDEBUG(444, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy445; +yy445: + YYDEBUG(445, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if((yych = *YYCURSOR) <= '/') goto yy446; + if(yych <= '9') goto yy447; + goto yy446; +yy446: + YYDEBUG(446, *YYCURSOR); + +#line 1237 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("pgtextshort"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_TEXT; + } +#line 5439 "ext/date/lib/parse_date.c" +yy447: + YYDEBUG(447, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy446; + if(yych >= ':') goto yy446; + goto yy448; +yy448: + YYDEBUG(448, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy446; + if(yych >= ':') goto yy446; + goto yy449; +yy449: + YYDEBUG(449, *YYCURSOR); + yych = *++YYCURSOR; + goto yy446; +yy450: + YYDEBUG(450, *YYCURSOR); + yyaccept = 6; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= '.'){ + if(yych <= ',') goto yy378; + if(yych <= '-') goto yy444; + goto yy423; } else { - if(yych == 'O') goto yy235; - goto yy56; + if(yych <= '/') goto yy378; + if(yych <= '1') goto yy424; + if(yych <= '2') goto yy425; + goto yy426; } } else { - if(yych <= 'n'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= ':') goto yy383; + if(yych == 'n') goto yy374; + goto yy378; } else { - if(yych <= 'o') goto yy360; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy375; + if(yych <= 's') goto yy373; + if(yych <= 't') goto yy376; + goto yy378; } } -yy356: - YYDEBUG(356, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy451: + YYDEBUG(451, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy232; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'B') goto yy134; + goto yy357; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy357; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'c') goto yy452; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy357: - YYDEBUG(357, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy452: + YYDEBUG(452, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'N') goto yy233; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy366; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'n') goto yy358; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy453; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy358: - YYDEBUG(358, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy453: + YYDEBUG(453, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'T') goto yy234; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'L') goto yy3; + goto yy367; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy359; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'm') goto yy454; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy359: - YYDEBUG(359, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy454: + YYDEBUG(454, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy368; + if(yych != 'b') goto yy144; + goto yy455; +yy455: + YYDEBUG(455, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy369; + if(yych != 'e') goto yy144; + goto yy456; +yy456: + YYDEBUG(456, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych == 'R') goto yy358; + goto yy53; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy360: - YYDEBUG(360, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy457: + YYDEBUG(457, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych == '/') goto yy138; + goto yy359; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy359; + if(yych <= 'z') goto yy143; + goto yy359; + } +yy458: + YYDEBUG(458, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'N') goto yy236; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy134; + goto yy459; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 's'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'n') goto yy361; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't') goto yy459; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy361: - YYDEBUG(361, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy459: + YYDEBUG(459, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'D') goto yy176; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'O') goto yy135; + goto yy460; } else { - if(yych <= 'd') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'o') goto yy460; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy362: - YYDEBUG(362, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy460: + YYDEBUG(460, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'B') goto yy461; + if(yych != 'b') goto yy3; + goto yy461; + } +yy461: + YYDEBUG(461, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy462; + if(yych != 'e') goto yy53; + goto yy462; +yy462: + YYDEBUG(462, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; +yy463: + YYDEBUG(463, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy202; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy134; + goto yy459; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy363; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy464; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy363: - YYDEBUG(363, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy464: + YYDEBUG(464, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'V') goto yy203; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'u'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'O'){ + if(yych <= 'N') goto yy135; + goto yy460; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'v') goto yy364; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'o') goto yy465; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy364: - YYDEBUG(364, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy465: + YYDEBUG(465, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'B'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'I') goto yy173; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'A') goto yy3; + goto yy461; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'i') goto yy314; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'b') goto yy466; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy365: - YYDEBUG(365, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy466: + YYDEBUG(466, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy462; + if(yych != 'e') goto yy144; + goto yy467; +yy467: + YYDEBUG(467, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'N') goto yy240; - goto yy56; + if(yych == 'R') goto yy358; + goto yy53; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'n') goto yy368; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy366: - YYDEBUG(366, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy468: + YYDEBUG(468, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'V'){ + if(yych <= 'B'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy134; } else { - if(yych == 'X') goto yy239; - goto yy56; + if(yych <= 'O'){ + if(yych <= 'C') goto yy483; + goto yy134; + } else { + if(yych <= 'P') goto yy482; + if(yych <= 'U') goto yy134; + goto yy484; + } } } else { - if(yych <= 'w'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'o'){ + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych == 'c') goto yy483; + goto yy134; + } } else { - if(yych <= 'x') goto yy367; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'u'){ + if(yych <= 'p') goto yy482; + goto yy134; + } else { + if(yych <= 'v') goto yy484; + if(yych <= 'z') goto yy134; + goto yy3; + } } } -yy367: - YYDEBUG(367, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy469: + YYDEBUG(469, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'T') goto yy176; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy134; + goto yy477; } } else { if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't') goto yy477; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy368: - YYDEBUG(368, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy470: + YYDEBUG(470, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'X'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'T') goto yy241; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; + goto yy475; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'w'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 't') goto yy369; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'x') goto yy475; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy369: - YYDEBUG(369, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy471: + YYDEBUG(471, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy472; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n') goto yy472; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy370: - YYDEBUG(370, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy472: + YYDEBUG(472, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych == 'S') goto yy205; - goto yy56; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy473; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych <= 's') goto yy371; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd') goto yy473; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy371: - YYDEBUG(371, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy473: + YYDEBUG(473, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'A') goto yy474; + if(yych != 'a') goto yy3; + goto yy474; + } +yy474: + YYDEBUG(474, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; +yy475: + YYDEBUG(475, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'T') goto yy176; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy476; } } else { if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't') goto yy476; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy372: - YYDEBUG(372, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'E'){ - if(yych == '/') goto yy55; - goto yy56; - } else { - if(yych <= 'F') goto yy248; - if(yych == 'R') goto yy247; - goto yy56; - } +yy476: + YYDEBUG(476, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'e') goto yy61; - goto yy377; - } else { - if(yych == 'r') goto yy378; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; } -yy373: - YYDEBUG(373, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy477: + YYDEBUG(477, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych == 'U') goto yy244; - goto yy56; + if(yych <= '@') goto yy341; + if(yych <= 'T') goto yy135; + goto yy478; } } else { if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych <= 'u') goto yy374; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'u') goto yy478; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy374: - YYDEBUG(374, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy245; - goto yy56; - } +yy478: + YYDEBUG(478, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Q'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy375; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'R') goto yy479; + if(yych != 'r') goto yy3; + goto yy479; } -yy375: - YYDEBUG(375, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy479: + YYDEBUG(479, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy480; + if(yych != 'd') goto yy53; + goto yy480; +yy480: + YYDEBUG(480, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy481; + if(yych != 'a') goto yy53; + goto yy481; +yy481: + YYDEBUG(481, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; +yy482: + YYDEBUG(482, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'T') goto yy246; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'T') goto yy490; + goto yy135; } else { - if(yych <= 't') goto yy376; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy490; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy376: - YYDEBUG(376, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy483: + YYDEBUG(483, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy488; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'n'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'o') goto yy488; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy377: - YYDEBUG(377, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy484: + YYDEBUG(484, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'T') goto yy249; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy135; + goto yy485; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'd'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 't') goto yy380; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'e') goto yy485; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy378: - YYDEBUG(378, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy485: + YYDEBUG(485, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'N') goto yy486; + if(yych != 'n') goto yy3; + goto yy486; + } +yy486: + YYDEBUG(486, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy487; + if(yych != 't') goto yy53; + goto yy487; +yy487: + YYDEBUG(487, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; +yy488: + YYDEBUG(488, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'N') goto yy489; + if(yych != 'n') goto yy3; + goto yy489; + } +yy489: + YYDEBUG(489, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy159; + if(yych == 'd') goto yy159; + goto yy53; +yy490: + YYDEBUG(490, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '.'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych == 'S') goto yy250; - goto yy56; + if(yych == '-') goto yy361; + goto yy359; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'D'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; } else { - if(yych <= 's') goto yy379; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'E') goto yy491; + if(yych != 'e') goto yy3; + goto yy491; } } -yy379: - YYDEBUG(379, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy491: + YYDEBUG(491, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'M') goto yy492; + if(yych != 'm') goto yy53; + goto yy492; +yy492: + YYDEBUG(492, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy493; + if(yych != 'b') goto yy53; + goto yy493; +yy493: + YYDEBUG(493, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy494; + if(yych != 'e') goto yy53; + goto yy494; +yy494: + YYDEBUG(494, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; +yy495: + YYDEBUG(495, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'V'){ + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } } else { - if(yych == 'T') goto yy176; - goto yy56; + if(yych <= 'O'){ + if(yych == 'C') goto yy483; + goto yy134; + } else { + if(yych <= 'P') goto yy482; + if(yych <= 'U') goto yy134; + goto yy484; + } } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'c'){ + if(yych <= '_'){ + if(yych <= 'Z') goto yy134; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych <= 'b') goto yy137; + goto yy510; + } } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'u'){ + if(yych == 'p') goto yy509; + goto yy137; + } else { + if(yych <= 'v') goto yy511; + if(yych <= 'z') goto yy137; + goto yy3; + } } } -yy380: - YYDEBUG(380, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy496: + YYDEBUG(496, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy134; + goto yy477; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy504; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy381: - YYDEBUG(381, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy497: + YYDEBUG(497, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'X'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy210; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; + goto yy475; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy385; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'x') goto yy502; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy382: - YYDEBUG(382, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy498: + YYDEBUG(498, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'G') goto yy208; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy472; } } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'g') goto yy383; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy499; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy383: - YYDEBUG(383, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy499: + YYDEBUG(499, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych == 'H') goto yy209; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy473; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych <= 'h') goto yy384; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'd') goto yy500; + if(yych <= 'z') goto yy142; + goto yy341; } } -yy384: - YYDEBUG(384, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy500: + YYDEBUG(500, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'T') goto yy176; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy474; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'a') goto yy501; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy385: - YYDEBUG(385, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy501: + YYDEBUG(501, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy502: + YYDEBUG(502, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'V') goto yy211; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy476; } } else { - if(yych <= 'u'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'v') goto yy386; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy503; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy386: - YYDEBUG(386, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy503: + YYDEBUG(503, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy212; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy387; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy387: - YYDEBUG(387, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy504: + YYDEBUG(504, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych == 'N') goto yy213; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'T') goto yy135; + goto yy478; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych <= 'n') goto yy388; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'u') goto yy505; + if(yych <= 'z') goto yy142; + goto yy341; } } -yy388: - YYDEBUG(388, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy505: + YYDEBUG(505, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'T') goto yy214; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'Q') goto yy3; + goto yy479; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy389; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'r') goto yy506; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy389: - YYDEBUG(389, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy506: + YYDEBUG(506, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy480; + if(yych != 'd') goto yy144; + goto yy507; +yy507: + YYDEBUG(507, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy481; + if(yych != 'a') goto yy144; + goto yy508; +yy508: + YYDEBUG(508, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy509: + YYDEBUG(509, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'H') goto yy176; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'T'){ + if(yych <= 'S') goto yy135; + goto yy490; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 't') goto yy517; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy390: - YYDEBUG(390, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy510: + YYDEBUG(510, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'R') goto yy252; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy488; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'r') goto yy391; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'o') goto yy515; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy391: - YYDEBUG(391, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy511: + YYDEBUG(511, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'S') goto yy253; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy135; + goto yy485; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 's') goto yy392; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'e') goto yy512; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy392: - YYDEBUG(392, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy512: + YYDEBUG(512, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'D') goto yy254; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'M') goto yy3; + goto yy486; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'd') goto yy393; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy513; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy393: - YYDEBUG(393, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy513: + YYDEBUG(513, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy487; + if(yych != 't') goto yy144; + goto yy514; +yy514: + YYDEBUG(514, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'A') goto yy255; - goto yy56; + if(yych == 'H') goto yy159; + goto yy53; + } + } else { + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } + } +yy515: + YYDEBUG(515, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'M') goto yy3; + goto yy489; } } else { if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'a') goto yy394; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy516; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy394: - YYDEBUG(394, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy516: + YYDEBUG(516, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych == 'D') goto yy159; + goto yy53; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'c'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy395: - YYDEBUG(395, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy517: + YYDEBUG(517, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'A') goto yy257; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy138; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= '_'){ + if(yych == 'E') goto yy491; + if(yych <= '^') goto yy3; + goto yy138; } else { - if(yych <= 'a') goto yy396; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy143; + } else { + if(yych <= 'e') goto yy518; + if(yych <= 'z') goto yy143; + goto yy3; + } } } -yy396: - YYDEBUG(396, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy518: + YYDEBUG(518, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'M') goto yy492; + if(yych != 'm') goto yy144; + goto yy519; +yy519: + YYDEBUG(519, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy493; + if(yych != 'b') goto yy144; + goto yy520; +yy520: + YYDEBUG(520, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy494; + if(yych != 'e') goto yy144; + goto yy521; +yy521: + YYDEBUG(521, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'R') goto yy258; - goto yy56; + if(yych == 'R') goto yy358; + goto yy53; } } else { if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'r') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy397: - YYDEBUG(397, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - default: goto yy193; - } -yy398: - YYDEBUG(398, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy260; - case 'F': goto yy194; - case 'I': goto yy227; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy196; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy399; - case 'f': goto yy334; - case 'i': goto yy352; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy338; - case 't': goto yy339; - default: goto yy193; - } -yy399: - YYDEBUG(399, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'H'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'C') goto yy230; - goto yy56; - } +yy522: + YYDEBUG(522, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'G'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych <= 'L'){ - if(yych <= 'I') goto yy207; - if(yych <= 'K') goto yy56; - goto yy206; - } else { - if(yych == 'V') goto yy231; - goto yy56; - } + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy529; } } else { - if(yych <= 'i'){ - if(yych <= 'b'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'c') goto yy355; - if(yych <= 'h') goto yy61; - goto yy382; - } + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'u'){ - if(yych == 'l') goto yy381; - goto yy61; - } else { - if(yych <= 'v') goto yy356; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'g') goto yy529; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy400: - YYDEBUG(400, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy523: + YYDEBUG(523, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'R') goto yy263; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy134; + goto yy527; } } else { if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'r') goto yy405; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy527; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy401: - YYDEBUG(401, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy524: + YYDEBUG(524, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'I') goto yy274; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy134; + goto yy525; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'n'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'i') goto yy402; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'o') goto yy525; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy402: - YYDEBUG(402, *YYCURSOR); +yy525: + YYDEBUG(525, *YYCURSOR); ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy275; - goto yy56; - } + if((yych = *YYCURSOR) <= '@'){ + if(yych == ')') goto yy132; + goto yy526; } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy403; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy526; + if(yych <= 'z') goto yy135; + goto yy526; } -yy403: - YYDEBUG(403, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy526: + YYDEBUG(526, *YYCURSOR); + +#line 1291 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("ago"); + TIMELIB_INIT; + s->time->relative.y = 0 - s->time->relative.y; + s->time->relative.m = 0 - s->time->relative.m; + s->time->relative.d = 0 - s->time->relative.d; + s->time->relative.h = 0 - s->time->relative.h; + s->time->relative.i = 0 - s->time->relative.i; + s->time->relative.s = 0 - s->time->relative.s; + s->time->relative.weekday = 0 - s->time->relative.weekday; + TIMELIB_DEINIT; + return TIMELIB_AGO; + } +#line 6694 "ext/date/lib/parse_date.c" +yy527: + YYDEBUG(527, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'A') goto yy276; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'I') goto yy135; + goto yy528; } else { - if(yych <= 'a') goto yy404; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'i') goto yy528; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy404: - YYDEBUG(404, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy192; - goto yy56; - } +yy528: + YYDEBUG(528, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'K'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'L') goto yy358; + if(yych == 'l') goto yy358; + goto yy3; } -yy405: - YYDEBUG(405, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy529: + YYDEBUG(529, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'T') goto yy264; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'U') goto yy135; + goto yy530; } else { - if(yych <= 't') goto yy406; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'u') goto yy530; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy406: - YYDEBUG(406, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'G'){ - if(yych == '/') goto yy55; - goto yy56; +yy530: + YYDEBUG(530, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'S') goto yy531; + if(yych != 's') goto yy3; + goto yy531; + } +yy531: + YYDEBUG(531, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy358; + if(yych == 't') goto yy358; + goto yy53; +yy532: + YYDEBUG(532, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'H') goto yy266; - if(yych == 'N') goto yy265; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'F') goto yy134; + goto yy529; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'g') goto yy61; - goto yy408; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'n') goto yy407; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'g') goto yy538; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy407: - YYDEBUG(407, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy533: + YYDEBUG(533, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'I') goto yy271; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy134; + goto yy527; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'i') goto yy413; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'r') goto yy536; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy408: - YYDEBUG(408, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy534: + YYDEBUG(534, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'N') goto yy267; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy134; + goto yy525; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'n') goto yy409; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'o') goto yy535; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy409: - YYDEBUG(409, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy535: + YYDEBUG(535, *YYCURSOR); + yyaccept = 9; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy526; + goto yy132; } else { - if(yych == 'I') goto yy268; - goto yy56; + if(yych == '/') goto yy138; + goto yy526; } } else { - if(yych <= 'h'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy526; + goto yy138; } else { - if(yych <= 'i') goto yy410; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= '`') goto yy526; + if(yych <= 'z') goto yy142; + goto yy526; } } -yy410: - YYDEBUG(410, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy536: + YYDEBUG(536, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'G') goto yy269; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'I'){ + if(yych <= 'H') goto yy135; + goto yy528; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'g') goto yy411; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'i') goto yy537; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy411: - YYDEBUG(411, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy537: + YYDEBUG(537, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'H') goto yy270; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'K') goto yy3; + goto yy358; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'h') goto yy412; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'l') goto yy457; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy412: - YYDEBUG(412, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy538: + YYDEBUG(538, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'T') goto yy258; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'U'){ + if(yych <= 'T') goto yy135; + goto yy530; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 't') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'u') goto yy539; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy413: - YYDEBUG(413, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy539: + YYDEBUG(539, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'G') goto yy272; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'R') goto yy3; + goto yy531; } } else { - if(yych <= 'f'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'g') goto yy414; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 's') goto yy540; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy414: - YYDEBUG(414, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy540: + YYDEBUG(540, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'H') goto yy273; - goto yy56; + if(yych == 'T') goto yy358; + goto yy53; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 's'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'h') goto yy415; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy415: - YYDEBUG(415, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy541: + YYDEBUG(541, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'B'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'T') goto yy258; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'A') goto yy134; + goto yy555; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'a'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 't') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'b') goto yy555; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy416: - YYDEBUG(416, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'C'){ - if(yych == '/') goto yy55; - goto yy56; +yy542: + YYDEBUG(542, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'D') goto yy279; - if(yych <= 'E') goto yy278; - goto yy56; + if(yych == 'F') goto yy552; + if(yych <= 'Q') goto yy134; + goto yy551; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'f'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'e') goto yy134; + goto yy552; } else { - if(yych <= 'd') goto yy418; - if(yych <= 'e') goto yy417; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'r') goto yy551; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy417: - YYDEBUG(417, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy543: + YYDEBUG(543, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'K') goto yy258; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'T') goto yy134; + goto yy548; } } else { - if(yych <= 'j'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 't'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'k') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'u') goto yy548; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy418: - YYDEBUG(418, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy544: + YYDEBUG(544, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'I'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'N') goto yy280; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy545; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'h'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'n') goto yy419; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'i') goto yy545; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy419: - YYDEBUG(419, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy545: + YYDEBUG(545, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; } else { - if(yych == 'E') goto yy281; - goto yy56; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy546; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; } else { - if(yych <= 'e') goto yy420; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd') goto yy546; + if(yych <= 'z') goto yy135; + goto yy341; } } -yy420: - YYDEBUG(420, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy546: + YYDEBUG(546, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'A') goto yy547; + if(yych != 'a') goto yy3; + goto yy547; + } +yy547: + YYDEBUG(547, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; +yy548: + YYDEBUG(548, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'S') goto yy282; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; + goto yy549; } } else { - if(yych <= 'r'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 's') goto yy421; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'r') goto yy549; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy421: - YYDEBUG(421, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy549: + YYDEBUG(549, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'T') goto yy550; + if(yych != 't') goto yy3; + goto yy550; + } +yy550: + YYDEBUG(550, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; +yy551: + YYDEBUG(551, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'D') goto yy283; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy135; + goto yy554; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'd') goto yy422; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy554; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy422: - YYDEBUG(422, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy552: + YYDEBUG(552, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'A') goto yy284; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy553; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; } else { - if(yych <= 'a') goto yy423; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't') goto yy553; + if(yych <= 'z') goto yy135; + goto yy3; } } -yy423: - YYDEBUG(423, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy553: + YYDEBUG(553, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; + } +yy554: + YYDEBUG(554, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'T') goto yy159; + if(yych == 't') goto yy159; + goto yy3; + } +yy555: + YYDEBUG(555, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'R') goto yy135; + goto yy556; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'q'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'r') goto yy556; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy424: - YYDEBUG(424, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy556: + YYDEBUG(556, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'U') goto yy557; + if(yych != 'u') goto yy3; + goto yy557; + } +yy557: + YYDEBUG(557, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy558; + if(yych != 'a') goto yy53; + goto yy558; +yy558: + YYDEBUG(558, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy559; + if(yych != 'r') goto yy53; + goto yy559; +yy559: + YYDEBUG(559, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy358; + if(yych == 'y') goto yy358; + goto yy53; +yy560: + YYDEBUG(560, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'B'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'Y') goto yy258; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'A') goto yy134; + goto yy555; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'y') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'b') goto yy574; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy425: - YYDEBUG(425, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ +yy561: + YYDEBUG(561, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; } else { - if(yych == 'U') goto yy287; - goto yy56; + if(yych <= 'E'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'F') goto yy552; + if(yych <= 'Q') goto yy134; + goto yy551; + } } } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'e'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } } else { - if(yych <= 'u') goto yy426; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'q'){ + if(yych <= 'f') goto yy571; + goto yy137; + } else { + if(yych <= 'r') goto yy570; + if(yych <= 'z') goto yy137; + goto yy3; + } } } -yy426: - YYDEBUG(426, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy562: + YYDEBUG(562, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'R') goto yy258; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'T') goto yy134; + goto yy548; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'r') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'u') goto yy567; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy427: - YYDEBUG(427, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy563: + YYDEBUG(563, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'N') goto yy290; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy545; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'n') goto yy433; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'i') goto yy564; + if(yych <= 'z') goto yy137; + goto yy3; } } -yy428: - YYDEBUG(428, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy564: + YYDEBUG(564, *YYCURSOR); + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; } else { - if(yych == 'N') goto yy293; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy546; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; } else { - if(yych <= 'n') goto yy429; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'd') goto yy565; + if(yych <= 'z') goto yy142; + goto yy341; } } -yy429: - YYDEBUG(429, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= 'C'){ - if(yych == '/') goto yy55; - goto yy56; +yy565: + YYDEBUG(565, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'D') goto yy294; - if(yych == 'T') goto yy295; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy547; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - if(yych <= 'c') goto yy61; - goto yy430; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 't') goto yy431; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'a') goto yy566; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy430: - YYDEBUG(430, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy566: + YYDEBUG(566, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy567: + YYDEBUG(567, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'A') goto yy296; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; + goto yy549; } } else { if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'a') goto yy432; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'r') goto yy568; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy431: - YYDEBUG(431, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy568: + YYDEBUG(568, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'H') goto yy258; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy550; } } else { - if(yych <= 'g'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'h') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy569; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy432: - YYDEBUG(432, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy569: + YYDEBUG(569, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych == 'H') goto yy159; + goto yy53; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy433: - YYDEBUG(433, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'U': goto yy291; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'o': case 'q': - case 'r': case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - case 'u': goto yy434; - default: goto yy193; - } -yy434: - YYDEBUG(434, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy292; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy435; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy435: - YYDEBUG(435, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy570: + YYDEBUG(570, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'E') goto yy258; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy135; + goto yy554; } } else { - if(yych <= 'd'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'e') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 's') goto yy573; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy436: - YYDEBUG(436, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy571: + YYDEBUG(571, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'T') goto yy306; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy553; } } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy445; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy572; + if(yych <= 'z') goto yy142; + goto yy3; } } -yy437: - YYDEBUG(437, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy572: + YYDEBUG(572, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'C') goto yy300; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; } } else { - if(yych <= 'b'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'c') goto yy442; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy438: - YYDEBUG(438, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy573: + YYDEBUG(573, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'N') goto yy303; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'S') goto yy3; + goto yy159; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'n') goto yy439; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 't') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy439: - YYDEBUG(439, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy574: + YYDEBUG(574, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'D') goto yy304; - goto yy56; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_'){ + if(yych <= 'R'){ + if(yych <= 'Q') goto yy135; + goto yy556; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'd') goto yy440; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'q'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'r') goto yy575; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy440: - YYDEBUG(440, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy575: + YYDEBUG(575, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'A') goto yy305; - goto yy56; + if(yych <= '/') goto yy138; + if(yych <= 'T') goto yy3; + goto yy557; } } else { if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'a') goto yy441; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'u') goto yy576; + if(yych <= 'z') goto yy143; + goto yy3; } } -yy441: - YYDEBUG(441, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy576: + YYDEBUG(576, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy558; + if(yych != 'a') goto yy144; + goto yy577; +yy577: + YYDEBUG(577, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy559; + if(yych != 'r') goto yy144; + goto yy578; +yy578: + YYDEBUG(578, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= '^'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych == 'Y') goto yy358; + goto yy53; } } else { if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'y') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy442: - YYDEBUG(442, *YYCURSOR); - yyaccept = 5; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '/': case '_': goto yy55; - case 'E': goto yy198; - case 'F': goto yy194; - case 'L': goto yy199; - case 'N': goto yy195; - case 'O': goto yy301; - case 'P': goto yy200; - case 'S': goto yy259; - case 'T': goto yy197; - case 'a': - case 'b': - case 'c': - case 'd': case 'g': - case 'h': - case 'i': - case 'j': - case 'k': case 'm': case 'q': - case 'r': case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy61; - case 'e': goto yy333; - case 'f': goto yy334; - case 'l': goto yy335; - case 'n': goto yy336; - case 'o': goto yy443; - case 'p': goto yy337; - case 's': goto yy398; - case 't': goto yy339; - default: goto yy193; - } -yy443: - YYDEBUG(443, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy579: + YYDEBUG(579, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == 'N') goto yy302; - goto yy56; + if(yych == 'L') goto yy586; + if(yych <= 'M') goto yy134; + goto yy585; } } else { - if(yych <= 'm'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'l'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'k') goto yy134; + goto yy586; } else { - if(yych <= 'n') goto yy444; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych == 'n') goto yy585; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy444: - YYDEBUG(444, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy580: + YYDEBUG(580, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; } else { - if(yych == 'D') goto yy258; - goto yy56; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy581; } } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'd') goto yy397; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'n') goto yy581; + if(yych <= 'z') goto yy134; + goto yy3; } } -yy445: - YYDEBUG(445, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy581: + YYDEBUG(581, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'U') goto yy307; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 't'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'U') goto yy135; + goto yy582; } else { - if(yych <= 'u') goto yy446; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'u') goto yy582; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy446: - YYDEBUG(446, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy308; - goto yy56; - } +yy582: + YYDEBUG(582, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy447; - if(yych <= 'z') goto yy61; - goto yy56; - } + if(yych <= 'A') goto yy583; + if(yych != 'a') goto yy3; + goto yy583; } -yy447: - YYDEBUG(447, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'D') goto yy309; - goto yy56; - } - } else { - if(yych <= 'c'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'd') goto yy448; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy448: - YYDEBUG(448, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy583: + YYDEBUG(583, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy584; + if(yych != 'r') goto yy53; + goto yy584; +yy584: + YYDEBUG(584, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy358; + if(yych == 'y') goto yy358; + goto yy53; +yy585: + YYDEBUG(585, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'A') goto yy310; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= '_') goto yy55; - goto yy56; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'E') goto yy587; + goto yy135; } else { - if(yych <= 'a') goto yy449; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy587; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy449: - YYDEBUG(449, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; +yy586: + YYDEBUG(586, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych == 'Y') goto yy192; - goto yy56; + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'Y') goto yy135; + goto yy587; } else { - if(yych <= 'y') goto yy332; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 'x'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'y') goto yy587; + if(yych <= 'z') goto yy135; + goto yy3; + } } } -yy450: - YYDEBUG(450, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy51; - goto yy451; - } +yy587: + YYDEBUG(587, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 's') goto yy451; - if(yych <= 'z') goto yy51; - goto yy3; - } + if(yych == '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; } -yy451: - YYDEBUG(451, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; +yy588: + YYDEBUG(588, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych <= 'K'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'L') goto yy586; + if(yych <= 'M') goto yy134; + goto yy585; + } } } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'k'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } } else { - if(yych <= 't') goto yy452; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 'm'){ + if(yych <= 'l') goto yy595; + goto yy137; + } else { + if(yych <= 'n') goto yy594; + if(yych <= 'z') goto yy137; + goto yy3; + } } } -yy452: - YYDEBUG(452, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy177; - case ')': goto yy49; - default: goto yy3; - } -yy453: - YYDEBUG(453, *YYCURSOR); +yy589: + YYDEBUG(589, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ + if(yych <= 'N'){ if(yych <= '.'){ - if(yych == ')') goto yy49; + if(yych == ')') goto yy132; goto yy3; } else { - if(yych <= '/') goto yy55; + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy51; - goto yy451; + if(yych <= 'M') goto yy134; + goto yy581; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; goto yy3; } else { - if(yych == 's') goto yy454; - if(yych <= 'z') goto yy54; + if(yych == 'n') goto yy590; + if(yych <= 'z') goto yy137; goto yy3; } } -yy454: - YYDEBUG(454, *YYCURSOR); +yy590: + YYDEBUG(590, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= 'U'){ + if(yych <= 'T') goto yy135; + goto yy582; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych == 't') goto yy455; - if(yych <= 'z') goto yy60; - goto yy3; + if(yych <= 't'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'u') goto yy591; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy455: - YYDEBUG(455, *YYCURSOR); +yy591: + YYDEBUG(591, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': goto yy177; - case ')': goto yy49; - case '/': case '_': goto yy55; - case 'a': - case 'b': - case 'c': case 'e': case 'g': case 'i': - case 'j': - case 'k': - case 'l': case 'n': - case 'o': - case 'p': - case 'q': - case 'r': case 'u': - case 'v': case 'x': case 'z': goto yy61; - case 'd': goto yy321; - case 'f': goto yy323; - case 'h': goto yy320; - case 'm': goto yy319; - case 's': goto yy318; - case 't': goto yy325; - case 'w': goto yy322; - case 'y': goto yy324; - default: goto yy3; - } -yy456: - YYDEBUG(456, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'G'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; } else { + if(yych <= '/') goto yy138; if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy460; + goto yy583; } } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'g') goto yy460; - if(yych <= 'z') goto yy51; + if(yych <= 'a') goto yy592; + if(yych <= 'z') goto yy143; goto yy3; } } -yy457: - YYDEBUG(457, *YYCURSOR); +yy592: + YYDEBUG(592, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych == 'R') goto yy584; + if(yych != 'r') goto yy144; + goto yy593; +yy593: + YYDEBUG(593, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy458; + if(yych == 'Y') goto yy358; + goto yy53; } } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'x'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; } else { - if(yych <= 'e') goto yy458; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'y') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; } } -yy458: - YYDEBUG(458, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; +yy594: + YYDEBUG(594, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy459; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy587; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'v') goto yy459; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy596; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy459: - YYDEBUG(459, *YYCURSOR); +yy595: + YYDEBUG(595, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'E') goto yy212; - if(yych == 'e') goto yy212; - goto yy3; - } -yy460: - YYDEBUG(460, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; } else { - if(yych <= '@') goto yy3; - if(yych <= 'G') goto yy52; - goto yy461; + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } } } else { - if(yych <= 'g'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '_'){ + if(yych <= 'Y'){ + if(yych <= 'X') goto yy135; + goto yy587; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } } else { - if(yych <= 'h') goto yy461; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych <= 'x'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'y') goto yy596; + if(yych <= 'z') goto yy142; + goto yy3; + } } } -yy461: - YYDEBUG(461, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy3; - } -yy462: - YYDEBUG(462, *YYCURSOR); +yy596: + YYDEBUG(596, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy460; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy138; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= '_'){ + if(yych <= '9') goto yy359; + if(yych <= '^') goto yy3; + goto yy138; } else { - if(yych == 'g') goto yy466; - if(yych <= 'z') goto yy54; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy143; goto yy3; } } -yy463: - YYDEBUG(463, *YYCURSOR); +yy597: + YYDEBUG(597, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy458; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy598; } else { - if(yych == 'e') goto yy464; - if(yych <= 'z') goto yy54; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy464: - YYDEBUG(464, *YYCURSOR); +yy598: + YYDEBUG(598, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy52; - goto yy459; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy3; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'Z'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + goto yy135; } else { - if(yych == 'v') goto yy465; - if(yych <= 'z') goto yy60; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; goto yy3; } } -yy465: - YYDEBUG(465, *YYCURSOR); +yy599: + YYDEBUG(599, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '/') goto yy55; - if(yych <= 'D') goto yy3; - goto yy212; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy600; } else { - if(yych == 'e') goto yy387; - if(yych <= 'z') goto yy61; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy466: - YYDEBUG(466, *YYCURSOR); +yy600: + YYDEBUG(600, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'G') goto yy52; - goto yy461; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy135; + goto yy587; } else { - if(yych == 'h') goto yy467; - if(yych <= 'z') goto yy60; + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; goto yy3; } } -yy467: - YYDEBUG(467, *YYCURSOR); +yy601: + YYDEBUG(601, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= '('){ + if(yych <= 0x1F) goto yy3; + goto yy359; } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy176; + if(yych <= ')') goto yy360; + if(yych <= '.') goto yy359; + goto yy3; } } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'Z'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + goto yy134; } else { - if(yych == 't') goto yy317; - if(yych <= 'z') goto yy61; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy468: - YYDEBUG(468, *YYCURSOR); +yy602: + YYDEBUG(602, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '9'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy489; + if(yych == '/') goto yy3; + goto yy359; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'I'){ + if(yych <= '@') goto yy3; + if(yych <= 'H') goto yy134; + goto yy598; } else { - if(yych == 'n') goto yy504; - if(yych <= 'z') goto yy54; + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy134; goto yy3; } } -yy469: - YYDEBUG(469, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); +yy603: + YYDEBUG(603, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; + goto yy604; +yy604: + YYDEBUG(604, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy603; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy624; + case 'D': case 'd': goto yy608; + case 'F': case 'f': goto yy609; + case 'H': case 'h': goto yy60; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy607; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'P': case 'p': goto yy628; + case 'S': case 's': goto yy605; + case 'T': case 't': goto yy65; + case 'V': goto yy621; + case 'W': case 'w': goto yy62; + case 'X': goto yy622; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } +yy605: + YYDEBUG(605, *YYCURSOR); + yych = *++YYCURSOR; if(yych <= 'U'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; } else { - if(yych <= 'H'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'I') goto yy482; - if(yych <= 'T') goto yy51; - goto yy483; - } + if(yych <= 'E') goto yy1118; + if(yych <= 'T') goto yy53; + goto yy118; } } else { - if(yych <= 'h'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; } else { - if(yych <= 't'){ - if(yych <= 'i') goto yy497; - goto yy54; - } else { - if(yych <= 'u') goto yy498; - if(yych <= 'z') goto yy54; - goto yy3; - } + if(yych <= 'e') goto yy1118; + if(yych == 'u') goto yy118; + goto yy53; } } -yy470: - YYDEBUG(470, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy606: + YYDEBUG(606, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '`'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy478; + if(yych <= 'E') goto yy1118; + if(yych == 'U') goto yy118; + goto yy53; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'e'){ + if(yych <= 'a') goto yy119; + if(yych <= 'd') goto yy53; + goto yy1118; } else { - if(yych == 'e') goto yy493; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 's') goto yy53; + if(yych <= 't') goto yy843; + if(yych <= 'u') goto yy118; + goto yy53; } } -yy471: - YYDEBUG(471, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; +yy607: + YYDEBUG(607, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'O'){ + if(yych <= 'H'){ + if(yych == 'A') goto yy715; + goto yy53; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy476; + if(yych <= 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'h'){ + if(yych == 'a') goto yy715; + goto yy53; } else { - if(yych == 'e') goto yy491; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 'i') goto yy110; + if(yych == 'o') goto yy109; + goto yy53; } } -yy472: - YYDEBUG(472, *YYCURSOR); +yy608: + YYDEBUG(608, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy489; - } + if(yych <= 'E'){ + if(yych == 'A') goto yy106; + if(yych <= 'D') goto yy53; + goto yy702; } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy106; } else { - if(yych <= 'n') goto yy489; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'e') goto yy702; + goto yy53; } } -yy473: - YYDEBUG(473, *YYCURSOR); +yy609: + YYDEBUG(609, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'R'){ + if(yych <= 'N'){ + if(yych == 'E') goto yy718; + goto yy53; } else { - if(yych == 'I') goto yy482; - if(yych <= 'T') goto yy51; - goto yy483; + if(yych <= 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; } } else { - if(yych <= 'i'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'h') goto yy51; - goto yy482; + if(yych <= 'n'){ + if(yych == 'e') goto yy718; + goto yy53; } else { - if(yych == 'u') goto yy483; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych <= 'o') goto yy83; + if(yych == 'r') goto yy82; + goto yy53; } } -yy474: - YYDEBUG(474, *YYCURSOR); +yy610: + YYDEBUG(610, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy478; - } + if(yych <= 'U'){ + if(yych == 'H') goto yy66; + if(yych <= 'T') goto yy53; + goto yy67; } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'h'){ + if(yych <= 'g') goto yy53; + goto yy1117; } else { - if(yych <= 'e') goto yy478; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'u') goto yy67; + goto yy53; } } -yy475: - YYDEBUG(475, *YYCURSOR); +yy611: + YYDEBUG(611, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy51; - goto yy476; - } + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy851; + goto yy57; +yy612: + YYDEBUG(612, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'c'){ + if(yych == 'O') goto yy655; + goto yy53; } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'e') goto yy476; - if(yych <= 'z') goto yy51; - goto yy3; - } + if(yych <= 'd') goto yy843; + if(yych == 'o') goto yy655; + goto yy53; } -yy476: - YYDEBUG(476, *YYCURSOR); +yy613: + YYDEBUG(613, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'K') goto yy52; - goto yy477; - } - } else { - if(yych <= 'k'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'l') goto yy477; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych == 'd') goto yy843; + goto yy53; +yy614: + YYDEBUG(614, *YYCURSOR); + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': + case '1': + case '2': goto yy783; + case '3': goto yy785; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy786; + case 'A': case 'a': goto yy790; + case 'D': case 'd': goto yy794; + case 'F': case 'f': goto yy788; + case 'J': case 'j': goto yy787; + case 'M': case 'm': goto yy789; + case 'N': case 'n': goto yy793; + case 'O': case 'o': goto yy792; + case 'S': case 's': goto yy791; + default: goto yy53; } -yy477: - YYDEBUG(477, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'F') goto yy222; - if(yych == 'f') goto yy222; - goto yy3; +yy615: + YYDEBUG(615, *YYCURSOR); + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy734; + case '1': goto yy735; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy736; + case 'A': case 'a': goto yy740; + case 'D': case 'd': goto yy744; + case 'F': case 'f': goto yy738; + case 'J': case 'j': goto yy737; + case 'M': case 'm': goto yy739; + case 'N': case 'n': goto yy743; + case 'O': case 'o': goto yy742; + case 'S': case 's': goto yy741; + default: goto yy617; } -yy478: - YYDEBUG(478, *YYCURSOR); +yy616: + YYDEBUG(616, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; + goto yy617; +yy617: + YYDEBUG(617, *YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy699; + case 'D': case 'd': goto yy701; + case 'F': case 'f': goto yy697; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy698; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'S': case 's': goto yy700; + case 'V': goto yy621; + case 'X': goto yy622; + default: goto yy53; + } +yy618: + YYDEBUG(618, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych <= '1'){ + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy693; + goto yy694; + } else { + if(yych <= '5') goto yy695; + if(yych <= '9') goto yy696; + goto yy617; + } +yy619: + YYDEBUG(619, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych >= ' ') goto yy657; + goto yy620; } else { - if(yych <= '@') goto yy154; - if(yych <= 'R') goto yy52; - goto yy479; + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; } } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= 'V'){ + if(yych <= 'I') goto yy692; + if(yych >= 'V') goto yy665; + goto yy620; } else { - if(yych <= 's') goto yy479; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych == 'X') goto yy665; + goto yy620; } } -yy479: - YYDEBUG(479, *YYCURSOR); - yyaccept = 1; +yy620: + YYDEBUG(620, *YYCURSOR); + +#line 1138 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("datenoyearrev"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); + s->time->m = timelib_get_month((char **) &ptr); + TIMELIB_DEINIT; + return TIMELIB_DATE_TEXT; + } +#line 8483 "ext/date/lib/parse_date.c" +yy621: + YYDEBUG(621, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= 'D') goto yy480; - if(yych != 'd') goto yy3; - goto yy480; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy690; + goto yy620; } -yy480: - YYDEBUG(480, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy481; - if(yych != 'a') goto yy56; - goto yy481; -yy481: - YYDEBUG(481, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy482: - YYDEBUG(482, *YYCURSOR); +yy622: + YYDEBUG(622, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; + } else { + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy689; + goto yy620; + } +yy623: + YYDEBUG(623, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'Q') goto yy52; - if(yych <= 'R') goto yy488; - goto yy452; - } + if(yych <= 'U'){ + if(yych == 'A') goto yy682; + if(yych <= 'T') goto yy53; + goto yy681; } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy682; } else { - if(yych <= 'r') goto yy488; - if(yych <= 's') goto yy452; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych == 'u') goto yy681; + goto yy53; } } -yy483: - YYDEBUG(483, *YYCURSOR); +yy624: + YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; + if(yych <= 'T'){ + if(yych <= 'L'){ + if(yych == '.') goto yy629; + goto yy53; } else { - if(yych <= '@') goto yy154; - if(yych <= 'Q') goto yy52; - goto yy484; + if(yych <= 'M') goto yy630; + if(yych == 'P') goto yy675; + goto yy53; } } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; + if(yych <= 'o'){ + if(yych <= 'U') goto yy674; + if(yych == 'm') goto yy630; + goto yy53; } else { - if(yych <= 'r') goto yy484; - if(yych <= 'z') goto yy52; - goto yy154; + if(yych <= 'p') goto yy675; + if(yych == 'u') goto yy674; + goto yy53; } } -yy484: - YYDEBUG(484, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'S') goto yy485; - if(yych != 's') goto yy3; - goto yy485; - } -yy485: - YYDEBUG(485, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy486; - if(yych != 'd') goto yy56; - goto yy486; -yy486: - YYDEBUG(486, *YYCURSOR); +yy625: + YYDEBUG(625, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy487; - if(yych != 'a') goto yy56; - goto yy487; -yy487: - YYDEBUG(487, *YYCURSOR); + if(yych == 'C') goto yy669; + if(yych == 'c') goto yy669; + goto yy53; +yy626: + YYDEBUG(626, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy488: - YYDEBUG(488, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych == 'O') goto yy655; + if(yych == 'o') goto yy655; + goto yy53; +yy627: + YYDEBUG(627, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy633; + if(yych <= '9') goto yy635; + goto yy53; +yy628: + YYDEBUG(628, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy629; } else { - if(yych <= 'D') goto yy176; - if(yych == 'd') goto yy176; - goto yy3; + if(yych <= 'M') goto yy630; + if(yych == 'm') goto yy630; + goto yy53; } -yy489: - YYDEBUG(489, *YYCURSOR); +yy629: + YYDEBUG(629, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy490; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy490; - if(yych <= 'z') goto yy52; - goto yy3; + if(yych == 'M') goto yy630; + if(yych != 'm') goto yy53; + goto yy630; +yy630: + YYDEBUG(630, *YYCURSOR); + ++YYCURSOR; + if((yych = *YYCURSOR) == '.') goto yy632; + goto yy631; +yy631: + YYDEBUG(631, *YYCURSOR); + +#line 928 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + } } + s->time->h += timelib_meridian((char **) &ptr, s->time->h); + TIMELIB_DEINIT; + return TIMELIB_TIME12; } -yy490: - YYDEBUG(490, *YYCURSOR); - yyaccept = 1; +#line 8587 "ext/date/lib/parse_date.c" +yy632: + YYDEBUG(632, *YYCURSOR); + yych = *++YYCURSOR; + goto yy631; +yy633: + YYDEBUG(633, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= '/'){ + if(yych == '.') goto yy636; + goto yy634; } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; } -yy491: - YYDEBUG(491, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'K') goto yy52; - goto yy477; +yy634: + YYDEBUG(634, *YYCURSOR); + +#line 945 "ext/date/lib/parse_date.re" +{ + int tz_not_found; + DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + if (*ptr == ':' || *ptr == '.') { + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 8); + } } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'l') goto yy492; - if(yych <= 'z') goto yy60; - goto yy3; + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; } + TIMELIB_DEINIT; + return TIMELIB_TIME24_WITH_ZONE; } -yy492: - YYDEBUG(492, *YYCURSOR); - yyaccept = 1; +#line 8624 "ext/date/lib/parse_date.c" +yy635: + YYDEBUG(635, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'F'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych == '.') goto yy636; + if(yych != ':') goto yy634; + goto yy636; +yy636: + YYDEBUG(636, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy637; + if(yych <= '6') goto yy638; + if(yych <= '9') goto yy639; + goto yy53; +yy637: + YYDEBUG(637, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy643; + goto yy634; +yy638: + YYDEBUG(638, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych == '0') goto yy643; + goto yy634; +yy639: + YYDEBUG(639, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != '.') goto yy634; + goto yy640; +yy640: + YYDEBUG(640, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy641; +yy641: + YYDEBUG(641, *YYCURSOR); + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy642; +yy642: + YYDEBUG(642, *YYCURSOR); + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy641; + goto yy634; +yy643: + YYDEBUG(643, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '-'){ + if(yych != ' ') goto yy634; + goto yy644; } else { - if(yych <= '/') goto yy55; - if(yych <= 'E') goto yy3; - goto yy222; + if(yych <= '.') goto yy640; + if(yych <= '@') goto yy634; + goto yy646; } } else { if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; + if(yych == 'P') goto yy646; + goto yy634; } else { - if(yych == 'f') goto yy347; - if(yych <= 'z') goto yy61; - goto yy3; + if(yych <= 'a') goto yy646; + if(yych == 'p') goto yy646; + goto yy634; } } -yy493: - YYDEBUG(493, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; +yy644: + YYDEBUG(644, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + goto yy645; +yy645: + YYDEBUG(645, *YYCURSOR); + if(yych <= 'O'){ + if(yych <= ' '){ + if(yych <= 0x1F) goto yy53; + goto yy644; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'R') goto yy52; - goto yy479; + if(yych != 'A') goto yy53; + goto yy646; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'a'){ + if(yych <= 'P') goto yy646; + if(yych <= '`') goto yy53; + goto yy646; } else { - if(yych == 's') goto yy494; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych != 'p') goto yy53; + goto yy646; } } -yy494: - YYDEBUG(494, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'C') goto yy3; - goto yy480; - } +yy646: + YYDEBUG(646, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy647; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'd') goto yy495; - if(yych <= 'z') goto yy61; - goto yy3; - } + if(yych <= 'M') goto yy648; + if(yych == 'm') goto yy648; + goto yy53; } -yy495: - YYDEBUG(495, *YYCURSOR); +yy647: + YYDEBUG(647, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy481; - if(yych != 'a') goto yy62; - goto yy496; -yy496: - YYDEBUG(496, *YYCURSOR); + if(yych == 'M') goto yy648; + if(yych != 'm') goto yy53; + goto yy648; +yy648: + YYDEBUG(648, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy497: - YYDEBUG(497, *YYCURSOR); - yyaccept = 1; + if(yych == '.') goto yy632; + goto yy631; +yy649: + YYDEBUG(649, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; + if(yych <= '@'){ + if(yych <= '-'){ + if(yych != ' ') goto yy634; + goto yy650; } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - if(yych <= 'R') goto yy488; - goto yy452; + if(yych <= '.') goto yy636; + if(yych == ':') goto yy636; + goto yy634; } } else { if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'A') goto yy652; + if(yych == 'P') goto yy652; + goto yy634; } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy60; - goto yy503; - } else { - if(yych <= 's') goto yy455; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych <= 'a') goto yy652; + if(yych == 'p') goto yy652; + goto yy634; } } -yy498: - YYDEBUG(498, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; +yy650: + YYDEBUG(650, *YYCURSOR); + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); + yych = *YYCURSOR; + goto yy651; +yy651: + YYDEBUG(651, *YYCURSOR); + if(yych <= 'O'){ + if(yych <= ' '){ + if(yych <= 0x1F) goto yy53; + goto yy650; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'Q') goto yy52; - goto yy484; + if(yych != 'A') goto yy53; + goto yy652; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; + if(yych <= 'a'){ + if(yych <= 'P') goto yy652; + if(yych <= '`') goto yy53; + goto yy652; } else { - if(yych == 'r') goto yy499; - if(yych <= 'z') goto yy60; - goto yy154; + if(yych != 'p') goto yy53; + goto yy652; } } -yy499: - YYDEBUG(499, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'R') goto yy3; - goto yy485; - } +yy652: + YYDEBUG(652, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'L'){ + if(yych != '.') goto yy53; + goto yy653; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 's') goto yy500; - if(yych <= 'z') goto yy61; - goto yy3; - } + if(yych <= 'M') goto yy654; + if(yych == 'm') goto yy654; + goto yy53; } -yy500: - YYDEBUG(500, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy486; - if(yych != 'd') goto yy62; - goto yy501; -yy501: - YYDEBUG(501, *YYCURSOR); +yy653: + YYDEBUG(653, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy487; - if(yych != 'a') goto yy62; - goto yy502; -yy502: - YYDEBUG(502, *YYCURSOR); + if(yych == 'M') goto yy654; + if(yych != 'm') goto yy53; + goto yy654; +yy654: + YYDEBUG(654, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy503: - YYDEBUG(503, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'C') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'd') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy504: - YYDEBUG(504, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy490; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy505; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy505: - YYDEBUG(505, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy506: - YYDEBUG(506, *YYCURSOR); + if(yych == '.') goto yy632; + goto yy631; +yy655: + YYDEBUG(655, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'C'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy51; - goto yy507; - } - } else { - if(yych <= 'b'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'c') goto yy507; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy507: - YYDEBUG(507, *YYCURSOR); - yyaccept = 1; + if(yych == 'V') goto yy656; + if(yych != 'v') goto yy53; + goto yy656; +yy656: + YYDEBUG(656, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy516; - goto yy52; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy661; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy516; - if(yych <= 'z') goto yy52; - goto yy3; - } + if(yych == 'e') goto yy661; + goto yy620; } } -yy508: - YYDEBUG(508, *YYCURSOR); +yy657: + YYDEBUG(657, *YYCURSOR); ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 17) YYFILL(17); + if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); yych = *YYCURSOR; - goto yy509; -yy509: - YYDEBUG(509, *YYCURSOR); - if(yybm[0+yych] & 64) { - goto yy508; - } - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy512; - if(yych <= '3') goto yy514; - if(yych <= '9') goto yy515; - goto yy56; -yy510: - YYDEBUG(510, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 0x1F) goto yy3; - if(yych == '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; -yy511: - YYDEBUG(511, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy509; - if(yych <= '0') goto yy588; - if(yych <= '2') goto yy589; - if(yych <= '3') goto yy590; - goto yy509; -yy512: - YYDEBUG(512, *YYCURSOR); + goto yy658; +yy658: + YYDEBUG(658, *YYCURSOR); + if(yych <= 0x1F) goto yy53; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy659; +yy659: + YYDEBUG(659, *YYCURSOR); ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy524; - if(yych == '2') goto yy587; - if(yych <= '9') goto yy570; - goto yy524; -yy513: - YYDEBUG(513, *YYCURSOR); + if((yych = *YYCURSOR) <= '/') goto yy660; + if(yych <= '9') goto yy666; + goto yy660; +yy660: + YYDEBUG(660, *YYCURSOR); -#line 1088 "ext/date/lib/parse_date.re" +#line 1072 "ext/date/lib/parse_date.re" { - DEBUG_OUTPUT("datetextual | datenoyear"); + DEBUG_OUTPUT("datefull"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); + s->time->m = timelib_get_month((char **) &ptr); s->time->y = timelib_get_nr((char **) &ptr, 4); TIMELIB_PROCESS_YEAR(s->time->y); TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; + return TIMELIB_DATE_FULL; } -#line 8463 "ext/date/lib/parse_date.c" -yy514: - YYDEBUG(514, *YYCURSOR); +#line 8828 "ext/date/lib/parse_date.c" +yy661: + YYDEBUG(661, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy570; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; -yy515: - YYDEBUG(515, *YYCURSOR); + if(yych == 'M') goto yy662; + if(yych != 'm') goto yy53; + goto yy662; +yy662: + YYDEBUG(662, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy520; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; -yy516: - YYDEBUG(516, *YYCURSOR); - yyaccept = 1; + if(yych == 'B') goto yy663; + if(yych != 'b') goto yy53; + goto yy663; +yy663: + YYDEBUG(663, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy664; + if(yych != 'e') goto yy53; + goto yy664; +yy664: + YYDEBUG(664, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy665; + if(yych != 'r') goto yy53; + goto yy665; +yy665: + YYDEBUG(665, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; +yy666: + YYDEBUG(666, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych >= ':') goto yy660; + goto yy667; +yy667: + YYDEBUG(667, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych >= ':') goto yy660; + goto yy668; +yy668: + YYDEBUG(668, *YYCURSOR); + yych = *++YYCURSOR; + goto yy660; +yy669: + YYDEBUG(669, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy670; + if(yych != 't') goto yy53; + goto yy670; +yy670: + YYDEBUG(670, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'M') goto yy517; - if(yych != 'm') goto yy3; - goto yy517; + if(yych <= 'O'){ + if(yych <= 'N') goto yy620; + goto yy671; + } else { + if(yych != 'o') goto yy620; + goto yy671; + } } -yy517: - YYDEBUG(517, *YYCURSOR); +yy671: + YYDEBUG(671, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy518; - if(yych != 'b') goto yy56; - goto yy518; -yy518: - YYDEBUG(518, *YYCURSOR); + if(yych == 'B') goto yy672; + if(yych != 'b') goto yy53; + goto yy672; +yy672: + YYDEBUG(672, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy519; - if(yych != 'e') goto yy56; - goto yy519; -yy519: - YYDEBUG(519, *YYCURSOR); + if(yych == 'E') goto yy673; + if(yych != 'e') goto yy53; + goto yy673; +yy673: + YYDEBUG(673, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; -yy520: - YYDEBUG(520, *YYCURSOR); - yyaccept = 6; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; +yy674: + YYDEBUG(674, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'G') goto yy678; + if(yych == 'g') goto yy678; + goto yy53; +yy675: + YYDEBUG(675, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy676; + if(yych != 'r') goto yy53; + goto yy676; +yy676: + YYDEBUG(676, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '9') goto yy569; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'I'){ + if(yych <= 'H') goto yy620; + goto yy677; + } else { + if(yych != 'i') goto yy620; + goto yy677; + } } -yy521: - YYDEBUG(521, *YYCURSOR); - yyaccept = 6; +yy677: + YYDEBUG(677, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'L') goto yy665; + if(yych == 'l') goto yy665; + goto yy53; +yy678: + YYDEBUG(678, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; + } else { + if(yych <= 'U'){ + if(yych <= 'T') goto yy620; + goto yy679; + } else { + if(yych != 'u') goto yy620; + goto yy679; + } + } +yy679: + YYDEBUG(679, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'S') goto yy680; + if(yych != 's') goto yy53; + goto yy680; +yy680: + YYDEBUG(680, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy665; + if(yych == 't') goto yy665; + goto yy53; +yy681: + YYDEBUG(681, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy688; + if(yych <= 'M') goto yy53; + goto yy687; } else { - if(yych <= '3') goto yy569; - if(yych <= '9') goto yy566; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy688; + } else { + if(yych == 'n') goto yy687; + goto yy53; + } } -yy522: - YYDEBUG(522, *YYCURSOR); - yyaccept = 6; +yy682: + YYDEBUG(682, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy683; + if(yych != 'n') goto yy53; + goto yy683; +yy683: + YYDEBUG(683, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '9') goto yy566; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'U'){ + if(yych <= 'T') goto yy620; + goto yy684; + } else { + if(yych != 'u') goto yy620; + goto yy684; + } } -yy523: - YYDEBUG(523, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 14) YYFILL(14); - yych = *YYCURSOR; - goto yy524; -yy524: - YYDEBUG(524, *YYCURSOR); - if(yybm[0+yych] & 128) { - goto yy523; +yy684: + YYDEBUG(684, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy685; + if(yych != 'a') goto yy53; + goto yy685; +yy685: + YYDEBUG(685, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy686; + if(yych != 'r') goto yy53; + goto yy686; +yy686: + YYDEBUG(686, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy665; + if(yych == 'y') goto yy665; + goto yy53; +yy687: + YYDEBUG(687, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; + } else { + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy665; + } else { + if(yych == 'e') goto yy665; + goto yy620; + } } - if(yych <= '/') goto yy513; - if(yych <= '1') goto yy525; - if(yych <= '2') goto yy526; - if(yych <= '9') goto yy527; - goto yy513; -yy525: - YYDEBUG(525, *YYCURSOR); - yyaccept = 6; +yy688: + YYDEBUG(688, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; + } else { + if(yych <= 'Y'){ + if(yych <= 'X') goto yy620; + goto yy665; + } else { + if(yych == 'y') goto yy665; + goto yy620; + } + } +yy689: + YYDEBUG(689, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= '9') goto yy565; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } -yy526: - YYDEBUG(526, *YYCURSOR); - yyaccept = 6; +yy690: + YYDEBUG(690, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= '3') goto yy565; - if(yych <= '9') goto yy528; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '9') goto yy659; + if(yych != 'I') goto yy620; + goto yy691; } -yy527: - YYDEBUG(527, *YYCURSOR); - yyaccept = 6; +yy691: + YYDEBUG(691, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= '9') goto yy528; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } -yy528: - YYDEBUG(528, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych <= '9') goto yy563; - goto yy513; -yy529: - YYDEBUG(529, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy530; - if(yych <= '9') goto yy532; - goto yy56; -yy530: - YYDEBUG(530, *YYCURSOR); - yyaccept = 7; +yy692: + YYDEBUG(692, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + goto yy620; } else { - if(yych <= '9') goto yy532; - if(yych <= ':') goto yy533; - goto yy531; + if(yych <= '9') goto yy659; + if(yych == 'I') goto yy665; + goto yy620; } -yy531: - YYDEBUG(531, *YYCURSOR); - -#line 1317 "ext/date/lib/parse_date.re" -{ - int tz_not_found; - DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_SHORTDATE_WITH_TIME; +yy693: + YYDEBUG(693, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; + } else { + if(yych <= '9') goto yy733; + if(yych <= ':') goto yy636; + goto yy634; } -#line 8619 "ext/date/lib/parse_date.c" -yy532: - YYDEBUG(532, *YYCURSOR); - yyaccept = 7; +yy694: + YYDEBUG(694, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy533; - if(yych != ':') goto yy531; - goto yy533; -yy533: - YYDEBUG(533, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy534; - if(yych <= '6') goto yy535; - if(yych <= '9') goto yy536; - goto yy56; -yy534: - YYDEBUG(534, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '9') goto yy537; - goto yy531; -yy535: - YYDEBUG(535, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy537; - goto yy531; -yy536: - YYDEBUG(536, *YYCURSOR); - yych = *++YYCURSOR; - goto yy531; -yy537: - YYDEBUG(537, *YYCURSOR); - yyaccept = 7; + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; + } else { + if(yych <= '2') goto yy733; + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; + } +yy695: + YYDEBUG(695, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '+'){ - if(yych <= '\''){ - if(yych != ' ') goto yy531; - goto yy538; - } else { - if(yych <= '(') goto yy541; - if(yych <= '*') goto yy531; - goto yy540; - } + if(yych <= '/'){ + if(yych == '.') goto yy724; + goto yy634; } else { - if(yych <= '@'){ - if(yych == '-') goto yy540; - goto yy531; - } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy543; - goto yy531; - } + if(yych <= '9') goto yy649; + if(yych <= ':') goto yy636; + goto yy634; } -yy538: - YYDEBUG(538, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; - goto yy539; -yy539: - YYDEBUG(539, *YYCURSOR); - if(yych <= '+'){ - if(yych <= '\''){ - if(yych == ' ') goto yy538; - goto yy56; - } else { - if(yych <= '(') goto yy541; - if(yych <= '*') goto yy56; - goto yy540; - } +yy696: + YYDEBUG(696, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy724; + if(yych == ':') goto yy636; + goto yy634; +yy697: + YYDEBUG(697, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy718; + if(yych == 'e') goto yy718; + goto yy53; +yy698: + YYDEBUG(698, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy715; + if(yych == 'a') goto yy715; + goto yy53; +yy699: + YYDEBUG(699, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy675; + if(yych <= 'T') goto yy53; + goto yy674; } else { - if(yych <= '@'){ - if(yych != '-') goto yy56; - goto yy540; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy675; } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy543; - goto yy56; + if(yych == 'u') goto yy674; + goto yy53; } } -yy540: - YYDEBUG(540, *YYCURSOR); +yy700: + YYDEBUG(700, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy556; - if(yych <= '2') goto yy557; - if(yych <= '9') goto yy558; - goto yy56; -yy541: - YYDEBUG(541, *YYCURSOR); + if(yych == 'E') goto yy708; + if(yych == 'e') goto yy708; + goto yy53; +yy701: + YYDEBUG(701, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@') goto yy56; - if(yych <= 'Z') goto yy543; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy543; - goto yy56; -yy542: - YYDEBUG(542, *YYCURSOR); + if(yych == 'E') goto yy702; + if(yych != 'e') goto yy53; + goto yy702; +yy702: + YYDEBUG(702, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; + if(yych == 'C') goto yy703; + if(yych != 'c') goto yy53; + goto yy703; +yy703: + YYDEBUG(703, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= 'Z') goto yy544; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy547; - goto yy531; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy704; + } else { + if(yych != 'e') goto yy620; + goto yy704; + } } -yy543: - YYDEBUG(543, *YYCURSOR); +yy704: + YYDEBUG(704, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; - } else { - if(yych <= 'Z') goto yy544; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy544; - } -yy544: - YYDEBUG(544, *YYCURSOR); + if(yych == 'M') goto yy705; + if(yych != 'm') goto yy53; + goto yy705; +yy705: + YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; - } else { - if(yych <= 'Z') goto yy545; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy545; - } -yy545: - YYDEBUG(545, *YYCURSOR); + if(yych == 'B') goto yy706; + if(yych != 'b') goto yy53; + goto yy706; +yy706: + YYDEBUG(706, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '@'){ - if(yych == ')') goto yy536; - goto yy531; - } else { - if(yych <= 'Z') goto yy546; - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy546; - } -yy546: - YYDEBUG(546, *YYCURSOR); + if(yych == 'E') goto yy707; + if(yych != 'e') goto yy53; + goto yy707; +yy707: + YYDEBUG(707, *YYCURSOR); yych = *++YYCURSOR; - if(yych == ')') goto yy536; - goto yy531; -yy547: - YYDEBUG(547, *YYCURSOR); - yyaccept = 7; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; +yy708: + YYDEBUG(708, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'P') goto yy709; + if(yych != 'p') goto yy53; + goto yy709; +yy709: + YYDEBUG(709, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy531; - goto yy536; - } else { - if(yych == '/') goto yy549; - goto yy531; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy545; - if(yych <= '^') goto yy531; - goto yy549; + if(yych <= 'T'){ + if(yych <= 'S') goto yy620; + goto yy710; } else { - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy548; + if(yych != 't') goto yy620; + goto yy710; } } -yy548: - YYDEBUG(548, *YYCURSOR); - yyaccept = 7; +yy710: + YYDEBUG(710, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy531; - goto yy536; - } else { - if(yych != '/') goto yy531; - goto yy549; - } + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy546; - if(yych <= '^') goto yy531; - goto yy549; + if(yych <= 'E'){ + if(yych <= 'D') goto yy620; + goto yy711; } else { - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy553; - goto yy531; + if(yych != 'e') goto yy620; + goto yy711; } } -yy549: - YYDEBUG(549, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '@') goto yy56; - if(yych >= '[') goto yy56; - goto yy550; -yy550: - YYDEBUG(550, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if(yych <= '`') goto yy56; - if(yych >= '{') goto yy56; - goto yy551; -yy551: - YYDEBUG(551, *YYCURSOR); - yyaccept = 7; - YYMARKER = ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy552; -yy552: - YYDEBUG(552, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy549; - goto yy531; +yy711: + YYDEBUG(711, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'M') goto yy712; + if(yych != 'm') goto yy53; + goto yy712; +yy712: + YYDEBUG(712, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy713; + if(yych != 'b') goto yy53; + goto yy713; +yy713: + YYDEBUG(713, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy714; + if(yych != 'e') goto yy53; + goto yy714; +yy714: + YYDEBUG(714, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy665; + if(yych == 'r') goto yy665; + goto yy53; +yy715: + YYDEBUG(715, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'Y'){ + if(yych == 'R') goto yy716; + if(yych <= 'X') goto yy53; + goto yy665; } else { - if(yych <= '_') goto yy549; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy551; - goto yy531; + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy716; + } else { + if(yych == 'y') goto yy665; + goto yy53; + } } -yy553: - YYDEBUG(553, *YYCURSOR); - yyaccept = 7; +yy716: + YYDEBUG(716, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == ')') goto yy536; - if(yych <= '.') goto yy531; - goto yy549; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych <= '_'){ - if(yych <= '^') goto yy531; - goto yy549; + if(yych <= 'C'){ + if(yych <= 'B') goto yy620; + goto yy717; } else { - if(yych <= '`') goto yy531; - if(yych >= '{') goto yy531; - goto yy554; + if(yych != 'c') goto yy620; + goto yy717; } } -yy554: - YYDEBUG(554, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy555; -yy555: - YYDEBUG(555, *YYCURSOR); - if(yych <= '^'){ - if(yych == '/') goto yy549; - goto yy56; - } else { - if(yych <= '_') goto yy549; - if(yych <= '`') goto yy56; - if(yych <= 'z') goto yy554; - goto yy56; - } -yy556: - YYDEBUG(556, *YYCURSOR); +yy717: + YYDEBUG(717, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy561; - if(yych <= '9') goto yy558; - if(yych <= ':') goto yy559; - goto yy531; -yy557: - YYDEBUG(557, *YYCURSOR); - yyaccept = 7; + if(yych == 'H') goto yy665; + if(yych == 'h') goto yy665; + goto yy53; +yy718: + YYDEBUG(718, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy719; + if(yych != 'b') goto yy53; + goto yy719; +yy719: + YYDEBUG(719, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy531; - if(yych <= '3') goto yy561; - goto yy560; + if(yych <= '9'){ + if(yych <= 0x1F) goto yy620; + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + goto yy659; } else { - if(yych == ':') goto yy559; - goto yy531; + if(yych <= 'R'){ + if(yych <= 'Q') goto yy620; + goto yy720; + } else { + if(yych != 'r') goto yy620; + goto yy720; + } } -yy558: - YYDEBUG(558, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy560; - if(yych != ':') goto yy531; - goto yy559; -yy559: - YYDEBUG(559, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy531; - if(yych >= '6') goto yy531; - goto yy560; -yy560: - YYDEBUG(560, *YYCURSOR); +yy720: + YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy536; - goto yy56; -yy561: - YYDEBUG(561, *YYCURSOR); + if(yych == 'U') goto yy721; + if(yych != 'u') goto yy53; + goto yy721; +yy721: + YYDEBUG(721, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '5') goto yy562; - if(yych <= '9') goto yy536; - if(yych <= ':') goto yy559; - goto yy531; -yy562: - YYDEBUG(562, *YYCURSOR); + if(yych == 'A') goto yy722; + if(yych != 'a') goto yy53; + goto yy722; +yy722: + YYDEBUG(722, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy531; - if(yych <= '9') goto yy536; - goto yy531; -yy563: - YYDEBUG(563, *YYCURSOR); + if(yych == 'R') goto yy723; + if(yych != 'r') goto yy53; + goto yy723; +yy723: + YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych >= ':') goto yy513; - goto yy564; -yy564: - YYDEBUG(564, *YYCURSOR); + if(yych == 'Y') goto yy665; + if(yych == 'y') goto yy665; + goto yy53; +yy724: + YYDEBUG(724, *YYCURSOR); yych = *++YYCURSOR; - goto yy513; -yy565: - YYDEBUG(565, *YYCURSOR); - yyaccept = 6; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy725; + if(yych <= '6') goto yy726; + if(yych <= '9') goto yy727; + goto yy53; +yy725: + YYDEBUG(725, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy732; + goto yy634; +yy726: + YYDEBUG(726, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych == '.') goto yy640; + goto yy634; } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '0') goto yy732; + if(yych <= '9') goto yy728; + goto yy634; } -yy566: - YYDEBUG(566, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy513; - if(yych >= ':') goto yy513; - goto yy567; -yy567: - YYDEBUG(567, *YYCURSOR); +yy727: + YYDEBUG(727, *YYCURSOR); + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych >= ':') goto yy634; + goto yy728; +yy728: + YYDEBUG(728, *YYCURSOR); ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy568; - if(yych <= '9') goto yy564; - goto yy568; -yy568: - YYDEBUG(568, *YYCURSOR); + if((yych = *YYCURSOR) <= '/') goto yy729; + if(yych <= '9') goto yy730; + goto yy729; +yy729: + YYDEBUG(729, *YYCURSOR); -#line 1062 "ext/date/lib/parse_date.re" +#line 1086 "ext/date/lib/parse_date.re" { - DEBUG_OUTPUT("datenoday"); + DEBUG_OUTPUT("pointed date"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = 1; TIMELIB_PROCESS_YEAR(s->time->y); TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; + return TIMELIB_DATE_FULL_POINTED; } -#line 8916 "ext/date/lib/parse_date.c" -yy569: - YYDEBUG(569, *YYCURSOR); - yyaccept = 6; +#line 9337 "ext/date/lib/parse_date.c" +yy730: + YYDEBUG(730, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy729; + if(yych >= ':') goto yy729; + goto yy731; +yy731: + YYDEBUG(731, *YYCURSOR); + yych = *++YYCURSOR; + goto yy729; +yy732: + YYDEBUG(732, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= '@'){ + if(yych <= '-'){ + if(yych == ' ') goto yy644; + goto yy634; + } else { + if(yych <= '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy730; + goto yy634; + } } else { - if(yych <= '9') goto yy567; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= '`'){ + if(yych <= 'A') goto yy646; + if(yych == 'P') goto yy646; + goto yy634; + } else { + if(yych <= 'a') goto yy646; + if(yych == 'p') goto yy646; + goto yy634; + } } -yy570: - YYDEBUG(570, *YYCURSOR); - yyaccept = 6; +yy733: + YYDEBUG(733, *YYCURSOR); + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '1'){ - if(yych == '.') goto yy571; - if(yych <= '/') goto yy524; - goto yy572; + if(yych <= '@'){ + if(yych <= '-'){ + if(yych == ' ') goto yy650; + goto yy634; + } else { + if(yych <= '.') goto yy724; + if(yych == ':') goto yy636; + goto yy634; + } } else { - if(yych <= '2') goto yy573; - if(yych <= '9') goto yy574; - if(yych <= ':') goto yy529; - goto yy524; + if(yych <= '`'){ + if(yych <= 'A') goto yy652; + if(yych == 'P') goto yy652; + goto yy634; + } else { + if(yych <= 'a') goto yy652; + if(yych == 'p') goto yy652; + goto yy634; + } } -yy571: - YYDEBUG(571, *YYCURSOR); +yy734: + YYDEBUG(734, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy577; - goto yy578; - } else { - if(yych <= '5') goto yy579; - if(yych <= '9') goto yy580; - goto yy524; - } -yy572: - YYDEBUG(572, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych == '-') goto yy773; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy736; + goto yy53; +yy735: + YYDEBUG(735, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy773; + if(yych <= '/') goto yy53; + if(yych >= '3') goto yy53; + goto yy736; +yy736: + YYDEBUG(736, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy773; + goto yy53; +yy737: + YYDEBUG(737, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'A') goto yy769; + if(yych <= 'T') goto yy53; + goto yy768; } else { - if(yych <= '9') goto yy576; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy769; + } else { + if(yych == 'u') goto yy768; + goto yy53; + } } -yy573: - YYDEBUG(573, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; +yy738: + YYDEBUG(738, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy766; + if(yych == 'e') goto yy766; + goto yy53; +yy739: + YYDEBUG(739, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy763; + if(yych == 'a') goto yy763; + goto yy53; +yy740: + YYDEBUG(740, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy760; + if(yych <= 'T') goto yy53; + goto yy759; } else { - if(yych <= '3') goto yy576; - if(yych <= '9') goto yy575; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy760; + } else { + if(yych == 'u') goto yy759; + goto yy53; + } } -yy574: - YYDEBUG(574, *YYCURSOR); - yyaccept = 6; +yy741: + YYDEBUG(741, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy756; + if(yych == 'e') goto yy756; + goto yy53; +yy742: + YYDEBUG(742, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'C') goto yy754; + if(yych == 'c') goto yy754; + goto yy53; +yy743: + YYDEBUG(743, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'O') goto yy752; + if(yych == 'o') goto yy752; + goto yy53; +yy744: + YYDEBUG(744, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy745; + if(yych != 'e') goto yy53; + goto yy745; +yy745: + YYDEBUG(745, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'C') goto yy746; + if(yych != 'c') goto yy53; + goto yy746; +yy746: + YYDEBUG(746, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy575; - if(yych <= ':') goto yy529; - goto yy513; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy704; + } else { + if(yych == 'e') goto yy704; + goto yy620; + } } -yy575: - YYDEBUG(575, *YYCURSOR); +yy747: + YYDEBUG(747, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy568; - if(yych <= '9') goto yy563; - goto yy568; -yy576: - YYDEBUG(576, *YYCURSOR); - yyaccept = 8; + if(yych <= '/') goto yy658; + if(yych <= '0') goto yy748; + if(yych <= '2') goto yy749; + if(yych <= '3') goto yy750; + goto yy658; +yy748: + YYDEBUG(748, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '0') goto yy666; + if(yych <= '9') goto yy751; + goto yy660; +yy749: + YYDEBUG(749, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '9') goto yy751; + goto yy660; +yy750: + YYDEBUG(750, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '1') goto yy751; + if(yych <= '9') goto yy666; + goto yy660; +yy751: + YYDEBUG(751, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy660; + if(yych <= '9') goto yy667; + goto yy660; +yy752: + YYDEBUG(752, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'V') goto yy753; + if(yych != 'v') goto yy53; + goto yy753; +yy753: + YYDEBUG(753, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy529; - goto yy568; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy529; - goto yy568; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy661; + } else { + if(yych == 'e') goto yy661; + goto yy620; + } } -yy577: - YYDEBUG(577, *YYCURSOR); - yyaccept = 6; +yy754: + YYDEBUG(754, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'T') goto yy755; + if(yych != 't') goto yy53; + goto yy755; +yy755: + YYDEBUG(755, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy586; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'O'){ + if(yych <= '9') goto yy659; + if(yych <= 'N') goto yy620; + goto yy671; + } else { + if(yych == 'o') goto yy671; + goto yy620; + } } -yy578: - YYDEBUG(578, *YYCURSOR); - yyaccept = 6; +yy756: + YYDEBUG(756, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'P') goto yy757; + if(yych != 'p') goto yy53; + goto yy757; +yy757: + YYDEBUG(757, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '3') goto yy586; - if(yych <= '9') goto yy585; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'T'){ + if(yych <= '9') goto yy659; + if(yych <= 'S') goto yy620; + goto yy758; + } else { + if(yych != 't') goto yy620; + goto yy758; + } } -yy579: - YYDEBUG(579, *YYCURSOR); - yyaccept = 6; +yy758: + YYDEBUG(758, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy585; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy711; + } else { + if(yych == 'e') goto yy711; + goto yy620; + } } -yy580: - YYDEBUG(580, *YYCURSOR); - yyaccept = 6; +yy759: + YYDEBUG(759, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'G') goto yy762; + if(yych == 'g') goto yy762; + goto yy53; +yy760: + YYDEBUG(760, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy761; + if(yych != 'r') goto yy53; + goto yy761; +yy761: + YYDEBUG(761, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych != '.') goto yy513; - goto yy581; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy528; - if(yych >= ';') goto yy513; - goto yy581; + if(yych <= 'I'){ + if(yych <= '9') goto yy659; + if(yych <= 'H') goto yy620; + goto yy677; + } else { + if(yych == 'i') goto yy677; + goto yy620; + } } -yy581: - YYDEBUG(581, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy582; - if(yych <= '6') goto yy583; - if(yych <= '9') goto yy532; - goto yy56; -yy582: - YYDEBUG(582, *YYCURSOR); - yyaccept = 7; +yy762: + YYDEBUG(762, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy584; - if(yych <= ':') goto yy533; - goto yy531; + if(yych <= 'U'){ + if(yych <= '9') goto yy659; + if(yych <= 'T') goto yy620; + goto yy679; + } else { + if(yych == 'u') goto yy679; + goto yy620; + } } -yy583: - YYDEBUG(583, *YYCURSOR); - yyaccept = 7; +yy763: + YYDEBUG(763, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'Y'){ + if(yych == 'R') goto yy764; + if(yych <= 'X') goto yy53; + goto yy765; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy764; + } else { + if(yych == 'y') goto yy765; + goto yy53; + } + } +yy764: + YYDEBUG(764, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy531; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '0') goto yy537; - if(yych == ':') goto yy533; - goto yy531; + if(yych <= 'C'){ + if(yych <= '9') goto yy659; + if(yych <= 'B') goto yy620; + goto yy717; + } else { + if(yych == 'c') goto yy717; + goto yy620; + } } -yy584: - YYDEBUG(584, *YYCURSOR); - yyaccept = 7; +yy765: + YYDEBUG(765, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '-'){ - if(yych <= '('){ - if(yych == ' ') goto yy538; - if(yych <= '\'') goto yy531; - goto yy541; + if(yych <= 0x1F) goto yy620; + if(yych <= ',') goto yy657; + goto yy747; + } else { + if(yych <= '.') goto yy657; + if(yych <= '/') goto yy620; + if(yych <= '9') goto yy659; + goto yy620; + } +yy766: + YYDEBUG(766, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy767; + if(yych != 'b') goto yy53; + goto yy767; +yy767: + YYDEBUG(767, *YYCURSOR); + yyaccept = 10; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; } else { - if(yych == '+') goto yy540; - if(yych <= ',') goto yy531; - goto yy540; + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; } } else { - if(yych <= '@'){ - if(yych <= '.') goto yy533; - if(yych == ':') goto yy533; - goto yy531; + if(yych <= 'R'){ + if(yych <= '9') goto yy659; + if(yych <= 'Q') goto yy620; + goto yy720; } else { - if(yych <= 'Z') goto yy542; - if(yych <= '`') goto yy531; - if(yych <= 'z') goto yy543; - goto yy531; + if(yych == 'r') goto yy720; + goto yy620; } } -yy585: - YYDEBUG(585, *YYCURSOR); - yyaccept = 6; +yy768: + YYDEBUG(768, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy772; + if(yych <= 'M') goto yy53; + goto yy771; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy772; + } else { + if(yych == 'n') goto yy771; + goto yy53; + } + } +yy769: + YYDEBUG(769, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'N') goto yy770; + if(yych != 'n') goto yy53; + goto yy770; +yy770: + YYDEBUG(770, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy533; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy533; - goto yy513; + if(yych <= 'U'){ + if(yych <= '9') goto yy659; + if(yych <= 'T') goto yy620; + goto yy684; + } else { + if(yych == 'u') goto yy684; + goto yy620; + } } -yy586: - YYDEBUG(586, *YYCURSOR); - yyaccept = 6; +yy771: + YYDEBUG(771, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych == '.') goto yy581; - goto yy513; + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '9') goto yy563; - if(yych <= ':') goto yy581; - goto yy513; + if(yych <= 'E'){ + if(yych <= '9') goto yy659; + if(yych <= 'D') goto yy620; + goto yy665; + } else { + if(yych == 'e') goto yy665; + goto yy620; + } } -yy587: - YYDEBUG(587, *YYCURSOR); - yyaccept = 6; +yy772: + YYDEBUG(772, *YYCURSOR); + yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '1'){ - if(yych == '.') goto yy571; - if(yych <= '/') goto yy524; - goto yy572; + if(yych <= '/'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy620; + goto yy657; + } else { + if(yych <= '-') goto yy747; + if(yych <= '.') goto yy657; + goto yy620; + } } else { - if(yych <= '2') goto yy573; - if(yych <= '9') goto yy574; - if(yych <= ':') goto yy529; - goto yy524; + if(yych <= 'Y'){ + if(yych <= '9') goto yy659; + if(yych <= 'X') goto yy620; + goto yy665; + } else { + if(yych == 'y') goto yy665; + goto yy620; + } } -yy588: - YYDEBUG(588, *YYCURSOR); +yy773: + YYDEBUG(773, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy524; - if(yych <= '0') goto yy570; - goto yy591; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy774; + if(yych <= '3') goto yy776; + if(yych <= '9') goto yy777; + goto yy53; +yy774: + YYDEBUG(774, *YYCURSOR); + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy775; + if(yych <= '9') goto yy777; + if(yych >= 'n') goto yy779; + goto yy775; } else { - if(yych <= '2') goto yy598; - if(yych <= '9') goto yy591; - goto yy524; + if(yych <= 'r'){ + if(yych >= 'r') goto yy780; + goto yy775; + } else { + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; + } } -yy589: - YYDEBUG(589, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych == '2') goto yy598; - if(yych <= '9') goto yy591; - goto yy524; -yy590: - YYDEBUG(590, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy524; - if(yych <= '1') goto yy591; - if(yych <= '2') goto yy521; - if(yych <= '9') goto yy522; - goto yy524; -yy591: - YYDEBUG(591, *YYCURSOR); - yyaccept = 6; +yy775: + YYDEBUG(775, *YYCURSOR); + +#line 1059 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("gnudateshort"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_ISO_DATE; + } +#line 9838 "ext/date/lib/parse_date.c" +yy776: + YYDEBUG(776, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case '-': goto yy592; - case '.': goto yy571; - case '0': - case '1': goto yy572; - case '2': goto yy573; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy574; - case ':': goto yy529; - default: goto yy524; - } -yy592: - YYDEBUG(592, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy593; -yy593: - YYDEBUG(593, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy594; - if(yych <= '9') goto yy595; - goto yy594; -yy594: - YYDEBUG(594, *YYCURSOR); - -#line 1197 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("pgtextshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; - } -#line 9177 "ext/date/lib/parse_date.c" -yy595: - YYDEBUG(595, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy594; - if(yych >= ':') goto yy594; - goto yy596; -yy596: - YYDEBUG(596, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy594; - if(yych >= ':') goto yy594; - goto yy597; -yy597: - YYDEBUG(597, *YYCURSOR); - yych = *++YYCURSOR; - goto yy594; -yy598: - YYDEBUG(598, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case '-': goto yy592; - case '.': goto yy571; - case '0': - case '1': goto yy572; - case '2': goto yy573; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy574; - case ':': goto yy529; - default: goto yy524; - } -yy599: - YYDEBUG(599, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'C'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'B') goto yy51; - goto yy507; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'c') goto yy600; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy600: - YYDEBUG(600, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } + if(yych <= 'n'){ + if(yych <= '/') goto yy775; + if(yych <= '1') goto yy777; + if(yych <= 'm') goto yy775; + goto yy779; } else { - if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy516; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } + if(yych <= 'r'){ + if(yych <= 'q') goto yy775; + goto yy780; } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'e') goto yy601; - if(yych <= 'z') goto yy60; - goto yy3; - } + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; } } -yy601: - YYDEBUG(601, *YYCURSOR); - yyaccept = 1; +yy777: + YYDEBUG(777, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'L') goto yy3; - goto yy517; - } + if(yych <= 'q'){ + if(yych == 'n') goto yy779; + goto yy775; } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'm') goto yy602; - if(yych <= 'z') goto yy61; - goto yy3; - } + if(yych <= 'r') goto yy780; + if(yych <= 's') goto yy778; + if(yych <= 't') goto yy781; + goto yy775; } -yy602: - YYDEBUG(602, *YYCURSOR); +yy778: + YYDEBUG(778, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy518; - if(yych != 'b') goto yy62; - goto yy603; -yy603: - YYDEBUG(603, *YYCURSOR); + if(yych == 't') goto yy782; + goto yy53; +yy779: + YYDEBUG(779, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy519; - if(yych != 'e') goto yy62; - goto yy604; -yy604: - YYDEBUG(604, *YYCURSOR); + if(yych == 'd') goto yy782; + goto yy53; +yy780: + YYDEBUG(780, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '^'){ + if(yych == 'd') goto yy782; + goto yy53; +yy781: + YYDEBUG(781, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != 'h') goto yy53; + goto yy782; +yy782: + YYDEBUG(782, *YYCURSOR); + yych = *++YYCURSOR; + goto yy775; +yy783: + YYDEBUG(783, *YYCURSOR); + yyaccept = 13; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; + if(yych >= '/') goto yy837; + goto yy784; } else { - if(yych == 'R') goto yy508; - goto yy56; + if(yych <= '9') goto yy786; + if(yych >= 'n') goto yy834; + goto yy784; } } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; + if(yych <= 'r'){ + if(yych >= 'r') goto yy835; + goto yy784; } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } } -yy605: - YYDEBUG(605, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych == '/') goto yy55; - goto yy509; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy509; - if(yych <= 'z') goto yy61; - goto yy509; - } -yy606: - YYDEBUG(606, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy51; - goto yy618; - } - } else { - if(yych <= 'u'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'v') goto yy618; - if(yych <= 'z') goto yy51; - goto yy3; +yy784: + YYDEBUG(784, *YYCURSOR); + +#line 1032 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("americanshort | american"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + if (*ptr == '/') { + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_PROCESS_YEAR(s->time->y); } + TIMELIB_DEINIT; + return TIMELIB_AMERICAN; } -yy607: - YYDEBUG(607, *YYCURSOR); - yyaccept = 1; +#line 9917 "ext/date/lib/parse_date.c" +yy785: + YYDEBUG(785, *YYCURSOR); + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; + if(yych <= 'n'){ + if(yych <= '/'){ + if(yych <= '.') goto yy784; + goto yy837; } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'U') goto yy51; - goto yy618; + if(yych <= '1') goto yy786; + if(yych <= 'm') goto yy784; + goto yy834; } } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'r'){ + if(yych <= 'q') goto yy784; + goto yy835; } else { - if(yych == 'v') goto yy619; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } } -yy608: - YYDEBUG(608, *YYCURSOR); - yyaccept = 1; +yy786: + YYDEBUG(786, *YYCURSOR); + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy614; - } + if(yych <= 'n'){ + if(yych == '/') goto yy837; + if(yych <= 'm') goto yy784; + goto yy834; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'r'){ + if(yych <= 'q') goto yy784; + goto yy835; } else { - if(yych == 'x') goto yy617; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych <= 's') goto yy833; + if(yych <= 't') goto yy836; + goto yy784; } } -yy609: - YYDEBUG(609, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy612; - } +yy787: + YYDEBUG(787, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'A') goto yy832; + if(yych <= 'T') goto yy53; + goto yy831; } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy832; } else { - if(yych == 'n') goto yy615; - if(yych <= 'z') goto yy54; - goto yy3; + if(yych == 'u') goto yy831; + goto yy53; } } -yy610: - YYDEBUG(610, *YYCURSOR); +yy788: + YYDEBUG(788, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'X'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy614; - } + if(yych == 'E') goto yy830; + if(yych == 'e') goto yy830; + goto yy53; +yy789: + YYDEBUG(789, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy829; + if(yych == 'a') goto yy829; + goto yy53; +yy790: + YYDEBUG(790, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy828; + if(yych <= 'T') goto yy53; + goto yy827; } else { - if(yych <= 'w'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy828; } else { - if(yych <= 'x') goto yy614; - if(yych <= 'z') goto yy51; - goto yy3; + if(yych == 'u') goto yy827; + goto yy53; } } -yy611: - YYDEBUG(611, *YYCURSOR); +yy791: + YYDEBUG(791, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy612; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy612; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy612: - YYDEBUG(612, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy613; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy613; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy613: - YYDEBUG(613, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } -yy614: - YYDEBUG(614, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy452; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy615: - YYDEBUG(615, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy613; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy616; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy616: - YYDEBUG(616, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy617: - YYDEBUG(617, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy452; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy455; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy618: - YYDEBUG(618, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy620; - goto yy52; - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy620; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy619: - YYDEBUG(619, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy620; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'e') goto yy621; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy620: - YYDEBUG(620, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'M') goto yy622; - if(yych == 'm') goto yy622; - goto yy3; - } -yy621: - YYDEBUG(621, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'L') goto yy3; - goto yy622; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'm') goto yy623; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy622: - YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy624; - if(yych == 'b') goto yy624; - goto yy56; -yy623: - YYDEBUG(623, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy624; - if(yych == 'b') goto yy625; - goto yy62; -yy624: - YYDEBUG(624, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy626; - if(yych == 'e') goto yy626; - goto yy56; -yy625: - YYDEBUG(625, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy626; - if(yych == 'e') goto yy627; - goto yy62; -yy626: - YYDEBUG(626, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; -yy627: - YYDEBUG(627, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy628: - YYDEBUG(628, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy629; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 't') goto yy629; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy629: - YYDEBUG(629, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'O') goto yy52; - goto yy630; - } else { - if(yych <= 'n'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'o') goto yy630; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy630: - YYDEBUG(630, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'B') goto yy631; - if(yych != 'b') goto yy3; - goto yy631; - } -yy631: - YYDEBUG(631, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy632; - if(yych != 'e') goto yy56; - goto yy632; -yy632: - YYDEBUG(632, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; -yy633: - YYDEBUG(633, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy629; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy634; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy634: - YYDEBUG(634, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'O'){ - if(yych <= 'N') goto yy52; - goto yy630; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'n'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'o') goto yy635; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy635: - YYDEBUG(635, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'A') goto yy3; - goto yy631; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'b') goto yy636; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy636: - YYDEBUG(636, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy632; - if(yych != 'e') goto yy62; - goto yy637; -yy637: - YYDEBUG(637, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy638: - YYDEBUG(638, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'V'){ - if(yych <= 'B'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'O'){ - if(yych <= 'C') goto yy653; - goto yy51; - } else { - if(yych <= 'P') goto yy652; - if(yych <= 'U') goto yy51; - goto yy654; - } - } - } else { - if(yych <= 'o'){ - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych == 'c') goto yy653; - goto yy51; - } - } else { - if(yych <= 'u'){ - if(yych <= 'p') goto yy652; - goto yy51; - } else { - if(yych <= 'v') goto yy654; - if(yych <= 'z') goto yy51; - goto yy3; - } - } - } -yy639: - YYDEBUG(639, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy647; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 't') goto yy647; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy640: - YYDEBUG(640, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'X'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy645; - } - } else { - if(yych <= 'w'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'x') goto yy645; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy641: - YYDEBUG(641, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy642; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy642; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy642: - YYDEBUG(642, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy643; - } - } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; - } else { - if(yych <= 'd') goto yy643; - if(yych <= 'z') goto yy52; - goto yy154; - } - } -yy643: - YYDEBUG(643, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy644; - if(yych != 'a') goto yy3; - goto yy644; - } -yy644: - YYDEBUG(644, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy645: - YYDEBUG(645, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy646; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy646; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy646: - YYDEBUG(646, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } -yy647: - YYDEBUG(647, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'T') goto yy52; - goto yy648; - } - } else { - if(yych <= 't'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; - } else { - if(yych <= 'u') goto yy648; - if(yych <= 'z') goto yy52; - goto yy154; - } - } -yy648: - YYDEBUG(648, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Q'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'R') goto yy649; - if(yych != 'r') goto yy3; - goto yy649; - } -yy649: - YYDEBUG(649, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy650; - if(yych != 'd') goto yy56; - goto yy650; -yy650: - YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy651; - if(yych != 'a') goto yy56; - goto yy651; -yy651: - YYDEBUG(651, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy652: - YYDEBUG(652, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'T') goto yy657; - goto yy52; - } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy657; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy653: - YYDEBUG(653, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy52; - goto yy656; - } - } else { - if(yych <= 'n'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'o') goto yy656; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy654: - YYDEBUG(654, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy52; - goto yy655; - } - } else { - if(yych <= 'd'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy655; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy655: - YYDEBUG(655, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'N') goto yy233; - if(yych == 'n') goto yy233; - goto yy3; - } -yy656: - YYDEBUG(656, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'M'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'N') goto yy236; - if(yych == 'n') goto yy236; - goto yy3; - } -yy657: - YYDEBUG(657, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - goto yy509; - } - } else { - if(yych <= 'D'){ - if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } else { - if(yych <= 'E') goto yy658; - if(yych != 'e') goto yy3; - goto yy658; - } - } -yy658: - YYDEBUG(658, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'M') goto yy659; - if(yych != 'm') goto yy56; - goto yy659; -yy659: - YYDEBUG(659, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy660; - if(yych != 'b') goto yy56; - goto yy660; -yy660: - YYDEBUG(660, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy661; - if(yych != 'e') goto yy56; - goto yy661; -yy661: - YYDEBUG(661, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy508; - if(yych == 'r') goto yy508; - goto yy56; -yy662: - YYDEBUG(662, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'V'){ - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy3; - } - } else { - if(yych <= 'O'){ - if(yych == 'C') goto yy653; - goto yy51; - } else { - if(yych <= 'P') goto yy652; - if(yych <= 'U') goto yy51; - goto yy654; - } - } - } else { - if(yych <= 'c'){ - if(yych <= '_'){ - if(yych <= 'Z') goto yy51; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'b') goto yy54; - goto yy677; - } - } else { - if(yych <= 'u'){ - if(yych == 'p') goto yy676; - goto yy54; - } else { - if(yych <= 'v') goto yy678; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } -yy663: - YYDEBUG(663, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy51; - goto yy647; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy671; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy664: - YYDEBUG(664, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'W') goto yy51; - goto yy645; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'x') goto yy669; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy665: - YYDEBUG(665, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy642; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy666; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy666: - YYDEBUG(666, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy643; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'd') goto yy667; - if(yych <= 'z') goto yy60; - goto yy154; - } - } -yy667: - YYDEBUG(667, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy644; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy668; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy668: - YYDEBUG(668, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy669: - YYDEBUG(669, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy646; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy670; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy670: - YYDEBUG(670, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy671: - YYDEBUG(671, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'T') goto yy52; - goto yy648; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'u') goto yy672; - if(yych <= 'z') goto yy60; - goto yy154; - } - } -yy672: - YYDEBUG(672, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'Q') goto yy3; - goto yy649; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'r') goto yy673; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy673: - YYDEBUG(673, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'D') goto yy650; - if(yych != 'd') goto yy62; - goto yy674; -yy674: - YYDEBUG(674, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy651; - if(yych != 'a') goto yy62; - goto yy675; -yy675: - YYDEBUG(675, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy676: - YYDEBUG(676, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'T'){ - if(yych <= 'S') goto yy52; - goto yy657; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 't') goto yy681; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy677: - YYDEBUG(677, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'O'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy52; - goto yy656; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'o') goto yy680; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy678: - YYDEBUG(678, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'E'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'D') goto yy52; - goto yy655; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'e') goto yy679; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy679: - YYDEBUG(679, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'M') goto yy3; - goto yy233; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy358; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy680: - YYDEBUG(680, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'M') goto yy3; - goto yy236; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy361; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy681: - YYDEBUG(681, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy55; - goto yy509; - } - } else { - if(yych <= '_'){ - if(yych == 'E') goto yy658; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy61; - } else { - if(yych <= 'e') goto yy682; - if(yych <= 'z') goto yy61; - goto yy3; - } - } - } -yy682: - YYDEBUG(682, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'M') goto yy659; - if(yych != 'm') goto yy62; - goto yy683; -yy683: - YYDEBUG(683, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy660; - if(yych != 'b') goto yy62; - goto yy684; -yy684: - YYDEBUG(684, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy661; - if(yych != 'e') goto yy62; - goto yy685; -yy685: - YYDEBUG(685, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'R') goto yy508; - goto yy56; - } - } else { - if(yych <= 'q'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'r') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy686: - YYDEBUG(686, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'G'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy693; - } - } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'g') goto yy693; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy687: - YYDEBUG(687, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy51; - goto yy691; - } - } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'r') goto yy691; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy688: - YYDEBUG(688, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy51; - goto yy689; - } - } else { - if(yych <= 'n'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'o') goto yy689; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy689: - YYDEBUG(689, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '@'){ - if(yych == ')') goto yy49; - goto yy690; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy690; - if(yych <= 'z') goto yy52; - goto yy690; - } -yy690: - YYDEBUG(690, *YYCURSOR); - -#line 1251 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("ago"); - TIMELIB_INIT; - s->time->relative.y = 0 - s->time->relative.y; - s->time->relative.m = 0 - s->time->relative.m; - s->time->relative.d = 0 - s->time->relative.d; - s->time->relative.h = 0 - s->time->relative.h; - s->time->relative.i = 0 - s->time->relative.i; - s->time->relative.s = 0 - s->time->relative.s; - s->time->relative.weekday = 0 - s->time->relative.weekday; - TIMELIB_DEINIT; - return TIMELIB_AGO; - } -#line 10757 "ext/date/lib/parse_date.c" -yy691: - YYDEBUG(691, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'I') goto yy52; - goto yy692; - } else { - if(yych <= 'h'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'i') goto yy692; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy692: - YYDEBUG(692, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'K'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'L') goto yy508; - if(yych == 'l') goto yy508; - goto yy3; - } -yy693: - YYDEBUG(693, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'U') goto yy52; - goto yy694; - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'u') goto yy694; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy694: - YYDEBUG(694, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'S') goto yy695; - if(yych != 's') goto yy3; - goto yy695; - } -yy695: - YYDEBUG(695, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy508; - if(yych == 't') goto yy508; - goto yy56; -yy696: - YYDEBUG(696, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'F') goto yy51; - goto yy693; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'g') goto yy702; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy697: - YYDEBUG(697, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy51; - goto yy691; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'r') goto yy700; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy698: - YYDEBUG(698, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'O'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'N') goto yy51; - goto yy689; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'o') goto yy699; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy699: - YYDEBUG(699, *YYCURSOR); - yyaccept = 9; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ')'){ - if(yych <= '(') goto yy690; - goto yy49; - } else { - if(yych == '/') goto yy55; - goto yy690; - } - } else { - if(yych <= '_'){ - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy690; - goto yy55; - } else { - if(yych <= '`') goto yy690; - if(yych <= 'z') goto yy60; - goto yy690; - } - } -yy700: - YYDEBUG(700, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'I'){ - if(yych <= 'H') goto yy52; - goto yy692; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'h'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'i') goto yy701; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy701: - YYDEBUG(701, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'L'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'K') goto yy3; - goto yy508; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'l') goto yy605; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy702: - YYDEBUG(702, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'U'){ - if(yych <= 'T') goto yy52; - goto yy694; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'u') goto yy703; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy703: - YYDEBUG(703, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'R') goto yy3; - goto yy695; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 's') goto yy704; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy704: - YYDEBUG(704, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'T') goto yy508; - goto yy56; - } - } else { - if(yych <= 's'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 't') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy705: - YYDEBUG(705, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych == 'R') goto yy715; - if(yych <= 'X') goto yy51; - goto yy717; - } - } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'q') goto yy51; - goto yy715; - } else { - if(yych == 'y') goto yy717; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy706: - YYDEBUG(706, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Y'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; - } else { - if(yych <= 'Q'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'R') goto yy715; - if(yych <= 'X') goto yy51; - goto yy717; - } - } - } else { - if(yych <= 'q'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } - } else { - if(yych <= 'x'){ - if(yych <= 'r') goto yy716; - goto yy54; - } else { - if(yych <= 'y') goto yy718; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } -yy707: - YYDEBUG(707, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy709; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy712; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy708: - YYDEBUG(708, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy709; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy709; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy709: - YYDEBUG(709, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy710; - } - } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; - } else { - if(yych <= 'd') goto yy710; - if(yych <= 'z') goto yy52; - goto yy154; - } - } -yy710: - YYDEBUG(710, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy711; - if(yych != 'a') goto yy3; - goto yy711; - } -yy711: - YYDEBUG(711, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy712: - YYDEBUG(712, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy710; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'd') goto yy713; - if(yych <= 'z') goto yy60; - goto yy154; - } - } -yy713: - YYDEBUG(713, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy711; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy714; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy714: - YYDEBUG(714, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy715: - YYDEBUG(715, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'C') goto yy719; - goto yy52; - } else { - if(yych <= 'b'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'c') goto yy719; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy716: - YYDEBUG(716, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'C'){ - if(yych <= 'B') goto yy52; - goto yy719; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'b'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'c') goto yy720; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy717: - YYDEBUG(717, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - goto yy509; - } - } else { - if(yych <= '@'){ - if(yych <= '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy718: - YYDEBUG(718, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '-') goto yy511; - if(yych <= '.') goto yy509; - goto yy55; - } - } else { - if(yych <= '^'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - if(yych <= 'Z') goto yy52; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy719: - YYDEBUG(719, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy508; - if(yych == 'h') goto yy508; - goto yy3; - } -yy720: - YYDEBUG(720, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy508; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy605; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy721: - YYDEBUG(721, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'B'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy51; - goto yy734; - } - } else { - if(yych <= 'a'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'b') goto yy734; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy722: - YYDEBUG(722, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych == 'F') goto yy731; - if(yych <= 'Q') goto yy51; - goto yy730; - } - } else { - if(yych <= 'f'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'e') goto yy51; - goto yy731; - } else { - if(yych == 'r') goto yy730; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy723: - YYDEBUG(723, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'T') goto yy51; - goto yy728; - } - } else { - if(yych <= 't'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'u') goto yy728; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy724: - YYDEBUG(724, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'I'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy725; - } - } else { - if(yych <= 'h'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'i') goto yy725; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy725: - YYDEBUG(725, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'D'){ - if(yych <= ')'){ - if(yych <= '(') goto yy154; - goto yy49; - } else { - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy726; - } - } else { - if(yych <= 'c'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy154; - goto yy52; - } else { - if(yych <= 'd') goto yy726; - if(yych <= 'z') goto yy52; - goto yy154; - } - } -yy726: - YYDEBUG(726, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy727; - if(yych != 'a') goto yy3; - goto yy727; - } -yy727: - YYDEBUG(727, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy160; - goto yy56; -yy728: - YYDEBUG(728, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - goto yy729; - } - } else { - if(yych <= 'q'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'r') goto yy729; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy729: - YYDEBUG(729, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'T') goto yy246; - if(yych == 't') goto yy246; - goto yy3; - } -yy730: - YYDEBUG(730, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy52; - goto yy733; - } - } else { - if(yych <= 'r'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 's') goto yy733; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy731: - YYDEBUG(731, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy732; - } - } else { - if(yych <= 's'){ - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 't') goto yy732; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy732: - YYDEBUG(732, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'G'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'H') goto yy176; - if(yych == 'h') goto yy176; - goto yy3; - } -yy733: - YYDEBUG(733, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'T') goto yy176; - if(yych == 't') goto yy176; - goto yy3; - } -yy734: - YYDEBUG(734, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'R') goto yy52; - goto yy735; - } else { - if(yych <= 'q'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'r') goto yy735; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy735: - YYDEBUG(735, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'U') goto yy736; - if(yych != 'u') goto yy3; - goto yy736; - } -yy736: - YYDEBUG(736, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy737; - if(yych != 'a') goto yy56; - goto yy737; -yy737: - YYDEBUG(737, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy738; - if(yych != 'r') goto yy56; - goto yy738; -yy738: - YYDEBUG(738, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy508; - if(yych == 'y') goto yy508; - goto yy56; -yy739: - YYDEBUG(739, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'A') goto yy51; - goto yy734; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'b') goto yy752; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy740: - YYDEBUG(740, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; - } else { - if(yych <= 'E'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'F') goto yy731; - if(yych <= 'Q') goto yy51; - goto yy730; - } - } - } else { - if(yych <= 'e'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } - } else { - if(yych <= 'q'){ - if(yych <= 'f') goto yy749; - goto yy54; - } else { - if(yych <= 'r') goto yy748; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } -yy741: - YYDEBUG(741, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'T') goto yy51; - goto yy728; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'u') goto yy746; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy742: - YYDEBUG(742, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'I'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy725; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'i') goto yy743; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy743: - YYDEBUG(743, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy154; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy154; - if(yych <= 'C') goto yy52; - goto yy726; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy154; - } else { - if(yych == 'd') goto yy744; - if(yych <= 'z') goto yy60; - goto yy154; - } - } -yy744: - YYDEBUG(744, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy727; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy745; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy745: - YYDEBUG(745, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy160; - if(yych == 'y') goto yy169; - goto yy62; -yy746: - YYDEBUG(746, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'R'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'Q') goto yy52; - goto yy729; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'r') goto yy747; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy747: - YYDEBUG(747, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy246; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy376; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy748: - YYDEBUG(748, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'R') goto yy52; - goto yy733; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 's') goto yy751; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy749: - YYDEBUG(749, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'S') goto yy52; - goto yy732; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy52; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy750; - if(yych <= 'z') goto yy60; - goto yy3; - } - } -yy750: - YYDEBUG(750, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'G') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'h') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy751: - YYDEBUG(751, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'S') goto yy3; - goto yy176; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 't') goto yy317; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy752: - YYDEBUG(752, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'R'){ - if(yych <= 'Q') goto yy52; - goto yy735; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'q'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'r') goto yy753; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy753: - YYDEBUG(753, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'U'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= 'T') goto yy3; - goto yy736; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'u') goto yy754; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy754: - YYDEBUG(754, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy737; - if(yych != 'a') goto yy62; - goto yy755; -yy755: - YYDEBUG(755, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy738; - if(yych != 'r') goto yy62; - goto yy756; -yy756: - YYDEBUG(756, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy508; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy757: - YYDEBUG(757, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych == 'L') goto yy764; - if(yych <= 'M') goto yy51; - goto yy763; - } - } else { - if(yych <= 'l'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'k') goto yy51; - goto yy764; - } else { - if(yych == 'n') goto yy763; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy758: - YYDEBUG(758, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych <= ')'){ - if(yych <= '(') goto yy3; - goto yy49; - } else { - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy759; - } - } else { - if(yych <= 'm'){ - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'n') goto yy759; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy759: - YYDEBUG(759, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'U') goto yy52; - goto yy760; - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'u') goto yy760; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy760: - YYDEBUG(760, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= 'A') goto yy761; - if(yych != 'a') goto yy3; - goto yy761; - } -yy761: - YYDEBUG(761, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy762; - if(yych != 'r') goto yy56; - goto yy762; -yy762: - YYDEBUG(762, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy508; - if(yych == 'y') goto yy508; - goto yy56; -yy763: - YYDEBUG(763, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych == 'E') goto yy765; - goto yy52; - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'e') goto yy765; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy764: - YYDEBUG(764, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '-') goto yy511; - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'Z'){ - if(yych <= '@') goto yy3; - if(yych != 'Y') goto yy52; - goto yy765; - } else { - if(yych <= 'x'){ - if(yych <= '`') goto yy3; - goto yy52; - } else { - if(yych <= 'y') goto yy765; - if(yych <= 'z') goto yy52; - goto yy3; - } - } - } -yy765: - YYDEBUG(765, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - if(yych <= '9') goto yy509; - goto yy3; - } -yy766: - YYDEBUG(766, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '/'){ - if(yych == ')') goto yy49; - if(yych <= '.') goto yy3; - goto yy55; - } else { - if(yych <= 'K'){ - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'L') goto yy764; - if(yych <= 'M') goto yy51; - goto yy763; - } - } - } else { - if(yych <= 'k'){ - if(yych <= '^'){ - if(yych <= 'Z') goto yy51; - goto yy3; - } else { - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy3; - goto yy54; - } - } else { - if(yych <= 'm'){ - if(yych <= 'l') goto yy773; - goto yy54; - } else { - if(yych <= 'n') goto yy772; - if(yych <= 'z') goto yy54; - goto yy3; - } - } - } -yy767: - YYDEBUG(767, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'N'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - if(yych <= 'M') goto yy51; - goto yy759; - } - } else { - if(yych <= '`'){ - if(yych <= 'Z') goto yy51; - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych == 'n') goto yy768; - if(yych <= 'z') goto yy54; - goto yy3; - } - } -yy768: - YYDEBUG(768, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'U'){ - if(yych <= 'T') goto yy52; - goto yy760; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 't'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'u') goto yy769; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy769: - YYDEBUG(769, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '.'){ - if(yych == ')') goto yy49; - goto yy3; - } else { - if(yych <= '/') goto yy55; - if(yych <= '@') goto yy3; - goto yy761; - } - } else { - if(yych <= '`'){ - if(yych == '_') goto yy55; - goto yy3; - } else { - if(yych <= 'a') goto yy770; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy770: - YYDEBUG(770, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy762; - if(yych != 'r') goto yy62; - goto yy771; -yy771: - YYDEBUG(771, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '^'){ - if(yych <= '/'){ - if(yych <= '.') goto yy56; - goto yy55; - } else { - if(yych == 'Y') goto yy508; - goto yy56; - } - } else { - if(yych <= 'x'){ - if(yych <= '_') goto yy55; - if(yych <= '`') goto yy56; - goto yy61; - } else { - if(yych <= 'y') goto yy605; - if(yych <= 'z') goto yy61; - goto yy56; - } - } -yy772: - YYDEBUG(772, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'E'){ - if(yych <= 'D') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'd'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'e') goto yy774; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy773: - YYDEBUG(773, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy3; - if(yych == ')') goto yy510; - goto yy509; - } else { - if(yych <= '.'){ - if(yych <= '-') goto yy511; - goto yy509; - } else { - if(yych <= '/') goto yy55; - if(yych <= '9') goto yy509; - goto yy3; - } - } - } else { - if(yych <= '_'){ - if(yych <= 'Y'){ - if(yych <= 'X') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '^') goto yy3; - goto yy55; - } - } else { - if(yych <= 'x'){ - if(yych <= '`') goto yy3; - goto yy60; - } else { - if(yych <= 'y') goto yy774; - if(yych <= 'z') goto yy60; - goto yy3; - } - } - } -yy774: - YYDEBUG(774, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy55; - } - } else { - if(yych <= '_'){ - if(yych <= '9') goto yy509; - if(yych <= '^') goto yy3; - goto yy55; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy61; - goto yy3; - } - } -yy775: - YYDEBUG(775, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy776; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy776: - YYDEBUG(776, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy3; - } - } else { - if(yych <= 'Z'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy777: - YYDEBUG(777, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy778; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy778: - YYDEBUG(778, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy52; - goto yy765; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy52; - goto yy3; - } - } -yy779: - YYDEBUG(779, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= '('){ - if(yych <= 0x1F) goto yy3; - goto yy509; - } else { - if(yych <= ')') goto yy510; - if(yych <= '.') goto yy509; - goto yy3; - } - } else { - if(yych <= 'Z'){ - if(yych <= '9') goto yy509; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy780: - YYDEBUG(780, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= ')'){ - if(yych <= 0x1F) goto yy3; - if(yych <= '(') goto yy509; - goto yy510; - } else { - if(yych == '/') goto yy3; - goto yy509; - } - } else { - if(yych <= 'I'){ - if(yych <= '@') goto yy3; - if(yych <= 'H') goto yy51; - goto yy776; - } else { - if(yych <= 'Z') goto yy51; - if(yych <= '`') goto yy3; - if(yych <= 'z') goto yy51; - goto yy3; - } - } -yy781: - YYDEBUG(781, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy782; -yy782: - YYDEBUG(782, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy781; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy798; - case 'D': case 'd': goto yy785; - case 'F': case 'f': goto yy786; - case 'H': case 'h': goto yy73; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy784; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'P': case 'p': goto yy802; - case 'S': case 's': goto yy783; - case 'T': case 't': goto yy78; - case 'V': goto yy795; - case 'W': case 'w': goto yy75; - case 'X': goto yy796; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } -yy783: - YYDEBUG(783, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy1259; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy1259; - if(yych == 'u') goto yy135; - goto yy56; - } - } -yy784: - YYDEBUG(784, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'H'){ - if(yych == 'A') goto yy889; - goto yy56; - } else { - if(yych <= 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } - } else { - if(yych <= 'h'){ - if(yych == 'a') goto yy889; - goto yy56; - } else { - if(yych <= 'i') goto yy126; - if(yych == 'o') goto yy125; - goto yy56; - } - } -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych == 'A') goto yy122; - if(yych <= 'D') goto yy56; - goto yy876; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy122; - } else { - if(yych == 'e') goto yy876; - goto yy56; - } - } -yy786: - YYDEBUG(786, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= 'N'){ - if(yych == 'E') goto yy892; - goto yy56; - } else { - if(yych <= 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; - } - } else { - if(yych <= 'n'){ - if(yych == 'e') goto yy892; - goto yy56; - } else { - if(yych <= 'o') goto yy99; - if(yych == 'r') goto yy98; - goto yy56; - } - } -yy787: - YYDEBUG(787, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1009; - goto yy70; -yy788: - YYDEBUG(788, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': goto yy952; - case '3': goto yy954; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy955; - case 'A': case 'a': goto yy959; - case 'D': case 'd': goto yy963; - case 'F': case 'f': goto yy957; - case 'J': case 'j': goto yy956; - case 'M': case 'm': goto yy958; - case 'N': case 'n': goto yy962; - case 'O': case 'o': goto yy961; - case 'S': case 's': goto yy960; - default: goto yy56; - } -yy789: - YYDEBUG(789, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy908; - case '1': goto yy909; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy914; - case 'D': case 'd': goto yy918; - case 'F': case 'f': goto yy912; - case 'J': case 'j': goto yy911; - case 'M': case 'm': goto yy913; - case 'N': case 'n': goto yy917; - case 'O': case 'o': goto yy916; - case 'S': case 's': goto yy915; - default: goto yy791; - } -yy790: - YYDEBUG(790, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy791; -yy791: - YYDEBUG(791, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy873; - case 'D': case 'd': goto yy875; - case 'F': case 'f': goto yy871; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy872; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'S': case 's': goto yy874; - case 'V': goto yy795; - case 'X': goto yy796; - default: goto yy56; - } + if(yych == 'E') goto yy825; + if(yych == 'e') goto yy825; + goto yy53; yy792: YYDEBUG(792, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy867; - goto yy868; - } else { - if(yych <= '5') goto yy869; - if(yych <= '9') goto yy870; - goto yy791; - } + if(yych == 'C') goto yy824; + if(yych == 'c') goto yy824; + goto yy53; yy793: YYDEBUG(793, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych <= '.'){ - if(yych >= ' ') goto yy831; - goto yy794; - } else { - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; - } - } else { - if(yych <= 'V'){ - if(yych <= 'I') goto yy866; - if(yych >= 'V') goto yy839; - goto yy794; - } else { - if(yych == 'X') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych == 'O') goto yy823; + if(yych == 'o') goto yy823; + goto yy53; yy794: YYDEBUG(794, *YYCURSOR); - -#line 1101 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("datenoyearrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } -#line 12805 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych == 'E') goto yy795; + if(yych != 'e') goto yy53; + goto yy795; yy795: YYDEBUG(795, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy864; - goto yy794; - } + yych = *++YYCURSOR; + if(yych == 'C') goto yy796; + if(yych != 'c') goto yy53; + goto yy796; yy796: YYDEBUG(796, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy863; - goto yy794; - } + yych = *++YYCURSOR; + if(yych != '/') goto yy53; + goto yy797; yy797: YYDEBUG(797, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy856; - if(yych <= 'T') goto yy56; - goto yy855; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy856; - } else { - if(yych == 'u') goto yy855; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy798; yy798: YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'T'){ - if(yych <= 'L'){ - if(yych == '.') goto yy803; - goto yy56; - } else { - if(yych <= 'M') goto yy804; - if(yych == 'P') goto yy849; - goto yy56; - } - } else { - if(yych <= 'o'){ - if(yych <= 'U') goto yy848; - if(yych == 'm') goto yy804; - goto yy56; - } else { - if(yych <= 'p') goto yy849; - if(yych == 'u') goto yy848; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy799; yy799: YYDEBUG(799, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy843; - if(yych == 'c') goto yy843; - goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy800; yy800: YYDEBUG(800, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy829; - if(yych == 'o') goto yy829; - goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy801; yy801: YYDEBUG(801, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy807; - if(yych <= '9') goto yy809; - goto yy56; + if(yych != ':') goto yy53; + goto yy802; yy802: YYDEBUG(802, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy803; - } else { - if(yych <= 'M') goto yy804; - if(yych == 'm') goto yy804; - goto yy56; - } + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy803; + if(yych <= '2') goto yy804; + goto yy53; yy803: YYDEBUG(803, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy804; - if(yych != 'm') goto yy56; - goto yy804; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy805; + goto yy53; yy804: YYDEBUG(804, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) == '.') goto yy806; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '4') goto yy53; goto yy805; yy805: YYDEBUG(805, *YYCURSOR); - -#line 892 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - } - } - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - TIMELIB_DEINIT; - return TIMELIB_TIME12; - } -#line 12909 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy806; yy806: YYDEBUG(806, *YYCURSOR); yych = *++YYCURSOR; - goto yy805; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; + goto yy807; yy807: YYDEBUG(807, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy810; - goto yy808; - } else { - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy808; yy808: YYDEBUG(808, *YYCURSOR); - -#line 909 "ext/date/lib/parse_date.re" -{ - int tz_not_found; - DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_TIME24_WITH_ZONE; - } -#line 12946 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy809; yy809: YYDEBUG(809, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy810; - if(yych != ':') goto yy808; - goto yy810; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy810; + if(yych <= '6') goto yy811; + goto yy53; yy810: YYDEBUG(810, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy811; - if(yych <= '6') goto yy812; - if(yych <= '9') goto yy813; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy812; + goto yy53; yy811: YYDEBUG(811, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy817; - goto yy808; + yych = *++YYCURSOR; + if(yych != '0') goto yy53; + goto yy812; yy812: YYDEBUG(812, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych == '0') goto yy817; - goto yy808; + yych = *++YYCURSOR; + if(yych != ' ') goto yy53; + goto yy813; yy813: YYDEBUG(813, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != '.') goto yy808; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); + yych = *YYCURSOR; goto yy814; yy814: YYDEBUG(814, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy815; + if(yych <= '*'){ + if(yych == ' ') goto yy813; + goto yy53; + } else { + if(yych == ',') goto yy53; + if(yych >= '.') goto yy53; + goto yy815; + } yy815: YYDEBUG(815, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy816; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy816; + if(yych <= '2') goto yy818; + if(yych <= '9') goto yy819; + goto yy53; yy816: YYDEBUG(816, *YYCURSOR); - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy815; - goto yy808; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy817; + if(yych <= '9') goto yy819; + if(yych <= ':') goto yy820; + goto yy817; yy817: YYDEBUG(817, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'A'){ - if(yych <= '-'){ - if(yych != ' ') goto yy808; - goto yy818; - } else { - if(yych <= '.') goto yy814; - if(yych <= '@') goto yy808; - goto yy820; - } - } else { - if(yych <= '`'){ - if(yych == 'P') goto yy820; - goto yy808; - } else { - if(yych <= 'a') goto yy820; - if(yych == 'p') goto yy820; - goto yy808; - } + +#line 1263 "ext/date/lib/parse_date.re" +{ + int tz_not_found; + DEBUG_OUTPUT("clf"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + TIMELIB_HAVE_DATE(); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->m = timelib_get_month((char **) &ptr); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + TIMELIB_DEINIT; + return TIMELIB_CLF; } +#line 10117 "ext/date/lib/parse_date.c" yy818: - YYDEBUG(818, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy819; -yy819: - YYDEBUG(819, *YYCURSOR); - if(yych <= 'O'){ - if(yych <= ' '){ - if(yych <= 0x1F) goto yy56; - goto yy818; - } else { - if(yych != 'A') goto yy56; - goto yy820; - } + YYDEBUG(818, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy817; + if(yych >= '4') goto yy821; + goto yy819; } else { - if(yych <= 'a'){ - if(yych <= 'P') goto yy820; - if(yych <= '`') goto yy56; - goto yy820; - } else { - if(yych != 'p') goto yy56; - goto yy820; - } + if(yych <= '9') goto yy822; + if(yych <= ':') goto yy820; + goto yy817; } +yy819: + YYDEBUG(819, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy817; + if(yych <= '5') goto yy821; + if(yych <= '9') goto yy822; + if(yych >= ';') goto yy817; + goto yy820; yy820: YYDEBUG(820, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy821; - } else { - if(yych <= 'M') goto yy822; - if(yych == 'm') goto yy822; - goto yy56; - } + if(yych <= '/') goto yy817; + if(yych <= '5') goto yy821; + if(yych <= '9') goto yy822; + goto yy817; yy821: YYDEBUG(821, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy822; - if(yych != 'm') goto yy56; + if(yych <= '/') goto yy817; + if(yych >= ':') goto yy817; goto yy822; yy822: YYDEBUG(822, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy806; - goto yy805; + goto yy817; yy823: YYDEBUG(823, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych != ' ') goto yy808; - goto yy824; - } else { - if(yych <= '.') goto yy810; - if(yych == ':') goto yy810; - goto yy808; - } - } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy826; - if(yych == 'P') goto yy826; - goto yy808; - } else { - if(yych <= 'a') goto yy826; - if(yych == 'p') goto yy826; - goto yy808; - } - } + yych = *++YYCURSOR; + if(yych == 'V') goto yy796; + if(yych == 'v') goto yy796; + goto yy53; yy824: YYDEBUG(824, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy825; + yych = *++YYCURSOR; + if(yych == 'T') goto yy796; + if(yych == 't') goto yy796; + goto yy53; yy825: YYDEBUG(825, *YYCURSOR); - if(yych <= 'O'){ - if(yych <= ' '){ - if(yych <= 0x1F) goto yy56; - goto yy824; - } else { - if(yych != 'A') goto yy56; - goto yy826; - } - } else { - if(yych <= 'a'){ - if(yych <= 'P') goto yy826; - if(yych <= '`') goto yy56; - goto yy826; - } else { - if(yych != 'p') goto yy56; - goto yy826; - } - } + yych = *++YYCURSOR; + if(yych == 'P') goto yy826; + if(yych != 'p') goto yy53; + goto yy826; yy826: YYDEBUG(826, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'L'){ - if(yych != '.') goto yy56; - goto yy827; + if(yych <= 'S'){ + if(yych == '/') goto yy797; + goto yy53; } else { - if(yych <= 'M') goto yy828; - if(yych == 'm') goto yy828; - goto yy56; + if(yych <= 'T') goto yy796; + if(yych == 't') goto yy796; + goto yy53; } yy827: YYDEBUG(827, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy828; - if(yych != 'm') goto yy56; - goto yy828; + if(yych == 'G') goto yy796; + if(yych == 'g') goto yy796; + goto yy53; yy828: YYDEBUG(828, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy806; - goto yy805; + if(yych == 'R') goto yy796; + if(yych == 'r') goto yy796; + goto yy53; yy829: YYDEBUG(829, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy830; - if(yych != 'v') goto yy56; - goto yy830; -yy830: - YYDEBUG(830, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + if(yych <= 'Y'){ + if(yych == 'R') goto yy796; + if(yych <= 'X') goto yy53; + goto yy796; } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy835; + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy796; } else { - if(yych == 'e') goto yy835; - goto yy794; + if(yych == 'y') goto yy796; + goto yy53; } } +yy830: + YYDEBUG(830, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy796; + if(yych == 'b') goto yy796; + goto yy53; yy831: YYDEBUG(831, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - goto yy832; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy796; + if(yych <= 'M') goto yy53; + goto yy796; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy796; + } else { + if(yych == 'n') goto yy796; + goto yy53; + } + } yy832: YYDEBUG(832, *YYCURSOR); - if(yych <= 0x1F) goto yy56; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy833; + yych = *++YYCURSOR; + if(yych == 'N') goto yy796; + if(yych == 'n') goto yy796; + goto yy53; yy833: YYDEBUG(833, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy834; - if(yych <= '9') goto yy840; - goto yy834; + yych = *++YYCURSOR; + if(yych == 't') goto yy842; + goto yy53; yy834: YYDEBUG(834, *YYCURSOR); - -#line 1036 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("datefull"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL; - } -#line 13149 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych == 'd') goto yy842; + goto yy53; yy835: YYDEBUG(835, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy836; - if(yych != 'm') goto yy56; - goto yy836; + if(yych == 'd') goto yy842; + goto yy53; yy836: YYDEBUG(836, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy837; - if(yych != 'b') goto yy56; - goto yy837; + if(yych == 'h') goto yy842; + goto yy53; yy837: YYDEBUG(837, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy838; - if(yych != 'e') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy838; yy838: YYDEBUG(838, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych != 'r') goto yy56; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; goto yy839; yy839: YYDEBUG(839, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; + yych = *++YYCURSOR; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; + goto yy840; yy840: YYDEBUG(840, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych >= ':') goto yy834; + if(yych <= '/') goto yy784; + if(yych >= ':') goto yy784; goto yy841; yy841: YYDEBUG(841, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych >= ':') goto yy834; - goto yy842; + goto yy784; yy842: YYDEBUG(842, *YYCURSOR); - yych = *++YYCURSOR; - goto yy834; + yyaccept = 13; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '/') goto yy837; + goto yy784; yy843: YYDEBUG(843, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy844; - if(yych != 't') goto yy56; + if(yych <= '-') goto yy617; + if(yych <= '.') goto yy845; + if(yych >= '0') goto yy617; goto yy844; yy844: YYDEBUG(844, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'O'){ - if(yych <= 'N') goto yy794; - goto yy845; - } else { - if(yych != 'o') goto yy794; - goto yy845; - } + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case 'A': case 'a': goto yy790; + case 'D': case 'd': goto yy794; + case 'F': case 'f': goto yy788; + case 'J': case 'j': goto yy787; + case 'M': case 'm': goto yy789; + case 'N': case 'n': goto yy793; + case 'O': case 'o': goto yy792; + case 'S': case 's': goto yy791; + default: goto yy53; } yy845: YYDEBUG(845, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy846; - if(yych != 'b') goto yy56; - goto yy846; + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy846; + if(yych <= '1') goto yy847; + if(yych <= '9') goto yy848; + goto yy617; yy846: YYDEBUG(846, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy847; - if(yych != 'e') goto yy56; - goto yy847; + if(yych == '.') goto yy849; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy848; + goto yy53; yy847: YYDEBUG(847, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + if(yych == '.') goto yy849; + if(yych <= '/') goto yy53; + if(yych >= '3') goto yy53; + goto yy848; yy848: YYDEBUG(848, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy852; - if(yych == 'g') goto yy852; - goto yy56; + if(yych != '.') goto yy53; + goto yy849; yy849: YYDEBUG(849, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy850; - if(yych != 'r') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy850; yy850: YYDEBUG(850, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'I'){ - if(yych <= 'H') goto yy794; - goto yy851; - } else { - if(yych != 'i') goto yy794; - goto yy851; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy729; + if(yych <= '9') goto yy728; + goto yy729; yy851: YYDEBUG(851, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'L') goto yy839; - if(yych == 'l') goto yy839; - goto yy56; + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy879; + goto yy57; yy852: YYDEBUG(852, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'U'){ - if(yych <= 'T') goto yy794; - goto yy853; - } else { - if(yych != 'u') goto yy794; - goto yy853; - } + yych = *++YYCURSOR; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy734; + case '1': goto yy735; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy736; + case 'A': case 'a': goto yy856; + case 'D': case 'd': goto yy860; + case 'F': case 'f': goto yy854; + case 'J': case 'j': goto yy853; + case 'M': case 'm': goto yy855; + case 'N': case 'n': goto yy859; + case 'O': case 'o': goto yy858; + case 'S': case 's': goto yy857; + default: goto yy53; } yy853: YYDEBUG(853, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'S') goto yy854; - if(yych != 's') goto yy56; - goto yy854; + if(yych <= 'U'){ + if(yych == 'A') goto yy878; + if(yych <= 'T') goto yy53; + goto yy877; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy878; + } else { + if(yych == 'u') goto yy877; + goto yy53; + } + } yy854: YYDEBUG(854, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy839; - if(yych == 't') goto yy839; - goto yy56; + if(yych == 'E') goto yy876; + if(yych == 'e') goto yy876; + goto yy53; yy855: YYDEBUG(855, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy862; - if(yych <= 'M') goto yy56; - goto yy861; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy862; - } else { - if(yych == 'n') goto yy861; - goto yy56; - } - } + if(yych == 'A') goto yy875; + if(yych == 'a') goto yy875; + goto yy53; yy856: YYDEBUG(856, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy857; - if(yych != 'n') goto yy56; - goto yy857; -yy857: - YYDEBUG(857, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + if(yych <= 'U'){ + if(yych == 'P') goto yy874; + if(yych <= 'T') goto yy53; + goto yy873; } else { - if(yych <= 'U'){ - if(yych <= 'T') goto yy794; - goto yy858; + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy874; } else { - if(yych != 'u') goto yy794; - goto yy858; + if(yych == 'u') goto yy873; + goto yy53; } } +yy857: + YYDEBUG(857, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy871; + if(yych == 'e') goto yy871; + goto yy53; yy858: YYDEBUG(858, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy859; - if(yych != 'a') goto yy56; - goto yy859; + if(yych == 'C') goto yy870; + if(yych == 'c') goto yy870; + goto yy53; yy859: YYDEBUG(859, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy860; - if(yych != 'r') goto yy56; - goto yy860; + if(yych == 'O') goto yy869; + if(yych == 'o') goto yy869; + goto yy53; yy860: YYDEBUG(860, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy839; - if(yych == 'y') goto yy839; - goto yy56; + if(yych == 'E') goto yy861; + if(yych != 'e') goto yy53; + goto yy861; yy861: YYDEBUG(861, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy839; - } else { - if(yych == 'e') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych == 'C') goto yy862; + if(yych != 'c') goto yy53; + goto yy862; yy862: YYDEBUG(862, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'Y'){ - if(yych <= 'X') goto yy794; - goto yy839; - } else { - if(yych == 'y') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych != '-') goto yy53; + goto yy863; yy863: YYDEBUG(863, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy864; + if(yych <= '2') goto yy865; + if(yych <= '3') goto yy866; + goto yy53; yy864: YYDEBUG(864, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych != 'I') goto yy794; - goto yy865; - } + yych = *++YYCURSOR; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy867; + goto yy53; yy865: YYDEBUG(865, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy867; + goto yy53; yy866: YYDEBUG(866, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - goto yy794; - } else { - if(yych <= '9') goto yy833; - if(yych == 'I') goto yy839; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '2') goto yy53; + goto yy867; yy867: YYDEBUG(867, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '9') goto yy907; - if(yych <= ':') goto yy810; - goto yy808; - } + ++YYCURSOR; + goto yy868; yy868: YYDEBUG(868, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '2') goto yy907; - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; + +#line 1250 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("pgtextreverse"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_TEXT; } +#line 10407 "ext/date/lib/parse_date.c" yy869: YYDEBUG(869, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy898; - goto yy808; - } else { - if(yych <= '9') goto yy823; - if(yych <= ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych == 'V') goto yy862; + if(yych == 'v') goto yy862; + goto yy53; yy870: YYDEBUG(870, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy898; - if(yych == ':') goto yy810; - goto yy808; + yych = *++YYCURSOR; + if(yych == 'T') goto yy862; + if(yych == 't') goto yy862; + goto yy53; yy871: YYDEBUG(871, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy892; - if(yych == 'e') goto yy892; - goto yy56; + if(yych == 'P') goto yy872; + if(yych != 'p') goto yy53; + goto yy872; yy872: YYDEBUG(872, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy889; - if(yych == 'a') goto yy889; - goto yy56; + if(yych <= 'S'){ + if(yych == '-') goto yy863; + goto yy53; + } else { + if(yych <= 'T') goto yy862; + if(yych == 't') goto yy862; + goto yy53; + } yy873: YYDEBUG(873, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy849; - if(yych <= 'T') goto yy56; - goto yy848; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy849; - } else { - if(yych == 'u') goto yy848; - goto yy56; - } - } + if(yych == 'G') goto yy862; + if(yych == 'g') goto yy862; + goto yy53; yy874: YYDEBUG(874, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy882; - if(yych == 'e') goto yy882; - goto yy56; + if(yych == 'R') goto yy862; + if(yych == 'r') goto yy862; + goto yy53; yy875: YYDEBUG(875, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy876; - if(yych != 'e') goto yy56; - goto yy876; + if(yych <= 'Y'){ + if(yych == 'R') goto yy862; + if(yych <= 'X') goto yy53; + goto yy862; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy862; + } else { + if(yych == 'y') goto yy862; + goto yy53; + } + } yy876: YYDEBUG(876, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy877; - if(yych != 'c') goto yy56; - goto yy877; + if(yych == 'B') goto yy862; + if(yych == 'b') goto yy862; + goto yy53; yy877: YYDEBUG(877, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy878; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych == 'L') goto yy862; + if(yych <= 'M') goto yy53; + goto yy862; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy862; } else { - if(yych != 'e') goto yy794; - goto yy878; + if(yych == 'n') goto yy862; + goto yy53; } } yy878: YYDEBUG(878, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy879; - if(yych != 'm') goto yy56; - goto yy879; + if(yych == 'N') goto yy862; + if(yych == 'n') goto yy862; + goto yy53; yy879: YYDEBUG(879, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy880; - if(yych != 'b') goto yy56; - goto yy880; + yyaccept = 14; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': case 'A': case 'D': case 'F': case 'H': + case 'I': + case 'J': case 'M': + case 'N': + case 'O': case 'S': + case 'T': case 'V': case 'X': + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': + case 'n': + case 'o': case 's': + case 't': case 'w': case 'y': goto yy884; + case '-': goto yy881; + case '.': goto yy887; + case '/': goto yy882; + case '0': goto yy900; + case '1': goto yy901; + case '2': goto yy902; + case '3': goto yy903; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy51; + case 'W': goto yy904; + default: goto yy880; + } yy880: YYDEBUG(880, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy881; - if(yych != 'e') goto yy56; - goto yy881; + +#line 1282 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("year4"); + TIMELIB_INIT; + s->time->y = timelib_get_nr((char **) &ptr, 4); + TIMELIB_DEINIT; + return TIMELIB_CLF; + } +#line 10523 "ext/date/lib/parse_date.c" yy881: YYDEBUG(881, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + YYDEBUG(-1, yych); + switch(yych){ + case '0': goto yy1046; + case '1': goto yy1047; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy1048; + case 'A': case 'a': goto yy1041; + case 'D': case 'd': goto yy1045; + case 'F': case 'f': goto yy1039; + case 'J': case 'j': goto yy1038; + case 'M': case 'm': goto yy1040; + case 'N': case 'n': goto yy1044; + case 'O': case 'o': goto yy1043; + case 'S': case 's': goto yy1042; + default: goto yy886; + } yy882: YYDEBUG(882, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy883; - if(yych != 'p') goto yy56; - goto yy883; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy1019; + if(yych <= '1') goto yy1020; + if(yych <= '9') goto yy1021; + goto yy53; yy883: YYDEBUG(883, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'T'){ - if(yych <= 'S') goto yy794; - goto yy884; - } else { - if(yych != 't') goto yy794; - goto yy884; - } - } + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 11) YYFILL(11); + yych = *YYCURSOR; + goto yy884; yy884: YYDEBUG(884, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy794; - goto yy885; - } else { - if(yych != 'e') goto yy794; - goto yy885; - } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy883; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy885; + case 'A': case 'a': goto yy895; + case 'D': case 'd': goto yy899; + case 'F': case 'f': goto yy893; + case 'H': case 'h': goto yy60; + case 'I': goto yy888; + case 'J': case 'j': goto yy892; + case 'M': case 'm': goto yy894; + case 'N': case 'n': goto yy898; + case 'O': case 'o': goto yy897; + case 'S': case 's': goto yy896; + case 'T': case 't': goto yy65; + case 'V': goto yy890; + case 'W': case 'w': goto yy62; + case 'X': goto yy891; + case 'Y': case 'y': goto yy64; + default: goto yy53; } yy885: YYDEBUG(885, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'M') goto yy886; - if(yych != 'm') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); + yych = *YYCURSOR; goto yy886; yy886: YYDEBUG(886, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy887; - if(yych != 'b') goto yy56; - goto yy887; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy885; + case 'A': case 'a': goto yy895; + case 'D': case 'd': goto yy1011; + case 'F': case 'f': goto yy1008; + case 'I': goto yy888; + case 'J': case 'j': goto yy892; + case 'M': case 'm': goto yy1009; + case 'N': case 'n': goto yy898; + case 'O': case 'o': goto yy897; + case 'S': case 's': goto yy1010; + case 'V': goto yy890; + case 'X': goto yy891; + default: goto yy53; + } yy887: YYDEBUG(887, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy888; - if(yych != 'e') goto yy56; - goto yy888; + if(yych <= '/') goto yy886; + if(yych <= '0') goto yy1005; + if(yych <= '2') goto yy1006; + if(yych <= '3') goto yy1007; + goto yy886; yy888: YYDEBUG(888, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy839; - if(yych == 'r') goto yy839; - goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) <= 'U'){ + if(yych == 'I') goto yy1004; + goto yy889; + } else { + if(yych == 'W') goto yy889; + if(yych <= 'X') goto yy958; + goto yy889; + } yy889: YYDEBUG(889, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy890; - if(yych <= 'X') goto yy56; - goto yy839; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy890; - } else { - if(yych == 'y') goto yy839; - goto yy56; - } + +#line 1112 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("datenodayrev"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_month((char **) &ptr); + s->time->d = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_DATE_NO_DAY; } +#line 10650 "ext/date/lib/parse_date.c" yy890: YYDEBUG(890, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; - } else { - if(yych <= 'C'){ - if(yych <= 'B') goto yy794; - goto yy891; - } else { - if(yych != 'c') goto yy794; - goto yy891; - } - } + yych = *++YYCURSOR; + if(yych == 'I') goto yy1002; + goto yy889; yy891: YYDEBUG(891, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'H') goto yy839; - if(yych == 'h') goto yy839; - goto yy56; + if(yych == 'I') goto yy1001; + goto yy889; yy892: YYDEBUG(892, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy893; - if(yych != 'b') goto yy56; - goto yy893; + if(yych <= 'U'){ + if(yych == 'A') goto yy994; + if(yych <= 'T') goto yy53; + goto yy993; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy994; + } else { + if(yych == 'u') goto yy993; + goto yy53; + } + } yy893: YYDEBUG(893, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '9'){ - if(yych <= 0x1F) goto yy794; - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - goto yy833; + yych = *++YYCURSOR; + if(yych <= 'R'){ + if(yych <= 'N'){ + if(yych == 'E') goto yy987; + goto yy53; + } else { + if(yych <= 'O') goto yy83; + if(yych <= 'Q') goto yy53; + goto yy82; + } } else { - if(yych <= 'R'){ - if(yych <= 'Q') goto yy794; - goto yy894; + if(yych <= 'n'){ + if(yych == 'e') goto yy987; + goto yy53; } else { - if(yych != 'r') goto yy794; - goto yy894; + if(yych <= 'o') goto yy83; + if(yych == 'r') goto yy82; + goto yy53; } } yy894: YYDEBUG(894, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'U') goto yy895; - if(yych != 'u') goto yy56; - goto yy895; + if(yych <= 'O'){ + if(yych <= 'H'){ + if(yych == 'A') goto yy984; + goto yy53; + } else { + if(yych <= 'I') goto yy110; + if(yych <= 'N') goto yy53; + goto yy109; + } + } else { + if(yych <= 'h'){ + if(yych == 'a') goto yy984; + goto yy53; + } else { + if(yych <= 'i') goto yy110; + if(yych == 'o') goto yy109; + goto yy53; + } + } yy895: YYDEBUG(895, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy896; - if(yych != 'a') goto yy56; - goto yy896; + if(yych <= 'U'){ + if(yych == 'P') goto yy978; + if(yych <= 'T') goto yy53; + goto yy977; + } else { + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy978; + } else { + if(yych == 'u') goto yy977; + goto yy53; + } + } yy896: YYDEBUG(896, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy897; - if(yych != 'r') goto yy56; - goto yy897; + if(yych <= 'U'){ + if(yych <= 'D'){ + if(yych == 'A') goto yy119; + goto yy53; + } else { + if(yych <= 'E') goto yy970; + if(yych <= 'T') goto yy53; + goto yy118; + } + } else { + if(yych <= 'd'){ + if(yych == 'a') goto yy119; + goto yy53; + } else { + if(yych <= 'e') goto yy970; + if(yych == 'u') goto yy118; + goto yy53; + } + } yy897: YYDEBUG(897, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy839; - if(yych == 'y') goto yy839; - goto yy56; + if(yych == 'C') goto yy965; + if(yych == 'c') goto yy965; + goto yy53; yy898: YYDEBUG(898, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy899; - if(yych <= '6') goto yy900; - if(yych <= '9') goto yy901; - goto yy56; + if(yych == 'O') goto yy959; + if(yych == 'o') goto yy959; + goto yy53; yy899: YYDEBUG(899, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy906; - goto yy808; -yy900: - YYDEBUG(900, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy814; - goto yy808; + yych = *++YYCURSOR; + if(yych <= 'E'){ + if(yych == 'A') goto yy106; + if(yych <= 'D') goto yy53; + goto yy952; } else { - if(yych <= '0') goto yy906; - if(yych <= '9') goto yy902; - goto yy808; + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy106; + } else { + if(yych == 'e') goto yy952; + goto yy53; + } } +yy900: + YYDEBUG(900, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy950; + if(yych <= '9') goto yy951; + goto yy57; yy901: YYDEBUG(901, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych >= ':') goto yy808; - goto yy902; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '2') goto yy917; + if(yych <= '9') goto yy916; + goto yy57; yy902: YYDEBUG(902, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy903; - if(yych <= '9') goto yy904; - goto yy903; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy916; + goto yy57; yy903: YYDEBUG(903, *YYCURSOR); - -#line 1049 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("pointed date"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL_POINTED; - } -#line 13658 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '5') goto yy912; + if(yych <= '6') goto yy913; + if(yych <= '9') goto yy51; + goto yy57; yy904: YYDEBUG(904, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy903; - if(yych >= ':') goto yy903; - goto yy905; -yy905: - YYDEBUG(905, *YYCURSOR); - yych = *++YYCURSOR; - goto yy903; -yy906: - YYDEBUG(906, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych == ' ') goto yy818; - goto yy808; - } else { - if(yych <= '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy904; - goto yy808; - } - } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy820; - if(yych == 'P') goto yy820; - goto yy808; - } else { - if(yych <= 'a') goto yy820; - if(yych == 'p') goto yy820; - goto yy808; - } - } -yy907: - YYDEBUG(907, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '@'){ - if(yych <= '-'){ - if(yych == ' ') goto yy824; - goto yy808; - } else { - if(yych <= '.') goto yy898; - if(yych == ':') goto yy810; - goto yy808; - } + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy905; + if(yych <= '4') goto yy906; + goto yy907; } else { - if(yych <= '`'){ - if(yych <= 'A') goto yy826; - if(yych == 'P') goto yy826; - goto yy808; + if(yych <= 'E'){ + if(yych <= 'D') goto yy53; + goto yy98; } else { - if(yych <= 'a') goto yy826; - if(yych == 'p') goto yy826; - goto yy808; + if(yych == 'e') goto yy98; + goto yy53; } } +yy905: + YYDEBUG(905, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy908; + goto yy53; +yy906: + YYDEBUG(906, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy908; + goto yy53; +yy907: + YYDEBUG(907, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '4') goto yy53; + goto yy908; yy908: YYDEBUG(908, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy910; - goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '/') goto yy909; + if(yych <= '7') goto yy910; + goto yy909; yy909: YYDEBUG(909, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy910; + +#line 1218 "ext/date/lib/parse_date.re" +{ + timelib_sll w, d; + DEBUG_OUTPUT("isoweek"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + TIMELIB_HAVE_RELATIVE(); + + s->time->y = timelib_get_nr((char **) &ptr, 4); + w = timelib_get_nr((char **) &ptr, 2); + d = 1; + s->time->m = 1; + s->time->d = 1; + s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); + + TIMELIB_DEINIT; + return TIMELIB_ISO_WEEK; + } +#line 10837 "ext/date/lib/parse_date.c" yy910: YYDEBUG(910, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - goto yy56; + ++YYCURSOR; + goto yy911; yy911: YYDEBUG(911, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy943; - if(yych <= 'T') goto yy56; - goto yy942; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy943; - } else { - if(yych == 'u') goto yy942; - goto yy56; - } + +#line 1199 "ext/date/lib/parse_date.re" +{ + timelib_sll w, d; + DEBUG_OUTPUT("isoweekday"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + TIMELIB_HAVE_RELATIVE(); + + s->time->y = timelib_get_nr((char **) &ptr, 4); + w = timelib_get_nr((char **) &ptr, 2); + d = timelib_get_nr((char **) &ptr, 1); + s->time->m = 1; + s->time->d = 1; + s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); + + TIMELIB_DEINIT; + return TIMELIB_ISO_WEEK; } +#line 10859 "ext/date/lib/parse_date.c" yy912: YYDEBUG(912, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy940; - if(yych == 'e') goto yy940; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy914; + goto yy57; yy913: YYDEBUG(913, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy937; - if(yych == 'a') goto yy937; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '6') goto yy914; + if(yych <= '9') goto yy51; + goto yy57; yy914: YYDEBUG(914, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy934; - if(yych <= 'T') goto yy56; - goto yy933; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + if(yych <= 'X'){ + if(yych <= 'G'){ + if(yych <= 'C'){ + if(yych == ' ') goto yy57; + goto yy915; + } else { + if(yych == 'E') goto yy915; + if(yych <= 'F') goto yy57; + goto yy915; + } + } else { + if(yych <= 'R'){ + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; + goto yy915; + } else { + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; + goto yy915; + } + } } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy934; + if(yych <= 'l'){ + if(yych <= 'e'){ + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; + goto yy915; + } else { + if(yych == 'g') goto yy915; + if(yych <= 'h') goto yy57; + goto yy915; + } } else { - if(yych == 'u') goto yy933; - goto yy56; + if(yych <= 'v'){ + if(yych <= 'm') goto yy57; + if(yych <= 'r') goto yy915; + if(yych <= 't') goto yy57; + goto yy915; + } else { + if(yych == 'x') goto yy915; + if(yych <= 'y') goto yy57; + goto yy915; + } } } yy915: YYDEBUG(915, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy930; - if(yych == 'e') goto yy930; - goto yy56; + +#line 1186 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("pgydotd"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->d = timelib_get_nr((char **) &ptr, 3); + s->time->m = 1; + TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_DEINIT; + return TIMELIB_PG_YEARDAY; + } +#line 10932 "ext/date/lib/parse_date.c" yy916: YYDEBUG(916, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy928; - if(yych == 'c') goto yy928; - goto yy56; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy914; + goto yy57; yy917: YYDEBUG(917, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy926; - if(yych == 'o') goto yy926; - goto yy56; + if(yych <= '2'){ + if(yych <= '/') goto yy57; + if(yych >= '1') goto yy919; + goto yy918; + } else { + if(yych <= '3') goto yy920; + if(yych <= '9') goto yy914; + goto yy57; + } yy918: YYDEBUG(918, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy919; - if(yych != 'e') goto yy56; - goto yy919; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy51; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy921; + default: goto yy915; + } yy919: YYDEBUG(919, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy920; - if(yych != 'c') goto yy56; - goto yy920; + yyaccept = 15; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy921; + default: goto yy915; + } yy920: YYDEBUG(920, *YYCURSOR); - yyaccept = 10; + yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy878; - } else { - if(yych == 'e') goto yy878; - goto yy794; - } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': goto yy921; + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy51; + default: goto yy915; } yy921: YYDEBUG(921, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy832; - if(yych <= '0') goto yy922; - if(yych <= '2') goto yy923; - if(yych <= '3') goto yy924; - goto yy832; + yyaccept = 16; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy56; + case 'D': case 'd': goto yy61; + case 'F': case 'f': goto yy63; + case 'H': case 'h': goto yy60; + case 'M': case 'm': goto yy59; + case 'S': case 's': goto yy58; + case 'T': goto yy923; + case 'W': case 'w': goto yy62; + case 'Y': case 'y': goto yy64; + case 't': goto yy924; + default: goto yy922; + } yy922: YYDEBUG(922, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '0') goto yy840; - if(yych <= '9') goto yy925; - goto yy834; + +#line 1150 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("datenocolon"); + TIMELIB_INIT; + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_DEINIT; + return TIMELIB_DATE_NOCOLON; + } +#line 11031 "ext/date/lib/parse_date.c" yy923: YYDEBUG(923, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '9') goto yy925; - goto yy834; + if(yych <= 'H'){ + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy940; + goto yy941; + } else { + if(yych <= '9') goto yy942; + if(yych <= 'G') goto yy53; + goto yy66; + } + } else { + if(yych <= 'g'){ + if(yych == 'U') goto yy67; + goto yy53; + } else { + if(yych <= 'h') goto yy66; + if(yych == 'u') goto yy67; + goto yy53; + } + } yy924: YYDEBUG(924, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '1') goto yy925; - if(yych <= '9') goto yy840; - goto yy834; + if(yych <= 'H'){ + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '2') goto yy926; + goto yy925; + } else { + if(yych <= '9') goto yy927; + if(yych <= 'G') goto yy53; + goto yy66; + } + } else { + if(yych <= 'g'){ + if(yych == 'U') goto yy67; + goto yy53; + } else { + if(yych <= 'h') goto yy66; + if(yych == 'u') goto yy67; + goto yy53; + } + } yy925: YYDEBUG(925, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy834; - if(yych <= '9') goto yy841; - goto yy834; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy934; + if(yych <= '9') goto yy927; + goto yy53; yy926: YYDEBUG(926, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy927; - if(yych != 'v') goto yy56; - goto yy927; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy934; + if(yych <= '5') goto yy928; + goto yy53; yy927: YYDEBUG(927, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy835; - } else { - if(yych == 'e') goto yy835; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; + goto yy928; yy928: YYDEBUG(928, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy929; - if(yych != 't') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy929; yy929: YYDEBUG(929, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'O'){ - if(yych <= '9') goto yy833; - if(yych <= 'N') goto yy794; - goto yy845; - } else { - if(yych == 'o') goto yy845; - goto yy794; - } - } -yy930: - YYDEBUG(930, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'P') goto yy931; - if(yych != 'p') goto yy56; - goto yy931; -yy931: - YYDEBUG(931, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'T'){ - if(yych <= '9') goto yy833; - if(yych <= 'S') goto yy794; - goto yy932; - } else { - if(yych != 't') goto yy794; - goto yy932; - } - } -yy932: - YYDEBUG(932, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy885; - } else { - if(yych == 'e') goto yy885; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy930; + if(yych <= '6') goto yy931; + goto yy53; +yy930: + YYDEBUG(930, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy932; + goto yy53; +yy931: + YYDEBUG(931, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != '0') goto yy53; + goto yy932; +yy932: + YYDEBUG(932, *YYCURSOR); + ++YYCURSOR; + goto yy933; yy933: YYDEBUG(933, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy936; - if(yych == 'g') goto yy936; - goto yy56; + +#line 1162 "ext/date/lib/parse_date.re" +{ + int tz_not_found; + DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + TIMELIB_HAVE_DATE(); + s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->m = timelib_get_nr((char **) &ptr, 2); + s->time->d = timelib_get_nr((char **) &ptr, 2); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + if (*ptr == '.') { + s->time->f = timelib_get_frac_nr((char **) &ptr, 9); + if (*ptr) { /* timezone is optional */ + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + } + } + TIMELIB_DEINIT; + return TIMELIB_XMLRPC_SOAP; + } +#line 11130 "ext/date/lib/parse_date.c" yy934: YYDEBUG(934, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy935; - if(yych != 'r') goto yy56; - goto yy935; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy935; + if(yych <= '9') goto yy929; + goto yy53; yy935: YYDEBUG(935, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'I'){ - if(yych <= '9') goto yy833; - if(yych <= 'H') goto yy794; - goto yy851; - } else { - if(yych == 'i') goto yy851; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy936; + if(yych <= '6') goto yy937; + if(yych <= '9') goto yy929; + goto yy53; yy936: YYDEBUG(936, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'U'){ - if(yych <= '9') goto yy833; - if(yych <= 'T') goto yy794; - goto yy853; - } else { - if(yych == 'u') goto yy853; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy938; + if(yych <= '6') goto yy939; + if(yych <= '9') goto yy932; + goto yy53; yy937: YYDEBUG(937, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy938; - if(yych <= 'X') goto yy56; - goto yy939; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy938; - } else { - if(yych == 'y') goto yy939; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy938; + if(yych <= '5') goto yy930; + if(yych <= '6') goto yy931; + goto yy53; yy938: YYDEBUG(938, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'C'){ - if(yych <= '9') goto yy833; - if(yych <= 'B') goto yy794; - goto yy891; - } else { - if(yych == 'c') goto yy891; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy939: YYDEBUG(939, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '-'){ - if(yych <= 0x1F) goto yy794; - if(yych <= ',') goto yy831; - goto yy921; - } else { - if(yych <= '.') goto yy831; - if(yych <= '/') goto yy794; - if(yych <= '9') goto yy833; - goto yy794; - } + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy933; yy940: YYDEBUG(940, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy941; - if(yych != 'b') goto yy56; - goto yy941; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy949; + if(yych <= '9') goto yy942; + if(yych <= ':') goto yy943; + goto yy53; yy941: YYDEBUG(941, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy949; + goto yy928; } else { - if(yych <= 'R'){ - if(yych <= '9') goto yy833; - if(yych <= 'Q') goto yy794; - goto yy894; - } else { - if(yych == 'r') goto yy894; - goto yy794; - } + if(yych == ':') goto yy943; + goto yy53; } yy942: YYDEBUG(942, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy946; - if(yych <= 'M') goto yy56; - goto yy945; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy946; - } else { - if(yych == 'n') goto yy945; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy928; + if(yych != ':') goto yy53; + goto yy943; yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy944; - if(yych != 'n') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= '6') goto yy53; goto yy944; yy944: YYDEBUG(944, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'U'){ - if(yych <= '9') goto yy833; - if(yych <= 'T') goto yy794; - goto yy858; - } else { - if(yych == 'u') goto yy858; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy945; yy945: YYDEBUG(945, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'E'){ - if(yych <= '9') goto yy833; - if(yych <= 'D') goto yy794; - goto yy839; - } else { - if(yych == 'e') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy946; yy946: YYDEBUG(946, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych <= ','){ - if(yych <= 0x1F) goto yy794; - goto yy831; - } else { - if(yych <= '-') goto yy921; - if(yych <= '.') goto yy831; - goto yy794; - } - } else { - if(yych <= 'Y'){ - if(yych <= '9') goto yy833; - if(yych <= 'X') goto yy794; - goto yy839; - } else { - if(yych == 'y') goto yy839; - goto yy794; - } - } + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy947; + if(yych <= '6') goto yy948; + goto yy53; yy947: YYDEBUG(947, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy948; - if(yych <= '3') goto yy950; - if(yych <= '9') goto yy951; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy932; + goto yy53; yy948: YYDEBUG(948, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy949; - if(yych <= '9') goto yy951; - goto yy949; + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy53; yy949: YYDEBUG(949, *YYCURSOR); - -#line 1023 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("gnudateshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } -#line 14146 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy935; + if(yych <= '9') goto yy929; + if(yych <= ':') goto yy943; + goto yy53; yy950: YYDEBUG(950, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych >= '2') goto yy949; - goto yy951; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy51; + if(yych <= '9') goto yy914; + goto yy57; yy951: YYDEBUG(951, *YYCURSOR); yych = *++YYCURSOR; - goto yy949; + if(yych <= '2'){ + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy918; + goto yy919; + } else { + if(yych <= '3') goto yy920; + if(yych <= '9') goto yy914; + goto yy57; + } yy952: YYDEBUG(952, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.') goto yy953; - if(yych <= '/') goto yy1004; - if(yych <= '9') goto yy955; + yych = *++YYCURSOR; + if(yych == 'C') goto yy953; + if(yych != 'c') goto yy53; goto yy953; yy953: YYDEBUG(953, *YYCURSOR); - -#line 996 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("americanshort | american"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '/') { - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - } - TIMELIB_DEINIT; - return TIMELIB_AMERICAN; - } -#line 14174 "ext/date/lib/parse_date.c" + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy954; + if(yych != 'e') goto yy889; + goto yy954; yy954: YYDEBUG(954, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '.') goto yy953; - if(yych <= '/') goto yy1004; - if(yych >= '2') goto yy953; + yych = *++YYCURSOR; + if(yych == 'M') goto yy955; + if(yych != 'm') goto yy53; goto yy955; yy955: YYDEBUG(955, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '/') goto yy1004; - goto yy953; + yych = *++YYCURSOR; + if(yych == 'B') goto yy956; + if(yych != 'b') goto yy53; + goto yy956; yy956: YYDEBUG(956, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1003; - if(yych <= 'T') goto yy56; - goto yy1002; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1003; - } else { - if(yych == 'u') goto yy1002; - goto yy56; - } - } + if(yych == 'E') goto yy957; + if(yych != 'e') goto yy53; + goto yy957; yy957: YYDEBUG(957, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1001; - if(yych == 'e') goto yy1001; - goto yy56; + if(yych == 'R') goto yy958; + if(yych != 'r') goto yy53; + goto yy958; yy958: YYDEBUG(958, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy1000; - if(yych == 'a') goto yy1000; - goto yy56; + goto yy889; yy959: YYDEBUG(959, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy999; - if(yych <= 'T') goto yy56; - goto yy998; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy999; - } else { - if(yych == 'u') goto yy998; - goto yy56; - } - } + if(yych == 'V') goto yy960; + if(yych != 'v') goto yy53; + goto yy960; yy960: YYDEBUG(960, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy996; - if(yych == 'e') goto yy996; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy961; + if(yych != 'e') goto yy889; + goto yy961; yy961: YYDEBUG(961, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy995; - if(yych == 'c') goto yy995; - goto yy56; + if(yych == 'M') goto yy962; + if(yych != 'm') goto yy53; + goto yy962; yy962: YYDEBUG(962, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy994; - if(yych == 'o') goto yy994; - goto yy56; + if(yych == 'B') goto yy963; + if(yych != 'b') goto yy53; + goto yy963; yy963: YYDEBUG(963, *YYCURSOR); yych = *++YYCURSOR; if(yych == 'E') goto yy964; - if(yych != 'e') goto yy56; + if(yych != 'e') goto yy53; goto yy964; yy964: YYDEBUG(964, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy965; - if(yych != 'c') goto yy56; - goto yy965; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy965: YYDEBUG(965, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; + if(yych == 'T') goto yy966; + if(yych != 't') goto yy53; goto yy966; yy966: YYDEBUG(966, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'O') goto yy967; + if(yych != 'o') goto yy889; goto yy967; yy967: YYDEBUG(967, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'B') goto yy968; + if(yych != 'b') goto yy53; goto yy968; yy968: YYDEBUG(968, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'E') goto yy969; + if(yych != 'e') goto yy53; goto yy969; yy969: YYDEBUG(969, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy970; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy970: YYDEBUG(970, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy971; + if(yych <= 'P'){ + if(yych == 'C') goto yy121; + if(yych <= 'O') goto yy53; + goto yy971; + } else { + if(yych <= 'c'){ + if(yych <= 'b') goto yy53; + goto yy121; + } else { + if(yych != 'p') goto yy53; + goto yy971; + } + } yy971: YYDEBUG(971, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy972; - if(yych <= '2') goto yy973; - goto yy56; + if(yych == 'T') goto yy972; + if(yych != 't') goto yy889; + goto yy972; yy972: YYDEBUG(972, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy974; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'E') goto yy973; + if(yych != 'e') goto yy889; + goto yy973; yy973: YYDEBUG(973, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '4') goto yy56; + if(yych == 'M') goto yy974; + if(yych != 'm') goto yy53; goto yy974; yy974: YYDEBUG(974, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'B') goto yy975; + if(yych != 'b') goto yy53; goto yy975; yy975: YYDEBUG(975, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych == 'E') goto yy976; + if(yych != 'e') goto yy53; goto yy976; yy976: YYDEBUG(976, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy977; + if(yych == 'R') goto yy958; + if(yych == 'r') goto yy958; + goto yy53; yy977: YYDEBUG(977, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy978; + if(yych == 'G') goto yy981; + if(yych == 'g') goto yy981; + goto yy53; yy978: YYDEBUG(978, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy979; - if(yych <= '6') goto yy980; - goto yy56; + if(yych == 'R') goto yy979; + if(yych != 'r') goto yy53; + goto yy979; yy979: YYDEBUG(979, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy981; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'I') goto yy980; + if(yych != 'i') goto yy889; + goto yy980; yy980: YYDEBUG(980, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy981; + if(yych == 'L') goto yy958; + if(yych == 'l') goto yy958; + goto yy53; yy981: YYDEBUG(981, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ' ') goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy982; + if(yych != 'u') goto yy889; goto yy982; yy982: YYDEBUG(982, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; + yych = *++YYCURSOR; + if(yych == 'S') goto yy983; + if(yych != 's') goto yy53; goto yy983; yy983: YYDEBUG(983, *YYCURSOR); - if(yych <= '*'){ - if(yych == ' ') goto yy982; - goto yy56; - } else { - if(yych == ',') goto yy56; - if(yych >= '.') goto yy56; - goto yy984; - } + yych = *++YYCURSOR; + if(yych == 'T') goto yy958; + if(yych == 't') goto yy958; + goto yy53; yy984: YYDEBUG(984, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy985; - if(yych <= '2') goto yy987; - if(yych <= '9') goto yy988; - goto yy56; + if(yych <= 'Y'){ + if(yych == 'R') goto yy985; + if(yych <= 'X') goto yy53; + goto yy958; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy985; + } else { + if(yych == 'y') goto yy958; + goto yy53; + } + } yy985: YYDEBUG(985, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy986; - if(yych <= '5') goto yy992; - if(yych <= '9') goto yy988; - if(yych <= ':') goto yy989; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'C') goto yy986; + if(yych != 'c') goto yy889; goto yy986; yy986: YYDEBUG(986, *YYCURSOR); - -#line 1223 "ext/date/lib/parse_date.re" -{ - int tz_not_found; - DEBUG_OUTPUT("clf"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - TIMELIB_DEINIT; - return TIMELIB_CLF; - } -#line 14348 "ext/date/lib/parse_date.c" -yy987: - YYDEBUG(987, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy986; - if(yych <= '3') goto yy992; - goto yy990; - } else { - if(yych == ':') goto yy989; - goto yy986; - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy958; + if(yych == 'h') goto yy958; + goto yy53; +yy987: + YYDEBUG(987, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'B') goto yy988; + if(yych != 'b') goto yy53; + goto yy988; yy988: YYDEBUG(988, *YYCURSOR); - yyaccept = 13; + yyaccept = 17; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy986; - if(yych <= '5') goto yy990; - if(yych != ':') goto yy986; + if(yych == 'R') goto yy989; + if(yych != 'r') goto yy889; goto yy989; yy989: YYDEBUG(989, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy986; - if(yych >= '6') goto yy986; + yych = *++YYCURSOR; + if(yych == 'U') goto yy990; + if(yych != 'u') goto yy53; goto yy990; yy990: YYDEBUG(990, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'A') goto yy991; + if(yych != 'a') goto yy53; goto yy991; yy991: YYDEBUG(991, *YYCURSOR); yych = *++YYCURSOR; - goto yy986; + if(yych == 'R') goto yy992; + if(yych != 'r') goto yy53; + goto yy992; yy992: YYDEBUG(992, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy986; - if(yych <= '5') goto yy993; - if(yych <= '9') goto yy991; - if(yych <= ':') goto yy989; - goto yy986; + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy53; yy993: YYDEBUG(993, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy986; - if(yych <= '9') goto yy991; - goto yy986; + if(yych <= 'N'){ + if(yych == 'L') goto yy1000; + if(yych <= 'M') goto yy53; + goto yy999; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy1000; + } else { + if(yych == 'n') goto yy999; + goto yy53; + } + } yy994: YYDEBUG(994, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy965; - if(yych == 'v') goto yy965; - goto yy56; + if(yych == 'N') goto yy995; + if(yych != 'n') goto yy53; + goto yy995; yy995: YYDEBUG(995, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy965; - if(yych == 't') goto yy965; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'U') goto yy996; + if(yych != 'u') goto yy889; + goto yy996; yy996: YYDEBUG(996, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy997; - if(yych != 'p') goto yy56; + if(yych == 'A') goto yy997; + if(yych != 'a') goto yy53; goto yy997; yy997: YYDEBUG(997, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych == '/') goto yy966; - goto yy56; - } else { - if(yych <= 'T') goto yy965; - if(yych == 't') goto yy965; - goto yy56; - } + if(yych == 'R') goto yy998; + if(yych != 'r') goto yy53; + goto yy998; yy998: YYDEBUG(998, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy965; - if(yych == 'g') goto yy965; - goto yy56; + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy53; yy999: YYDEBUG(999, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy965; - if(yych == 'r') goto yy965; - goto yy56; + if(yych == 'E') goto yy958; + if(yych == 'e') goto yy958; + goto yy889; yy1000: YYDEBUG(1000, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy965; - if(yych <= 'X') goto yy56; - goto yy965; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy965; - } else { - if(yych == 'y') goto yy965; - goto yy56; - } - } + if(yych == 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy889; yy1001: YYDEBUG(1001, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy965; - if(yych == 'b') goto yy965; - goto yy56; + if(yych == 'I') goto yy958; + goto yy889; yy1002: YYDEBUG(1002, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy965; - if(yych <= 'M') goto yy56; - goto yy965; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy965; - } else { - if(yych == 'n') goto yy965; - goto yy56; - } - } + if(yych != 'I') goto yy889; + goto yy1003; yy1003: YYDEBUG(1003, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy965; - if(yych == 'n') goto yy965; - goto yy56; + if(yych == 'I') goto yy958; + goto yy889; yy1004: YYDEBUG(1004, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1005; + if(yych == 'I') goto yy958; + goto yy889; yy1005: YYDEBUG(1005, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1006; + if(yych <= '/') goto yy53; + if(yych <= '0') goto yy1018; + if(yych <= '9') goto yy1017; + goto yy53; yy1006: YYDEBUG(1006, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1007; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1016; + goto yy53; yy1007: YYDEBUG(1007, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy953; - if(yych >= ':') goto yy953; - goto yy1008; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1014; + if(yych <= '6') goto yy1013; + goto yy53; yy1008: YYDEBUG(1008, *YYCURSOR); yych = *++YYCURSOR; - goto yy953; + if(yych == 'E') goto yy987; + if(yych == 'e') goto yy987; + goto yy53; yy1009: YYDEBUG(1009, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1037; - goto yy70; + if(yych == 'A') goto yy984; + if(yych == 'a') goto yy984; + goto yy53; yy1010: YYDEBUG(1010, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy908; - case '1': goto yy909; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy1014; - case 'D': case 'd': goto yy1018; - case 'F': case 'f': goto yy1012; - case 'J': case 'j': goto yy1011; - case 'M': case 'm': goto yy1013; - case 'N': case 'n': goto yy1017; - case 'O': case 'o': goto yy1016; - case 'S': case 's': goto yy1015; - default: goto yy56; - } + if(yych == 'E') goto yy1012; + if(yych == 'e') goto yy1012; + goto yy53; yy1011: YYDEBUG(1011, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1036; - if(yych <= 'T') goto yy56; - goto yy1035; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1036; - } else { - if(yych == 'u') goto yy1035; - goto yy56; - } - } + if(yych == 'E') goto yy952; + if(yych == 'e') goto yy952; + goto yy53; yy1012: YYDEBUG(1012, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1034; - if(yych == 'e') goto yy1034; - goto yy56; + if(yych == 'P') goto yy971; + if(yych == 'p') goto yy971; + goto yy53; yy1013: YYDEBUG(1013, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'A') goto yy1033; - if(yych == 'a') goto yy1033; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '6') goto yy1015; + goto yy53; yy1014: YYDEBUG(1014, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1032; - if(yych <= 'T') goto yy56; - goto yy1031; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1032; - } else { - if(yych == 'u') goto yy1031; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; + goto yy1015; yy1015: YYDEBUG(1015, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1029; - if(yych == 'e') goto yy1029; - goto yy56; + goto yy915; yy1016: YYDEBUG(1016, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1028; - if(yych == 'c') goto yy1028; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1017: YYDEBUG(1017, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy1027; - if(yych == 'o') goto yy1027; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1018: YYDEBUG(1018, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1019; - if(yych != 'e') goto yy56; - goto yy1019; + if(yych <= '0') goto yy53; + if(yych <= '9') goto yy1015; + goto yy53; yy1019: YYDEBUG(1019, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1020; - if(yych != 'c') goto yy56; - goto yy1020; + if(yych <= '.') goto yy53; + if(yych <= '/') goto yy1022; + if(yych <= '0') goto yy1021; + if(yych <= '9') goto yy1032; + goto yy53; yy1020: YYDEBUG(1020, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '-') goto yy56; - goto yy1021; + if(yych <= '.') goto yy53; + if(yych <= '/') goto yy1022; + if(yych <= '2') goto yy1032; + goto yy53; yy1021: YYDEBUG(1021, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1022; - if(yych <= '2') goto yy1023; - if(yych <= '3') goto yy1024; - goto yy56; + if(yych != '/') goto yy53; + goto yy1022; yy1022: YYDEBUG(1022, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1025; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1023; + if(yych <= '3') goto yy1025; + if(yych <= '9') goto yy1026; + goto yy53; yy1023: YYDEBUG(1023, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1025; - goto yy56; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '9') goto yy1026; + if(yych >= 'n') goto yy1028; + goto yy1024; + } else { + if(yych <= 'r'){ + if(yych >= 'r') goto yy1029; + goto yy1024; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } yy1024: YYDEBUG(1024, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '2') goto yy56; - goto yy1025; -yy1025: - YYDEBUG(1025, *YYCURSOR); - ++YYCURSOR; - goto yy1026; -yy1026: - YYDEBUG(1026, *YYCURSOR); -#line 1210 "ext/date/lib/parse_date.re" +#line 1047 "ext/date/lib/parse_date.re" { - DEBUG_OUTPUT("pgtextreverse"); + DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); + s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; + return TIMELIB_ISO_DATE; + } +#line 11575 "ext/date/lib/parse_date.c" +yy1025: + YYDEBUG(1025, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '1') goto yy1026; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } +yy1026: + YYDEBUG(1026, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'q'){ + if(yych == 'n') goto yy1028; + goto yy1024; + } else { + if(yych <= 'r') goto yy1029; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } -#line 14588 "ext/date/lib/parse_date.c" yy1027: YYDEBUG(1027, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy1020; - if(yych == 'v') goto yy1020; - goto yy56; + if(yych == 't') goto yy1031; + goto yy53; yy1028: YYDEBUG(1028, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1020; - if(yych == 't') goto yy1020; - goto yy56; + if(yych == 'd') goto yy1031; + goto yy53; yy1029: YYDEBUG(1029, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy1030; - if(yych != 'p') goto yy56; - goto yy1030; + if(yych == 'd') goto yy1031; + goto yy53; yy1030: YYDEBUG(1030, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'S'){ - if(yych == '-') goto yy1021; - goto yy56; - } else { - if(yych <= 'T') goto yy1020; - if(yych == 't') goto yy1020; - goto yy56; - } + if(yych != 'h') goto yy53; + goto yy1031; yy1031: YYDEBUG(1031, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'G') goto yy1020; - if(yych == 'g') goto yy1020; - goto yy56; + goto yy1024; yy1032: YYDEBUG(1032, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1020; - if(yych == 'r') goto yy1020; - goto yy56; + if(yych != '/') goto yy53; + goto yy1033; yy1033: YYDEBUG(1033, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1020; - if(yych <= 'X') goto yy56; - goto yy1020; + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '1') goto yy1035; + goto yy1034; + } else { + if(yych <= '3') goto yy1036; + if(yych <= '9') goto yy1026; + goto yy53; + } +yy1034: + YYDEBUG(1034, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '0'){ + if(yych <= '/') goto yy1024; + goto yy1026; + } else { + if(yych <= '9') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; + } } else { if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1020; + if(yych <= 'q') goto yy1024; + goto yy1029; } else { - if(yych == 'y') goto yy1020; - goto yy56; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } } -yy1034: - YYDEBUG(1034, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1020; - if(yych == 'b') goto yy1020; - goto yy56; yy1035: YYDEBUG(1035, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1020; - if(yych <= 'M') goto yy56; - goto yy1020; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '9') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy1020; + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; } else { - if(yych == 'n') goto yy1020; - goto yy56; + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; } } yy1036: YYDEBUG(1036, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'N') goto yy1020; - if(yych == 'n') goto yy1020; - goto yy56; + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych <= '/') goto yy1024; + if(yych <= '1') goto yy1037; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } + } yy1037: YYDEBUG(1037, *YYCURSOR); - yyaccept = 14; + yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': case 'A': case 'D': case 'F': case 'H': - case 'I': - case 'J': case 'M': - case 'N': - case 'O': case 'S': - case 'T': case 'V': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1042; - case '-': goto yy1039; - case '.': goto yy1045; - case '/': goto yy1040; - case '0': goto yy1058; - case '1': goto yy1059; - case '2': goto yy1060; - case '3': goto yy1061; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'W': goto yy1062; - default: goto yy1038; + if(yych <= 'n'){ + if(yych == '/') goto yy1031; + if(yych <= 'm') goto yy1024; + goto yy1028; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1029; + } else { + if(yych <= 's') goto yy1027; + if(yych <= 't') goto yy1030; + goto yy1024; + } } yy1038: YYDEBUG(1038, *YYCURSOR); - -#line 1242 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("year4"); - TIMELIB_INIT; - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_DEINIT; - return TIMELIB_CLF; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'A') goto yy1113; + if(yych <= 'T') goto yy53; + goto yy1112; + } else { + if(yych <= 'a'){ + if(yych <= '`') goto yy53; + goto yy1113; + } else { + if(yych == 'u') goto yy1112; + goto yy53; + } } -#line 14704 "ext/date/lib/parse_date.c" yy1039: YYDEBUG(1039, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case '0': goto yy1199; - case '1': goto yy1200; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy910; - case 'A': case 'a': goto yy1194; - case 'D': case 'd': goto yy1198; - case 'F': case 'f': goto yy1192; - case 'J': case 'j': goto yy1191; - case 'M': case 'm': goto yy1193; - case 'N': case 'n': goto yy1197; - case 'O': case 'o': goto yy1196; - case 'S': case 's': goto yy1195; - default: goto yy1044; - } + if(yych == 'E') goto yy1110; + if(yych == 'e') goto yy1110; + goto yy53; yy1040: YYDEBUG(1040, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1177; - if(yych <= '1') goto yy1178; - if(yych <= '9') goto yy1179; - goto yy56; + if(yych == 'A') goto yy1107; + if(yych == 'a') goto yy1107; + goto yy53; yy1041: YYDEBUG(1041, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - goto yy1042; + yych = *++YYCURSOR; + if(yych <= 'U'){ + if(yych == 'P') goto yy1104; + if(yych <= 'T') goto yy53; + goto yy1103; + } else { + if(yych <= 'p'){ + if(yych <= 'o') goto yy53; + goto yy1104; + } else { + if(yych == 'u') goto yy1103; + goto yy53; + } + } yy1042: YYDEBUG(1042, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy1041; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy1043; - case 'A': case 'a': goto yy1053; - case 'D': case 'd': goto yy1057; - case 'F': case 'f': goto yy1051; - case 'H': case 'h': goto yy73; - case 'I': goto yy1046; - case 'J': case 'j': goto yy1050; - case 'M': case 'm': goto yy1052; - case 'N': case 'n': goto yy1056; - case 'O': case 'o': goto yy1055; - case 'S': case 's': goto yy1054; - case 'T': case 't': goto yy78; - case 'V': goto yy1048; - case 'W': case 'w': goto yy75; - case 'X': goto yy1049; - case 'Y': case 'y': goto yy77; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'E') goto yy1100; + if(yych == 'e') goto yy1100; + goto yy53; yy1043: YYDEBUG(1043, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - goto yy1044; + yych = *++YYCURSOR; + if(yych == 'C') goto yy1098; + if(yych == 'c') goto yy1098; + goto yy53; yy1044: YYDEBUG(1044, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy1043; - case 'A': case 'a': goto yy1053; - case 'D': case 'd': goto yy1169; - case 'F': case 'f': goto yy1166; - case 'I': goto yy1046; - case 'J': case 'j': goto yy1050; - case 'M': case 'm': goto yy1167; - case 'N': case 'n': goto yy1056; - case 'O': case 'o': goto yy1055; - case 'S': case 's': goto yy1168; - case 'V': goto yy1048; - case 'X': goto yy1049; - default: goto yy56; - } + yych = *++YYCURSOR; + if(yych == 'O') goto yy1096; + if(yych == 'o') goto yy1096; + goto yy53; yy1045: YYDEBUG(1045, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1044; - if(yych <= '0') goto yy1163; - if(yych <= '2') goto yy1164; - if(yych <= '3') goto yy1165; - goto yy1044; + if(yych == 'E') goto yy1094; + if(yych == 'e') goto yy1094; + goto yy53; yy1046: YYDEBUG(1046, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= 'U'){ - if(yych == 'I') goto yy1162; - goto yy1047; - } else { - if(yych == 'W') goto yy1047; - if(yych <= 'X') goto yy1116; - goto yy1047; - } -yy1047: - YYDEBUG(1047, *YYCURSOR); - -#line 1075 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("datenodayrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; + yych = *++YYCURSOR; + if(yych <= '/'){ + if(yych == '-') goto yy1049; + goto yy53; + } else { + if(yych <= '0') goto yy1048; + if(yych <= '9') goto yy1068; + goto yy53; } -#line 14831 "ext/date/lib/parse_date.c" +yy1047: + YYDEBUG(1047, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == '-') goto yy1049; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1068; + goto yy53; yy1048: YYDEBUG(1048, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1160; - goto yy1047; + if(yych != '-') goto yy53; + goto yy1049; yy1049: YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1159; - goto yy1047; + if(yych <= '/') goto yy53; + if(yych <= '2') goto yy1050; + if(yych <= '3') goto yy1051; + if(yych <= '9') goto yy1052; + goto yy53; yy1050: YYDEBUG(1050, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1152; - if(yych <= 'T') goto yy56; - goto yy1151; + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + goto yy1052; + } else { + if(yych == 'T') goto yy1057; + goto yy775; + } } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1152; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych == 'u') goto yy1151; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1051: YYDEBUG(1051, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'R'){ - if(yych <= 'N'){ - if(yych == 'E') goto yy1145; - goto yy56; + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy775; + goto yy1052; } else { - if(yych <= 'O') goto yy99; - if(yych <= 'Q') goto yy56; - goto yy98; + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'n'){ - if(yych == 'e') goto yy1145; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'o') goto yy99; - if(yych == 'r') goto yy98; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1052: YYDEBUG(1052, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'O'){ - if(yych <= 'H'){ - if(yych == 'A') goto yy1142; - goto yy56; - } else { - if(yych <= 'I') goto yy126; - if(yych <= 'N') goto yy56; - goto yy125; - } + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych == 'T') goto yy1057; + if(yych <= 'm') goto yy775; + goto yy1054; } else { - if(yych <= 'h'){ - if(yych == 'a') goto yy1142; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'i') goto yy126; - if(yych == 'o') goto yy125; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } yy1053: YYDEBUG(1053, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1136; - if(yych <= 'T') goto yy56; - goto yy1135; - } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1136; - } else { - if(yych == 'u') goto yy1135; - goto yy56; - } - } + if(yych == 't') goto yy1067; + goto yy53; yy1054: YYDEBUG(1054, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych <= 'D'){ - if(yych == 'A') goto yy134; - goto yy56; - } else { - if(yych <= 'E') goto yy1128; - if(yych <= 'T') goto yy56; - goto yy135; - } - } else { - if(yych <= 'd'){ - if(yych == 'a') goto yy134; - goto yy56; - } else { - if(yych <= 'e') goto yy1128; - if(yych == 'u') goto yy135; - goto yy56; - } - } + if(yych == 'd') goto yy1067; + goto yy53; yy1055: YYDEBUG(1055, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1123; - if(yych == 'c') goto yy1123; - goto yy56; + if(yych == 'd') goto yy1067; + goto yy53; yy1056: YYDEBUG(1056, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'O') goto yy1117; - if(yych == 'o') goto yy1117; - goto yy56; + if(yych == 'h') goto yy1067; + goto yy53; yy1057: YYDEBUG(1057, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'E'){ - if(yych == 'A') goto yy122; - if(yych <= 'D') goto yy56; - goto yy1110; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy122; - } else { - if(yych == 'e') goto yy1110; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1058; + if(yych <= '2') goto yy1059; + if(yych <= '9') goto yy1060; + goto yy53; yy1058: YYDEBUG(1058, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1108; - if(yych <= '9') goto yy1109; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1060; + if(yych <= ':') goto yy1061; + goto yy53; yy1059: YYDEBUG(1059, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '2') goto yy1075; - if(yych <= '9') goto yy1074; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy1060; + if(yych == ':') goto yy1061; + goto yy53; yy1060: YYDEBUG(1060, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1074; - goto yy70; + if(yych != ':') goto yy53; + goto yy1061; yy1061: YYDEBUG(1061, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '5') goto yy1070; - if(yych <= '6') goto yy1071; - if(yych <= '9') goto yy79; - goto yy70; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1062; + if(yych <= '9') goto yy1063; + goto yy53; yy1062: YYDEBUG(1062, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '5'){ - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1063; - if(yych <= '4') goto yy1064; - goto yy1065; - } else { - if(yych <= 'E'){ - if(yych <= 'D') goto yy56; - goto yy114; - } else { - if(yych == 'e') goto yy114; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1063; + if(yych <= ':') goto yy1064; + goto yy53; yy1063: YYDEBUG(1063, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1066; - goto yy56; + if(yych != ':') goto yy53; + goto yy1064; yy1064: YYDEBUG(1064, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1066; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1065; + if(yych <= '6') goto yy1066; + if(yych <= '9') goto yy932; + goto yy53; yy1065: YYDEBUG(1065, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '4') goto yy56; - goto yy1066; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy1066: YYDEBUG(1066, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy1067; - if(yych <= '7') goto yy1068; - goto yy1067; + yych = *++YYCURSOR; + if(yych == '0') goto yy932; + goto yy933; yy1067: YYDEBUG(1067, *YYCURSOR); - -#line 1178 "ext/date/lib/parse_date.re" -{ - timelib_sll w, d; - DEBUG_OUTPUT("isoweek"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = 1; - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; - } -#line 15018 "ext/date/lib/parse_date.c" + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == 'T') goto yy1057; + goto yy775; yy1068: YYDEBUG(1068, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if(yych != '-') goto yy53; goto yy1069; yy1069: YYDEBUG(1069, *YYCURSOR); - -#line 1159 "ext/date/lib/parse_date.re" -{ - timelib_sll w, d; - DEBUG_OUTPUT("isoweekday"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = timelib_get_nr((char **) &ptr, 1); - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; + yych = *++YYCURSOR; + if(yych <= '2'){ + if(yych <= '/') goto yy53; + if(yych >= '1') goto yy1071; + goto yy1070; + } else { + if(yych <= '3') goto yy1072; + if(yych <= '9') goto yy1052; + goto yy53; } -#line 15040 "ext/date/lib/parse_date.c" yy1070: YYDEBUG(1070, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1072; - goto yy70; -yy1071: - YYDEBUG(1071, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '6') goto yy1072; - if(yych <= '9') goto yy79; - goto yy70; -yy1072: - YYDEBUG(1072, *YYCURSOR); - yyaccept = 15; + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'X'){ - if(yych <= 'G'){ - if(yych <= 'C'){ - if(yych == ' ') goto yy70; - goto yy1073; - } else { - if(yych == 'E') goto yy1073; - if(yych <= 'F') goto yy70; - goto yy1073; - } + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + if(yych <= '0') goto yy1052; + goto yy1073; } else { - if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; - goto yy1073; - } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; - goto yy1073; - } + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'l'){ - if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; - goto yy1073; - } else { - if(yych == 'g') goto yy1073; - if(yych <= 'h') goto yy70; - goto yy1073; - } + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'v'){ - if(yych <= 'm') goto yy70; - if(yych <= 'r') goto yy1073; - if(yych <= 't') goto yy70; - goto yy1073; - } else { - if(yych == 'x') goto yy1073; - if(yych <= 'y') goto yy70; - goto yy1073; - } + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } -yy1073: - YYDEBUG(1073, *YYCURSOR); - -#line 1146 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("pgydotd"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = timelib_get_nr((char **) &ptr, 3); - s->time->m = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_YEARDAY; - } -#line 15113 "ext/date/lib/parse_date.c" -yy1074: - YYDEBUG(1074, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1072; - goto yy70; -yy1075: - YYDEBUG(1075, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy70; - if(yych >= '1') goto yy1077; - goto yy1076; - } else { - if(yych <= '3') goto yy1078; - if(yych <= '9') goto yy1072; - goto yy70; - } -yy1076: - YYDEBUG(1076, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy79; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1079; - default: goto yy1073; - } -yy1077: - YYDEBUG(1077, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1079; - default: goto yy1073; - } -yy1078: - YYDEBUG(1078, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': goto yy1079; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - default: goto yy1073; - } -yy1079: - YYDEBUG(1079, *YYCURSOR); - yyaccept = 16; +yy1071: + YYDEBUG(1071, *YYCURSOR); + yyaccept = 12; yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 16) { - goto yy69; - } - YYDEBUG(-1, yych); - switch(yych){ - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy79; - case 'D': case 'd': goto yy74; - case 'F': case 'f': goto yy76; - case 'H': case 'h': goto yy73; - case 'M': case 'm': goto yy72; - case 'S': case 's': goto yy71; - case 'T': goto yy1081; - case 'W': case 'w': goto yy75; - case 'Y': case 'y': goto yy77; - case 't': goto yy1082; - default: goto yy1080; - } -yy1080: - YYDEBUG(1080, *YYCURSOR); - -#line 1112 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("datenocolon"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_DEINIT; - return TIMELIB_DATE_NOCOLON; - } -#line 15221 "ext/date/lib/parse_date.c" -yy1081: - YYDEBUG(1081, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1098; - goto yy1099; + if(yych <= 'm'){ + if(yych <= '9'){ + if(yych <= '/') goto yy775; + goto yy1073; + } else { + if(yych == 'T') goto yy1057; + goto yy775; + } + } else { + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; + } else { + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; + } + } +yy1072: + YYDEBUG(1072, *YYCURSOR); + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'm'){ + if(yych <= '1'){ + if(yych <= '/') goto yy775; + goto yy1073; } else { - if(yych <= '9') goto yy1100; - if(yych <= 'G') goto yy56; - goto yy81; + if(yych == 'T') goto yy1057; + goto yy775; } } else { - if(yych <= 'g'){ - if(yych == 'U') goto yy82; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'n') goto yy1054; + if(yych <= 'q') goto yy775; + goto yy1055; } else { - if(yych <= 'h') goto yy81; - if(yych == 'u') goto yy82; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy775; } } -yy1082: - YYDEBUG(1082, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'H'){ - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '2') goto yy1084; - goto yy1083; - } else { - if(yych <= '9') goto yy1085; - if(yych <= 'G') goto yy56; - goto yy81; - } +yy1073: + YYDEBUG(1073, *YYCURSOR); + yyaccept = 18; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'n'){ + if(yych == 'T') goto yy1074; + if(yych <= 'm') goto yy1024; + goto yy1054; } else { - if(yych <= 'g'){ - if(yych == 'U') goto yy82; - goto yy56; + if(yych <= 'r'){ + if(yych <= 'q') goto yy1024; + goto yy1055; } else { - if(yych <= 'h') goto yy81; - if(yych == 'u') goto yy82; - goto yy56; + if(yych <= 's') goto yy1053; + if(yych <= 't') goto yy1056; + goto yy1024; } } +yy1074: + YYDEBUG(1074, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1075; + if(yych <= '2') goto yy1076; + if(yych <= '9') goto yy1060; + goto yy53; +yy1075: + YYDEBUG(1075, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1077; + if(yych <= ':') goto yy1061; + goto yy53; +yy1076: + YYDEBUG(1076, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '3') goto yy1077; + if(yych == ':') goto yy1061; + goto yy53; +yy1077: + YYDEBUG(1077, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy1078; +yy1078: + YYDEBUG(1078, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1079; + if(yych <= '9') goto yy1063; + goto yy53; +yy1079: + YYDEBUG(1079, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '9') goto yy1080; + if(yych <= ':') goto yy1064; + goto yy53; +yy1080: + YYDEBUG(1080, *YYCURSOR); + yych = *++YYCURSOR; + if(yych != ':') goto yy53; + goto yy1081; +yy1081: + YYDEBUG(1081, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1082; + if(yych <= '6') goto yy1083; + if(yych <= '9') goto yy932; + goto yy53; +yy1082: + YYDEBUG(1082, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1084; + goto yy933; yy1083: YYDEBUG(1083, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1092; - if(yych <= '9') goto yy1085; - goto yy56; + if(yych != '0') goto yy933; + goto yy1084; yy1084: YYDEBUG(1084, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1092; - if(yych <= '5') goto yy1086; - goto yy56; + yyaccept = 19; + yych = *(YYMARKER = ++YYCURSOR); + if(yych != '.') goto yy933; + goto yy1085; yy1085: YYDEBUG(1085, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych <= '/') goto yy53; + if(yych >= ':') goto yy53; goto yy1086; yy1086: YYDEBUG(1086, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + yyaccept = 19; + YYMARKER = ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); + yych = *YYCURSOR; goto yy1087; yy1087: YYDEBUG(1087, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1088; - if(yych <= '6') goto yy1089; - goto yy56; + if(yych <= ','){ + if(yych != '+') goto yy933; + goto yy1088; + } else { + if(yych <= '-') goto yy1088; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1086; + goto yy933; + } yy1088: YYDEBUG(1088, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '1') goto yy1089; + if(yych <= '2') goto yy1090; + if(yych <= '9') goto yy1091; + goto yy53; yy1089: YYDEBUG(1089, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy1090; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy1091; + if(yych <= ':') goto yy1092; + goto yy933; yy1090: YYDEBUG(1090, *YYCURSOR); - ++YYCURSOR; - goto yy1091; + yych = *++YYCURSOR; + if(yych <= '5'){ + if(yych <= '/') goto yy933; + if(yych >= '4') goto yy1093; + goto yy1091; + } else { + if(yych <= '9') goto yy932; + if(yych <= ':') goto yy1092; + goto yy933; + } yy1091: YYDEBUG(1091, *YYCURSOR); - -#line 1124 "ext/date/lib/parse_date.re" -{ - int tz_not_found; - DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 9); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_XMLRPC_SOAP; - } -#line 15318 "ext/date/lib/parse_date.c" + yych = *++YYCURSOR; + if(yych <= '/') goto yy933; + if(yych <= '5') goto yy1093; + if(yych <= '9') goto yy932; + if(yych >= ';') goto yy933; + goto yy1092; yy1092: YYDEBUG(1092, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; + if(yych <= '/') goto yy933; if(yych <= '5') goto yy1093; - if(yych <= '9') goto yy1087; - goto yy56; + if(yych <= '9') goto yy932; + goto yy933; yy1093: YYDEBUG(1093, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1094; - if(yych <= '6') goto yy1095; - if(yych <= '9') goto yy1087; - goto yy56; + if(yych <= '/') goto yy933; + if(yych <= '9') goto yy932; + goto yy933; yy1094: YYDEBUG(1094, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1096; - if(yych <= '6') goto yy1097; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych == 'C') goto yy1095; + if(yych != 'c') goto yy53; + goto yy1095; yy1095: YYDEBUG(1095, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1096; - if(yych <= '5') goto yy1088; - if(yych <= '6') goto yy1089; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy954; + if(yych == 'e') goto yy954; + goto yy889; + } yy1096: YYDEBUG(1096, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '9') goto yy1090; - goto yy1091; + if(yych == 'V') goto yy1097; + if(yych != 'v') goto yy53; + goto yy1097; yy1097: YYDEBUG(1097, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy1091; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy961; + if(yych == 'e') goto yy961; + goto yy889; + } yy1098: YYDEBUG(1098, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1107; - if(yych <= '9') goto yy1100; - if(yych <= ':') goto yy1101; - goto yy56; + if(yych == 'T') goto yy1099; + if(yych != 't') goto yy53; + goto yy1099; yy1099: YYDEBUG(1099, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '5'){ - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1107; - goto yy1086; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych == '-') goto yy863; + goto yy889; } else { - if(yych == ':') goto yy1101; - goto yy56; + if(yych <= 'O') goto yy967; + if(yych == 'o') goto yy967; + goto yy889; } yy1100: YYDEBUG(1100, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1086; - if(yych != ':') goto yy56; + if(yych == 'P') goto yy1101; + if(yych != 'p') goto yy53; goto yy1101; yy1101: YYDEBUG(1101, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; - goto yy1102; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'T') goto yy1102; + if(yych != 't') goto yy889; + goto yy1102; + } yy1102: YYDEBUG(1102, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1103; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy973; + if(yych == 'e') goto yy973; + goto yy889; + } yy1103: YYDEBUG(1103, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1104; + if(yych == 'G') goto yy1106; + if(yych == 'g') goto yy1106; + goto yy53; yy1104: YYDEBUG(1104, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1105; - if(yych <= '6') goto yy1106; - goto yy56; + if(yych == 'R') goto yy1105; + if(yych != 'r') goto yy53; + goto yy1105; yy1105: YYDEBUG(1105, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'I') goto yy980; + if(yych == 'i') goto yy980; + goto yy889; + } yy1106: YYDEBUG(1106, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy56; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'U') goto yy982; + if(yych == 'u') goto yy982; + goto yy889; + } yy1107: YYDEBUG(1107, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1093; - if(yych <= '9') goto yy1087; - if(yych <= ':') goto yy1101; - goto yy56; + if(yych <= 'Y'){ + if(yych == 'R') goto yy1108; + if(yych <= 'X') goto yy53; + goto yy1109; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy53; + goto yy1108; + } else { + if(yych == 'y') goto yy1109; + goto yy53; + } + } yy1108: YYDEBUG(1108, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy79; - if(yych <= '9') goto yy1072; - goto yy70; -yy1109: - YYDEBUG(1109, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1076; - goto yy1077; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'B'){ + if(yych == '-') goto yy863; + goto yy889; } else { - if(yych <= '3') goto yy1078; - if(yych <= '9') goto yy1072; - goto yy70; + if(yych <= 'C') goto yy986; + if(yych == 'c') goto yy986; + goto yy889; } +yy1109: + YYDEBUG(1109, *YYCURSOR); + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '-') goto yy863; + goto yy889; yy1110: YYDEBUG(1110, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'C') goto yy1111; - if(yych != 'c') goto yy56; + if(yych == 'B') goto yy1111; + if(yych != 'b') goto yy53; goto yy1111; yy1111: YYDEBUG(1111, *YYCURSOR); yyaccept = 17; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1112; - if(yych != 'e') goto yy1047; - goto yy1112; + if(yych <= 'Q'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'R') goto yy989; + if(yych == 'r') goto yy989; + goto yy889; + } yy1112: YYDEBUG(1112, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1113; - if(yych != 'm') goto yy56; - goto yy1113; + if(yych <= 'N'){ + if(yych == 'L') goto yy1116; + if(yych <= 'M') goto yy53; + goto yy1115; + } else { + if(yych <= 'l'){ + if(yych <= 'k') goto yy53; + goto yy1116; + } else { + if(yych == 'n') goto yy1115; + goto yy53; + } + } yy1113: YYDEBUG(1113, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1114; - if(yych != 'b') goto yy56; + if(yych == 'N') goto yy1114; + if(yych != 'n') goto yy53; goto yy1114; yy1114: YYDEBUG(1114, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1115; - if(yych != 'e') goto yy56; - goto yy1115; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'U') goto yy996; + if(yych == 'u') goto yy996; + goto yy889; + } yy1115: YYDEBUG(1115, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych != 'r') goto yy56; - goto yy1116; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'E') goto yy958; + if(yych == 'e') goto yy958; + goto yy889; + } yy1116: YYDEBUG(1116, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1047; + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'X'){ + if(yych == '-') goto yy863; + goto yy889; + } else { + if(yych <= 'Y') goto yy958; + if(yych == 'y') goto yy958; + goto yy889; + } yy1117: YYDEBUG(1117, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'V') goto yy1118; - if(yych != 'v') goto yy56; - goto yy1118; + if(yych <= 'T'){ + if(yych <= '-') goto yy617; + if(yych <= '.') goto yy845; + if(yych <= '/') goto yy844; + goto yy617; + } else { + if(yych <= 'U') goto yy74; + if(yych == 'u') goto yy74; + goto yy617; + } yy1118: YYDEBUG(1118, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1119; - if(yych != 'e') goto yy1047; - goto yy1119; + yych = *++YYCURSOR; + if(yych <= 'P'){ + if(yych == 'C') goto yy121; + if(yych <= 'O') goto yy53; + goto yy709; + } else { + if(yych <= 'c'){ + if(yych <= 'b') goto yy53; + goto yy121; + } else { + if(yych == 'p') goto yy709; + goto yy53; + } + } yy1119: YYDEBUG(1119, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1120; - if(yych != 'm') goto yy56; - goto yy1120; + if(yych <= 'm'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy845; + } else { + if(yych <= '/') goto yy844; + if(yych <= '9') goto yy851; + goto yy1121; + } + } else { + if(yych <= 'r'){ + if(yych <= 'n') goto yy612; + if(yych <= 'q') goto yy1121; + goto yy613; + } else { + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1120: YYDEBUG(1120, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1121; - if(yych != 'b') goto yy56; + ++YYCURSOR; + if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); + yych = *YYCURSOR; goto yy1121; yy1121: YYDEBUG(1121, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1122; - if(yych != 'e') goto yy56; - goto yy1122; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': goto yy1120; + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': goto yy616; + case 'A': case 'a': goto yy699; + case 'D': case 'd': goto yy608; + case 'F': case 'f': goto yy609; + case 'H': case 'h': goto yy60; + case 'I': goto yy619; + case 'J': case 'j': goto yy623; + case 'M': case 'm': goto yy607; + case 'N': case 'n': goto yy626; + case 'O': case 'o': goto yy625; + case 'S': case 's': goto yy605; + case 'T': case 't': goto yy65; + case 'V': goto yy621; + case 'W': case 'w': goto yy62; + case 'X': goto yy622; + case 'Y': case 'y': goto yy64; + default: goto yy53; + } yy1122: YYDEBUG(1122, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy1123; + } else { + if(yych <= '/') goto yy844; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy1124; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy1121; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1123: YYDEBUG(1123, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1124; - if(yych != 't') goto yy56; - goto yy1124; + if(yych <= '1'){ + if(yych <= '/') goto yy617; + if(yych <= '0') goto yy1147; + goto yy1148; + } else { + if(yych <= '5') goto yy1149; + if(yych <= '9') goto yy1150; + goto yy617; + } yy1124: YYDEBUG(1124, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'O') goto yy1125; - if(yych != 'o') goto yy1047; - goto yy1125; + yych = *++YYCURSOR; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1142; + if(yych <= '9') goto yy1143; + goto yy53; yy1125: YYDEBUG(1125, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1126; - if(yych != 'b') goto yy56; + if(yych == '-') goto yy852; + if(yych <= '/') goto yy57; + if(yych >= ':') goto yy57; goto yy1126; yy1126: YYDEBUG(1126, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1127; - if(yych != 'e') goto yy56; - goto yy1127; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': case 'A': case 'D': case 'F': case 'H': + case 'I': + case 'J': case 'M': + case 'N': + case 'O': case 'S': + case 'T': case 'V': case 'X': + case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': + case 'n': + case 'o': case 's': + case 't': case 'w': case 'y': goto yy884; + case '-': goto yy881; + case '.': goto yy887; + case '/': goto yy882; + case '0': goto yy1128; + case '1': goto yy1129; + case '2': goto yy1130; + case '3': goto yy1131; + case '4': + case '5': goto yy1132; + case '6': goto yy1133; + case '7': + case '8': + case '9': goto yy51; + case 'W': goto yy904; + default: goto yy1127; + } yy1127: YYDEBUG(1127, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + +#line 969 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("gnunocolon"); + TIMELIB_INIT; + switch (s->time->have_time) { + case 0: + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = 0; + break; + case 1: + s->time->y = timelib_get_nr((char **) &ptr, 4); + break; + default: + TIMELIB_DEINIT; + return TIMELIB_ERROR; + } + s->time->have_time++; + TIMELIB_DEINIT; + return TIMELIB_GNU_NOCOLON; + } +#line 12466 "ext/date/lib/parse_date.c" yy1128: YYDEBUG(1128, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'P'){ - if(yych == 'C') goto yy137; - if(yych <= 'O') goto yy56; - goto yy1129; - } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy137; - } else { - if(yych != 'p') goto yy56; - goto yy1129; - } - } + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy1140; + if(yych <= '9') goto yy1141; + goto yy57; yy1129: YYDEBUG(1129, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'T') goto yy1130; - if(yych != 't') goto yy1047; - goto yy1130; + if(yych <= '/') goto yy57; + if(yych <= '2') goto yy1139; + if(yych <= '9') goto yy1138; + goto yy57; yy1130: YYDEBUG(1130, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'E') goto yy1131; - if(yych != 'e') goto yy1047; - goto yy1131; + yych = *++YYCURSOR; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy1138; + goto yy57; yy1131: YYDEBUG(1131, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'M') goto yy1132; - if(yych != 'm') goto yy56; - goto yy1132; + if(yych <= '/') goto yy57; + if(yych <= '5') goto yy1136; + if(yych <= '6') goto yy1137; + if(yych <= '9') goto yy1134; + goto yy57; yy1132: YYDEBUG(1132, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'B') goto yy1133; - if(yych != 'b') goto yy56; - goto yy1133; + if(yych <= '/') goto yy57; + if(yych <= '9') goto yy1134; + goto yy57; yy1133: YYDEBUG(1133, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1134; - if(yych != 'e') goto yy56; - goto yy1134; + if(yych <= '/') goto yy57; + if(yych <= '0') goto yy1134; + if(yych <= '9') goto yy51; + goto yy57; yy1134: YYDEBUG(1134, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1116; - if(yych == 'r') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + if(yybm[0+yych] & 8) { + goto yy51; + } + if(yych <= 'X'){ + if(yych <= 'G'){ + if(yych <= 'C'){ + if(yych == ' ') goto yy57; + goto yy1135; + } else { + if(yych == 'E') goto yy1135; + if(yych <= 'F') goto yy57; + goto yy1135; + } + } else { + if(yych <= 'R'){ + if(yych <= 'H') goto yy57; + if(yych == 'M') goto yy57; + goto yy1135; + } else { + if(yych <= 'T') goto yy57; + if(yych == 'W') goto yy57; + goto yy1135; + } + } + } else { + if(yych <= 'l'){ + if(yych <= 'e'){ + if(yych <= 'Y') goto yy57; + if(yych == 'd') goto yy57; + goto yy1135; + } else { + if(yych == 'g') goto yy1135; + if(yych <= 'h') goto yy57; + goto yy1135; + } + } else { + if(yych <= 'v'){ + if(yych <= 'm') goto yy57; + if(yych <= 'r') goto yy1135; + if(yych <= 't') goto yy57; + goto yy1135; + } else { + if(yych == 'x') goto yy1135; + if(yych <= 'y') goto yy57; + goto yy1135; + } + } + } yy1135: YYDEBUG(1135, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy1139; - if(yych == 'g') goto yy1139; - goto yy56; + +#line 1014 "ext/date/lib/parse_date.re" +{ + int tz_not_found; + DEBUG_OUTPUT("iso8601nocolon"); + TIMELIB_INIT; + TIMELIB_HAVE_TIME(); + s->time->h = timelib_get_nr((char **) &ptr, 2); + s->time->i = timelib_get_nr((char **) &ptr, 2); + s->time->s = timelib_get_nr((char **) &ptr, 2); + + if (*ptr != '\0') { + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + } + TIMELIB_DEINIT; + return TIMELIB_ISO_NOCOLON; + } +#line 12564 "ext/date/lib/parse_date.c" yy1136: YYDEBUG(1136, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1137; - if(yych != 'r') goto yy56; - goto yy1137; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1137: YYDEBUG(1137, *YYCURSOR); - yyaccept = 17; + yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'I') goto yy1138; - if(yych != 'i') goto yy1047; - goto yy1138; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': goto yy914; + case '7': + case '8': + case '9': goto yy51; + default: goto yy1135; + } yy1138: YYDEBUG(1138, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'L') goto yy1116; - if(yych == 'l') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1139: YYDEBUG(1139, *YYCURSOR); - yyaccept = 17; + yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'U') goto yy1140; - if(yych != 'u') goto yy1047; - goto yy1140; + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy918; + case '1': + case '2': goto yy919; + case '3': goto yy920; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1140: YYDEBUG(1140, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'S') goto yy1141; - if(yych != 's') goto yy56; - goto yy1141; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy51; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1141: YYDEBUG(1141, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy1116; - if(yych == 't') goto yy1116; - goto yy56; + yyaccept = 21; + yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(-1, yych); + switch(yych){ + case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': + case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': + case 't': case 'w': case 'y': goto yy57; + case '0': goto yy918; + case '1': + case '2': goto yy919; + case '3': goto yy920; + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy914; + default: goto yy1135; + } yy1142: YYDEBUG(1142, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1143; - if(yych <= 'X') goto yy56; - goto yy1116; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1144; + goto yy634; } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1143; - } else { - if(yych == 'y') goto yy1116; - goto yy56; - } + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; } yy1143: YYDEBUG(1143, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'C') goto yy1144; - if(yych != 'c') goto yy1047; + if(yych == '.') goto yy1144; + if(yych != ':') goto yy634; goto yy1144; yy1144: YYDEBUG(1144, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'H') goto yy1116; - if(yych == 'h') goto yy1116; - goto yy56; + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1145; + if(yych <= '6') goto yy1146; + if(yych <= '9') goto yy639; + goto yy53; yy1145: YYDEBUG(1145, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1146; - if(yych != 'b') goto yy56; - goto yy1146; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy639; + goto yy634; yy1146: YYDEBUG(1146, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'R') goto yy1147; - if(yych != 'r') goto yy1047; - goto yy1147; + if(yych == '.') goto yy640; + if(yych == '0') goto yy639; + goto yy634; yy1147: YYDEBUG(1147, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'U') goto yy1148; - if(yych != 'u') goto yy56; - goto yy1148; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '9') goto yy1150; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1148: YYDEBUG(1148, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1149; - if(yych != 'a') goto yy56; - goto yy1149; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '2') goto yy1150; + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1149: YYDEBUG(1149, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1150; - if(yych != 'r') goto yy56; - goto yy1150; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '/'){ + if(yych == '.') goto yy1151; + goto yy634; + } else { + if(yych <= '9') goto yy1143; + if(yych <= ':') goto yy1144; + goto yy634; + } yy1150: YYDEBUG(1150, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy56; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy1151; + if(yych == ':') goto yy1144; + goto yy634; yy1151: YYDEBUG(1151, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1158; - if(yych <= 'M') goto yy56; - goto yy1157; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; - goto yy1158; - } else { - if(yych == 'n') goto yy1157; - goto yy56; - } - } + if(yych <= '/') goto yy53; + if(yych <= '5') goto yy1152; + if(yych <= '6') goto yy1153; + if(yych <= '9') goto yy727; + goto yy53; yy1152: YYDEBUG(1152, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'N') goto yy1153; - if(yych != 'n') goto yy56; - goto yy1153; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy1154; + goto yy634; yy1153: YYDEBUG(1153, *YYCURSOR); - yyaccept = 17; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if(yych == 'U') goto yy1154; - if(yych != 'u') goto yy1047; - goto yy1154; + if(yych <= '/'){ + if(yych == '.') goto yy640; + goto yy634; + } else { + if(yych <= '0') goto yy1154; + if(yych <= '9') goto yy728; + goto yy634; + } yy1154: YYDEBUG(1154, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1155; - if(yych != 'a') goto yy56; - goto yy1155; + yyaccept = 11; + yych = *(YYMARKER = ++YYCURSOR); + if(yych == '.') goto yy640; + if(yych <= '/') goto yy634; + if(yych <= '9') goto yy730; + goto yy634; yy1155: YYDEBUG(1155, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'R') goto yy1156; - if(yych != 'r') goto yy56; - goto yy1156; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy604; + if(yych <= '-') goto yy615; + goto yy618; + } else { + if(yych <= '/') goto yy614; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy627; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy604; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy604; + } + } yy1156: YYDEBUG(1156, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy56; + if(yych <= ':'){ + if(yych <= '.'){ + if(yych <= ',') goto yy1121; + if(yych <= '-') goto yy615; + goto yy1123; + } else { + if(yych <= '/') goto yy614; + if(yych <= '5') goto yy1125; + if(yych <= '9') goto yy851; + goto yy1124; + } + } else { + if(yych <= 'q'){ + if(yych == 'n') goto yy612; + goto yy1121; + } else { + if(yych <= 'r') goto yy613; + if(yych <= 's') goto yy606; + if(yych <= 't') goto yy610; + goto yy1121; + } + } yy1157: YYDEBUG(1157, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1116; - if(yych == 'e') goto yy1116; - goto yy1047; + if(yych <= '0') goto yy53; + if(yych >= ':') goto yy53; + goto yy1158; yy1158: YYDEBUG(1158, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy1047; + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy1159; yy1159: YYDEBUG(1159, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= '/') goto yy1160; + if(yych <= '9') goto yy1158; + goto yy1160; yy1160: YYDEBUG(1160, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'I') goto yy1047; - goto yy1161; + +#line 904 "ext/date/lib/parse_date.re" +{ + timelib_ull i; + + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + TIMELIB_UNHAVE_DATE(); + TIMELIB_UNHAVE_TIME(); + + i = timelib_get_unsigned_nr((char **) &ptr, 24); + s->time->y = 1970; + s->time->m = 1; + s->time->d = 1; + s->time->h = s->time->i = s->time->s = 0; + s->time->f = 0.0; + s->time->relative.s += i; + s->time->is_localtime = 1; + s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; + s->time->z = 0; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } +#line 12850 "ext/date/lib/parse_date.c" yy1161: YYDEBUG(1161, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1192; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1192; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1162: YYDEBUG(1162, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'I') goto yy1116; - goto yy1047; + if(yych <= 'U'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'I') goto yy1186; + if(yych <= 'T') goto yy134; + goto yy1185; + } + } else { + if(yych <= 'i'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'h') goto yy134; + goto yy1186; + } else { + if(yych == 'u') goto yy1185; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1163: YYDEBUG(1163, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '0') goto yy1176; - if(yych <= '9') goto yy1175; - goto yy56; + if(yych <= 'M'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'D') goto yy1174; + if(yych <= 'L') goto yy134; + goto yy1175; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'c') goto yy134; + goto yy1174; + } else { + if(yych == 'm') goto yy1175; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1164: YYDEBUG(1164, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1174; - goto yy56; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1170; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'e') goto yy1170; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1165: YYDEBUG(1165, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1172; - if(yych <= '6') goto yy1171; - goto yy56; + if(yych <= 'E'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1166; + } + } else { + if(yych <= 'd'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'e') goto yy1166; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1166: YYDEBUG(1166, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1145; - if(yych == 'e') goto yy1145; - goto yy56; + if(yych <= 'L'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'K') goto yy135; + goto yy1167; + } + } else { + if(yych <= 'k'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'l') goto yy1167; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1167: YYDEBUG(1167, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1142; - if(yych == 'a') goto yy1142; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'F') goto yy1168; + if(yych != 'f') goto yy3; + goto yy1168; + } yy1168: YYDEBUG(1168, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1170; - if(yych == 'e') goto yy1170; - goto yy56; + if(yych == 'T') goto yy1169; + if(yych != 't') goto yy53; + goto yy1169; yy1169: YYDEBUG(1169, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1110; - if(yych == 'e') goto yy1110; - goto yy56; + if(yych == 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy53; yy1170: YYDEBUG(1170, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'P') goto yy1129; - if(yych == 'p') goto yy1129; - goto yy56; + if(yych <= 'S'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'R') goto yy135; + goto yy1171; + } + } else { + if(yych <= 'r'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 's') goto yy1171; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1171: YYDEBUG(1171, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '6') goto yy1173; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'D') goto yy1172; + if(yych != 'd') goto yy3; + goto yy1172; + } yy1172: YYDEBUG(1172, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'A') goto yy1173; + if(yych != 'a') goto yy53; goto yy1173; yy1173: YYDEBUG(1173, *YYCURSOR); yych = *++YYCURSOR; - goto yy1073; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1174: YYDEBUG(1174, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + if(yych <= 'A'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy1182; + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + goto yy3; + } else { + if(yych <= 'a') goto yy1182; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1175: YYDEBUG(1175, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + if(yych <= 'O'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy1176; + } + } else { + if(yych <= 'n'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'o') goto yy1176; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1176: YYDEBUG(1176, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych <= '9') goto yy1173; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Q'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'R') goto yy1177; + if(yych != 'r') goto yy3; + goto yy1177; + } yy1177: YYDEBUG(1177, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '.') goto yy56; - if(yych <= '/') goto yy1180; - if(yych <= '0') goto yy1179; - if(yych <= '9') goto yy1185; - goto yy56; + if(yych == 'R') goto yy1178; + if(yych != 'r') goto yy53; + goto yy1178; yy1178: YYDEBUG(1178, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '.') goto yy56; - if(yych <= '/') goto yy1180; - if(yych <= '2') goto yy1185; - goto yy56; + if(yych == 'O') goto yy1179; + if(yych != 'o') goto yy53; + goto yy1179; yy1179: YYDEBUG(1179, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; + if(yych == 'W') goto yy1180; + if(yych != 'w') goto yy53; goto yy1180; yy1180: YYDEBUG(1180, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '2') goto yy1181; - if(yych <= '3') goto yy1183; - if(yych <= '9') goto yy1184; - goto yy56; + ++YYCURSOR; + goto yy1181; yy1181: YYDEBUG(1181, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '/') goto yy1182; - if(yych <= '9') goto yy1184; - goto yy1182; -yy1182: - YYDEBUG(1182, *YYCURSOR); -#line 1011 "ext/date/lib/parse_date.re" +#line 892 "ext/date/lib/parse_date.re" { - DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash"); + DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); + TIMELIB_HAVE_RELATIVE(); + TIMELIB_UNHAVE_TIME(); + + s->time->relative.d = 1; TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; + return TIMELIB_RELATIVE; + } +#line 13108 "ext/date/lib/parse_date.c" +yy1182: + YYDEBUG(1182, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= 'X'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Y') goto yy1183; + if(yych != 'y') goto yy3; + goto yy1183; } -#line 15750 "ext/date/lib/parse_date.c" yy1183: YYDEBUG(1183, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych >= '2') goto yy1182; + ++YYCURSOR; goto yy1184; yy1184: YYDEBUG(1184, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1182; + +#line 882 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("midnight | today"); + TIMELIB_INIT; + TIMELIB_UNHAVE_TIME(); + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; + } +#line 13130 "ext/date/lib/parse_date.c" yy1185: YYDEBUG(1185, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '/') goto yy56; - goto yy1186; + if(yych <= 'R'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'Q') goto yy135; + goto yy1188; + } + } else { + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 'r') goto yy1188; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1186: YYDEBUG(1186, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '1') goto yy1188; - goto yy1187; + if(yych <= 'S'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'Q') goto yy135; + if(yych >= 'S') goto yy317; + goto yy1187; + } } else { - if(yych <= '3') goto yy1189; - if(yych <= '9') goto yy1184; - goto yy56; + if(yych <= 'q'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'r') goto yy1187; + if(yych <= 's') goto yy317; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1187: YYDEBUG(1187, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych <= '0') goto yy1184; - if(yych <= '9') goto yy1190; - goto yy1182; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'C'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'D') goto yy159; + if(yych == 'd') goto yy159; + goto yy3; + } yy1188: YYDEBUG(1188, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych <= '9') goto yy1190; - goto yy1182; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'S') goto yy1189; + if(yych != 's') goto yy3; + goto yy1189; + } yy1189: YYDEBUG(1189, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1182; - if(yych >= '2') goto yy1182; + if(yych == 'D') goto yy1190; + if(yych != 'd') goto yy53; goto yy1190; yy1190: YYDEBUG(1190, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '/') goto yy1184; - goto yy1182; + if(yych == 'A') goto yy1191; + if(yych != 'a') goto yy53; + goto yy1191; yy1191: YYDEBUG(1191, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'A') goto yy1255; - if(yych <= 'T') goto yy56; - goto yy1254; - } else { - if(yych <= 'a'){ - if(yych <= '`') goto yy56; - goto yy1255; - } else { - if(yych == 'u') goto yy1254; - goto yy56; - } - } + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1192: YYDEBUG(1192, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'E') goto yy1252; - if(yych == 'e') goto yy1252; - goto yy56; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1193; + } + } else { + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy1193; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1193: YYDEBUG(1193, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'A') goto yy1249; - if(yych == 'a') goto yy1249; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; + } yy1194: YYDEBUG(1194, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'U'){ - if(yych == 'P') goto yy1246; - if(yych <= 'T') goto yy56; - goto yy1245; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1192; + } } else { - if(yych <= 'p'){ - if(yych <= 'o') goto yy56; - goto yy1246; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych == 'u') goto yy1245; - goto yy56; + if(yych == 'n') goto yy1223; + if(yych <= 'z') goto yy137; + goto yy3; } } yy1195: YYDEBUG(1195, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1242; - if(yych == 'e') goto yy1242; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'U'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'H'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'I') goto yy1186; + if(yych <= 'T') goto yy134; + goto yy1185; + } + } + } else { + if(yych <= 'h'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 't'){ + if(yych <= 'i') goto yy1217; + goto yy137; + } else { + if(yych <= 'u') goto yy1216; + if(yych <= 'z') goto yy137; + goto yy3; + } + } + } yy1196: YYDEBUG(1196, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy1240; - if(yych == 'c') goto yy1240; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'M'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'C'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'D') goto yy1174; + if(yych <= 'L') goto yy134; + goto yy1175; + } + } + } else { + if(yych <= 'c'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'l'){ + if(yych <= 'd') goto yy1207; + goto yy137; + } else { + if(yych <= 'm') goto yy1208; + if(yych <= 'z') goto yy137; + goto yy3; + } + } + } yy1197: YYDEBUG(1197, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'O') goto yy1238; - if(yych == 'o') goto yy1238; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1170; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy1203; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy1198: YYDEBUG(1198, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'E') goto yy1236; - if(yych == 'e') goto yy1236; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'D') goto yy134; + goto yy1166; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'e') goto yy1199; + if(yych <= 'z') goto yy137; + goto yy3; + } + } yy1199: YYDEBUG(1199, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych == '-') goto yy947; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'K') goto yy135; + goto yy1167; + } } else { - if(yych <= '0') goto yy910; - if(yych <= '9') goto yy1201; - goto yy56; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'l') goto yy1200; + if(yych <= 'z') goto yy142; + goto yy3; + } } yy1200: YYDEBUG(1200, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy947; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy1201; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'F'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'E') goto yy3; + goto yy1168; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'f') goto yy1201; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1201: YYDEBUG(1201, *YYCURSOR); yych = *++YYCURSOR; - if(yych != '-') goto yy56; + if(yych == 'T') goto yy1169; + if(yych != 't') goto yy144; goto yy1202; yy1202: YYDEBUG(1202, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '2'){ - if(yych <= '/') goto yy56; - if(yych >= '1') goto yy1204; - goto yy1203; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'H') goto yy159; + goto yy53; + } } else { - if(yych <= '3') goto yy1205; - if(yych <= '9') goto yy951; - goto yy56; + if(yych <= 'g'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy53; + } } yy1203: YYDEBUG(1203, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych <= '0') goto yy951; - if(yych <= '9') goto yy1206; - goto yy949; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'R') goto yy135; + goto yy1171; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 's') goto yy1204; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1204: YYDEBUG(1204, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych <= '9') goto yy1206; - goto yy949; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'C') goto yy3; + goto yy1172; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy1205; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1205: YYDEBUG(1205, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy949; - if(yych >= '2') goto yy949; + if(yych == 'A') goto yy1173; + if(yych != 'a') goto yy144; goto yy1206; yy1206: YYDEBUG(1206, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if(yych != 'T') goto yy1182; - goto yy1207; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; yy1207: YYDEBUG(1207, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1208; - if(yych <= '2') goto yy1209; - if(yych <= '9') goto yy1210; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy1182; + } + } else { + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } else { + if(yych <= '`') goto yy3; + if(yych <= 'a') goto yy1214; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1208: YYDEBUG(1208, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1217; - if(yych <= ':') goto yy1211; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'O'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'N') goto yy135; + goto yy1176; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'o') goto yy1209; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1209: YYDEBUG(1209, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '3') goto yy1217; - if(yych == ':') goto yy1211; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'Q') goto yy3; + goto yy1177; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'r') goto yy1210; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1210: YYDEBUG(1210, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'R') goto yy1178; + if(yych != 'r') goto yy144; goto yy1211; yy1211: YYDEBUG(1211, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; + if(yych == 'O') goto yy1179; + if(yych != 'o') goto yy144; goto yy1212; yy1212: YYDEBUG(1212, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; + if(yych == 'W') goto yy1180; + if(yych != 'w') goto yy144; goto yy1213; yy1213: YYDEBUG(1213, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1214; + yyaccept = 22; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1181; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1181; + if(yych <= 'z') goto yy143; + goto yy1181; + } yy1214: YYDEBUG(1214, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1215; - if(yych <= '6') goto yy1216; - goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Y'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'X') goto yy3; + goto yy1183; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'y') goto yy1215; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1215: YYDEBUG(1215, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + yyaccept = 23; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1184; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1184; + if(yych <= 'z') goto yy143; + goto yy1184; + } yy1216: YYDEBUG(1216, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '0') goto yy1090; - goto yy56; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'R'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'Q') goto yy135; + goto yy1188; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 'r') goto yy1219; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1217: YYDEBUG(1217, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != ':') goto yy56; - goto yy1218; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'Q') goto yy135; + if(yych <= 'R') goto yy1187; + goto yy317; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych <= 'r'){ + if(yych <= 'q') goto yy142; + goto yy1218; + } else { + if(yych <= 's') goto yy320; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } yy1218: YYDEBUG(1218, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= '6') goto yy56; - goto yy1219; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'C') goto yy3; + goto yy159; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1219: YYDEBUG(1219, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1220; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'R') goto yy3; + goto yy1189; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 's') goto yy1220; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1220: YYDEBUG(1220, *YYCURSOR); yych = *++YYCURSOR; - if(yych != ':') goto yy56; + if(yych == 'D') goto yy1190; + if(yych != 'd') goto yy144; goto yy1221; yy1221: YYDEBUG(1221, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1222; - if(yych <= '6') goto yy1223; - goto yy56; + if(yych == 'A') goto yy1191; + if(yych != 'a') goto yy144; + goto yy1222; yy1222: YYDEBUG(1222, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1224; - goto yy56; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; yy1223: YYDEBUG(1223, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != '0') goto yy56; - goto yy1224; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1193; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy1224; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1224: YYDEBUG(1224, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych != '.') goto yy1091; - goto yy1225; + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1225: YYDEBUG(1225, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1226; + if(yych <= 'Y'){ + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych == 'R') goto yy1236; + if(yych <= 'X') goto yy134; + goto yy1237; + } + } else { + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'q') goto yy134; + goto yy1236; + } else { + if(yych == 'y') goto yy1237; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1226: YYDEBUG(1226, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); - yych = *YYCURSOR; - goto yy1227; + yych = *++YYCURSOR; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy1231; + } + } else { + if(yych <= 'c'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'd') goto yy1231; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1227: YYDEBUG(1227, *YYCURSOR); - if(yych <= ','){ - if(yych != '+') goto yy56; - goto yy1228; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1228; + } } else { - if(yych <= '-') goto yy1228; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1226; - goto yy56; + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1228; + if(yych <= 'z') goto yy134; + goto yy3; + } } yy1228: YYDEBUG(1228, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '1') goto yy1229; - if(yych <= '2') goto yy1230; - if(yych <= '9') goto yy1231; - goto yy56; + if(yych <= 'D'){ + if(yych <= ')'){ + if(yych <= '(') goto yy341; + goto yy132; + } else { + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy1229; + } + } else { + if(yych <= 'c'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy341; + goto yy135; + } else { + if(yych <= 'd') goto yy1229; + if(yych <= 'z') goto yy135; + goto yy341; + } + } yy1229: YYDEBUG(1229, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1234; - if(yych <= '9') goto yy1231; - if(yych <= ':') goto yy1232; - goto yy1091; -yy1230: - YYDEBUG(1230, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '5'){ - if(yych <= '/') goto yy1091; - if(yych <= '3') goto yy1234; - goto yy1233; + if(yych <= '@'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych == ':') goto yy1232; - goto yy1091; + if(yych <= 'A') goto yy1230; + if(yych != 'a') goto yy3; + goto yy1230; } +yy1230: + YYDEBUG(1230, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy347; + goto yy53; yy1231: YYDEBUG(1231, *YYCURSOR); - yyaccept = 19; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1233; - if(yych != ':') goto yy1091; - goto yy1232; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1232; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'n') goto yy1232; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1232: YYDEBUG(1232, *YYCURSOR); - yyaccept = 19; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/') goto yy1091; - if(yych >= '6') goto yy1091; - goto yy1233; + if(yych <= 'H'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'I') goto yy1233; + if(yych != 'i') goto yy3; + goto yy1233; + } yy1233: YYDEBUG(1233, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1090; - goto yy56; + if(yych == 'G') goto yy1234; + if(yych != 'g') goto yy53; + goto yy1234; yy1234: YYDEBUG(1234, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '5') goto yy1235; - if(yych <= '9') goto yy1090; - if(yych <= ':') goto yy1232; - goto yy1091; + if(yych == 'H') goto yy1235; + if(yych != 'h') goto yy53; + goto yy1235; yy1235: YYDEBUG(1235, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/') goto yy1091; - if(yych <= '9') goto yy1090; - goto yy1091; + if(yych == 'T') goto yy1183; + if(yych == 't') goto yy1183; + goto yy53; yy1236: YYDEBUG(1236, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'C') goto yy1237; - if(yych != 'c') goto yy56; - goto yy1237; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } + } else { + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych == 'C') goto yy1238; + goto yy135; + } else { + if(yych <= 'b'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'c') goto yy1238; + if(yych <= 'z') goto yy135; + goto yy3; + } + } + } yy1237: YYDEBUG(1237, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; + } else { + if(yych == '-') goto yy361; + goto yy359; + } + } else { + if(yych <= '@'){ + if(yych <= '/') goto yy3; + if(yych <= '9') goto yy359; + goto yy3; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy135; + goto yy3; + } + } +yy1238: + YYDEBUG(1238, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'H') goto yy358; + if(yych == 'h') goto yy358; + goto yy3; + } +yy1239: + YYDEBUG(1239, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'Y'){ + if(yych <= '/'){ + if(yych == ')') goto yy132; + if(yych <= '.') goto yy3; + goto yy138; + } else { + if(yych <= 'Q'){ + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'R') goto yy1236; + if(yych <= 'X') goto yy134; + goto yy1237; + } + } } else { - if(yych <= 'E') goto yy1112; - if(yych == 'e') goto yy1112; - goto yy1047; + if(yych <= 'q'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'x'){ + if(yych <= 'r') goto yy1250; + goto yy137; + } else { + if(yych <= 'y') goto yy1251; + if(yych <= 'z') goto yy137; + goto yy3; + } + } } -yy1238: - YYDEBUG(1238, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'V') goto yy1239; - if(yych != 'v') goto yy56; - goto yy1239; -yy1239: - YYDEBUG(1239, *YYCURSOR); - yyaccept = 17; +yy1240: + YYDEBUG(1240, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'C') goto yy134; + goto yy1231; + } } else { - if(yych <= 'E') goto yy1119; - if(yych == 'e') goto yy1119; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'd') goto yy1245; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1240: - YYDEBUG(1240, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'T') goto yy1241; - if(yych != 't') goto yy56; - goto yy1241; yy1241: YYDEBUG(1241, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if(yych <= 'N'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1228; + } } else { - if(yych <= 'O') goto yy1125; - if(yych == 'o') goto yy1125; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1242; + if(yych <= 'z') goto yy137; + goto yy3; + } } yy1242: YYDEBUG(1242, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'P') goto yy1243; - if(yych != 'p') goto yy56; - goto yy1243; + yyaccept = 5; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'D'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy341; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy341; + if(yych <= 'C') goto yy135; + goto yy1229; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy341; + } else { + if(yych == 'd') goto yy1243; + if(yych <= 'z') goto yy142; + goto yy341; + } + } yy1243: YYDEBUG(1243, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'S'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'A'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + goto yy1230; + } } else { - if(yych <= 'T') goto yy1244; - if(yych != 't') goto yy1047; - goto yy1244; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych <= 'a') goto yy1244; + if(yych <= 'z') goto yy143; + goto yy3; + } } yy1244: YYDEBUG(1244, *YYCURSOR); - yyaccept = 17; + yych = *++YYCURSOR; + if(yych == 'Y') goto yy347; + if(yych == 'y') goto yy355; + goto yy144; +yy1245: + YYDEBUG(1245, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1232; + } } else { - if(yych <= 'E') goto yy1131; - if(yych == 'e') goto yy1131; - goto yy1047; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1246; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1245: - YYDEBUG(1245, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'G') goto yy1248; - if(yych == 'g') goto yy1248; - goto yy56; yy1246: YYDEBUG(1246, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'R') goto yy1247; - if(yych != 'r') goto yy56; - goto yy1247; -yy1247: - YYDEBUG(1247, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'H'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'I'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'H') goto yy3; + goto yy1233; + } } else { - if(yych <= 'I') goto yy1138; - if(yych == 'i') goto yy1138; - goto yy1047; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'i') goto yy1247; + if(yych <= 'z') goto yy143; + goto yy3; + } } +yy1247: + YYDEBUG(1247, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'G') goto yy1234; + if(yych != 'g') goto yy144; + goto yy1248; yy1248: YYDEBUG(1248, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'T'){ - if(yych == '-') goto yy1021; - goto yy1047; - } else { - if(yych <= 'U') goto yy1140; - if(yych == 'u') goto yy1140; - goto yy1047; - } + yych = *++YYCURSOR; + if(yych == 'H') goto yy1235; + if(yych != 'h') goto yy144; + goto yy1249; yy1249: YYDEBUG(1249, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Y'){ - if(yych == 'R') goto yy1250; - if(yych <= 'X') goto yy56; - goto yy1251; - } else { - if(yych <= 'r'){ - if(yych <= 'q') goto yy56; - goto yy1250; - } else { - if(yych == 'y') goto yy1251; - goto yy56; - } - } + if(yych == 'T') goto yy1183; + if(yych == 't') goto yy1215; + goto yy144; yy1250: YYDEBUG(1250, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'B'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } } else { - if(yych <= 'C') goto yy1144; - if(yych == 'c') goto yy1144; - goto yy1047; + if(yych <= '_'){ + if(yych <= 'C'){ + if(yych <= 'B') goto yy135; + goto yy1238; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'b'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'c') goto yy1252; + if(yych <= 'z') goto yy142; + goto yy3; + } + } } yy1251: YYDEBUG(1251, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= '/'){ + if(yych <= ')'){ + if(yych <= 0x1F) goto yy3; + if(yych <= '(') goto yy359; + goto yy360; + } else { + if(yych == '-') goto yy361; + if(yych <= '.') goto yy359; + goto yy138; + } + } else { + if(yych <= '^'){ + if(yych <= '9') goto yy359; + if(yych <= '@') goto yy3; + if(yych <= 'Z') goto yy135; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + if(yych <= 'z') goto yy142; + goto yy3; + } + } yy1252: YYDEBUG(1252, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 'B') goto yy1253; - if(yych != 'b') goto yy56; - goto yy1253; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy358; + } + } else { + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy457; + if(yych <= 'z') goto yy143; + goto yy3; + } + } yy1253: YYDEBUG(1253, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'Q'){ - if(yych == '-') goto yy1021; - goto yy1047; + yych = *++YYCURSOR; + if(yych <= 'W'){ + if(yych <= 'N'){ + if(yych == ')') goto yy132; + if(yych <= '@') goto yy3; + goto yy134; + } else { + if(yych <= 'O') goto yy1261; + if(yych <= 'U') goto yy134; + if(yych <= 'V') goto yy1262; + goto yy1259; + } } else { - if(yych <= 'R') goto yy1147; - if(yych == 'r') goto yy1147; - goto yy1047; + if(yych <= 'o'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + if(yych <= 'n') goto yy134; + goto yy1261; + } else { + if(yych <= 'v'){ + if(yych <= 'u') goto yy134; + goto yy1262; + } else { + if(yych <= 'w') goto yy1259; + if(yych <= 'z') goto yy134; + goto yy3; + } + } } yy1254: YYDEBUG(1254, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'N'){ - if(yych == 'L') goto yy1258; - if(yych <= 'M') goto yy56; - goto yy1257; - } else { - if(yych <= 'l'){ - if(yych <= 'k') goto yy56; + if(yych <= 'X'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; goto yy1258; + } + } else { + if(yych <= 'w'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych == 'n') goto yy1257; - goto yy56; + if(yych <= 'x') goto yy1258; + if(yych <= 'z') goto yy134; + goto yy3; } } yy1255: YYDEBUG(1255, *YYCURSOR); yych = *++YYCURSOR; - if(yych == 'N') goto yy1256; - if(yych != 'n') goto yy56; - goto yy1256; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1256; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; + } else { + if(yych <= 'n') goto yy1256; + if(yych <= 'z') goto yy134; + goto yy3; + } + } yy1256: YYDEBUG(1256, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); + yych = *++YYCURSOR; if(yych <= 'T'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1257; + } } else { - if(yych <= 'U') goto yy1154; - if(yych == 'u') goto yy1154; - goto yy1047; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy1257; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1257: YYDEBUG(1257, *YYCURSOR); - yyaccept = 17; + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'D'){ - if(yych == '-') goto yy1021; - goto yy1047; + if(yych <= 'G'){ + if(yych == ')') goto yy132; + goto yy3; } else { - if(yych <= 'E') goto yy1116; - if(yych == 'e') goto yy1116; - goto yy1047; + if(yych <= 'H') goto yy159; + if(yych == 'h') goto yy159; + goto yy3; } yy1258: YYDEBUG(1258, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if(yych <= 'X'){ - if(yych == '-') goto yy1021; - goto yy1047; + yych = *++YYCURSOR; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } } else { - if(yych <= 'Y') goto yy1116; - if(yych == 'y') goto yy1116; - goto yy1047; + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 't') goto yy317; + if(yych <= 'z') goto yy135; + goto yy3; + } } yy1259: YYDEBUG(1259, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'P'){ - if(yych == 'C') goto yy137; - if(yych <= 'O') goto yy56; - goto yy883; + ++YYCURSOR; + if((yych = *YYCURSOR) <= '@'){ + if(yych == ')') goto yy132; + goto yy1260; } else { - if(yych <= 'c'){ - if(yych <= 'b') goto yy56; - goto yy137; - } else { - if(yych == 'p') goto yy883; - goto yy56; - } + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy1260; + if(yych <= 'z') goto yy135; + goto yy1260; } yy1260: YYDEBUG(1260, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '.'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - goto yy1263; - } else { - if(yych <= '/') goto yy1264; - if(yych <= '9') goto yy1009; - goto yy1262; + +#line 861 "ext/date/lib/parse_date.re" +{ + DEBUG_OUTPUT("now"); + TIMELIB_INIT; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } +#line 14391 "ext/date/lib/parse_date.c" yy1261: YYDEBUG(1261, *YYCURSOR); - ++YYCURSOR; - if((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; - goto yy1262; + yych = *++YYCURSOR; + if(yych <= 'N'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1267; + } + } else { + if(yych <= 'm'){ + if(yych <= 'Z') goto yy135; + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'n') goto yy1267; + if(yych <= 'z') goto yy135; + goto yy3; + } + } yy1262: YYDEBUG(1262, *YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': goto yy1261; - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case '-': - case '.': goto yy790; - case 'A': case 'a': goto yy873; - case 'D': case 'd': goto yy785; - case 'F': case 'f': goto yy786; - case 'H': case 'h': goto yy73; - case 'I': goto yy793; - case 'J': case 'j': goto yy797; - case 'M': case 'm': goto yy784; - case 'N': case 'n': goto yy800; - case 'O': case 'o': goto yy799; - case 'S': case 's': goto yy783; - case 'T': case 't': goto yy78; - case 'V': goto yy795; - case 'W': case 'w': goto yy75; - case 'X': goto yy796; - case 'Y': case 'y': goto yy77; - default: goto yy56; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= '9'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '-') goto yy361; + if(yych == '/') goto yy3; + goto yy359; + } + } else { + if(yych <= 'Z'){ + if(yych <= '@') goto yy3; + if(yych != 'E') goto yy135; + goto yy1263; + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy135; + } else { + if(yych <= 'e') goto yy1263; + if(yych <= 'z') goto yy135; + goto yy3; + } + } } yy1263: YYDEBUG(1263, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy1265; - if(yych <= '1') goto yy1266; - if(yych <= '9') goto yy1267; - goto yy791; + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'L'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'M') goto yy1264; + if(yych != 'm') goto yy3; + goto yy1264; + } yy1264: YYDEBUG(1264, *YYCURSOR); yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch(yych){ - case 'A': case 'a': goto yy959; - case 'D': case 'd': goto yy963; - case 'F': case 'f': goto yy957; - case 'J': case 'j': goto yy956; - case 'M': case 'm': goto yy958; - case 'N': case 'n': goto yy962; - case 'O': case 'o': goto yy961; - case 'S': case 's': goto yy960; - default: goto yy56; - } + if(yych == 'B') goto yy1265; + if(yych != 'b') goto yy53; + goto yy1265; yy1265: YYDEBUG(1265, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy1268; - if(yych <= '/') goto yy56; - if(yych <= '9') goto yy1267; - goto yy56; + if(yych == 'E') goto yy1266; + if(yych != 'e') goto yy53; + goto yy1266; yy1266: YYDEBUG(1266, *YYCURSOR); yych = *++YYCURSOR; - if(yych == '.') goto yy1268; - if(yych <= '/') goto yy56; - if(yych >= '3') goto yy56; - goto yy1267; + if(yych == 'R') goto yy358; + if(yych == 'r') goto yy358; + goto yy53; yy1267: YYDEBUG(1267, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != '.') goto yy56; + ++YYCURSOR; + if((yych = *YYCURSOR) == ')') goto yy132; goto yy1268; yy1268: YYDEBUG(1268, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych >= ':') goto yy56; - goto yy1269; -yy1269: - YYDEBUG(1269, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy903; - if(yych <= '9') goto yy902; - goto yy903; -yy1270: - YYDEBUG(1270, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - if(yych >= '/') goto yy1264; - goto yy1271; - } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy1272; - goto yy1262; - } -yy1271: - YYDEBUG(1271, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '1'){ - if(yych <= '/') goto yy791; - if(yych <= '0') goto yy1295; - goto yy1296; - } else { - if(yych <= '5') goto yy1297; - if(yych <= '9') goto yy1298; - goto yy791; - } -yy1272: - YYDEBUG(1272, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1290; - if(yych <= '9') goto yy1291; - goto yy56; -yy1273: - YYDEBUG(1273, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == '-') goto yy1010; - if(yych <= '/') goto yy70; - if(yych >= ':') goto yy70; - goto yy1274; -yy1274: - YYDEBUG(1274, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': - case '!': - case '"': - case '#': - case '$': - case '%': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': case 'A': case 'D': case 'F': case 'H': - case 'I': - case 'J': case 'M': - case 'N': - case 'O': case 'S': - case 'T': case 'V': case 'X': - case 'Y': case 'a': case 'd': case 'f': case 'h': case 'j': case 'm': - case 'n': - case 'o': case 's': - case 't': case 'w': case 'y': goto yy1042; - case '-': goto yy1039; - case '.': goto yy1045; - case '/': goto yy1040; - case '0': goto yy1276; - case '1': goto yy1277; - case '2': goto yy1278; - case '3': goto yy1279; - case '4': - case '5': goto yy1280; - case '6': goto yy1281; - case '7': - case '8': - case '9': goto yy79; - case 'W': goto yy1062; - default: goto yy1275; - } -yy1275: - YYDEBUG(1275, *YYCURSOR); - -#line 933 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("gnunocolon"); - TIMELIB_INIT; - switch (s->time->have_time) { - case 0: - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = 0; - break; - case 1: - s->time->y = timelib_get_nr((char **) &ptr, 4); - break; - default: - TIMELIB_DEINIT; - return TIMELIB_ERROR; - } - s->time->have_time++; - TIMELIB_DEINIT; - return TIMELIB_GNU_NOCOLON; - } -#line 16397 "ext/date/lib/parse_date.c" -yy1276: - YYDEBUG(1276, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1288; - if(yych <= '9') goto yy1289; - goto yy70; -yy1277: - YYDEBUG(1277, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '2') goto yy1287; - if(yych <= '9') goto yy1286; - goto yy70; -yy1278: - YYDEBUG(1278, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1286; - goto yy70; -yy1279: - YYDEBUG(1279, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '5') goto yy1284; - if(yych <= '6') goto yy1285; - if(yych <= '9') goto yy1282; - goto yy70; -yy1280: - YYDEBUG(1280, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '9') goto yy1282; - goto yy70; -yy1281: - YYDEBUG(1281, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy70; - if(yych <= '0') goto yy1282; - if(yych <= '9') goto yy79; - goto yy70; -yy1282: - YYDEBUG(1282, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if(yybm[0+yych] & 32) { - goto yy79; - } - if(yych <= 'X'){ - if(yych <= 'G'){ - if(yych <= 'C'){ - if(yych == ' ') goto yy70; - goto yy1283; - } else { - if(yych == 'E') goto yy1283; - if(yych <= 'F') goto yy70; - goto yy1283; - } - } else { - if(yych <= 'R'){ - if(yych <= 'H') goto yy70; - if(yych == 'M') goto yy70; - goto yy1283; - } else { - if(yych <= 'T') goto yy70; - if(yych == 'W') goto yy70; - goto yy1283; - } - } - } else { - if(yych <= 'l'){ - if(yych <= 'e'){ - if(yych <= 'Y') goto yy70; - if(yych == 'd') goto yy70; - goto yy1283; - } else { - if(yych == 'g') goto yy1283; - if(yych <= 'h') goto yy70; - goto yy1283; - } - } else { - if(yych <= 'v'){ - if(yych <= 'm') goto yy70; - if(yych <= 'r') goto yy1283; - if(yych <= 't') goto yy70; - goto yy1283; - } else { - if(yych == 'x') goto yy1283; - if(yych <= 'y') goto yy70; - goto yy1283; - } - } - } -yy1283: - YYDEBUG(1283, *YYCURSOR); -#line 978 "ext/date/lib/parse_date.re" +#line 870 "ext/date/lib/parse_date.re" { - int tz_not_found; - DEBUG_OUTPUT("iso8601nocolon"); + DEBUG_OUTPUT("noon"); TIMELIB_INIT; + TIMELIB_UNHAVE_TIME(); TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; - } - TIMELIB_DEINIT; - return TIMELIB_ISO_NOCOLON; - } -#line 16495 "ext/date/lib/parse_date.c" -yy1284: - YYDEBUG(1284, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; - } -yy1285: - YYDEBUG(1285, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': goto yy1072; - case '7': - case '8': - case '9': goto yy79; - default: goto yy1283; + s->time->h = 12; + + TIMELIB_DEINIT; + return TIMELIB_RELATIVE; } -yy1286: - YYDEBUG(1286, *YYCURSOR); - yyaccept = 21; +#line 14478 "ext/date/lib/parse_date.c" +yy1269: + YYDEBUG(1269, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'W'){ + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy3; + } + } else { + if(yych <= 'O'){ + if(yych <= 'N') goto yy134; + goto yy1261; + } else { + if(yych <= 'U') goto yy134; + if(yych <= 'V') goto yy1262; + goto yy1259; + } + } + } else { + if(yych <= 'n'){ + if(yych <= '^'){ + if(yych <= 'Z') goto yy134; + goto yy3; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy3; + goto yy137; + } + } else { + if(yych <= 'v'){ + if(yych <= 'o') goto yy1276; + if(yych <= 'u') goto yy137; + goto yy1277; + } else { + if(yych <= 'w') goto yy1275; + if(yych <= 'z') goto yy137; + goto yy3; + } + } } -yy1287: - YYDEBUG(1287, *YYCURSOR); - yyaccept = 21; +yy1270: + YYDEBUG(1270, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy1076; - case '1': - case '2': goto yy1077; - case '3': goto yy1078; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'X'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'W') goto yy134; + goto yy1258; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'x') goto yy1274; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1288: - YYDEBUG(1288, *YYCURSOR); - yyaccept = 21; +yy1271: + YYDEBUG(1271, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy79; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy134; + goto yy1256; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1272; + if(yych <= 'z') goto yy137; + goto yy3; + } } -yy1289: - YYDEBUG(1289, *YYCURSOR); - yyaccept = 21; +yy1272: + YYDEBUG(1272, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch(yych){ - case ' ': case 'D': case 'F': case 'H': case 'M': case 'S': - case 'T': case 'W': case 'Y': case 'd': case 'f': case 'h': case 'm': case 's': - case 't': case 'w': case 'y': goto yy70; - case '0': goto yy1076; - case '1': - case '2': goto yy1077; - case '3': goto yy1078; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1072; - default: goto yy1283; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1257; + } + } else { + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy1273; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1290: - YYDEBUG(1290, *YYCURSOR); - yyaccept = 11; +yy1273: + YYDEBUG(1273, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1292; - goto yy808; + if(yych <= 'H'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'G') goto yy3; + goto yy159; + } } else { - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'h') goto yy241; + if(yych <= 'z') goto yy143; + goto yy3; + } } -yy1291: - YYDEBUG(1291, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy1292; - if(yych != ':') goto yy808; - goto yy1292; -yy1292: - YYDEBUG(1292, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1293; - if(yych <= '6') goto yy1294; - if(yych <= '9') goto yy813; - goto yy56; -yy1293: - YYDEBUG(1293, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy813; - goto yy808; -yy1294: - YYDEBUG(1294, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych == '0') goto yy813; - goto yy808; -yy1295: - YYDEBUG(1295, *YYCURSOR); - yyaccept = 11; +yy1274: + YYDEBUG(1274, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy317; + } } else { - if(yych <= '9') goto yy1298; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 't') goto yy320; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1296: - YYDEBUG(1296, *YYCURSOR); - yyaccept = 11; +yy1275: + YYDEBUG(1275, *YYCURSOR); + yyaccept = 24; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= '@'){ + if(yych <= ')'){ + if(yych <= '(') goto yy1260; + goto yy132; + } else { + if(yych == '/') goto yy138; + goto yy1260; + } } else { - if(yych <= '2') goto yy1298; - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '_'){ + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy1260; + goto yy138; + } else { + if(yych <= '`') goto yy1260; + if(yych <= 'z') goto yy142; + goto yy1260; + } } -yy1297: - YYDEBUG(1297, *YYCURSOR); - yyaccept = 11; +yy1276: + YYDEBUG(1276, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy1299; - goto yy808; + if(yych <= 'N'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'M') goto yy135; + goto yy1267; + } } else { - if(yych <= '9') goto yy1291; - if(yych <= ':') goto yy1292; - goto yy808; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'n') goto yy1282; + if(yych <= 'z') goto yy142; + goto yy3; + } } -yy1298: - YYDEBUG(1298, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy1299; - if(yych == ':') goto yy1292; - goto yy808; -yy1299: - YYDEBUG(1299, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '/') goto yy56; - if(yych <= '5') goto yy1300; - if(yych <= '6') goto yy1301; - if(yych <= '9') goto yy901; - goto yy56; -yy1300: - YYDEBUG(1300, *YYCURSOR); - yyaccept = 11; +yy1277: + YYDEBUG(1277, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy1302; - goto yy808; -yy1301: - YYDEBUG(1301, *YYCURSOR); - yyaccept = 11; + if(yych <= '@'){ + if(yych <= ','){ + if(yych <= 0x1F) goto yy3; + if(yych == ')') goto yy360; + goto yy359; + } else { + if(yych <= '.'){ + if(yych <= '-') goto yy361; + goto yy359; + } else { + if(yych <= '/') goto yy138; + if(yych <= '9') goto yy359; + goto yy3; + } + } + } else { + if(yych <= '_'){ + if(yych <= 'E'){ + if(yych <= 'D') goto yy135; + goto yy1263; + } else { + if(yych <= 'Z') goto yy135; + if(yych <= '^') goto yy3; + goto yy138; + } + } else { + if(yych <= 'd'){ + if(yych <= '`') goto yy3; + goto yy142; + } else { + if(yych <= 'e') goto yy1278; + if(yych <= 'z') goto yy142; + goto yy3; + } + } + } +yy1278: + YYDEBUG(1278, *YYCURSOR); + yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych <= '/'){ - if(yych == '.') goto yy814; - goto yy808; + if(yych <= 'M'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'L') goto yy3; + goto yy1264; + } } else { - if(yych <= '0') goto yy1302; - if(yych <= '9') goto yy902; - goto yy808; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; + } else { + if(yych == 'm') goto yy1279; + if(yych <= 'z') goto yy143; + goto yy3; + } } -yy1302: - YYDEBUG(1302, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if(yych == '.') goto yy814; - if(yych <= '/') goto yy808; - if(yych <= '9') goto yy904; - goto yy808; -yy1303: - YYDEBUG(1303, *YYCURSOR); +yy1279: + YYDEBUG(1279, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '/'){ - if(yych <= ',') goto yy782; - if(yych <= '-') goto yy789; - if(yych <= '.') goto yy792; - goto yy788; + if(yych == 'B') goto yy1265; + if(yych != 'b') goto yy144; + goto yy1280; +yy1280: + YYDEBUG(1280, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'E') goto yy1266; + if(yych != 'e') goto yy144; + goto yy1281; +yy1281: + YYDEBUG(1281, *YYCURSOR); + yych = *++YYCURSOR; + if(yych <= '^'){ + if(yych <= '/'){ + if(yych <= '.') goto yy53; + goto yy138; + } else { + if(yych == 'R') goto yy358; + goto yy53; + } } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy801; - goto yy782; + if(yych <= 'q'){ + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy53; + goto yy143; + } else { + if(yych <= 'r') goto yy457; + if(yych <= 'z') goto yy143; + goto yy53; + } } -yy1304: - YYDEBUG(1304, *YYCURSOR); - yych = *++YYCURSOR; +yy1282: + YYDEBUG(1282, *YYCURSOR); + yyaccept = 25; + yych = *(YYMARKER = ++YYCURSOR); if(yych <= '/'){ - if(yych <= ',') goto yy1262; - if(yych <= '-') goto yy789; - if(yych <= '.') goto yy1271; - goto yy788; - } else { - if(yych <= '5') goto yy1273; - if(yych <= '9') goto yy1009; - if(yych <= ':') goto yy1272; - goto yy1262; - } -yy1305: - YYDEBUG(1305, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '0') goto yy56; - if(yych >= ':') goto yy56; - goto yy1306; -yy1306: - YYDEBUG(1306, *YYCURSOR); - ++YYCURSOR; - if(YYLIMIT == YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - goto yy1307; -yy1307: - YYDEBUG(1307, *YYCURSOR); - if(yych <= '/') goto yy1308; - if(yych <= '9') goto yy1306; - goto yy1308; -yy1308: - YYDEBUG(1308, *YYCURSOR); - -#line 868 "ext/date/lib/parse_date.re" -{ - timelib_ull i; - - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_DATE(); - TIMELIB_UNHAVE_TIME(); - - i = timelib_get_unsigned_nr((char **) &ptr, 24); - s->time->y = 1970; - s->time->m = 1; - s->time->d = 1; - s->time->h = s->time->i = s->time->s = 0; - s->time->f = 0.0; - s->time->relative.s += i; - s->time->is_localtime = 1; - s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; - s->time->z = 0; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych == ')') goto yy132; + if(yych <= '.') goto yy1268; + goto yy138; + } else { + if(yych <= '_'){ + if(yych <= '^') goto yy1268; + goto yy138; + } else { + if(yych <= '`') goto yy1268; + if(yych <= 'z') goto yy143; + goto yy1268; + } } -#line 16759 "ext/date/lib/parse_date.c" -yy1309: - YYDEBUG(1309, *YYCURSOR); +yy1283: + YYDEBUG(1283, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= '`'){ + if(yych <= 'S'){ if(yych <= ')'){ if(yych <= '(') goto yy3; - goto yy49; + goto yy132; } else { if(yych <= '@') goto yy3; - if(yych <= 'Z') goto yy51; - goto yy3; + if(yych <= 'R') goto yy134; + goto yy1284; } } else { - if(yych <= 'l'){ - if(yych != 'd') goto yy51; - goto yy1310; + if(yych <= 'r'){ + if(yych <= 'Z') goto yy134; + if(yych <= '`') goto yy3; + goto yy134; } else { - if(yych <= 'm') goto yy1311; - if(yych <= 'z') goto yy51; + if(yych <= 's') goto yy1284; + if(yych <= 'z') goto yy134; goto yy3; } } -yy1310: - YYDEBUG(1310, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= '`') goto yy3; - if(yych <= 'a') goto yy1318; - if(yych <= 'z') goto yy52; - goto yy3; - } -yy1311: - YYDEBUG(1311, *YYCURSOR); +yy1284: + YYDEBUG(1284, *YYCURSOR); yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; + if(yych <= 'T'){ + if(yych <= ')'){ + if(yych <= '(') goto yy3; + goto yy132; + } else { + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1285; + } } else { - if(yych <= 'n'){ + if(yych <= 's'){ + if(yych <= 'Z') goto yy135; if(yych <= '`') goto yy3; - goto yy52; + goto yy135; } else { - if(yych <= 'o') goto yy1312; - if(yych <= 'z') goto yy52; + if(yych <= 't') goto yy1285; + if(yych <= 'z') goto yy135; goto yy3; } } -yy1312: - YYDEBUG(1312, *YYCURSOR); +yy1285: + YYDEBUG(1285, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'r') goto yy3; - goto yy1313; -yy1313: - YYDEBUG(1313, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'r') goto yy56; - goto yy1314; -yy1314: - YYDEBUG(1314, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'o') goto yy56; - goto yy1315; -yy1315: - YYDEBUG(1315, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'w') goto yy56; - goto yy1316; -yy1316: - YYDEBUG(1316, *YYCURSOR); - ++YYCURSOR; - goto yy1317; -yy1317: - YYDEBUG(1317, *YYCURSOR); - -#line 856 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("tomorrow"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = 1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych <= 'D'){ + if(yych == ')') goto yy132; + goto yy3; + } else { + if(yych <= 'E') goto yy1286; + if(yych != 'e') goto yy3; + goto yy1286; } -#line 16834 "ext/date/lib/parse_date.c" -yy1318: - YYDEBUG(1318, *YYCURSOR); +yy1286: + YYDEBUG(1286, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy1287; + if(yych != 'r') goto yy53; + goto yy1287; +yy1287: + YYDEBUG(1287, *YYCURSOR); yych = *++YYCURSOR; - if(yych == ')') goto yy49; - if(yych != 'y') goto yy3; - goto yy1319; -yy1319: - YYDEBUG(1319, *YYCURSOR); + if(yych == 'D') goto yy1288; + if(yych != 'd') goto yy53; + goto yy1288; +yy1288: + YYDEBUG(1288, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy1289; + if(yych != 'a') goto yy53; + goto yy1289; +yy1289: + YYDEBUG(1289, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy1290; + if(yych != 'y') goto yy53; + goto yy1290; +yy1290: + YYDEBUG(1290, *YYCURSOR); ++YYCURSOR; - goto yy1320; -yy1320: - YYDEBUG(1320, *YYCURSOR); + goto yy1291; +yy1291: + YYDEBUG(1291, *YYCURSOR); -#line 846 "ext/date/lib/parse_date.re" +#line 849 "ext/date/lib/parse_date.re" { - DEBUG_OUTPUT("midnight | today"); + DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); TIMELIB_UNHAVE_TIME(); + s->time->relative.d = -1; TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16851 "ext/date/lib/parse_date.c" -yy1321: - YYDEBUG(1321, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'c'){ - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 'd') goto yy1322; - if(yych <= 'z') goto yy51; +#line 14864 "ext/date/lib/parse_date.c" +yy1292: + YYDEBUG(1292, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'S'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'R') goto yy134; + goto yy1284; } - } -yy1322: - YYDEBUG(1322, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; } else { - if(yych <= 'm'){ - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych <= 'Z') goto yy134; + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 'n') goto yy1323; - if(yych <= 'z') goto yy52; + if(yych == 's') goto yy1293; + if(yych <= 'z') goto yy137; goto yy3; } } -yy1323: - YYDEBUG(1323, *YYCURSOR); +yy1293: + YYDEBUG(1293, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'i') goto yy3; - goto yy1324; -yy1324: - YYDEBUG(1324, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'g') goto yy56; - goto yy1325; -yy1325: - YYDEBUG(1325, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'h') goto yy56; - goto yy1326; -yy1326: - YYDEBUG(1326, *YYCURSOR); - yych = *++YYCURSOR; - if(yych == 't') goto yy1319; - goto yy56; -yy1327: - YYDEBUG(1327, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= '`'){ - if(yych <= '@'){ - if(yych == ')') goto yy49; + if(yych <= 'T'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; } else { - if(yych == 'V') goto yy618; - if(yych <= 'Z') goto yy51; - goto yy3; + if(yych <= '/') goto yy138; + if(yych <= '@') goto yy3; + if(yych <= 'S') goto yy135; + goto yy1285; } } else { - if(yych <= 'u'){ - if(yych == 'o') goto yy1330; - goto yy51; - } else { - if(yych <= 'v') goto yy618; - if(yych <= 'w') goto yy1328; - if(yych <= 'z') goto yy51; + if(yych <= '`'){ + if(yych <= 'Z') goto yy135; + if(yych == '_') goto yy138; goto yy3; - } - } -yy1328: - YYDEBUG(1328, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) <= '@'){ - if(yych == ')') goto yy49; - goto yy1329; - } else { - if(yych <= 'Z') goto yy52; - if(yych <= '`') goto yy1329; - if(yych <= 'z') goto yy52; - goto yy1329; - } -yy1329: - YYDEBUG(1329, *YYCURSOR); - -#line 825 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("now"); - TIMELIB_INIT; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 16936 "ext/date/lib/parse_date.c" -yy1330: - YYDEBUG(1330, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; - } else { - if(yych <= 'm'){ - if(yych <= '`') goto yy3; - goto yy52; } else { - if(yych <= 'n') goto yy1331; - if(yych <= 'z') goto yy52; + if(yych == 't') goto yy1294; + if(yych <= 'z') goto yy142; goto yy3; } } -yy1331: - YYDEBUG(1331, *YYCURSOR); - ++YYCURSOR; - if((yych = *YYCURSOR) == ')') goto yy49; - goto yy1332; -yy1332: - YYDEBUG(1332, *YYCURSOR); - -#line 834 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("noon"); - TIMELIB_INIT; - TIMELIB_UNHAVE_TIME(); - TIMELIB_HAVE_TIME(); - s->time->h = 12; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 16967 "ext/date/lib/parse_date.c" -yy1333: - YYDEBUG(1333, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy51; - } else { - if(yych <= 'r'){ - if(yych <= '`') goto yy3; - goto yy51; - } else { - if(yych <= 's') goto yy1334; - if(yych <= 'z') goto yy51; +yy1294: + YYDEBUG(1294, *YYCURSOR); + yyaccept = 1; + yych = *(YYMARKER = ++YYCURSOR); + if(yych <= 'E'){ + if(yych <= '.'){ + if(yych == ')') goto yy132; goto yy3; + } else { + if(yych <= '/') goto yy138; + if(yych <= 'D') goto yy3; + goto yy1286; } - } -yy1334: - YYDEBUG(1334, *YYCURSOR); - yych = *++YYCURSOR; - if(yych <= 'Z'){ - if(yych == ')') goto yy49; - if(yych <= '@') goto yy3; - goto yy52; } else { - if(yych <= 's'){ - if(yych <= '`') goto yy3; - goto yy52; + if(yych <= '`'){ + if(yych == '_') goto yy138; + goto yy3; } else { - if(yych <= 't') goto yy1335; - if(yych <= 'z') goto yy52; + if(yych == 'e') goto yy1295; + if(yych <= 'z') goto yy143; goto yy3; } } -yy1335: - YYDEBUG(1335, *YYCURSOR); - yyaccept = 1; +yy1295: + YYDEBUG(1295, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'R') goto yy1287; + if(yych != 'r') goto yy144; + goto yy1296; +yy1296: + YYDEBUG(1296, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'D') goto yy1288; + if(yych != 'd') goto yy144; + goto yy1297; +yy1297: + YYDEBUG(1297, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'A') goto yy1289; + if(yych != 'a') goto yy144; + goto yy1298; +yy1298: + YYDEBUG(1298, *YYCURSOR); + yych = *++YYCURSOR; + if(yych == 'Y') goto yy1290; + if(yych != 'y') goto yy144; + goto yy1299; +yy1299: + YYDEBUG(1299, *YYCURSOR); + yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); - if(yych == ')') goto yy49; - if(yych != 'e') goto yy3; - goto yy1336; -yy1336: - YYDEBUG(1336, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'r') goto yy56; - goto yy1337; -yy1337: - YYDEBUG(1337, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'd') goto yy56; - goto yy1338; -yy1338: - YYDEBUG(1338, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'a') goto yy56; - goto yy1339; -yy1339: - YYDEBUG(1339, *YYCURSOR); - yych = *++YYCURSOR; - if(yych != 'y') goto yy56; - goto yy1340; -yy1340: - YYDEBUG(1340, *YYCURSOR); - ++YYCURSOR; - goto yy1341; -yy1341: - YYDEBUG(1341, *YYCURSOR); - -#line 813 "ext/date/lib/parse_date.re" -{ - DEBUG_OUTPUT("yesterday"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = -1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; + if(yych <= '^'){ + if(yych == '/') goto yy138; + goto yy1291; + } else { + if(yych <= '_') goto yy138; + if(yych <= '`') goto yy1291; + if(yych <= 'z') goto yy143; + goto yy1291; } -#line 17029 "ext/date/lib/parse_date.c" } } -#line 1377 "ext/date/lib/parse_date.re" +#line 1410 "ext/date/lib/parse_date.re" } #define YYMAXFILL 26 -timelib_time* timelib_strtotime(char *s, int *errors, timelib_tzdb *tzdb) +timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; int t; + char *e = s + len - 1; + + while (isspace(*s) && s < e) { + s++; + } + while (isspace(*e) && e > s) { + e--; + } + if (e - s < 1) { + *errors = 1; + in.time = timelib_time_ctor(); + in.time->y = in.time->d = in.time->m = in.time->h = in.time->i = in.time->s = in.time->f = in.time->z = in.time->dst = -1; + in.time->is_localtime = in.time->zone_type = 0; + return in.time; + } + e++; memset(&in, 0, sizeof(in)); - in.str = malloc(strlen(s) + YYMAXFILL); - memset(in.str, 0, strlen(s) + YYMAXFILL); - memcpy(in.str, s, strlen(s)); - in.lim = in.str + strlen(s) + YYMAXFILL; + in.str = malloc((e - s) + YYMAXFILL); + memset(in.str, 0, (e - s) + YYMAXFILL); + memcpy(in.str, s, (e - s)); + in.lim = in.str + (e - s) + YYMAXFILL; in.cur = in.str; in.time = timelib_time_ctor(); in.time->y = -1; diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index cce0144d9..fd058a5eb 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,11 +16,12 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.re,v 1.26.2.9 2005/11/17 13:04:29 derick Exp $ */ +/* $Id: parse_date.re,v 1.26.2.21 2006/01/04 21:31:34 derick Exp $ */ #include "timelib.h" #include +#include #ifdef HAVE_STDLIB_H #include @@ -170,6 +171,10 @@ static timelib_tz_lookup_table timelib_timezone_fallbackmap[] = { { NULL, 0, 0, NULL }, }; +static timelib_tz_lookup_table timelib_timezone_utc[] = { + { "utc", 0, 0, "UTC" }, +}; + static timelib_relunit const timelib_relunit_lookup[] = { { "sec", TIMELIB_SECOND, 1 }, { "secs", TIMELIB_SECOND, 1 }, @@ -195,12 +200,19 @@ static timelib_relunit const timelib_relunit_lookup[] = { { "years", TIMELIB_YEAR, 1 }, { "monday", TIMELIB_WEEKDAY, 1 }, + { "mon", TIMELIB_WEEKDAY, 1 }, { "tuesday", TIMELIB_WEEKDAY, 2 }, + { "tue", TIMELIB_WEEKDAY, 2 }, { "wednesday", TIMELIB_WEEKDAY, 3 }, + { "wed", TIMELIB_WEEKDAY, 3 }, { "thursday", TIMELIB_WEEKDAY, 4 }, + { "thu", TIMELIB_WEEKDAY, 4 }, { "friday", TIMELIB_WEEKDAY, 5 }, + { "fri", TIMELIB_WEEKDAY, 5 }, { "saturday", TIMELIB_WEEKDAY, 6 }, + { "sat", TIMELIB_WEEKDAY, 6 }, { "sunday", TIMELIB_WEEKDAY, 0 }, + { "sun", TIMELIB_WEEKDAY, 0 }, { NULL, 0, 0 } }; @@ -369,6 +381,16 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) return tmp_nr; } +static void timelib_skip_day_suffix(char **ptr) +{ + if (isspace(**ptr)) { + return; + } + if (!strncasecmp(*ptr, "nd", 2) || !strncasecmp(*ptr, "rd", 2) ||!strncasecmp(*ptr, "st", 2) || !strncasecmp(*ptr, "th", 2)) { + *ptr += 2; + } +} + static double timelib_get_frac_nr(char **ptr, int max_length) { char *begin, *end, *str; @@ -429,11 +451,18 @@ static long timelib_parse_tz_cor(char **ptr) break; case 3: case 4: - tmp = strtol(begin, NULL, 10); - return HOUR(tmp / 100) + tmp % 100; + if (begin[1] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10); + return tmp; + } else if (begin[2] == ':') { + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); + return tmp; + } else { + tmp = strtol(begin, NULL, 10); + return HOUR(tmp / 100) + tmp % 100; + } case 5: - tmp = HOUR(strtol(begin, NULL, 10)) + - strtol(begin + 3, NULL, 10); + tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); return tmp; } return 0; @@ -563,6 +592,10 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in int first_found = 0; timelib_tz_lookup_table *tp, *first_found_elem; timelib_tz_lookup_table *fmp; + + if (strcasecmp("utc", word) == 0 || strcasecmp("gmt", word) == 0) { + return timelib_timezone_utc; + } for (tp = timelib_timezone_lookup; tp->name; tp++) { if (strcasecmp(word, tp->name) == 0) { @@ -581,6 +614,7 @@ static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, in if (first_found) { return first_found_elem; } + /* Still didn't find anything, let's find the zone solely based on * offset/isdst then */ for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) { @@ -716,10 +750,12 @@ second = minute | "60"; secondlz = minutelz | "60"; meridian = [AaPp] "."? [Mm] "."?; tz = "("? [A-Za-z]{1,4} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+; -tzcorrection = [+-] hour24 ":"? minutelz?; +tzcorrection = [+-] hour24 ":"? minute?; + +daysuf = "st" | "nd" | "rd" | "th"; month = "0"? [0-9] | "1"[0-2]; -day = [0-2]?[0-9] | "3"[01]; +day = ([0-2]?[0-9] | "3"[01]) daysuf?; year = [0-9]{1,4}; year2 = [0-9]{2}; year4 = [0-9]{4}; @@ -774,10 +810,10 @@ datenoyearrev = day ([ -.])* monthtext; datenocolon = year4 monthlz daylz; /* Special formats */ -soap = year4 "-" monthlz "-" daylz "T" hour24lz ":" minutelz ":" secondlz frac tzcorrection; +soap = year4 "-" monthlz "-" daylz "T" hour24lz ":" minutelz ":" secondlz frac tzcorrection?; xmlrpc = year4 monthlz daylz "T" hour24 ":" minutelz ":" secondlz; xmlrpcnocolon = year4 monthlz daylz 't' hour24 minutelz secondlz; -wddx = year4 "-" monthlz "-" daylz "T" hour24 ":" minutelz ":" secondlz; +wddx = year4 "-" month "-" day "T" hour24 ":" minute ":" second; pgydotd = year4 "."? dayofyear; pgtextshort = monthabbr "-" daylz "-" year; pgtextreverse = year "-" monthabbr "-" daylz; @@ -799,17 +835,17 @@ dateshortwithtimelongtz = datenoyear iso8601normtz; * Relative regexps */ reltextnumber = 'first'|'next'|'second'|'third'|'fourth'|'fifth'|'sixth'|'seventh'|'eight'|'ninth'|'tenth'|'eleventh'|'twelfth'|'last'|'previous'|'this'; -reltextunit = (('sec'|'second'|'min'|'minute'|'hour'|'day'|'week'|'fortnight'|'forthnight'|'month'|'year') 's'?) | dayfull; +reltextunit = (('sec'|'second'|'min'|'minute'|'hour'|'day'|'week'|'fortnight'|'forthnight'|'month'|'year') 's'?) | daytext; -relnumber = ([+-]?[0-9]+); -relative = (relnumber space? reltextunit)+; -relativetext = (reltextnumber space? reltextunit)+; +relnumber = ([+-]?[ ]*[0-9]+); +relative = relnumber space? reltextunit; +relativetext = reltextnumber space? reltextunit; */ /*!re2c /* so that vim highlights correctly */ - "yesterday" + 'yesterday' { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -821,7 +857,7 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_RELATIVE; } - "now" + 'now' { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -830,7 +866,7 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_RELATIVE; } - "noon" + 'noon' { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -842,7 +878,7 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_RELATIVE; } - "midnight" | "today" + 'midnight' | 'today' { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -852,7 +888,7 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_RELATIVE; } - "tomorrow" + 'tomorrow' { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -1038,6 +1074,7 @@ relativetext = (reltextnumber space? reltextunit)+; TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); s->time->m = timelib_get_month((char **) &ptr); s->time->y = timelib_get_nr((char **) &ptr, 4); TIMELIB_PROCESS_YEAR(s->time->y); @@ -1103,6 +1140,7 @@ relativetext = (reltextnumber space? reltextunit)+; TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); + timelib_skip_day_suffix((char **) &ptr); s->time->m = timelib_get_month((char **) &ptr); TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; @@ -1135,8 +1173,10 @@ relativetext = (reltextnumber space? reltextunit)+; s->time->s = timelib_get_nr((char **) &ptr, 2); if (*ptr == '.') { s->time->f = timelib_get_frac_nr((char **) &ptr, 9); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - s->errors += tz_not_found; + if (*ptr) { /* timezone is optional */ + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->errors += tz_not_found; + } } TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; @@ -1262,6 +1302,22 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_AGO; } + daytext + { + const timelib_relunit* relunit; + DEBUG_OUTPUT("daytext"); + TIMELIB_INIT; + TIMELIB_HAVE_RELATIVE(); + TIMELIB_HAVE_WEEKDAY_RELATIVE(); + TIMELIB_UNHAVE_TIME(); + relunit = timelib_lookup_relunit((char**) &ptr); + s->time->relative.weekday = relunit->multiplier; + s->time->relative.weekday_behavior = 1; + + TIMELIB_DEINIT; + return TIMELIB_WEEKDAY; + } + relativetext { timelib_sll i; @@ -1279,29 +1335,6 @@ relativetext = (reltextnumber space? reltextunit)+; return TIMELIB_RELATIVE; } - dayfull - { - const timelib_relunit* relunit; - DEBUG_OUTPUT("dayfull"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - relunit = timelib_lookup_relunit((char**) &ptr); - s->time->relative.weekday = relunit->multiplier; - s->time->relative.weekday_behavior = 1; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } - - dayabbr - { - DEBUG_OUTPUT("dayabbr"); - goto std; - } - tzcorrection | tz { int tz_not_found; @@ -1379,16 +1412,32 @@ relativetext = (reltextnumber space? reltextunit)+; /*!max:re2c */ -timelib_time* timelib_strtotime(char *s, int *errors, timelib_tzdb *tzdb) +timelib_time* timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb) { Scanner in; int t; + char *e = s + len - 1; + + while (isspace(*s) && s < e) { + s++; + } + while (isspace(*e) && e > s) { + e--; + } + if (e - s < 1) { + *errors = 1; + in.time = timelib_time_ctor(); + in.time->y = in.time->d = in.time->m = in.time->h = in.time->i = in.time->s = in.time->f = in.time->z = in.time->dst = -1; + in.time->is_localtime = in.time->zone_type = 0; + return in.time; + } + e++; memset(&in, 0, sizeof(in)); - in.str = malloc(strlen(s) + YYMAXFILL); - memset(in.str, 0, strlen(s) + YYMAXFILL); - memcpy(in.str, s, strlen(s)); - in.lim = in.str + strlen(s) + YYMAXFILL; + in.str = malloc((e - s) + YYMAXFILL); + memset(in.str, 0, (e - s) + YYMAXFILL); + memcpy(in.str, s, (e - s)); + in.lim = in.str + (e - s) + YYMAXFILL; in.cur = in.str; in.time = timelib_time_ctor(); in.time->y = -1; diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c index 61b07f042..3a23e30ef 100644 --- a/ext/date/lib/parse_tz.c +++ b/ext/date/lib/parse_tz.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_tz.c,v 1.20.2.2 2005/10/03 11:17:24 derick Exp $ */ +/* $Id: parse_tz.c,v 1.20.2.5 2006/01/04 21:31:34 derick Exp $ */ #include "timelib.h" @@ -238,6 +238,12 @@ timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count) return timezonedb_idx_builtin; } +int timelib_timezone_id_is_valid(char *timezone, timelib_tzdb *tzdb) +{ + char *tzf; + return (seek_to_tz_position((char**) &tzf, timezone, tzdb)); +} + timelib_tzinfo *timelib_parse_tzfile(char *timezone, timelib_tzdb *tzdb) { char *tzf; @@ -358,3 +364,21 @@ timelib_time_offset *timelib_get_time_zone_info(timelib_sll ts, timelib_tzinfo * return tmp; } + +timelib_sll timelib_get_current_offset(timelib_time *t) +{ + timelib_time_offset *gmt_offset; + + switch (t->zone_type) { + case TIMELIB_ZONETYPE_ABBR: + case TIMELIB_ZONETYPE_OFFSET: + return t->z * 60; + + case TIMELIB_ZONETYPE_ID: + gmt_offset = timelib_get_time_zone_info(t->sse, t->tz_info); + return gmt_offset->offset; + + default: + return 0; + } +} diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c index 7129aa788..dabc809ec 100644 --- a/ext/date/lib/timelib.c +++ b/ext/date/lib/timelib.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,10 +16,11 @@ +----------------------------------------------------------------------+ */ -/* $Id: timelib.c,v 1.7.2.1 2005/10/19 21:08:32 derick Exp $ */ +/* $Id: timelib.c,v 1.7.2.3 2006/01/01 12:50:05 sniper Exp $ */ #include "timelib.h" #include +#include #define TIMELIB_TIME_FREE(m) \ if (m) { \ @@ -139,6 +140,13 @@ signed long timelib_date_to_int(timelib_time *d, int *error) return (signed long) d->sse; } +void timelib_decimal_hour_to_hms(double h, int *hour, int *min, int *sec) +{ + *hour = floor(h); + *min = floor((h - *hour) * 60); + *sec = (h - *hour - ((float) *min / 60)) * 3600; +} + void timelib_dump_date(timelib_time *d, int options) { if ((options & 2) == 2) { diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index bffb8d7b5..722420717 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: timelib.h,v 1.10.2.4 2005/10/03 11:17:24 derick Exp $ */ +/* $Id: timelib.h,v 1.10.2.10 2006/01/04 21:31:34 derick Exp $ */ #ifndef __TIMELIB_H__ #define __TIMELIB_H__ @@ -38,6 +38,10 @@ #define strcasecmp stricmp #endif +#if defined(_MSC_VER) && !defined(strncasecmp) +#define strncasecmp strnicmp +#endif + /* From dow.c */ timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); @@ -47,7 +51,7 @@ timelib_sll timelib_days_in_month(timelib_sll y, timelib_sll m); void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iw, timelib_sll *iy); /* From parse_date.re */ -timelib_time *timelib_strtotime(char *s, int *errors, timelib_tzdb *tzdb); +timelib_time *timelib_strtotime(char *s, int len, int *errors, timelib_tzdb *tzdb); void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options); char *timelib_timezone_id_from_abbr(const char *abbr, long gmtoffset, int isdst); timelib_tz_lookup_table *timelib_timezone_abbreviations_list(void); @@ -58,14 +62,16 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi); /* From unixtime2tm.c */ int timelib_apply_localtime(timelib_time *t, unsigned int localtime); void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts); -void timelib_unixtime2local(timelib_time *tm, timelib_sll ts, timelib_tzinfo* tz); +void timelib_unixtime2local(timelib_time *tm, timelib_sll ts); void timelib_update_from_sse(timelib_time *tm); void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz); /* From parse_tz.c */ +int timelib_timezone_id_is_valid(char *timezone, timelib_tzdb *tzdb); timelib_tzinfo *timelib_parse_tzfile(char *timezone, timelib_tzdb *tzdb); int timelib_timestamp_is_in_dst(timelib_sll ts, timelib_tzinfo *tz); timelib_time_offset *timelib_get_time_zone_info(timelib_sll ts, timelib_tzinfo *tz); +timelib_sll timelib_get_current_offset(timelib_time *t); void timelib_dump_tzinfo(timelib_tzinfo *tz); timelib_tzdb *timelib_builtin_db(void); timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count); @@ -87,4 +93,10 @@ void timelib_time_offset_dtor(timelib_time_offset* t); signed long timelib_date_to_int(timelib_time *d, int *error); void timelib_dump_date(timelib_time *d, int options); +void timelib_decimal_hour_to_hms(double h, int *hour, int *min, int *sec); + +/* from astro.c */ +double timelib_ts_to_juliandate(timelib_sll ts); +int timelib_astro_rise_set_altitude(timelib_time *time, double lon, double lat, double altit, int upper_limb, double *h_rise, double *h_set, timelib_sll *ts_rise, timelib_sll *ts_set, timelib_sll *ts_transit); + #endif diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h index 7f9436820..90df015a9 100644 --- a/ext/date/lib/timelib_structs.h +++ b/ext/date/lib/timelib_structs.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: timelib_structs.h,v 1.13.2.4 2005/10/19 21:08:32 derick Exp $ */ +/* $Id: timelib_structs.h,v 1.13.2.5 2006/01/01 12:50:05 sniper Exp $ */ #ifndef __TIMELIB_STRUCTS_H__ #define __TIMELIB_STRUCTS_H__ diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index c87838209..e85fbe70f 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -115,428 +115,428 @@ timelib_tzdb_index_entry timezonedb_idx_builtin[535] = { { "America/Guyana" , 0x008500 }, { "America/Halifax" , 0x008575 }, { "America/Havana" , 0x008A51 }, - { "America/Hermosillo" , 0x008DC2 }, - { "America/Indiana/Indianapolis" , 0x008E75 }, - { "America/Indiana/Knox" , 0x0090D3 }, - { "America/Indiana/Marengo" , 0x009444 }, - { "America/Indiana/Vevay" , 0x009914 }, - { "America/Indianapolis" , 0x0096B6 }, - { "America/Inuvik" , 0x009B18 }, - { "America/Iqaluit" , 0x009E0F }, - { "America/Jamaica" , 0x00A101 }, - { "America/Jujuy" , 0x00A1BA }, - { "America/Juneau" , 0x00A34E }, - { "America/Kentucky/Louisville" , 0x00A6A2 }, - { "America/Kentucky/Monticello" , 0x00AA8B }, - { "America/Knox_IN" , 0x00ADDE }, - { "America/La_Paz" , 0x00B14F }, - { "America/Lima" , 0x00B1AA }, - { "America/Los_Angeles" , 0x00B246 }, - { "America/Louisville" , 0x00B63F }, - { "America/Maceio" , 0x00BA28 }, - { "America/Managua" , 0x00BB46 }, - { "America/Manaus" , 0x00BBE3 }, - { "America/Martinique" , 0x00BCCF }, - { "America/Mazatlan" , 0x00BD2F }, - { "America/Mendoza" , 0x00BF68 }, - { "America/Menominee" , 0x00C106 }, - { "America/Merida" , 0x00C434 }, - { "America/Mexico_City" , 0x00C643 }, - { "America/Miquelon" , 0x00C895 }, - { "America/Monterrey" , 0x00CAFB }, - { "America/Montevideo" , 0x00CCFE }, - { "America/Montreal" , 0x00CEC4 }, - { "America/Montserrat" , 0x00D3A8 }, - { "America/Nassau" , 0x00D3F1 }, - { "America/New_York" , 0x00D72A }, - { "America/Nipigon" , 0x00DC1D }, - { "America/Nome" , 0x00DF17 }, - { "America/Noronha" , 0x00E270 }, - { "America/North_Dakota/Center" , 0x00E384 }, - { "America/Panama" , 0x00E6E1 }, - { "America/Pangnirtung" , 0x00E72A }, - { "America/Paramaribo" , 0x00EA34 }, - { "America/Phoenix" , 0x00EABA }, - { "America/Port-au-Prince" , 0x00EB3C }, - { "America/Port_of_Spain" , 0x00ED24 }, - { "America/Porto_Acre" , 0x00EC42 }, - { "America/Porto_Velho" , 0x00ED6D }, - { "America/Puerto_Rico" , 0x00EE4F }, - { "America/Rainy_River" , 0x00EE9D }, - { "America/Rankin_Inlet" , 0x00F197 }, - { "America/Recife" , 0x00F47D }, - { "America/Regina" , 0x00F591 }, - { "America/Rio_Branco" , 0x00F70E }, - { "America/Rosario" , 0x00F7F0 }, - { "America/Santiago" , 0x00F976 }, - { "America/Santo_Domingo" , 0x00FCF0 }, - { "America/Sao_Paulo" , 0x00FDAA }, - { "America/Scoresbysund" , 0x01007B }, - { "America/Shiprock" , 0x01033E }, - { "America/St_Johns" , 0x0106AB }, - { "America/St_Kitts" , 0x010BCA }, - { "America/St_Lucia" , 0x010C13 }, - { "America/St_Thomas" , 0x010C5C }, - { "America/St_Vincent" , 0x010CA5 }, - { "America/Swift_Current" , 0x010CEE }, - { "America/Tegucigalpa" , 0x010DD5 }, - { "America/Thule" , 0x010E3E }, - { "America/Thunder_Bay" , 0x011069 }, - { "America/Tijuana" , 0x011383 }, - { "America/Toronto" , 0x0116CF }, - { "America/Tortola" , 0x011BB3 }, - { "America/Vancouver" , 0x011BFC }, - { "America/Virgin" , 0x012009 }, - { "America/Whitehorse" , 0x012052 }, - { "America/Winnipeg" , 0x012349 }, - { "America/Yakutat" , 0x01274A }, - { "America/Yellowknife" , 0x012A86 }, - { "Antarctica/Casey" , 0x012D60 }, - { "Antarctica/Davis" , 0x012DA9 }, - { "Antarctica/DumontDUrville" , 0x012DFD }, - { "Antarctica/Mawson" , 0x012E5D }, - { "Antarctica/McMurdo" , 0x012EA7 }, - { "Antarctica/Palmer" , 0x013181 }, - { "Antarctica/Rothera" , 0x01348A }, - { "Antarctica/South_Pole" , 0x0134D4 }, - { "Antarctica/Syowa" , 0x0137AE }, - { "Antarctica/Vostok" , 0x0137F8 }, - { "Arctic/Longyearbyen" , 0x013842 }, - { "Asia/Aden" , 0x013B68 }, - { "Asia/Almaty" , 0x013BB1 }, - { "Asia/Amman" , 0x013D16 }, - { "Asia/Anadyr" , 0x013FCA }, - { "Asia/Aqtau" , 0x014296 }, - { "Asia/Aqtobe" , 0x014458 }, - { "Asia/Ashgabat" , 0x0145F5 }, - { "Asia/Ashkhabad" , 0x014706 }, - { "Asia/Baghdad" , 0x014817 }, - { "Asia/Bahrain" , 0x014AAC }, - { "Asia/Baku" , 0x014B06 }, - { "Asia/Bangkok" , 0x014DE7 }, - { "Asia/Beirut" , 0x014E30 }, - { "Asia/Bishkek" , 0x015131 }, - { "Asia/Brunei" , 0x0152D1 }, - { "Asia/Calcutta" , 0x015327 }, - { "Asia/Choibalsan" , 0x015394 }, - { "Asia/Chongqing" , 0x015628 }, - { "Asia/Chungking" , 0x0156CB }, - { "Asia/Colombo" , 0x01576E }, - { "Asia/Dacca" , 0x0157F9 }, - { "Asia/Damascus" , 0x01587C }, - { "Asia/Dhaka" , 0x015BC0 }, - { "Asia/Dili" , 0x015C43 }, - { "Asia/Dubai" , 0x015CC0 }, - { "Asia/Dushanbe" , 0x015D09 }, - { "Asia/Gaza" , 0x015E00 }, - { "Asia/Harbin" , 0x01613D }, - { "Asia/Hong_Kong" , 0x0161F7 }, - { "Asia/Hovd" , 0x0163A1 }, - { "Asia/Irkutsk" , 0x016628 }, - { "Asia/Istanbul" , 0x0168EC }, - { "Asia/Jakarta" , 0x016CCD }, - { "Asia/Jayapura" , 0x016D5D }, - { "Asia/Jerusalem" , 0x016DBC }, - { "Asia/Kabul" , 0x0170DF }, - { "Asia/Kamchatka" , 0x017124 }, - { "Asia/Karachi" , 0x0173E8 }, - { "Asia/Kashgar" , 0x01747D }, - { "Asia/Katmandu" , 0x01752D }, - { "Asia/Krasnoyarsk" , 0x017587 }, - { "Asia/Kuala_Lumpur" , 0x01784B }, - { "Asia/Kuching" , 0x0178E9 }, - { "Asia/Kuwait" , 0x0179BC }, - { "Asia/Macao" , 0x017A05 }, - { "Asia/Macau" , 0x017B34 }, - { "Asia/Magadan" , 0x017C63 }, - { "Asia/Makassar" , 0x017F27 }, - { "Asia/Manila" , 0x017F97 }, - { "Asia/Muscat" , 0x018010 }, - { "Asia/Nicosia" , 0x018059 }, - { "Asia/Novosibirsk" , 0x018335 }, - { "Asia/Omsk" , 0x018606 }, - { "Asia/Oral" , 0x0188CA }, - { "Asia/Phnom_Penh" , 0x018A7F }, - { "Asia/Pontianak" , 0x018AEB }, - { "Asia/Pyongyang" , 0x018B8B }, - { "Asia/Qatar" , 0x018BEC }, - { "Asia/Qyzylorda" , 0x018C46 }, - { "Asia/Rangoon" , 0x018DF0 }, - { "Asia/Riyadh" , 0x018E5C }, - { "Asia/Saigon" , 0x018EA5 }, - { "Asia/Sakhalin" , 0x018F11 }, - { "Asia/Samarkand" , 0x0191EA }, - { "Asia/Seoul" , 0x01932D }, - { "Asia/Shanghai" , 0x0193C5 }, - { "Asia/Singapore" , 0x01946A }, - { "Asia/Taipei" , 0x019515 }, - { "Asia/Tashkent" , 0x019621 }, - { "Asia/Tbilisi" , 0x019749 }, - { "Asia/Tehran" , 0x019A44 }, - { "Asia/Tel_Aviv" , 0x019CBA }, - { "Asia/Thimbu" , 0x019FDD }, - { "Asia/Thimphu" , 0x01A037 }, - { "Asia/Tokyo" , 0x01A091 }, - { "Asia/Ujung_Pandang" , 0x01A10E }, - { "Asia/Ulaanbaatar" , 0x01A17E }, - { "Asia/Ulan_Bator" , 0x01A405 }, - { "Asia/Urumqi" , 0x01A68C }, - { "Asia/Vientiane" , 0x01A72F }, - { "Asia/Vladivostok" , 0x01A79B }, - { "Asia/Yakutsk" , 0x01AA66 }, - { "Asia/Yekaterinburg" , 0x01AD2A }, - { "Asia/Yerevan" , 0x01B019 }, - { "Atlantic/Azores" , 0x01B311 }, - { "Atlantic/Bermuda" , 0x01B802 }, - { "Atlantic/Canary" , 0x01BAD7 }, - { "Atlantic/Cape_Verde" , 0x01BD93 }, - { "Atlantic/Faeroe" , 0x01BE00 }, - { "Atlantic/Jan_Mayen" , 0x01C098 }, - { "Atlantic/Madeira" , 0x01C3BE }, - { "Atlantic/Reykjavik" , 0x01C8AC }, - { "Atlantic/South_Georgia" , 0x01CA59 }, - { "Atlantic/St_Helena" , 0x01CD59 }, - { "Atlantic/Stanley" , 0x01CA91 }, - { "Australia/ACT" , 0x01CDA2 }, - { "Australia/Adelaide" , 0x01D0B3 }, - { "Australia/Brisbane" , 0x01D3C4 }, - { "Australia/Broken_Hill" , 0x01D464 }, - { "Australia/Canberra" , 0x01D77A }, - { "Australia/Currie" , 0x01DA8B }, - { "Australia/Darwin" , 0x01DD9C }, - { "Australia/Hobart" , 0x01DE04 }, - { "Australia/LHI" , 0x01E13D }, - { "Australia/Lindeman" , 0x01E3CC }, - { "Australia/Lord_Howe" , 0x01E485 }, - { "Australia/Melbourne" , 0x01E714 }, - { "Australia/North" , 0x01EA25 }, - { "Australia/NSW" , 0x01EA8D }, - { "Australia/Perth" , 0x01ED9E }, - { "Australia/Queensland" , 0x01EE2A }, - { "Australia/South" , 0x01EECA }, - { "Australia/Sydney" , 0x01F1DB }, - { "Australia/Tasmania" , 0x01F4EC }, - { "Australia/Victoria" , 0x01F825 }, - { "Australia/West" , 0x01FB36 }, - { "Australia/Yancowinna" , 0x01FBC2 }, - { "Brazil/Acre" , 0x01FED8 }, - { "Brazil/DeNoronha" , 0x01FFBA }, - { "Brazil/East" , 0x0200CE }, - { "Brazil/West" , 0x02039F }, - { "Canada/Atlantic" , 0x02048B }, - { "Canada/Central" , 0x020967 }, - { "Canada/East-Saskatchewan" , 0x02124C }, - { "Canada/Eastern" , 0x020D68 }, - { "Canada/Mountain" , 0x0213C9 }, - { "Canada/Newfoundland" , 0x021733 }, - { "Canada/Pacific" , 0x021C52 }, - { "Canada/Saskatchewan" , 0x02205F }, - { "Canada/Yukon" , 0x0221DC }, - { "CET" , 0x0224D3 }, - { "Chile/Continental" , 0x0227C6 }, - { "Chile/EasterIsland" , 0x022B40 }, - { "CST6CDT" , 0x022E88 }, - { "Cuba" , 0x023387 }, - { "EET" , 0x0236F8 }, - { "Egypt" , 0x02399F }, - { "Eire" , 0x023D5A }, - { "EST" , 0x02425F }, - { "EST5EDT" , 0x0242A8 }, - { "Etc/GMT" , 0x02479B }, - { "Etc/GMT+0" , 0x024843 }, - { "Etc/GMT+1" , 0x0248B5 }, - { "Etc/GMT+10" , 0x02492A }, - { "Etc/GMT+11" , 0x0249A0 }, - { "Etc/GMT+12" , 0x024A16 }, - { "Etc/GMT+2" , 0x024B01 }, - { "Etc/GMT+3" , 0x024B75 }, - { "Etc/GMT+4" , 0x024BE9 }, - { "Etc/GMT+5" , 0x024C5D }, - { "Etc/GMT+6" , 0x024CD1 }, - { "Etc/GMT+7" , 0x024D45 }, - { "Etc/GMT+8" , 0x024DB9 }, - { "Etc/GMT+9" , 0x024E2D }, - { "Etc/GMT-0" , 0x02480B }, - { "Etc/GMT-1" , 0x02487B }, - { "Etc/GMT-10" , 0x0248EF }, - { "Etc/GMT-11" , 0x024965 }, - { "Etc/GMT-12" , 0x0249DB }, - { "Etc/GMT-13" , 0x024A51 }, - { "Etc/GMT-14" , 0x024A8C }, - { "Etc/GMT-2" , 0x024AC7 }, - { "Etc/GMT-3" , 0x024B3B }, - { "Etc/GMT-4" , 0x024BAF }, - { "Etc/GMT-5" , 0x024C23 }, - { "Etc/GMT-6" , 0x024C97 }, - { "Etc/GMT-7" , 0x024D0B }, - { "Etc/GMT-8" , 0x024D7F }, - { "Etc/GMT-9" , 0x024DF3 }, - { "Etc/GMT0" , 0x0247D3 }, - { "Etc/Greenwich" , 0x024E67 }, - { "Etc/UCT" , 0x024E9F }, - { "Etc/Universal" , 0x024ED7 }, - { "Etc/UTC" , 0x024F0F }, - { "Etc/Zulu" , 0x024F47 }, - { "Europe/Amsterdam" , 0x024F7F }, - { "Europe/Andorra" , 0x0253B1 }, - { "Europe/Athens" , 0x025621 }, - { "Europe/Belfast" , 0x025958 }, - { "Europe/Belgrade" , 0x025E83 }, - { "Europe/Berlin" , 0x02613B }, - { "Europe/Bratislava" , 0x026480 }, - { "Europe/Brussels" , 0x0267A6 }, - { "Europe/Bucharest" , 0x026BD1 }, - { "Europe/Budapest" , 0x026EEF }, - { "Europe/Chisinau" , 0x027251 }, - { "Europe/Copenhagen" , 0x0275D3 }, - { "Europe/Dublin" , 0x0278D1 }, - { "Europe/Gibraltar" , 0x027DD6 }, - { "Europe/Helsinki" , 0x028221 }, - { "Europe/Istanbul" , 0x0284CB }, - { "Europe/Kaliningrad" , 0x0288AC }, - { "Europe/Kiev" , 0x028BEC }, - { "Europe/Lisbon" , 0x028EE9 }, - { "Europe/Ljubljana" , 0x0293D9 }, - { "Europe/London" , 0x029691 }, - { "Europe/Luxembourg" , 0x029BBC }, - { "Europe/Madrid" , 0x02A006 }, - { "Europe/Malta" , 0x02A3B8 }, - { "Europe/Mariehamn" , 0x02A765 }, - { "Europe/Minsk" , 0x02AA0F }, - { "Europe/Monaco" , 0x02AD0E }, - { "Europe/Moscow" , 0x02B13D }, - { "Europe/Nicosia" , 0x02B46C }, - { "Europe/Oslo" , 0x02B748 }, - { "Europe/Paris" , 0x02BA6E }, - { "Europe/Prague" , 0x02BEA8 }, - { "Europe/Riga" , 0x02C1CE }, - { "Europe/Rome" , 0x02C507 }, - { "Europe/Samara" , 0x02C8BE }, - { "Europe/San_Marino" , 0x02CBBD }, - { "Europe/Sarajevo" , 0x02CF74 }, - { "Europe/Simferopol" , 0x02D22C }, - { "Europe/Skopje" , 0x02D53D }, - { "Europe/Sofia" , 0x02D7F5 }, - { "Europe/Stockholm" , 0x02DAE4 }, - { "Europe/Tallinn" , 0x02DD87 }, - { "Europe/Tirane" , 0x02E0B5 }, - { "Europe/Tiraspol" , 0x02E3AF }, - { "Europe/Uzhgorod" , 0x02E731 }, - { "Europe/Vaduz" , 0x02EA34 }, - { "Europe/Vatican" , 0x02ECBB }, - { "Europe/Vienna" , 0x02F072 }, - { "Europe/Vilnius" , 0x02F393 }, - { "Europe/Warsaw" , 0x02F6C6 }, - { "Europe/Zagreb" , 0x02FA96 }, - { "Europe/Zaporozhye" , 0x02FD4E }, - { "Europe/Zurich" , 0x030055 }, - { "Factory" , 0x030302 }, - { "GB" , 0x030367 }, - { "GB-Eire" , 0x030892 }, - { "GMT" , 0x030DBD }, - { "GMT+0" , 0x030E65 }, - { "GMT-0" , 0x030E2D }, - { "GMT0" , 0x030DF5 }, - { "Greenwich" , 0x030E9D }, - { "Hongkong" , 0x030ED5 }, - { "HST" , 0x03107F }, - { "Iceland" , 0x031101 }, - { "Indian/Antananarivo" , 0x0312AE }, - { "Indian/Chagos" , 0x031316 }, - { "Indian/Christmas" , 0x03136C }, - { "Indian/Cocos" , 0x0313A4 }, - { "Indian/Comoro" , 0x0313DC }, - { "Indian/Kerguelen" , 0x031425 }, - { "Indian/Mahe" , 0x03146E }, - { "Indian/Maldives" , 0x0314B7 }, - { "Indian/Mauritius" , 0x031500 }, - { "Indian/Mayotte" , 0x031549 }, - { "Indian/Reunion" , 0x031592 }, - { "Iran" , 0x0315DB }, - { "Israel" , 0x031851 }, - { "Jamaica" , 0x031B74 }, - { "Japan" , 0x031C2D }, - { "Kwajalein" , 0x031CAA }, - { "Libya" , 0x031D01 }, - { "MET" , 0x031DEF }, - { "Mexico/BajaNorte" , 0x0320E2 }, - { "Mexico/BajaSur" , 0x03242E }, - { "Mexico/General" , 0x032667 }, - { "MST" , 0x0328B9 }, - { "MST7MDT" , 0x03293B }, - { "Navajo" , 0x032CA8 }, - { "NZ" , 0x033015 }, - { "NZ-CHAT" , 0x033387 }, - { "Pacific/Apia" , 0x033663 }, - { "Pacific/Auckland" , 0x0336BE }, - { "Pacific/Chatham" , 0x033A30 }, - { "Pacific/Easter" , 0x033D0C }, - { "Pacific/Efate" , 0x034054 }, - { "Pacific/Enderbury" , 0x03410E }, - { "Pacific/Fakaofo" , 0x034161 }, - { "Pacific/Fiji" , 0x034199 }, - { "Pacific/Funafuti" , 0x034203 }, - { "Pacific/Galapagos" , 0x03423B }, - { "Pacific/Gambier" , 0x034296 }, - { "Pacific/Guadalcanal" , 0x0342E0 }, - { "Pacific/Guam" , 0x034329 }, - { "Pacific/Honolulu" , 0x034373 }, - { "Pacific/Johnston" , 0x0343F5 }, - { "Pacific/Kiritimati" , 0x03442D }, - { "Pacific/Kosrae" , 0x034480 }, - { "Pacific/Kwajalein" , 0x0344CB }, - { "Pacific/Majuro" , 0x034522 }, - { "Pacific/Marquesas" , 0x034567 }, - { "Pacific/Midway" , 0x0345B1 }, - { "Pacific/Nauru" , 0x034621 }, - { "Pacific/Niue" , 0x03468D }, - { "Pacific/Norfolk" , 0x0346DF }, - { "Pacific/Noumea" , 0x034728 }, - { "Pacific/Pago_Pago" , 0x0347AC }, - { "Pacific/Palau" , 0x034829 }, - { "Pacific/Pitcairn" , 0x034861 }, - { "Pacific/Ponape" , 0x0348AA }, - { "Pacific/Port_Moresby" , 0x0348E3 }, - { "Pacific/Rarotonga" , 0x03491B }, - { "Pacific/Saipan" , 0x0349EB }, - { "Pacific/Samoa" , 0x034A42 }, - { "Pacific/Tahiti" , 0x034ABF }, - { "Pacific/Tarawa" , 0x034B09 }, - { "Pacific/Tongatapu" , 0x034B42 }, - { "Pacific/Truk" , 0x034BC2 }, - { "Pacific/Wake" , 0x034BFB }, - { "Pacific/Wallis" , 0x034C34 }, - { "Pacific/Yap" , 0x034C6C }, - { "Poland" , 0x034CA5 }, - { "Portugal" , 0x035075 }, - { "PRC" , 0x035565 }, - { "PST8PDT" , 0x03560A }, - { "ROC" , 0x035A03 }, - { "ROK" , 0x035B0F }, - { "Singapore" , 0x035BA7 }, - { "Turkey" , 0x035C52 }, - { "UCT" , 0x036033 }, - { "Universal" , 0x03606B }, - { "US/Alaska" , 0x0360A3 }, - { "US/Aleutian" , 0x0363FB }, - { "US/Arizona" , 0x036755 }, - { "US/Central" , 0x0367D7 }, - { "US/East-Indiana" , 0x0371C9 }, - { "US/Eastern" , 0x036CD6 }, - { "US/Hawaii" , 0x037427 }, - { "US/Indiana-Starke" , 0x0374A9 }, - { "US/Michigan" , 0x03781A }, - { "US/Mountain" , 0x037B45 }, - { "US/Pacific" , 0x037EB2 }, - { "US/Pacific-New" , 0x0382AB }, - { "US/Samoa" , 0x0386A4 }, - { "UTC" , 0x038721 }, - { "W-SU" , 0x038A00 }, - { "WET" , 0x038759 }, - { "Zulu" , 0x038D2F }, + { "America/Hermosillo" , 0x008DB8 }, + { "America/Indiana/Indianapolis" , 0x008E6B }, + { "America/Indiana/Knox" , 0x0090C9 }, + { "America/Indiana/Marengo" , 0x00943A }, + { "America/Indiana/Vevay" , 0x00990A }, + { "America/Indianapolis" , 0x0096AC }, + { "America/Inuvik" , 0x009B0E }, + { "America/Iqaluit" , 0x009E05 }, + { "America/Jamaica" , 0x00A0F7 }, + { "America/Jujuy" , 0x00A1B0 }, + { "America/Juneau" , 0x00A344 }, + { "America/Kentucky/Louisville" , 0x00A698 }, + { "America/Kentucky/Monticello" , 0x00AA81 }, + { "America/Knox_IN" , 0x00ADD4 }, + { "America/La_Paz" , 0x00B145 }, + { "America/Lima" , 0x00B1A0 }, + { "America/Los_Angeles" , 0x00B23C }, + { "America/Louisville" , 0x00B635 }, + { "America/Maceio" , 0x00BA1E }, + { "America/Managua" , 0x00BB3C }, + { "America/Manaus" , 0x00BBD9 }, + { "America/Martinique" , 0x00BCC5 }, + { "America/Mazatlan" , 0x00BD25 }, + { "America/Mendoza" , 0x00BF5E }, + { "America/Menominee" , 0x00C0FC }, + { "America/Merida" , 0x00C42A }, + { "America/Mexico_City" , 0x00C639 }, + { "America/Miquelon" , 0x00C88B }, + { "America/Monterrey" , 0x00CAF1 }, + { "America/Montevideo" , 0x00CCF4 }, + { "America/Montreal" , 0x00CEBA }, + { "America/Montserrat" , 0x00D39E }, + { "America/Nassau" , 0x00D3E7 }, + { "America/New_York" , 0x00D720 }, + { "America/Nipigon" , 0x00DC13 }, + { "America/Nome" , 0x00DF0D }, + { "America/Noronha" , 0x00E266 }, + { "America/North_Dakota/Center" , 0x00E37A }, + { "America/Panama" , 0x00E6D7 }, + { "America/Pangnirtung" , 0x00E720 }, + { "America/Paramaribo" , 0x00EA2A }, + { "America/Phoenix" , 0x00EAB0 }, + { "America/Port-au-Prince" , 0x00EB32 }, + { "America/Port_of_Spain" , 0x00ED1A }, + { "America/Porto_Acre" , 0x00EC38 }, + { "America/Porto_Velho" , 0x00ED63 }, + { "America/Puerto_Rico" , 0x00EE45 }, + { "America/Rainy_River" , 0x00EE93 }, + { "America/Rankin_Inlet" , 0x00F18D }, + { "America/Recife" , 0x00F473 }, + { "America/Regina" , 0x00F587 }, + { "America/Rio_Branco" , 0x00F704 }, + { "America/Rosario" , 0x00F7E6 }, + { "America/Santiago" , 0x00F96C }, + { "America/Santo_Domingo" , 0x00FCE6 }, + { "America/Sao_Paulo" , 0x00FDA0 }, + { "America/Scoresbysund" , 0x010071 }, + { "America/Shiprock" , 0x010334 }, + { "America/St_Johns" , 0x0106A1 }, + { "America/St_Kitts" , 0x010BC0 }, + { "America/St_Lucia" , 0x010C09 }, + { "America/St_Thomas" , 0x010C52 }, + { "America/St_Vincent" , 0x010C9B }, + { "America/Swift_Current" , 0x010CE4 }, + { "America/Tegucigalpa" , 0x010DCB }, + { "America/Thule" , 0x010E34 }, + { "America/Thunder_Bay" , 0x01105F }, + { "America/Tijuana" , 0x011379 }, + { "America/Toronto" , 0x0116C5 }, + { "America/Tortola" , 0x011BA9 }, + { "America/Vancouver" , 0x011BF2 }, + { "America/Virgin" , 0x011FFF }, + { "America/Whitehorse" , 0x012048 }, + { "America/Winnipeg" , 0x01233F }, + { "America/Yakutat" , 0x012748 }, + { "America/Yellowknife" , 0x012A84 }, + { "Antarctica/Casey" , 0x012D5E }, + { "Antarctica/Davis" , 0x012DA7 }, + { "Antarctica/DumontDUrville" , 0x012DFB }, + { "Antarctica/Mawson" , 0x012E5B }, + { "Antarctica/McMurdo" , 0x012EA5 }, + { "Antarctica/Palmer" , 0x01317F }, + { "Antarctica/Rothera" , 0x013488 }, + { "Antarctica/South_Pole" , 0x0134D2 }, + { "Antarctica/Syowa" , 0x0137AC }, + { "Antarctica/Vostok" , 0x0137F6 }, + { "Arctic/Longyearbyen" , 0x013840 }, + { "Asia/Aden" , 0x013B66 }, + { "Asia/Almaty" , 0x013BAF }, + { "Asia/Amman" , 0x013D14 }, + { "Asia/Anadyr" , 0x013FC8 }, + { "Asia/Aqtau" , 0x014294 }, + { "Asia/Aqtobe" , 0x014456 }, + { "Asia/Ashgabat" , 0x0145F3 }, + { "Asia/Ashkhabad" , 0x014704 }, + { "Asia/Baghdad" , 0x014815 }, + { "Asia/Bahrain" , 0x014AAA }, + { "Asia/Baku" , 0x014B04 }, + { "Asia/Bangkok" , 0x014DE5 }, + { "Asia/Beirut" , 0x014E2E }, + { "Asia/Bishkek" , 0x01512F }, + { "Asia/Brunei" , 0x0152CF }, + { "Asia/Calcutta" , 0x015325 }, + { "Asia/Choibalsan" , 0x015392 }, + { "Asia/Chongqing" , 0x015626 }, + { "Asia/Chungking" , 0x0156C9 }, + { "Asia/Colombo" , 0x01576C }, + { "Asia/Dacca" , 0x0157F7 }, + { "Asia/Damascus" , 0x01587A }, + { "Asia/Dhaka" , 0x015BBE }, + { "Asia/Dili" , 0x015C41 }, + { "Asia/Dubai" , 0x015CBE }, + { "Asia/Dushanbe" , 0x015D07 }, + { "Asia/Gaza" , 0x015DFE }, + { "Asia/Harbin" , 0x01613B }, + { "Asia/Hong_Kong" , 0x0161F5 }, + { "Asia/Hovd" , 0x01639F }, + { "Asia/Irkutsk" , 0x016626 }, + { "Asia/Istanbul" , 0x0168EA }, + { "Asia/Jakarta" , 0x016CCB }, + { "Asia/Jayapura" , 0x016D5B }, + { "Asia/Jerusalem" , 0x016DBA }, + { "Asia/Kabul" , 0x0170DD }, + { "Asia/Kamchatka" , 0x017122 }, + { "Asia/Karachi" , 0x0173E6 }, + { "Asia/Kashgar" , 0x01747B }, + { "Asia/Katmandu" , 0x01752B }, + { "Asia/Krasnoyarsk" , 0x017585 }, + { "Asia/Kuala_Lumpur" , 0x017849 }, + { "Asia/Kuching" , 0x0178E7 }, + { "Asia/Kuwait" , 0x0179BA }, + { "Asia/Macao" , 0x017A03 }, + { "Asia/Macau" , 0x017B32 }, + { "Asia/Magadan" , 0x017C61 }, + { "Asia/Makassar" , 0x017F25 }, + { "Asia/Manila" , 0x017F95 }, + { "Asia/Muscat" , 0x01800E }, + { "Asia/Nicosia" , 0x018057 }, + { "Asia/Novosibirsk" , 0x018333 }, + { "Asia/Omsk" , 0x018604 }, + { "Asia/Oral" , 0x0188C8 }, + { "Asia/Phnom_Penh" , 0x018A7D }, + { "Asia/Pontianak" , 0x018AE9 }, + { "Asia/Pyongyang" , 0x018B89 }, + { "Asia/Qatar" , 0x018BEA }, + { "Asia/Qyzylorda" , 0x018C44 }, + { "Asia/Rangoon" , 0x018DEE }, + { "Asia/Riyadh" , 0x018E5A }, + { "Asia/Saigon" , 0x018EA3 }, + { "Asia/Sakhalin" , 0x018F0F }, + { "Asia/Samarkand" , 0x0191E8 }, + { "Asia/Seoul" , 0x01932B }, + { "Asia/Shanghai" , 0x0193C3 }, + { "Asia/Singapore" , 0x019468 }, + { "Asia/Taipei" , 0x019513 }, + { "Asia/Tashkent" , 0x01961F }, + { "Asia/Tbilisi" , 0x019747 }, + { "Asia/Tehran" , 0x0198F5 }, + { "Asia/Tel_Aviv" , 0x019B6B }, + { "Asia/Thimbu" , 0x019E8E }, + { "Asia/Thimphu" , 0x019EE8 }, + { "Asia/Tokyo" , 0x019F42 }, + { "Asia/Ujung_Pandang" , 0x019FBF }, + { "Asia/Ulaanbaatar" , 0x01A02F }, + { "Asia/Ulan_Bator" , 0x01A2B6 }, + { "Asia/Urumqi" , 0x01A53D }, + { "Asia/Vientiane" , 0x01A5E0 }, + { "Asia/Vladivostok" , 0x01A64C }, + { "Asia/Yakutsk" , 0x01A917 }, + { "Asia/Yekaterinburg" , 0x01ABDB }, + { "Asia/Yerevan" , 0x01AECA }, + { "Atlantic/Azores" , 0x01B1C2 }, + { "Atlantic/Bermuda" , 0x01B6B3 }, + { "Atlantic/Canary" , 0x01B988 }, + { "Atlantic/Cape_Verde" , 0x01BC44 }, + { "Atlantic/Faeroe" , 0x01BCB1 }, + { "Atlantic/Jan_Mayen" , 0x01BF49 }, + { "Atlantic/Madeira" , 0x01C26F }, + { "Atlantic/Reykjavik" , 0x01C75D }, + { "Atlantic/South_Georgia" , 0x01C90A }, + { "Atlantic/St_Helena" , 0x01CC0A }, + { "Atlantic/Stanley" , 0x01C942 }, + { "Australia/ACT" , 0x01CC53 }, + { "Australia/Adelaide" , 0x01CF64 }, + { "Australia/Brisbane" , 0x01D275 }, + { "Australia/Broken_Hill" , 0x01D315 }, + { "Australia/Canberra" , 0x01D62B }, + { "Australia/Currie" , 0x01D93C }, + { "Australia/Darwin" , 0x01DC4D }, + { "Australia/Hobart" , 0x01DCB5 }, + { "Australia/LHI" , 0x01DFEE }, + { "Australia/Lindeman" , 0x01E27D }, + { "Australia/Lord_Howe" , 0x01E336 }, + { "Australia/Melbourne" , 0x01E5C5 }, + { "Australia/North" , 0x01E8D6 }, + { "Australia/NSW" , 0x01E93E }, + { "Australia/Perth" , 0x01EC4F }, + { "Australia/Queensland" , 0x01ECDB }, + { "Australia/South" , 0x01ED7B }, + { "Australia/Sydney" , 0x01F08C }, + { "Australia/Tasmania" , 0x01F39D }, + { "Australia/Victoria" , 0x01F6D6 }, + { "Australia/West" , 0x01F9E7 }, + { "Australia/Yancowinna" , 0x01FA73 }, + { "Brazil/Acre" , 0x01FD89 }, + { "Brazil/DeNoronha" , 0x01FE6B }, + { "Brazil/East" , 0x01FF7F }, + { "Brazil/West" , 0x020250 }, + { "Canada/Atlantic" , 0x02033C }, + { "Canada/Central" , 0x020818 }, + { "Canada/East-Saskatchewan" , 0x021105 }, + { "Canada/Eastern" , 0x020C21 }, + { "Canada/Mountain" , 0x021282 }, + { "Canada/Newfoundland" , 0x0215EC }, + { "Canada/Pacific" , 0x021B0B }, + { "Canada/Saskatchewan" , 0x021F18 }, + { "Canada/Yukon" , 0x022095 }, + { "CET" , 0x02238C }, + { "Chile/Continental" , 0x02267F }, + { "Chile/EasterIsland" , 0x0229F9 }, + { "CST6CDT" , 0x022D41 }, + { "Cuba" , 0x023086 }, + { "EET" , 0x0233ED }, + { "Egypt" , 0x023694 }, + { "Eire" , 0x023A4F }, + { "EST" , 0x023F54 }, + { "EST5EDT" , 0x023F8C }, + { "Etc/GMT" , 0x0242D1 }, + { "Etc/GMT+0" , 0x024379 }, + { "Etc/GMT+1" , 0x0243EB }, + { "Etc/GMT+10" , 0x024460 }, + { "Etc/GMT+11" , 0x0244D6 }, + { "Etc/GMT+12" , 0x02454C }, + { "Etc/GMT+2" , 0x024637 }, + { "Etc/GMT+3" , 0x0246AB }, + { "Etc/GMT+4" , 0x02471F }, + { "Etc/GMT+5" , 0x024793 }, + { "Etc/GMT+6" , 0x024807 }, + { "Etc/GMT+7" , 0x02487B }, + { "Etc/GMT+8" , 0x0248EF }, + { "Etc/GMT+9" , 0x024963 }, + { "Etc/GMT-0" , 0x024341 }, + { "Etc/GMT-1" , 0x0243B1 }, + { "Etc/GMT-10" , 0x024425 }, + { "Etc/GMT-11" , 0x02449B }, + { "Etc/GMT-12" , 0x024511 }, + { "Etc/GMT-13" , 0x024587 }, + { "Etc/GMT-14" , 0x0245C2 }, + { "Etc/GMT-2" , 0x0245FD }, + { "Etc/GMT-3" , 0x024671 }, + { "Etc/GMT-4" , 0x0246E5 }, + { "Etc/GMT-5" , 0x024759 }, + { "Etc/GMT-6" , 0x0247CD }, + { "Etc/GMT-7" , 0x024841 }, + { "Etc/GMT-8" , 0x0248B5 }, + { "Etc/GMT-9" , 0x024929 }, + { "Etc/GMT0" , 0x024309 }, + { "Etc/Greenwich" , 0x02499D }, + { "Etc/UCT" , 0x0249D5 }, + { "Etc/Universal" , 0x024A0D }, + { "Etc/UTC" , 0x024A45 }, + { "Etc/Zulu" , 0x024A7D }, + { "Europe/Amsterdam" , 0x024AB5 }, + { "Europe/Andorra" , 0x024EE7 }, + { "Europe/Athens" , 0x025157 }, + { "Europe/Belfast" , 0x02548E }, + { "Europe/Belgrade" , 0x0259B9 }, + { "Europe/Berlin" , 0x025C71 }, + { "Europe/Bratislava" , 0x025FB6 }, + { "Europe/Brussels" , 0x0262DC }, + { "Europe/Bucharest" , 0x026707 }, + { "Europe/Budapest" , 0x026A25 }, + { "Europe/Chisinau" , 0x026D87 }, + { "Europe/Copenhagen" , 0x027109 }, + { "Europe/Dublin" , 0x027407 }, + { "Europe/Gibraltar" , 0x02790C }, + { "Europe/Helsinki" , 0x027D57 }, + { "Europe/Istanbul" , 0x028001 }, + { "Europe/Kaliningrad" , 0x0283E2 }, + { "Europe/Kiev" , 0x028722 }, + { "Europe/Lisbon" , 0x028A1F }, + { "Europe/Ljubljana" , 0x028F0F }, + { "Europe/London" , 0x0291C7 }, + { "Europe/Luxembourg" , 0x0296F2 }, + { "Europe/Madrid" , 0x029B3C }, + { "Europe/Malta" , 0x029EEE }, + { "Europe/Mariehamn" , 0x02A29B }, + { "Europe/Minsk" , 0x02A545 }, + { "Europe/Monaco" , 0x02A844 }, + { "Europe/Moscow" , 0x02AC73 }, + { "Europe/Nicosia" , 0x02AFA2 }, + { "Europe/Oslo" , 0x02B27E }, + { "Europe/Paris" , 0x02B5A4 }, + { "Europe/Prague" , 0x02B9DE }, + { "Europe/Riga" , 0x02BD04 }, + { "Europe/Rome" , 0x02C03D }, + { "Europe/Samara" , 0x02C3F4 }, + { "Europe/San_Marino" , 0x02C6F3 }, + { "Europe/Sarajevo" , 0x02CAAA }, + { "Europe/Simferopol" , 0x02CD62 }, + { "Europe/Skopje" , 0x02D073 }, + { "Europe/Sofia" , 0x02D32B }, + { "Europe/Stockholm" , 0x02D61A }, + { "Europe/Tallinn" , 0x02D8BD }, + { "Europe/Tirane" , 0x02DBEB }, + { "Europe/Tiraspol" , 0x02DEE5 }, + { "Europe/Uzhgorod" , 0x02E267 }, + { "Europe/Vaduz" , 0x02E56A }, + { "Europe/Vatican" , 0x02E7F1 }, + { "Europe/Vienna" , 0x02EBA8 }, + { "Europe/Vilnius" , 0x02EEC9 }, + { "Europe/Warsaw" , 0x02F1FC }, + { "Europe/Zagreb" , 0x02F5CC }, + { "Europe/Zaporozhye" , 0x02F884 }, + { "Europe/Zurich" , 0x02FB8B }, + { "Factory" , 0x02FE38 }, + { "GB" , 0x02FE9D }, + { "GB-Eire" , 0x0303C8 }, + { "GMT" , 0x0308F3 }, + { "GMT+0" , 0x03099B }, + { "GMT-0" , 0x030963 }, + { "GMT0" , 0x03092B }, + { "Greenwich" , 0x0309D3 }, + { "Hongkong" , 0x030A0B }, + { "HST" , 0x030BB5 }, + { "Iceland" , 0x030BED }, + { "Indian/Antananarivo" , 0x030D9A }, + { "Indian/Chagos" , 0x030E02 }, + { "Indian/Christmas" , 0x030E58 }, + { "Indian/Cocos" , 0x030E90 }, + { "Indian/Comoro" , 0x030EC8 }, + { "Indian/Kerguelen" , 0x030F11 }, + { "Indian/Mahe" , 0x030F5A }, + { "Indian/Maldives" , 0x030FA3 }, + { "Indian/Mauritius" , 0x030FEC }, + { "Indian/Mayotte" , 0x031035 }, + { "Indian/Reunion" , 0x03107E }, + { "Iran" , 0x0310C7 }, + { "Israel" , 0x03133D }, + { "Jamaica" , 0x031660 }, + { "Japan" , 0x031719 }, + { "Kwajalein" , 0x031796 }, + { "Libya" , 0x0317ED }, + { "MET" , 0x0318DB }, + { "Mexico/BajaNorte" , 0x031BCE }, + { "Mexico/BajaSur" , 0x031F1A }, + { "Mexico/General" , 0x032153 }, + { "MST" , 0x0323A5 }, + { "MST7MDT" , 0x0323DD }, + { "Navajo" , 0x032722 }, + { "NZ" , 0x032A8F }, + { "NZ-CHAT" , 0x032E01 }, + { "Pacific/Apia" , 0x0330DD }, + { "Pacific/Auckland" , 0x033138 }, + { "Pacific/Chatham" , 0x0334AA }, + { "Pacific/Easter" , 0x033786 }, + { "Pacific/Efate" , 0x033ACE }, + { "Pacific/Enderbury" , 0x033B88 }, + { "Pacific/Fakaofo" , 0x033BDB }, + { "Pacific/Fiji" , 0x033C13 }, + { "Pacific/Funafuti" , 0x033C7D }, + { "Pacific/Galapagos" , 0x033CB5 }, + { "Pacific/Gambier" , 0x033D10 }, + { "Pacific/Guadalcanal" , 0x033D5A }, + { "Pacific/Guam" , 0x033DA3 }, + { "Pacific/Honolulu" , 0x033DED }, + { "Pacific/Johnston" , 0x033E6F }, + { "Pacific/Kiritimati" , 0x033EA7 }, + { "Pacific/Kosrae" , 0x033EFA }, + { "Pacific/Kwajalein" , 0x033F45 }, + { "Pacific/Majuro" , 0x033F9C }, + { "Pacific/Marquesas" , 0x033FE1 }, + { "Pacific/Midway" , 0x03402B }, + { "Pacific/Nauru" , 0x03409B }, + { "Pacific/Niue" , 0x034107 }, + { "Pacific/Norfolk" , 0x034159 }, + { "Pacific/Noumea" , 0x0341A2 }, + { "Pacific/Pago_Pago" , 0x034226 }, + { "Pacific/Palau" , 0x0342A3 }, + { "Pacific/Pitcairn" , 0x0342DB }, + { "Pacific/Ponape" , 0x034324 }, + { "Pacific/Port_Moresby" , 0x03435D }, + { "Pacific/Rarotonga" , 0x034395 }, + { "Pacific/Saipan" , 0x034465 }, + { "Pacific/Samoa" , 0x0344BC }, + { "Pacific/Tahiti" , 0x034539 }, + { "Pacific/Tarawa" , 0x034583 }, + { "Pacific/Tongatapu" , 0x0345BC }, + { "Pacific/Truk" , 0x03463C }, + { "Pacific/Wake" , 0x034675 }, + { "Pacific/Wallis" , 0x0346AE }, + { "Pacific/Yap" , 0x0346E6 }, + { "Poland" , 0x03471F }, + { "Portugal" , 0x034AEF }, + { "PRC" , 0x034FDF }, + { "PST8PDT" , 0x035084 }, + { "ROC" , 0x0353C9 }, + { "ROK" , 0x0354D5 }, + { "Singapore" , 0x03556D }, + { "Turkey" , 0x035618 }, + { "UCT" , 0x0359F9 }, + { "Universal" , 0x035A31 }, + { "US/Alaska" , 0x035A69 }, + { "US/Aleutian" , 0x035DC1 }, + { "US/Arizona" , 0x03611B }, + { "US/Central" , 0x03619D }, + { "US/East-Indiana" , 0x036B8F }, + { "US/Eastern" , 0x03669C }, + { "US/Hawaii" , 0x036DED }, + { "US/Indiana-Starke" , 0x036E6F }, + { "US/Michigan" , 0x0371E0 }, + { "US/Mountain" , 0x03750B }, + { "US/Pacific" , 0x037878 }, + { "US/Pacific-New" , 0x037C71 }, + { "US/Samoa" , 0x03806A }, + { "UTC" , 0x0380E7 }, + { "W-SU" , 0x0383C6 }, + { "WET" , 0x03811F }, + { "Zulu" , 0x0386F5 }, }; /* This is a generated file, do not modify */ -unsigned char timelib_timezone_db_data_builtin[232807] = { +unsigned char timelib_timezone_db_data_builtin[231213] = { /* Africa/Abidjan */ @@ -1899,23 +1899,23 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0x04, 0xE9, 0x50, 0x3A, 0xC6, 0xEE, 0x10, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xB0, 0x0A, 0x90, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xEC, 0x90, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xCE, 0x90, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xB0, 0x90, -0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, 0x45, 0x44, 0x5F, 0x80, 0x46, 0x0F, 0x74, 0x90, -0x47, 0x24, 0x41, 0x80, 0x47, 0xF8, 0x91, 0x10, 0x49, 0x04, 0x23, 0x80, 0x49, 0xD8, 0x73, 0x10, -0x4A, 0xE4, 0x05, 0x80, 0x4B, 0xB8, 0x55, 0x10, 0x4C, 0xCD, 0x22, 0x00, 0x4D, 0x98, 0x37, 0x10, -0x4E, 0xAD, 0x04, 0x00, 0x4F, 0x78, 0x19, 0x10, 0x50, 0x8C, 0xE6, 0x00, 0x51, 0x61, 0x35, 0x90, -0x52, 0x6C, 0xC8, 0x00, 0x53, 0x41, 0x17, 0x90, 0x54, 0x4C, 0xAA, 0x00, 0x55, 0x20, 0xF9, 0x90, -0x56, 0x2C, 0x8C, 0x00, 0x57, 0x00, 0xDB, 0x90, 0x58, 0x15, 0xA8, 0x80, 0x58, 0xE0, 0xBD, 0x90, -0x59, 0xF5, 0x8A, 0x80, 0x5A, 0xC0, 0x9F, 0x90, 0x5B, 0xD5, 0x6C, 0x80, 0x5C, 0xA9, 0xBC, 0x10, -0x5D, 0xB5, 0x4E, 0x80, 0x5E, 0x89, 0x9E, 0x10, 0x5F, 0x95, 0x30, 0x80, 0x60, 0x69, 0x80, 0x10, -0x61, 0x7E, 0x4D, 0x00, 0x62, 0x49, 0x62, 0x10, 0x63, 0x5E, 0x2F, 0x00, 0x64, 0x29, 0x44, 0x10, -0x65, 0x3E, 0x11, 0x00, 0x66, 0x12, 0x60, 0x90, 0x67, 0x1D, 0xF3, 0x00, 0x67, 0xF2, 0x42, 0x90, -0x68, 0xFD, 0xD5, 0x00, 0x69, 0xD2, 0x24, 0x90, 0x6A, 0xDD, 0xB7, 0x00, 0x6B, 0xB2, 0x06, 0x90, -0x6C, 0xC6, 0xD3, 0x80, 0x6D, 0x91, 0xE8, 0x90, 0x6E, 0xA6, 0xB5, 0x80, 0x6F, 0x71, 0xCA, 0x90, -0x70, 0x86, 0x97, 0x80, 0x71, 0x5A, 0xE7, 0x10, 0x72, 0x66, 0x79, 0x80, 0x73, 0x3A, 0xC9, 0x10, -0x74, 0x46, 0x5B, 0x80, 0x75, 0x1A, 0xAB, 0x10, 0x76, 0x2F, 0x78, 0x00, 0x76, 0xFA, 0x8D, 0x10, -0x78, 0x0F, 0x5A, 0x00, 0x78, 0xDA, 0x6F, 0x10, 0x79, 0xEF, 0x3C, 0x00, 0x7A, 0xBA, 0x51, 0x10, -0x7B, 0xCF, 0x1E, 0x00, 0x7C, 0xA3, 0x6D, 0x90, 0x7D, 0xAF, 0x00, 0x00, 0x7E, 0x83, 0x4F, 0x90, -0x7F, 0x8E, 0xE2, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, +0x43, 0x64, 0x7D, 0x80, 0x44, 0x2F, 0x92, 0x90, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xC5, 0x10, +0x47, 0x2D, 0x7C, 0x00, 0x47, 0xD3, 0xA7, 0x10, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x89, 0x10, +0x4A, 0xED, 0x40, 0x00, 0x4B, 0x9C, 0xA5, 0x90, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x87, 0x90, +0x4E, 0xB6, 0x3E, 0x80, 0x4F, 0x5C, 0x69, 0x90, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x4B, 0x90, +0x52, 0x76, 0x02, 0x80, 0x53, 0x1C, 0x2D, 0x90, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x0F, 0x90, +0x56, 0x35, 0xC6, 0x80, 0x56, 0xE5, 0x2C, 0x10, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x0E, 0x10, +0x59, 0xFE, 0xC5, 0x00, 0x5A, 0xA4, 0xF0, 0x10, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xD2, 0x10, +0x5D, 0xBE, 0x89, 0x00, 0x5E, 0x64, 0xB4, 0x10, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xD0, 0x90, +0x61, 0x87, 0x87, 0x80, 0x62, 0x2D, 0xB2, 0x90, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x94, 0x90, +0x65, 0x47, 0x4B, 0x80, 0x65, 0xED, 0x76, 0x90, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x58, 0x90, +0x69, 0x07, 0x0F, 0x80, 0x69, 0xAD, 0x3A, 0x90, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x57, 0x10, +0x6C, 0xD0, 0x0E, 0x00, 0x6D, 0x76, 0x39, 0x10, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x1B, 0x10, +0x70, 0x8F, 0xD2, 0x00, 0x71, 0x35, 0xFD, 0x10, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xDF, 0x10, +0x74, 0x4F, 0x96, 0x00, 0x74, 0xFE, 0xFB, 0x90, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, +0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, +0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, +0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x04, 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, 0x06, 0x05, 0x07, 0x06, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, @@ -2722,22 +2722,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xAE, 0xD0, 0x3A, 0xC6, 0xC3, 0xE0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xE0, 0x60, 0x3D, 0xBB, 0x72, 0xD0, 0x3E, 0x8F, 0xC2, 0x60, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0xA4, 0x60, 0x41, 0x84, 0x71, 0x50, 0x42, 0x4F, 0x86, 0x60, 0x43, 0x64, 0x53, 0x50, 0x44, 0x2F, 0x68, 0x60, -0x45, 0x44, 0x35, 0x50, 0x46, 0x0F, 0x4A, 0x60, 0x47, 0x24, 0x17, 0x50, 0x47, 0xF8, 0x66, 0xE0, -0x49, 0x03, 0xF9, 0x50, 0x49, 0xD8, 0x48, 0xE0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xB8, 0x2A, 0xE0, -0x4C, 0xCC, 0xF7, 0xD0, 0x4D, 0x98, 0x0C, 0xE0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x77, 0xEE, 0xE0, -0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x61, 0x0B, 0x60, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x40, 0xED, 0x60, -0x54, 0x4C, 0x7F, 0xD0, 0x55, 0x20, 0xCF, 0x60, 0x56, 0x2C, 0x61, 0xD0, 0x57, 0x00, 0xB1, 0x60, -0x58, 0x15, 0x7E, 0x50, 0x58, 0xE0, 0x93, 0x60, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xC0, 0x75, 0x60, -0x5B, 0xD5, 0x42, 0x50, 0x5C, 0xA9, 0x91, 0xE0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x89, 0x73, 0xE0, -0x5F, 0x95, 0x06, 0x50, 0x60, 0x69, 0x55, 0xE0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x49, 0x37, 0xE0, -0x63, 0x5E, 0x04, 0xD0, 0x64, 0x29, 0x19, 0xE0, 0x65, 0x3D, 0xE6, 0xD0, 0x66, 0x12, 0x36, 0x60, -0x67, 0x1D, 0xC8, 0xD0, 0x67, 0xF2, 0x18, 0x60, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xD1, 0xFA, 0x60, -0x6A, 0xDD, 0x8C, 0xD0, 0x6B, 0xB1, 0xDC, 0x60, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x91, 0xBE, 0x60, -0x6E, 0xA6, 0x8B, 0x50, 0x6F, 0x71, 0xA0, 0x60, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x5A, 0xBC, 0xE0, -0x72, 0x66, 0x4F, 0x50, 0x73, 0x3A, 0x9E, 0xE0, 0x74, 0x46, 0x31, 0x50, 0x75, 0x1A, 0x80, 0xE0, -0x76, 0x2F, 0x4D, 0xD0, 0x76, 0xFA, 0x62, 0xE0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xDA, 0x44, 0xE0, -0x79, 0xEF, 0x11, 0xD0, 0x7A, 0xBA, 0x26, 0xE0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0xA3, 0x43, 0x60, -0x7D, 0xAE, 0xD5, 0xD0, 0x7E, 0x83, 0x25, 0x60, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x03, +0x45, 0x44, 0x35, 0x50, 0x45, 0xF3, 0x9A, 0xE0, 0x47, 0x2D, 0x51, 0xD0, 0x47, 0xD3, 0x7C, 0xE0, +0x49, 0x0D, 0x33, 0xD0, 0x49, 0xB3, 0x5E, 0xE0, 0x4A, 0xED, 0x15, 0xD0, 0x4B, 0x9C, 0x7B, 0x60, +0x4C, 0xD6, 0x32, 0x50, 0x4D, 0x7C, 0x5D, 0x60, 0x4E, 0xB6, 0x14, 0x50, 0x4F, 0x5C, 0x3F, 0x60, +0x50, 0x95, 0xF6, 0x50, 0x51, 0x3C, 0x21, 0x60, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1C, 0x03, 0x60, +0x54, 0x55, 0xBA, 0x50, 0x54, 0xFB, 0xE5, 0x60, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE5, 0x01, 0xE0, +0x58, 0x1E, 0xB8, 0xD0, 0x58, 0xC4, 0xE3, 0xE0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xC5, 0xE0, +0x5B, 0xDE, 0x7C, 0xD0, 0x5C, 0x84, 0xA7, 0xE0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x89, 0xE0, +0x5F, 0x9E, 0x40, 0xD0, 0x60, 0x4D, 0xA6, 0x60, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x88, 0x60, +0x63, 0x67, 0x3F, 0x50, 0x64, 0x0D, 0x6A, 0x60, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x4C, 0x60, +0x67, 0x27, 0x03, 0x50, 0x67, 0xCD, 0x2E, 0x60, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x10, 0x60, +0x6A, 0xE6, 0xC7, 0x50, 0x6B, 0x96, 0x2C, 0xE0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x0E, 0xE0, +0x6E, 0xAF, 0xC5, 0xD0, 0x6F, 0x55, 0xF0, 0xE0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xD2, 0xE0, +0x72, 0x6F, 0x89, 0xD0, 0x73, 0x15, 0xB4, 0xE0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xD1, 0x60, +0x76, 0x38, 0x88, 0x50, 0x76, 0xDE, 0xB3, 0x60, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x95, 0x60, +0x79, 0xF8, 0x4C, 0x50, 0x7A, 0x9E, 0x77, 0x60, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x59, 0x60, +0x7D, 0xB8, 0x10, 0x50, 0x7E, 0x5E, 0x3B, 0x60, 0x7F, 0x97, 0xF2, 0x50, 0x02, 0x01, 0x02, 0x03, 0x04, 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, @@ -3003,22 +3003,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xAE, 0xD0, 0x3A, 0xC6, 0xC3, 0xE0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xE0, 0x60, 0x3D, 0xBB, 0x72, 0xD0, 0x3E, 0x8F, 0xC2, 0x60, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0xA4, 0x60, 0x41, 0x84, 0x71, 0x50, 0x42, 0x4F, 0x86, 0x60, 0x43, 0x64, 0x53, 0x50, 0x44, 0x2F, 0x68, 0x60, -0x45, 0x44, 0x35, 0x50, 0x46, 0x0F, 0x4A, 0x60, 0x47, 0x24, 0x17, 0x50, 0x47, 0xF8, 0x66, 0xE0, -0x49, 0x03, 0xF9, 0x50, 0x49, 0xD8, 0x48, 0xE0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xB8, 0x2A, 0xE0, -0x4C, 0xCC, 0xF7, 0xD0, 0x4D, 0x98, 0x0C, 0xE0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x77, 0xEE, 0xE0, -0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x61, 0x0B, 0x60, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x40, 0xED, 0x60, -0x54, 0x4C, 0x7F, 0xD0, 0x55, 0x20, 0xCF, 0x60, 0x56, 0x2C, 0x61, 0xD0, 0x57, 0x00, 0xB1, 0x60, -0x58, 0x15, 0x7E, 0x50, 0x58, 0xE0, 0x93, 0x60, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xC0, 0x75, 0x60, -0x5B, 0xD5, 0x42, 0x50, 0x5C, 0xA9, 0x91, 0xE0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x89, 0x73, 0xE0, -0x5F, 0x95, 0x06, 0x50, 0x60, 0x69, 0x55, 0xE0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x49, 0x37, 0xE0, -0x63, 0x5E, 0x04, 0xD0, 0x64, 0x29, 0x19, 0xE0, 0x65, 0x3D, 0xE6, 0xD0, 0x66, 0x12, 0x36, 0x60, -0x67, 0x1D, 0xC8, 0xD0, 0x67, 0xF2, 0x18, 0x60, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xD1, 0xFA, 0x60, -0x6A, 0xDD, 0x8C, 0xD0, 0x6B, 0xB1, 0xDC, 0x60, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x91, 0xBE, 0x60, -0x6E, 0xA6, 0x8B, 0x50, 0x6F, 0x71, 0xA0, 0x60, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x5A, 0xBC, 0xE0, -0x72, 0x66, 0x4F, 0x50, 0x73, 0x3A, 0x9E, 0xE0, 0x74, 0x46, 0x31, 0x50, 0x75, 0x1A, 0x80, 0xE0, -0x76, 0x2F, 0x4D, 0xD0, 0x76, 0xFA, 0x62, 0xE0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xDA, 0x44, 0xE0, -0x79, 0xEF, 0x11, 0xD0, 0x7A, 0xBA, 0x26, 0xE0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0xA3, 0x43, 0x60, -0x7D, 0xAE, 0xD5, 0xD0, 0x7E, 0x83, 0x25, 0x60, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, +0x45, 0x44, 0x35, 0x50, 0x45, 0xF3, 0x9A, 0xE0, 0x47, 0x2D, 0x51, 0xD0, 0x47, 0xD3, 0x7C, 0xE0, +0x49, 0x0D, 0x33, 0xD0, 0x49, 0xB3, 0x5E, 0xE0, 0x4A, 0xED, 0x15, 0xD0, 0x4B, 0x9C, 0x7B, 0x60, +0x4C, 0xD6, 0x32, 0x50, 0x4D, 0x7C, 0x5D, 0x60, 0x4E, 0xB6, 0x14, 0x50, 0x4F, 0x5C, 0x3F, 0x60, +0x50, 0x95, 0xF6, 0x50, 0x51, 0x3C, 0x21, 0x60, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1C, 0x03, 0x60, +0x54, 0x55, 0xBA, 0x50, 0x54, 0xFB, 0xE5, 0x60, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE5, 0x01, 0xE0, +0x58, 0x1E, 0xB8, 0xD0, 0x58, 0xC4, 0xE3, 0xE0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xC5, 0xE0, +0x5B, 0xDE, 0x7C, 0xD0, 0x5C, 0x84, 0xA7, 0xE0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x89, 0xE0, +0x5F, 0x9E, 0x40, 0xD0, 0x60, 0x4D, 0xA6, 0x60, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x88, 0x60, +0x63, 0x67, 0x3F, 0x50, 0x64, 0x0D, 0x6A, 0x60, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x4C, 0x60, +0x67, 0x27, 0x03, 0x50, 0x67, 0xCD, 0x2E, 0x60, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x10, 0x60, +0x6A, 0xE6, 0xC7, 0x50, 0x6B, 0x96, 0x2C, 0xE0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x0E, 0xE0, +0x6E, 0xAF, 0xC5, 0xD0, 0x6F, 0x55, 0xF0, 0xE0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xD2, 0xE0, +0x72, 0x6F, 0x89, 0xD0, 0x73, 0x15, 0xB4, 0xE0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xD1, 0x60, +0x76, 0x38, 0x88, 0x50, 0x76, 0xDE, 0xB3, 0x60, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x95, 0x60, +0x79, 0xF8, 0x4C, 0x50, 0x7A, 0x9E, 0x77, 0x60, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x59, 0x60, +0x7D, 0xB8, 0x10, 0x50, 0x7E, 0x5E, 0x3B, 0x60, 0x7F, 0x97, 0xF2, 0x50, 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, 0x03, 0x04, 0x02, @@ -3041,7 +3041,7 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* America/Havana */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x9D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xAC, 0x62, 0xC2, 0x80, +0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xAC, 0x62, 0xC2, 0x80, 0xB1, 0xD3, 0x94, 0x50, 0xB2, 0x74, 0x5D, 0x40, 0xC8, 0x5B, 0x66, 0xD0, 0xC8, 0xD3, 0x51, 0x40, 0xCA, 0x3B, 0x48, 0xD0, 0xCA, 0xBC, 0x6D, 0xC0, 0xCC, 0x24, 0x65, 0x50, 0xCC, 0x9C, 0x4F, 0xC0, 0xD1, 0xC4, 0x0B, 0x50, 0xD2, 0x3B, 0xF5, 0xC0, 0xD3, 0xA3, 0xED, 0x50, 0xD4, 0x1B, 0xD7, 0xC0, @@ -3064,37 +3064,36 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x33, 0x47, 0x2D, 0xD0, 0x34, 0x40, 0x59, 0x50, 0x35, 0x1D, 0xD5, 0x50, 0x36, 0x32, 0xB0, 0x50, 0x36, 0xFD, 0xB7, 0x50, 0x38, 0x1B, 0xCC, 0xD0, 0x38, 0xE6, 0xD3, 0xD0, 0x39, 0xFB, 0xAE, 0xD0, 0x3A, 0xC6, 0xB5, 0xD0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xD2, 0x50, 0x3D, 0xBB, 0x72, 0xD0, -0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x43, 0x64, 0x53, 0x50, -0x44, 0x2F, 0x5A, 0x50, 0x45, 0x44, 0x35, 0x50, 0x46, 0x0F, 0x3C, 0x50, 0x47, 0x24, 0x17, 0x50, -0x47, 0xF8, 0x58, 0xD0, 0x49, 0x03, 0xF9, 0x50, 0x49, 0xD8, 0x3A, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, -0x4B, 0xB8, 0x1C, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0, 0x4D, 0x97, 0xFE, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, -0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x60, 0xFD, 0x50, 0x52, 0x6C, 0x9D, 0xD0, -0x53, 0x40, 0xDF, 0x50, 0x54, 0x4C, 0x7F, 0xD0, 0x55, 0x20, 0xC1, 0x50, 0x56, 0x2C, 0x61, 0xD0, -0x57, 0x00, 0xA3, 0x50, 0x58, 0x15, 0x7E, 0x50, 0x58, 0xE0, 0x85, 0x50, 0x59, 0xF5, 0x60, 0x50, -0x5A, 0xC0, 0x67, 0x50, 0x5B, 0xD5, 0x42, 0x50, 0x5C, 0xA9, 0x83, 0xD0, 0x5D, 0xB5, 0x24, 0x50, -0x5E, 0x89, 0x65, 0xD0, 0x5F, 0x95, 0x06, 0x50, 0x60, 0x69, 0x47, 0xD0, 0x61, 0x7E, 0x22, 0xD0, -0x62, 0x49, 0x29, 0xD0, 0x63, 0x5E, 0x04, 0xD0, 0x64, 0x29, 0x0B, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, -0x66, 0x12, 0x28, 0x50, 0x67, 0x1D, 0xC8, 0xD0, 0x67, 0xF2, 0x0A, 0x50, 0x68, 0xFD, 0xAA, 0xD0, -0x69, 0xD1, 0xEC, 0x50, 0x6A, 0xDD, 0x8C, 0xD0, 0x6B, 0xB1, 0xCE, 0x50, 0x6C, 0xC6, 0xA9, 0x50, -0x6D, 0x91, 0xB0, 0x50, 0x6E, 0xA6, 0x8B, 0x50, 0x6F, 0x71, 0x92, 0x50, 0x70, 0x86, 0x6D, 0x50, -0x71, 0x5A, 0xAE, 0xD0, 0x72, 0x66, 0x4F, 0x50, 0x73, 0x3A, 0x90, 0xD0, 0x74, 0x46, 0x31, 0x50, -0x75, 0x1A, 0x72, 0xD0, 0x76, 0x2F, 0x4D, 0xD0, 0x76, 0xFA, 0x54, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, -0x78, 0xDA, 0x36, 0xD0, 0x79, 0xEF, 0x11, 0xD0, 0x7A, 0xBA, 0x18, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, -0x7C, 0xA3, 0x35, 0x50, 0x7D, 0xAE, 0xD5, 0xD0, 0x7E, 0x83, 0x17, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, +0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50, +0x46, 0x0F, 0x3C, 0x50, 0x47, 0x24, 0x17, 0x50, 0x47, 0xF8, 0x58, 0xD0, 0x49, 0x03, 0xF9, 0x50, +0x49, 0xD8, 0x3A, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xB8, 0x1C, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0, +0x4D, 0x97, 0xFE, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0, +0x51, 0x60, 0xFD, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x40, 0xDF, 0x50, 0x54, 0x4C, 0x7F, 0xD0, +0x55, 0x20, 0xC1, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x57, 0x00, 0xA3, 0x50, 0x58, 0x15, 0x7E, 0x50, +0x58, 0xE0, 0x85, 0x50, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xC0, 0x67, 0x50, 0x5B, 0xD5, 0x42, 0x50, +0x5C, 0xA9, 0x83, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x89, 0x65, 0xD0, 0x5F, 0x95, 0x06, 0x50, +0x60, 0x69, 0x47, 0xD0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x49, 0x29, 0xD0, 0x63, 0x5E, 0x04, 0xD0, +0x64, 0x29, 0x0B, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, 0x66, 0x12, 0x28, 0x50, 0x67, 0x1D, 0xC8, 0xD0, +0x67, 0xF2, 0x0A, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xD1, 0xEC, 0x50, 0x6A, 0xDD, 0x8C, 0xD0, +0x6B, 0xB1, 0xCE, 0x50, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x91, 0xB0, 0x50, 0x6E, 0xA6, 0x8B, 0x50, +0x6F, 0x71, 0x92, 0x50, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x5A, 0xAE, 0xD0, 0x72, 0x66, 0x4F, 0x50, +0x73, 0x3A, 0x90, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x75, 0x1A, 0x72, 0xD0, 0x76, 0x2F, 0x4D, 0xD0, +0x76, 0xFA, 0x54, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xDA, 0x36, 0xD0, 0x79, 0xEF, 0x11, 0xD0, +0x7A, 0xBA, 0x18, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0xA3, 0x35, 0x50, 0x7D, 0xAE, 0xD5, 0xD0, +0x7E, 0x83, 0x17, 0x50, 0x7F, 0x8E, 0xB7, 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, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, +0x03, 0x01, 0x03, 0x01, 0x03, 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, 0x04, 0x03, 0xFF, 0xFF, 0xB2, -0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, -0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0x48, 0x4D, 0x54, 0x00, 0x43, -0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, +0x03, 0x04, 0x03, 0xFF, 0xFF, 0xB2, 0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, +0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, +0x04, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* America/Hermosillo */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3394,22 +3393,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, -0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, 0x47, 0x24, 0x25, 0x60, -0x47, 0xF8, 0x74, 0xF0, 0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, 0x4A, 0xE3, 0xE9, 0x60, -0x4B, 0xB8, 0x38, 0xF0, 0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, 0x4E, 0xAC, 0xE7, 0xE0, -0x4F, 0x77, 0xFC, 0xF0, 0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, 0x52, 0x6C, 0xAB, 0xE0, -0x53, 0x40, 0xFB, 0x70, 0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, 0x56, 0x2C, 0x6F, 0xE0, -0x57, 0x00, 0xBF, 0x70, 0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, 0x59, 0xF5, 0x6E, 0x60, -0x5A, 0xC0, 0x83, 0x70, 0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, 0x5D, 0xB5, 0x32, 0x60, -0x5E, 0x89, 0x81, 0xF0, 0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, 0x61, 0x7E, 0x30, 0xE0, -0x62, 0x49, 0x45, 0xF0, 0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, 0x65, 0x3D, 0xF4, 0xE0, -0x66, 0x12, 0x44, 0x70, 0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, 0x68, 0xFD, 0xB8, 0xE0, -0x69, 0xD2, 0x08, 0x70, 0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, 0x6C, 0xC6, 0xB7, 0x60, -0x6D, 0x91, 0xCC, 0x70, 0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, 0x70, 0x86, 0x7B, 0x60, -0x71, 0x5A, 0xCA, 0xF0, 0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, 0x74, 0x46, 0x3F, 0x60, -0x75, 0x1A, 0x8E, 0xF0, 0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, 0x78, 0x0F, 0x3D, 0xE0, -0x78, 0xDA, 0x52, 0xF0, 0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, 0x7B, 0xCF, 0x01, 0xE0, -0x7C, 0xA3, 0x51, 0x70, 0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, 0x7F, 0x8E, 0xC5, 0xE0, +0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, +0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, +0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, +0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, +0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, +0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, +0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, +0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, +0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, +0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, +0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, +0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, +0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, +0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, +0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, +0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x04, 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, @@ -3879,7 +3878,7 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0xBD, 0x2D, 0x48, 0xE8, 0x06, 0x43, 0x74, 0x60, 0x09, 0xA4, 0x3E, 0x50, 0x11, 0x51, 0xF8, 0xE0, 0x11, 0xD4, 0x6F, 0x50, 0x13, 0x31, 0xDA, 0xE0, 0x13, 0xB4, 0x51, 0x50, 0x29, 0x61, 0x91, 0x20, 0x2A, 0xC1, 0x4B, 0x50, -0x2B, 0x44, 0x16, 0x20, 0x36, 0x63, 0x77, 0xD0, 0x42, 0x58, 0xC0, 0xE0, 0x43, 0x2C, 0xF4, 0x50, +0x2B, 0x44, 0x16, 0x20, 0x36, 0x63, 0x77, 0xD0, 0x42, 0x58, 0xC0, 0xE0, 0x43, 0x3F, 0x69, 0x50, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x03, 0x01, 0xFF, 0xFF, 0xAF, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0x4D, 0x4D, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, @@ -4119,22 +4118,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xA0, 0xC0, 0x3A, 0xC6, 0xB5, 0xD0, 0x3B, 0xDB, 0x82, 0xC0, 0x3C, 0xAF, 0xD2, 0x50, 0x3D, 0xBB, 0x64, 0xC0, 0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x46, 0xC0, 0x40, 0x6F, 0x96, 0x50, 0x41, 0x84, 0x63, 0x40, 0x42, 0x4F, 0x78, 0x50, 0x43, 0x64, 0x45, 0x40, 0x44, 0x2F, 0x5A, 0x50, -0x45, 0x44, 0x27, 0x40, 0x46, 0x0F, 0x3C, 0x50, 0x47, 0x24, 0x09, 0x40, 0x47, 0xF8, 0x58, 0xD0, -0x49, 0x03, 0xEB, 0x40, 0x49, 0xD8, 0x3A, 0xD0, 0x4A, 0xE3, 0xCD, 0x40, 0x4B, 0xB8, 0x1C, 0xD0, -0x4C, 0xCC, 0xE9, 0xC0, 0x4D, 0x97, 0xFE, 0xD0, 0x4E, 0xAC, 0xCB, 0xC0, 0x4F, 0x77, 0xE0, 0xD0, -0x50, 0x8C, 0xAD, 0xC0, 0x51, 0x60, 0xFD, 0x50, 0x52, 0x6C, 0x8F, 0xC0, 0x53, 0x40, 0xDF, 0x50, -0x54, 0x4C, 0x71, 0xC0, 0x55, 0x20, 0xC1, 0x50, 0x56, 0x2C, 0x53, 0xC0, 0x57, 0x00, 0xA3, 0x50, -0x58, 0x15, 0x70, 0x40, 0x58, 0xE0, 0x85, 0x50, 0x59, 0xF5, 0x52, 0x40, 0x5A, 0xC0, 0x67, 0x50, -0x5B, 0xD5, 0x34, 0x40, 0x5C, 0xA9, 0x83, 0xD0, 0x5D, 0xB5, 0x16, 0x40, 0x5E, 0x89, 0x65, 0xD0, -0x5F, 0x94, 0xF8, 0x40, 0x60, 0x69, 0x47, 0xD0, 0x61, 0x7E, 0x14, 0xC0, 0x62, 0x49, 0x29, 0xD0, -0x63, 0x5D, 0xF6, 0xC0, 0x64, 0x29, 0x0B, 0xD0, 0x65, 0x3D, 0xD8, 0xC0, 0x66, 0x12, 0x28, 0x50, -0x67, 0x1D, 0xBA, 0xC0, 0x67, 0xF2, 0x0A, 0x50, 0x68, 0xFD, 0x9C, 0xC0, 0x69, 0xD1, 0xEC, 0x50, -0x6A, 0xDD, 0x7E, 0xC0, 0x6B, 0xB1, 0xCE, 0x50, 0x6C, 0xC6, 0x9B, 0x40, 0x6D, 0x91, 0xB0, 0x50, -0x6E, 0xA6, 0x7D, 0x40, 0x6F, 0x71, 0x92, 0x50, 0x70, 0x86, 0x5F, 0x40, 0x71, 0x5A, 0xAE, 0xD0, -0x72, 0x66, 0x41, 0x40, 0x73, 0x3A, 0x90, 0xD0, 0x74, 0x46, 0x23, 0x40, 0x75, 0x1A, 0x72, 0xD0, -0x76, 0x2F, 0x3F, 0xC0, 0x76, 0xFA, 0x54, 0xD0, 0x78, 0x0F, 0x21, 0xC0, 0x78, 0xDA, 0x36, 0xD0, -0x79, 0xEF, 0x03, 0xC0, 0x7A, 0xBA, 0x18, 0xD0, 0x7B, 0xCE, 0xE5, 0xC0, 0x7C, 0xA3, 0x35, 0x50, -0x7D, 0xAE, 0xC7, 0xC0, 0x7E, 0x83, 0x17, 0x50, 0x7F, 0x8E, 0xA9, 0xC0, 0x01, 0x02, 0x03, 0x02, +0x45, 0x44, 0x27, 0x40, 0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x2D, 0x43, 0xC0, 0x47, 0xD3, 0x6E, 0xD0, +0x49, 0x0D, 0x25, 0xC0, 0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xED, 0x07, 0xC0, 0x4B, 0x9C, 0x6D, 0x50, +0x4C, 0xD6, 0x24, 0x40, 0x4D, 0x7C, 0x4F, 0x50, 0x4E, 0xB6, 0x06, 0x40, 0x4F, 0x5C, 0x31, 0x50, +0x50, 0x95, 0xE8, 0x40, 0x51, 0x3C, 0x13, 0x50, 0x52, 0x75, 0xCA, 0x40, 0x53, 0x1B, 0xF5, 0x50, +0x54, 0x55, 0xAC, 0x40, 0x54, 0xFB, 0xD7, 0x50, 0x56, 0x35, 0x8E, 0x40, 0x56, 0xE4, 0xF3, 0xD0, +0x58, 0x1E, 0xAA, 0xC0, 0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xFE, 0x8C, 0xC0, 0x5A, 0xA4, 0xB7, 0xD0, +0x5B, 0xDE, 0x6E, 0xC0, 0x5C, 0x84, 0x99, 0xD0, 0x5D, 0xBE, 0x50, 0xC0, 0x5E, 0x64, 0x7B, 0xD0, +0x5F, 0x9E, 0x32, 0xC0, 0x60, 0x4D, 0x98, 0x50, 0x61, 0x87, 0x4F, 0x40, 0x62, 0x2D, 0x7A, 0x50, +0x63, 0x67, 0x31, 0x40, 0x64, 0x0D, 0x5C, 0x50, 0x65, 0x47, 0x13, 0x40, 0x65, 0xED, 0x3E, 0x50, +0x67, 0x26, 0xF5, 0x40, 0x67, 0xCD, 0x20, 0x50, 0x69, 0x06, 0xD7, 0x40, 0x69, 0xAD, 0x02, 0x50, +0x6A, 0xE6, 0xB9, 0x40, 0x6B, 0x96, 0x1E, 0xD0, 0x6C, 0xCF, 0xD5, 0xC0, 0x6D, 0x76, 0x00, 0xD0, +0x6E, 0xAF, 0xB7, 0xC0, 0x6F, 0x55, 0xE2, 0xD0, 0x70, 0x8F, 0x99, 0xC0, 0x71, 0x35, 0xC4, 0xD0, +0x72, 0x6F, 0x7B, 0xC0, 0x73, 0x15, 0xA6, 0xD0, 0x74, 0x4F, 0x5D, 0xC0, 0x74, 0xFE, 0xC3, 0x50, +0x76, 0x38, 0x7A, 0x40, 0x76, 0xDE, 0xA5, 0x50, 0x78, 0x18, 0x5C, 0x40, 0x78, 0xBE, 0x87, 0x50, +0x79, 0xF8, 0x3E, 0x40, 0x7A, 0x9E, 0x69, 0x50, 0x7B, 0xD8, 0x20, 0x40, 0x7C, 0x7E, 0x4B, 0x50, +0x7D, 0xB8, 0x02, 0x40, 0x7E, 0x5E, 0x2D, 0x50, 0x7F, 0x97, 0xE4, 0x40, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, @@ -4258,22 +4257,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, -0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, 0x47, 0x24, 0x25, 0x60, 0x47, 0xF8, 0x74, 0xF0, -0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, 0x4A, 0xE3, 0xE9, 0x60, 0x4B, 0xB8, 0x38, 0xF0, -0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, 0x4E, 0xAC, 0xE7, 0xE0, 0x4F, 0x77, 0xFC, 0xF0, -0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, 0x52, 0x6C, 0xAB, 0xE0, 0x53, 0x40, 0xFB, 0x70, -0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, 0x56, 0x2C, 0x6F, 0xE0, 0x57, 0x00, 0xBF, 0x70, -0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, 0x59, 0xF5, 0x6E, 0x60, 0x5A, 0xC0, 0x83, 0x70, -0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, 0x5D, 0xB5, 0x32, 0x60, 0x5E, 0x89, 0x81, 0xF0, -0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, 0x61, 0x7E, 0x30, 0xE0, 0x62, 0x49, 0x45, 0xF0, -0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, 0x65, 0x3D, 0xF4, 0xE0, 0x66, 0x12, 0x44, 0x70, -0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, 0x68, 0xFD, 0xB8, 0xE0, 0x69, 0xD2, 0x08, 0x70, -0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, 0x6C, 0xC6, 0xB7, 0x60, 0x6D, 0x91, 0xCC, 0x70, -0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, 0x70, 0x86, 0x7B, 0x60, 0x71, 0x5A, 0xCA, 0xF0, -0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, 0x74, 0x46, 0x3F, 0x60, 0x75, 0x1A, 0x8E, 0xF0, -0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, 0x78, 0x0F, 0x3D, 0xE0, 0x78, 0xDA, 0x52, 0xF0, -0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, 0x7B, 0xCF, 0x01, 0xE0, 0x7C, 0xA3, 0x51, 0x70, -0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, 0x7F, 0x8E, 0xC5, 0xE0, 0x00, 0x01, 0x00, 0x01, +0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, +0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, +0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, +0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, +0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, +0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, +0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, +0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, +0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, +0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, +0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, +0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, +0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, +0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, +0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, +0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 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, 0x01, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, @@ -4457,23 +4456,23 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0x1B, 0xDA, 0xE0, 0x38, 0xE6, 0xEF, 0xF0, 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, -0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, -0x47, 0x24, 0x25, 0x60, 0x47, 0xF8, 0x74, 0xF0, 0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, -0x4A, 0xE3, 0xE9, 0x60, 0x4B, 0xB8, 0x38, 0xF0, 0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, -0x4E, 0xAC, 0xE7, 0xE0, 0x4F, 0x77, 0xFC, 0xF0, 0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, -0x52, 0x6C, 0xAB, 0xE0, 0x53, 0x40, 0xFB, 0x70, 0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, -0x56, 0x2C, 0x6F, 0xE0, 0x57, 0x00, 0xBF, 0x70, 0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, -0x59, 0xF5, 0x6E, 0x60, 0x5A, 0xC0, 0x83, 0x70, 0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, -0x5D, 0xB5, 0x32, 0x60, 0x5E, 0x89, 0x81, 0xF0, 0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, -0x61, 0x7E, 0x30, 0xE0, 0x62, 0x49, 0x45, 0xF0, 0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, -0x65, 0x3D, 0xF4, 0xE0, 0x66, 0x12, 0x44, 0x70, 0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, -0x68, 0xFD, 0xB8, 0xE0, 0x69, 0xD2, 0x08, 0x70, 0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, -0x6C, 0xC6, 0xB7, 0x60, 0x6D, 0x91, 0xCC, 0x70, 0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, -0x70, 0x86, 0x7B, 0x60, 0x71, 0x5A, 0xCA, 0xF0, 0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, -0x74, 0x46, 0x3F, 0x60, 0x75, 0x1A, 0x8E, 0xF0, 0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, -0x78, 0x0F, 0x3D, 0xE0, 0x78, 0xDA, 0x52, 0xF0, 0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, -0x7B, 0xCF, 0x01, 0xE0, 0x7C, 0xA3, 0x51, 0x70, 0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, -0x7F, 0x8E, 0xC5, 0xE0, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, +0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, +0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, +0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, +0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, +0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, +0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, +0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, +0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, +0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, +0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, +0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, +0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, +0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, +0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, +0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, +0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, +0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x00, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, @@ -4644,22 +4643,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, -0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, 0x47, 0x24, 0x25, 0x60, -0x47, 0xF8, 0x74, 0xF0, 0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, 0x4A, 0xE3, 0xE9, 0x60, -0x4B, 0xB8, 0x38, 0xF0, 0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, 0x4E, 0xAC, 0xE7, 0xE0, -0x4F, 0x77, 0xFC, 0xF0, 0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, 0x52, 0x6C, 0xAB, 0xE0, -0x53, 0x40, 0xFB, 0x70, 0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, 0x56, 0x2C, 0x6F, 0xE0, -0x57, 0x00, 0xBF, 0x70, 0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, 0x59, 0xF5, 0x6E, 0x60, -0x5A, 0xC0, 0x83, 0x70, 0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, 0x5D, 0xB5, 0x32, 0x60, -0x5E, 0x89, 0x81, 0xF0, 0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, 0x61, 0x7E, 0x30, 0xE0, -0x62, 0x49, 0x45, 0xF0, 0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, 0x65, 0x3D, 0xF4, 0xE0, -0x66, 0x12, 0x44, 0x70, 0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, 0x68, 0xFD, 0xB8, 0xE0, -0x69, 0xD2, 0x08, 0x70, 0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, 0x6C, 0xC6, 0xB7, 0x60, -0x6D, 0x91, 0xCC, 0x70, 0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, 0x70, 0x86, 0x7B, 0x60, -0x71, 0x5A, 0xCA, 0xF0, 0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, 0x74, 0x46, 0x3F, 0x60, -0x75, 0x1A, 0x8E, 0xF0, 0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, 0x78, 0x0F, 0x3D, 0xE0, -0x78, 0xDA, 0x52, 0xF0, 0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, 0x7B, 0xCF, 0x01, 0xE0, -0x7C, 0xA3, 0x51, 0x70, 0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, 0x7F, 0x8E, 0xC5, 0xE0, +0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, +0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, +0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, +0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, +0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, +0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, +0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, +0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, +0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, +0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, +0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, +0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, +0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, +0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, +0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, +0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x04, 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, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, @@ -4786,23 +4785,23 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0x1B, 0xE8, 0xF0, 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x8E, 0xF0, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x70, 0xF0, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x8D, 0x70, 0x42, 0x4F, 0xA2, 0x80, -0x43, 0x64, 0x6F, 0x70, 0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, 0x46, 0x0F, 0x66, 0x80, -0x47, 0x24, 0x33, 0x70, 0x47, 0xF8, 0x83, 0x00, 0x49, 0x04, 0x15, 0x70, 0x49, 0xD8, 0x65, 0x00, -0x4A, 0xE3, 0xF7, 0x70, 0x4B, 0xB8, 0x47, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x4D, 0x98, 0x29, 0x00, -0x4E, 0xAC, 0xF5, 0xF0, 0x4F, 0x78, 0x0B, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x51, 0x61, 0x27, 0x80, -0x52, 0x6C, 0xB9, 0xF0, 0x53, 0x41, 0x09, 0x80, 0x54, 0x4C, 0x9B, 0xF0, 0x55, 0x20, 0xEB, 0x80, -0x56, 0x2C, 0x7D, 0xF0, 0x57, 0x00, 0xCD, 0x80, 0x58, 0x15, 0x9A, 0x70, 0x58, 0xE0, 0xAF, 0x80, -0x59, 0xF5, 0x7C, 0x70, 0x5A, 0xC0, 0x91, 0x80, 0x5B, 0xD5, 0x5E, 0x70, 0x5C, 0xA9, 0xAE, 0x00, -0x5D, 0xB5, 0x40, 0x70, 0x5E, 0x89, 0x90, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x60, 0x69, 0x72, 0x00, -0x61, 0x7E, 0x3E, 0xF0, 0x62, 0x49, 0x54, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x64, 0x29, 0x36, 0x00, -0x65, 0x3E, 0x02, 0xF0, 0x66, 0x12, 0x52, 0x80, 0x67, 0x1D, 0xE4, 0xF0, 0x67, 0xF2, 0x34, 0x80, -0x68, 0xFD, 0xC6, 0xF0, 0x69, 0xD2, 0x16, 0x80, 0x6A, 0xDD, 0xA8, 0xF0, 0x6B, 0xB1, 0xF8, 0x80, -0x6C, 0xC6, 0xC5, 0x70, 0x6D, 0x91, 0xDA, 0x80, 0x6E, 0xA6, 0xA7, 0x70, 0x6F, 0x71, 0xBC, 0x80, -0x70, 0x86, 0x89, 0x70, 0x71, 0x5A, 0xD9, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x73, 0x3A, 0xBB, 0x00, -0x74, 0x46, 0x4D, 0x70, 0x75, 0x1A, 0x9D, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x76, 0xFA, 0x7F, 0x00, -0x78, 0x0F, 0x4B, 0xF0, 0x78, 0xDA, 0x61, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x7A, 0xBA, 0x43, 0x00, -0x7B, 0xCF, 0x0F, 0xF0, 0x7C, 0xA3, 0x5F, 0x80, 0x7D, 0xAE, 0xF1, 0xF0, 0x7E, 0x83, 0x41, 0x80, -0x7F, 0x8E, 0xD3, 0xF0, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, +0x43, 0x64, 0x6F, 0x70, 0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, 0x45, 0xF3, 0xB7, 0x00, +0x47, 0x2D, 0x6D, 0xF0, 0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x49, 0xB3, 0x7B, 0x00, +0x4A, 0xED, 0x31, 0xF0, 0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x4E, 0x70, 0x4D, 0x7C, 0x79, 0x80, +0x4E, 0xB6, 0x30, 0x70, 0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x12, 0x70, 0x51, 0x3C, 0x3D, 0x80, +0x52, 0x75, 0xF4, 0x70, 0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xD6, 0x70, 0x54, 0xFC, 0x01, 0x80, +0x56, 0x35, 0xB8, 0x70, 0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x58, 0xC5, 0x00, 0x00, +0x59, 0xFE, 0xB6, 0xF0, 0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x5C, 0x84, 0xC4, 0x00, +0x5D, 0xBE, 0x7A, 0xF0, 0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x60, 0x4D, 0xC2, 0x80, +0x61, 0x87, 0x79, 0x70, 0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x5B, 0x70, 0x64, 0x0D, 0x86, 0x80, +0x65, 0x47, 0x3D, 0x70, 0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x1F, 0x70, 0x67, 0xCD, 0x4A, 0x80, +0x69, 0x07, 0x01, 0x70, 0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xE3, 0x70, 0x6B, 0x96, 0x49, 0x00, +0x6C, 0xCF, 0xFF, 0xF0, 0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x6F, 0x56, 0x0D, 0x00, +0x70, 0x8F, 0xC3, 0xF0, 0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x73, 0x15, 0xD1, 0x00, +0x74, 0x4F, 0x87, 0xF0, 0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xA4, 0x70, 0x76, 0xDE, 0xCF, 0x80, +0x78, 0x18, 0x86, 0x70, 0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x68, 0x70, 0x7A, 0x9E, 0x93, 0x80, +0x7B, 0xD8, 0x4A, 0x70, 0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x2C, 0x70, 0x7E, 0x5E, 0x57, 0x80, +0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x00, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, @@ -4834,22 +4833,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x8E, 0xF0, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x70, 0xF0, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x8D, 0x70, 0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x6F, 0x70, -0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, 0x46, 0x0F, 0x66, 0x80, 0x47, 0x24, 0x33, 0x70, -0x47, 0xF8, 0x83, 0x00, 0x49, 0x04, 0x15, 0x70, 0x49, 0xD8, 0x65, 0x00, 0x4A, 0xE3, 0xF7, 0x70, -0x4B, 0xB8, 0x47, 0x00, 0x4C, 0xCD, 0x13, 0xF0, 0x4D, 0x98, 0x29, 0x00, 0x4E, 0xAC, 0xF5, 0xF0, -0x4F, 0x78, 0x0B, 0x00, 0x50, 0x8C, 0xD7, 0xF0, 0x51, 0x61, 0x27, 0x80, 0x52, 0x6C, 0xB9, 0xF0, -0x53, 0x41, 0x09, 0x80, 0x54, 0x4C, 0x9B, 0xF0, 0x55, 0x20, 0xEB, 0x80, 0x56, 0x2C, 0x7D, 0xF0, -0x57, 0x00, 0xCD, 0x80, 0x58, 0x15, 0x9A, 0x70, 0x58, 0xE0, 0xAF, 0x80, 0x59, 0xF5, 0x7C, 0x70, -0x5A, 0xC0, 0x91, 0x80, 0x5B, 0xD5, 0x5E, 0x70, 0x5C, 0xA9, 0xAE, 0x00, 0x5D, 0xB5, 0x40, 0x70, -0x5E, 0x89, 0x90, 0x00, 0x5F, 0x95, 0x22, 0x70, 0x60, 0x69, 0x72, 0x00, 0x61, 0x7E, 0x3E, 0xF0, -0x62, 0x49, 0x54, 0x00, 0x63, 0x5E, 0x20, 0xF0, 0x64, 0x29, 0x36, 0x00, 0x65, 0x3E, 0x02, 0xF0, -0x66, 0x12, 0x52, 0x80, 0x67, 0x1D, 0xE4, 0xF0, 0x67, 0xF2, 0x34, 0x80, 0x68, 0xFD, 0xC6, 0xF0, -0x69, 0xD2, 0x16, 0x80, 0x6A, 0xDD, 0xA8, 0xF0, 0x6B, 0xB1, 0xF8, 0x80, 0x6C, 0xC6, 0xC5, 0x70, -0x6D, 0x91, 0xDA, 0x80, 0x6E, 0xA6, 0xA7, 0x70, 0x6F, 0x71, 0xBC, 0x80, 0x70, 0x86, 0x89, 0x70, -0x71, 0x5A, 0xD9, 0x00, 0x72, 0x66, 0x6B, 0x70, 0x73, 0x3A, 0xBB, 0x00, 0x74, 0x46, 0x4D, 0x70, -0x75, 0x1A, 0x9D, 0x00, 0x76, 0x2F, 0x69, 0xF0, 0x76, 0xFA, 0x7F, 0x00, 0x78, 0x0F, 0x4B, 0xF0, -0x78, 0xDA, 0x61, 0x00, 0x79, 0xEF, 0x2D, 0xF0, 0x7A, 0xBA, 0x43, 0x00, 0x7B, 0xCF, 0x0F, 0xF0, -0x7C, 0xA3, 0x5F, 0x80, 0x7D, 0xAE, 0xF1, 0xF0, 0x7E, 0x83, 0x41, 0x80, 0x7F, 0x8E, 0xD3, 0xF0, +0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, 0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x6D, 0xF0, +0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x31, 0xF0, +0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x4E, 0x70, 0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x30, 0x70, +0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x12, 0x70, 0x51, 0x3C, 0x3D, 0x80, 0x52, 0x75, 0xF4, 0x70, +0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xD6, 0x70, 0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xB8, 0x70, +0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, +0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, +0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x79, 0x70, +0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x5B, 0x70, 0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x3D, 0x70, +0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x1F, 0x70, 0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x01, 0x70, +0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xE3, 0x70, 0x6B, 0x96, 0x49, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, +0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xC3, 0xF0, +0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x87, 0xF0, +0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xA4, 0x70, 0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x86, 0x70, +0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x68, 0x70, 0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x4A, 0x70, +0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x2C, 0x70, 0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x0E, 0x70, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x04, 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, @@ -5375,23 +5374,23 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0x1B, 0xDA, 0xE0, 0x38, 0xE6, 0xEF, 0xF0, 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, -0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, -0x47, 0x24, 0x25, 0x60, 0x47, 0xF8, 0x74, 0xF0, 0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, -0x4A, 0xE3, 0xE9, 0x60, 0x4B, 0xB8, 0x38, 0xF0, 0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, -0x4E, 0xAC, 0xE7, 0xE0, 0x4F, 0x77, 0xFC, 0xF0, 0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, -0x52, 0x6C, 0xAB, 0xE0, 0x53, 0x40, 0xFB, 0x70, 0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, -0x56, 0x2C, 0x6F, 0xE0, 0x57, 0x00, 0xBF, 0x70, 0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, -0x59, 0xF5, 0x6E, 0x60, 0x5A, 0xC0, 0x83, 0x70, 0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, -0x5D, 0xB5, 0x32, 0x60, 0x5E, 0x89, 0x81, 0xF0, 0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, -0x61, 0x7E, 0x30, 0xE0, 0x62, 0x49, 0x45, 0xF0, 0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, -0x65, 0x3D, 0xF4, 0xE0, 0x66, 0x12, 0x44, 0x70, 0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, -0x68, 0xFD, 0xB8, 0xE0, 0x69, 0xD2, 0x08, 0x70, 0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, -0x6C, 0xC6, 0xB7, 0x60, 0x6D, 0x91, 0xCC, 0x70, 0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, -0x70, 0x86, 0x7B, 0x60, 0x71, 0x5A, 0xCA, 0xF0, 0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, -0x74, 0x46, 0x3F, 0x60, 0x75, 0x1A, 0x8E, 0xF0, 0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, -0x78, 0x0F, 0x3D, 0xE0, 0x78, 0xDA, 0x52, 0xF0, 0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, -0x7B, 0xCF, 0x01, 0xE0, 0x7C, 0xA3, 0x51, 0x70, 0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, -0x7F, 0x8E, 0xC5, 0xE0, 0x01, 0x02, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, +0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, +0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, +0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, +0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, +0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, +0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, +0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, +0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, +0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, +0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, +0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, +0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, +0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, +0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, +0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, +0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, +0x7F, 0x98, 0x00, 0x60, 0x01, 0x02, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, @@ -5506,22 +5505,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, -0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, 0x47, 0x24, 0x25, 0x60, 0x47, 0xF8, 0x74, 0xF0, -0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, 0x4A, 0xE3, 0xE9, 0x60, 0x4B, 0xB8, 0x38, 0xF0, -0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, 0x4E, 0xAC, 0xE7, 0xE0, 0x4F, 0x77, 0xFC, 0xF0, -0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, 0x52, 0x6C, 0xAB, 0xE0, 0x53, 0x40, 0xFB, 0x70, -0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, 0x56, 0x2C, 0x6F, 0xE0, 0x57, 0x00, 0xBF, 0x70, -0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, 0x59, 0xF5, 0x6E, 0x60, 0x5A, 0xC0, 0x83, 0x70, -0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, 0x5D, 0xB5, 0x32, 0x60, 0x5E, 0x89, 0x81, 0xF0, -0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, 0x61, 0x7E, 0x30, 0xE0, 0x62, 0x49, 0x45, 0xF0, -0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, 0x65, 0x3D, 0xF4, 0xE0, 0x66, 0x12, 0x44, 0x70, -0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, 0x68, 0xFD, 0xB8, 0xE0, 0x69, 0xD2, 0x08, 0x70, -0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, 0x6C, 0xC6, 0xB7, 0x60, 0x6D, 0x91, 0xCC, 0x70, -0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, 0x70, 0x86, 0x7B, 0x60, 0x71, 0x5A, 0xCA, 0xF0, -0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, 0x74, 0x46, 0x3F, 0x60, 0x75, 0x1A, 0x8E, 0xF0, -0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, 0x78, 0x0F, 0x3D, 0xE0, 0x78, 0xDA, 0x52, 0xF0, -0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, 0x7B, 0xCF, 0x01, 0xE0, 0x7C, 0xA3, 0x51, 0x70, -0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, 0x7F, 0x8E, 0xC5, 0xE0, 0x00, 0x01, 0x00, 0x01, +0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, +0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, +0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, +0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, +0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, +0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, +0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, +0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, +0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, +0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, +0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, +0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, +0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, +0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, +0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, +0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 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, 0x01, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, @@ -5674,8 +5673,8 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* America/Winnipeg */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xB9, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x01, 0xFB, 0xE0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x01, 0xFB, 0xE0, 0x9B, 0xC3, 0xBA, 0x50, 0x9E, 0xB8, 0xA1, 0x80, 0x9F, 0xC0, 0x3F, 0x70, 0xC2, 0xA0, 0x3B, 0x80, 0xC3, 0x4F, 0x84, 0xF0, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x88, 0x68, 0x00, 0xD4, 0x53, 0x60, 0xF0, 0xD5, 0x55, 0xD5, 0x00, 0xD6, 0x20, 0xCD, 0xF0, @@ -5706,38 +5705,38 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x7D, 0x80, -0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x5F, 0x80, 0x46, 0x0F, 0x66, 0x80, 0x47, 0x24, 0x41, 0x80, -0x47, 0xF8, 0x83, 0x00, 0x49, 0x04, 0x23, 0x80, 0x49, 0xD8, 0x65, 0x00, 0x4A, 0xE4, 0x05, 0x80, -0x4B, 0xB8, 0x47, 0x00, 0x4C, 0xCD, 0x22, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x4E, 0xAD, 0x04, 0x00, -0x4F, 0x78, 0x0B, 0x00, 0x50, 0x8C, 0xE6, 0x00, 0x51, 0x61, 0x27, 0x80, 0x52, 0x6C, 0xC8, 0x00, -0x53, 0x41, 0x09, 0x80, 0x54, 0x4C, 0xAA, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x56, 0x2C, 0x8C, 0x00, -0x57, 0x00, 0xCD, 0x80, 0x58, 0x15, 0xA8, 0x80, 0x58, 0xE0, 0xAF, 0x80, 0x59, 0xF5, 0x8A, 0x80, -0x5A, 0xC0, 0x91, 0x80, 0x5B, 0xD5, 0x6C, 0x80, 0x5C, 0xA9, 0xAE, 0x00, 0x5D, 0xB5, 0x4E, 0x80, -0x5E, 0x89, 0x90, 0x00, 0x5F, 0x95, 0x30, 0x80, 0x60, 0x69, 0x72, 0x00, 0x61, 0x7E, 0x4D, 0x00, -0x62, 0x49, 0x54, 0x00, 0x63, 0x5E, 0x2F, 0x00, 0x64, 0x29, 0x36, 0x00, 0x65, 0x3E, 0x11, 0x00, -0x66, 0x12, 0x52, 0x80, 0x67, 0x1D, 0xF3, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x68, 0xFD, 0xD5, 0x00, -0x69, 0xD2, 0x16, 0x80, 0x6A, 0xDD, 0xB7, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x6C, 0xC6, 0xD3, 0x80, -0x6D, 0x91, 0xDA, 0x80, 0x6E, 0xA6, 0xB5, 0x80, 0x6F, 0x71, 0xBC, 0x80, 0x70, 0x86, 0x97, 0x80, -0x71, 0x5A, 0xD9, 0x00, 0x72, 0x66, 0x79, 0x80, 0x73, 0x3A, 0xBB, 0x00, 0x74, 0x46, 0x5B, 0x80, -0x75, 0x1A, 0x9D, 0x00, 0x76, 0x2F, 0x78, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x78, 0x0F, 0x5A, 0x00, -0x78, 0xDA, 0x61, 0x00, 0x79, 0xEF, 0x3C, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x7B, 0xCF, 0x1E, 0x00, -0x7C, 0xA3, 0x5F, 0x80, 0x7D, 0xAF, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x7F, 0x8E, 0xE2, 0x00, +0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x7C, 0x00, +0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x40, 0x00, +0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x3E, 0x80, +0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x3D, 0x80, 0x52, 0x76, 0x02, 0x80, +0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xC6, 0x80, +0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, +0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x89, 0x00, +0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x87, 0x80, +0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x4B, 0x80, +0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x0F, 0x80, +0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x49, 0x00, 0x6C, 0xD0, 0x0E, 0x00, +0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xD2, 0x00, +0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x96, 0x00, +0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x94, 0x80, +0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x58, 0x80, +0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 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, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, +0x01, 0x00, 0x01, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, -0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, -0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, -0x00, +0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0x43, 0x44, 0x54, +0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, /* America/Yakutat */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -6141,24 +6140,24 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x33, 0x44, 0x28, 0x60, 0x34, 0x21, 0xA4, 0x60, 0x35, 0x24, 0x0A, 0x60, 0x36, 0x01, 0x86, 0x60, 0x37, 0x7A, 0x93, 0x60, 0x37, 0xF2, 0x8B, 0xE0, 0x38, 0xE2, 0x7C, 0xE0, 0x39, 0xD2, 0x6D, 0xE0, 0x3A, 0xC2, 0x5E, 0xE0, 0x3B, 0xB2, 0x4F, 0xE0, 0x3C, 0xA2, 0x40, 0xE0, 0x3D, 0x92, 0x31, 0xE0, -0x3E, 0x82, 0x22, 0xE0, 0x3F, 0x72, 0x13, 0xE0, 0x40, 0x62, 0x04, 0xE0, 0x41, 0x5B, 0x30, 0x60, -0x42, 0x4B, 0x21, 0x60, 0x43, 0x3B, 0x12, 0x60, 0x44, 0x2B, 0x03, 0x60, 0x45, 0x1A, 0xF4, 0x60, -0x46, 0x0A, 0xE5, 0x60, 0x46, 0xFA, 0xD6, 0x60, 0x47, 0xEA, 0xC7, 0x60, 0x48, 0xDA, 0xB8, 0x60, -0x49, 0xCA, 0xA9, 0x60, 0x4A, 0xBA, 0x9A, 0x60, 0x4B, 0xAA, 0x8B, 0x60, 0x4C, 0xA3, 0xB6, 0xE0, -0x4D, 0x93, 0xA7, 0xE0, 0x4E, 0x83, 0x98, 0xE0, 0x4F, 0x73, 0x89, 0xE0, 0x50, 0x63, 0x7A, 0xE0, -0x51, 0x53, 0x6B, 0xE0, 0x52, 0x43, 0x5C, 0xE0, 0x53, 0x33, 0x4D, 0xE0, 0x54, 0x23, 0x3E, 0xE0, -0x55, 0x13, 0x2F, 0xE0, 0x56, 0x03, 0x20, 0xE0, 0x56, 0xFC, 0x4C, 0x60, 0x57, 0xEC, 0x3D, 0x60, -0x58, 0xDC, 0x2E, 0x60, 0x59, 0xCC, 0x1F, 0x60, 0x5A, 0xBC, 0x10, 0x60, 0x5B, 0xAC, 0x01, 0x60, -0x5C, 0x9B, 0xF2, 0x60, 0x5D, 0x8B, 0xE3, 0x60, 0x5E, 0x7B, 0xD4, 0x60, 0x5F, 0x6B, 0xC5, 0x60, -0x60, 0x5B, 0xB6, 0x60, 0x61, 0x54, 0xE1, 0xE0, 0x62, 0x44, 0xD2, 0xE0, 0x63, 0x34, 0xC3, 0xE0, -0x64, 0x24, 0xB4, 0xE0, 0x65, 0x14, 0xA5, 0xE0, 0x66, 0x04, 0x96, 0xE0, 0x66, 0xF4, 0x87, 0xE0, -0x67, 0xE4, 0x78, 0xE0, 0x68, 0xD4, 0x69, 0xE0, 0x69, 0xC4, 0x5A, 0xE0, 0x6A, 0xB4, 0x4B, 0xE0, -0x6B, 0xA4, 0x3C, 0xE0, 0x6C, 0x9D, 0x68, 0x60, 0x6D, 0x8D, 0x59, 0x60, 0x6E, 0x7D, 0x4A, 0x60, -0x6F, 0x6D, 0x3B, 0x60, 0x70, 0x5D, 0x2C, 0x60, 0x71, 0x4D, 0x1D, 0x60, 0x72, 0x3D, 0x0E, 0x60, -0x73, 0x2C, 0xFF, 0x60, 0x74, 0x1C, 0xF0, 0x60, 0x75, 0x0C, 0xE1, 0x60, 0x76, 0x06, 0x0C, 0xE0, -0x76, 0xF5, 0xFD, 0xE0, 0x77, 0xE5, 0xEE, 0xE0, 0x78, 0xD5, 0xDF, 0xE0, 0x79, 0xC5, 0xD0, 0xE0, -0x7A, 0xB5, 0xC1, 0xE0, 0x7B, 0xA5, 0xB2, 0xE0, 0x7C, 0x95, 0xA3, 0xE0, 0x7D, 0x85, 0x94, 0xE0, -0x7E, 0x75, 0x85, 0xE0, 0x7F, 0x65, 0x76, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x3E, 0x82, 0x22, 0xE0, 0x3F, 0x98, 0x4F, 0x60, 0x40, 0x62, 0x04, 0xE0, 0x41, 0x6E, 0xF6, 0xE0, +0x42, 0x4B, 0x21, 0x60, 0x43, 0x3C, 0x63, 0xE0, 0x44, 0x2B, 0x03, 0x60, 0x45, 0x1C, 0x45, 0xE0, +0x46, 0x0A, 0xE5, 0x60, 0x46, 0xFC, 0x27, 0xE0, 0x47, 0xEA, 0xC7, 0x60, 0x48, 0xDC, 0x09, 0xE0, +0x49, 0xCA, 0xA9, 0x60, 0x4A, 0xBB, 0xEB, 0xE0, 0x4B, 0xAA, 0x8B, 0x60, 0x4C, 0x9B, 0xCD, 0xE0, +0x4D, 0x93, 0xA7, 0xE0, 0x4E, 0x84, 0xEA, 0x60, 0x4F, 0x73, 0x89, 0xE0, 0x50, 0x64, 0xCC, 0x60, +0x51, 0x53, 0x6B, 0xE0, 0x52, 0x44, 0xAE, 0x60, 0x53, 0x33, 0x4D, 0xE0, 0x54, 0x24, 0x90, 0x60, +0x55, 0x13, 0x2F, 0xE0, 0x56, 0x04, 0x72, 0x60, 0x56, 0xFC, 0x4C, 0x60, 0x57, 0xED, 0x8E, 0xE0, +0x58, 0xDC, 0x2E, 0x60, 0x59, 0xCD, 0x70, 0xE0, 0x5A, 0xBC, 0x10, 0x60, 0x5B, 0xAD, 0x52, 0xE0, +0x5C, 0x9B, 0xF2, 0x60, 0x5D, 0x8D, 0x34, 0xE0, 0x5E, 0x7B, 0xD4, 0x60, 0x5F, 0x6D, 0x16, 0xE0, +0x60, 0x5B, 0xB6, 0x60, 0x61, 0x4C, 0xF8, 0xE0, 0x62, 0x44, 0xD2, 0xE0, 0x63, 0x36, 0x15, 0x60, +0x64, 0x24, 0xB4, 0xE0, 0x65, 0x15, 0xF7, 0x60, 0x66, 0x04, 0x96, 0xE0, 0x66, 0xF5, 0xD9, 0x60, +0x67, 0xE4, 0x78, 0xE0, 0x68, 0xD5, 0xBB, 0x60, 0x69, 0xC4, 0x5A, 0xE0, 0x6A, 0xB5, 0x9D, 0x60, +0x6B, 0xA4, 0x3C, 0xE0, 0x6C, 0x95, 0x7F, 0x60, 0x6D, 0x8D, 0x59, 0x60, 0x6E, 0x7E, 0x9B, 0xE0, +0x6F, 0x6D, 0x3B, 0x60, 0x70, 0x5E, 0x7D, 0xE0, 0x71, 0x4D, 0x1D, 0x60, 0x72, 0x3E, 0x5F, 0xE0, +0x73, 0x2C, 0xFF, 0x60, 0x74, 0x1E, 0x41, 0xE0, 0x75, 0x0C, 0xE1, 0x60, 0x75, 0xFE, 0x23, 0xE0, +0x76, 0xF5, 0xFD, 0xE0, 0x77, 0xE7, 0x40, 0x60, 0x78, 0xD5, 0xDF, 0xE0, 0x79, 0xC7, 0x22, 0x60, +0x7A, 0xB5, 0xC1, 0xE0, 0x7B, 0xA7, 0x04, 0x60, 0x7C, 0x95, 0xA3, 0xE0, 0x7D, 0x86, 0xE6, 0x60, +0x7E, 0x75, 0x85, 0xE0, 0x7F, 0x66, 0xC8, 0x60, 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, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, @@ -6380,27 +6379,27 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x23, 0x3C, 0x1A, 0xE0, 0x24, 0x2C, 0x0B, 0xE0, 0x25, 0x1B, 0xFC, 0xE0, 0x26, 0x0B, 0xED, 0xE0, 0x27, 0x05, 0x19, 0x60, 0x27, 0xF5, 0x0A, 0x60, 0x28, 0xBD, 0x52, 0x40, 0x28, 0xE5, 0x09, 0x70, 0x29, 0xD4, 0xD0, 0x40, 0x2A, 0xC4, 0xB3, 0x30, 0x30, 0xE6, 0xEB, 0xC0, 0x31, 0x5D, 0xD9, 0x10, -0x32, 0x72, 0xB4, 0x10, 0x32, 0xC9, 0x70, 0xC0, 0x33, 0x3D, 0x82, 0xD0, 0x34, 0x52, 0x4F, 0xC0, -0x35, 0x1D, 0x64, 0xD0, 0x36, 0x32, 0x31, 0xC0, 0x36, 0xFD, 0x46, 0xD0, 0x38, 0x1B, 0x4E, 0x40, -0x38, 0xDD, 0x28, 0xD0, 0x39, 0xFB, 0x30, 0x40, 0x3A, 0xBD, 0x0A, 0xD0, 0x3B, 0xDB, 0x12, 0x40, -0x3C, 0xA6, 0x27, 0x50, 0x3D, 0xBA, 0xF4, 0x40, 0x3E, 0x86, 0x09, 0x50, 0x3F, 0x9A, 0xD6, 0x40, -0x40, 0x65, 0xEB, 0x50, 0x41, 0x83, 0xF2, 0xC0, 0x42, 0x45, 0xCD, 0x50, 0x43, 0x63, 0xD4, 0xC0, -0x44, 0x25, 0xAF, 0x50, 0x45, 0x43, 0xB6, 0xC0, 0x46, 0x05, 0x91, 0x50, 0x47, 0x23, 0x98, 0xC0, -0x47, 0xEE, 0xAD, 0xD0, 0x49, 0x03, 0x7A, 0xC0, 0x49, 0xCE, 0x8F, 0xD0, 0x4A, 0xE3, 0x5C, 0xC0, -0x4B, 0xAE, 0x71, 0xD0, 0x4C, 0xCC, 0x79, 0x40, 0x4D, 0x8E, 0x53, 0xD0, 0x4E, 0xAC, 0x5B, 0x40, -0x4F, 0x6E, 0x35, 0xD0, 0x50, 0x8C, 0x3D, 0x40, 0x51, 0x57, 0x52, 0x50, 0x52, 0x6C, 0x1F, 0x40, -0x53, 0x37, 0x34, 0x50, 0x54, 0x4C, 0x01, 0x40, 0x55, 0x17, 0x16, 0x50, 0x56, 0x2B, 0xE3, 0x40, -0x56, 0xF6, 0xF8, 0x50, 0x58, 0x14, 0xFF, 0xC0, 0x58, 0xD6, 0xDA, 0x50, 0x59, 0xF4, 0xE1, 0xC0, -0x5A, 0xB6, 0xBC, 0x50, 0x5B, 0xD4, 0xC3, 0xC0, 0x5C, 0x9F, 0xD8, 0xD0, 0x5D, 0xB4, 0xA5, 0xC0, -0x5E, 0x7F, 0xBA, 0xD0, 0x5F, 0x94, 0x87, 0xC0, 0x60, 0x5F, 0x9C, 0xD0, 0x61, 0x7D, 0xA4, 0x40, -0x62, 0x3F, 0x7E, 0xD0, 0x63, 0x5D, 0x86, 0x40, 0x64, 0x1F, 0x60, 0xD0, 0x65, 0x3D, 0x68, 0x40, -0x66, 0x08, 0x7D, 0x50, 0x67, 0x1D, 0x4A, 0x40, 0x67, 0xE8, 0x5F, 0x50, 0x68, 0xFD, 0x2C, 0x40, -0x69, 0xC8, 0x41, 0x50, 0x6A, 0xDD, 0x0E, 0x40, 0x6B, 0xA8, 0x23, 0x50, 0x6C, 0xC6, 0x2A, 0xC0, -0x6D, 0x88, 0x05, 0x50, 0x6E, 0xA6, 0x0C, 0xC0, 0x6F, 0x67, 0xE7, 0x50, 0x70, 0x85, 0xEE, 0xC0, -0x71, 0x51, 0x03, 0xD0, 0x72, 0x65, 0xD0, 0xC0, 0x73, 0x30, 0xE5, 0xD0, 0x74, 0x45, 0xB2, 0xC0, -0x75, 0x10, 0xC7, 0xD0, 0x76, 0x2E, 0xCF, 0x40, 0x76, 0xF0, 0xA9, 0xD0, 0x78, 0x0E, 0xB1, 0x40, -0x78, 0xD0, 0x8B, 0xD0, 0x79, 0xEE, 0x93, 0x40, 0x7A, 0xB0, 0x6D, 0xD0, 0x7B, 0xCE, 0x75, 0x40, -0x7C, 0x99, 0x8A, 0x50, 0x7D, 0xAE, 0x57, 0x40, 0x7E, 0x79, 0x6C, 0x50, 0x7F, 0x8E, 0x39, 0x40, +0x32, 0x72, 0xB4, 0x10, 0x32, 0xC9, 0x70, 0xC0, 0x33, 0x3D, 0xAD, 0x00, 0x34, 0x52, 0x88, 0x00, +0x35, 0x1D, 0x8F, 0x00, 0x36, 0x32, 0x6A, 0x00, 0x36, 0xFD, 0x71, 0x00, 0x38, 0x1B, 0x86, 0x80, +0x38, 0xDD, 0x53, 0x00, 0x39, 0xFB, 0x68, 0x80, 0x3A, 0xBD, 0x35, 0x00, 0x3B, 0xDB, 0x4A, 0x80, +0x3C, 0xA6, 0x51, 0x80, 0x3D, 0xBB, 0x2C, 0x80, 0x3E, 0x86, 0x33, 0x80, 0x3F, 0x9B, 0x0E, 0x80, +0x40, 0x66, 0x15, 0x80, 0x41, 0x84, 0x2B, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x43, 0x64, 0x0D, 0x00, +0x44, 0x25, 0xD9, 0x80, 0x45, 0x43, 0xEF, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x47, 0x23, 0xD1, 0x00, +0x47, 0xEE, 0xD8, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x4A, 0xE3, 0x95, 0x00, +0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00, 0x4E, 0xAC, 0x93, 0x80, +0x4F, 0x6E, 0x60, 0x00, 0x50, 0x8C, 0x75, 0x80, 0x51, 0x57, 0x7C, 0x80, 0x52, 0x6C, 0x57, 0x80, +0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x39, 0x80, 0x55, 0x17, 0x40, 0x80, 0x56, 0x2C, 0x1B, 0x80, +0x56, 0xF7, 0x22, 0x80, 0x58, 0x15, 0x38, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x59, 0xF5, 0x1A, 0x00, +0x5A, 0xB6, 0xE6, 0x80, 0x5B, 0xD4, 0xFC, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x5D, 0xB4, 0xDE, 0x00, +0x5E, 0x7F, 0xE5, 0x00, 0x5F, 0x94, 0xC0, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x61, 0x7D, 0xDC, 0x80, +0x62, 0x3F, 0xA9, 0x00, 0x63, 0x5D, 0xBE, 0x80, 0x64, 0x1F, 0x8B, 0x00, 0x65, 0x3D, 0xA0, 0x80, +0x66, 0x08, 0xA7, 0x80, 0x67, 0x1D, 0x82, 0x80, 0x67, 0xE8, 0x89, 0x80, 0x68, 0xFD, 0x64, 0x80, +0x69, 0xC8, 0x6B, 0x80, 0x6A, 0xDD, 0x46, 0x80, 0x6B, 0xA8, 0x4D, 0x80, 0x6C, 0xC6, 0x63, 0x00, +0x6D, 0x88, 0x2F, 0x80, 0x6E, 0xA6, 0x45, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x70, 0x86, 0x27, 0x00, +0x71, 0x51, 0x2E, 0x00, 0x72, 0x66, 0x09, 0x00, 0x73, 0x31, 0x10, 0x00, 0x74, 0x45, 0xEB, 0x00, +0x75, 0x10, 0xF2, 0x00, 0x76, 0x2F, 0x07, 0x80, 0x76, 0xF0, 0xD4, 0x00, 0x78, 0x0E, 0xE9, 0x80, +0x78, 0xD0, 0xB6, 0x00, 0x79, 0xEE, 0xCB, 0x80, 0x7A, 0xB0, 0x98, 0x00, 0x7B, 0xCE, 0xAD, 0x80, +0x7C, 0x99, 0xB4, 0x80, 0x7D, 0xAE, 0x8F, 0x80, 0x7E, 0x79, 0x96, 0x80, 0x7F, 0x8E, 0x71, 0x80, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x08, 0x09, 0x0C, 0x0A, 0x0B, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, 0x09, 0x0C, @@ -6738,23 +6737,23 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x36, 0x8B, 0xF3, 0xE0, 0x37, 0x16, 0x61, 0x60, 0x38, 0x06, 0x44, 0x50, 0x38, 0xFF, 0x7D, 0xE0, 0x39, 0xEF, 0x60, 0xD0, 0x3A, 0xDF, 0x5F, 0xE0, 0x3B, 0xCF, 0x42, 0xD0, 0x3C, 0xBF, 0x41, 0xE0, 0x3D, 0xAF, 0x24, 0xD0, 0x3E, 0x9F, 0x23, 0xE0, 0x3F, 0x8F, 0x06, 0xD0, 0x40, 0x7F, 0x05, 0xE0, -0x41, 0x6E, 0xE8, 0xD0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x58, 0x05, 0x50, 0x44, 0x48, 0x04, 0x60, -0x45, 0x37, 0xE7, 0x50, 0x46, 0x27, 0xE6, 0x60, 0x47, 0x17, 0xC9, 0x50, 0x48, 0x07, 0xC8, 0x60, -0x48, 0xF7, 0xAB, 0x50, 0x49, 0xE7, 0xAA, 0x60, 0x4A, 0xD7, 0x8D, 0x50, 0x4B, 0xC7, 0x8C, 0x60, -0x4C, 0xB7, 0x6F, 0x50, 0x4D, 0xA7, 0x6E, 0x60, 0x4E, 0xA0, 0x8B, 0xD0, 0x4F, 0x90, 0x8A, 0xE0, -0x50, 0x80, 0x6D, 0xD0, 0x51, 0x70, 0x6C, 0xE0, 0x52, 0x60, 0x4F, 0xD0, 0x53, 0x50, 0x4E, 0xE0, -0x54, 0x40, 0x31, 0xD0, 0x55, 0x30, 0x30, 0xE0, 0x56, 0x20, 0x13, 0xD0, 0x57, 0x10, 0x12, 0xE0, -0x58, 0x09, 0x30, 0x50, 0x58, 0xF9, 0x2F, 0x60, 0x59, 0xE9, 0x12, 0x50, 0x5A, 0xD9, 0x11, 0x60, -0x5B, 0xC8, 0xF4, 0x50, 0x5C, 0xB8, 0xF3, 0x60, 0x5D, 0xA8, 0xD6, 0x50, 0x5E, 0x98, 0xD5, 0x60, -0x5F, 0x88, 0xB8, 0x50, 0x60, 0x78, 0xB7, 0x60, 0x61, 0x68, 0x9A, 0x50, 0x62, 0x58, 0x99, 0x60, -0x63, 0x51, 0xB6, 0xD0, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x31, 0x98, 0xD0, 0x66, 0x21, 0x97, 0xE0, -0x67, 0x11, 0x7A, 0xD0, 0x68, 0x01, 0x79, 0xE0, 0x68, 0xF1, 0x5C, 0xD0, 0x69, 0xE1, 0x5B, 0xE0, -0x6A, 0xD1, 0x3E, 0xD0, 0x6B, 0xC1, 0x3D, 0xE0, 0x6C, 0xB1, 0x20, 0xD0, 0x6D, 0xAA, 0x5A, 0x60, -0x6E, 0x9A, 0x3D, 0x50, 0x6F, 0x8A, 0x3C, 0x60, 0x70, 0x7A, 0x1F, 0x50, 0x71, 0x6A, 0x1E, 0x60, -0x72, 0x5A, 0x01, 0x50, 0x73, 0x4A, 0x00, 0x60, 0x74, 0x39, 0xE3, 0x50, 0x75, 0x29, 0xE2, 0x60, -0x76, 0x19, 0xC5, 0x50, 0x77, 0x09, 0xC4, 0x60, 0x78, 0x02, 0xE1, 0xD0, 0x78, 0xF2, 0xE0, 0xE0, -0x79, 0xE2, 0xC3, 0xD0, 0x7A, 0xD2, 0xC2, 0xE0, 0x7B, 0xC2, 0xA5, 0xD0, 0x7C, 0xB2, 0xA4, 0xE0, -0x7D, 0xA2, 0x87, 0xD0, 0x7E, 0x92, 0x86, 0xE0, 0x7F, 0x82, 0x69, 0xD0, 0x00, 0x01, 0x00, 0x01, +0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xA9, 0xE0, 0x44, 0x48, 0x04, 0x60, +0x45, 0x22, 0xDD, 0x60, 0x46, 0x27, 0xE6, 0x60, 0x47, 0x04, 0x10, 0xE0, 0x48, 0x07, 0xC8, 0x60, +0x48, 0xE6, 0x95, 0xE0, 0x49, 0xE7, 0xAA, 0x60, 0x4A, 0xC7, 0xC9, 0x60, 0x4B, 0xC7, 0x8C, 0x60, +0x4C, 0xA8, 0xFC, 0xE0, 0x4D, 0xA7, 0x6E, 0x60, 0x4E, 0x8A, 0x30, 0x60, 0x4F, 0x90, 0x8A, 0xE0, +0x50, 0x6C, 0xB5, 0x60, 0x51, 0x70, 0x6C, 0xE0, 0x52, 0x4D, 0xE8, 0xE0, 0x53, 0x50, 0x4E, 0xE0, +0x54, 0x2F, 0x1C, 0x60, 0x55, 0x30, 0x30, 0xE0, 0x56, 0x10, 0x4F, 0xE0, 0x57, 0x10, 0x12, 0xE0, +0x57, 0xF2, 0xD4, 0xE0, 0x58, 0xF9, 0x2F, 0x60, 0x59, 0xD4, 0x08, 0x60, 0x5A, 0xD9, 0x11, 0x60, +0x5B, 0xB5, 0x3B, 0xE0, 0x5C, 0xB8, 0xF3, 0x60, 0x5D, 0x96, 0x6F, 0x60, 0x5E, 0x98, 0xD5, 0x60, +0x5F, 0x78, 0xF4, 0x60, 0x60, 0x78, 0xB7, 0x60, 0x61, 0x5A, 0x27, 0xE0, 0x62, 0x58, 0x99, 0x60, +0x63, 0x3B, 0x5B, 0x60, 0x64, 0x41, 0xB5, 0xE0, 0x65, 0x1C, 0x8E, 0xE0, 0x66, 0x21, 0x97, 0xE0, +0x66, 0xFF, 0x13, 0xE0, 0x68, 0x01, 0x79, 0xE0, 0x68, 0xE0, 0x47, 0x60, 0x69, 0xE1, 0x5B, 0xE0, +0x6A, 0xC1, 0x7A, 0xE0, 0x6B, 0xC1, 0x3D, 0xE0, 0x6C, 0xA2, 0xAE, 0x60, 0x6D, 0xAA, 0x5A, 0x60, +0x6E, 0x85, 0x33, 0x60, 0x6F, 0x8A, 0x3C, 0x60, 0x70, 0x66, 0x66, 0xE0, 0x71, 0x6A, 0x1E, 0x60, +0x72, 0x47, 0x9A, 0x60, 0x73, 0x4A, 0x00, 0x60, 0x74, 0x28, 0xCD, 0xE0, 0x75, 0x29, 0xE2, 0x60, +0x76, 0x0B, 0x52, 0xE0, 0x77, 0x09, 0xC4, 0x60, 0x77, 0xEC, 0x86, 0x60, 0x78, 0xF2, 0xE0, 0xE0, +0x79, 0xCD, 0xB9, 0xE0, 0x7A, 0xD2, 0xC2, 0xE0, 0x7B, 0xAE, 0xED, 0x60, 0x7C, 0xB2, 0xA4, 0xE0, +0x7D, 0x91, 0x72, 0x60, 0x7E, 0x92, 0x86, 0xE0, 0x7F, 0x72, 0xA5, 0xE0, 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, @@ -7743,8 +7742,8 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* Asia/Tbilisi */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x19, 0xAA, 0x19, 0x99, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x19, 0xAA, 0x19, 0x99, 0xFC, 0xE7, 0xDA, 0x0C, 0x50, 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, 0x1E, 0x8C, 0x65, 0xE0, @@ -7758,38 +7757,17 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xDD, 0x1A, 0xC0, 0x39, 0xFB, 0x22, 0x30, 0x3A, 0xBC, 0xFC, 0xC0, 0x3B, 0xDB, 0x04, 0x30, 0x3C, 0xA6, 0x19, 0x40, 0x3D, 0xBA, 0xE6, 0x30, 0x3E, 0x85, 0xFB, 0x40, 0x3F, 0x9A, 0xC8, 0x30, 0x40, 0x65, 0xDD, 0x40, 0x40, 0xDD, 0xC7, 0xB0, 0x41, 0x84, 0x1C, 0xF0, 0x42, 0x45, 0xE9, 0x70, -0x43, 0x63, 0xFE, 0xF0, 0x44, 0x25, 0xCB, 0x70, 0x45, 0x43, 0xE0, 0xF0, 0x46, 0x05, 0xAD, 0x70, -0x47, 0x23, 0xC2, 0xF0, 0x47, 0xEE, 0xC9, 0xF0, 0x49, 0x03, 0xA4, 0xF0, 0x49, 0xCE, 0xAB, 0xF0, -0x4A, 0xE3, 0x86, 0xF0, 0x4B, 0xAE, 0x8D, 0xF0, 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, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, -0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x09, 0x08, 0x09, -0x08, 0x09, 0x08, 0x0B, 0x0A, 0x0B, 0x0A, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, -0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x08, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, -0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, -0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, -0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, -0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x0C, 0x07, 0x00, 0x00, 0x2A, 0x04, 0x00, 0x00, -0x00, 0x00, 0x2A, 0x30, 0x00, 0x05, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0A, 0x00, 0x00, 0x38, 0x40, -0x00, 0x05, 0x00, 0x00, 0x38, 0x40, 0x00, 0x05, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0A, 0x00, 0x00, -0x38, 0x40, 0x01, 0x0A, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x14, -0x00, 0x00, 0x2A, 0x30, 0x00, 0x10, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, -0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x14, 0x54, 0x42, 0x4D, 0x54, 0x00, 0x54, 0x42, 0x49, -0x54, 0x00, 0x54, 0x42, 0x49, 0x53, 0x54, 0x00, 0x47, 0x45, 0x54, 0x00, 0x47, 0x45, 0x53, 0x54, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x08, 0x07, 0x09, 0x08, 0x09, 0x08, 0x09, 0x08, 0x0B, +0x0A, 0x0B, 0x0A, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, 0x0B, 0x0A, +0x0B, 0x0A, 0x08, 0x07, 0x0B, 0x00, 0x00, 0x2A, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, +0x05, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0A, 0x00, 0x00, 0x38, 0x40, 0x00, 0x05, 0x00, 0x00, 0x38, +0x40, 0x00, 0x05, 0x00, 0x00, 0x46, 0x50, 0x01, 0x0A, 0x00, 0x00, 0x38, 0x40, 0x01, 0x0A, 0x00, +0x00, 0x2A, 0x30, 0x00, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, +0x10, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x10, 0x54, 0x42, 0x4D, +0x54, 0x00, 0x54, 0x42, 0x49, 0x54, 0x00, 0x54, 0x42, 0x49, 0x53, 0x54, 0x00, 0x47, 0x45, 0x54, +0x00, 0x47, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Asia/Tehran */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9668,22 +9646,22 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xAE, 0xD0, 0x3A, 0xC6, 0xC3, 0xE0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xE0, 0x60, 0x3D, 0xBB, 0x72, 0xD0, 0x3E, 0x8F, 0xC2, 0x60, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0xA4, 0x60, 0x41, 0x84, 0x71, 0x50, 0x42, 0x4F, 0x86, 0x60, 0x43, 0x64, 0x53, 0x50, 0x44, 0x2F, 0x68, 0x60, -0x45, 0x44, 0x35, 0x50, 0x46, 0x0F, 0x4A, 0x60, 0x47, 0x24, 0x17, 0x50, 0x47, 0xF8, 0x66, 0xE0, -0x49, 0x03, 0xF9, 0x50, 0x49, 0xD8, 0x48, 0xE0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xB8, 0x2A, 0xE0, -0x4C, 0xCC, 0xF7, 0xD0, 0x4D, 0x98, 0x0C, 0xE0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x77, 0xEE, 0xE0, -0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x61, 0x0B, 0x60, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x40, 0xED, 0x60, -0x54, 0x4C, 0x7F, 0xD0, 0x55, 0x20, 0xCF, 0x60, 0x56, 0x2C, 0x61, 0xD0, 0x57, 0x00, 0xB1, 0x60, -0x58, 0x15, 0x7E, 0x50, 0x58, 0xE0, 0x93, 0x60, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xC0, 0x75, 0x60, -0x5B, 0xD5, 0x42, 0x50, 0x5C, 0xA9, 0x91, 0xE0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x89, 0x73, 0xE0, -0x5F, 0x95, 0x06, 0x50, 0x60, 0x69, 0x55, 0xE0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x49, 0x37, 0xE0, -0x63, 0x5E, 0x04, 0xD0, 0x64, 0x29, 0x19, 0xE0, 0x65, 0x3D, 0xE6, 0xD0, 0x66, 0x12, 0x36, 0x60, -0x67, 0x1D, 0xC8, 0xD0, 0x67, 0xF2, 0x18, 0x60, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xD1, 0xFA, 0x60, -0x6A, 0xDD, 0x8C, 0xD0, 0x6B, 0xB1, 0xDC, 0x60, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x91, 0xBE, 0x60, -0x6E, 0xA6, 0x8B, 0x50, 0x6F, 0x71, 0xA0, 0x60, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x5A, 0xBC, 0xE0, -0x72, 0x66, 0x4F, 0x50, 0x73, 0x3A, 0x9E, 0xE0, 0x74, 0x46, 0x31, 0x50, 0x75, 0x1A, 0x80, 0xE0, -0x76, 0x2F, 0x4D, 0xD0, 0x76, 0xFA, 0x62, 0xE0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xDA, 0x44, 0xE0, -0x79, 0xEF, 0x11, 0xD0, 0x7A, 0xBA, 0x26, 0xE0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0xA3, 0x43, 0x60, -0x7D, 0xAE, 0xD5, 0xD0, 0x7E, 0x83, 0x25, 0x60, 0x7F, 0x8E, 0xB7, 0xD0, 0x02, 0x01, 0x02, 0x01, +0x45, 0x44, 0x35, 0x50, 0x45, 0xF3, 0x9A, 0xE0, 0x47, 0x2D, 0x51, 0xD0, 0x47, 0xD3, 0x7C, 0xE0, +0x49, 0x0D, 0x33, 0xD0, 0x49, 0xB3, 0x5E, 0xE0, 0x4A, 0xED, 0x15, 0xD0, 0x4B, 0x9C, 0x7B, 0x60, +0x4C, 0xD6, 0x32, 0x50, 0x4D, 0x7C, 0x5D, 0x60, 0x4E, 0xB6, 0x14, 0x50, 0x4F, 0x5C, 0x3F, 0x60, +0x50, 0x95, 0xF6, 0x50, 0x51, 0x3C, 0x21, 0x60, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1C, 0x03, 0x60, +0x54, 0x55, 0xBA, 0x50, 0x54, 0xFB, 0xE5, 0x60, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE5, 0x01, 0xE0, +0x58, 0x1E, 0xB8, 0xD0, 0x58, 0xC4, 0xE3, 0xE0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xC5, 0xE0, +0x5B, 0xDE, 0x7C, 0xD0, 0x5C, 0x84, 0xA7, 0xE0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x89, 0xE0, +0x5F, 0x9E, 0x40, 0xD0, 0x60, 0x4D, 0xA6, 0x60, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x88, 0x60, +0x63, 0x67, 0x3F, 0x50, 0x64, 0x0D, 0x6A, 0x60, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x4C, 0x60, +0x67, 0x27, 0x03, 0x50, 0x67, 0xCD, 0x2E, 0x60, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x10, 0x60, +0x6A, 0xE6, 0xC7, 0x50, 0x6B, 0x96, 0x2C, 0xE0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x0E, 0xE0, +0x6E, 0xAF, 0xC5, 0xD0, 0x6F, 0x55, 0xF0, 0xE0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xD2, 0xE0, +0x72, 0x6F, 0x89, 0xD0, 0x73, 0x15, 0xB4, 0xE0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xD1, 0x60, +0x76, 0x38, 0x88, 0x50, 0x76, 0xDE, 0xB3, 0x60, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x95, 0x60, +0x79, 0xF8, 0x4C, 0x50, 0x7A, 0x9E, 0x77, 0x60, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x59, 0x60, +0x7D, 0xB8, 0x10, 0x50, 0x7E, 0x5E, 0x3B, 0x60, 0x7F, 0x97, 0xF2, 0x50, 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, 0x03, 0x04, 0x02, @@ -9705,8 +9683,8 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* Canada/Central */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xB9, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x01, 0xFB, 0xE0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xB9, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x9B, 0x01, 0xFB, 0xE0, 0x9B, 0xC3, 0xBA, 0x50, 0x9E, 0xB8, 0xA1, 0x80, 0x9F, 0xC0, 0x3F, 0x70, 0xC2, 0xA0, 0x3B, 0x80, 0xC3, 0x4F, 0x84, 0xF0, 0xCB, 0x88, 0xFE, 0x80, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x88, 0x68, 0x00, 0xD4, 0x53, 0x60, 0xF0, 0xD5, 0x55, 0xD5, 0x00, 0xD6, 0x20, 0xCD, 0xF0, @@ -9737,38 +9715,38 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xD9, 0x00, 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xBB, 0x00, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x9D, 0x00, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x7F, 0x00, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x9B, 0x80, 0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x7D, 0x80, -0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x5F, 0x80, 0x46, 0x0F, 0x66, 0x80, 0x47, 0x24, 0x41, 0x80, -0x47, 0xF8, 0x83, 0x00, 0x49, 0x04, 0x23, 0x80, 0x49, 0xD8, 0x65, 0x00, 0x4A, 0xE4, 0x05, 0x80, -0x4B, 0xB8, 0x47, 0x00, 0x4C, 0xCD, 0x22, 0x00, 0x4D, 0x98, 0x29, 0x00, 0x4E, 0xAD, 0x04, 0x00, -0x4F, 0x78, 0x0B, 0x00, 0x50, 0x8C, 0xE6, 0x00, 0x51, 0x61, 0x27, 0x80, 0x52, 0x6C, 0xC8, 0x00, -0x53, 0x41, 0x09, 0x80, 0x54, 0x4C, 0xAA, 0x00, 0x55, 0x20, 0xEB, 0x80, 0x56, 0x2C, 0x8C, 0x00, -0x57, 0x00, 0xCD, 0x80, 0x58, 0x15, 0xA8, 0x80, 0x58, 0xE0, 0xAF, 0x80, 0x59, 0xF5, 0x8A, 0x80, -0x5A, 0xC0, 0x91, 0x80, 0x5B, 0xD5, 0x6C, 0x80, 0x5C, 0xA9, 0xAE, 0x00, 0x5D, 0xB5, 0x4E, 0x80, -0x5E, 0x89, 0x90, 0x00, 0x5F, 0x95, 0x30, 0x80, 0x60, 0x69, 0x72, 0x00, 0x61, 0x7E, 0x4D, 0x00, -0x62, 0x49, 0x54, 0x00, 0x63, 0x5E, 0x2F, 0x00, 0x64, 0x29, 0x36, 0x00, 0x65, 0x3E, 0x11, 0x00, -0x66, 0x12, 0x52, 0x80, 0x67, 0x1D, 0xF3, 0x00, 0x67, 0xF2, 0x34, 0x80, 0x68, 0xFD, 0xD5, 0x00, -0x69, 0xD2, 0x16, 0x80, 0x6A, 0xDD, 0xB7, 0x00, 0x6B, 0xB1, 0xF8, 0x80, 0x6C, 0xC6, 0xD3, 0x80, -0x6D, 0x91, 0xDA, 0x80, 0x6E, 0xA6, 0xB5, 0x80, 0x6F, 0x71, 0xBC, 0x80, 0x70, 0x86, 0x97, 0x80, -0x71, 0x5A, 0xD9, 0x00, 0x72, 0x66, 0x79, 0x80, 0x73, 0x3A, 0xBB, 0x00, 0x74, 0x46, 0x5B, 0x80, -0x75, 0x1A, 0x9D, 0x00, 0x76, 0x2F, 0x78, 0x00, 0x76, 0xFA, 0x7F, 0x00, 0x78, 0x0F, 0x5A, 0x00, -0x78, 0xDA, 0x61, 0x00, 0x79, 0xEF, 0x3C, 0x00, 0x7A, 0xBA, 0x43, 0x00, 0x7B, 0xCF, 0x1E, 0x00, -0x7C, 0xA3, 0x5F, 0x80, 0x7D, 0xAF, 0x00, 0x00, 0x7E, 0x83, 0x41, 0x80, 0x7F, 0x8E, 0xE2, 0x00, +0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x5F, 0x80, 0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x7C, 0x00, +0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x5E, 0x00, 0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x40, 0x00, +0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x5C, 0x80, 0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x3E, 0x80, +0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x20, 0x80, 0x51, 0x3C, 0x3D, 0x80, 0x52, 0x76, 0x02, 0x80, +0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xE4, 0x80, 0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xC6, 0x80, +0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xE3, 0x00, 0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xC5, 0x00, +0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0xA7, 0x00, 0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x89, 0x00, +0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x6B, 0x00, 0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x87, 0x80, +0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x69, 0x80, 0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x4B, 0x80, +0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x2D, 0x80, 0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x0F, 0x80, +0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xF1, 0x80, 0x6B, 0x96, 0x49, 0x00, 0x6C, 0xD0, 0x0E, 0x00, +0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xF0, 0x00, 0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xD2, 0x00, +0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xB4, 0x00, 0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x96, 0x00, +0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x94, 0x80, +0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x58, 0x80, +0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x1C, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 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, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, -0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, +0x01, 0x00, 0x01, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, -0x0C, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, -0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, -0x00, +0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0x43, 0x44, 0x54, +0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, /* Canada/Eastern */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -9816,26 +9794,26 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, -0x45, 0x44, 0x43, 0x60, 0x46, 0x0F, 0x58, 0x70, 0x47, 0x24, 0x25, 0x60, 0x47, 0xF8, 0x74, 0xF0, -0x49, 0x04, 0x07, 0x60, 0x49, 0xD8, 0x56, 0xF0, 0x4A, 0xE3, 0xE9, 0x60, 0x4B, 0xB8, 0x38, 0xF0, -0x4C, 0xCD, 0x05, 0xE0, 0x4D, 0x98, 0x1A, 0xF0, 0x4E, 0xAC, 0xE7, 0xE0, 0x4F, 0x77, 0xFC, 0xF0, -0x50, 0x8C, 0xC9, 0xE0, 0x51, 0x61, 0x19, 0x70, 0x52, 0x6C, 0xAB, 0xE0, 0x53, 0x40, 0xFB, 0x70, -0x54, 0x4C, 0x8D, 0xE0, 0x55, 0x20, 0xDD, 0x70, 0x56, 0x2C, 0x6F, 0xE0, 0x57, 0x00, 0xBF, 0x70, -0x58, 0x15, 0x8C, 0x60, 0x58, 0xE0, 0xA1, 0x70, 0x59, 0xF5, 0x6E, 0x60, 0x5A, 0xC0, 0x83, 0x70, -0x5B, 0xD5, 0x50, 0x60, 0x5C, 0xA9, 0x9F, 0xF0, 0x5D, 0xB5, 0x32, 0x60, 0x5E, 0x89, 0x81, 0xF0, -0x5F, 0x95, 0x14, 0x60, 0x60, 0x69, 0x63, 0xF0, 0x61, 0x7E, 0x30, 0xE0, 0x62, 0x49, 0x45, 0xF0, -0x63, 0x5E, 0x12, 0xE0, 0x64, 0x29, 0x27, 0xF0, 0x65, 0x3D, 0xF4, 0xE0, 0x66, 0x12, 0x44, 0x70, -0x67, 0x1D, 0xD6, 0xE0, 0x67, 0xF2, 0x26, 0x70, 0x68, 0xFD, 0xB8, 0xE0, 0x69, 0xD2, 0x08, 0x70, -0x6A, 0xDD, 0x9A, 0xE0, 0x6B, 0xB1, 0xEA, 0x70, 0x6C, 0xC6, 0xB7, 0x60, 0x6D, 0x91, 0xCC, 0x70, -0x6E, 0xA6, 0x99, 0x60, 0x6F, 0x71, 0xAE, 0x70, 0x70, 0x86, 0x7B, 0x60, 0x71, 0x5A, 0xCA, 0xF0, -0x72, 0x66, 0x5D, 0x60, 0x73, 0x3A, 0xAC, 0xF0, 0x74, 0x46, 0x3F, 0x60, 0x75, 0x1A, 0x8E, 0xF0, -0x76, 0x2F, 0x5B, 0xE0, 0x76, 0xFA, 0x70, 0xF0, 0x78, 0x0F, 0x3D, 0xE0, 0x78, 0xDA, 0x52, 0xF0, -0x79, 0xEF, 0x1F, 0xE0, 0x7A, 0xBA, 0x34, 0xF0, 0x7B, 0xCF, 0x01, 0xE0, 0x7C, 0xA3, 0x51, 0x70, -0x7D, 0xAE, 0xE3, 0xE0, 0x7E, 0x83, 0x33, 0x70, 0x7F, 0x8E, 0xC5, 0xE0, 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, 0x01, 0x00, 0x01, 0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, -0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, +0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, +0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, +0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, +0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, +0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, +0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, +0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, +0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, +0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, +0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, +0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, +0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, +0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, +0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, +0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, +0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 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, 0x01, 0x00, 0x01, 0x00, 0x02, 0x03, 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, 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, @@ -10326,73 +10304,46 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* CST6CDT */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xEB, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x14, 0x9E, 0xA6, 0x2C, 0x80, -0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70, 0xA2, 0xCB, 0x74, 0x00, -0xA3, 0x83, 0xF7, 0xF0, 0xA4, 0x45, 0xD2, 0x80, 0xA5, 0x63, 0xD9, 0xF0, 0xA6, 0x53, 0xD9, 0x00, -0xA7, 0x15, 0x97, 0x70, 0xA8, 0x33, 0xBB, 0x00, 0xA8, 0xFE, 0xB3, 0xF0, 0xAA, 0x13, 0x9D, 0x00, -0xAA, 0xDE, 0x95, 0xF0, 0xAB, 0xF3, 0x7F, 0x00, 0xAC, 0xBE, 0x77, 0xF0, 0xAD, 0xD3, 0x61, 0x00, -0xAE, 0x9E, 0x59, 0xF0, 0xAF, 0xB3, 0x43, 0x00, 0xB0, 0x7E, 0x3B, 0xF0, 0xB1, 0x9C, 0x5F, 0x80, -0xB2, 0x67, 0x58, 0x70, 0xB3, 0x7C, 0x41, 0x80, 0xB4, 0x47, 0x3A, 0x70, 0xB5, 0x5C, 0x23, 0x80, -0xB6, 0x27, 0x1C, 0x70, 0xB7, 0x3C, 0x05, 0x80, 0xB8, 0x06, 0xFE, 0x70, 0xB9, 0x1B, 0xE7, 0x80, -0xB9, 0xE6, 0xE0, 0x70, 0xBB, 0x05, 0x04, 0x00, 0xBB, 0xC6, 0xC2, 0x70, 0xBC, 0xE4, 0xE6, 0x00, -0xBD, 0xAF, 0xDE, 0xF0, 0xBE, 0xC4, 0xC8, 0x00, 0xBF, 0x8F, 0xC0, 0xF0, 0xC0, 0x5A, 0xD6, 0x00, -0xC1, 0xB0, 0x3C, 0x70, 0xC2, 0x84, 0x8C, 0x00, 0xC3, 0x4F, 0x84, 0xF0, 0xC4, 0x64, 0x6E, 0x00, -0xC5, 0x2F, 0x66, 0xF0, 0xC6, 0x4D, 0x8A, 0x80, 0xC7, 0x0F, 0x48, 0xF0, 0xC8, 0x2D, 0x6C, 0x80, -0xC8, 0xF8, 0x65, 0x70, 0xCA, 0x0D, 0x4E, 0x80, 0xCA, 0xD8, 0x47, 0x70, 0xCB, 0x88, 0xFE, 0x80, -0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x09, 0xF0, 0xD3, 0x75, 0xF3, 0x00, 0xD4, 0x40, 0xEB, 0xF0, -0xD5, 0x55, 0xD5, 0x00, 0xD6, 0x20, 0xCD, 0xF0, 0xD7, 0x35, 0xB7, 0x00, 0xD8, 0x00, 0xAF, 0xF0, -0xD9, 0x15, 0x99, 0x00, 0xD9, 0xE0, 0x91, 0xF0, 0xDA, 0xFE, 0xB5, 0x80, 0xDB, 0xC0, 0x73, 0xF0, -0xDC, 0xDE, 0x97, 0x80, 0xDD, 0xA9, 0x90, 0x70, 0xDE, 0xBE, 0x79, 0x80, 0xDF, 0x89, 0x72, 0x70, -0xE0, 0x9E, 0x5B, 0x80, 0xE1, 0x69, 0x54, 0x70, 0xE2, 0x7E, 0x3D, 0x80, 0xE3, 0x49, 0x36, 0x70, -0xE4, 0x5E, 0x1F, 0x80, 0xE5, 0x57, 0x3C, 0xF0, 0xE6, 0x47, 0x3C, 0x00, 0xE7, 0x37, 0x1E, 0xF0, -0xE8, 0x27, 0x1E, 0x00, 0xE9, 0x17, 0x00, 0xF0, 0xEA, 0x07, 0x00, 0x00, 0xEA, 0xF6, 0xE2, 0xF0, -0xEB, 0xE6, 0xE2, 0x00, 0xEC, 0xD6, 0xC4, 0xF0, 0xED, 0xC6, 0xC4, 0x00, 0xEE, 0xBF, 0xE1, 0x70, -0xEF, 0xAF, 0xE0, 0x80, 0xF0, 0x9F, 0xC3, 0x70, 0xF1, 0x8F, 0xC2, 0x80, 0xF2, 0x7F, 0xA5, 0x70, -0xF3, 0x6F, 0xA4, 0x80, 0xF4, 0x5F, 0x87, 0x70, 0xF5, 0x4F, 0x86, 0x80, 0xF6, 0x3F, 0x69, 0x70, -0xF7, 0x2F, 0x68, 0x80, 0xF8, 0x28, 0x85, 0xF0, 0xF9, 0x0F, 0x4A, 0x80, 0xFA, 0x08, 0x67, 0xF0, -0xFA, 0xF8, 0x67, 0x00, 0xFB, 0xE8, 0x49, 0xF0, 0xFC, 0xD8, 0x49, 0x00, 0xFD, 0xC8, 0x2B, 0xF0, -0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xA8, 0x0D, 0xF0, 0x00, 0x98, 0x0D, 0x00, 0x01, 0x87, 0xEF, 0xF0, -0x02, 0x77, 0xEF, 0x00, 0x03, 0x71, 0x0C, 0x70, 0x04, 0x61, 0x0B, 0x80, 0x05, 0x50, 0xEE, 0x70, -0x06, 0x40, 0xED, 0x80, 0x07, 0x30, 0xD0, 0x70, 0x07, 0x8D, 0x27, 0x80, 0x09, 0x10, 0xB2, 0x70, -0x09, 0xAD, 0xA3, 0x00, 0x0A, 0xF0, 0x94, 0x70, 0x0B, 0xE0, 0x93, 0x80, 0x0C, 0xD9, 0xB0, 0xF0, -0x0D, 0xC0, 0x75, 0x80, 0x0E, 0xB9, 0x92, 0xF0, 0x0F, 0xA9, 0x92, 0x00, 0x10, 0x99, 0x74, 0xF0, -0x11, 0x89, 0x74, 0x00, 0x12, 0x79, 0x56, 0xF0, 0x13, 0x69, 0x56, 0x00, 0x14, 0x59, 0x38, 0xF0, -0x15, 0x49, 0x38, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x17, 0x29, 0x1A, 0x00, 0x18, 0x22, 0x37, 0x70, -0x19, 0x08, 0xFC, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x1A, 0xF2, 0x18, 0x80, 0x1B, 0xE1, 0xFB, 0x70, -0x1C, 0xD1, 0xFA, 0x80, 0x1D, 0xC1, 0xDD, 0x70, 0x1E, 0xB1, 0xDC, 0x80, 0x1F, 0xA1, 0xBF, 0x70, -0x20, 0x76, 0x0F, 0x00, 0x21, 0x81, 0xA1, 0x70, 0x22, 0x55, 0xF1, 0x00, 0x23, 0x6A, 0xBD, 0xF0, -0x24, 0x35, 0xD3, 0x00, 0x25, 0x4A, 0x9F, 0xF0, 0x26, 0x15, 0xB5, 0x00, 0x27, 0x2A, 0x81, 0xF0, -0x27, 0xFE, 0xD1, 0x80, 0x29, 0x0A, 0x63, 0xF0, 0x29, 0xDE, 0xB3, 0x80, 0x2A, 0xEA, 0x45, 0xF0, -0x2B, 0xBE, 0x95, 0x80, 0x2C, 0xD3, 0x62, 0x70, 0x2D, 0x9E, 0x77, 0x80, 0x2E, 0xB3, 0x44, 0x70, -0x2F, 0x7E, 0x59, 0x80, 0x30, 0x93, 0x26, 0x70, 0x31, 0x67, 0x76, 0x00, 0x32, 0x73, 0x08, 0x70, -0x33, 0x47, 0x58, 0x00, 0x34, 0x52, 0xEA, 0x70, 0x35, 0x27, 0x3A, 0x00, 0x36, 0x32, 0xCC, 0x70, -0x37, 0x07, 0x1C, 0x00, 0x38, 0x1B, 0xE8, 0xF0, 0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, -0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x8E, 0xF0, -0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x70, 0xF0, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x8D, 0x70, -0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x6F, 0x70, 0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, -0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x4F, 0xF0, -0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x4E, 0x70, -0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x30, 0x70, 0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x12, 0x70, -0x51, 0x3C, 0x3D, 0x80, 0x52, 0x75, 0xF4, 0x70, 0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xD6, 0x70, -0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xB8, 0x70, 0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xD4, 0xF0, -0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0x98, 0xF0, -0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, -0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x79, 0x70, 0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x5B, 0x70, -0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x3D, 0x70, 0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x1F, 0x70, -0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x01, 0x70, 0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xE3, 0x70, -0x6B, 0x96, 0x49, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, -0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xA5, 0xF0, -0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xA4, 0x70, -0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x86, 0x70, 0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x68, 0x70, -0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x4A, 0x70, 0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x2C, 0x70, -0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x0E, 0x70, 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, 0x02, 0x01, 0x00, 0x01, -0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x03, 0x04, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x2C, 0x80, +0x9F, 0xBA, 0xF9, 0x70, 0xA0, 0x86, 0x0E, 0x80, 0xA1, 0x9A, 0xDB, 0x70, 0xCB, 0x88, 0xFE, 0x80, +0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x09, 0xF0, 0xFA, 0xF8, 0x67, 0x00, 0xFB, 0xE8, 0x49, 0xF0, +0xFC, 0xD8, 0x49, 0x00, 0xFD, 0xC8, 0x2B, 0xF0, 0xFE, 0xB8, 0x2B, 0x00, 0xFF, 0xA8, 0x0D, 0xF0, +0x00, 0x98, 0x0D, 0x00, 0x01, 0x87, 0xEF, 0xF0, 0x02, 0x77, 0xEF, 0x00, 0x03, 0x71, 0x0C, 0x70, +0x04, 0x61, 0x0B, 0x80, 0x05, 0x50, 0xEE, 0x70, 0x06, 0x40, 0xED, 0x80, 0x07, 0x30, 0xD0, 0x70, +0x07, 0x8D, 0x27, 0x80, 0x09, 0x10, 0xB2, 0x70, 0x09, 0xAD, 0xA3, 0x00, 0x0A, 0xF0, 0x94, 0x70, +0x0B, 0xE0, 0x93, 0x80, 0x0C, 0xD9, 0xB0, 0xF0, 0x0D, 0xC0, 0x75, 0x80, 0x0E, 0xB9, 0x92, 0xF0, +0x0F, 0xA9, 0x92, 0x00, 0x10, 0x99, 0x74, 0xF0, 0x11, 0x89, 0x74, 0x00, 0x12, 0x79, 0x56, 0xF0, +0x13, 0x69, 0x56, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x15, 0x49, 0x38, 0x00, 0x16, 0x39, 0x1A, 0xF0, +0x17, 0x29, 0x1A, 0x00, 0x18, 0x22, 0x37, 0x70, 0x19, 0x08, 0xFC, 0x00, 0x1A, 0x02, 0x19, 0x70, +0x1A, 0xF2, 0x18, 0x80, 0x1B, 0xE1, 0xFB, 0x70, 0x1C, 0xD1, 0xFA, 0x80, 0x1D, 0xC1, 0xDD, 0x70, +0x1E, 0xB1, 0xDC, 0x80, 0x1F, 0xA1, 0xBF, 0x70, 0x20, 0x76, 0x0F, 0x00, 0x21, 0x81, 0xA1, 0x70, +0x22, 0x55, 0xF1, 0x00, 0x23, 0x6A, 0xBD, 0xF0, 0x24, 0x35, 0xD3, 0x00, 0x25, 0x4A, 0x9F, 0xF0, +0x26, 0x15, 0xB5, 0x00, 0x27, 0x2A, 0x81, 0xF0, 0x27, 0xFE, 0xD1, 0x80, 0x29, 0x0A, 0x63, 0xF0, +0x29, 0xDE, 0xB3, 0x80, 0x2A, 0xEA, 0x45, 0xF0, 0x2B, 0xBE, 0x95, 0x80, 0x2C, 0xD3, 0x62, 0x70, +0x2D, 0x9E, 0x77, 0x80, 0x2E, 0xB3, 0x44, 0x70, 0x2F, 0x7E, 0x59, 0x80, 0x30, 0x93, 0x26, 0x70, +0x31, 0x67, 0x76, 0x00, 0x32, 0x73, 0x08, 0x70, 0x33, 0x47, 0x58, 0x00, 0x34, 0x52, 0xEA, 0x70, +0x35, 0x27, 0x3A, 0x00, 0x36, 0x32, 0xCC, 0x70, 0x37, 0x07, 0x1C, 0x00, 0x38, 0x1B, 0xE8, 0xF0, +0x38, 0xE6, 0xFE, 0x00, 0x39, 0xFB, 0xCA, 0xF0, 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, +0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x8E, 0xF0, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x70, 0xF0, +0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x8D, 0x70, 0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x6F, 0x70, +0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, 0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x6D, 0xF0, +0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x4F, 0xF0, 0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x31, 0xF0, +0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x4E, 0x70, 0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x30, 0x70, +0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x12, 0x70, 0x51, 0x3C, 0x3D, 0x80, 0x52, 0x75, 0xF4, 0x70, +0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xD6, 0x70, 0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xB8, 0x70, +0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xD4, 0xF0, 0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, +0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0x98, 0xF0, 0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, +0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, 0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x79, 0x70, +0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x5B, 0x70, 0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x3D, 0x70, +0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x1F, 0x70, 0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x01, 0x70, +0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xE3, 0x70, 0x6B, 0x96, 0x49, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, +0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, 0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xC3, 0xF0, +0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xA5, 0xF0, 0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x87, 0xF0, +0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xA4, 0x70, 0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x86, 0x70, +0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x68, 0x70, 0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x4A, 0x70, +0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x2C, 0x70, 0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x0E, 0x70, +0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, @@ -10401,15 +10352,15 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, -0x01, 0x00, 0x01, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, 0x04, 0xFF, -0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, -0x10, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, -0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, +0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x00, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, +0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0C, 0x43, 0x44, 0x54, +0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x57, 0x54, 0x00, 0x43, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x01, /* Cuba */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x9D, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xAC, 0x62, 0xC2, 0x80, +0x00, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0C, 0xAC, 0x62, 0xC2, 0x80, 0xB1, 0xD3, 0x94, 0x50, 0xB2, 0x74, 0x5D, 0x40, 0xC8, 0x5B, 0x66, 0xD0, 0xC8, 0xD3, 0x51, 0x40, 0xCA, 0x3B, 0x48, 0xD0, 0xCA, 0xBC, 0x6D, 0xC0, 0xCC, 0x24, 0x65, 0x50, 0xCC, 0x9C, 0x4F, 0xC0, 0xD1, 0xC4, 0x0B, 0x50, 0xD2, 0x3B, 0xF5, 0xC0, 0xD3, 0xA3, 0xED, 0x50, 0xD4, 0x1B, 0xD7, 0xC0, @@ -10432,37 +10383,36 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x33, 0x47, 0x2D, 0xD0, 0x34, 0x40, 0x59, 0x50, 0x35, 0x1D, 0xD5, 0x50, 0x36, 0x32, 0xB0, 0x50, 0x36, 0xFD, 0xB7, 0x50, 0x38, 0x1B, 0xCC, 0xD0, 0x38, 0xE6, 0xD3, 0xD0, 0x39, 0xFB, 0xAE, 0xD0, 0x3A, 0xC6, 0xB5, 0xD0, 0x3B, 0xDB, 0x90, 0xD0, 0x3C, 0xAF, 0xD2, 0x50, 0x3D, 0xBB, 0x72, 0xD0, -0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x43, 0x64, 0x53, 0x50, -0x44, 0x2F, 0x5A, 0x50, 0x45, 0x44, 0x35, 0x50, 0x46, 0x0F, 0x3C, 0x50, 0x47, 0x24, 0x17, 0x50, -0x47, 0xF8, 0x58, 0xD0, 0x49, 0x03, 0xF9, 0x50, 0x49, 0xD8, 0x3A, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, -0x4B, 0xB8, 0x1C, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0, 0x4D, 0x97, 0xFE, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, -0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x60, 0xFD, 0x50, 0x52, 0x6C, 0x9D, 0xD0, -0x53, 0x40, 0xDF, 0x50, 0x54, 0x4C, 0x7F, 0xD0, 0x55, 0x20, 0xC1, 0x50, 0x56, 0x2C, 0x61, 0xD0, -0x57, 0x00, 0xA3, 0x50, 0x58, 0x15, 0x7E, 0x50, 0x58, 0xE0, 0x85, 0x50, 0x59, 0xF5, 0x60, 0x50, -0x5A, 0xC0, 0x67, 0x50, 0x5B, 0xD5, 0x42, 0x50, 0x5C, 0xA9, 0x83, 0xD0, 0x5D, 0xB5, 0x24, 0x50, -0x5E, 0x89, 0x65, 0xD0, 0x5F, 0x95, 0x06, 0x50, 0x60, 0x69, 0x47, 0xD0, 0x61, 0x7E, 0x22, 0xD0, -0x62, 0x49, 0x29, 0xD0, 0x63, 0x5E, 0x04, 0xD0, 0x64, 0x29, 0x0B, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, -0x66, 0x12, 0x28, 0x50, 0x67, 0x1D, 0xC8, 0xD0, 0x67, 0xF2, 0x0A, 0x50, 0x68, 0xFD, 0xAA, 0xD0, -0x69, 0xD1, 0xEC, 0x50, 0x6A, 0xDD, 0x8C, 0xD0, 0x6B, 0xB1, 0xCE, 0x50, 0x6C, 0xC6, 0xA9, 0x50, -0x6D, 0x91, 0xB0, 0x50, 0x6E, 0xA6, 0x8B, 0x50, 0x6F, 0x71, 0x92, 0x50, 0x70, 0x86, 0x6D, 0x50, -0x71, 0x5A, 0xAE, 0xD0, 0x72, 0x66, 0x4F, 0x50, 0x73, 0x3A, 0x90, 0xD0, 0x74, 0x46, 0x31, 0x50, -0x75, 0x1A, 0x72, 0xD0, 0x76, 0x2F, 0x4D, 0xD0, 0x76, 0xFA, 0x54, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, -0x78, 0xDA, 0x36, 0xD0, 0x79, 0xEF, 0x11, 0xD0, 0x7A, 0xBA, 0x18, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, -0x7C, 0xA3, 0x35, 0x50, 0x7D, 0xAE, 0xD5, 0xD0, 0x7E, 0x83, 0x17, 0x50, 0x7F, 0x8E, 0xB7, 0xD0, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50, +0x46, 0x0F, 0x3C, 0x50, 0x47, 0x24, 0x17, 0x50, 0x47, 0xF8, 0x58, 0xD0, 0x49, 0x03, 0xF9, 0x50, +0x49, 0xD8, 0x3A, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0xB8, 0x1C, 0xD0, 0x4C, 0xCC, 0xF7, 0xD0, +0x4D, 0x97, 0xFE, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x77, 0xE0, 0xD0, 0x50, 0x8C, 0xBB, 0xD0, +0x51, 0x60, 0xFD, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x40, 0xDF, 0x50, 0x54, 0x4C, 0x7F, 0xD0, +0x55, 0x20, 0xC1, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x57, 0x00, 0xA3, 0x50, 0x58, 0x15, 0x7E, 0x50, +0x58, 0xE0, 0x85, 0x50, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xC0, 0x67, 0x50, 0x5B, 0xD5, 0x42, 0x50, +0x5C, 0xA9, 0x83, 0xD0, 0x5D, 0xB5, 0x24, 0x50, 0x5E, 0x89, 0x65, 0xD0, 0x5F, 0x95, 0x06, 0x50, +0x60, 0x69, 0x47, 0xD0, 0x61, 0x7E, 0x22, 0xD0, 0x62, 0x49, 0x29, 0xD0, 0x63, 0x5E, 0x04, 0xD0, +0x64, 0x29, 0x0B, 0xD0, 0x65, 0x3D, 0xE6, 0xD0, 0x66, 0x12, 0x28, 0x50, 0x67, 0x1D, 0xC8, 0xD0, +0x67, 0xF2, 0x0A, 0x50, 0x68, 0xFD, 0xAA, 0xD0, 0x69, 0xD1, 0xEC, 0x50, 0x6A, 0xDD, 0x8C, 0xD0, +0x6B, 0xB1, 0xCE, 0x50, 0x6C, 0xC6, 0xA9, 0x50, 0x6D, 0x91, 0xB0, 0x50, 0x6E, 0xA6, 0x8B, 0x50, +0x6F, 0x71, 0x92, 0x50, 0x70, 0x86, 0x6D, 0x50, 0x71, 0x5A, 0xAE, 0xD0, 0x72, 0x66, 0x4F, 0x50, +0x73, 0x3A, 0x90, 0xD0, 0x74, 0x46, 0x31, 0x50, 0x75, 0x1A, 0x72, 0xD0, 0x76, 0x2F, 0x4D, 0xD0, +0x76, 0xFA, 0x54, 0xD0, 0x78, 0x0F, 0x2F, 0xD0, 0x78, 0xDA, 0x36, 0xD0, 0x79, 0xEF, 0x11, 0xD0, +0x7A, 0xBA, 0x18, 0xD0, 0x7B, 0xCE, 0xF3, 0xD0, 0x7C, 0xA3, 0x35, 0x50, 0x7D, 0xAE, 0xD5, 0xD0, +0x7E, 0x83, 0x17, 0x50, 0x7F, 0x8E, 0xB7, 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, -0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x04, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x03, 0x01, 0x03, 0x01, 0x03, 0x01, +0x03, 0x01, 0x03, 0x01, 0x03, 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, 0x04, 0x03, 0xFF, 0xFF, 0xB2, -0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, -0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0x48, 0x4D, 0x54, 0x00, 0x43, -0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, -0x00, +0x03, 0x04, 0x03, 0xFF, 0xFF, 0xB2, 0xC0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, +0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, +0x04, 0x48, 0x4D, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, /* EET */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -10656,80 +10606,52 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* EST */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x8B, 0xF4, 0x61, 0xE8, -0x01, 0xFF, 0xFF, 0xB5, 0x18, 0x00, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0x43, 0x4D, 0x54, -0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0xB9, 0xB0, +0x00, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, /* EST5EDT */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xEB, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x1E, 0x70, -0x9F, 0xBA, 0xEB, 0x60, 0xA0, 0x86, 0x00, 0x70, 0xA1, 0x9A, 0xCD, 0x60, 0xA2, 0x65, 0xE2, 0x70, -0xA3, 0x83, 0xE9, 0xE0, 0xA4, 0x6A, 0xAE, 0x70, 0xA5, 0x35, 0xA7, 0x60, 0xA6, 0x53, 0xCA, 0xF0, -0xA7, 0x15, 0x89, 0x60, 0xA8, 0x33, 0xAC, 0xF0, 0xA8, 0xFE, 0xA5, 0xE0, 0xAA, 0x13, 0x8E, 0xF0, -0xAA, 0xDE, 0x87, 0xE0, 0xAB, 0xF3, 0x70, 0xF0, 0xAC, 0xBE, 0x69, 0xE0, 0xAD, 0xD3, 0x52, 0xF0, -0xAE, 0x9E, 0x4B, 0xE0, 0xAF, 0xB3, 0x34, 0xF0, 0xB0, 0x7E, 0x2D, 0xE0, 0xB1, 0x9C, 0x51, 0x70, -0xB2, 0x67, 0x4A, 0x60, 0xB3, 0x7C, 0x33, 0x70, 0xB4, 0x47, 0x2C, 0x60, 0xB5, 0x5C, 0x15, 0x70, -0xB6, 0x27, 0x0E, 0x60, 0xB7, 0x3B, 0xF7, 0x70, 0xB8, 0x06, 0xF0, 0x60, 0xB9, 0x1B, 0xD9, 0x70, -0xB9, 0xE6, 0xD2, 0x60, 0xBB, 0x04, 0xF5, 0xF0, 0xBB, 0xC6, 0xB4, 0x60, 0xBC, 0xE4, 0xD7, 0xF0, -0xBD, 0xAF, 0xD0, 0xE0, 0xBE, 0xC4, 0xB9, 0xF0, 0xBF, 0x8F, 0xB2, 0xE0, 0xC0, 0xA4, 0x9B, 0xF0, -0xC1, 0x6F, 0x94, 0xE0, 0xC2, 0x84, 0x7D, 0xF0, 0xC3, 0x4F, 0x76, 0xE0, 0xC4, 0x64, 0x5F, 0xF0, -0xC5, 0x2F, 0x58, 0xE0, 0xC6, 0x4D, 0x7C, 0x70, 0xC7, 0x0F, 0x3A, 0xE0, 0xC8, 0x2D, 0x5E, 0x70, -0xC8, 0xF8, 0x57, 0x60, 0xCA, 0x0D, 0x40, 0x70, 0xCA, 0xD8, 0x39, 0x60, 0xCB, 0x88, 0xF0, 0x70, -0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x60, 0xFB, 0xE0, 0xD3, 0x75, 0xE4, 0xF0, 0xD4, 0x40, 0xDD, 0xE0, -0xD5, 0x55, 0xC6, 0xF0, 0xD6, 0x20, 0xBF, 0xE0, 0xD7, 0x35, 0xA8, 0xF0, 0xD8, 0x00, 0xA1, 0xE0, -0xD9, 0x15, 0x8A, 0xF0, 0xD9, 0xE0, 0x83, 0xE0, 0xDA, 0xFE, 0xA7, 0x70, 0xDB, 0xC0, 0x65, 0xE0, -0xDC, 0xDE, 0x89, 0x70, 0xDD, 0xA9, 0x82, 0x60, 0xDE, 0xBE, 0x6B, 0x70, 0xDF, 0x89, 0x64, 0x60, -0xE0, 0x9E, 0x4D, 0x70, 0xE1, 0x69, 0x46, 0x60, 0xE2, 0x7E, 0x2F, 0x70, 0xE3, 0x49, 0x28, 0x60, -0xE4, 0x5E, 0x11, 0x70, 0xE5, 0x57, 0x2E, 0xE0, 0xE6, 0x47, 0x2D, 0xF0, 0xE7, 0x37, 0x10, 0xE0, -0xE8, 0x27, 0x0F, 0xF0, 0xE9, 0x16, 0xF2, 0xE0, 0xEA, 0x06, 0xF1, 0xF0, 0xEA, 0xF6, 0xD4, 0xE0, -0xEB, 0xE6, 0xD3, 0xF0, 0xEC, 0xD6, 0xB6, 0xE0, 0xED, 0xC6, 0xB5, 0xF0, 0xEE, 0xBF, 0xD3, 0x60, -0xEF, 0xAF, 0xD2, 0x70, 0xF0, 0x9F, 0xB5, 0x60, 0xF1, 0x8F, 0xB4, 0x70, 0xF2, 0x7F, 0x97, 0x60, -0xF3, 0x6F, 0x96, 0x70, 0xF4, 0x5F, 0x79, 0x60, 0xF5, 0x4F, 0x78, 0x70, 0xF6, 0x3F, 0x5B, 0x60, -0xF7, 0x2F, 0x5A, 0x70, 0xF8, 0x28, 0x77, 0xE0, 0xF9, 0x0F, 0x3C, 0x70, 0xFA, 0x08, 0x59, 0xE0, -0xFA, 0xF8, 0x58, 0xF0, 0xFB, 0xE8, 0x3B, 0xE0, 0xFC, 0xD8, 0x3A, 0xF0, 0xFD, 0xC8, 0x1D, 0xE0, -0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0, 0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, -0x02, 0x77, 0xE0, 0xF0, 0x03, 0x70, 0xFE, 0x60, 0x04, 0x60, 0xFD, 0x70, 0x05, 0x50, 0xE0, 0x60, -0x06, 0x40, 0xDF, 0x70, 0x07, 0x30, 0xC2, 0x60, 0x07, 0x8D, 0x19, 0x70, 0x09, 0x10, 0xA4, 0x60, -0x09, 0xAD, 0x94, 0xF0, 0x0A, 0xF0, 0x86, 0x60, 0x0B, 0xE0, 0x85, 0x70, 0x0C, 0xD9, 0xA2, 0xE0, -0x0D, 0xC0, 0x67, 0x70, 0x0E, 0xB9, 0x84, 0xE0, 0x0F, 0xA9, 0x83, 0xF0, 0x10, 0x99, 0x66, 0xE0, -0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, 0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0, -0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, 0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60, -0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, 0x1A, 0xF2, 0x0A, 0x70, 0x1B, 0xE1, 0xED, 0x60, -0x1C, 0xD1, 0xEC, 0x70, 0x1D, 0xC1, 0xCF, 0x60, 0x1E, 0xB1, 0xCE, 0x70, 0x1F, 0xA1, 0xB1, 0x60, -0x20, 0x76, 0x00, 0xF0, 0x21, 0x81, 0x93, 0x60, 0x22, 0x55, 0xE2, 0xF0, 0x23, 0x6A, 0xAF, 0xE0, -0x24, 0x35, 0xC4, 0xF0, 0x25, 0x4A, 0x91, 0xE0, 0x26, 0x15, 0xA6, 0xF0, 0x27, 0x2A, 0x73, 0xE0, -0x27, 0xFE, 0xC3, 0x70, 0x29, 0x0A, 0x55, 0xE0, 0x29, 0xDE, 0xA5, 0x70, 0x2A, 0xEA, 0x37, 0xE0, -0x2B, 0xBE, 0x87, 0x70, 0x2C, 0xD3, 0x54, 0x60, 0x2D, 0x9E, 0x69, 0x70, 0x2E, 0xB3, 0x36, 0x60, -0x2F, 0x7E, 0x4B, 0x70, 0x30, 0x93, 0x18, 0x60, 0x31, 0x67, 0x67, 0xF0, 0x32, 0x72, 0xFA, 0x60, -0x33, 0x47, 0x49, 0xF0, 0x34, 0x52, 0xDC, 0x60, 0x35, 0x27, 0x2B, 0xF0, 0x36, 0x32, 0xBE, 0x60, -0x37, 0x07, 0x0D, 0xF0, 0x38, 0x1B, 0xDA, 0xE0, 0x38, 0xE6, 0xEF, 0xF0, 0x39, 0xFB, 0xBC, 0xE0, -0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, 0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, -0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, 0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, -0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, 0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, -0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, -0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, -0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, -0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, -0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, -0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, -0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, -0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, -0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, -0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, -0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, -0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, -0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, -0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, -0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, -0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x1E, 0x70, +0x9F, 0xBA, 0xEB, 0x60, 0xA0, 0x86, 0x00, 0x70, 0xA1, 0x9A, 0xCD, 0x60, 0xCB, 0x88, 0xF0, 0x70, +0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x60, 0xFB, 0xE0, 0xFA, 0xF8, 0x58, 0xF0, 0xFB, 0xE8, 0x3B, 0xE0, +0xFC, 0xD8, 0x3A, 0xF0, 0xFD, 0xC8, 0x1D, 0xE0, 0xFE, 0xB8, 0x1C, 0xF0, 0xFF, 0xA7, 0xFF, 0xE0, +0x00, 0x97, 0xFE, 0xF0, 0x01, 0x87, 0xE1, 0xE0, 0x02, 0x77, 0xE0, 0xF0, 0x03, 0x70, 0xFE, 0x60, +0x04, 0x60, 0xFD, 0x70, 0x05, 0x50, 0xE0, 0x60, 0x06, 0x40, 0xDF, 0x70, 0x07, 0x30, 0xC2, 0x60, +0x07, 0x8D, 0x19, 0x70, 0x09, 0x10, 0xA4, 0x60, 0x09, 0xAD, 0x94, 0xF0, 0x0A, 0xF0, 0x86, 0x60, +0x0B, 0xE0, 0x85, 0x70, 0x0C, 0xD9, 0xA2, 0xE0, 0x0D, 0xC0, 0x67, 0x70, 0x0E, 0xB9, 0x84, 0xE0, +0x0F, 0xA9, 0x83, 0xF0, 0x10, 0x99, 0x66, 0xE0, 0x11, 0x89, 0x65, 0xF0, 0x12, 0x79, 0x48, 0xE0, +0x13, 0x69, 0x47, 0xF0, 0x14, 0x59, 0x2A, 0xE0, 0x15, 0x49, 0x29, 0xF0, 0x16, 0x39, 0x0C, 0xE0, +0x17, 0x29, 0x0B, 0xF0, 0x18, 0x22, 0x29, 0x60, 0x19, 0x08, 0xED, 0xF0, 0x1A, 0x02, 0x0B, 0x60, +0x1A, 0xF2, 0x0A, 0x70, 0x1B, 0xE1, 0xED, 0x60, 0x1C, 0xD1, 0xEC, 0x70, 0x1D, 0xC1, 0xCF, 0x60, +0x1E, 0xB1, 0xCE, 0x70, 0x1F, 0xA1, 0xB1, 0x60, 0x20, 0x76, 0x00, 0xF0, 0x21, 0x81, 0x93, 0x60, +0x22, 0x55, 0xE2, 0xF0, 0x23, 0x6A, 0xAF, 0xE0, 0x24, 0x35, 0xC4, 0xF0, 0x25, 0x4A, 0x91, 0xE0, +0x26, 0x15, 0xA6, 0xF0, 0x27, 0x2A, 0x73, 0xE0, 0x27, 0xFE, 0xC3, 0x70, 0x29, 0x0A, 0x55, 0xE0, +0x29, 0xDE, 0xA5, 0x70, 0x2A, 0xEA, 0x37, 0xE0, 0x2B, 0xBE, 0x87, 0x70, 0x2C, 0xD3, 0x54, 0x60, +0x2D, 0x9E, 0x69, 0x70, 0x2E, 0xB3, 0x36, 0x60, 0x2F, 0x7E, 0x4B, 0x70, 0x30, 0x93, 0x18, 0x60, +0x31, 0x67, 0x67, 0xF0, 0x32, 0x72, 0xFA, 0x60, 0x33, 0x47, 0x49, 0xF0, 0x34, 0x52, 0xDC, 0x60, +0x35, 0x27, 0x2B, 0xF0, 0x36, 0x32, 0xBE, 0x60, 0x37, 0x07, 0x0D, 0xF0, 0x38, 0x1B, 0xDA, 0xE0, +0x38, 0xE6, 0xEF, 0xF0, 0x39, 0xFB, 0xBC, 0xE0, 0x3A, 0xC6, 0xD1, 0xF0, 0x3B, 0xDB, 0x9E, 0xE0, +0x3C, 0xAF, 0xEE, 0x70, 0x3D, 0xBB, 0x80, 0xE0, 0x3E, 0x8F, 0xD0, 0x70, 0x3F, 0x9B, 0x62, 0xE0, +0x40, 0x6F, 0xB2, 0x70, 0x41, 0x84, 0x7F, 0x60, 0x42, 0x4F, 0x94, 0x70, 0x43, 0x64, 0x61, 0x60, +0x44, 0x2F, 0x76, 0x70, 0x45, 0x44, 0x43, 0x60, 0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x5F, 0xE0, +0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x41, 0xE0, 0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x23, 0xE0, +0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x40, 0x60, 0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x22, 0x60, +0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x04, 0x60, 0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xE6, 0x60, +0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xC8, 0x60, 0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xAA, 0x60, +0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xC6, 0xE0, 0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xA8, 0xE0, +0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x8A, 0xE0, 0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x6C, 0xE0, +0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x4E, 0xE0, 0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x6B, 0x60, +0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x4D, 0x60, 0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x2F, 0x60, +0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x11, 0x60, 0x67, 0xCD, 0x3C, 0x70, 0x69, 0x06, 0xF3, 0x60, +0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xD5, 0x60, 0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xF1, 0xE0, +0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xD3, 0xE0, 0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xB5, 0xE0, +0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0x97, 0xE0, 0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x79, 0xE0, +0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0x96, 0x60, 0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x78, 0x60, +0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x5A, 0x60, 0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x3C, 0x60, +0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x1E, 0x60, 0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x00, 0x60, +0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, @@ -10738,10 +10660,10 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, -0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x04, 0xFF, -0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54, 0x00, 0x45, -0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, -0x00, 0x00, 0x01, +0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x00, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, +0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x08, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x0C, 0x45, 0x44, 0x54, +0x00, 0x45, 0x53, 0x54, 0x00, 0x45, 0x57, 0x54, 0x00, 0x45, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x01, /* Etc/GMT */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -14199,14 +14121,9 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* HST */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x06, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0xBB, 0x05, 0x43, 0x48, -0xBB, 0x20, 0xE4, 0xB8, 0xCB, 0x89, 0x3D, 0xC8, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x49, 0x38, -0xD5, 0x8D, 0x73, 0x48, 0x01, 0x00, 0x02, 0x03, 0x00, 0x04, 0xFF, 0xFF, 0x6C, 0x58, 0x00, 0x00, -0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x04, 0xFF, 0xFF, 0x7A, 0x68, 0x01, 0x08, 0xFF, 0xFF, 0x7A, 0x68, -0x01, 0x0C, 0xFF, 0xFF, 0x73, 0x60, 0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x48, 0x44, 0x54, 0x00, -0x48, 0x57, 0x54, 0x00, 0x48, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x73, 0x60, +0x00, 0x00, 0x48, 0x53, 0x54, 0x00, 0x00, 0x00, /* Iceland */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -14644,23 +14561,16 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* MST */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x0A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x9E, 0xA6, 0x3A, 0x90, -0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x86, 0x1C, 0x90, 0xA1, 0x9A, 0xE9, 0x80, 0xCB, 0x89, 0x0C, 0x90, -0xCF, 0x17, 0xDF, 0x1C, 0xCF, 0x8F, 0xE5, 0xAC, 0xD0, 0x81, 0x1A, 0x1C, 0xFA, 0xF8, 0x75, 0x10, -0xFB, 0xE8, 0x58, 0x00, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x01, 0xFF, 0xFF, -0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, -0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, +0x00, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, /* MST7MDT */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0x9D, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x3A, 0x90, -0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x86, 0x1C, 0x90, 0xA1, 0x9A, 0xE9, 0x80, 0xA2, 0x65, 0xFE, 0x90, -0xA3, 0x84, 0x06, 0x00, 0xA4, 0x45, 0xE0, 0x90, 0xA4, 0x8F, 0xA6, 0x80, 0xCB, 0x89, 0x0C, 0x90, -0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xF7, 0x2F, 0x76, 0x90, 0xF8, 0x28, 0x94, 0x00, -0xF9, 0x0F, 0x58, 0x90, 0xFA, 0x08, 0x76, 0x00, 0xFA, 0xF8, 0x75, 0x10, 0xFB, 0xE8, 0x58, 0x00, +0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x3A, 0x90, +0x9F, 0xBB, 0x07, 0x80, 0xA0, 0x86, 0x1C, 0x90, 0xA1, 0x9A, 0xE9, 0x80, 0xCB, 0x89, 0x0C, 0x90, +0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x18, 0x00, 0xFA, 0xF8, 0x75, 0x10, 0xFB, 0xE8, 0x58, 0x00, 0xFC, 0xD8, 0x57, 0x10, 0xFD, 0xC8, 0x3A, 0x00, 0xFE, 0xB8, 0x39, 0x10, 0xFF, 0xA8, 0x1C, 0x00, 0x00, 0x98, 0x1B, 0x10, 0x01, 0x87, 0xFE, 0x00, 0x02, 0x77, 0xFD, 0x10, 0x03, 0x71, 0x1A, 0x80, 0x04, 0x61, 0x19, 0x90, 0x05, 0x50, 0xFC, 0x80, 0x06, 0x40, 0xFB, 0x90, 0x07, 0x30, 0xDE, 0x80, @@ -14696,7 +14606,7 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x74, 0xFE, 0xFB, 0x90, 0x76, 0x38, 0xB2, 0x80, 0x76, 0xDE, 0xDD, 0x90, 0x78, 0x18, 0x94, 0x80, 0x78, 0xBE, 0xBF, 0x90, 0x79, 0xF8, 0x76, 0x80, 0x7A, 0x9E, 0xA1, 0x90, 0x7B, 0xD8, 0x58, 0x80, 0x7C, 0x7E, 0x83, 0x90, 0x7D, 0xB8, 0x3A, 0x80, 0x7E, 0x5E, 0x65, 0x90, 0x7F, 0x98, 0x1C, 0x80, -0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, +0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, @@ -14705,10 +14615,10 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 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, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, -0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, -0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, -0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54, 0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, -0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, +0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x00, +0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x08, 0xFF, 0xFF, 0xAB, 0xA0, 0x01, 0x0C, 0x4D, 0x44, 0x54, +0x00, 0x4D, 0x53, 0x54, 0x00, 0x4D, 0x57, 0x54, 0x00, 0x4D, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x01, /* Navajo */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -15492,18 +15402,9 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { /* PST8PDT */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 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, 0xB9, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x48, 0xA0, +0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x9E, 0xA6, 0x48, 0xA0, 0x9F, 0xBB, 0x15, 0x90, 0xA0, 0x86, 0x2A, 0xA0, 0xA1, 0x9A, 0xF7, 0x90, 0xCB, 0x89, 0x1A, 0xA0, -0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x26, 0x10, 0xD6, 0xFE, 0x74, 0x20, 0xD8, 0x80, 0xAD, 0x90, -0xDA, 0xFE, 0xD1, 0xA0, 0xDB, 0xC0, 0x90, 0x10, 0xDC, 0xDE, 0xB3, 0xA0, 0xDD, 0xA9, 0xAC, 0x90, -0xDE, 0xBE, 0x95, 0xA0, 0xDF, 0x89, 0x8E, 0x90, 0xE0, 0x9E, 0x77, 0xA0, 0xE1, 0x69, 0x70, 0x90, -0xE2, 0x7E, 0x59, 0xA0, 0xE3, 0x49, 0x52, 0x90, 0xE4, 0x5E, 0x3B, 0xA0, 0xE5, 0x29, 0x34, 0x90, -0xE6, 0x47, 0x58, 0x20, 0xE7, 0x12, 0x51, 0x10, 0xE8, 0x27, 0x3A, 0x20, 0xE8, 0xF2, 0x33, 0x10, -0xEA, 0x07, 0x1C, 0x20, 0xEA, 0xD2, 0x15, 0x10, 0xEB, 0xE6, 0xFE, 0x20, 0xEC, 0xB1, 0xF7, 0x10, -0xED, 0xC6, 0xE0, 0x20, 0xEE, 0x91, 0xD9, 0x10, 0xEF, 0xAF, 0xFC, 0xA0, 0xF0, 0x71, 0xBB, 0x10, -0xF1, 0x8F, 0xDE, 0xA0, 0xF2, 0x7F, 0xC1, 0x90, 0xF3, 0x6F, 0xC0, 0xA0, 0xF4, 0x5F, 0xA3, 0x90, -0xF5, 0x4F, 0xA2, 0xA0, 0xF6, 0x3F, 0x85, 0x90, 0xF7, 0x2F, 0x84, 0xA0, 0xF8, 0x28, 0xA2, 0x10, -0xF9, 0x0F, 0x66, 0xA0, 0xFA, 0x08, 0x84, 0x10, 0xFA, 0xF8, 0x83, 0x20, 0xFB, 0xE8, 0x66, 0x10, +0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x26, 0x10, 0xFA, 0xF8, 0x83, 0x20, 0xFB, 0xE8, 0x66, 0x10, 0xFC, 0xD8, 0x65, 0x20, 0xFD, 0xC8, 0x48, 0x10, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x98, 0x29, 0x20, 0x01, 0x88, 0x0C, 0x10, 0x02, 0x78, 0x0B, 0x20, 0x03, 0x71, 0x28, 0x90, 0x04, 0x61, 0x27, 0xA0, 0x05, 0x51, 0x0A, 0x90, 0x06, 0x41, 0x09, 0xA0, 0x07, 0x30, 0xEC, 0x90, @@ -15548,12 +15449,10 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 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, 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, -0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x00, 0xFF, -0xFF, 0x8F, 0x80, 0x00, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, -0x0C, 0x50, 0x44, 0x54, 0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, -0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, +0x01, 0x00, 0x01, 0x00, 0x01, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x00, 0xFF, 0xFF, 0x8F, 0x80, 0x00, +0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0x50, 0x44, 0x54, +0x00, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x01, /* ROC */ 0x54, 0x5A, 0x69, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16434,4 +16333,4 @@ unsigned char timelib_timezone_db_data_builtin[232807] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, }; -timelib_tzdb timezonedb_builtin = { "2005.14", 535, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +timelib_tzdb timezonedb_builtin = { "2005.18", 535, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; diff --git a/ext/date/lib/timezonemap.h b/ext/date/lib/timezonemap.h index 00a66d637..8916c7993 100644 --- a/ext/date/lib/timezonemap.h +++ b/ext/date/lib/timezonemap.h @@ -786,7 +786,6 @@ { "est", 0, -18000, "America/Thunder_Bay" }, { "est", 0, -18000, "America/Toronto" }, { "est", 0, -18000, "Canada/Eastern" }, - { "est", 0, -18000, "CST6CDT" }, { "est", 0, -18000, "EST" }, { "est", 0, -18000, "EST5EDT" }, { "est", 0, -18000, "Jamaica" }, @@ -1621,6 +1620,7 @@ { "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 }, diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c index 126d14497..2d97a4061 100644 --- a/ext/date/lib/tm2unixtime.c +++ b/ext/date/lib/tm2unixtime.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tm2unixtime.c,v 1.13.2.1 2005/10/19 21:08:32 derick Exp $ */ +/* $Id: tm2unixtime.c,v 1.13.2.2 2006/01/01 12:50:05 sniper Exp $ */ #include "timelib.h" diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c index 94dec51f5..51048b646 100644 --- a/ext/date/lib/unixtime2tm.c +++ b/ext/date/lib/unixtime2tm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unixtime2tm.c,v 1.12 2005/08/03 14:06:50 sniper Exp $ */ +/* $Id: unixtime2tm.c,v 1.12.2.4 2006/01/04 21:31:34 derick Exp $ */ #include "timelib.h" @@ -93,6 +93,9 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts) DEBUG(printf("tmp_days=%lld, year=%lld\n", tmp_days, cur_year);); months = timelib_is_leap(cur_year) ? month_tab_leap : month_tab; + if (timelib_is_leap(cur_year) && cur_year < 1970) { + tmp_days--; + } i = 11; while (i > 0) { DEBUG(printf("month=%lld (%d)\n", i, months[i]);); @@ -121,7 +124,6 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts) tm->sse_uptodate = 1; tm->tim_uptodate = 1; tm->is_localtime = 0; - tm->have_zone = 0; } void timelib_update_from_sse(timelib_time *tm) @@ -138,8 +140,6 @@ void timelib_update_from_sse(timelib_time *tm) timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60)); - tm->is_localtime = 1; - tm->have_zone = 1; tm->z = z; tm->dst = dst; goto cleanup; @@ -165,25 +165,46 @@ cleanup: tm->have_zone = 1; } -void timelib_unixtime2local(timelib_time *tm, timelib_sll ts, timelib_tzinfo* tz) +void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) { timelib_time_offset *gmt_offset; + timelib_tzinfo *tz = tm->tz_info; - gmt_offset = timelib_get_time_zone_info(ts, tz); - timelib_unixtime2gmt(tm, ts + gmt_offset->offset); + switch (tm->zone_type) { + case TIMELIB_ZONETYPE_ABBR: + case TIMELIB_ZONETYPE_OFFSET: { + int z = tm->z; + signed int dst = tm->dst; + + timelib_unixtime2gmt(tm, ts - (tm->z * 60)); - /* we need to reset the sse here as unixtime2gmt modifies it */ - tm->sse = ts; - tm->dst = gmt_offset->is_dst; - tm->z = gmt_offset->offset; - tm->tz_info = tz; + tm->z = z; + tm->dst = dst; + break; + } - timelib_time_tz_abbr_update(tm, gmt_offset->abbr); - timelib_time_offset_dtor(gmt_offset); + case TIMELIB_ZONETYPE_ID: + gmt_offset = timelib_get_time_zone_info(ts, tz); + timelib_unixtime2gmt(tm, ts + gmt_offset->offset); + + /* we need to reset the sse here as unixtime2gmt modifies it */ + tm->sse = ts; + tm->dst = gmt_offset->is_dst; + tm->z = gmt_offset->offset; + tm->tz_info = tz; + + timelib_time_tz_abbr_update(tm, gmt_offset->abbr); + timelib_time_offset_dtor(gmt_offset); + break; + + default: + tm->is_localtime = 0; + tm->have_zone = 0; + return; + } tm->is_localtime = 1; tm->have_zone = 1; - tm->zone_type = TIMELIB_ZONETYPE_ID; } void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz) @@ -225,7 +246,7 @@ int timelib_apply_localtime(timelib_time *t, unsigned int localtime) return -1; } - timelib_unixtime2local(t, t->sse, t->tz_info); + timelib_unixtime2local(t, t->sse); } else { /* Converting from local time to GMT time */ DEBUG(printf("Converting from local time to GMT time\n");); diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 2a54bb895..a07a4effa 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.43.2.25 2005/11/27 06:51:40 iliaa Exp $ */ +/* $Id: php_date.c,v 1.43.2.37 2006/01/04 21:31:29 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -30,9 +30,10 @@ #include /* {{{ Function table */ -function_entry date_functions[] = { +zend_function_entry date_functions[] = { PHP_FE(strtotime, NULL) PHP_FE(date, NULL) + PHP_FE(idate, NULL) PHP_FE(gmdate, NULL) PHP_FE(mktime, NULL) PHP_FE(gmmktime, NULL) @@ -71,11 +72,16 @@ function_entry date_functions[] = { /* Options and Configuration */ PHP_FE(date_default_timezone_set, NULL) PHP_FE(date_default_timezone_get, NULL) + + /* Astronomical functions */ + PHP_FE(date_sunrise, NULL) + PHP_FE(date_sunset, NULL) +/* PHP_FE(date_sun_info, NULL) */ {NULL, NULL, NULL} }; #ifdef EXPERIMENTAL_DATE_SUPPORT -function_entry date_funcs_date[] = { +zend_function_entry date_funcs_date[] = { ZEND_NAMED_FE(format, ZEND_FN(date_format), NULL) ZEND_NAMED_FE(modify, ZEND_FN(date_modify), NULL) ZEND_NAMED_FE(getTimezone, ZEND_FN(date_timezone_get), NULL) @@ -87,7 +93,7 @@ function_entry date_funcs_date[] = { {NULL, NULL, NULL} }; -function_entry date_funcs_timezone[] = { +zend_function_entry date_funcs_timezone[] = { ZEND_NAMED_FE(getName, ZEND_FN(timezone_name_get), NULL) ZEND_NAMED_FE(getOffset, ZEND_FN(timezone_offset_get), NULL) ZEND_NAMED_FE(getTransistions, ZEND_FN(timezone_transistions_get), NULL) @@ -98,7 +104,7 @@ function_entry date_funcs_timezone[] = { static void date_register_classes(TSRMLS_D); #endif -static char* guess_timezone(TSRMLS_D); +static char* guess_timezone(timelib_tzdb *tzdb TSRMLS_DC); /* }}} */ ZEND_DECLARE_MODULE_GLOBALS(date) @@ -107,9 +113,22 @@ ZEND_DECLARE_MODULE_GLOBALS(date) timelib_tzdb *php_date_global_timezone_db; int php_date_global_timezone_db_enabled; +#define DATE_DEFAULT_LATITUDE "31.7667" +#define DATE_DEFAULT_LONGITUDE "35.2333" + +/* on 90'35; common sunset declaration (start of sun body appear) */ +#define DATE_SUNSET_ZENITH "90.583333" + +/* on 90'35; common sunrise declaration (sun body disappeared) */ +#define DATE_SUNRISE_ZENITH "90.583333" + /* {{{ INI Settings */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("date.timezone", "", PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) + PHP_INI_ENTRY("date.default_latitude", DATE_DEFAULT_LATITUDE, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("date.default_longitude", DATE_DEFAULT_LONGITUDE, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("date.sunset_zenith", DATE_SUNSET_ZENITH, PHP_INI_ALL, NULL) + PHP_INI_ENTRY("date.sunrise_zenith", DATE_SUNRISE_ZENITH, PHP_INI_ALL, NULL) PHP_INI_END() /* }}} */ @@ -224,7 +243,14 @@ PHP_RSHUTDOWN_FUNCTION(date) #define DATE_TZ_ERRMSG \ "It is not safe to rely on the system's timezone settings. Please use " \ "the date.timezone setting, the TZ environment variable or the " \ - "date_default_timezone_set() function. " + "date_default_timezone_set() function. In case you used any of those " \ + "methods and you are still getting this warning, you most likely " \ + "misspelled the timezone identifier. " + +#define SUNFUNCS_RET_TIMESTAMP 0 +#define SUNFUNCS_RET_STRING 1 +#define SUNFUNCS_RET_DOUBLE 2 + /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(date) @@ -245,6 +271,10 @@ PHP_MINIT_FUNCTION(date) REGISTER_STRING_CONSTANT("DATE_RSS", DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT("DATE_W3C", DATE_FORMAT_ISO8601, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SUNFUNCS_RET_TIMESTAMP", SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SUNFUNCS_RET_STRING", SUNFUNCS_RET_STRING, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SUNFUNCS_RET_DOUBLE", SUNFUNCS_RET_DOUBLE, CONST_CS | CONST_PERSISTENT); + php_date_global_timezone_db = NULL; php_date_global_timezone_db_enabled = 0; @@ -270,7 +300,7 @@ PHP_MINFO_FUNCTION(date) php_info_print_table_row(2, "date/time support", "enabled"); php_info_print_table_row(2, "Timezone Database Version", tzdb->version); php_info_print_table_row(2, "Timezone Database", php_date_global_timezone_db_enabled ? "external" : "internal"); - php_info_print_table_row(2, "Default timezone", guess_timezone(TSRMLS_C)); + php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb TSRMLS_CC)); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); @@ -295,7 +325,7 @@ static timelib_tzinfo *php_date_parse_tzfile(char *formal_tzname, timelib_tzdb * /* }}} */ /* {{{ Helper functions */ -static char* guess_timezone(TSRMLS_D) +static char* guess_timezone(timelib_tzdb *tzdb TSRMLS_DC) { char *env; @@ -305,11 +335,11 @@ static char* guess_timezone(TSRMLS_D) } /* Check environment variable */ env = getenv("TZ"); - if (env && *env) { + if (env && *env && timelib_timezone_id_is_valid(env, tzdb)) { return env; } /* Check config setting for default timezone */ - if (DATEG(default_timezone) && (strlen(DATEG(default_timezone)) > 0)) { + if (DATEG(default_timezone) && (strlen(DATEG(default_timezone)) > 0) && timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) { return DATEG(default_timezone); } #if HAVE_TM_ZONE @@ -375,15 +405,10 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D) char *tz; timelib_tzinfo *tzi; - tz = guess_timezone(TSRMLS_C); + tz = guess_timezone(DATE_TIMEZONEDB TSRMLS_CC); tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB TSRMLS_CC); if (! tzi) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone setting (date.timezone) or TZ environment variable contains an unknown timezone"); - tzi = php_date_parse_tzfile("UTC", DATE_TIMEZONEDB TSRMLS_CC); - - if (! tzi) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Timezone database is corrupt - this should *never* happen!"); - } + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Timezone database is corrupt - this should *never* happen!"); } return tzi; } @@ -494,7 +519,15 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca /* time */ case 'a': snprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break; case 'A': snprintf(buffer, 32, "%s", t->h >= 12 ? "PM" : "AM"); break; - case 'B': snprintf(buffer, 32, "[B unimplemented]"); break; + case 'B': { + int retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864); + while (retval < 0) { + retval += 1000; + } + retval = retval % 1000; + snprintf(buffer, 32, "%03d", retval); break; + break; + } case 'g': snprintf(buffer, 32, "%d", (t->h % 12) ? (int) t->h % 12 : 12); break; case 'G': snprintf(buffer, 32, "%d", (int) t->h); break; case 'h': snprintf(buffer, 32, "%02d", (t->h % 12) ? (int) t->h % 12 : 12); break; @@ -555,7 +588,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime) { char *format; int format_len; - time_t ts; + long ts; char *string; if (ZEND_NUM_ARGS() == 1) { @@ -581,7 +614,9 @@ PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localt if (localtime) { tzi = get_timezone_info(TSRMLS_C); - timelib_unixtime2local(t, ts, tzi); + t->tz_info = tzi; + t->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(t, ts); } else { tzi = NULL; timelib_unixtime2gmt(t, ts); @@ -594,6 +629,103 @@ PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localt } /* }}} */ +/* {{{ php_idate + */ +PHPAPI int php_idate(char format, time_t ts, int localtime) +{ + timelib_time *t; + timelib_tzinfo *tzi; + int retval = -1; + timelib_time_offset *offset; + timelib_sll isoweek, isoyear; + + t = timelib_time_ctor(); + + if (!localtime) { + TSRMLS_FETCH(); + tzi = get_timezone_info(TSRMLS_C); + t->tz_info = tzi; + t->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(t, ts); + } else { + tzi = NULL; + timelib_unixtime2gmt(t, ts); + } + + if (!localtime) { + if (t->zone_type == TIMELIB_ZONETYPE_ABBR) { + offset = timelib_time_offset_ctor(); + offset->offset = (t->z - (t->dst * 60)) * -60; + offset->leap_secs = 0; + offset->is_dst = t->dst; + offset->abbr = strdup(t->tz_abbr); + } else if (t->zone_type == TIMELIB_ZONETYPE_OFFSET) { + offset = timelib_time_offset_ctor(); + offset->offset = (t->z - (t->dst * 60)) * -60; + offset->leap_secs = 0; + offset->is_dst = t->dst; + offset->abbr = malloc(9); /* GMT±xxxx\0 */ + snprintf(offset->abbr, 9, "GMT%c%02d%02d", + !localtime ? ((offset->offset < 0) ? '-' : '+') : '+', + !localtime ? abs(offset->offset / 3600) : 0, + !localtime ? abs((offset->offset % 3600) / 60) : 0 ); + } else { + offset = timelib_get_time_zone_info(t->sse, t->tz_info); + } + } + + timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); + + switch (format) { + /* day */ + case 'd': case 'j': retval = (int) t->d; break; + + case 'w': retval = (int) timelib_day_of_week(t->y, t->m, t->d); break; + case 'z': retval = (int) timelib_day_of_year(t->y, t->m, t->d); break; + + /* week */ + case 'W': retval = (int) isoweek; break; /* iso weeknr */ + + /* month */ + case 'm': case 'n': retval = (int) t->m; break; + case 't': retval = (int) timelib_days_in_month(t->y, t->m); break; + + /* year */ + case 'L': retval = (int) timelib_is_leap((int) t->y); break; + case 'y': retval = (int) (t->y % 100); break; + case 'Y': retval = (int) t->y; break; + + /* Swatch Beat a.k.a. Internet Time */ + case 'B': + retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864); + while (retval < 0) { + retval += 1000; + } + retval = retval % 1000; + break; + + /* time */ + case 'g': case 'h': retval = (int) ((t->h % 12) ? (int) t->h % 12 : 12); break; + case 'H': case 'G': retval = (int) t->h; break; + case 'i': retval = (int) t->i; break; + case 's': retval = (int) t->s; break; + + /* timezone */ + case 'I': retval = (int) (!localtime ? offset->is_dst : 0); break; + case 'Z': retval = (int) (!localtime ? offset->offset : 0); break; + + case 'U': retval = (int) t->sse; break; + } + + if (!localtime) { + timelib_time_offset_dtor(offset); + } + timelib_time_dtor(t); + + return retval; +} +/* }}} */ + /* {{{ proto string date(string format [, long timestamp]) Format a local date/time */ PHP_FUNCTION(date) @@ -610,6 +742,37 @@ PHP_FUNCTION(gmdate) } /* }}} */ +/* {{{ proto int idate(string format [, int timestamp]) + Format a local time/date as integer */ +PHP_FUNCTION(idate) +{ + char *format; + int format_len; + long ts; + int ret; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format, &format_len, &ts) == FAILURE) { + RETURN_FALSE; + } + + if (format_len != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "idate format is one char"); + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() == 1) { + ts = time(NULL); + } + + ret = php_idate(format[0], ts, 0); + if (ret == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date format token."); + RETURN_FALSE; + } + RETURN_LONG(ret); +} +/* }}} */ + /* {{{ php_date_set_tzdb - NOT THREADSAFE */ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb) { @@ -629,7 +792,7 @@ signed long php_parse_date(char *string, signed long *now) int error1, error2; signed long retval; - parsed_time = timelib_strtotime(string, &error1, DATE_TIMEZONEDB); + parsed_time = timelib_strtotime(string, strlen(string), &error1, DATE_TIMEZONEDB); timelib_update_ts(parsed_time, NULL); retval = timelib_date_to_int(parsed_time, &error2); timelib_time_dtor(parsed_time); @@ -660,26 +823,30 @@ PHP_FUNCTION(strtotime) initial_ts = emalloc(25); snprintf(initial_ts, 24, "@%lu", preset_ts); - t = timelib_strtotime(initial_ts, &error1, DATE_TIMEZONEDB); /* we ignore the error here, as this should never fail */ + t = timelib_strtotime(initial_ts, strlen(initial_ts), &error1, DATE_TIMEZONEDB); /* we ignore the error here, as this should never fail */ timelib_update_ts(t, tzi); - timelib_unixtime2local(now, t->sse, tzi); + now->tz_info = tzi; + now->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(now, t->sse); timelib_time_dtor(t); efree(initial_ts); } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", ×, &time_len) != FAILURE) { /* We have no initial timestamp */ now = timelib_time_ctor(); - timelib_unixtime2local(now, (timelib_sll) time(NULL), tzi); + now->tz_info = tzi; + now->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(now, (timelib_sll) time(NULL)); } else { RETURN_FALSE; } - t = timelib_strtotime(times, &error1, DATE_TIMEZONEDB); + t = timelib_strtotime(times, time_len, &error1, DATE_TIMEZONEDB); timelib_fill_holes(t, now, 0); timelib_update_ts(t, tzi); ts = timelib_date_to_int(t, &error2); /* if tz_info is not a copy, avoid double free */ - if (now->tz_info != tzi) { + if (now->tz_info != tzi && now->tz_info) { timelib_tzinfo_dtor(now->tz_info); } if (t->tz_info != tzi) { @@ -716,7 +883,9 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt) timelib_unixtime2gmt(now, (timelib_sll) time(NULL)); } else { tzi = get_timezone_info(TSRMLS_C); - timelib_unixtime2local(now, (timelib_sll) time(NULL), tzi); + now->tz_info = tzi; + now->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(now, (timelib_sll) time(NULL)); } /* Fill in the new data */ switch (ZEND_NUM_ARGS()) { @@ -725,7 +894,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt) case 6: if (yea >= 0 && yea < 70) { yea += 2000; - } else if (yea >= 70 && yea <= 100) { + } else if (yea >= 70 && yea <= 110) { yea += 1900; } now->y = yea; @@ -852,7 +1021,9 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt) timelib_unixtime2gmt(ts, (timelib_sll) timestamp); } else { tzi = get_timezone_info(TSRMLS_C); - timelib_unixtime2local(ts, (timelib_sll) timestamp, tzi); + ts->tz_info = tzi; + ts->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(ts, (timelib_sll) timestamp); } ta.tm_sec = ts->s; ta.tm_min = ts->i; @@ -945,7 +1116,9 @@ PHP_FUNCTION(localtime) tzi = get_timezone_info(TSRMLS_C); ts = timelib_time_ctor(); - timelib_unixtime2local(ts, (timelib_sll) timestamp, tzi); + ts->tz_info = tzi; + ts->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(ts, (timelib_sll) timestamp); array_init(return_value); @@ -989,7 +1162,9 @@ PHP_FUNCTION(getdate) tzi = get_timezone_info(TSRMLS_C); ts = timelib_time_ctor(); - timelib_unixtime2local(ts, (timelib_sll) timestamp, tzi); + ts->tz_info = tzi; + ts->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(ts, (timelib_sll) timestamp); array_init(return_value); @@ -1104,14 +1279,14 @@ static void date_object_free_storage_date(void *object TSRMLS_DC) static void date_object_free_storage_timezone(void *object TSRMLS_DC) { - php_date_obj *intern = (php_date_obj *)object; - + php_timezone_obj *intern = (php_timezone_obj *)object; + if (intern->std.properties) { zend_hash_destroy(intern->std.properties); efree(intern->std.properties); intern->std.properties = NULL; } - + efree(object); } @@ -1145,7 +1320,7 @@ PHP_FUNCTION(date_create) date_instanciate(date_ce_date, return_value TSRMLS_CC); dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC); - dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", &error, DATE_TIMEZONEDB); + dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : sizeof("now") -1, &error, DATE_TIMEZONEDB); if (timezone_object) { php_timezone_obj *tzobj; @@ -1161,7 +1336,9 @@ PHP_FUNCTION(date_create) } now = timelib_time_ctor(); - timelib_unixtime2local(now, (timelib_sll) time(NULL), tzi); + now->tz_info = tzi; + now->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(now, (timelib_sll) time(NULL)); timelib_fill_holes(dateobj->time, now, 0); timelib_update_ts(dateobj->time, tzi); @@ -1203,7 +1380,7 @@ PHP_FUNCTION(date_modify) } dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); - tmp_time = timelib_strtotime(modify, &error, DATE_TIMEZONEDB); + tmp_time = timelib_strtotime(modify, modify_len, &error, DATE_TIMEZONEDB); dateobj->time->relative.y = tmp_time->relative.y; dateobj->time->relative.m = tmp_time->relative.m; dateobj->time->relative.d = tmp_time->relative.d; @@ -1255,7 +1432,7 @@ PHP_FUNCTION(date_timezone_set) timelib_tzinfo_dtor(dateobj->time->tz_info); } timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tz)); - timelib_unixtime2local(dateobj->time, dateobj->time->sse, dateobj->time->tz_info); + timelib_unixtime2local(dateobj->time, dateobj->time->sse); } PHP_FUNCTION(date_offset_get) @@ -1480,6 +1657,10 @@ PHP_FUNCTION(date_default_timezone_set) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &zone, &zone_len) == FAILURE) { RETURN_FALSE; } + if (!timelib_timezone_id_is_valid(zone, DATE_TIMEZONEDB)) { + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Timezone ID '%s' is invalid", zone); + RETURN_FALSE; + } if (DATEG(timezone)) { efree(DATEG(timezone)); DATEG(timezone) = NULL; @@ -1500,6 +1681,211 @@ PHP_FUNCTION(date_default_timezone_get) } /* }}} */ +/* {{{ php_do_date_sunrise_sunset + * Common for date_sunrise() and date_sunset() functions + */ +static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_sunset) +{ + double latitude, longitude, zenith, gmt_offset = 0, altitude; + double h_rise, h_set, N; + timelib_sll rise, set, transit; + long time, retformat; + int rs; + timelib_time *t; + timelib_tzinfo *tzi; + char retstr[6]; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|ldddd", &time, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) { + RETURN_FALSE; + } + + switch (ZEND_NUM_ARGS()) { + case 1: + retformat = SUNFUNCS_RET_STRING; + case 2: + latitude = INI_FLT("date.default_latitude"); + case 3: + longitude = INI_FLT("date.default_longitude"); + case 4: + if (calc_sunset) { + zenith = INI_FLT("date.sunset_zenith"); + } else { + zenith = INI_FLT("date.sunrise_zenith"); + } + case 5: + case 6: + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid format"); + RETURN_FALSE; + break; + } + if (retformat != SUNFUNCS_RET_TIMESTAMP && + retformat != SUNFUNCS_RET_STRING && + retformat != SUNFUNCS_RET_DOUBLE) + { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong return format given, pick one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE"); + RETURN_FALSE; + } + altitude = 90 - zenith; + + /* Initialize time struct */ + t = timelib_time_ctor(); + tzi = get_timezone_info(TSRMLS_C); + t->tz_info = tzi; + t->zone_type = TIMELIB_ZONETYPE_ID; + + if (ZEND_NUM_ARGS() <= 5) { + gmt_offset = timelib_get_current_offset(t) / 3600; + } + + timelib_unixtime2local(t, time); + rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, altitude > -1 ? 1 : 0, &h_rise, &h_set, &rise, &set, &transit); + + if (rs != 0) { + RETURN_FALSE; + } + + if (retformat == SUNFUNCS_RET_TIMESTAMP) { + RETURN_LONG(calc_sunset ? set : rise); + } + N = (calc_sunset ? h_set : h_rise) + gmt_offset; + while (N > 24) { + N -= 24; + } + while (N < 0) { + N += 24; + } + switch (retformat) { + case SUNFUNCS_RET_STRING: + sprintf(retstr, "%02d:%02d", (int) N, (int) (60 * (N - (int) N))); + RETURN_STRINGL(retstr, 5, 1); + break; + case SUNFUNCS_RET_DOUBLE: + RETURN_DOUBLE(N); + break; + } +} +/* }}} */ + +/* {{{ proto mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) + Returns time of sunrise for a given day and location */ +PHP_FUNCTION(date_sunrise) +{ + php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +/* {{{ proto mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) + Returns time of sunset for a given day and location */ +PHP_FUNCTION(date_sunset) +{ + php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + +/* {{{ proto array date_sun_info(long time, float latitude, float longitude) + Returns an array with information about sun set/rise and twilight begin/end */ +PHP_FUNCTION(date_sun_info) +{ + long time; + double latitude, longitude; + timelib_time *t, *t2; + timelib_tzinfo *tzi; + int rs; + timelib_sll rise, set, transit; + int dummy; + double ddummy; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ldd", &time, &latitude, &longitude) == FAILURE) { + RETURN_FALSE; + } + /* Initialize time struct */ + t = timelib_time_ctor(); + tzi = get_timezone_info(TSRMLS_C); + t->tz_info = tzi; + t->zone_type = TIMELIB_ZONETYPE_ID; + timelib_unixtime2local(t, time); + + /* Setup */ + t2 = timelib_time_ctor(); + array_init(return_value); + + /* Get sun up/down and transit */ + rs = timelib_astro_rise_set_altitude(t, latitude, longitude, -35.0/60, 1, &ddummy, &ddummy, &rise, &set, &transit); + switch (rs) { + case -1: /* always below */ + add_assoc_bool(return_value, "sunrise", 0); + add_assoc_bool(return_value, "sunset", 0); + break; + case 1: /* always above */ + add_assoc_bool(return_value, "sunrise", 1); + add_assoc_bool(return_value, "sunset", 1); + break; + default: + t2->sse = rise; + add_assoc_long(return_value, "sunrise", timelib_date_to_int(t2, &dummy)); + t2->sse = set; + add_assoc_long(return_value, "sunset", timelib_date_to_int(t2, &dummy)); + } + t2->sse = transit; + add_assoc_long(return_value, "transit", timelib_date_to_int(t2, &dummy)); + + /* Get civil twilight */ + rs = timelib_astro_rise_set_altitude(t, latitude, longitude, -6.0, 0, &ddummy, &ddummy, &rise, &set, &transit); + switch (rs) { + case -1: /* always below */ + add_assoc_bool(return_value, "civil_twilight_begin", 0); + add_assoc_bool(return_value, "civil_twilight_end", 0); + break; + case 1: /* always above */ + add_assoc_bool(return_value, "civil_twilight_begin", 1); + add_assoc_bool(return_value, "civil_twilight_end", 1); + break; + default: + t2->sse = rise; + add_assoc_long(return_value, "civil_twilight_begin", timelib_date_to_int(t2, &dummy)); + t2->sse = set; + add_assoc_long(return_value, "civil_twilight_end", timelib_date_to_int(t2, &dummy)); + } + + /* Get nautical twilight */ + rs = timelib_astro_rise_set_altitude(t, latitude, longitude, -12.0, 0, &ddummy, &ddummy, &rise, &set, &transit); + switch (rs) { + case -1: /* always below */ + add_assoc_bool(return_value, "nautical_twilight_begin", 0); + add_assoc_bool(return_value, "nautical_twilight_end", 0); + break; + case 1: /* always above */ + add_assoc_bool(return_value, "nautical_twilight_begin", 1); + add_assoc_bool(return_value, "nautical_twilight_end", 1); + break; + default: + t2->sse = rise; + add_assoc_long(return_value, "nautical_twilight_begin", timelib_date_to_int(t2, &dummy)); + t2->sse = set; + add_assoc_long(return_value, "nautical_twilight_end", timelib_date_to_int(t2, &dummy)); + } + + /* Get astronomical twilight */ + rs = timelib_astro_rise_set_altitude(t, latitude, longitude, -18.0, 0, &ddummy, &ddummy, &rise, &set, &transit); + switch (rs) { + case -1: /* always below */ + add_assoc_bool(return_value, "astronomical_twilight_begin", 0); + add_assoc_bool(return_value, "astronomical_twilight_end", 0); + break; + case 1: /* always above */ + add_assoc_bool(return_value, "astronomical_twilight_begin", 1); + add_assoc_bool(return_value, "astronomical_twilight_end", 1); + break; + default: + t2->sse = rise; + add_assoc_long(return_value, "astronomical_twilight_begin", timelib_date_to_int(t2, &dummy)); + t2->sse = set; + add_assoc_long(return_value, "astronomical_twilight_end", timelib_date_to_int(t2, &dummy)); + } +} +/* }}} */ /* * Local variables: * tab-width: 4 diff --git a/ext/date/php_date.h b/ext/date/php_date.h index 5c2dc352a..8f57f1f49 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.h,v 1.17.2.5 2005/11/20 20:14:24 derick Exp $ */ +/* $Id: php_date.h,v 1.17.2.9 2006/01/04 21:31:29 derick Exp $ */ #ifndef PHP_DATE_H #define PHP_DATE_H @@ -28,6 +28,7 @@ extern zend_module_entry date_module_entry; #define phpext_date_ptr &date_module_entry PHP_FUNCTION(date); +PHP_FUNCTION(idate); PHP_FUNCTION(gmdate); PHP_FUNCTION(strtotime); @@ -70,6 +71,11 @@ PHP_FUNCTION(timezone_abbreviations_list); PHP_FUNCTION(date_default_timezone_set); PHP_FUNCTION(date_default_timezone_get); +/* Astro functions */ +PHP_FUNCTION(date_sunrise); +PHP_FUNCTION(date_sunset); +PHP_FUNCTION(date_sun_info); + PHP_RINIT_FUNCTION(date); PHP_RSHUTDOWN_FUNCTION(date); PHP_MINIT_FUNCTION(date); @@ -91,6 +97,7 @@ ZEND_END_MODULE_GLOBALS(date) /* Backwards compability wrapper */ signed long php_parse_date(char *string, signed long *now); PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt); +PHPAPI int php_idate(char format, time_t ts, int localtime); #if HAVE_STRFTIME #define _php_strftime php_strftime PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm); diff --git a/ext/date/tests/bug14561.phpt b/ext/date/tests/bug14561.phpt index e2b6ef098..98638c3e4 100644 --- a/ext/date/tests/bug14561.phpt +++ b/ext/date/tests/bug14561.phpt @@ -3,8 +3,8 @@ Bug #14561 (strtotime() bug) --FILE-- --EXPECT-- 1134847800 diff --git a/ext/date/tests/bug35414.phpt b/ext/date/tests/bug35414.phpt new file mode 100644 index 000000000..f6af5110f --- /dev/null +++ b/ext/date/tests/bug35414.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #35414 (strtotime() no longer works with ordinal suffix) +--FILE-- + +--EXPECT-- +2005-11-26T18:18:00+0000 +2005-11-26T00:00:00+0000 +2005-12-04T00:00:00+0000 +2005-12-04T00:00:00+0000 diff --git a/ext/date/tests/bug35422.phpt b/ext/date/tests/bug35422.phpt new file mode 100644 index 000000000..8273c7541 --- /dev/null +++ b/ext/date/tests/bug35422.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #35422 (strtotime() does not parse times with UTC as timezone) +--FILE-- + +--EXPECT-- +2000-07-01T00:00:00+0000 +2000-07-01T00:00:00+0000 diff --git a/ext/date/tests/bug35425.phpt b/ext/date/tests/bug35425.phpt new file mode 100644 index 000000000..4259b49a1 --- /dev/null +++ b/ext/date/tests/bug35425.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #35425 (idate() function ignores timezone settings) +--FILE-- + +--EXPECT-- +int(292) +int(1) +int(1) +int(1) +int(1) +int(0) +int(0) +int(1) +int(1) +int(31) +int(1104559261) +int(6) +int(53) +int(5) +int(2005) +int(0) +int(-18000) diff --git a/ext/date/tests/bug35456.phpt b/ext/date/tests/bug35456.phpt new file mode 100644 index 000000000..6432b9944 --- /dev/null +++ b/ext/date/tests/bug35456.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #35456 (+ 1 [time unit] format did not work) +--FILE-- + +--EXPECT-- +2005-11-29T22:15:19+0000 +2005-12-28T22:15:19+0000 +2005-12-05T22:15:19+0000 diff --git a/ext/date/tests/bug35499.phpt b/ext/date/tests/bug35499.phpt new file mode 100644 index 000000000..2fbcbf0bf --- /dev/null +++ b/ext/date/tests/bug35499.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #35499 (strtotime() does not handle whitespace around the date string) +--FILE-- + +--EXPECT-- +2005-11-20T08:00:00+0000 +2005-11-20T08:00:00+0000 +bool(false) +bool(false) diff --git a/ext/date/tests/bug35624.phpt b/ext/date/tests/bug35624.phpt new file mode 100644 index 000000000..722adba82 --- /dev/null +++ b/ext/date/tests/bug35624.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #35624 (strtotime() does not handle 3 character weekdays) +--FILE-- + +--EXPECT-- +MonMon +MonMon +TueTue +TueTue +WedWed +WedWed +ThuThu +ThuThu +FriFri +FriFri +SatSat +SatSat +SunSun +SunSun diff --git a/ext/date/tests/bug35630.phpt b/ext/date/tests/bug35630.phpt new file mode 100644 index 000000000..b111b1aaf --- /dev/null +++ b/ext/date/tests/bug35630.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #35630 (strtotime() crashes on non-separated relative modifiers) +--FILE-- + +--EXPECT-- +2006-01-09T00:00:00+0000 diff --git a/ext/date/tests/bug35699.phpt b/ext/date/tests/bug35699.phpt new file mode 100644 index 000000000..5e4951e9f --- /dev/null +++ b/ext/date/tests/bug35699.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35699 (date() can't handle leap years before 1970) +--FILE-- + +--EXPECT-- +1964-06-06T00:00:00+0000 +1963-06-06T00:00:00+0000 +1964-01-06T00:00:00+0000 diff --git a/ext/date/tests/bug35705.phpt b/ext/date/tests/bug35705.phpt new file mode 100644 index 000000000..6894160a4 --- /dev/null +++ b/ext/date/tests/bug35705.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #35705 (strtotime() fails to parse soap date format without TZ) +--FILE-- + +--EXPECT-- +2000-10-10T10:12:30+0000 diff --git a/ext/date/tests/bug35885.phpt b/ext/date/tests/bug35885.phpt new file mode 100644 index 000000000..5f4e5d58c --- /dev/null +++ b/ext/date/tests/bug35885.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35885 (strtotime("NOW") no longer works) +--FILE-- + +--EXPECT-- +bool(true) diff --git a/ext/date/tests/bug35887.phpt b/ext/date/tests/bug35887.phpt new file mode 100644 index 000000000..e6ea7bd38 --- /dev/null +++ b/ext/date/tests/bug35887.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #35887 (wddx_deserialize not parsing dateTime fields properly) +--FILE-- + +--EXPECT-- +2006-01-06T08:00:00+0000 diff --git a/ext/date/tests/date_default_timezone_get-1.phpt b/ext/date/tests/date_default_timezone_get-1.phpt index e6319bab5..b6494658e 100644 --- a/ext/date/tests/date_default_timezone_get-1.phpt +++ b/ext/date/tests/date_default_timezone_get-1.phpt @@ -9,8 +9,8 @@ date.timezone= echo date('e'), "\n"; ?> --EXPECTF-- -Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3 -Europe/London +Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 3 +UTC -Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4 -Europe/London +Strict Standards: date(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-1.php on line 4 +UTC diff --git a/ext/date/tests/date_default_timezone_get-2.phpt b/ext/date/tests/date_default_timezone_get-2.phpt index 3fef09788..73013a762 100644 --- a/ext/date/tests/date_default_timezone_get-2.phpt +++ b/ext/date/tests/date_default_timezone_get-2.phpt @@ -8,5 +8,5 @@ date.timezone=CEST echo date_default_timezone_get(), "\n"; ?> --EXPECTF-- -Notice: date_default_timezone_get(): Timezone setting (date.timezone) or TZ environment variable contains an unknown timezone in %sdate_default_timezone_get-2.php on line 3 +Strict Standards: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_get-2.php on line 3 UTC diff --git a/ext/date/tests/date_default_timezone_set-1.phpt b/ext/date/tests/date_default_timezone_set-1.phpt index 90916e923..3c7a9aa4d 100644 --- a/ext/date/tests/date_default_timezone_set-1.phpt +++ b/ext/date/tests/date_default_timezone_set-1.phpt @@ -18,11 +18,11 @@ date.timezone= echo date(DATE_ISO8601, $date4), "\n"; ?> --EXPECTF-- -Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3 +Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 3 -Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. We selected 'Europe/London' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4 +Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in %sdate_default_timezone_set-1.php on line 4 America/Indiana/Knox 2005-01-12T03:00:00-0500 -2005-07-12T02:00:00-0500 +2005-07-12T03:00:00-0500 2005-01-12T08:00:00-0500 2005-07-12T08:00:00-0500 diff --git a/ext/date/tests/mktime-2.phpt b/ext/date/tests/mktime-2.phpt index 2b6e61867..aa259b577 100644 --- a/ext/date/tests/mktime-2.phpt +++ b/ext/date/tests/mktime-2.phpt @@ -3,7 +3,7 @@ mktime() [2] --INI-- error_reporting=2047 --FILE-- -ptr == pDba; } @@ -502,7 +502,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode) */ dba_info *php_dba_find(const char* path TSRMLS_DC) { - list_entry *le; + zend_rsrc_list_entry *le; dba_info *info; int numitems, i; @@ -559,7 +559,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* calculate hash */ key = safe_emalloc(keylen, 1, 1); @@ -845,11 +845,11 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) info->argv = NULL; if (persistent) { - list_entry new_le; + zend_rsrc_list_entry new_le; Z_TYPE(new_le) = le_pdb; new_le.ptr = info; - if (zend_hash_update(&EG(persistent_list), key, keylen+1, &new_le, sizeof(list_entry), NULL) == FAILURE) { + if (zend_hash_update(&EG(persistent_list), key, keylen+1, &new_le, sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { dba_close(info TSRMLS_CC); php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), Z_STRVAL_PP(args[1]), E_WARNING, "Could not register persistent resource"); FREENOW; diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index db54a6da8..8fb24d207 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_cdb.c,v 1.32 2005/08/03 14:06:53 sniper Exp $ */ +/* $Id: dba_cdb.c,v 1.32.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index 87e645cf3..38c8f36b8 100755 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db1.c,v 1.3 2005/08/03 14:06:53 sniper Exp $ */ +/* $Id: dba_db1.c,v 1.3.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index d55a688da..155e5b67b 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db2.c,v 1.39 2005/08/03 14:06:53 sniper Exp $ */ +/* $Id: dba_db2.c,v 1.39.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index 7515e71c6..1a9d16b7e 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db3.c,v 1.33 2005/08/03 14:06:54 sniper Exp $ */ +/* $Id: dba_db3.c,v 1.33.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index d86c83cee..79c1e80b6 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db4.c,v 1.15 2005/08/03 14:06:54 sniper Exp $ */ +/* $Id: dba_db4.c,v 1.15.2.2 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -77,14 +77,15 @@ DBA_OPEN_FUNC(db4) info->mode == DBA_WRITER ? 0 : info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1; - if (info->flags & DBA_PERSISTENT) { - gmode |= DB_THREAD; - } - if (gmode == -1) { return FAILURE; /* not possible */ } + gmode |= DB_INIT_LOCK; + if (info->flags & DBA_PERSISTENT) { + gmode |= DB_THREAD; + } + if (info->argc > 0) { convert_to_long_ex(info->argv[0]); filemode = Z_LVAL_PP(info->argv[0]); diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 8403bcd87..6d931aa8d 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_dbm.c,v 1.29 2005/08/03 14:06:54 sniper Exp $ */ +/* $Id: dba_dbm.c,v 1.29.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c index 6778dbf05..58d047ff3 100644 --- a/ext/dba/dba_flatfile.c +++ b/ext/dba/dba_flatfile.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_flatfile.c,v 1.19 2005/08/03 14:06:54 sniper Exp $ */ +/* $Id: dba_flatfile.c,v 1.19.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index e7ad94fb9..a4c759ddb 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_gdbm.c,v 1.23 2005/08/03 14:06:55 sniper Exp $ */ +/* $Id: dba_gdbm.c,v 1.23.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index 92cb07acd..5a6e9c5e5 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_inifile.c,v 1.5 2005/08/03 14:06:55 sniper Exp $ */ +/* $Id: dba_inifile.c,v 1.5.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index a90340ead..3d2273c08 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_ndbm.c,v 1.19 2005/08/03 14:06:55 sniper Exp $ */ +/* $Id: dba_ndbm.c,v 1.19.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c index 099aed88f..fa1aad8b1 100755 --- a/ext/dba/dba_qdbm.c +++ b/ext/dba/dba_qdbm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_qdbm.c,v 1.4 2005/08/03 14:06:55 sniper Exp $ */ +/* $Id: dba_qdbm.c,v 1.4.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c index 33752ccbd..6844ee866 100644 --- a/ext/dba/libcdb/cdb.c +++ b/ext/dba/libcdb/cdb.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdb.c,v 1.10 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: cdb.c,v 1.10.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ @@ -188,6 +188,6 @@ int cdb_find(struct cdb *c, char *key, unsigned int len TSRMLS_DC) /* {{{ cdb_version */ char *cdb_version() { - return "0.75, $Revision: 1.10 $"; + return "0.75, $Revision: 1.10.2.1 $"; } /* }}} */ diff --git a/ext/dba/libcdb/cdb.h b/ext/dba/libcdb/cdb.h index 63076b86b..5da510f04 100644 --- a/ext/dba/libcdb/cdb.h +++ b/ext/dba/libcdb/cdb.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdb.h,v 1.7 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: cdb.h,v 1.7.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ diff --git a/ext/dba/libcdb/cdb_make.c b/ext/dba/libcdb/cdb_make.c index 1bb147aa2..da46bbccf 100644 --- a/ext/dba/libcdb/cdb_make.c +++ b/ext/dba/libcdb/cdb_make.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdb_make.c,v 1.9 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: cdb_make.c,v 1.9.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ @@ -240,5 +240,5 @@ int cdb_make_finish(struct cdb_make *c TSRMLS_DC) /* {{{ cdb_make_version */ char *cdb_make_version() { - return "0.75, $Revision: 1.9 $"; + return "0.75, $Revision: 1.9.2.1 $"; } diff --git a/ext/dba/libcdb/cdb_make.h b/ext/dba/libcdb/cdb_make.h index e2183830b..4d9456299 100644 --- a/ext/dba/libcdb/cdb_make.h +++ b/ext/dba/libcdb/cdb_make.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdb_make.h,v 1.7 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: cdb_make.h,v 1.7.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ diff --git a/ext/dba/libcdb/uint32.c b/ext/dba/libcdb/uint32.c index 4fb8e6869..d9757ad3a 100644 --- a/ext/dba/libcdb/uint32.c +++ b/ext/dba/libcdb/uint32.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uint32.c,v 1.6 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: uint32.c,v 1.6.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ diff --git a/ext/dba/libcdb/uint32.h b/ext/dba/libcdb/uint32.h index 894ca29b7..43a199692 100644 --- a/ext/dba/libcdb/uint32.h +++ b/ext/dba/libcdb/uint32.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uint32.h,v 1.6 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: uint32.h,v 1.6.2.1 2006/01/01 12:50:05 sniper Exp $ */ /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/ diff --git a/ext/dba/libflatfile/flatfile.c b/ext/dba/libflatfile/flatfile.c index 6b5eb19bf..bbfdf39a9 100644 --- a/ext/dba/libflatfile/flatfile.c +++ b/ext/dba/libflatfile/flatfile.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flatfile.c,v 1.14 2005/08/03 14:06:56 sniper Exp $ */ +/* $Id: flatfile.c,v 1.14.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -307,7 +307,7 @@ datum flatfile_nextkey(flatfile *dba TSRMLS_DC) { /* {{{ flatfile_version */ char *flatfile_version() { - return "1.0, $Revision: 1.14 $"; + return "1.0, $Revision: 1.14.2.1 $"; } /* }}} */ diff --git a/ext/dba/libflatfile/flatfile.h b/ext/dba/libflatfile/flatfile.h index 755048e17..3de1e8214 100644 --- a/ext/dba/libflatfile/flatfile.h +++ b/ext/dba/libflatfile/flatfile.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flatfile.h,v 1.11 2005/08/03 14:06:57 sniper Exp $ */ +/* $Id: flatfile.h,v 1.11.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifndef PHP_LIB_FLATFILE_H #define PHP_LIB_FLATFILE_H diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c index bd9c460dc..fb5f8878b 100644 --- a/ext/dba/libinifile/inifile.c +++ b/ext/dba/libinifile/inifile.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: inifile.c,v 1.14 2005/08/03 14:06:57 sniper Exp $ */ +/* $Id: inifile.c,v 1.14.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -43,7 +43,7 @@ /* {{{ inifile_version */ char *inifile_version() { - return "1.0, $Revision: 1.14 $"; + return "1.0, $Revision: 1.14.2.1 $"; } /* }}} */ diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h index bc4f6fd9a..0c35bd94d 100644 --- a/ext/dba/libinifile/inifile.h +++ b/ext/dba/libinifile/inifile.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: inifile.h,v 1.5 2005/08/03 14:06:57 sniper Exp $ */ +/* $Id: inifile.h,v 1.5.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifndef PHP_LIB_INIFILE_H #define PHP_LIB_INIFILE_H diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index 1b06e8a04..1567814f9 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dba.h,v 1.29 2005/08/03 14:06:55 sniper Exp $ */ +/* $Id: php_dba.h,v 1.29.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifndef PHP_DBA_H #define PHP_DBA_H diff --git a/ext/dba/tests/dba_db4.phpt b/ext/dba/tests/dba_db4.phpt index fcf089a1e..252797bf4 100644 --- a/ext/dba/tests/dba_db4.phpt +++ b/ext/dba/tests/dba_db4.phpt @@ -9,6 +9,7 @@ DBA DB4 handler test ===DONE=== @@ -17,22 +18,7 @@ database handler: db4 3NYNYY Content String 2 Content 2 replaced -Read during write: not allowed -Content 2 replaced 2nd time -The 6th value -array(3) { - ["key number 6"]=> - string(13) "The 6th value" - ["key2"]=> - string(27) "Content 2 replaced 2nd time" - ["key5"]=> - string(23) "The last content string" -} ---NO-LOCK-- -3NYNYY -Content String 2 -Content 2 replaced -Read during write: not allowed +Read during write: allowed Content 2 replaced 2nd time The 6th value array(3) { diff --git a/ext/dba/tests/dba_handler.inc b/ext/dba/tests/dba_handler.inc index c1e3c49c7..1c3f5127e 100644 --- a/ext/dba/tests/dba_handler.inc +++ b/ext/dba/tests/dba_handler.inc @@ -73,7 +73,7 @@ do { if (!empty($dba_reader)) { dba_close($dba_reader); } - if (($db_file = dba_popen($db_filename, 'r'.($handler!='gdbm'?'-':''), $handler))!==FALSE) { + if (($db_file = dba_popen($db_filename, 'r'.($lock_flag==''?'':'-'), $handler))!==FALSE) { if ($handler == 'dbm') { dba_close($db_file); } diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index 54d6c5f01..f6c6f81c8 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dbase.c,v 1.74 2005/08/03 14:06:57 sniper Exp $ */ +/* $Id: dbase.c,v 1.74.2.2 2006/01/01 12:50:05 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -730,7 +730,7 @@ PHP_FUNCTION(dbase_create) /* {{{ dbase_functions[] */ -function_entry dbase_functions[] = { +zend_function_entry dbase_functions[] = { PHP_FE(dbase_open, NULL) PHP_FE(dbase_create, NULL) PHP_FE(dbase_close, NULL) diff --git a/ext/dbase/php_dbase.h b/ext/dbase/php_dbase.h index 3b62f7dd7..4b7c12d3d 100644 --- a/ext/dbase/php_dbase.h +++ b/ext/dbase/php_dbase.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dbase.h,v 1.15 2005/08/03 14:06:58 sniper Exp $ */ +/* $Id: php_dbase.h,v 1.15.2.1 2006/01/01 12:50:05 sniper Exp $ */ #ifndef PHP_DBASE_H #define PHP_DBASE_H diff --git a/ext/dom/attr.c b/ext/dom/attr.c index 129da423d..75121b0a6 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: attr.c,v 1.18 2005/08/03 14:06:58 sniper Exp $ */ +/* $Id: attr.c,v 1.18.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index 2410dbc57..b938d4259 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdatasection.c,v 1.11 2005/08/03 14:06:59 sniper Exp $ */ +/* $Id: cdatasection.c,v 1.11.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index afb46e302..1fa1501e3 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: characterdata.c,v 1.15 2005/08/03 14:06:59 sniper Exp $ */ +/* $Id: characterdata.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/comment.c b/ext/dom/comment.c index 884527be6..3289be4ee 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: comment.c,v 1.11 2005/08/03 14:06:59 sniper Exp $ */ +/* $Id: comment.c,v 1.11.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/document.c b/ext/dom/document.c index 42b6e3f1e..f8ec3a827 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.68.2.2 2005/09/08 10:39:30 rrichards Exp $ */ +/* $Id: document.c,v 1.68.2.3 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 4c57c69f1..3ac30b17c 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c,v 1.15 2005/08/03 14:07:00 sniper Exp $ */ +/* $Id: documentfragment.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c index 51b4453c4..26dc7fe7e 100644 --- a/ext/dom/documenttype.c +++ b/ext/dom/documenttype.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documenttype.c,v 1.15 2005/08/03 14:07:00 sniper Exp $ */ +/* $Id: documenttype.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h index 6af4b19b4..e115429d1 100644 --- a/ext/dom/dom_ce.h +++ b/ext/dom/dom_ce.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_ce.h,v 1.8 2005/08/03 14:07:01 sniper Exp $ */ +/* $Id: dom_ce.h,v 1.8.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef DOM_CE_H #define DOM_CE_H diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h index 7d62b638a..9182c8061 100644 --- a/ext/dom/dom_fe.h +++ b/ext/dom/dom_fe.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_fe.h,v 1.14 2005/08/03 14:07:01 sniper Exp $ */ +/* $Id: dom_fe.h,v 1.14.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef DOM_FE_H #define DOM_FE_H diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index 694392e99..ef01536c7 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_iterators.c,v 1.9 2005/08/03 14:07:01 sniper Exp $ */ +/* $Id: dom_iterators.c,v 1.9.2.2 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -189,7 +189,7 @@ static void php_dom_iterator_move_forward(zend_object_iterator *iter TSRMLS_DC) dom_nnodemap_object *objmap; int ret, previndex=1; HashTable *nodeht; - pval **entry; + zval **entry; php_dom_iterator *iterator = (php_dom_iterator *)iter; @@ -258,7 +258,7 @@ zend_object_iterator *php_dom_get_iterator(zend_class_entry *ce, zval *object TS zval *curattr = NULL; int ret, curindex = 0; HashTable *nodeht; - pval **entry; + zval **entry; php_dom_iterator *iterator = emalloc(sizeof(php_dom_iterator)); diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h index d0fbcd159..9b6bb1b62 100644 --- a/ext/dom/dom_properties.h +++ b/ext/dom/dom_properties.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_properties.h,v 1.7 2005/08/03 14:07:01 sniper Exp $ */ +/* $Id: dom_properties.h,v 1.7.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef DOM_PROPERTIES_H #define DOM_PROPERTIES_H diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c index 7a4bd7f04..dd8dd4b3d 100644 --- a/ext/dom/domconfiguration.c +++ b/ext/dom/domconfiguration.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domconfiguration.c,v 1.5 2005/08/03 14:07:02 sniper Exp $ */ +/* $Id: domconfiguration.c,v 1.5.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c index 57c62d788..d6716f6f2 100644 --- a/ext/dom/domerror.c +++ b/ext/dom/domerror.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domerror.c,v 1.6 2005/08/03 14:07:02 sniper Exp $ */ +/* $Id: domerror.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c index d670d6ed9..9babd1108 100644 --- a/ext/dom/domerrorhandler.c +++ b/ext/dom/domerrorhandler.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domerrorhandler.c,v 1.5 2005/08/03 14:07:02 sniper Exp $ */ +/* $Id: domerrorhandler.c,v 1.5.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index a48953d39..fbe37c932 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domexception.c,v 1.11 2005/08/03 14:07:02 sniper Exp $ */ +/* $Id: domexception.c,v 1.11.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 970c5e5a9..02c9d1e40 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementation.c,v 1.15 2005/08/03 14:07:02 sniper Exp $ */ +/* $Id: domimplementation.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c index f0c25f9cb..83fbde214 100644 --- a/ext/dom/domimplementationlist.c +++ b/ext/dom/domimplementationlist.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementationlist.c,v 1.6 2005/08/03 14:07:03 sniper Exp $ */ +/* $Id: domimplementationlist.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c index bdd3cc34f..732a286e3 100644 --- a/ext/dom/domimplementationsource.c +++ b/ext/dom/domimplementationsource.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementationsource.c,v 1.5 2005/08/03 14:07:03 sniper Exp $ */ +/* $Id: domimplementationsource.c,v 1.5.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c index 8793ac443..fe2ff79f3 100644 --- a/ext/dom/domlocator.c +++ b/ext/dom/domlocator.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domlocator.c,v 1.6 2005/08/03 14:07:03 sniper Exp $ */ +/* $Id: domlocator.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c index a8c2b23f0..f0e7a8c24 100644 --- a/ext/dom/domstringlist.c +++ b/ext/dom/domstringlist.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domstringlist.c,v 1.6 2005/08/03 14:07:03 sniper Exp $ */ +/* $Id: domstringlist.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/element.c b/ext/dom/element.c index d2a06c7d5..d021d5aba 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.36.2.2 2005/10/27 23:51:22 rrichards Exp $ */ +/* $Id: element.c,v 1.36.2.3 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/entity.c b/ext/dom/entity.c index 74be14930..4690701d6 100644 --- a/ext/dom/entity.c +++ b/ext/dom/entity.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entity.c,v 1.9 2005/08/03 14:07:03 sniper Exp $ */ +/* $Id: entity.c,v 1.9.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index 7ac0c8b8f..d0a84281c 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entityreference.c,v 1.12 2005/08/03 14:07:04 sniper Exp $ */ +/* $Id: entityreference.c,v 1.12.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c index 8e11042d6..92573fafa 100644 --- a/ext/dom/namednodemap.c +++ b/ext/dom/namednodemap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namednodemap.c,v 1.15 2005/08/03 14:07:04 sniper Exp $ */ +/* $Id: namednodemap.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c index 897065b89..f2669f78c 100644 --- a/ext/dom/namelist.c +++ b/ext/dom/namelist.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namelist.c,v 1.7 2005/08/03 14:07:04 sniper Exp $ */ +/* $Id: namelist.c,v 1.7.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/node.c b/ext/dom/node.c index fa8df8520..1e22aac92 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c,v 1.37 2005/08/03 14:07:04 sniper Exp $ */ +/* $Id: node.c,v 1.37.2.2 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1113,7 +1113,7 @@ PHP_FUNCTION(dom_node_replace_child) RETURN_FALSE; } - /* check for the old child and wether the new child is already a child */ + /* check for the old child and whether the new child is already a child */ while (children) { if (children == oldchild) { foundoldchild = 1; diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c index 7ba7da012..c0b2afb23 100644 --- a/ext/dom/nodelist.c +++ b/ext/dom/nodelist.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nodelist.c,v 1.17 2005/08/03 14:07:04 sniper Exp $ */ +/* $Id: nodelist.c,v 1.17.2.2 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -109,7 +109,7 @@ PHP_FUNCTION(dom_nodelist_item) xmlNodePtr nodep, curnode; int count = 0; HashTable *nodeht; - pval **entry; + zval **entry; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_nodelist_class_entry, &index) == FAILURE) { return; diff --git a/ext/dom/notation.c b/ext/dom/notation.c index ce502c858..1bcc4387d 100644 --- a/ext/dom/notation.c +++ b/ext/dom/notation.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: notation.c,v 1.9 2005/08/03 14:07:05 sniper Exp $ */ +/* $Id: notation.c,v 1.9.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index fec631871..30f693342 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.73.2.6 2005/11/23 03:12:45 rrichards Exp $ */ +/* $Id: php_dom.c,v 1.73.2.8 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -186,7 +186,7 @@ int dom_get_strict_error(php_libxml_ref_obj *document) { /* }}} */ /* {{{ xmlNodePtr dom_object_get_node(dom_object *obj) */ -xmlNodePtr dom_object_get_node(dom_object *obj) +PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj) { if (obj->ptr != NULL) { return ((php_libxml_node_ptr *)obj->ptr)->node; @@ -197,7 +197,7 @@ xmlNodePtr dom_object_get_node(dom_object *obj) /* }}} end dom_object_get_node */ /* {{{ dom_object *php_dom_object_get_data(xmlNodePtr obj) */ -dom_object *php_dom_object_get_data(xmlNodePtr obj) +PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj) { if (obj->_private != NULL) { return (dom_object *) ((php_libxml_node_ptr *) obj->_private)->_private; @@ -1132,7 +1132,7 @@ void php_dom_create_interator(zval *return_value, int ce_type TSRMLS_DC) } /* {{{ php_dom_create_object */ -zval *php_dom_create_object(xmlNodePtr obj, int *found, zval *wrapper_in, zval *return_value, dom_object *domobj TSRMLS_DC) +PHP_DOM_EXPORT zval *php_dom_create_object(xmlNodePtr obj, int *found, zval *wrapper_in, zval *return_value, dom_object *domobj TSRMLS_DC) { zval *wrapper; zend_class_entry *ce; diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index 47c3147c3..3af2ce834 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.h,v 1.28 2005/08/03 14:07:05 sniper Exp $ */ +/* $Id: php_dom.h,v 1.28.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef PHP_DOM_H #define PHP_DOM_H diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index 69794f373..78aeaa9bf 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: processinginstruction.c,v 1.17 2005/08/03 14:07:05 sniper Exp $ */ +/* $Id: processinginstruction.c,v 1.17.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c index fb91b64a1..123243113 100644 --- a/ext/dom/string_extend.c +++ b/ext/dom/string_extend.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string_extend.c,v 1.5 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: string_extend.c,v 1.5.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt index e87a96011..7d783c562 100644 --- a/ext/dom/tests/dom_set_attr_node.phpt +++ b/ext/dom/tests/dom_set_attr_node.phpt @@ -39,7 +39,7 @@ object(DOMException)#%d (6) { ["file:protected"]=> string(%d) "%sdom_set_attr_node.php" ["line:protected"]=> - int(22) + int(%d) ["trace:private"]=> array(1) { [0]=> @@ -47,7 +47,7 @@ object(DOMException)#%d (6) { ["file"]=> string(%d) "%sdom_set_attr_node.php" ["line"]=> - int(22) + int(%d) ["function"]=> string(16) "setAttributeNode" ["class"]=> @@ -64,4 +64,4 @@ object(DOMException)#%d (6) { } ["code"]=> int(4) -} \ No newline at end of file +} diff --git a/ext/dom/text.c b/ext/dom/text.c index fb1a05e52..14b28ef61 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: text.c,v 1.23 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: text.c,v 1.23.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c index 58a90f132..930ad8ee7 100644 --- a/ext/dom/typeinfo.c +++ b/ext/dom/typeinfo.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: typeinfo.c,v 1.6 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: typeinfo.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c index 343cbcd6e..31bf492c4 100644 --- a/ext/dom/userdatahandler.c +++ b/ext/dom/userdatahandler.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userdatahandler.c,v 1.6 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: userdatahandler.c,v 1.6.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 39aad7b1a..137ae6cd7 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml_common.h,v 1.23 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: xml_common.h,v 1.23.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef PHP_XML_COMMON_H #define PHP_XML_COMMON_H diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index af56201c7..b454eef5c 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c,v 1.26 2005/08/03 14:07:06 sniper Exp $ */ +/* $Id: xpath.c,v 1.26.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 334df048a..945931fe8 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c,v 1.173.2.2 2005/10/10 06:09:25 helly Exp $ */ +/* $Id: exif.c,v 1.173.2.4 2006/01/01 12:50:06 sniper Exp $ */ /* ToDos * @@ -105,7 +105,7 @@ ZEND_END_ARG_INFO(); /* {{{ exif_functions[] */ -function_entry exif_functions[] = { +zend_function_entry exif_functions[] = { PHP_FE(exif_read_data, NULL) PHP_FALIAS(read_exif_data, exif_read_data, NULL) PHP_FE(exif_tagname, NULL) @@ -115,7 +115,7 @@ function_entry exif_functions[] = { }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.2 2005/10/10 06:09:25 helly Exp $" +#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.4 2006/01/01 12:50:06 sniper Exp $" /* {{{ PHP_MINFO_FUNCTION */ @@ -1843,7 +1843,7 @@ static void exif_iif_free(image_info_type *image_info, int section_index) { /* {{{ add_assoc_image_info * Add image_info to associative array value. */ -static void add_assoc_image_info(pval *value, int sub_array, image_info_type *image_info, int section_index TSRMLS_DC) +static void add_assoc_image_info(zval *value, int sub_array, image_info_type *image_info, int section_index TSRMLS_DC) { char buffer[64], *val, *name, uname[64]; int i, ap, l, b, idx=0, unknown=0; @@ -1852,7 +1852,7 @@ static void add_assoc_image_info(pval *value, int sub_array, image_info_type *im #endif image_info_value *info_value; image_info_data *info_data; - pval *tmpi, *array = NULL; + zval *tmpi, *array = NULL; #ifdef EXIF_DEBUG /* php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Adding %d infos from section %s", image_info->info_list[section_index].count, exif_get_sectionname(section_index));*/ @@ -2248,7 +2248,7 @@ static char * exif_get_markername(int marker) Get headername for index or false if not defined */ PHP_FUNCTION(exif_tagname) { - pval **p_num; + zval **p_num; int tag, ac = ZEND_NUM_ARGS(); char *szTemp; @@ -3780,7 +3780,7 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails */ PHP_FUNCTION(exif_read_data) { - pval **p_name, **p_sections_needed, **p_sub_arrays, **p_read_thumbnail, **p_read_all; + zval **p_name, **p_sections_needed, **p_sub_arrays, **p_read_thumbnail, **p_read_all; int i, ac = ZEND_NUM_ARGS(), ret, sections_needed=0, sub_arrays=0, read_thumbnail=0, read_all=0; image_info_type ImageInfo; char tmp[64], *sections_str, *s; diff --git a/ext/exif/php_exif.h b/ext/exif/php_exif.h index dac62e64d..e141da69d 100644 --- a/ext/exif/php_exif.h +++ b/ext/exif/php_exif.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_exif.h,v 1.14 2005/08/03 14:07:08 sniper Exp $ */ +/* $Id: php_exif.h,v 1.14.2.1 2006/01/01 12:50:06 sniper Exp $ */ #if HAVE_EXIF extern zend_module_entry exif_module_entry; diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 2fc299426..b79d28f43 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -2,9 +2,9 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.114 2005/08/03 14:07:08 sniper Exp $ */ +/* $Id: php_fbsql.c,v 1.114.2.3 2006/01/01 12:50:06 sniper Exp $ */ /* TODO: * @@ -183,7 +183,7 @@ char *DigestPassword(char *user, char *password) /* {{{ fbsql_functions[] */ -function_entry fbsql_functions[] = { +zend_function_entry fbsql_functions[] = { PHP_FE(fbsql_connect, NULL) PHP_FE(fbsql_pconnect, NULL) PHP_FE(fbsql_close, NULL) @@ -502,7 +502,7 @@ PHP_MINFO_FUNCTION(fbsql) static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { PHPFBLink* phpLink; - list_entry *lep; + zend_rsrc_list_entry *lep; char name[1024]; char *hostName = NULL, *userName = NULL, *userPassword = NULL; int argc = ZEND_NUM_ARGS(), create_new = 0; @@ -543,7 +543,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) phpLink = (PHPFBLink*)lep->ptr; } else { - list_entry le; + zend_rsrc_list_entry le; if ((FB_SQL_G(maxLinks) != -1 && FB_SQL_G(linkCount) == FB_SQL_G(maxLinks))) { @@ -592,7 +592,7 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } else { - list_entry le; + zend_rsrc_list_entry le; if ((FB_SQL_G(maxLinks) != -1 && FB_SQL_G(linkCount) == FB_SQL_G(maxLinks))) { diff --git a/ext/fbsql/php_fbsql.h b/ext/fbsql/php_fbsql.h index bee9bd96b..c41da0a3e 100644 --- a/ext/fbsql/php_fbsql.h +++ b/ext/fbsql/php_fbsql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.h,v 1.31 2005/08/03 14:07:09 sniper Exp $ */ +/* $Id: php_fbsql.h,v 1.31.2.1 2006/01/01 12:50:06 sniper Exp $ */ #define HAVE_FBSQL 1 diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c index 4c3f58cfe..796aebbc8 100644 --- a/ext/fdf/fdf.c +++ b/ext/fdf/fdf.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fdf.c,v 1.89 2005/08/03 14:07:09 sniper Exp $ */ +/* $Id: fdf.c,v 1.89.2.2 2006/01/01 12:50:06 sniper Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -49,7 +49,7 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler); /* {{{ fdf_functions[] */ -function_entry fdf_functions[] = { +zend_function_entry fdf_functions[] = { PHP_FE(fdf_add_template, NULL) PHP_FE(fdf_close, NULL) PHP_FE(fdf_create, NULL) diff --git a/ext/fdf/php_fdf.h b/ext/fdf/php_fdf.h index fd5a8a013..c5418c6aa 100644 --- a/ext/fdf/php_fdf.h +++ b/ext/fdf/php_fdf.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fdf.h,v 1.22 2005/08/03 14:07:10 sniper Exp $ */ +/* $Id: php_fdf.h,v 1.22.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef PHP_FDF_H #define PHP_FDF_H diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c index a9f13272b..94e621430 100644 --- a/ext/filepro/filepro.c +++ b/ext/filepro/filepro.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filepro.c,v 1.57 2005/08/03 14:07:10 sniper Exp $ */ +/* $Id: filepro.c,v 1.57.2.2 2006/01/01 12:50:06 sniper Exp $ */ /* filePro 4.x support developed by Chad Robinson, chadr@brttech.com @@ -162,7 +162,7 @@ PHP_MSHUTDOWN_FUNCTION(filepro) } /* }}} */ -function_entry filepro_functions[] = { +zend_function_entry filepro_functions[] = { PHP_FE(filepro, NULL) PHP_FE(filepro_rowcount, NULL) PHP_FE(filepro_fieldname, NULL) diff --git a/ext/filepro/php_filepro.h b/ext/filepro/php_filepro.h index 71085730c..a9a1b096f 100644 --- a/ext/filepro/php_filepro.h +++ b/ext/filepro/php_filepro.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filepro.h,v 1.14 2005/08/03 14:07:10 sniper Exp $ */ +/* $Id: php_filepro.h,v 1.14.2.1 2006/01/01 12:50:06 sniper Exp $ */ /* filePro 4.x support developed by Chad Robinson, chadr@brttech.com diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 903aa8ba0..9291bd1fc 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.112.2.2 2005/11/05 22:02:15 iliaa Exp $ */ +/* $Id: ftp.c,v 1.112.2.3 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index 69033c892..2bc501cfe 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.h,v 1.43 2005/08/03 14:07:11 sniper Exp $ */ +/* $Id: ftp.h,v 1.43.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef FTP_H #define FTP_H diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 6c8b8ebdd..2bedefc8c 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.c,v 1.103 2005/08/03 14:07:11 sniper Exp $ */ +/* $Id: php_ftp.c,v 1.103.2.2 2006/01/01 12:50:06 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -51,7 +51,7 @@ static ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO() -function_entry php_ftp_functions[] = { +zend_function_entry php_ftp_functions[] = { PHP_FE(ftp_connect, NULL) #if HAVE_OPENSSL_EXT PHP_FE(ftp_ssl_connect, NULL) @@ -316,7 +316,7 @@ PHP_FUNCTION(ftp_chdir) Requests execution of a program on the FTP server */ PHP_FUNCTION(ftp_exec) { - pval *z_ftp; + zval *z_ftp; ftpbuf_t *ftp; char *cmd; int cmd_len; diff --git a/ext/ftp/php_ftp.h b/ext/ftp/php_ftp.h index f41f62494..d40a07883 100644 --- a/ext/ftp/php_ftp.h +++ b/ext/ftp/php_ftp.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.h,v 1.29 2005/08/03 14:07:12 sniper Exp $ */ +/* $Id: php_ftp.h,v 1.29.2.1 2006/01/01 12:50:06 sniper Exp $ */ #ifndef _INCLUDED_FTP_H #define _INCLUDED_FTP_H diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 5cb6d4324..cf4001755 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.154 2005/05/29 23:16:41 sniper Exp $ +dnl $Id: config.m4,v 1.154.2.1 2005/11/29 18:25:59 tony2001 Exp $ dnl dnl @@ -51,7 +51,7 @@ AC_DEFUN([PHP_GD_JPEG],[ if test "$PHP_JPEG_DIR" != "no"; then for i in $PHP_JPEG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libjpeg.a && GD_JPEG_DIR=$i && break + test -f $i/$PHP_LIBDIR/libjpeg.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libjpeg.a && GD_JPEG_DIR=$i && break done if test -z "$GD_JPEG_DIR"; then @@ -76,7 +76,7 @@ AC_DEFUN([PHP_GD_PNG],[ if test "$PHP_PNG_DIR" != "no"; then for i in $PHP_PNG_DIR /usr/local /usr; do - test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libpng.a && GD_PNG_DIR=$i && break + test -f $i/$PHP_LIBDIR/libpng.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libpng.a && GD_PNG_DIR=$i && break done if test -z "$GD_PNG_DIR"; then @@ -111,7 +111,7 @@ AC_DEFUN([PHP_GD_XPM],[ if test "$PHP_XPM_DIR" != "no"; then for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do - test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break + test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break done if test -z "$GD_XPM_DIR"; then @@ -143,7 +143,7 @@ AC_DEFUN([PHP_GD_XPM],[ AC_DEFUN([PHP_GD_FREETYPE1],[ if test "$PHP_TTF" != "no"; then - if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then + if test "$PHP_FREETYPE_DIR" = "no" || test "$PHP_FREETYPE_DIR" = ""; then if test -n "$PHP_TTF"; then for i in $PHP_TTF /usr/local /usr; do if test -f "$i/include/freetype.h"; then @@ -367,7 +367,7 @@ dnl Header path dnl Library path for i in $PHP_LIBDIR/gd1.3 $PHP_LIBDIR/gd $PHP_LIBDIR gd1.3 gd ""; do - test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" -o -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" + test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" || test -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i" done if test -n "$GD_INCLUDE" && test -n "$GD_LIB"; then diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6bd6f95b1..a37346cd2 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.312.2.4 2005/11/01 17:05:09 sniper Exp $ */ +/* $Id: gd.c,v 1.312.2.12 2006/01/01 12:50:06 sniper Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -163,7 +163,7 @@ static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold /* {{{ gd_functions[] */ -function_entry gd_functions[] = { +zend_function_entry gd_functions[] = { PHP_FE(gd_info, NULL) PHP_FE(imagearc, NULL) PHP_FE(imageellipse, NULL) @@ -919,15 +919,19 @@ PHP_FUNCTION(imagecolormatch) result = gdImageColorMatch(im1, im2); switch (result) { case -1: - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Image1 must be TrueColor" ); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image1 must be TrueColor" ); RETURN_FALSE; break; case -2: - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Image2 must be Palette" ); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image2 must be Palette" ); RETURN_FALSE; break; case -3: - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Image1 and Image2 must be the same size" ); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image1 and Image2 must be the same size" ); + RETURN_FALSE; + break; + case -4: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Image2 must have at least one color" ); RETURN_FALSE; break; } @@ -1429,6 +1433,11 @@ PHP_FUNCTION(imagecreatefromstring) } convert_to_string_ex(data); + if (Z_STRLEN_PP(data) < 8) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string or invalid image"); + RETURN_FALSE; + } + memcpy(sig, Z_STRVAL_PP(data), 8); imtype = _php_image_type(sig); @@ -1480,7 +1489,7 @@ PHP_FUNCTION(imagecreatefromstring) break; default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Data is not in a recognized format."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Data is not in a recognized format"); RETURN_FALSE; } @@ -1871,7 +1880,7 @@ PHP_FUNCTION(imagegif) PHP_FUNCTION(imagepng) { #ifdef USE_GD_IOCTX - _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_PNG, "PNG", gdImagePngCtx); + _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_PNG, "PNG", gdImagePngCtxEx); #else _php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_PNG, "PNG", gdImagePng); #endif @@ -2597,7 +2606,7 @@ PHP_FUNCTION(imageinterlace) static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) { zval **IM, **POINTS, **NPOINTS, **COL; - pval **var = NULL; + zval **var = NULL; gdImagePtr im; gdPointPtr points; int npoints, col, nelem, i; @@ -3393,7 +3402,7 @@ PHP_FUNCTION(imagepsextendfont) T1_DeleteAllSizes(*f_ind); if (Z_DVAL_PP(ext) <= 0) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Second parameter %f out of range (must be > 0)", Z_DVAL_PP(ext)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second parameter %f out of range (must be > 0)", Z_DVAL_PP(ext)); RETURN_FALSE; } @@ -4190,7 +4199,7 @@ PHP_FUNCTION(imagefilter) PHP_FUNCTION(imageconvolution) { zval *SIM, *hash_matrix; - pval **var = NULL, **var2 = NULL; + zval **var = NULL, **var2 = NULL; gdImagePtr im_src = NULL; double div, offset; int nelem, i, j, res; diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 2edbc43ed..28a401a65 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd_ctx.c,v 1.22.2.2 2005/11/01 17:05:09 sniper Exp $ */ +/* $Id: gd_ctx.c,v 1.22.2.4 2006/01/01 12:50:06 sniper Exp $ */ #include "php_gd.h" @@ -115,6 +115,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q); } case PHP_GDIMG_TYPE_JPG: + case PHP_GDIMG_TYPE_PNG: (*func_p)(im, ctx, q); break; case PHP_GDIMG_TYPE_XBM: diff --git a/ext/gd/libgd/gd_topal.c b/ext/gd/libgd/gd_topal.c index 15eed3e11..2d7db8c73 100644 --- a/ext/gd/libgd/gd_topal.c +++ b/ext/gd/libgd/gd_topal.c @@ -2086,6 +2086,9 @@ int gdImageColorMatch (gdImagePtr im1, gdImagePtr im2) if( (im1->sx != im2->sx) || (im1->sy != im2->sy) ) { return -3; /* the images are meant to be the same dimensions */ } + if (im2->colorsTotal<1) { + return -4; /* At least 1 color must be allocated */ + } buf = (unsigned long *)safe_emalloc(sizeof(unsigned long), 5 * im2->colorsTotal, 0); memset( buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal ); diff --git a/ext/gd/libgd/xbm.c b/ext/gd/libgd/xbm.c index 4fb45abad..55dfac4e1 100644 --- a/ext/gd/libgd/xbm.c +++ b/ext/gd/libgd/xbm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xbm.c,v 1.7.2.1 2005/08/18 12:54:44 sniper Exp $ */ +/* $Id: xbm.c,v 1.7.2.2 2006/01/01 12:50:07 sniper Exp $ */ #include #include diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 086073441..645428be1 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gd.h,v 1.59.2.2 2005/11/02 21:26:25 sniper Exp $ */ +/* $Id: php_gd.h,v 1.59.2.3 2006/01/01 12:50:06 sniper Exp $ */ #ifndef PHP_GD_H #define PHP_GD_H diff --git a/ext/gd/tests/colormatch.phpt b/ext/gd/tests/colormatch.phpt new file mode 100644 index 000000000..283a20057 --- /dev/null +++ b/ext/gd/tests/colormatch.phpt @@ -0,0 +1,21 @@ +--TEST-- +imagecolormatch +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: imagecolormatch(): Image2 must have at least one color in %s on line %d +ok diff --git a/ext/gd/tests/copypalette.phpt b/ext/gd/tests/copypalette.phpt new file mode 100644 index 000000000..ec00c030a --- /dev/null +++ b/ext/gd/tests/copypalette.phpt @@ -0,0 +1,44 @@ +--TEST-- +imagepalettecopy +--SKIPIF-- + +--FILE-- + +--EXPECT-- +copy palette 255 colors: ok +copy palette 1 color and alpha: ok diff --git a/ext/gd/tests/createfromstring.phpt b/ext/gd/tests/createfromstring.phpt new file mode 100644 index 000000000..b3d7dde15 --- /dev/null +++ b/ext/gd/tests/createfromstring.phpt @@ -0,0 +1,63 @@ +--TEST-- +imagecreatefromstring +--SKIPIF-- + +--FILE-- + 8 +$im = imagecreatefromstring(' asdf jklp'); +?> +--EXPECTF-- +createfromstring truecolor png: ok +createfromstring palette png: ok + +Warning: imagecreatefromstring(): Empty string or invalid image in %screatefromstring.php on line %d + +Warning: imagecreatefromstring(): Data is not in a recognized format in %screatefromstring.php on line %d diff --git a/ext/gd/tests/pngcomp.phpt b/ext/gd/tests/pngcomp.phpt new file mode 100644 index 000000000..1974610d3 --- /dev/null +++ b/ext/gd/tests/pngcomp.phpt @@ -0,0 +1,34 @@ +--TEST-- +png compression test +--SKIPIF-- + +--FILE-- + +--EXPECT-- +PNG compression test: ok diff --git a/ext/gd/tests/src.png b/ext/gd/tests/src.png new file mode 100644 index 000000000..d38c74268 Binary files /dev/null and b/ext/gd/tests/src.png differ diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 19d5473a5..613b6c58b 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c,v 1.46 2005/08/03 14:07:14 sniper Exp $ */ +/* $Id: gettext.c,v 1.46.2.2 2006/01/01 12:50:07 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -32,7 +32,7 @@ /* {{{ php_gettext_functions[] */ -function_entry php_gettext_functions[] = { +zend_function_entry php_gettext_functions[] = { PHP_NAMED_FE(textdomain, zif_textdomain, NULL) PHP_NAMED_FE(gettext, zif_gettext, NULL) /* Alias for gettext() */ diff --git a/ext/gettext/php_gettext.h b/ext/gettext/php_gettext.h index 932f5e1e6..800127cbf 100644 --- a/ext/gettext/php_gettext.h +++ b/ext/gettext/php_gettext.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gettext.h,v 1.20 2005/08/03 14:07:14 sniper Exp $ */ +/* $Id: php_gettext.h,v 1.20.2.1 2006/01/01 12:50:07 sniper Exp $ */ #ifndef PHP_GETTEXT_H #define PHP_GETTEXT_H diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index d72a2d982..c946b8ff9 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -39,7 +39,7 @@ static int le_gmp; /* {{{ gmp_functions[] */ -function_entry gmp_functions[] = { +zend_function_entry gmp_functions[] = { ZEND_FE(gmp_init, NULL) ZEND_FE(gmp_intval, NULL) ZEND_FE(gmp_strval, NULL) diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index ecf19cc6a..7ad54723f 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/hash/CREDITS b/ext/hash/CREDITS new file mode 100644 index 000000000..798cd4ddf --- /dev/null +++ b/ext/hash/CREDITS @@ -0,0 +1,2 @@ +PHP hash +Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner diff --git a/ext/hash/EXPERIMENTAL b/ext/hash/EXPERIMENTAL new file mode 100644 index 000000000..e69de29bb diff --git a/ext/hash/README b/ext/hash/README new file mode 100644 index 000000000..97eb206d0 --- /dev/null +++ b/ext/hash/README @@ -0,0 +1,19 @@ +Generic hashing framework for PHP + +Simplest usages: + +$digest = hash($algoname, $message); +$digest = hash_file($algoname, $filename); + +Examples: + +$digest = hash('md5', 'The quick brown fox jumped over the lazy dog.'); + +Feeder usage: + +$context = hash_init($algoname); +hash_update($context, $message); +$digest = hash_final($context); + +hash(), hash_file(), and hash_final() each support an optional boolean parameter $raw_output which behaves in the same +manner as sha1()'s optional parameter. diff --git a/ext/hash/bench.php b/ext/hash/bench.php new file mode 100644 index 000000000..b4a5964e0 --- /dev/null +++ b/ext/hash/bench.php @@ -0,0 +1,92 @@ + $t) { + printf("%-12s %02.6f\n", $a, $t); +} +?> diff --git a/ext/hash/config.m4 b/ext/hash/config.m4 new file mode 100644 index 000000000..01ac28b61 --- /dev/null +++ b/ext/hash/config.m4 @@ -0,0 +1,26 @@ +dnl $Id: config.m4,v 1.10.2.3 2005/12/02 02:18:54 iliaa Exp $ +dnl config.m4 for extension hash + +PHP_ARG_ENABLE(hash, whether to enable hash support, +[ --disable-hash Disable hash support], yes) + +if test "$PHP_HASH" != "no"; then + AC_DEFINE(HAVE_HASH_EXT,1,[Have HASH Extension]) + + AC_CHECK_SIZEOF(short, 2) + AC_CHECK_SIZEOF(int, 4) + AC_CHECK_SIZEOF(long, 4) + AC_CHECK_SIZEOF(long long, 8) + + EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \ + hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c hash_adler32.c \ + hash_crc32.c" + EXT_HASH_HEADERS="php_hash.h php_hash_md.h php_hash_sha.h php_hash_ripemd.h \ + php_hash_haval.h php_hash_tiger.h php_hash_gost.h php_hash_snefru.h \ + php_hash_whirlpool.h php_hash_adler32.h php_hash_crc32.h php_hash_types.h" + + PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared) + ifdef([PHP_INSTALL_HEADERS], [ + PHP_INSTALL_HEADERS(ext/hash, $EXT_HASH_HEADERS) + ]) +fi diff --git a/ext/hash/config.w32 b/ext/hash/config.w32 new file mode 100644 index 000000000..20fd5cef3 --- /dev/null +++ b/ext/hash/config.w32 @@ -0,0 +1,12 @@ +// $Id: config.w32,v 1.8.2.2 2005/12/02 01:59:44 iliaa Exp $ +// vim:ft=javascript + +ARG_ENABLE("hash", "enable hash support", "no"); + +if (PHP_HASH != "no") { + AC_DEFINE('HAVE_HASH_EXT', 1); + EXTENSION("hash", "hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c " + + "hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c " + + "hash_adler32.c hash_crc32.c"); +} + diff --git a/ext/hash/hash.c b/ext/hash/hash.c new file mode 100644 index 000000000..acb6c625a --- /dev/null +++ b/ext/hash/hash.c @@ -0,0 +1,660 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash.c,v 1.18.2.5 2006/01/01 12:50:07 sniper Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php_hash.h" +#include "ext/standard/info.h" +#include "ext/standard/file.h" + +static int php_hash_le_hash; +HashTable php_hash_hashtable; + +#if (PHP_MAJOR_VERSION >= 5) +# define DEFAULT_CONTEXT FG(default_context) +#else +# define DEFAULT_CONTEXT NULL +#endif + +/* Hash Registry Access */ + +PHP_HASH_API php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_len) +{ + php_hash_ops *ops; + char *lower = estrndup(algo, algo_len); + + zend_str_tolower(lower, algo_len); + if (SUCCESS != zend_hash_find(&php_hash_hashtable, lower, algo_len + 1, (void**)&ops)) { + ops = NULL; + } + efree(lower); + + return ops; +} + +PHP_HASH_API void php_hash_register_algo(const char *algo, php_hash_ops *ops) +{ + int algo_len = strlen(algo); + char *lower = estrndup(algo, algo_len); + + zend_str_tolower(lower, algo_len); + zend_hash_add(&php_hash_hashtable, lower, algo_len + 1, ops, sizeof(php_hash_ops), NULL); + efree(lower); +} + +/* Userspace */ + +static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMETERS, int isfilename) +{ + char *algo, *data, *digest; + int algo_len, data_len; + zend_bool raw_output = 0; + php_hash_ops *ops; + void *context; + php_stream *stream = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|b", &algo, &algo_len, &data, &data_len, &raw_output) == FAILURE) { + return; + } + + ops = php_hash_fetch_ops(algo, algo_len); + if (!ops) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing algorithm: %s", algo); + RETURN_FALSE; + } + if (isfilename) { + stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, DEFAULT_CONTEXT); + if (!stream) { + /* Stream will report errors opening file */ + RETURN_FALSE; + } + } + + context = emalloc(ops->context_size); + ops->hash_init(context); + + if (isfilename) { + char buf[1024]; + int n; + + while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + ops->hash_update(context, buf, n); + } + php_stream_close(stream); + } else { + ops->hash_update(context, data, data_len); + } + + digest = emalloc(ops->digest_size + 1); + ops->hash_final(digest, context); + efree(context); + + if (raw_output) { + digest[ops->digest_size] = 0; + RETURN_STRINGL(digest, ops->digest_size, 0); + } else { + char *hex_digest = safe_emalloc(ops->digest_size, 2, 1); + + php_hash_bin2hex(hex_digest, digest, ops->digest_size); + hex_digest[2 * ops->digest_size] = 0; + efree(digest); + RETURN_STRINGL(hex_digest, 2 * ops->digest_size, 0); + } +} + +/* {{{ proto string hash(string algo, string data[, bool raw_output = false]) +Generate a hash of a given input string +Returns lowercase hexits by default */ +PHP_FUNCTION(hash) { + php_hash_do_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +/* {{{ proto string hash_file(string algo, string filename[, bool raw_output = false]) +Generate a hash of a given file +Returns lowercase hexits by default */ +PHP_FUNCTION(hash_file) { + php_hash_do_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + +static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename) +{ + char *algo, *data, *digest, *key, *K; + int algo_len, data_len, key_len, i; + zend_bool raw_output = 0; + php_hash_ops *ops; + void *context; + php_stream *stream = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|b", &algo, &algo_len, &data, &data_len, + &key, &key_len, &raw_output) == FAILURE) { + return; + } + + ops = php_hash_fetch_ops(algo, algo_len); + if (!ops) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing algorithm: %s", algo); + RETURN_FALSE; + } + if (isfilename) { + stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, DEFAULT_CONTEXT); + if (!stream) { + /* Stream will report errors opening file */ + RETURN_FALSE; + } + } + + context = emalloc(ops->context_size); + ops->hash_init(context); + + K = emalloc(ops->block_size); + memset(K, 0, ops->block_size); + + if (key_len > ops->block_size) { + /* Reduce the key first */ + ops->hash_update(context, key, key_len); + ops->hash_final(K, context); + /* Make the context ready to start over */ + ops->hash_init(context); + } else { + memcpy(K, key, key_len); + } + + /* XOR ipad */ + for(i=0; i < ops->block_size; i++) { + K[i] ^= 0x36; + } + ops->hash_update(context, K, ops->block_size); + + if (isfilename) { + char buf[1024]; + int n; + + while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + ops->hash_update(context, buf, n); + } + php_stream_close(stream); + } else { + ops->hash_update(context, data, data_len); + } + + digest = emalloc(ops->digest_size + 1); + ops->hash_final(digest, context); + + /* Convert K to opad -- 0x6A = 0x36 ^ 0x5C */ + for(i=0; i < ops->block_size; i++) { + K[i] ^= 0x6A; + } + + /* Feed this result into the outter hash */ + ops->hash_init(context); + ops->hash_update(context, K, ops->block_size); + ops->hash_update(context, digest, ops->digest_size); + ops->hash_final(digest, context); + + /* Zero the key */ + memset(K, 0, ops->block_size); + efree(K); + efree(context); + + if (raw_output) { + digest[ops->digest_size] = 0; + RETURN_STRINGL(digest, ops->digest_size, 0); + } else { + char *hex_digest = safe_emalloc(ops->digest_size, 2, 1); + + php_hash_bin2hex(hex_digest, digest, ops->digest_size); + hex_digest[2 * ops->digest_size] = 0; + efree(digest); + RETURN_STRINGL(hex_digest, 2 * ops->digest_size, 0); + } +} + +/* {{{ proto string hash_hmac(string algo, string data, string key[, bool raw_output = false]) +Generate a hash of a given input string with a key using HMAC +Returns lowercase hexits by default */ +PHP_FUNCTION(hash_hmac) { + php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +/* {{{ proto string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false]) +Generate a hash of a given file with a key using HMAC +Returns lowercase hexits by default */ +PHP_FUNCTION(hash_hmac_file) { + php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + + +/* {{{ proto resource hash_init(string algo[, int options, string key]) +Initialize a hashing context */ +PHP_FUNCTION(hash_init) +{ + char *algo, *key = NULL; + int algo_len, key_len = 0, argc = ZEND_NUM_ARGS(); + long options = 0; + void *context; + php_hash_ops *ops; + php_hash_data *hash; + + if (zend_parse_parameters(argc TSRMLS_CC, "s|ls", &algo, &algo_len, &options, &key, &key_len) == FAILURE) { + return; + } + + ops = php_hash_fetch_ops(algo, algo_len); + if (!ops) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown hashing algorithm: %s", algo); + RETURN_FALSE; + } + + if (options & PHP_HASH_HMAC && + key_len <= 0) { + /* Note: a zero length key is no key at all */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "HMAC requested without a key"); + RETURN_FALSE; + } + + context = emalloc(ops->context_size); + ops->hash_init(context); + + hash = emalloc(sizeof(php_hash_data)); + hash->ops = ops; + hash->context = context; + hash->options = options; + hash->key = NULL; + + if (options & PHP_HASH_HMAC) { + char *K = emalloc(ops->block_size); + int i; + + memset(K, 0, ops->block_size); + + if (key_len > ops->block_size) { + /* Reduce the key first */ + ops->hash_update(context, key, key_len); + ops->hash_final(K, context); + /* Make the context ready to start over */ + ops->hash_init(context); + } else { + memcpy(K, key, key_len); + } + + /* XOR ipad */ + for(i=0; i < ops->block_size; i++) { + K[i] ^= 0x36; + } + ops->hash_update(context, K, ops->block_size); + hash->key = K; + } + + ZEND_REGISTER_RESOURCE(return_value, hash, php_hash_le_hash); +} +/* }}} */ + +/* {{{ proto bool hash_update(resource context, string data) +Pump data into the hashing algorithm */ +PHP_FUNCTION(hash_update) +{ + zval *zhash; + php_hash_data *hash; + char *data; + int data_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zhash, &data, &data_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash); + + hash->ops->hash_update(hash->context, data, data_len); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int hash_update_stream(resource context, resource handle[, integer length]) +Pump data into the hashing algorithm from an open stream */ +PHP_FUNCTION(hash_update_stream) +{ + zval *zhash, *zstream; + php_hash_data *hash; + php_stream *stream = NULL; + long length = -1, didread = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|l", &zhash, &zstream, &length) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash); + php_stream_from_zval(stream, &zstream); + + while (length) { + char buf[1024]; + long n, toread = 1024; + + if (length > 0 && toread > length) { + toread = length; + } + + if ((n = php_stream_read(stream, buf, toread)) <= 0) { + /* Nada mas */ + RETURN_LONG(didread); + } + hash->ops->hash_update(hash->context, buf, n); + length -= n; + didread += n; + } + + RETURN_LONG(didread); +} +/* }}} */ + +/* {{{ proto bool hash_update_file(resource context, string filename[, resource context]) +Pump data into the hashing algorithm from a file */ +PHP_FUNCTION(hash_update_file) +{ + zval *zhash, *zcontext = NULL; + php_hash_data *hash; + php_stream_context *context; + php_stream *stream; + char *filename, buf[1024]; + int filename_len, n; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|r", &zhash, &filename, &filename_len, &zcontext) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash); + context = php_stream_context_from_zval(zcontext, 0); + + stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, context); + if (!stream) { + /* Stream will report errors opening file */ + RETURN_FALSE; + } + + while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + hash->ops->hash_update(hash->context, buf, n); + } + php_stream_close(stream); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto string hash_final(resource context[, bool raw_output=false]) +Output resulting digest */ +PHP_FUNCTION(hash_final) +{ + zval *zhash; + php_hash_data *hash; + zend_bool raw_output = 0; + zend_rsrc_list_entry *le; + char *digest; + int digest_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|b", &zhash, &raw_output) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash); + + digest_len = hash->ops->digest_size; + digest = emalloc(digest_len + 1); + hash->ops->hash_final(digest, hash->context); + if (hash->options & PHP_HASH_HMAC) { + int i; + + /* Convert K to opad -- 0x6A = 0x36 ^ 0x5C */ + for(i=0; i < hash->ops->block_size; i++) { + hash->key[i] ^= 0x6A; + } + + /* Feed this result into the outter hash */ + hash->ops->hash_init(hash->context); + hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); + hash->ops->hash_update(hash->context, digest, hash->ops->digest_size); + hash->ops->hash_final(digest, hash->context); + + /* Zero the key */ + memset(hash->key, 0, hash->ops->block_size); + efree(hash->key); + hash->key = NULL; + } + digest[digest_len] = 0; + efree(hash->context); + hash->context = NULL; + + /* zend_list_REAL_delete() */ + if (zend_hash_index_find(&EG(regular_list), Z_RESVAL_P(zhash), (void **) &le)==SUCCESS) { + /* This is a hack to avoid letting the resource hide elsewhere (like in separated vars) + FETCH_RESOURCE is intelligent enough to handle dealing with any issues this causes */ + le->refcount = 1; + } /* FAILURE is not an option */ + zend_list_delete(Z_RESVAL_P(zhash)); + + if (raw_output) { + RETURN_STRINGL(digest, digest_len, 0); + } else { + char *hex_digest = safe_emalloc(digest_len,2,1); + + php_hash_bin2hex(hex_digest, digest, digest_len); + hex_digest[2 * digest_len] = 0; + efree(digest); + RETURN_STRINGL(hex_digest, 2 * digest_len, 0); + } +} +/* }}} */ + +/* {{{ proto array hash_algos(void) +Return a list of registered hashing algorithms */ +PHP_FUNCTION(hash_algos) +{ + HashPosition pos; + char *str; + int str_len; + long idx, type; + + array_init(return_value); + for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos); + (type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, &str_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT; + zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) { + add_next_index_stringl(return_value, str, str_len-1, 1); + } +} +/* }}} */ + +/* Module Housekeeping */ + +static void php_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) +{ + php_hash_data *hash = (php_hash_data*)rsrc->ptr; + + /* Just in case the algo has internally allocated resources */ + if (hash->context) { + char *dummy = emalloc(hash->ops->digest_size); + hash->ops->hash_final(dummy, hash->context); + efree(dummy); + efree(hash->context); + } + + if (hash->key) { + memset(hash->key, 0, hash->ops->block_size); + efree(hash->key); + } + efree(hash); +} + +#define PHP_HASH_HAVAL_REGISTER(p,b) php_hash_register_algo("haval" #b "," #p , &php_hash_##p##haval##b##_ops); + +/* {{{ PHP_MINIT_FUNCTION + */ +PHP_MINIT_FUNCTION(hash) +{ + php_hash_le_hash = zend_register_list_destructors_ex(php_hash_dtor, NULL, PHP_HASH_RESNAME, module_number); + + zend_hash_init(&php_hash_hashtable, 35, NULL, NULL, 1); + + php_hash_register_algo("md4", &php_hash_md4_ops); + php_hash_register_algo("md5", &php_hash_md5_ops); + php_hash_register_algo("sha1", &php_hash_sha1_ops); + php_hash_register_algo("sha256", &php_hash_sha256_ops); + php_hash_register_algo("sha384", &php_hash_sha384_ops); + php_hash_register_algo("sha512", &php_hash_sha512_ops); + php_hash_register_algo("ripemd128", &php_hash_ripemd128_ops); + php_hash_register_algo("ripemd160", &php_hash_ripemd160_ops); + php_hash_register_algo("whirlpool", &php_hash_whirlpool_ops); + php_hash_register_algo("tiger128,3", &php_hash_3tiger128_ops); + php_hash_register_algo("tiger160,3", &php_hash_3tiger160_ops); + php_hash_register_algo("tiger192,3", &php_hash_3tiger192_ops); + php_hash_register_algo("tiger128,4", &php_hash_4tiger128_ops); + php_hash_register_algo("tiger160,4", &php_hash_4tiger160_ops); + php_hash_register_algo("tiger192,4", &php_hash_4tiger192_ops); + php_hash_register_algo("snefru", &php_hash_snefru_ops); + php_hash_register_algo("gost", &php_hash_gost_ops); + php_hash_register_algo("adler32", &php_hash_adler32_ops); + php_hash_register_algo("crc32", &php_hash_crc32_ops); + php_hash_register_algo("crc32b", &php_hash_crc32b_ops); + + PHP_HASH_HAVAL_REGISTER(3,128); + PHP_HASH_HAVAL_REGISTER(3,160); + PHP_HASH_HAVAL_REGISTER(3,192); + PHP_HASH_HAVAL_REGISTER(3,224); + PHP_HASH_HAVAL_REGISTER(3,256); + + PHP_HASH_HAVAL_REGISTER(4,128); + PHP_HASH_HAVAL_REGISTER(4,160); + PHP_HASH_HAVAL_REGISTER(4,192); + PHP_HASH_HAVAL_REGISTER(4,224); + PHP_HASH_HAVAL_REGISTER(4,256); + + PHP_HASH_HAVAL_REGISTER(5,128); + PHP_HASH_HAVAL_REGISTER(5,160); + PHP_HASH_HAVAL_REGISTER(5,192); + PHP_HASH_HAVAL_REGISTER(5,224); + PHP_HASH_HAVAL_REGISTER(5,256); + + REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_CS | CONST_PERSISTENT); + + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_MSHUTDOWN_FUNCTION + */ +PHP_MSHUTDOWN_FUNCTION(hash) +{ + zend_hash_destroy(&php_hash_hashtable); + + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_MINFO_FUNCTION + */ +PHP_MINFO_FUNCTION(hash) +{ + HashPosition pos; + char buffer[2048]; + char *s = buffer, *e = s + sizeof(buffer), *str; + long idx, type; + + for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos); + (type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT; + zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) { + s += snprintf(s, e - s, "%s ", str); + } + *s = 0; + + php_info_print_table_start(); + php_info_print_table_header(2, "hash support", "enabled"); + php_info_print_table_header(2, "Hashing Engines", buffer); + php_info_print_table_end(); +} +/* }}} */ + +/* {{{ hash_functions[] + */ +zend_function_entry hash_functions[] = { + PHP_FE(hash, NULL) + PHP_FE(hash_file, NULL) + + PHP_FE(hash_hmac, NULL) + PHP_FE(hash_hmac_file, NULL) + + PHP_FE(hash_init, NULL) + PHP_FE(hash_update, NULL) + PHP_FE(hash_update_stream, NULL) + PHP_FE(hash_update_file, NULL) + PHP_FE(hash_final, NULL) + + PHP_FE(hash_algos, NULL) + + /* BC Land */ +#ifdef PHP_HASH_MD5_NOT_IN_CORE + PHP_NAMED_FE(md5, php_if_md5, NULL) + PHP_NAMED_FE(md5_file, php_if_md5_file, NULL) +#endif /* PHP_HASH_MD5_NOT_IN_CORE */ + +#ifdef PHP_HASH_SHA1_NOT_IN_CORE + PHP_NAMED_FE(sha1, php_if_sha1, NULL) + PHP_NAMED_FE(sha1_file, php_if_sha1_file, NULL) +#endif /* PHP_HASH_SHA1_NOT_IN_CORE */ + + {NULL, NULL, NULL} +}; +/* }}} */ + +/* {{{ hash_module_entry + */ +zend_module_entry hash_module_entry = { +#if ZEND_MODULE_API_NO >= 20010901 + STANDARD_MODULE_HEADER, +#endif + PHP_HASH_EXTNAME, + hash_functions, + PHP_MINIT(hash), + PHP_MSHUTDOWN(hash), + NULL, /* RINIT */ + NULL, /* RSHUTDOWN */ + PHP_MINFO(hash), +#if ZEND_MODULE_API_NO >= 20010901 + PHP_HASH_EXTVER, /* Replace with version number for your extension */ +#endif + STANDARD_MODULE_PROPERTIES +}; +/* }}} */ + +#ifdef COMPILE_DL_HASH +ZEND_GET_MODULE(hash) +#endif + +/* + * 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/hash/hash_adler32.c b/ext/hash/hash_adler32.c new file mode 100644 index 000000000..1067dbfb3 --- /dev/null +++ b/ext/hash/hash_adler32.c @@ -0,0 +1,66 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_adler32.c,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_adler32.h" + +PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context) +{ + context->state = 1; +} + +PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len) +{ + php_hash_uint32 i, s[2] = { context->state & 0xffff, (context->state >> 16) & 0xffff }; + + for (i = 0; i < len; ++i) { + s[0] = (s[0] + input[i]) % 65521; + s[1] = (s[1] + s[0]) % 65521; + } + context->state = s[0] + (s[1] << 16); +} + +PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context) +{ + digest[3] = (unsigned char) ((context->state >> 24) & 0xff); + digest[2] = (unsigned char) ((context->state >> 16) & 0xff); + digest[1] = (unsigned char) ((context->state >> 8) & 0xff); + digest[0] = (unsigned char) (context->state & 0xff); + context->state = 0; +} + +php_hash_ops php_hash_adler32_ops = { + (php_hash_init_func_t) PHP_ADLER32Init, + (php_hash_update_func_t) PHP_ADLER32Update, + (php_hash_final_func_t) PHP_ADLER32Final, + 4, /* what to say here? */ + 4, + sizeof(PHP_ADLER32_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_crc32.c b/ext/hash/hash_crc32.c new file mode 100644 index 000000000..be282d84e --- /dev/null +++ b/ext/hash/hash_crc32.c @@ -0,0 +1,84 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_crc32.c,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_crc32.h" +#include "php_hash_crc32_tables.h" + +PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context) +{ + context->state = ~0; +} + +PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) +{ + size_t i; + + for (i = 0; i < len; ++i) { + context->state = (context->state << 8) ^ crc32_table[(context->state >> 24) ^ (input[i] & 0xff)]; + } +} + +PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) +{ + size_t i; + + for (i = 0; i < len; ++i) { + context->state = (context->state >> 8) ^ crc32b_table[(context->state ^ input[i]) & 0xff]; + } +} + +PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX *context) +{ + context->state=~context->state; + digest[3] = (unsigned char) ((context->state >> 24) & 0xff); + digest[2] = (unsigned char) ((context->state >> 16) & 0xff); + digest[1] = (unsigned char) ((context->state >> 8) & 0xff); + digest[0] = (unsigned char) (context->state & 0xff); + context->state = 0; +} + +php_hash_ops php_hash_crc32_ops = { + (php_hash_init_func_t) PHP_CRC32Init, + (php_hash_update_func_t) PHP_CRC32Update, + (php_hash_final_func_t) PHP_CRC32Final, + 4, /* what to say here? */ + 4, + sizeof(PHP_CRC32_CTX) +}; + +php_hash_ops php_hash_crc32b_ops = { + (php_hash_init_func_t) PHP_CRC32Init, + (php_hash_update_func_t) PHP_CRC32BUpdate, + (php_hash_final_func_t) PHP_CRC32Final, + 4, /* what to say here? */ + 4, + sizeof(PHP_CRC32_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_gost.c b/ext/hash/hash_gost.c new file mode 100644 index 000000000..5528d0381 --- /dev/null +++ b/ext/hash/hash_gost.c @@ -0,0 +1,321 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_gost.c,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_gost.h" +#include "php_hash_gost_tables.h" + +/* {{{ Gost() + * derived from gost_compress() by Markku-Juhani Saarinen + */ + +#define round(k1, k2) \ + t = (k1) + r; \ + l ^= tables[0][t & 0xff] ^ tables[1][(t >> 8) & 0xff] ^ \ + tables[2][(t >> 16) & 0xff] ^ tables[3][t >> 24]; \ + t = (k2) + l; \ + r ^= tables[0][t & 0xff] ^ tables[1][(t >> 8) & 0xff] ^ \ + tables[2][(t >> 16) & 0xff] ^ tables[3][t >> 24]; + +#define R(key, h, i, t, l, r) \ + r = h[i]; \ + l = h[i + 1]; \ + round(key[0], key[1]) \ + round(key[2], key[3]) \ + round(key[4], key[5]) \ + round(key[6], key[7]) \ + round(key[0], key[1]) \ + round(key[2], key[3]) \ + round(key[4], key[5]) \ + round(key[6], key[7]) \ + round(key[0], key[1]) \ + round(key[2], key[3]) \ + round(key[4], key[5]) \ + round(key[6], key[7]) \ + round(key[7], key[6]) \ + round(key[5], key[4]) \ + round(key[3], key[2]) \ + round(key[1], key[0]) \ + t = r; \ + r = l; \ + l = t; \ + +#define X(w, u, v) \ + w[0] = u[0] ^ v[0]; \ + w[1] = u[1] ^ v[1]; \ + w[2] = u[2] ^ v[2]; \ + w[3] = u[3] ^ v[3]; \ + w[4] = u[4] ^ v[4]; \ + w[5] = u[5] ^ v[5]; \ + w[6] = u[6] ^ v[6]; \ + w[7] = u[7] ^ v[7]; + +#define P(key, w) \ + key[0] = (w[0] & 0x000000ff) | ((w[2] & 0x000000ff) << 8) | \ + ((w[4] & 0x000000ff) << 16) | ((w[6] & 0x000000ff) << 24); \ + key[1] = ((w[0] & 0x0000ff00) >> 8) | (w[2] & 0x0000ff00) | \ + ((w[4] & 0x0000ff00) << 8) | ((w[6] & 0x0000ff00) << 16); \ + key[2] = ((w[0] & 0x00ff0000) >> 16) | ((w[2] & 0x00ff0000) >> 8) | \ + (w[4] & 0x00ff0000) | ((w[6] & 0x00ff0000) << 8); \ + key[3] = ((w[0] & 0xff000000) >> 24) | ((w[2] & 0xff000000) >> 16) | \ + ((w[4] & 0xff000000) >> 8) | (w[6] & 0xff000000); \ + key[4] = (w[1] & 0x000000ff) | ((w[3] & 0x000000ff) << 8) | \ + ((w[5] & 0x000000ff) << 16) | ((w[7] & 0x000000ff) << 24); \ + key[5] = ((w[1] & 0x0000ff00) >> 8) | (w[3] & 0x0000ff00) | \ + ((w[5] & 0x0000ff00) << 8) | ((w[7] & 0x0000ff00) << 16); \ + key[6] = ((w[1] & 0x00ff0000) >> 16) | ((w[3] & 0x00ff0000) >> 8) | \ + (w[5] & 0x00ff0000) | ((w[7] & 0x00ff0000) << 8); \ + key[7] = ((w[1] & 0xff000000) >> 24) | ((w[3] & 0xff000000) >> 16) | \ + ((w[5] & 0xff000000) >> 8) | (w[7] & 0xff000000); + +#define A(x, l, r) \ + l = x[0] ^ x[2]; \ + r = x[1] ^ x[3]; \ + x[0] = x[2]; \ + x[1] = x[3]; \ + x[2] = x[4]; \ + x[3] = x[5]; \ + x[4] = x[6]; \ + x[5] = x[7]; \ + x[6] = l; \ + x[7] = r; + +#define AA(x, l, r) \ + l = x[0]; \ + r = x[2]; \ + x[0] = x[4]; \ + x[2] = x[6]; \ + x[4] = l ^ r; \ + x[6] = x[0] ^ r; \ + l = x[1]; \ + r = x[3]; \ + x[1] = x[5]; \ + x[3] = x[7]; \ + x[5] = l ^ r; \ + x[7] = x[1] ^ r; + +#define C(x) \ + x[0] ^= 0xff00ff00; \ + x[1] ^= 0xff00ff00; \ + x[2] ^= 0x00ff00ff; \ + x[3] ^= 0x00ff00ff; \ + x[4] ^= 0x00ffff00; \ + x[5] ^= 0xff0000ff; \ + x[6] ^= 0x000000ff; \ + x[7] ^= 0xff00ffff; + +#define S(s, l, r) \ + s[i] = r; \ + s[i + 1] = l; + +#define SHIFT12(u, m, s) \ + u[0] = m[0] ^ s[6]; \ + u[1] = m[1] ^ s[7]; \ + u[2] = m[2] ^ (s[0] << 16) ^ (s[0] >> 16) ^ (s[0] & 0xffff) ^ \ + (s[1] & 0xffff) ^ (s[1] >> 16) ^ (s[2] << 16) ^ s[6] ^ (s[6] << 16) ^ \ + (s[7] & 0xffff0000) ^ (s[7] >> 16); \ + u[3] = m[3] ^ (s[0] & 0xffff) ^ (s[0] << 16) ^ (s[1] & 0xffff) ^ \ + (s[1] << 16) ^ (s[1] >> 16) ^ (s[2] << 16) ^ (s[2] >> 16) ^ \ + (s[3] << 16) ^ s[6] ^ (s[6] << 16) ^ (s[6] >> 16) ^ (s[7] & 0xffff) ^ \ + (s[7] << 16) ^ (s[7] >> 16); \ + u[4] = m[4] ^ \ + (s[0] & 0xffff0000) ^ (s[0] << 16) ^ (s[0] >> 16) ^ \ + (s[1] & 0xffff0000) ^ (s[1] >> 16) ^ (s[2] << 16) ^ (s[2] >> 16) ^ \ + (s[3] << 16) ^ (s[3] >> 16) ^ (s[4] << 16) ^ (s[6] << 16) ^ \ + (s[6] >> 16) ^(s[7] & 0xffff) ^ (s[7] << 16) ^ (s[7] >> 16); \ + u[5] = m[5] ^ (s[0] << 16) ^ (s[0] >> 16) ^ (s[0] & 0xffff0000) ^ \ + (s[1] & 0xffff) ^ s[2] ^ (s[2] >> 16) ^ (s[3] << 16) ^ (s[3] >> 16) ^ \ + (s[4] << 16) ^ (s[4] >> 16) ^ (s[5] << 16) ^ (s[6] << 16) ^ \ + (s[6] >> 16) ^ (s[7] & 0xffff0000) ^ (s[7] << 16) ^ (s[7] >> 16); \ + u[6] = m[6] ^ s[0] ^ (s[1] >> 16) ^ (s[2] << 16) ^ s[3] ^ (s[3] >> 16) ^ \ + (s[4] << 16) ^ (s[4] >> 16) ^ (s[5] << 16) ^ (s[5] >> 16) ^ s[6] ^ \ + (s[6] << 16) ^ (s[6] >> 16) ^ (s[7] << 16); \ + u[7] = m[7] ^ (s[0] & 0xffff0000) ^ (s[0] << 16) ^ (s[1] & 0xffff) ^ \ + (s[1] << 16) ^ (s[2] >> 16) ^ (s[3] << 16) ^ s[4] ^ (s[4] >> 16) ^ \ + (s[5] << 16) ^ (s[5] >> 16) ^ (s[6] >> 16) ^ (s[7] & 0xffff) ^ \ + (s[7] << 16) ^ (s[7] >> 16); + +#define SHIFT16(h, v, u) \ + v[0] = h[0] ^ (u[1] << 16) ^ (u[0] >> 16); \ + v[1] = h[1] ^ (u[2] << 16) ^ (u[1] >> 16); \ + v[2] = h[2] ^ (u[3] << 16) ^ (u[2] >> 16); \ + v[3] = h[3] ^ (u[4] << 16) ^ (u[3] >> 16); \ + v[4] = h[4] ^ (u[5] << 16) ^ (u[4] >> 16); \ + v[5] = h[5] ^ (u[6] << 16) ^ (u[5] >> 16); \ + v[6] = h[6] ^ (u[7] << 16) ^ (u[6] >> 16); \ + v[7] = h[7] ^ (u[0] & 0xffff0000) ^ (u[0] << 16) ^ (u[7] >> 16) ^ \ + (u[1] & 0xffff0000) ^ (u[1] << 16) ^ (u[6] << 16) ^ (u[7] & 0xffff0000); + +#define SHIFT61(h, v) \ + h[0] = (v[0] & 0xffff0000) ^ (v[0] << 16) ^ (v[0] >> 16) ^ (v[1] >> 16) ^ \ + (v[1] & 0xffff0000) ^ (v[2] << 16) ^ (v[3] >> 16) ^ (v[4] << 16) ^ \ + (v[5] >> 16) ^ v[5] ^ (v[6] >> 16) ^ (v[7] << 16) ^ (v[7] >> 16) ^ \ + (v[7] & 0xffff); \ + h[1] = (v[0] << 16) ^ (v[0] >> 16) ^ (v[0] & 0xffff0000) ^ (v[1] & 0xffff) ^ \ + v[2] ^ (v[2] >> 16) ^ (v[3] << 16) ^ (v[4] >> 16) ^ (v[5] << 16) ^ \ + (v[6] << 16) ^ v[6] ^ (v[7] & 0xffff0000) ^ (v[7] >> 16); \ + h[2] = (v[0] & 0xffff) ^ (v[0] << 16) ^ (v[1] << 16) ^ (v[1] >> 16) ^ \ + (v[1] & 0xffff0000) ^ (v[2] << 16) ^ (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ \ + (v[5] >> 16) ^ v[6] ^ (v[6] >> 16) ^ (v[7] & 0xffff) ^ (v[7] << 16) ^ \ + (v[7] >> 16); \ + h[3] = (v[0] << 16) ^ (v[0] >> 16) ^ (v[0] & 0xffff0000) ^ \ + (v[1] & 0xffff0000) ^ (v[1] >> 16) ^ (v[2] << 16) ^ (v[2] >> 16) ^ v[2] ^ \ + (v[3] << 16) ^ (v[4] >> 16) ^ v[4] ^ (v[5] << 16) ^ (v[6] << 16) ^ \ + (v[7] & 0xffff) ^ (v[7] >> 16); \ + h[4] = (v[0] >> 16) ^ (v[1] << 16) ^ v[1] ^ (v[2] >> 16) ^ v[2] ^ \ + (v[3] << 16) ^ (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ (v[5] >> 16) ^ \ + v[5] ^ (v[6] << 16) ^ (v[6] >> 16) ^ (v[7] << 16); \ + h[5] = (v[0] << 16) ^ (v[0] & 0xffff0000) ^ (v[1] << 16) ^ (v[1] >> 16) ^ \ + (v[1] & 0xffff0000) ^ (v[2] << 16) ^ v[2] ^ (v[3] >> 16) ^ v[3] ^ \ + (v[4] << 16) ^ (v[4] >> 16) ^ v[4] ^ (v[5] << 16) ^ (v[6] << 16) ^ \ + (v[6] >> 16) ^ v[6] ^ (v[7] << 16) ^ (v[7] >> 16) ^ (v[7] & 0xffff0000); \ + h[6] = v[0] ^ v[2] ^ (v[2] >> 16) ^ v[3] ^ (v[3] << 16) ^ v[4] ^ \ + (v[4] >> 16) ^ (v[5] << 16) ^ (v[5] >> 16) ^ v[5] ^ (v[6] << 16) ^ \ + (v[6] >> 16) ^ v[6] ^ (v[7] << 16) ^ v[7]; \ + h[7] = v[0] ^ (v[0] >> 16) ^ (v[1] << 16) ^ (v[1] >> 16) ^ (v[2] << 16) ^ \ + (v[3] >> 16) ^ v[3] ^ (v[4] << 16) ^ v[4] ^ (v[5] >> 16) ^ v[5] ^ \ + (v[6] << 16) ^ (v[6] >> 16) ^ (v[7] << 16) ^ v[7]; + +#define PASS \ + X(w, u, v); \ + P(key, w); \ + R(key, h, i, t, l, r); \ + S(s, l, r); \ + if (i != 6) { \ + A(u, l, r); \ + if (i == 2) { \ + C(u); \ + } \ + AA(v, l, r); \ + } + +static inline void Gost(php_hash_uint32 state[8], php_hash_uint32 data[8]) +{ + int i; + php_hash_uint32 l, r, t, key[8], u[8], v[8], w[8], s[8], *h = state, *m = data; + + memcpy(u, state, sizeof(u)); + memcpy(v, data, sizeof(v)); + + for (i = 0; i < 8; i += 2) { + PASS; + } + SHIFT12(u, m, s); + SHIFT16(h, v, u); + SHIFT61(h, v); +} +/* }}} */ + +static inline void GostTransform(PHP_GOST_CTX *context, const unsigned char input[32]) +{ + int i, j; + php_hash_uint32 data[8], temp = 0, save = 0; + + for (i = 0, j = 0; i < 8; ++i, j += 4) { + data[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) | + (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24); + save = context->state[i + 8]; + context->state[i + 8] += data[i] + temp; + temp = ((context->state[i + 8] < data[i]) || (context->state[i + 8] < save)) ? 1 : 0; + } + + Gost(context->state, data); +} + +PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *context) +{ + memset(context, 0, sizeof(*context)); +} + +static const php_hash_uint32 MAX32 = 0xffffffffLU; + +PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *context, const unsigned char *input, size_t len) +{ + if ((MAX32 - context->count[0]) < (len * 8)) { + context->count[1]++; + context->count[0] = MAX32 - context->count[0]; + context->count[0] = (len * 8) - context->count[0]; + } else { + context->count[0] += len * 8; + } + + if (context->length + len < 32) { + memcpy(&context->buffer[context->length], input, len); + context->length += len; + } else { + size_t i = 0, r = (context->length + len) % 32; + + if (context->length) { + i = 32 - context->length; + memcpy(&context->buffer[context->length], input, i); + GostTransform(context, context->buffer); + } + + for (; i + 32 <= len; i += 32) { + GostTransform(context, input + i); + } + + memcpy(context->buffer, input + i, r); + memset(&context->buffer[r], 0, 32 - r); + context->length = r; + } +} + +PHP_HASH_API void PHP_GOSTFinal(unsigned char digest[32], PHP_GOST_CTX *context) +{ + php_hash_uint32 i, j, l[8] = {0}; + + if (context->length) { + GostTransform(context, context->buffer); + } + + memcpy(l, context->count, sizeof(context->count)); + Gost(context->state, l); + memcpy(l, &context->state[8], sizeof(l)); + Gost(context->state, l); + + for (i = 0, j = 0; j < 32; i++, j += 4) { + digest[j] = (unsigned char) (context->state[i] & 0xff); + digest[j + 1] = (unsigned char) ((context->state[i] >> 8) & 0xff); + digest[j + 2] = (unsigned char) ((context->state[i] >> 16) & 0xff); + digest[j + 3] = (unsigned char) ((context->state[i] >> 24) & 0xff); + } + + memset(context, 0, sizeof(*context)); +} + +php_hash_ops php_hash_gost_ops = { + (php_hash_init_func_t) PHP_GOSTInit, + (php_hash_update_func_t) PHP_GOSTUpdate, + (php_hash_final_func_t) PHP_GOSTFinal, + 32, + 32, + sizeof(PHP_GOST_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c new file mode 100644 index 000000000..f0c9d1440 --- /dev/null +++ b/ext/hash/hash_haval.c @@ -0,0 +1,550 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_haval.c,v 1.4.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_haval.h" + +static unsigned char PADDING[128] ={ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +static php_hash_uint32 D0[8] = { + 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89 }; + +static php_hash_uint32 K2[32] = { + 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, + 0x9216D5D9, 0x8979FB1B, 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96, + 0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, 0x636920D8, 0x71574E69, + 0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5 }; + +static php_hash_uint32 K3[32] = { + 0x9C30D539, 0x2AF26013, 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E, + 0x6C9E0E8B, 0xB01E8A3E, 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, 0xE65525F3, 0xAA55AB94, + 0x57489862, 0x63E81440, 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, 0xA15486AF, 0x7C72E993, + 0xB3EE1411, 0x636FBC2A, 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, 0xAFD6BA33, 0x6C24CF5C }; + +static php_hash_uint32 K4[32] = { + 0x7A325381, 0x28958677, 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, 0x61D809CC, 0xFB21A991, + 0x487CAC60, 0x5DEC8032, 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, 0x23893E81, 0xD396ACC5, + 0x0F6D6FF3, 0x83F44239, 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, 0x21C66842, 0xF6E96C9A, + 0x670C9C61, 0xABD388F0, 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, 0x6EEF0B6C, 0x137A3BE4 }; + +static php_hash_uint32 K5[32] = { + 0xBA3BF050, 0x7EFB2A98, 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, 0x8CEE8619, 0x456F9FB4, + 0x7D84A5C3, 0x3B8B5EBE, 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, 0x4ED3AA62, 0x363F7706, + 0x1BFEDF72, 0x429B023D, 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, 0x075372C9, 0x80991B7B, + 0x25D479D8, 0xF6E8DEF7, 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, 0xC1A94FB6, 0x409F60C4 }; + +static short I2[32] = { 5, 14, 26, 18, 11, 28, 7, 16, 0, 23, 20, 22, 1, 10, 4, 8, + 30, 3, 21, 9, 17, 24, 29, 6, 19, 12, 15, 13, 2, 25, 31, 27 }; + +static short I3[32] = { 19, 9, 4, 20, 28, 17, 8, 22, 29, 14, 25, 12, 24, 30, 16, 26, + 31, 15, 7, 3, 1, 0, 18, 27, 13, 6, 21, 10, 23, 11, 5, 2 }; + +static short I4[32] = { 24, 4, 0, 14, 2, 7, 28, 23, 26, 6, 30, 20, 18, 25, 19, 3, + 22, 11, 31, 21, 8, 27, 12, 9, 1, 29, 5, 15, 17, 10, 16, 13 }; + +static short I5[32] = { 27, 3, 21, 26, 17, 11, 20, 29, 19, 0, 12, 7, 13, 8, 31, 10, + 5, 9, 14, 30, 18, 6, 28, 24, 2, 23, 16, 22, 4, 1, 25, 15 }; + +static short M0[32] = { 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, + 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1 }; + +static short M1[32] = { 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, + 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2 }; + +static short M2[32] = { 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, + 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3 }; + +static short M3[32] = { 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, + 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4 }; + +static short M4[32] = { 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, + 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5 }; + +static short M5[32] = { 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, + 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6 }; + +static short M6[32] = { 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7, + 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 7 }; + +static short M7[32] = { 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, + 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0 }; + +/* {{{ Encode + Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char) (input[i] & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); + } +} +/* }}} */ + +/* {{{ Decode + Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is + a multiple of 4. + */ +static void Decode(php_hash_uint32 *output, const unsigned char *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) | + (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24); + } +} +/* }}} */ + +#define F1(x6,x5,x4,x3,x2,x1,x0) ( ((x1) & (x4)) ^ ((x2) & (x5)) ^ ((x3) & (x6)) ^ ((x0) & (x1)) ^ (x0) ) +#define F2(x6,x5,x4,x3,x2,x1,x0) ( ((x1) & (x2) & (x3)) ^ ((x2) & (x4) & (x5)) ^ ((x1) & (x2)) ^ ((x1) & (x4)) ^ \ + ((x2) & (x6)) ^ ((x3) & (x5)) ^ ((x4) & (x5)) ^ ((x0) & (x2)) ^ (x0) ) +#define F3(x6,x5,x4,x3,x2,x1,x0) ( ((x1) & (x2) & (x3)) ^ ((x1) & (x4)) ^ ((x2) & (x5)) ^ ((x3) & (x6)) ^ ((x0) & (x3)) ^ (x0) ) +#define F4(x6,x5,x4,x3,x2,x1,x0) ( ((x1) & (x2) & (x3)) ^ ((x2) & (x4) & (x5)) ^ ((x3) & (x4) & (x6)) ^ \ + ((x1) & (x4)) ^ ((x2) & (x6)) ^ ((x3) & (x4)) ^ ((x3) & (x5)) ^ \ + ((x3) & (x6)) ^ ((x4) & (x5)) ^ ((x4) & (x6)) ^ ((x0) & (x4)) ^ (x0) ) +#define F5(x6,x5,x4,x3,x2,x1,x0) ( ((x1) & (x4)) ^ ((x2) & (x5)) ^ ((x3) & (x6)) ^ \ + ((x0) & (x1) & (x2) & (x3)) ^ ((x0) & (x5)) ^ (x0) ) + +#define ROTR(x,n) (((x) >> (n)) | ((x) << (32 - (n)))) + + +/* {{{ PHP_3HAVALTransform + */ +static void PHP_3HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128]) +{ + php_hash_uint32 E[8]; + php_hash_uint32 x[32]; + int i; + + Decode(x, block, 128); + + for(i = 0; i < 8; i++) { + E[i] = state[i]; + } + + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F1(E[M1[i]],E[M0[i]],E[M3[i]],E[M5[i]],E[M6[i]],E[M2[i]],E[M4[i]]),7) + ROTR(E[M7[i]],11) + x[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F2(E[M4[i]],E[M2[i]],E[M1[i]],E[M0[i]],E[M5[i]],E[M3[i]],E[M6[i]]),7) + ROTR(E[M7[i]],11) + x[I2[i]] + K2[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F3(E[M6[i]],E[M1[i]],E[M2[i]],E[M3[i]],E[M4[i]],E[M5[i]],E[M0[i]]),7) + ROTR(E[M7[i]],11) + x[I3[i]] + K3[i]; + } + + /* Update digest */ + for(i = 0; i < 8; i++) { + state[i] += E[i]; + } + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_4HAVALTransform + */ +static void PHP_4HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128]) +{ + php_hash_uint32 E[8]; + php_hash_uint32 x[32]; + int i; + + Decode(x, block, 128); + + for(i = 0; i < 8; i++) { + E[i] = state[i]; + } + + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F1(E[M2[i]],E[M6[i]],E[M1[i]],E[M4[i]],E[M5[i]],E[M3[i]],E[M0[i]]),7) + ROTR(E[M7[i]],11) + x[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F2(E[M3[i]],E[M5[i]],E[M2[i]],E[M0[i]],E[M1[i]],E[M6[i]],E[M4[i]]),7) + ROTR(E[M7[i]],11) + x[I2[i]] + K2[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F3(E[M1[i]],E[M4[i]],E[M3[i]],E[M6[i]],E[M0[i]],E[M2[i]],E[M5[i]]),7) + ROTR(E[M7[i]],11) + x[I3[i]] + K3[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F4(E[M6[i]],E[M4[i]],E[M0[i]],E[M5[i]],E[M2[i]],E[M1[i]],E[M3[i]]),7) + ROTR(E[M7[i]],11) + x[I4[i]] + K4[i]; + } + + /* Update digest */ + for(i = 0; i < 8; i++) { + state[i] += E[i]; + } + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_5HAVALTransform + */ +static void PHP_5HAVALTransform(php_hash_uint32 state[8], const unsigned char block[128]) +{ + php_hash_uint32 E[8]; + php_hash_uint32 x[32]; + int i; + + Decode(x, block, 128); + + for(i = 0; i < 8; i++) { + E[i] = state[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F1(E[M3[i]],E[M4[i]],E[M1[i]],E[M0[i]],E[M5[i]],E[M2[i]],E[M6[i]]),7) + ROTR(E[M7[i]],11) + x[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F2(E[M6[i]],E[M2[i]],E[M1[i]],E[M0[i]],E[M3[i]],E[M4[i]],E[M5[i]]),7) + ROTR(E[M7[i]],11) + x[I2[i]] + K2[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F3(E[M2[i]],E[M6[i]],E[M0[i]],E[M4[i]],E[M3[i]],E[M1[i]],E[M5[i]]),7) + ROTR(E[M7[i]],11) + x[I3[i]] + K3[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F4(E[M1[i]],E[M5[i]],E[M3[i]],E[M2[i]],E[M0[i]],E[M4[i]],E[M6[i]]),7) + ROTR(E[M7[i]],11) + x[I4[i]] + K4[i]; + } + for(i = 0; i < 32; i++) { + E[7 - (i % 8)] = ROTR(F5(E[M2[i]],E[M5[i]],E[M0[i]],E[M6[i]],E[M4[i]],E[M3[i]],E[M1[i]]),7) + ROTR(E[M7[i]],11) + x[I5[i]] + K5[i]; + } + + /* Update digest */ + for(i = 0; i < 8; i++) { + state[i] += E[i]; + } + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +#define PHP_HASH_HAVAL_INIT(p,b) \ +php_hash_ops php_hash_##p##haval##b##_ops = { \ + (php_hash_init_func_t) PHP_##p##HAVAL##b##Init, \ + (php_hash_update_func_t) PHP_HAVALUpdate, \ + (php_hash_final_func_t) PHP_HAVAL##b##Final, \ + ((b) / 8), 128, sizeof(PHP_HAVAL_CTX) }; \ +PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *context) \ +{ int i; context->count[0] = context->count[1] = 0; \ + for(i = 0; i < 8; i++) context->state[i] = D0[i]; \ + context->passes = p; context->output = b; \ + context->Transform = PHP_##p##HAVALTransform; } + +PHP_HASH_HAVAL_INIT(3,128) +PHP_HASH_HAVAL_INIT(3,160) +PHP_HASH_HAVAL_INIT(3,192) +PHP_HASH_HAVAL_INIT(3,224) +PHP_HASH_HAVAL_INIT(3,256) + +PHP_HASH_HAVAL_INIT(4,128) +PHP_HASH_HAVAL_INIT(4,160) +PHP_HASH_HAVAL_INIT(4,192) +PHP_HASH_HAVAL_INIT(4,224) +PHP_HASH_HAVAL_INIT(4,256) + +PHP_HASH_HAVAL_INIT(5,128) +PHP_HASH_HAVAL_INIT(5,160) +PHP_HASH_HAVAL_INIT(5,192) +PHP_HASH_HAVAL_INIT(5,224) +PHP_HASH_HAVAL_INIT(5,256) + +/* {{{ PHP_HAVALUpdate + */ +PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 128 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x7F); + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 128 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + context->Transform(context->state, context->buffer); + + for (i = partLen; i + 127 < inputLen; i += 128) { + context->Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) &context->buffer[index], (unsigned char*) &input[i], inputLen - i); +} +/* }}} */ + +#define PHP_HASH_HAVAL_VERSION 0x01 + +/* {{{ PHP_HAVAL128Final + */ +PHP_HASH_API void PHP_HAVAL128Final(unsigned char *digest, PHP_HAVAL_CTX * context) +{ + unsigned char bits[10]; + unsigned int index, padLen; + + /* Version, Passes, and Digest Length */ + bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) | + ((context->passes & 0x07) << 3) | + ((context->output & 0x03) << 6); + bits[1] = (context->output >> 2); + + /* Save number of bits */ + Encode(bits + 2, context->count, 8); + + /* Pad out to 118 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 118) ? (118 - index) : (246 - index); + PHP_HAVALUpdate(context, PADDING, padLen); + + /* Append version, passes, digest length, and message length */ + PHP_HAVALUpdate(context, bits, 10); + + /* Store state in digest */ + context->state[3] += (context->state[7] & 0xFF000000) | + (context->state[6] & 0x00FF0000) | + (context->state[5] & 0x0000FF00) | + (context->state[4] & 0x000000FF); + + context->state[2] += (((context->state[7] & 0x00FF0000) | + (context->state[6] & 0x0000FF00) | + (context->state[5] & 0x000000FF)) << 8) | + ((context->state[4] & 0xFF000000) >> 24); + + context->state[1] += (((context->state[7] & 0x0000FF00) | + (context->state[6] & 0x000000FF)) << 16) | + (((context->state[5] & 0xFF000000) | + (context->state[4] & 0x00FF0000)) >> 16); + + context->state[0] += ((context->state[7] & 0x000000FF) << 24) | + (((context->state[6] & 0xFF000000) | + (context->state[5] & 0x00FF0000) | + (context->state[4] & 0x0000FF00)) >> 8); + + Encode(digest, context->state, 16); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ PHP_HAVAL160Final + */ +PHP_HASH_API void PHP_HAVAL160Final(unsigned char *digest, PHP_HAVAL_CTX * context) +{ + unsigned char bits[10]; + unsigned int index, padLen; + + /* Version, Passes, and Digest Length */ + bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) | + ((context->passes & 0x07) << 3) | + ((context->output & 0x03) << 6); + bits[1] = (context->output >> 2); + + /* Save number of bits */ + Encode(bits + 2, context->count, 8); + + /* Pad out to 118 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 118) ? (118 - index) : (246 - index); + PHP_HAVALUpdate(context, PADDING, padLen); + + /* Append version, passes, digest length, and message length */ + PHP_HAVALUpdate(context, bits, 10); + + /* Store state in digest */ + context->state[4] += ((context->state[7] & 0xFE000000) | + (context->state[6] & 0x01F80000) | + (context->state[5] & 0x0007F000)) >> 12; + + context->state[3] += ((context->state[7] & 0x01F80000) | + (context->state[6] & 0x0007F000) | + (context->state[5] & 0x00000FC0)) >> 6; + + context->state[2] += (context->state[7] & 0x0007F000) | + (context->state[6] & 0x00000FC0) | + (context->state[5] & 0x0000003F); + + context->state[1] += ROTR((context->state[7] & 0x00000FC0) | + (context->state[6] & 0x0000003F) | + (context->state[5] & 0xFE000000), 25); + + context->state[0] += ROTR((context->state[7] & 0x0000003F) | + (context->state[6] & 0xFE000000) | + (context->state[5] & 0x01F80000), 19); + + Encode(digest, context->state, 20); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ PHP_HAVAL192Final + */ +PHP_HASH_API void PHP_HAVAL192Final(unsigned char *digest, PHP_HAVAL_CTX * context) +{ + unsigned char bits[10]; + unsigned int index, padLen; + + /* Version, Passes, and Digest Length */ + bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) | + ((context->passes & 0x07) << 3) | + ((context->output & 0x03) << 6); + bits[1] = (context->output >> 2); + + /* Save number of bits */ + Encode(bits + 2, context->count, 8); + + /* Pad out to 118 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 118) ? (118 - index) : (246 - index); + PHP_HAVALUpdate(context, PADDING, padLen); + + /* Append version, passes, digest length, and message length */ + PHP_HAVALUpdate(context, bits, 10); + + /* Store state in digest */ + context->state[5] += ((context->state[7] & 0xFC000000) | (context->state[6] & 0x03E00000)) >> 21; + context->state[4] += ((context->state[7] & 0x03E00000) | (context->state[6] & 0x001F0000)) >> 16; + context->state[3] += ((context->state[7] & 0x001F0000) | (context->state[6] & 0x0000FC00)) >> 10; + context->state[2] += ((context->state[7] & 0x0000FC00) | (context->state[6] & 0x000003E0)) >> 5; + context->state[1] += (context->state[7] & 0x000003E0) | (context->state[6] & 0x0000001F); + context->state[0] += ROTR((context->state[7] & 0x0000001F) | (context->state[6] & 0xFC000000), 26); + Encode(digest, context->state, 24); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ PHP_HAVAL224Final + */ +PHP_HASH_API void PHP_HAVAL224Final(unsigned char *digest, PHP_HAVAL_CTX * context) +{ + unsigned char bits[10]; + unsigned int index, padLen; + + /* Version, Passes, and Digest Length */ + bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) | + ((context->passes & 0x07) << 3) | + ((context->output & 0x03) << 6); + bits[1] = (context->output >> 2); + + /* Save number of bits */ + Encode(bits + 2, context->count, 8); + + /* Pad out to 118 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 118) ? (118 - index) : (246 - index); + PHP_HAVALUpdate(context, PADDING, padLen); + + /* Append version, passes, digest length, and message length */ + PHP_HAVALUpdate(context, bits, 10); + + /* Store state in digest */ + context->state[6] += context->state[7] & 0x0000000F; + context->state[5] += (context->state[7] >> 4) & 0x0000001F; + context->state[4] += (context->state[7] >> 9) & 0x0000000F; + context->state[3] += (context->state[7] >> 13) & 0x0000001F; + context->state[2] += (context->state[7] >> 18) & 0x0000000F; + context->state[1] += (context->state[7] >> 22) & 0x0000001F; + context->state[0] += (context->state[7] >> 27) & 0x0000001F; + Encode(digest, context->state, 28); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ PHP_HAVAL256Final + */ +PHP_HASH_API void PHP_HAVAL256Final(unsigned char *digest, PHP_HAVAL_CTX * context) +{ + unsigned char bits[10]; + unsigned int index, padLen; + + /* Version, Passes, and Digest Length */ + bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) | + ((context->passes & 0x07) << 3) | + ((context->output & 0x03) << 6); + bits[1] = (context->output >> 2); + + /* Save number of bits */ + Encode(bits + 2, context->count, 8); + + /* Pad out to 118 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 118) ? (118 - index) : (246 - index); + PHP_HAVALUpdate(context, PADDING, padLen); + + /* Append version, passes, digest length, and message length */ + PHP_HAVALUpdate(context, bits, 10); + + /* Store state in digest */ + Encode(digest, context->state, 32); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c new file mode 100644 index 000000000..e33bfecf7 --- /dev/null +++ b/ext/hash/hash_md.c @@ -0,0 +1,589 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Taken from: ext/standard/md5.c | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_md.c,v 1.6.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_md.h" + +php_hash_ops php_hash_md5_ops = { + (php_hash_init_func_t) PHP_MD5Init, + (php_hash_update_func_t) PHP_MD5Update, + (php_hash_final_func_t) PHP_MD5Final, + 16, + 64, + sizeof(PHP_MD5_CTX) +}; + +php_hash_ops php_hash_md4_ops = { + (php_hash_init_func_t) PHP_MD4Init, + (php_hash_update_func_t) PHP_MD4Update, + (php_hash_final_func_t) PHP_MD4Final, + 16, + 64, + sizeof(PHP_MD4_CTX) +}; + +/* MD common stuff */ + +static unsigned char PADDING[64] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* {{{ Encode + Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void Encode(unsigned char *output, php_hash_uint32 *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char) (input[i] & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); + } +} +/* }}} */ + +/* {{{ Decode + Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is + a multiple of 4. + */ +static void Decode(php_hash_uint32 *output, const unsigned char *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) | + (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24); +} +/* }}} */ + +#ifdef PHP_HASH_MD5_NOT_IN_CORE + +/* MD5 */ + +PHP_HASH_API void make_digest(char *md5str, unsigned char *digest) +{ + php_hash_bin2hex(md5str, digest, 16); + md5str[32] = '\0'; +} + +/* {{{ proto string md5(string str, [ bool raw_output]) + Calculate the md5 hash of a string */ +PHP_NAMED_FUNCTION(php_if_md5) +{ + char *arg; + int arg_len; + zend_bool raw_output = 0; + char md5str[33]; + PHP_MD5_CTX context; + unsigned char digest[16]; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + return; + } + + md5str[0] = '\0'; + PHP_MD5Init(&context); + PHP_MD5Update(&context, arg, arg_len); + PHP_MD5Final(digest, &context); + if (raw_output) { + RETURN_STRINGL(digest, 16, 1); + } else { + make_digest(md5str, digest); + RETVAL_STRING(md5str, 1); + } + +} +/* }}} */ + +/* {{{ proto string md5_file(string filename [, bool raw_output]) + Calculate the md5 hash of given filename */ +PHP_NAMED_FUNCTION(php_if_md5_file) +{ + char *arg; + int arg_len; + zend_bool raw_output = 0; + char md5str[33]; + unsigned char buf[1024]; + unsigned char digest[16]; + PHP_MD5_CTX context; + int n; + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + return; + } + + stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); + if (!stream) { + RETURN_FALSE; + } + + PHP_MD5Init(&context); + + while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + PHP_MD5Update(&context, buf, n); + } + + PHP_MD5Final(digest, &context); + + php_stream_close(stream); + + if (n<0) { + RETURN_FALSE; + } + + if (raw_output) { + RETURN_STRINGL(digest, 16, 1); + } else { + make_digest(md5str, digest); + RETVAL_STRING(md5str, 1); + } +} +/* }}} */ + +/* + * The remaining code is the reference MD5 code (md5c.c) from rfc1321 + */ +/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. + */ + +/* Constants for MD5Transform routine. + */ + +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + +static void MD5Transform(php_hash_uint32[4], const unsigned char[64]); + +/* F, G, H and I are basic MD5 functions. + */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. + Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (php_hash_uint32)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +/* {{{ PHP_MD5Init + * MD5 initialization. Begins an MD5 operation, writing a new context. + */ +PHP_HASH_API void PHP_MD5Init(PHP_MD5_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} +/* }}} */ + +/* {{{ PHP_MD5Update + MD5 block update operation. Continues an MD5 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input, + unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) + < ((php_hash_uint32) inputLen << 3)) + context->count[1]++; + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy + ((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + MD5Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform(context->state, &input[i]); + + index = 0; + } else + i = 0; + + /* Buffer remaining input */ + memcpy + ((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], + inputLen - i); +} +/* }}} */ + +/* {{{ PHP_MD5Final + MD5 finalization. Ends an MD5 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + Encode(bits, context->count, 8); + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_MD5Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_MD5Update(context, bits, 8); + + /* Store state in digest */ + Encode(digest, context->state, 16); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ MD5Transform + * MD5 basic transformation. Transforms state based on block. + */ +static void MD5Transform(state, block) +php_hash_uint32 state[4]; +const unsigned char block[64]; +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + Decode(x, block, 64); + + /* Round 1 */ + FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ + FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */ + FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */ + FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */ + FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */ + FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */ + FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */ + FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */ + FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */ + FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */ + FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG(a, b, c, d, x[1], S21, 0xf61e2562); /* 17 */ + GG(d, a, b, c, x[6], S22, 0xc040b340); /* 18 */ + GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG(b, c, d, a, x[0], S24, 0xe9b6c7aa); /* 20 */ + GG(a, b, c, d, x[5], S21, 0xd62f105d); /* 21 */ + GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG(b, c, d, a, x[4], S24, 0xe7d3fbc8); /* 24 */ + GG(a, b, c, d, x[9], S21, 0x21e1cde6); /* 25 */ + GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG(c, d, a, b, x[3], S23, 0xf4d50d87); /* 27 */ + GG(b, c, d, a, x[8], S24, 0x455a14ed); /* 28 */ + GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG(d, a, b, c, x[2], S22, 0xfcefa3f8); /* 30 */ + GG(c, d, a, b, x[7], S23, 0x676f02d9); /* 31 */ + GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH(a, b, c, d, x[5], S31, 0xfffa3942); /* 33 */ + HH(d, a, b, c, x[8], S32, 0x8771f681); /* 34 */ + HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH(a, b, c, d, x[1], S31, 0xa4beea44); /* 37 */ + HH(d, a, b, c, x[4], S32, 0x4bdecfa9); /* 38 */ + HH(c, d, a, b, x[7], S33, 0xf6bb4b60); /* 39 */ + HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH(d, a, b, c, x[0], S32, 0xeaa127fa); /* 42 */ + HH(c, d, a, b, x[3], S33, 0xd4ef3085); /* 43 */ + HH(b, c, d, a, x[6], S34, 0x4881d05); /* 44 */ + HH(a, b, c, d, x[9], S31, 0xd9d4d039); /* 45 */ + HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH(b, c, d, a, x[2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II(a, b, c, d, x[0], S41, 0xf4292244); /* 49 */ + II(d, a, b, c, x[7], S42, 0x432aff97); /* 50 */ + II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II(b, c, d, a, x[5], S44, 0xfc93a039); /* 52 */ + II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II(d, a, b, c, x[3], S42, 0x8f0ccc92); /* 54 */ + II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II(b, c, d, a, x[1], S44, 0x85845dd1); /* 56 */ + II(a, b, c, d, x[8], S41, 0x6fa87e4f); /* 57 */ + II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II(c, d, a, b, x[6], S43, 0xa3014314); /* 59 */ + II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II(a, b, c, d, x[4], S41, 0xf7537e82); /* 61 */ + II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II(c, d, a, b, x[2], S43, 0x2ad7d2bb); /* 63 */ + II(b, c, d, a, x[9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +#endif /* PHP_HASH_MD5_NOT_IN_CORE */ + +/* MD4 */ + +#define MD4_F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) +#define MD4_G(x,y,z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) +#define MD4_H(x,y,z) ((x) ^ (y) ^ (z)) + +#define ROTL32(s,v) (((v) << (s)) | ((v) >> (32 - (s)))) + +#define MD4_R1(a,b,c,d,k,s) a = ROTL32(s, a + MD4_F(b,c,d) + x[k]) +#define MD4_R2(a,b,c,d,k,s) a = ROTL32(s, a + MD4_G(b,c,d) + x[k] + 0x5A827999) +#define MD4_R3(a,b,c,d,k,s) a = ROTL32(s, a + MD4_H(b,c,d) + x[k] + 0x6ED9EBA1) + +static void MD4Transform(php_hash_uint32 state[4], const unsigned char block[64]) +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + Decode(x, block, 64); + + /* Round 1 */ + MD4_R1(a,b,c,d, 0, 3); + MD4_R1(d,a,b,c, 1, 7); + MD4_R1(c,d,a,b, 2,11); + MD4_R1(b,c,d,a, 3,19); + MD4_R1(a,b,c,d, 4, 3); + MD4_R1(d,a,b,c, 5, 7); + MD4_R1(c,d,a,b, 6,11); + MD4_R1(b,c,d,a, 7,19); + MD4_R1(a,b,c,d, 8, 3); + MD4_R1(d,a,b,c, 9, 7); + MD4_R1(c,d,a,b,10,11); + MD4_R1(b,c,d,a,11,19); + MD4_R1(a,b,c,d,12, 3); + MD4_R1(d,a,b,c,13, 7); + MD4_R1(c,d,a,b,14,11); + MD4_R1(b,c,d,a,15,19); + + /* Round 2 */ + MD4_R2(a,b,c,d, 0, 3); + MD4_R2(d,a,b,c, 4, 5); + MD4_R2(c,d,a,b, 8, 9); + MD4_R2(b,c,d,a,12,13); + MD4_R2(a,b,c,d, 1, 3); + MD4_R2(d,a,b,c, 5, 5); + MD4_R2(c,d,a,b, 9, 9); + MD4_R2(b,c,d,a,13,13); + MD4_R2(a,b,c,d, 2, 3); + MD4_R2(d,a,b,c, 6, 5); + MD4_R2(c,d,a,b,10, 9); + MD4_R2(b,c,d,a,14,13); + MD4_R2(a,b,c,d, 3, 3); + MD4_R2(d,a,b,c, 7, 5); + MD4_R2(c,d,a,b,11, 9); + MD4_R2(b,c,d,a,15,13); + + /* Round 3 */ + MD4_R3(a,b,c,d, 0, 3); + MD4_R3(d,a,b,c, 8, 9); + MD4_R3(c,d,a,b, 4,11); + MD4_R3(b,c,d,a,12,15); + MD4_R3(a,b,c,d, 2, 3); + MD4_R3(d,a,b,c,10, 9); + MD4_R3(c,d,a,b, 6,11); + MD4_R3(b,c,d,a,14,15); + MD4_R3(a,b,c,d, 1, 3); + MD4_R3(d,a,b,c, 9, 9); + MD4_R3(c,d,a,b, 5,11); + MD4_R3(b,c,d,a,13,15); + MD4_R3(a,b,c,d, 3, 3); + MD4_R3(d,a,b,c,11, 9); + MD4_R3(c,d,a,b, 7,11); + MD4_R3(b,c,d,a,15,15); + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; +} + +/* {{{ PHP_MD4Update + MD4 block update operation. Continues an MD5 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) + < ((php_hash_uint32) inputLen << 3)) + context->count[1]++; + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + MD4Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) { + MD4Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +/* {{{ PHP_MD4Final + MD4 finalization. Ends an MD4 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_MD4Final(unsigned char digest[16], PHP_MD4_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + Encode(bits, context->count, 8); + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_MD4Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_MD4Update(context, bits, 8); + + /* Store state in digest */ + Encode(digest, context->state, 16); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_ripemd.c b/ext/hash/hash_ripemd.c new file mode 100644 index 000000000..74861f2aa --- /dev/null +++ b/ext/hash/hash_ripemd.c @@ -0,0 +1,433 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_ripemd.c,v 1.5.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +/* Heavily borrowed from md5.c & sha1.c of PHP archival fame + Note that ripemd laughs in the face of logic and uses + little endian byte ordering */ + +#include "php_hash.h" +#include "php_hash_ripemd.h" + +php_hash_ops php_hash_ripemd128_ops = { + (php_hash_init_func_t) PHP_RIPEMD128Init, + (php_hash_update_func_t) PHP_RIPEMD128Update, + (php_hash_final_func_t) PHP_RIPEMD128Final, + 16, + 64, + sizeof(PHP_RIPEMD128_CTX) +}; + +php_hash_ops php_hash_ripemd160_ops = { + (php_hash_init_func_t) PHP_RIPEMD160Init, + (php_hash_update_func_t) PHP_RIPEMD160Update, + (php_hash_final_func_t) PHP_RIPEMD160Final, + 20, + 64, + sizeof(PHP_RIPEMD160_CTX) +}; + +/* {{{ PHP_RIPEMD128Init + * ripemd128 initialization. Begins a ripemd128 operation, writing a new context. + */ +PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; +} +/* }}} */ + +/* {{{ PHP_RIPEMD160Init + * ripemd128 initialization. Begins a ripemd128 operation, writing a new context. + */ +PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; + context->state[4] = 0xC3D2E1F0; +} +/* }}} */ + +/* Basic ripemd function */ +#define F0(x,y,z) ((x) ^ (y) ^ (z)) +#define F1(x,y,z) (((x) & (y)) | ((~(x)) & (z))) +#define F2(x,y,z) (((x) | (~(y))) ^ (z)) +#define F3(x,y,z) (((x) & (z)) | ((y) & (~(z)))) +#define F4(x,y,z) ((x) ^ ((y) | (~(z)))) + +static php_hash_uint32 K_values[5] = { 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E }; +static php_hash_uint32 KK_values[4] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x00000000 }; +static php_hash_uint32 KK160_values[5] = { 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000 }; + +#define K(n) K_values[ (n) >> 4] +#define KK(n) KK_values[(n) >> 4] +#define KK160(n) KK160_values[(n) >> 4] + +static unsigned char R[80] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 }; + +static unsigned char RR[80] = { + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 }; + +static unsigned char S[80] = { + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 }; + +static unsigned char SS[80] = { + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 }; + +#define ROLS(j, x) (((x) << S[j]) | ((x) >> (32 - S[j]))) +#define ROLSS(j, x) (((x) << SS[j]) | ((x) >> (32 - SS[j]))) +#define ROL(n, x) (((x) << n) | ((x) >> (32 - n))) + +/* {{{ RIPEMDDecode + Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is + a multiple of 4. + */ +static void RIPEMDDecode(php_hash_uint32 *output, const unsigned char *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((php_hash_uint32) input[j + 0]) | (((php_hash_uint32) input[j + 1]) << 8) | + (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24); +} +/* }}} */ + +/* {{{ RIPEMD128Transform + * ripemd128 basic transformation. Transforms state based on block. + */ +static void RIPEMD128Transform(php_hash_uint32 state[4], const unsigned char block[64]) +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3]; + php_hash_uint32 aa = state[0], bb = state[1], cc = state[2], dd = state[3]; + php_hash_uint32 tmp, x[16]; + int j; + + RIPEMDDecode(x, block, 64); + + for(j = 0; j < 16; j++) { + tmp = ROLS( j, a + F0(b, c, d) + x[R[j]] + K(j)); + a = d; d = c; c = b; b = tmp; + tmp = ROLSS(j, aa + F3(bb, cc, dd) + x[RR[j]] + KK(j)); + aa = dd; dd = cc; cc = bb; bb = tmp; + } + + for(j = 16; j < 32; j++) { + tmp = ROLS( j, a + F1(b, c, d) + x[R[j]] + K(j)); + a = d; d = c; c = b; b = tmp; + tmp = ROLSS(j, aa + F2(bb, cc, dd) + x[RR[j]] + KK(j)); + aa = dd; dd = cc; cc = bb; bb = tmp; + } + + for(j = 32; j < 48; j++) { + tmp = ROLS( j, a + F2(b, c, d) + x[R[j]] + K(j)); + a = d; d = c; c = b; b = tmp; + tmp = ROLSS(j, aa + F1(bb, cc, dd) + x[RR[j]] + KK(j)); + aa = dd; dd = cc; cc = bb; bb = tmp; + } + + for(j = 48; j < 64; j++) { + tmp = ROLS( j, a + F3(b, c, d) + x[R[j]] + K(j)); + a = d; d = c; c = b; b = tmp; + tmp = ROLSS(j, aa + F0(bb, cc, dd) + x[RR[j]] + KK(j)); + aa = dd; dd = cc; cc = bb; bb = tmp; + } + + tmp = state[1] + c + dd; + state[1] = state[2] + d + aa; + state[2] = state[3] + a + bb; + state[3] = state[0] + b + cc; + state[0] = tmp; + + tmp = 0; + memset(x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_RIPEMD128Update + ripemd128 block update operation. Continues a ripemd128 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + RIPEMD128Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) { + RIPEMD128Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +/* {{{ RIPEMD160Transform + * ripemd160 basic transformation. Transforms state based on block. + */ +static void RIPEMD160Transform(php_hash_uint32 state[5], const unsigned char block[64]) +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3], e = state[4]; + php_hash_uint32 aa = state[0], bb = state[1], cc = state[2], dd = state[3], ee = state[4]; + php_hash_uint32 tmp, x[16]; + int j; + + RIPEMDDecode(x, block, 64); + + for(j = 0; j < 16; j++) { + tmp = ROLS( j, a + F0(b, c, d) + x[R[j]] + K(j)) + e; + a = e; e = d; d = ROL(10, c); c = b; b = tmp; + tmp = ROLSS(j, aa + F4(bb, cc, dd) + x[RR[j]] + KK160(j)) + ee; + aa = ee; ee = dd; dd = ROL(10, cc); cc = bb; bb = tmp; + } + + for(j = 16; j < 32; j++) { + tmp = ROLS( j, a + F1(b, c, d) + x[R[j]] + K(j)) + e; + a = e; e = d; d = ROL(10, c); c = b; b = tmp; + tmp = ROLSS(j, aa + F3(bb, cc, dd) + x[RR[j]] + KK160(j)) + ee; + aa = ee; ee = dd; dd = ROL(10, cc); cc = bb; bb = tmp; + } + + for(j = 32; j < 48; j++) { + tmp = ROLS( j, a + F2(b, c, d) + x[R[j]] + K(j)) + e; + a = e; e = d; d = ROL(10, c); c = b; b = tmp; + tmp = ROLSS(j, aa + F2(bb, cc, dd) + x[RR[j]] + KK160(j)) + ee; + aa = ee; ee = dd; dd = ROL(10, cc); cc = bb; bb = tmp; + } + + for(j = 48; j < 64; j++) { + tmp = ROLS( j, a + F3(b, c, d) + x[R[j]] + K(j)) + e; + a = e; e = d; d = ROL(10, c); c = b; b = tmp; + tmp = ROLSS(j, aa + F1(bb, cc, dd) + x[RR[j]] + KK160(j)) + ee; + aa = ee; ee = dd; dd = ROL(10, cc); cc = bb; bb = tmp; + } + + for(j = 64; j < 80; j++) { + tmp = ROLS( j, a + F4(b, c, d) + x[R[j]] + K(j)) + e; + a = e; e = d; d = ROL(10, c); c = b; b = tmp; + tmp = ROLSS(j, aa + F0(bb, cc, dd) + x[RR[j]] + KK160(j)) + ee; + aa = ee; ee = dd; dd = ROL(10, cc); cc = bb; bb = tmp; + } + + tmp = state[1] + c + dd; + state[1] = state[2] + d + ee; + state[2] = state[3] + e + aa; + state[3] = state[4] + a + bb; + state[4] = state[0] + b + cc; + state[0] = tmp; + + tmp = 0; + memset(x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_RIPEMD160Update + ripemd160 block update operation. Continues a ripemd128 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + RIPEMD160Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) { + RIPEMD160Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +static unsigned char PADDING[64] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* {{{ RIPEMDEncode + Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void RIPEMDEncode(unsigned char *output, php_hash_uint32 *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 0] = (unsigned char) (input[i] & 0xff); + } +} +/* }}} */ + +/* {{{ PHP_RIPEMD128Final + ripemd128 finalization. Ends a ripemd128 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_RIPEMD128Final(unsigned char digest[16], PHP_RIPEMD128_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[0] = (unsigned char) (context->count[0] & 0xFF); + bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); + bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); + bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); + bits[4] = (unsigned char) (context->count[1] & 0xFF); + bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); + bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); + bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_RIPEMD128Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_RIPEMD128Update(context, bits, 8); + + /* Store state in digest */ + RIPEMDEncode(digest, context->state, 16); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* {{{ PHP_RIPEMD160Final + ripemd160 finalization. Ends a ripemd160 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_RIPEMD160Final(unsigned char digest[20], PHP_RIPEMD160_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[0] = (unsigned char) (context->count[0] & 0xFF); + bits[1] = (unsigned char) ((context->count[0] >> 8) & 0xFF); + bits[2] = (unsigned char) ((context->count[0] >> 16) & 0xFF); + bits[3] = (unsigned char) ((context->count[0] >> 24) & 0xFF); + bits[4] = (unsigned char) (context->count[1] & 0xFF); + bits[5] = (unsigned char) ((context->count[1] >> 8) & 0xFF); + bits[6] = (unsigned char) ((context->count[1] >> 16) & 0xFF); + bits[7] = (unsigned char) ((context->count[1] >> 24) & 0xFF); + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_RIPEMD160Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_RIPEMD160Update(context, bits, 8); + + /* Store state in digest */ + RIPEMDEncode(digest, context->state, 20); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_salsa.c b/ext/hash/hash_salsa.c new file mode 100644 index 000000000..06d012bc2 --- /dev/null +++ b/ext/hash/hash_salsa.c @@ -0,0 +1,222 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_salsa.c,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_salsa.h" + +#define R(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) + +/* {{{ Salsa10 + + The 64-byte input x to Salsa10 is viewed in little-endian form as 16 integers + x0, x1, x2, ..., x15 in {0,1,...,2^32-1}. These 16 integers are fed through + 320 invertible modifications, where each modification changes one integer. + The modifications involve, overall, + + * 10 additions of constants modulo 2^32; + * 320 more additions modulo 2^32; + * 80 ``or'' operations; + * 240 ``xor'' operations; and + * 320 constant-distance rotations. + + The resulting 16 integers are added to the original x0, x1, x2, ..., x15 + respectively modulo 2^32, producing, in little-endian form, the 64-byte output + Salsa10(x). + + D.J.Bernstein +*/ +static void Salsa10(php_hash_uint32 x[16], php_hash_uint32 in[16]) +{ + int i; + + for (i = 10; i > 0; --i) { + x[ 4] ^= R(x[ 0]+x[12], 6); x[ 8] ^= R(x[ 4]+x[ 0],17); + x[12] += R(x[ 8]|x[ 4],16); x[ 0] += R(x[12]^x[ 8], 5); + x[ 9] += R(x[ 5]|x[ 1], 8); x[13] += R(x[ 9]|x[ 5], 7); + x[ 1] ^= R(x[13]+x[ 9],17); x[ 5] += R(x[ 1]^x[13],12); + x[14] ^= R(x[10]+x[ 6], 7); x[ 2] += R(x[14]^x[10],15); + x[ 6] ^= R(x[ 2]+x[14],13); x[10] ^= R(x[ 6]+x[ 2],15); + x[ 3] += R(x[15]|x[11],20); x[ 7] ^= R(x[ 3]+x[15],16); + x[11] += R(x[ 7]^x[ 3], 7); x[15] += R(x[11]^x[ 7], 8); + x[ 1] += R(x[ 0]|x[ 3], 8)^i;x[ 2] ^= R(x[ 1]+x[ 0],14); + x[ 3] ^= R(x[ 2]+x[ 1], 6); x[ 0] += R(x[ 3]^x[ 2],18); + x[ 6] += R(x[ 5]^x[ 4], 8); x[ 7] += R(x[ 6]^x[ 5],12); + x[ 4] += R(x[ 7]|x[ 6],13); x[ 5] ^= R(x[ 4]+x[ 7],15); + x[11] ^= R(x[10]+x[ 9],18); x[ 8] += R(x[11]^x[10],11); + x[ 9] ^= R(x[ 8]+x[11], 8); x[10] += R(x[ 9]|x[ 8], 6); + x[12] += R(x[15]^x[14],17); x[13] ^= R(x[12]+x[15],15); + x[14] += R(x[13]|x[12], 9); x[15] += R(x[14]^x[13], 7); + } + for (i = 0; i < 16; ++i) { + x[i] += in[i]; + } +} +/* }}} */ + +/* {{{ Salsa20 + + The 64-byte input x to Salsa20 is viewed in little-endian form as 16 words + x0, x1, x2, ..., x15 in {0,1,...,2^32-1}. These 16 words are fed through 320 + invertible modifications, where each modification changes one word. The + resulting 16 words are added to the original x0, x1, x2, ..., x15 respectively + modulo 2^32, producing, in little-endian form, the 64-byte output Salsa20(x). + + Each modification involves xor'ing into one word a rotated version of the sum + of two other words modulo 2^32. Thus the 320 modifications involve, overall, + 320 additions, 320 xor's, and 320 rotations. The rotations are all by constant + distances. + + The entire series of modifications is a series of 10 identical double-rounds. + Each double-round is a series of 2 rounds. Each round is a set of 4 parallel + quarter-rounds. Each quarter-round modifies 4 words. + + D.J.Bernstein +*/ +static void Salsa20(php_hash_uint32 x[16], php_hash_uint32 in[16]) +{ + int i; + + for (i = 20; i > 0; i -= 2) { + x[ 4] ^= R(x[ 0]+x[12], 7); x[ 8] ^= R(x[ 4]+x[ 0], 9); + x[12] ^= R(x[ 8]+x[ 4],13); x[ 0] ^= R(x[12]+x[ 8],18); + x[ 9] ^= R(x[ 5]+x[ 1], 7); x[13] ^= R(x[ 9]+x[ 5], 9); + x[ 1] ^= R(x[13]+x[ 9],13); x[ 5] ^= R(x[ 1]+x[13],18); + x[14] ^= R(x[10]+x[ 6], 7); x[ 2] ^= R(x[14]+x[10], 9); + x[ 6] ^= R(x[ 2]+x[14],13); x[10] ^= R(x[ 6]+x[ 2],18); + x[ 3] ^= R(x[15]+x[11], 7); x[ 7] ^= R(x[ 3]+x[15], 9); + x[11] ^= R(x[ 7]+x[ 3],13); x[15] ^= R(x[11]+x[ 7],18); + x[ 1] ^= R(x[ 0]+x[ 3], 7); x[ 2] ^= R(x[ 1]+x[ 0], 9); + x[ 3] ^= R(x[ 2]+x[ 1],13); x[ 0] ^= R(x[ 3]+x[ 2],18); + x[ 6] ^= R(x[ 5]+x[ 4], 7); x[ 7] ^= R(x[ 6]+x[ 5], 9); + x[ 4] ^= R(x[ 7]+x[ 6],13); x[ 5] ^= R(x[ 4]+x[ 7],18); + x[11] ^= R(x[10]+x[ 9], 7); x[ 8] ^= R(x[11]+x[10], 9); + x[ 9] ^= R(x[ 8]+x[11],13); x[10] ^= R(x[ 9]+x[ 8],18); + x[12] ^= R(x[15]+x[14], 7); x[13] ^= R(x[12]+x[15], 9); + x[14] ^= R(x[13]+x[12],13); x[15] ^= R(x[14]+x[13],18); + } + for (i = 0; i < 16; ++i) { + x[i] += in[i]; + } +} +/* }}} */ + +static inline void SalsaTransform(PHP_SALSA_CTX *context, const unsigned char input[64]) +{ + php_hash_uint32 i, j, a[16]; + +#if 0 + fprintf(stderr, "> INPUT: %.*s\n", 64, input); +#endif + + for (i = 0, j = 0; j < 64; i++, j += 4) { + a[i] = ((php_hash_uint32) input[j + 3]) | (((php_hash_uint32) input[j + 2]) << 8) | + (((php_hash_uint32) input[j + 1]) << 16) | (((php_hash_uint32) input[j]) << 24); + } + + if (!context->init) { + memcpy(context->state, a, sizeof(a)); + context->init = 1; + } + + context->Transform(context->state, a); + memset(a, 0, sizeof(a)); +} + +PHP_HASH_API void PHP_SALSA10Init(PHP_SALSA_CTX *context) +{ + memset(context, 0, sizeof(*context)); + context->Transform = Salsa10; +} + +PHP_HASH_API void PHP_SALSA20Init(PHP_SALSA_CTX *context) +{ + memset(context, 0, sizeof(*context)); + context->Transform = Salsa20; +} + +PHP_HASH_API void PHP_SALSAUpdate(PHP_SALSA_CTX *context, const unsigned char *input, size_t len) +{ + if (context->length + len < 64) { + memcpy(&context->buffer[context->length], input, len); + context->length += len; + } else { + size_t i = 0, r = (context->length + len) % 64; + + if (context->length) { + i = 64 - context->length; + memcpy(&context->buffer[context->length], input, i); + SalsaTransform(context, context->buffer); + memset(context->buffer, 0, 64); + } + + for (; i + 64 <= len; i += 64) { + SalsaTransform(context, input + i); + } + + memcpy(context->buffer, input + i, r); + context->length = r; + } +} + +PHP_HASH_API void PHP_SALSAFinal(unsigned char digest[64], PHP_SALSA_CTX *context) +{ + php_hash_uint32 i, j; + + if (context->length) { + SalsaTransform(context, context->buffer); + } + + for (i = 0, j = 0; j < 64; i++, j += 4) { + digest[j] = (unsigned char) ((context->state[i] >> 24) & 0xff); + digest[j + 1] = (unsigned char) ((context->state[i] >> 16) & 0xff); + digest[j + 2] = (unsigned char) ((context->state[i] >> 8) & 0xff); + digest[j + 3] = (unsigned char) (context->state[i] & 0xff); + } + + memset(context, 0, sizeof(*context)); +} + +php_hash_ops php_hash_salsa10_ops = { + (php_hash_init_func_t) PHP_SALSA10Init, + (php_hash_update_func_t) PHP_SALSAUpdate, + (php_hash_final_func_t) PHP_SALSAFinal, + 64, + 64, + sizeof(PHP_SALSA_CTX) +}; + +php_hash_ops php_hash_salsa20_ops = { + (php_hash_init_func_t) PHP_SALSA20Init, + (php_hash_update_func_t) PHP_SALSAUpdate, + (php_hash_final_func_t) PHP_SALSAFinal, + 64, + 64, + sizeof(PHP_SALSA_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c new file mode 100644 index 000000000..fbd2f1107 --- /dev/null +++ b/ext/hash/hash_sha.c @@ -0,0 +1,934 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Steffan Esser | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_sha.c,v 1.10.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_sha.h" + +static unsigned char PADDING[128] = +{ + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* {{{ SHAEncode32 + Encodes input (php_hash_uint32) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void SHAEncode32(unsigned char *output, php_hash_uint32 *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char) ((input[i] >> 24) & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 3] = (unsigned char) (input[i] & 0xff); + } +} +/* }}} */ + + +/* {{{ SHADecode32 + Decodes input (unsigned char) into output (php_hash_uint32). Assumes len is + a multiple of 4. + */ +static void SHADecode32(php_hash_uint32 *output, const unsigned char *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((php_hash_uint32) input[j + 3]) | (((php_hash_uint32) input[j + 2]) << 8) | + (((php_hash_uint32) input[j + 1]) << 16) | (((php_hash_uint32) input[j]) << 24); +} +/* }}} */ + +php_hash_ops php_hash_sha1_ops = { + (php_hash_init_func_t) PHP_SHA1Init, + (php_hash_update_func_t) PHP_SHA1Update, + (php_hash_final_func_t) PHP_SHA1Final, + 20, + 64, + sizeof(PHP_SHA1_CTX) +}; + +#ifdef PHP_HASH_SHA1_NOT_IN_CORE + +PHP_HASH_API void make_sha1_digest(char *sha1str, unsigned char *digest) +{ + php_hash_bin2hex(sha1str, digest, 20); + sha1str[40] = '\0'; +} + +/* {{{ proto string sha1(string str [, bool raw_output]) + Calculate the sha1 hash of a string */ +PHP_FUNCTION(sha1) +{ + char *arg; + int arg_len; + zend_bool raw_output = 0; + char sha1str[41]; + PHP_SHA1_CTX context; + unsigned char digest[20]; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + return; + } + + sha1str[0] = '\0'; + PHP_SHA1Init(&context); + PHP_SHA1Update(&context, arg, arg_len); + PHP_SHA1Final(digest, &context); + if (raw_output) { + RETURN_STRINGL(digest, 20, 1); + } else { + make_sha1_digest(sha1str, digest); + RETVAL_STRING(sha1str, 1); + } + +} + +/* }}} */ + +/* {{{ proto string sha1_file(string filename [, bool raw_output]) + Calculate the sha1 hash of given filename */ +PHP_FUNCTION(sha1_file) +{ + char *arg; + int arg_len; + zend_bool raw_output = 0; + char sha1str[41]; + unsigned char buf[1024]; + unsigned char digest[20]; + PHP_SHA1_CTX context; + int n; + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + return; + } + + stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL); + if (!stream) { + RETURN_FALSE; + } + + PHP_SHA1Init(&context); + + while ((n = php_stream_read(stream, buf, sizeof(buf))) > 0) { + PHP_SHA1Update(&context, buf, n); + } + + PHP_SHA1Final(digest, &context); + + php_stream_close(stream); + + if (n<0) { + RETURN_FALSE; + } + + if (raw_output) { + RETURN_STRINGL(digest, 20, 1); + } else { + make_sha1_digest(sha1str, digest); + RETVAL_STRING(sha1str, 1); + } +} +/* }}} */ + +/* F, G, H and I are basic SHA1 functions. + */ +#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) +#define G(x, y, z) ((x) ^ (y) ^ (z)) +#define H(x, y, z) (((x) & (y)) | ((z) & ((x) | (y)))) +#define I(x, y, z) ((x) ^ (y) ^ (z)) + +/* ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* W[i] + */ +#define W(i) ( tmp=x[(i-3)&15]^x[(i-8)&15]^x[(i-14)&15]^x[i&15], \ + (x[i&15]=ROTATE_LEFT(tmp, 1)) ) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. + */ +#define FF(a, b, c, d, e, w) { \ + (e) += F ((b), (c), (d)) + (w) + (php_hash_uint32)(0x5A827999); \ + (e) += ROTATE_LEFT ((a), 5); \ + (b) = ROTATE_LEFT((b), 30); \ + } +#define GG(a, b, c, d, e, w) { \ + (e) += G ((b), (c), (d)) + (w) + (php_hash_uint32)(0x6ED9EBA1); \ + (e) += ROTATE_LEFT ((a), 5); \ + (b) = ROTATE_LEFT((b), 30); \ + } +#define HH(a, b, c, d, e, w) { \ + (e) += H ((b), (c), (d)) + (w) + (php_hash_uint32)(0x8F1BBCDC); \ + (e) += ROTATE_LEFT ((a), 5); \ + (b) = ROTATE_LEFT((b), 30); \ + } +#define II(a, b, c, d, e, w) { \ + (e) += I ((b), (c), (d)) + (w) + (php_hash_uint32)(0xCA62C1D6); \ + (e) += ROTATE_LEFT ((a), 5); \ + (b) = ROTATE_LEFT((b), 30); \ + } + + +/* {{{ PHP_SHA1Init + * SHA1 initialization. Begins an SHA1 operation, writing a new context. + */ +PHP_HASH_API void PHP_SHA1Init(PHP_SHA1_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; + context->state[4] = 0xc3d2e1f0; +} +/* }}} */ + +/* {{{ SHA1Transform + * SHA1 basic transformation. Transforms state based on block. + */ +static void SHA1Transform(php_hash_uint32 state[5], const unsigned char block[64]) +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2]; + php_hash_uint32 d = state[3], e = state[4], x[16], tmp; + + SHADecode32(x, block, 64); + + /* Round 1 */ + FF(a, b, c, d, e, x[0]); /* 1 */ + FF(e, a, b, c, d, x[1]); /* 2 */ + FF(d, e, a, b, c, x[2]); /* 3 */ + FF(c, d, e, a, b, x[3]); /* 4 */ + FF(b, c, d, e, a, x[4]); /* 5 */ + FF(a, b, c, d, e, x[5]); /* 6 */ + FF(e, a, b, c, d, x[6]); /* 7 */ + FF(d, e, a, b, c, x[7]); /* 8 */ + FF(c, d, e, a, b, x[8]); /* 9 */ + FF(b, c, d, e, a, x[9]); /* 10 */ + FF(a, b, c, d, e, x[10]); /* 11 */ + FF(e, a, b, c, d, x[11]); /* 12 */ + FF(d, e, a, b, c, x[12]); /* 13 */ + FF(c, d, e, a, b, x[13]); /* 14 */ + FF(b, c, d, e, a, x[14]); /* 15 */ + FF(a, b, c, d, e, x[15]); /* 16 */ + FF(e, a, b, c, d, W(16)); /* 17 */ + FF(d, e, a, b, c, W(17)); /* 18 */ + FF(c, d, e, a, b, W(18)); /* 19 */ + FF(b, c, d, e, a, W(19)); /* 20 */ + + /* Round 2 */ + GG(a, b, c, d, e, W(20)); /* 21 */ + GG(e, a, b, c, d, W(21)); /* 22 */ + GG(d, e, a, b, c, W(22)); /* 23 */ + GG(c, d, e, a, b, W(23)); /* 24 */ + GG(b, c, d, e, a, W(24)); /* 25 */ + GG(a, b, c, d, e, W(25)); /* 26 */ + GG(e, a, b, c, d, W(26)); /* 27 */ + GG(d, e, a, b, c, W(27)); /* 28 */ + GG(c, d, e, a, b, W(28)); /* 29 */ + GG(b, c, d, e, a, W(29)); /* 30 */ + GG(a, b, c, d, e, W(30)); /* 31 */ + GG(e, a, b, c, d, W(31)); /* 32 */ + GG(d, e, a, b, c, W(32)); /* 33 */ + GG(c, d, e, a, b, W(33)); /* 34 */ + GG(b, c, d, e, a, W(34)); /* 35 */ + GG(a, b, c, d, e, W(35)); /* 36 */ + GG(e, a, b, c, d, W(36)); /* 37 */ + GG(d, e, a, b, c, W(37)); /* 38 */ + GG(c, d, e, a, b, W(38)); /* 39 */ + GG(b, c, d, e, a, W(39)); /* 40 */ + + /* Round 3 */ + HH(a, b, c, d, e, W(40)); /* 41 */ + HH(e, a, b, c, d, W(41)); /* 42 */ + HH(d, e, a, b, c, W(42)); /* 43 */ + HH(c, d, e, a, b, W(43)); /* 44 */ + HH(b, c, d, e, a, W(44)); /* 45 */ + HH(a, b, c, d, e, W(45)); /* 46 */ + HH(e, a, b, c, d, W(46)); /* 47 */ + HH(d, e, a, b, c, W(47)); /* 48 */ + HH(c, d, e, a, b, W(48)); /* 49 */ + HH(b, c, d, e, a, W(49)); /* 50 */ + HH(a, b, c, d, e, W(50)); /* 51 */ + HH(e, a, b, c, d, W(51)); /* 52 */ + HH(d, e, a, b, c, W(52)); /* 53 */ + HH(c, d, e, a, b, W(53)); /* 54 */ + HH(b, c, d, e, a, W(54)); /* 55 */ + HH(a, b, c, d, e, W(55)); /* 56 */ + HH(e, a, b, c, d, W(56)); /* 57 */ + HH(d, e, a, b, c, W(57)); /* 58 */ + HH(c, d, e, a, b, W(58)); /* 59 */ + HH(b, c, d, e, a, W(59)); /* 60 */ + + /* Round 4 */ + II(a, b, c, d, e, W(60)); /* 61 */ + II(e, a, b, c, d, W(61)); /* 62 */ + II(d, e, a, b, c, W(62)); /* 63 */ + II(c, d, e, a, b, W(63)); /* 64 */ + II(b, c, d, e, a, W(64)); /* 65 */ + II(a, b, c, d, e, W(65)); /* 66 */ + II(e, a, b, c, d, W(66)); /* 67 */ + II(d, e, a, b, c, W(67)); /* 68 */ + II(c, d, e, a, b, W(68)); /* 69 */ + II(b, c, d, e, a, W(69)); /* 70 */ + II(a, b, c, d, e, W(70)); /* 71 */ + II(e, a, b, c, d, W(71)); /* 72 */ + II(d, e, a, b, c, W(72)); /* 73 */ + II(c, d, e, a, b, W(73)); /* 74 */ + II(b, c, d, e, a, W(74)); /* 75 */ + II(a, b, c, d, e, W(75)); /* 76 */ + II(e, a, b, c, d, W(76)); /* 77 */ + II(d, e, a, b, c, W(77)); /* 78 */ + II(c, d, e, a, b, W(78)); /* 79 */ + II(b, c, d, e, a, W(79)); /* 80 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_SHA1Update + SHA1 block update operation. Continues an SHA1 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_SHA1Update(PHP_SHA1_CTX * context, const unsigned char *input, + unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) + < ((php_hash_uint32) inputLen << 3)) + context->count[1]++; + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy + ((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + SHA1Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + SHA1Transform(context->state, &input[i]); + + index = 0; + } else + i = 0; + + /* Buffer remaining input */ + memcpy + ((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], + inputLen - i); +} +/* }}} */ + +/* {{{ PHP_SHA1Final + SHA1 finalization. Ends an SHA1 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_SHA1Final(unsigned char digest[20], PHP_SHA1_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[7] = context->count[0] & 0xFF; + bits[6] = (context->count[0] >> 8) & 0xFF; + bits[5] = (context->count[0] >> 16) & 0xFF; + bits[4] = (context->count[0] >> 24) & 0xFF; + bits[3] = context->count[1] & 0xFF; + bits[2] = (context->count[1] >> 8) & 0xFF; + bits[1] = (context->count[1] >> 16) & 0xFF; + bits[0] = (context->count[1] >> 24) & 0xFF; + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_SHA1Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_SHA1Update(context, bits, 8); + + /* Store state in digest */ + SHAEncode32(digest, context->state, 20); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +#endif /* PHP_HASH_SHA1_NOT_IN_CORE */ + +/* sha256 */ + +php_hash_ops php_hash_sha256_ops = { + (php_hash_init_func_t) PHP_SHA256Init, + (php_hash_update_func_t) PHP_SHA256Update, + (php_hash_final_func_t) PHP_SHA256Final, + 32, + 64, + sizeof(PHP_SHA256_CTX) +}; + +#define ROTR32(b,x) ((x >> b) | (x << (32 - b))) +#define ROTR64(b,x) ((x >> b) | (x << (64 - b))) +#define SHR(b, x) (x >> b) + +/* Ch */ +#define SHA256_F0(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) +/* Maj */ +#define SHA256_F1(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) +/* SUM0 */ +#define SHA256_F2(x) (ROTR32( 2,(x)) ^ ROTR32(13,(x)) ^ ROTR32(22,(x))) +/* SUM1 */ +#define SHA256_F3(x) (ROTR32( 6,(x)) ^ ROTR32(11,(x)) ^ ROTR32(25,(x))) +/* OM0 */ +#define SHA256_F4(x) (ROTR32( 7,(x)) ^ ROTR32(18,(x)) ^ SHR( 3,(x))) +/* OM1 */ +#define SHA256_F5(x) (ROTR32(17,(x)) ^ ROTR32(19,(x)) ^ SHR(10,(x))) + +static php_hash_uint32 SHA256_K[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; + +/* {{{ PHP_SHA256Init + * SHA256 initialization. Begins an SHA256 operation, writing a new context. + */ +PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = 0x6a09e667; + context->state[1] = 0xbb67ae85; + context->state[2] = 0x3c6ef372; + context->state[3] = 0xa54ff53a; + context->state[4] = 0x510e527f; + context->state[5] = 0x9b05688c; + context->state[6] = 0x1f83d9ab; + context->state[7] = 0x5be0cd19; +} +/* }}} */ + +/* {{{ SHA256Transform + * SHA256 basic transformation. Transforms state based on block. + */ +static void SHA256Transform(php_hash_uint32 state[8], const unsigned char block[64]) +{ + php_hash_uint32 a = state[0], b = state[1], c = state[2], d = state[3]; + php_hash_uint32 e = state[4], f = state[5], g = state[6], h = state[7]; + php_hash_uint32 x[16], T1, T2, W[64]; + int i; + + SHADecode32(x, block, 64); + + /* Schedule */ + for(i = 0; i < 16; i++) { + W[i] = x[i]; + } + for(i = 16; i < 64; i++) { + W[i] = SHA256_F5(W[i-2]) + W[i-7] + SHA256_F4(W[i-15]) + W[i-16]; + } + + for (i = 0; i < 64; i++) { + T1 = h + SHA256_F3(e) + SHA256_F0(e,f,g) + SHA256_K[i] + W[i]; + T2 = SHA256_F2(a) + SHA256_F1(a,b,c); + h = g; g = f; f = e; e = d + T1; + d = c; c = b; b = a; a = T1 + T2; + } + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_SHA256Update + SHA256 block update operation. Continues an SHA256 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint32) inputLen << 3)) < ((php_hash_uint32) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint32) inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + SHA256Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) { + SHA256Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +/* {{{ PHP_SHA256Final + SHA256 finalization. Ends an SHA256 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_SHA256Final(unsigned char digest[32], PHP_SHA256_CTX * context) +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[7] = (unsigned char) (context->count[0] & 0xFF); + bits[6] = (unsigned char) ((context->count[0] >> 8) & 0xFF); + bits[5] = (unsigned char) ((context->count[0] >> 16) & 0xFF); + bits[4] = (unsigned char) ((context->count[0] >> 24) & 0xFF); + bits[3] = (unsigned char) (context->count[1] & 0xFF); + bits[2] = (unsigned char) ((context->count[1] >> 8) & 0xFF); + bits[1] = (unsigned char) ((context->count[1] >> 16) & 0xFF); + bits[0] = (unsigned char) ((context->count[1] >> 24) & 0xFF); + + /* Pad out to 56 mod 64. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + PHP_SHA256Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_SHA256Update(context, bits, 8); + + /* Store state in digest */ + SHAEncode32(digest, context->state, 32); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +/* sha384/sha512 */ + +/* Ch */ +#define SHA512_F0(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) +/* Maj */ +#define SHA512_F1(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) +/* SUM0 */ +#define SHA512_F2(x) (ROTR64(28, x) ^ ROTR64(34, x) ^ ROTR64(39, x)) +/* SUM1 */ +#define SHA512_F3(x) (ROTR64(14, x) ^ ROTR64(18, x) ^ ROTR64(41, x)) +/* OM0 */ +#define SHA512_F4(x) (ROTR64( 1, x) ^ ROTR64( 8, x) ^ SHR(7, x)) +/* OM1 */ +#define SHA512_F5(x) (ROTR64(19, x) ^ ROTR64(61, x) ^ SHR(6, x)) + +static php_hash_uint64 SHA512_K[128] = { + L64(0x428a2f98d728ae22), L64(0x7137449123ef65cd), L64(0xb5c0fbcfec4d3b2f), L64(0xe9b5dba58189dbbc), + L64(0x3956c25bf348b538), L64(0x59f111f1b605d019), L64(0x923f82a4af194f9b), L64(0xab1c5ed5da6d8118), + L64(0xd807aa98a3030242), L64(0x12835b0145706fbe), L64(0x243185be4ee4b28c), L64(0x550c7dc3d5ffb4e2), + L64(0x72be5d74f27b896f), L64(0x80deb1fe3b1696b1), L64(0x9bdc06a725c71235), L64(0xc19bf174cf692694), + L64(0xe49b69c19ef14ad2), L64(0xefbe4786384f25e3), L64(0x0fc19dc68b8cd5b5), L64(0x240ca1cc77ac9c65), + L64(0x2de92c6f592b0275), L64(0x4a7484aa6ea6e483), L64(0x5cb0a9dcbd41fbd4), L64(0x76f988da831153b5), + L64(0x983e5152ee66dfab), L64(0xa831c66d2db43210), L64(0xb00327c898fb213f), L64(0xbf597fc7beef0ee4), + L64(0xc6e00bf33da88fc2), L64(0xd5a79147930aa725), L64(0x06ca6351e003826f), L64(0x142929670a0e6e70), + L64(0x27b70a8546d22ffc), L64(0x2e1b21385c26c926), L64(0x4d2c6dfc5ac42aed), L64(0x53380d139d95b3df), + L64(0x650a73548baf63de), L64(0x766a0abb3c77b2a8), L64(0x81c2c92e47edaee6), L64(0x92722c851482353b), + L64(0xa2bfe8a14cf10364), L64(0xa81a664bbc423001), L64(0xc24b8b70d0f89791), L64(0xc76c51a30654be30), + L64(0xd192e819d6ef5218), L64(0xd69906245565a910), L64(0xf40e35855771202a), L64(0x106aa07032bbd1b8), + L64(0x19a4c116b8d2d0c8), L64(0x1e376c085141ab53), L64(0x2748774cdf8eeb99), L64(0x34b0bcb5e19b48a8), + L64(0x391c0cb3c5c95a63), L64(0x4ed8aa4ae3418acb), L64(0x5b9cca4f7763e373), L64(0x682e6ff3d6b2b8a3), + L64(0x748f82ee5defb2fc), L64(0x78a5636f43172f60), L64(0x84c87814a1f0ab72), L64(0x8cc702081a6439ec), + L64(0x90befffa23631e28), L64(0xa4506cebde82bde9), L64(0xbef9a3f7b2c67915), L64(0xc67178f2e372532b), + L64(0xca273eceea26619c), L64(0xd186b8c721c0c207), L64(0xeada7dd6cde0eb1e), L64(0xf57d4f7fee6ed178), + L64(0x06f067aa72176fba), L64(0x0a637dc5a2c898a6), L64(0x113f9804bef90dae), L64(0x1b710b35131c471b), + L64(0x28db77f523047d84), L64(0x32caab7b40c72493), L64(0x3c9ebe0a15c9bebc), L64(0x431d67c49c100d4c), + L64(0x4cc5d4becb3e42b6), L64(0x597f299cfc657e2a), L64(0x5fcb6fab3ad6faec), L64(0x6c44198c4a475817) }; + +/* {{{ SHAEncode64 + Encodes input (php_hash_uint64) into output (unsigned char). Assumes len is + a multiple of 8. + */ +static void SHAEncode64(unsigned char *output, php_hash_uint64 *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 8) { + output[j] = (unsigned char) ((input[i] >> 56) & 0xff); + output[j + 1] = (unsigned char) ((input[i] >> 48) & 0xff); + output[j + 2] = (unsigned char) ((input[i] >> 40) & 0xff); + output[j + 3] = (unsigned char) ((input[i] >> 32) & 0xff); + output[j + 4] = (unsigned char) ((input[i] >> 24) & 0xff); + output[j + 5] = (unsigned char) ((input[i] >> 16) & 0xff); + output[j + 6] = (unsigned char) ((input[i] >> 8) & 0xff); + output[j + 7] = (unsigned char) (input[i] & 0xff); + } +} +/* }}} */ + + +/* {{{ SHADecode64 + Decodes input (unsigned char) into output (php_hash_uint64). Assumes len is + a multiple of 8. + */ +static void SHADecode64(php_hash_uint64 *output, const unsigned char *input, unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 8) + output[i] = + ((php_hash_uint64) input[j + 7]) | (((php_hash_uint64) input[j + 6]) << 8) | + (((php_hash_uint64) input[j + 5]) << 16) | (((php_hash_uint64) input[j + 4]) << 24) | + (((php_hash_uint64) input[j + 3]) << 32) | (((php_hash_uint64) input[j + 2]) << 40) | + (((php_hash_uint64) input[j + 1]) << 48) | (((php_hash_uint64) input[j]) << 56); +} +/* }}} */ + +/* {{{ PHP_SHA384Init + * SHA384 initialization. Begins an SHA384 operation, writing a new context. + */ +PHP_HASH_API void PHP_SHA384Init(PHP_SHA384_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = L64(0xcbbb9d5dc1059ed8); + context->state[1] = L64(0x629a292a367cd507); + context->state[2] = L64(0x9159015a3070dd17); + context->state[3] = L64(0x152fecd8f70e5939); + context->state[4] = L64(0x67332667ffc00b31); + context->state[5] = L64(0x8eb44a8768581511); + context->state[6] = L64(0xdb0c2e0d64f98fa7); + context->state[7] = L64(0x47b5481dbefa4fa4); +} +/* }}} */ + +/* {{{ SHA512Transform + * SHA512 basic transformation. Transforms state based on block. + * SHA384 uses the exact same algorithm + */ +static void SHA512Transform(php_hash_uint64 state[8], const unsigned char block[128]) +{ + php_hash_uint64 a = state[0], b = state[1], c = state[2], d = state[3]; + php_hash_uint64 e = state[4], f = state[5], g = state[6], h = state[7]; + php_hash_uint64 x[16], T1, T2, W[80]; + int i; + + SHADecode64(x, block, 128); + + /* Schedule */ + for(i = 0; i < 16; i++) { + W[i] = x[i]; + } + for(i = 16; i < 80; i++) { + W[i] = SHA512_F5(W[i-2]) + W[i-7] + SHA512_F4(W[i-15]) + W[i-16]; + } + + for (i = 0; i < 80; i++) { + T1 = h + SHA512_F3(e) + SHA512_F0(e,f,g) + SHA512_K[i] + W[i]; + T2 = SHA512_F2(a) + SHA512_F1(a,b,c); + h = g; g = f; f = e; e = d + T1; + d = c; c = b; b = a; a = T1 + T2; + } + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Zeroize sensitive information. */ + memset((unsigned char*) x, 0, sizeof(x)); +} +/* }}} */ + +/* {{{ PHP_SHA384Update + SHA384 block update operation. Continues an SHA384 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_SHA384Update(PHP_SHA384_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 128 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x7F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint64) inputLen << 3)) < ((php_hash_uint64) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint64) inputLen >> 61); + + partLen = 128 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + SHA512Transform(context->state, context->buffer); + + for (i = partLen; i + 127 < inputLen; i += 128) { + SHA512Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +/* {{{ PHP_SHA384Final + SHA384 finalization. Ends an SHA384 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_SHA384Final(unsigned char digest[48], PHP_SHA384_CTX * context) +{ + unsigned char bits[16]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[15] = (unsigned char) (context->count[0] & 0xFF); + bits[14] = (unsigned char) ((context->count[0] >> 8) & 0xFF); + bits[13] = (unsigned char) ((context->count[0] >> 16) & 0xFF); + bits[12] = (unsigned char) ((context->count[0] >> 24) & 0xFF); + bits[11] = (unsigned char) ((context->count[0] >> 32) & 0xFF); + bits[10] = (unsigned char) ((context->count[0] >> 40) & 0xFF); + bits[9] = (unsigned char) ((context->count[0] >> 48) & 0xFF); + bits[8] = (unsigned char) ((context->count[0] >> 56) & 0xFF); + bits[7] = (unsigned char) (context->count[1] & 0xFF); + bits[6] = (unsigned char) ((context->count[1] >> 8) & 0xFF); + bits[5] = (unsigned char) ((context->count[1] >> 16) & 0xFF); + bits[4] = (unsigned char) ((context->count[1] >> 24) & 0xFF); + bits[3] = (unsigned char) ((context->count[1] >> 32) & 0xFF); + bits[2] = (unsigned char) ((context->count[1] >> 40) & 0xFF); + bits[1] = (unsigned char) ((context->count[1] >> 48) & 0xFF); + bits[0] = (unsigned char) ((context->count[1] >> 56) & 0xFF); + + /* Pad out to 112 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x7f); + padLen = (index < 112) ? (112 - index) : (240 - index); + PHP_SHA384Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_SHA384Update(context, bits, 16); + + /* Store state in digest */ + SHAEncode64(digest, context->state, 48); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +php_hash_ops php_hash_sha384_ops = { + (php_hash_init_func_t) PHP_SHA384Init, + (php_hash_update_func_t) PHP_SHA384Update, + (php_hash_final_func_t) PHP_SHA384Final, + 48, + 128, + sizeof(PHP_SHA384_CTX) +}; + +/* {{{ PHP_SHA512Init + * SHA512 initialization. Begins an SHA512 operation, writing a new context. + */ +PHP_HASH_API void PHP_SHA512Init(PHP_SHA512_CTX * context) +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. + */ + context->state[0] = L64(0x6a09e667f3bcc908); + context->state[1] = L64(0xbb67ae8584caa73b); + context->state[2] = L64(0x3c6ef372fe94f82b); + context->state[3] = L64(0xa54ff53a5f1d36f1); + context->state[4] = L64(0x510e527fade682d1); + context->state[5] = L64(0x9b05688c2b3e6c1f); + context->state[6] = L64(0x1f83d9abfb41bd6b); + context->state[7] = L64(0x5be0cd19137e2179); +} +/* }}} */ + +/* {{{ PHP_SHA512Update + SHA512 block update operation. Continues an SHA512 message-digest + operation, processing another message block, and updating the + context. + */ +PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX * context, const unsigned char *input, unsigned int inputLen) +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 128 */ + index = (unsigned int) ((context->count[0] >> 3) & 0x7F); + + /* Update number of bits */ + if ((context->count[0] += ((php_hash_uint64) inputLen << 3)) < ((php_hash_uint64) inputLen << 3)) { + context->count[1]++; + } + context->count[1] += ((php_hash_uint64) inputLen >> 61); + + partLen = 128 - index; + + /* Transform as many times as possible. + */ + if (inputLen >= partLen) { + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); + SHA512Transform(context->state, context->buffer); + + for (i = partLen; i + 127 < inputLen; i += 128) { + SHA512Transform(context->state, &input[i]); + } + + index = 0; + } else { + i = 0; + } + + /* Buffer remaining input */ + memcpy((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); +} +/* }}} */ + +/* {{{ PHP_SHA512Final + SHA512 finalization. Ends an SHA384 message-digest operation, writing the + the message digest and zeroizing the context. + */ +PHP_HASH_API void PHP_SHA512Final(unsigned char digest[48], PHP_SHA512_CTX * context) +{ + unsigned char bits[16]; + unsigned int index, padLen; + + /* Save number of bits */ + bits[15] = (unsigned char) (context->count[0] & 0xFF); + bits[14] = (unsigned char) ((context->count[0] >> 8) & 0xFF); + bits[13] = (unsigned char) ((context->count[0] >> 16) & 0xFF); + bits[12] = (unsigned char) ((context->count[0] >> 24) & 0xFF); + bits[11] = (unsigned char) ((context->count[0] >> 32) & 0xFF); + bits[10] = (unsigned char) ((context->count[0] >> 40) & 0xFF); + bits[9] = (unsigned char) ((context->count[0] >> 48) & 0xFF); + bits[8] = (unsigned char) ((context->count[0] >> 56) & 0xFF); + bits[7] = (unsigned char) (context->count[1] & 0xFF); + bits[6] = (unsigned char) ((context->count[1] >> 8) & 0xFF); + bits[5] = (unsigned char) ((context->count[1] >> 16) & 0xFF); + bits[4] = (unsigned char) ((context->count[1] >> 24) & 0xFF); + bits[3] = (unsigned char) ((context->count[1] >> 32) & 0xFF); + bits[2] = (unsigned char) ((context->count[1] >> 40) & 0xFF); + bits[1] = (unsigned char) ((context->count[1] >> 48) & 0xFF); + bits[0] = (unsigned char) ((context->count[1] >> 56) & 0xFF); + + /* Pad out to 112 mod 128. + */ + index = (unsigned int) ((context->count[0] >> 3) & 0x7f); + padLen = (index < 112) ? (112 - index) : (240 - index); + PHP_SHA512Update(context, PADDING, padLen); + + /* Append length (before padding) */ + PHP_SHA512Update(context, bits, 16); + + /* Store state in digest */ + SHAEncode64(digest, context->state, 64); + + /* Zeroize sensitive information. + */ + memset((unsigned char*) context, 0, sizeof(*context)); +} +/* }}} */ + +php_hash_ops php_hash_sha512_ops = { + (php_hash_init_func_t) PHP_SHA512Init, + (php_hash_update_func_t) PHP_SHA512Update, + (php_hash_final_func_t) PHP_SHA512Final, + 64, + 128, + sizeof(PHP_SHA512_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c new file mode 100644 index 000000000..0f4dd4403 --- /dev/null +++ b/ext/hash/hash_snefru.c @@ -0,0 +1,212 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_snefru.c,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_snefru.h" +#include "php_hash_snefru_tables.h" + +#define round(L, C, N, SB) \ + SBE = SB[C & 0xff]; \ + L ^= SBE; \ + N ^= SBE + +#ifndef DBG_SNEFRU +#define DBG_SNEFRU 0 +#endif + +#if DBG_SNEFRU +void ph(php_hash_uint32 h[16]) +{ + int i; + for (i = 0; i < 16; i++) + printf ("%08lx", h[i]); printf("\n"); +} +#endif + +static inline void Snefru(php_hash_uint32 input[16]) +{ + static int shifts[4] = {16, 8, 16, 24}; + int b, index, rshift, lshift; + const php_hash_uint32 *t0,*t1; + php_hash_uint32 SBE,B00,B01,B02,B03,B04,B05,B06,B07,B08,B09,B10,B11,B12,B13,B14,B15; + + B00 = input[0]; + B01 = input[1]; + B02 = input[2]; + B03 = input[3]; + B04 = input[4]; + B05 = input[5]; + B06 = input[6]; + B07 = input[7]; + B08 = input[8]; + B09 = input[9]; + B10 = input[10]; + B11 = input[11]; + B12 = input[12]; + B13 = input[13]; + B14 = input[14]; + B15 = input[15]; + + for (index = 0; index < 8; index++) { + t0 = tables[2*index+0]; + t1 = tables[2*index+1]; + for (b = 0; b < 4; b++) { + round(B15, B00, B01, t0); + round(B00, B01, B02, t0); + round(B01, B02, B03, t1); + round(B02, B03, B04, t1); + round(B03, B04, B05, t0); + round(B04, B05, B06, t0); + round(B05, B06, B07, t1); + round(B06, B07, B08, t1); + round(B07, B08, B09, t0); + round(B08, B09, B10, t0); + round(B09, B10, B11, t1); + round(B10, B11, B12, t1); + round(B11, B12, B13, t0); + round(B12, B13, B14, t0); + round(B13, B14, B15, t1); + round(B14, B15, B00, t1); + + rshift = shifts[b]; + lshift = 32-rshift; + + B00 = (B00 >> rshift) | (B00 << lshift); + B01 = (B01 >> rshift) | (B01 << lshift); + B02 = (B02 >> rshift) | (B02 << lshift); + B03 = (B03 >> rshift) | (B03 << lshift); + B04 = (B04 >> rshift) | (B04 << lshift); + B05 = (B05 >> rshift) | (B05 << lshift); + B06 = (B06 >> rshift) | (B06 << lshift); + B07 = (B07 >> rshift) | (B07 << lshift); + B08 = (B08 >> rshift) | (B08 << lshift); + B09 = (B09 >> rshift) | (B09 << lshift); + B10 = (B10 >> rshift) | (B10 << lshift); + B11 = (B11 >> rshift) | (B11 << lshift); + B12 = (B12 >> rshift) | (B12 << lshift); + B13 = (B13 >> rshift) | (B13 << lshift); + B14 = (B14 >> rshift) | (B14 << lshift); + B15 = (B15 >> rshift) | (B15 << lshift); + } + } + input[0] ^= B15; + input[1] ^= B14; + input[2] ^= B13; + input[3] ^= B12; + input[4] ^= B11; + input[5] ^= B10; + input[6] ^= B09; + input[7] ^= B08; +#if DBG_SNEFRU + ph(input); +#endif +} + +static inline void SnefruTransform(PHP_SNEFRU_CTX *context, const unsigned char input[32]) +{ + int i, j; + + for (i = 0, j = 0; i < 32; i += 4, ++j) { + context->state[8+j] = ((input[i] & 0xff) << 24) | ((input[i+1] & 0xff) << 16) | + ((input[i+2] & 0xff) << 8) | (input[i+3] & 0xff); + } + Snefru(context->state); + memset(&context->state[8], 0, sizeof(php_hash_uint32) * 8); +} + +PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *context) +{ + memset(context, 0, sizeof(*context)); +} + +static const php_hash_uint32 MAX32 = 0xffffffffLU; + +PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *context, const unsigned char *input, size_t len) +{ + if ((MAX32 - context->count[1]) < (len * 8)) { + context->count[0]++; + context->count[1] = MAX32 - context->count[1]; + context->count[1] = (len * 8) - context->count[1]; + } else { + context->count[1] += len * 8; + } + + if (context->length + len < 32) { + memcpy(&context->buffer[context->length], input, len); + context->length += len; + } else { + size_t i = 0, r = (context->length + len) % 32; + + if (context->length) { + i = 32 - context->length; + memcpy(&context->buffer[context->length], input, i); + SnefruTransform(context, context->buffer); + } + + for (; i + 32 <= len; i += 32) { + SnefruTransform(context, input + i); + } + + memcpy(context->buffer, input + i, r); + memset(&context->buffer[r], 0, 32 - r); + context->length = r; + } +} + +PHP_HASH_API void PHP_SNEFRUFinal(unsigned char digest[32], PHP_SNEFRU_CTX *context) +{ + php_hash_uint32 i, j; + + if (context->length) { + SnefruTransform(context, context->buffer); + } + + context->state[14] = context->count[0]; + context->state[15] = context->count[1]; + Snefru(context->state); + + for (i = 0, j = 0; j < 32; i++, j += 4) { + digest[j] = (unsigned char) ((context->state[i] >> 24) & 0xff); + digest[j + 1] = (unsigned char) ((context->state[i] >> 16) & 0xff); + digest[j + 2] = (unsigned char) ((context->state[i] >> 8) & 0xff); + digest[j + 3] = (unsigned char) (context->state[i] & 0xff); + } + + memset(context, 0, sizeof(*context)); +} + +php_hash_ops php_hash_snefru_ops = { + (php_hash_init_func_t) PHP_SNEFRUInit, + (php_hash_update_func_t) PHP_SNEFRUUpdate, + (php_hash_final_func_t) PHP_SNEFRUFinal, + 32, + 32, + sizeof(PHP_SNEFRU_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c new file mode 100644 index 000000000..2a30bed13 --- /dev/null +++ b/ext/hash/hash_tiger.c @@ -0,0 +1,285 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_tiger.c,v 1.4.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" +#include "php_hash_tiger.h" +#include "php_hash_tiger_tables.h" + +/* {{{ */ +#define save_abc \ + aa = a; \ + bb = b; \ + cc = c; + +#define round(a,b,c,x,mul) \ + c ^= x; \ + a -= t1[(unsigned char)(c)] ^ \ + t2[(unsigned char)(((php_hash_uint32)(c))>>(2*8))] ^ \ + t3[(unsigned char)((c)>>(4*8))] ^ \ + t4[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(2*8))] ; \ + b += t4[(unsigned char)(((php_hash_uint32)(c))>>(1*8))] ^ \ + t3[(unsigned char)(((php_hash_uint32)(c))>>(3*8))] ^ \ + t2[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(1*8))] ^ \ + t1[(unsigned char)(((php_hash_uint32)((c)>>(4*8)))>>(3*8))]; \ + b *= mul; + +#define pass(a,b,c,mul) \ + round(a,b,c,x0,mul) \ + round(b,c,a,x1,mul) \ + round(c,a,b,x2,mul) \ + round(a,b,c,x3,mul) \ + round(b,c,a,x4,mul) \ + round(c,a,b,x5,mul) \ + round(a,b,c,x6,mul) \ + round(b,c,a,x7,mul) + +#define key_schedule \ + x0 -= x7 ^ L64(0xA5A5A5A5A5A5A5A5); \ + x1 ^= x0; \ + x2 += x1; \ + x3 -= x2 ^ ((~x1)<<19); \ + x4 ^= x3; \ + x5 += x4; \ + x6 -= x5 ^ ((~x4)>>23); \ + x7 ^= x6; \ + x0 += x7; \ + x1 -= x0 ^ ((~x7)<<19); \ + x2 ^= x1; \ + x3 += x2; \ + x4 -= x3 ^ ((~x2)>>23); \ + x5 ^= x4; \ + x6 += x5; \ + x7 -= x6 ^ L64(0x0123456789ABCDEF); + +#define feedforward \ + a ^= aa; \ + b -= bb; \ + c += cc; + +#define compress(passes) \ + save_abc \ + pass(a,b,c,5) \ + key_schedule \ + pass(c,a,b,7) \ + key_schedule \ + pass(b,c,a,9) \ + for(pass_no=0; pass_nopassed += (php_hash_uint64) context->length << 3; + + context->buffer[context->length++] = 0x1; + if (context->length % 8) { + memset(&context->buffer[context->length], 0, 8-context->length%8); + context->length += 8-context->length%8; + } + + if (context->length > 56) { + memset(&context->buffer[context->length], 0, 64 - context->length); + tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), context->state); + memset(context->buffer, 0, 56); + } else { + memset(&context->buffer[context->length], 0, 56 - context->length); + } + + memcpy(&context->buffer[56], &context->passed, sizeof(php_hash_uint64)); + tiger_compress(context->passes, ((php_hash_uint64 *) context->buffer), context->state); +} + +PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context) +{ + memset(context, 0, sizeof(*context)); + context->state[0] = L64(0x0123456789ABCDEF); + context->state[1] = L64(0xFEDCBA9876543210); + context->state[2] = L64(0xF096A5B4C3B2E187); +} + +PHP_HASH_API void PHP_4TIGERInit(PHP_TIGER_CTX *context) +{ + memset(context, 0, sizeof(*context)); + context->passes = 1; + context->state[0] = L64(0x0123456789ABCDEF); + context->state[1] = L64(0xFEDCBA9876543210); + context->state[2] = L64(0xF096A5B4C3B2E187); +} + +PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *input, size_t len) +{ + if (context->length + len < 64) { + memcpy(&context->buffer[context->length], input, len); + context->length += len; + } else { + size_t i = 0, r = (context->length + len) % 64; + + if (context->length) { + i = 64 - context->length; + memcpy(&context->buffer[context->length], input, i); + tiger_compress(context->passes, ((const php_hash_uint64 *) context->buffer), context->state); + memset(context->buffer, 0, 64); + context->passed += 512; + } + + for (; i + 64 <= len; i += 64) { + tiger_compress(context->passes, ((const php_hash_uint64 *) (input + i)), context->state); + context->passed += 512; + } + + memcpy(context->buffer, input + i, r); + context->length = r; + } +} + +PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context) +{ + TigerFinalize(context); + + digest[0] = (unsigned char) ((context->state[0] >> 56) & 0xff); + digest[1] = (unsigned char) ((context->state[0] >> 48) & 0xff); + digest[2] = (unsigned char) ((context->state[0] >> 40) & 0xff); + digest[3] = (unsigned char) ((context->state[0] >> 32) & 0xff); + digest[4] = (unsigned char) ((context->state[0] >> 24) & 0xff); + digest[5] = (unsigned char) ((context->state[0] >> 16) & 0xff); + digest[6] = (unsigned char) ((context->state[0] >> 8) & 0xff); + digest[7] = (unsigned char) (context->state[0] & 0xff); + digest[8] = (unsigned char) ((context->state[1] >> 56) & 0xff); + digest[9] = (unsigned char) ((context->state[1] >> 48) & 0xff); + digest[10] = (unsigned char) ((context->state[1] >> 40) & 0xff); + digest[11] = (unsigned char) ((context->state[1] >> 32) & 0xff); + digest[12] = (unsigned char) ((context->state[1] >> 24) & 0xff); + digest[13] = (unsigned char) ((context->state[1] >> 16) & 0xff); + digest[14] = (unsigned char) ((context->state[1] >> 8) & 0xff); + digest[15] = (unsigned char) (context->state[1] & 0xff); + + memset(context, 0, sizeof(*context)); +} + +PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context) +{ + TigerFinalize(context); + + digest[0] = (unsigned char) ((context->state[0] >> 56) & 0xff); + digest[1] = (unsigned char) ((context->state[0] >> 48) & 0xff); + digest[2] = (unsigned char) ((context->state[0] >> 40) & 0xff); + digest[3] = (unsigned char) ((context->state[0] >> 32) & 0xff); + digest[4] = (unsigned char) ((context->state[0] >> 24) & 0xff); + digest[5] = (unsigned char) ((context->state[0] >> 16) & 0xff); + digest[6] = (unsigned char) ((context->state[0] >> 8) & 0xff); + digest[7] = (unsigned char) (context->state[0] & 0xff); + digest[8] = (unsigned char) ((context->state[1] >> 56) & 0xff); + digest[9] = (unsigned char) ((context->state[1] >> 48) & 0xff); + digest[10] = (unsigned char) ((context->state[1] >> 40) & 0xff); + digest[11] = (unsigned char) ((context->state[1] >> 32) & 0xff); + digest[12] = (unsigned char) ((context->state[1] >> 24) & 0xff); + digest[13] = (unsigned char) ((context->state[1] >> 16) & 0xff); + digest[14] = (unsigned char) ((context->state[1] >> 8) & 0xff); + digest[15] = (unsigned char) (context->state[1] & 0xff); + digest[16] = (unsigned char) ((context->state[2] >> 56) & 0xff); + digest[17] = (unsigned char) ((context->state[2] >> 48) & 0xff); + digest[18] = (unsigned char) ((context->state[2] >> 40) & 0xff); + digest[19] = (unsigned char) ((context->state[2] >> 32) & 0xff); + + memset(context, 0, sizeof(*context)); +} + +PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context) +{ + TigerFinalize(context); + + digest[0] = (unsigned char) ((context->state[0] >> 56) & 0xff); + digest[1] = (unsigned char) ((context->state[0] >> 48) & 0xff); + digest[2] = (unsigned char) ((context->state[0] >> 40) & 0xff); + digest[3] = (unsigned char) ((context->state[0] >> 32) & 0xff); + digest[4] = (unsigned char) ((context->state[0] >> 24) & 0xff); + digest[5] = (unsigned char) ((context->state[0] >> 16) & 0xff); + digest[6] = (unsigned char) ((context->state[0] >> 8) & 0xff); + digest[7] = (unsigned char) (context->state[0] & 0xff); + digest[8] = (unsigned char) ((context->state[1] >> 56) & 0xff); + digest[9] = (unsigned char) ((context->state[1] >> 48) & 0xff); + digest[10] = (unsigned char) ((context->state[1] >> 40) & 0xff); + digest[11] = (unsigned char) ((context->state[1] >> 32) & 0xff); + digest[12] = (unsigned char) ((context->state[1] >> 24) & 0xff); + digest[13] = (unsigned char) ((context->state[1] >> 16) & 0xff); + digest[14] = (unsigned char) ((context->state[1] >> 8) & 0xff); + digest[15] = (unsigned char) (context->state[1] & 0xff); + digest[16] = (unsigned char) ((context->state[2] >> 56) & 0xff); + digest[17] = (unsigned char) ((context->state[2] >> 48) & 0xff); + digest[18] = (unsigned char) ((context->state[2] >> 40) & 0xff); + digest[19] = (unsigned char) ((context->state[2] >> 32) & 0xff); + digest[20] = (unsigned char) ((context->state[2] >> 24) & 0xff); + digest[21] = (unsigned char) ((context->state[2] >> 16) & 0xff); + digest[22] = (unsigned char) ((context->state[2] >> 8) & 0xff); + digest[23] = (unsigned char) (context->state[2] & 0xff); + + memset(context, 0, sizeof(*context)); +} + +#define PHP_HASH_TIGER_OPS(p, b) \ + php_hash_ops php_hash_##p##tiger##b##_ops = { \ + (php_hash_init_func_t) PHP_##p##TIGERInit, \ + (php_hash_update_func_t) PHP_TIGERUpdate, \ + (php_hash_final_func_t) PHP_TIGER##b##Final, \ + b/8, \ + 64, \ + sizeof(PHP_TIGER_CTX) \ + } + +PHP_HASH_TIGER_OPS(3, 128); +PHP_HASH_TIGER_OPS(3, 160); +PHP_HASH_TIGER_OPS(3, 192); +PHP_HASH_TIGER_OPS(4, 128); +PHP_HASH_TIGER_OPS(4, 160); +PHP_HASH_TIGER_OPS(4, 192); + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/hash_whirlpool.c b/ext/hash/hash_whirlpool.c new file mode 100644 index 000000000..4b878439e --- /dev/null +++ b/ext/hash/hash_whirlpool.c @@ -0,0 +1,452 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: hash_whirlpool.c,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#include "php_hash.h" + +/* + * TODO: simplify Update and Final, those look ridiculously complex + * Mike, 2005-11-23 + */ + +#include "php_hash_whirlpool.h" +#include "php_hash_whirlpool_tables.h" + +#define DIGESTBYTES 64 +#define DIGESTBITS (8*DIGESTBYTES) /* 512 */ + +#define WBLOCKBYTES 64 +#define WBLOCKBITS (8*WBLOCKBYTES) /* 512 */ + +#define LENGTHBYTES 32 +#define LENGTHBITS (8*LENGTHBYTES) /* 256 */ + +static void WhirlpoolTransform(PHP_WHIRLPOOL_CTX *context) +{ + int i, r; + php_hash_uint64 K[8]; /* the round key */ + php_hash_uint64 block[8]; /* mu(buffer) */ + php_hash_uint64 state[8]; /* the cipher state */ + php_hash_uint64 L[8]; + unsigned char *buffer = context->buffer.data; + + /* + * map the buffer to a block: + */ + for (i = 0; i < 8; i++, buffer += 8) { + block[i] = + (((php_hash_uint64)buffer[0] ) << 56) ^ + (((php_hash_uint64)buffer[1] & 0xffL) << 48) ^ + (((php_hash_uint64)buffer[2] & 0xffL) << 40) ^ + (((php_hash_uint64)buffer[3] & 0xffL) << 32) ^ + (((php_hash_uint64)buffer[4] & 0xffL) << 24) ^ + (((php_hash_uint64)buffer[5] & 0xffL) << 16) ^ + (((php_hash_uint64)buffer[6] & 0xffL) << 8) ^ + (((php_hash_uint64)buffer[7] & 0xffL) ); + } + /* + * compute and apply K^0 to the cipher state: + */ + state[0] = block[0] ^ (K[0] = context->state[0]); + state[1] = block[1] ^ (K[1] = context->state[1]); + state[2] = block[2] ^ (K[2] = context->state[2]); + state[3] = block[3] ^ (K[3] = context->state[3]); + state[4] = block[4] ^ (K[4] = context->state[4]); + state[5] = block[5] ^ (K[5] = context->state[5]); + state[6] = block[6] ^ (K[6] = context->state[6]); + state[7] = block[7] ^ (K[7] = context->state[7]); + /* + * iterate over all rounds: + */ + for (r = 1; r <= R; r++) { + /* + * compute K^r from K^{r-1}: + */ + L[0] = + C0[(int)(K[0] >> 56) ] ^ + C1[(int)(K[7] >> 48) & 0xff] ^ + C2[(int)(K[6] >> 40) & 0xff] ^ + C3[(int)(K[5] >> 32) & 0xff] ^ + C4[(int)(K[4] >> 24) & 0xff] ^ + C5[(int)(K[3] >> 16) & 0xff] ^ + C6[(int)(K[2] >> 8) & 0xff] ^ + C7[(int)(K[1] ) & 0xff] ^ + rc[r]; + L[1] = + C0[(int)(K[1] >> 56) ] ^ + C1[(int)(K[0] >> 48) & 0xff] ^ + C2[(int)(K[7] >> 40) & 0xff] ^ + C3[(int)(K[6] >> 32) & 0xff] ^ + C4[(int)(K[5] >> 24) & 0xff] ^ + C5[(int)(K[4] >> 16) & 0xff] ^ + C6[(int)(K[3] >> 8) & 0xff] ^ + C7[(int)(K[2] ) & 0xff]; + L[2] = + C0[(int)(K[2] >> 56) ] ^ + C1[(int)(K[1] >> 48) & 0xff] ^ + C2[(int)(K[0] >> 40) & 0xff] ^ + C3[(int)(K[7] >> 32) & 0xff] ^ + C4[(int)(K[6] >> 24) & 0xff] ^ + C5[(int)(K[5] >> 16) & 0xff] ^ + C6[(int)(K[4] >> 8) & 0xff] ^ + C7[(int)(K[3] ) & 0xff]; + L[3] = + C0[(int)(K[3] >> 56) ] ^ + C1[(int)(K[2] >> 48) & 0xff] ^ + C2[(int)(K[1] >> 40) & 0xff] ^ + C3[(int)(K[0] >> 32) & 0xff] ^ + C4[(int)(K[7] >> 24) & 0xff] ^ + C5[(int)(K[6] >> 16) & 0xff] ^ + C6[(int)(K[5] >> 8) & 0xff] ^ + C7[(int)(K[4] ) & 0xff]; + L[4] = + C0[(int)(K[4] >> 56) ] ^ + C1[(int)(K[3] >> 48) & 0xff] ^ + C2[(int)(K[2] >> 40) & 0xff] ^ + C3[(int)(K[1] >> 32) & 0xff] ^ + C4[(int)(K[0] >> 24) & 0xff] ^ + C5[(int)(K[7] >> 16) & 0xff] ^ + C6[(int)(K[6] >> 8) & 0xff] ^ + C7[(int)(K[5] ) & 0xff]; + L[5] = + C0[(int)(K[5] >> 56) ] ^ + C1[(int)(K[4] >> 48) & 0xff] ^ + C2[(int)(K[3] >> 40) & 0xff] ^ + C3[(int)(K[2] >> 32) & 0xff] ^ + C4[(int)(K[1] >> 24) & 0xff] ^ + C5[(int)(K[0] >> 16) & 0xff] ^ + C6[(int)(K[7] >> 8) & 0xff] ^ + C7[(int)(K[6] ) & 0xff]; + L[6] = + C0[(int)(K[6] >> 56) ] ^ + C1[(int)(K[5] >> 48) & 0xff] ^ + C2[(int)(K[4] >> 40) & 0xff] ^ + C3[(int)(K[3] >> 32) & 0xff] ^ + C4[(int)(K[2] >> 24) & 0xff] ^ + C5[(int)(K[1] >> 16) & 0xff] ^ + C6[(int)(K[0] >> 8) & 0xff] ^ + C7[(int)(K[7] ) & 0xff]; + L[7] = + C0[(int)(K[7] >> 56) ] ^ + C1[(int)(K[6] >> 48) & 0xff] ^ + C2[(int)(K[5] >> 40) & 0xff] ^ + C3[(int)(K[4] >> 32) & 0xff] ^ + C4[(int)(K[3] >> 24) & 0xff] ^ + C5[(int)(K[2] >> 16) & 0xff] ^ + C6[(int)(K[1] >> 8) & 0xff] ^ + C7[(int)(K[0] ) & 0xff]; + K[0] = L[0]; + K[1] = L[1]; + K[2] = L[2]; + K[3] = L[3]; + K[4] = L[4]; + K[5] = L[5]; + K[6] = L[6]; + K[7] = L[7]; + /* + * apply the r-th round transformation: + */ + L[0] = + C0[(int)(state[0] >> 56) ] ^ + C1[(int)(state[7] >> 48) & 0xff] ^ + C2[(int)(state[6] >> 40) & 0xff] ^ + C3[(int)(state[5] >> 32) & 0xff] ^ + C4[(int)(state[4] >> 24) & 0xff] ^ + C5[(int)(state[3] >> 16) & 0xff] ^ + C6[(int)(state[2] >> 8) & 0xff] ^ + C7[(int)(state[1] ) & 0xff] ^ + K[0]; + L[1] = + C0[(int)(state[1] >> 56) ] ^ + C1[(int)(state[0] >> 48) & 0xff] ^ + C2[(int)(state[7] >> 40) & 0xff] ^ + C3[(int)(state[6] >> 32) & 0xff] ^ + C4[(int)(state[5] >> 24) & 0xff] ^ + C5[(int)(state[4] >> 16) & 0xff] ^ + C6[(int)(state[3] >> 8) & 0xff] ^ + C7[(int)(state[2] ) & 0xff] ^ + K[1]; + L[2] = + C0[(int)(state[2] >> 56) ] ^ + C1[(int)(state[1] >> 48) & 0xff] ^ + C2[(int)(state[0] >> 40) & 0xff] ^ + C3[(int)(state[7] >> 32) & 0xff] ^ + C4[(int)(state[6] >> 24) & 0xff] ^ + C5[(int)(state[5] >> 16) & 0xff] ^ + C6[(int)(state[4] >> 8) & 0xff] ^ + C7[(int)(state[3] ) & 0xff] ^ + K[2]; + L[3] = + C0[(int)(state[3] >> 56) ] ^ + C1[(int)(state[2] >> 48) & 0xff] ^ + C2[(int)(state[1] >> 40) & 0xff] ^ + C3[(int)(state[0] >> 32) & 0xff] ^ + C4[(int)(state[7] >> 24) & 0xff] ^ + C5[(int)(state[6] >> 16) & 0xff] ^ + C6[(int)(state[5] >> 8) & 0xff] ^ + C7[(int)(state[4] ) & 0xff] ^ + K[3]; + L[4] = + C0[(int)(state[4] >> 56) ] ^ + C1[(int)(state[3] >> 48) & 0xff] ^ + C2[(int)(state[2] >> 40) & 0xff] ^ + C3[(int)(state[1] >> 32) & 0xff] ^ + C4[(int)(state[0] >> 24) & 0xff] ^ + C5[(int)(state[7] >> 16) & 0xff] ^ + C6[(int)(state[6] >> 8) & 0xff] ^ + C7[(int)(state[5] ) & 0xff] ^ + K[4]; + L[5] = + C0[(int)(state[5] >> 56) ] ^ + C1[(int)(state[4] >> 48) & 0xff] ^ + C2[(int)(state[3] >> 40) & 0xff] ^ + C3[(int)(state[2] >> 32) & 0xff] ^ + C4[(int)(state[1] >> 24) & 0xff] ^ + C5[(int)(state[0] >> 16) & 0xff] ^ + C6[(int)(state[7] >> 8) & 0xff] ^ + C7[(int)(state[6] ) & 0xff] ^ + K[5]; + L[6] = + C0[(int)(state[6] >> 56) ] ^ + C1[(int)(state[5] >> 48) & 0xff] ^ + C2[(int)(state[4] >> 40) & 0xff] ^ + C3[(int)(state[3] >> 32) & 0xff] ^ + C4[(int)(state[2] >> 24) & 0xff] ^ + C5[(int)(state[1] >> 16) & 0xff] ^ + C6[(int)(state[0] >> 8) & 0xff] ^ + C7[(int)(state[7] ) & 0xff] ^ + K[6]; + L[7] = + C0[(int)(state[7] >> 56) ] ^ + C1[(int)(state[6] >> 48) & 0xff] ^ + C2[(int)(state[5] >> 40) & 0xff] ^ + C3[(int)(state[4] >> 32) & 0xff] ^ + C4[(int)(state[3] >> 24) & 0xff] ^ + C5[(int)(state[2] >> 16) & 0xff] ^ + C6[(int)(state[1] >> 8) & 0xff] ^ + C7[(int)(state[0] ) & 0xff] ^ + K[7]; + state[0] = L[0]; + state[1] = L[1]; + state[2] = L[2]; + state[3] = L[3]; + state[4] = L[4]; + state[5] = L[5]; + state[6] = L[6]; + state[7] = L[7]; + } + /* + * apply the Miyaguchi-Preneel compression function: + */ + context->state[0] ^= state[0] ^ block[0]; + context->state[1] ^= state[1] ^ block[1]; + context->state[2] ^= state[2] ^ block[2]; + context->state[3] ^= state[3] ^ block[3]; + context->state[4] ^= state[4] ^ block[4]; + context->state[5] ^= state[5] ^ block[5]; + context->state[6] ^= state[6] ^ block[6]; + context->state[7] ^= state[7] ^ block[7]; + + memset(state, 0, sizeof(state)); +} + +PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *context) +{ + memset(context, 0, sizeof(*context)); +} + +PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *context, const unsigned char *input, size_t len) +{ + php_hash_uint64 sourceBits = len * 8; + int sourcePos = 0; /* index of leftmost source unsigned char containing data (1 to 8 bits). */ + int sourceGap = (8 - ((int)sourceBits & 7)) & 7; /* space on source[sourcePos]. */ + int bufferRem = context->buffer.bits & 7; /* occupied bits on buffer[bufferPos]. */ + const unsigned char *source = input; + unsigned char *buffer = context->buffer.data; + unsigned char *bitLength = context->bitlength; + int bufferBits = context->buffer.bits; + int bufferPos = context->buffer.pos; + php_hash_uint32 b, carry; + int i; + + /* + * tally the length of the added data: + */ + php_hash_uint64 value = sourceBits; + for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != L64(0)); i--) { + carry += bitLength[i] + ((php_hash_uint32)value & 0xff); + bitLength[i] = (unsigned char)carry; + carry >>= 8; + value >>= 8; + } + /* + * process data in chunks of 8 bits (a more efficient approach would be to take whole-word chunks): + */ + while (sourceBits > 8) { + /* N.B. at least source[sourcePos] and source[sourcePos+1] contain data. */ + /* + * take a byte from the source: + */ + b = ((source[sourcePos] << sourceGap) & 0xff) | + ((source[sourcePos + 1] & 0xff) >> (8 - sourceGap)); + /* + * process this byte: + */ + buffer[bufferPos++] |= (unsigned char)(b >> bufferRem); + bufferBits += 8 - bufferRem; /* bufferBits = 8*bufferPos; */ + if (bufferBits == DIGESTBITS) { + /* + * process data block: + */ + WhirlpoolTransform(context); + /* + * reset buffer: + */ + bufferBits = bufferPos = 0; + } + buffer[bufferPos] = (unsigned char) (b << (8 - bufferRem)); + bufferBits += bufferRem; + /* + * proceed to remaining data: + */ + sourceBits -= 8; + sourcePos++; + } + /* now 0 <= sourceBits <= 8; + * furthermore, all data (if any is left) is in source[sourcePos]. + */ + if (sourceBits > 0) { + b = (source[sourcePos] << sourceGap) & 0xff; /* bits are left-justified on b. */ + /* + * process the remaining bits: + */ + buffer[bufferPos] |= b >> bufferRem; + } else { + b = 0; + } + if (bufferRem + sourceBits < 8) { + /* + * all remaining data fits on buffer[bufferPos], + * and there still remains some space. + */ + bufferBits += (int) sourceBits; + } else { + /* + * buffer[bufferPos] is full: + */ + bufferPos++; + bufferBits += 8 - bufferRem; /* bufferBits = 8*bufferPos; */ + sourceBits -= 8 - bufferRem; + /* now 0 <= sourceBits < 8; + * furthermore, all data (if any is left) is in source[sourcePos]. + */ + if (bufferBits == DIGESTBITS) { + /* + * process data block: + */ + WhirlpoolTransform(context); + /* + * reset buffer: + */ + bufferBits = bufferPos = 0; + } + buffer[bufferPos] = (unsigned char) (b << (8 - bufferRem)); + bufferBits += (int)sourceBits; + } + context->buffer.bits = bufferBits; + context->buffer.pos = bufferPos; +} + +PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char digest[64], PHP_WHIRLPOOL_CTX *context) +{ + int i; + unsigned char *buffer = context->buffer.data; + unsigned char *bitLength = context->bitlength; + int bufferBits = context->buffer.bits; + int bufferPos = context->buffer.pos; + + /* + * append a '1'-bit: + */ + buffer[bufferPos] |= 0x80U >> (bufferBits & 7); + bufferPos++; /* all remaining bits on the current unsigned char are set to zero. */ + /* + * pad with zero bits to complete (N*WBLOCKBITS - LENGTHBITS) bits: + */ + if (bufferPos > WBLOCKBYTES - LENGTHBYTES) { + if (bufferPos < WBLOCKBYTES) { + memset(&buffer[bufferPos], 0, WBLOCKBYTES - bufferPos); + } + /* + * process data block: + */ + WhirlpoolTransform(context); + /* + * reset buffer: + */ + bufferPos = 0; + } + if (bufferPos < WBLOCKBYTES - LENGTHBYTES) { + memset(&buffer[bufferPos], 0, (WBLOCKBYTES - LENGTHBYTES) - bufferPos); + } + bufferPos = WBLOCKBYTES - LENGTHBYTES; + /* + * append bit length of hashed data: + */ + memcpy(&buffer[WBLOCKBYTES - LENGTHBYTES], bitLength, LENGTHBYTES); + /* + * process data block: + */ + WhirlpoolTransform(context); + /* + * return the completed message digest: + */ + for (i = 0; i < DIGESTBYTES/8; i++) { + digest[0] = (unsigned char)(context->state[i] >> 56); + digest[1] = (unsigned char)(context->state[i] >> 48); + digest[2] = (unsigned char)(context->state[i] >> 40); + digest[3] = (unsigned char)(context->state[i] >> 32); + digest[4] = (unsigned char)(context->state[i] >> 24); + digest[5] = (unsigned char)(context->state[i] >> 16); + digest[6] = (unsigned char)(context->state[i] >> 8); + digest[7] = (unsigned char)(context->state[i] ); + digest += 8; + } + + memset(context, 0, sizeof(*context)); +} + +php_hash_ops php_hash_whirlpool_ops = { + (php_hash_init_func_t) PHP_WHIRLPOOLInit, + (php_hash_update_func_t) PHP_WHIRLPOOLUpdate, + (php_hash_final_func_t) PHP_WHIRLPOOLFinal, + 64, + 64, + sizeof(PHP_WHIRLPOOL_CTX) +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/package.xml b/ext/hash/package.xml new file mode 100644 index 000000000..119cdd673 --- /dev/null +++ b/ext/hash/package.xml @@ -0,0 +1,95 @@ + + hash + pHASH Message Digest Framework + + Native implementations of common message digest algorithms using a generic factory method + + PHP + + + pollita + Sara Golemon + pollita@php.net + lead + + + mike + Michael Wallner + mike@php.net + lead + + + + + 1.1 + stable + 2005-12-00 + +Fixed PECL bug #6183 - haval source file entries missing in package.xml + +Supported Algorithms: + * md4, md5 + * sha1, sha256, sha384, sha512 + * ripemd128, ripemd160 + * tiger128, tiger160, tiger192 (3 and 4 passes) + * haval128, haval160, haval192, haval224, haval256 (3, 4 and 5 passes) + * crc32, crc32b, adler32, gost, snefru, whirlpool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h new file mode 100644 index 000000000..d22ec8c45 --- /dev/null +++ b/ext/hash/php_hash.h @@ -0,0 +1,144 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash.h,v 1.13.2.6 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_H +#define PHP_HASH_H + +#include "php.h" +#include "php_hash_types.h" + +#define PHP_HASH_EXTNAME "hash" +#define PHP_HASH_EXTVER "1.0" +#define PHP_HASH_RESNAME "Hash Context" + +#define PHP_HASH_HMAC 0x0001 + +typedef void (*php_hash_init_func_t)(void *context); +typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, unsigned int count); +typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context); + +typedef struct _php_hash_ops { + php_hash_init_func_t hash_init; + php_hash_update_func_t hash_update; + php_hash_final_func_t hash_final; + + int digest_size; + int block_size; + int context_size; +} php_hash_ops; + +typedef struct _php_hash_data { + php_hash_ops *ops; + void *context; + + long options; + unsigned char *key; +} php_hash_data; + +extern php_hash_ops php_hash_md4_ops; +extern php_hash_ops php_hash_md5_ops; +extern php_hash_ops php_hash_sha1_ops; +extern php_hash_ops php_hash_sha256_ops; +extern php_hash_ops php_hash_sha384_ops; +extern php_hash_ops php_hash_sha512_ops; +extern php_hash_ops php_hash_ripemd128_ops; +extern php_hash_ops php_hash_ripemd160_ops; +extern php_hash_ops php_hash_whirlpool_ops; +extern php_hash_ops php_hash_3tiger128_ops; +extern php_hash_ops php_hash_3tiger160_ops; +extern php_hash_ops php_hash_3tiger192_ops; +extern php_hash_ops php_hash_4tiger128_ops; +extern php_hash_ops php_hash_4tiger160_ops; +extern php_hash_ops php_hash_4tiger192_ops; +extern php_hash_ops php_hash_snefru_ops; +extern php_hash_ops php_hash_gost_ops; +extern php_hash_ops php_hash_adler32_ops; +extern php_hash_ops php_hash_crc32_ops; +extern php_hash_ops php_hash_crc32b_ops; + +#define PHP_HASH_HAVAL_OPS(p,b) extern php_hash_ops php_hash_##p##haval##b##_ops; + +PHP_HASH_HAVAL_OPS(3,128) +PHP_HASH_HAVAL_OPS(3,160) +PHP_HASH_HAVAL_OPS(3,192) +PHP_HASH_HAVAL_OPS(3,224) +PHP_HASH_HAVAL_OPS(3,256) + +PHP_HASH_HAVAL_OPS(4,128) +PHP_HASH_HAVAL_OPS(4,160) +PHP_HASH_HAVAL_OPS(4,192) +PHP_HASH_HAVAL_OPS(4,224) +PHP_HASH_HAVAL_OPS(4,256) + +PHP_HASH_HAVAL_OPS(5,128) +PHP_HASH_HAVAL_OPS(5,160) +PHP_HASH_HAVAL_OPS(5,192) +PHP_HASH_HAVAL_OPS(5,224) +PHP_HASH_HAVAL_OPS(5,256) + +extern zend_module_entry hash_module_entry; +#define phpext_hash_ptr &hash_module_entry + +#ifdef PHP_WIN32 +#define PHP_HASH_API __declspec(dllexport) +#else +#define PHP_HASH_API +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + +PHP_FUNCTION(hash); +PHP_FUNCTION(hash_file); +PHP_FUNCTION(hash_hmac); +PHP_FUNCTION(hash_hmac_file); +PHP_FUNCTION(hash_init); +PHP_FUNCTION(hash_update); +PHP_FUNCTION(hash_update_stream); +PHP_FUNCTION(hash_update_file); +PHP_FUNCTION(hash_final); +PHP_FUNCTION(hash_algos); + +PHP_HASH_API php_hash_ops *php_hash_fetch_ops(const char *algo, int algo_len); +PHP_HASH_API void php_hash_register_algo(const char *algo, php_hash_ops *ops); + +static inline void php_hash_bin2hex(char *out, const unsigned char *in, int in_len) +{ + static const char hexits[16] = "0123456789abcdef"; + int i; + + for(i = 0; i < in_len; i++) { + out[i * 2] = hexits[in[i] >> 4]; + out[(i * 2) + 1] = hexits[in[i] & 0x0F]; + } +} + +#endif /* PHP_HASH_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/hash/php_hash_adler32.h b/ext/hash/php_hash_adler32.h new file mode 100644 index 000000000..2566146e5 --- /dev/null +++ b/ext/hash/php_hash_adler32.h @@ -0,0 +1,43 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_adler32.h,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_ADLER32_H +#define PHP_HASH_ADLER32_H + +#include "ext/standard/basic_functions.h" + +typedef struct { + php_hash_uint32 state; +} PHP_ADLER32_CTX; + +PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context); +PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len); +PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_crc32.h b/ext/hash/php_hash_crc32.h new file mode 100644 index 000000000..899d83e35 --- /dev/null +++ b/ext/hash/php_hash_crc32.h @@ -0,0 +1,44 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_crc32.h,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_CRC32_H +#define PHP_HASH_CRC32_H + +#include "ext/standard/basic_functions.h" + +typedef struct { + php_hash_uint32 state; +} PHP_CRC32_CTX; + +PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context); +PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); +PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); +PHP_HASH_API void PHP_CRC32Final(unsigned char digest[4], PHP_CRC32_CTX *context); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_crc32_tables.h b/ext/hash/php_hash_crc32_tables.h new file mode 100644 index 000000000..d7fa3cb83 --- /dev/null +++ b/ext/hash/php_hash_crc32_tables.h @@ -0,0 +1,149 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_crc32_tables.h,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +static const php_hash_uint32 crc32_table[] = { 0x0, + 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, + 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, + 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, + 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, + 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, + 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, + 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, + 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, + 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, + 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe, + 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, + 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, + 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, + 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, + 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, + 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07, + 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, + 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, + 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, + 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, + 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, + 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, + 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f, + 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, + 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, + 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, + 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, + 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, + 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, + 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, + 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, + 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, + 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, + 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, + 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, + 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, + 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, + 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, + 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, + 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, + 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087, + 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, + 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, + 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, + 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, + 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, + 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09, + 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, + 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, + 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 +}; + +static const php_hash_uint32 crc32b_table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h new file mode 100644 index 000000000..c15ab2f7e --- /dev/null +++ b/ext/hash/php_hash_gost.h @@ -0,0 +1,47 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_gost.h,v 1.2.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_GOST_H +#define PHP_HASH_GOST_H + +#include "ext/standard/basic_functions.h" + +/* GOST context */ +typedef struct { + php_hash_uint32 state[16]; + php_hash_uint32 count[2]; + unsigned char length; + unsigned char buffer[32]; +} PHP_GOST_CTX; + +PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *); +PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *, const unsigned char *, size_t); +PHP_HASH_API void PHP_GOSTFinal(unsigned char[64], PHP_GOST_CTX *); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_gost_tables.h b/ext/hash/php_hash_gost_tables.h new file mode 100644 index 000000000..5d05e593c --- /dev/null +++ b/ext/hash/php_hash_gost_tables.h @@ -0,0 +1,138 @@ +static const php_hash_uint32 tables[4][256] = { + { /* table 1 */ + 0x00072000LU, 0x00075000LU, 0x00074800LU, 0x00071000LU, 0x00076800LU, 0x00074000LU, 0x00070000LU, 0x00077000LU, + 0x00073000LU, 0x00075800LU, 0x00070800LU, 0x00076000LU, 0x00073800LU, 0x00077800LU, 0x00072800LU, 0x00071800LU, + 0x0005A000LU, 0x0005D000LU, 0x0005C800LU, 0x00059000LU, 0x0005E800LU, 0x0005C000LU, 0x00058000LU, 0x0005F000LU, + 0x0005B000LU, 0x0005D800LU, 0x00058800LU, 0x0005E000LU, 0x0005B800LU, 0x0005F800LU, 0x0005A800LU, 0x00059800LU, + 0x00022000LU, 0x00025000LU, 0x00024800LU, 0x00021000LU, 0x00026800LU, 0x00024000LU, 0x00020000LU, 0x00027000LU, + 0x00023000LU, 0x00025800LU, 0x00020800LU, 0x00026000LU, 0x00023800LU, 0x00027800LU, 0x00022800LU, 0x00021800LU, + 0x00062000LU, 0x00065000LU, 0x00064800LU, 0x00061000LU, 0x00066800LU, 0x00064000LU, 0x00060000LU, 0x00067000LU, + 0x00063000LU, 0x00065800LU, 0x00060800LU, 0x00066000LU, 0x00063800LU, 0x00067800LU, 0x00062800LU, 0x00061800LU, + 0x00032000LU, 0x00035000LU, 0x00034800LU, 0x00031000LU, 0x00036800LU, 0x00034000LU, 0x00030000LU, 0x00037000LU, + 0x00033000LU, 0x00035800LU, 0x00030800LU, 0x00036000LU, 0x00033800LU, 0x00037800LU, 0x00032800LU, 0x00031800LU, + 0x0006A000LU, 0x0006D000LU, 0x0006C800LU, 0x00069000LU, 0x0006E800LU, 0x0006C000LU, 0x00068000LU, 0x0006F000LU, + 0x0006B000LU, 0x0006D800LU, 0x00068800LU, 0x0006E000LU, 0x0006B800LU, 0x0006F800LU, 0x0006A800LU, 0x00069800LU, + 0x0007A000LU, 0x0007D000LU, 0x0007C800LU, 0x00079000LU, 0x0007E800LU, 0x0007C000LU, 0x00078000LU, 0x0007F000LU, + 0x0007B000LU, 0x0007D800LU, 0x00078800LU, 0x0007E000LU, 0x0007B800LU, 0x0007F800LU, 0x0007A800LU, 0x00079800LU, + 0x00052000LU, 0x00055000LU, 0x00054800LU, 0x00051000LU, 0x00056800LU, 0x00054000LU, 0x00050000LU, 0x00057000LU, + 0x00053000LU, 0x00055800LU, 0x00050800LU, 0x00056000LU, 0x00053800LU, 0x00057800LU, 0x00052800LU, 0x00051800LU, + 0x00012000LU, 0x00015000LU, 0x00014800LU, 0x00011000LU, 0x00016800LU, 0x00014000LU, 0x00010000LU, 0x00017000LU, + 0x00013000LU, 0x00015800LU, 0x00010800LU, 0x00016000LU, 0x00013800LU, 0x00017800LU, 0x00012800LU, 0x00011800LU, + 0x0001A000LU, 0x0001D000LU, 0x0001C800LU, 0x00019000LU, 0x0001E800LU, 0x0001C000LU, 0x00018000LU, 0x0001F000LU, + 0x0001B000LU, 0x0001D800LU, 0x00018800LU, 0x0001E000LU, 0x0001B800LU, 0x0001F800LU, 0x0001A800LU, 0x00019800LU, + 0x00042000LU, 0x00045000LU, 0x00044800LU, 0x00041000LU, 0x00046800LU, 0x00044000LU, 0x00040000LU, 0x00047000LU, + 0x00043000LU, 0x00045800LU, 0x00040800LU, 0x00046000LU, 0x00043800LU, 0x00047800LU, 0x00042800LU, 0x00041800LU, + 0x0000A000LU, 0x0000D000LU, 0x0000C800LU, 0x00009000LU, 0x0000E800LU, 0x0000C000LU, 0x00008000LU, 0x0000F000LU, + 0x0000B000LU, 0x0000D800LU, 0x00008800LU, 0x0000E000LU, 0x0000B800LU, 0x0000F800LU, 0x0000A800LU, 0x00009800LU, + 0x00002000LU, 0x00005000LU, 0x00004800LU, 0x00001000LU, 0x00006800LU, 0x00004000LU, 0x00000000LU, 0x00007000LU, + 0x00003000LU, 0x00005800LU, 0x00000800LU, 0x00006000LU, 0x00003800LU, 0x00007800LU, 0x00002800LU, 0x00001800LU, + 0x0003A000LU, 0x0003D000LU, 0x0003C800LU, 0x00039000LU, 0x0003E800LU, 0x0003C000LU, 0x00038000LU, 0x0003F000LU, + 0x0003B000LU, 0x0003D800LU, 0x00038800LU, 0x0003E000LU, 0x0003B800LU, 0x0003F800LU, 0x0003A800LU, 0x00039800LU, + 0x0002A000LU, 0x0002D000LU, 0x0002C800LU, 0x00029000LU, 0x0002E800LU, 0x0002C000LU, 0x00028000LU, 0x0002F000LU, + 0x0002B000LU, 0x0002D800LU, 0x00028800LU, 0x0002E000LU, 0x0002B800LU, 0x0002F800LU, 0x0002A800LU, 0x00029800LU, + 0x0004A000LU, 0x0004D000LU, 0x0004C800LU, 0x00049000LU, 0x0004E800LU, 0x0004C000LU, 0x00048000LU, 0x0004F000LU, + 0x0004B000LU, 0x0004D800LU, 0x00048800LU, 0x0004E000LU, 0x0004B800LU, 0x0004F800LU, 0x0004A800LU, 0x00049800LU, + }, + { /* table 2 */ + 0x03A80000LU, 0x03C00000LU, 0x03880000LU, 0x03E80000LU, 0x03D00000LU, 0x03980000LU, 0x03A00000LU, 0x03900000LU, + 0x03F00000LU, 0x03F80000LU, 0x03E00000LU, 0x03B80000LU, 0x03B00000LU, 0x03800000LU, 0x03C80000LU, 0x03D80000LU, + 0x06A80000LU, 0x06C00000LU, 0x06880000LU, 0x06E80000LU, 0x06D00000LU, 0x06980000LU, 0x06A00000LU, 0x06900000LU, + 0x06F00000LU, 0x06F80000LU, 0x06E00000LU, 0x06B80000LU, 0x06B00000LU, 0x06800000LU, 0x06C80000LU, 0x06D80000LU, + 0x05280000LU, 0x05400000LU, 0x05080000LU, 0x05680000LU, 0x05500000LU, 0x05180000LU, 0x05200000LU, 0x05100000LU, + 0x05700000LU, 0x05780000LU, 0x05600000LU, 0x05380000LU, 0x05300000LU, 0x05000000LU, 0x05480000LU, 0x05580000LU, + 0x00A80000LU, 0x00C00000LU, 0x00880000LU, 0x00E80000LU, 0x00D00000LU, 0x00980000LU, 0x00A00000LU, 0x00900000LU, + 0x00F00000LU, 0x00F80000LU, 0x00E00000LU, 0x00B80000LU, 0x00B00000LU, 0x00800000LU, 0x00C80000LU, 0x00D80000LU, + 0x00280000LU, 0x00400000LU, 0x00080000LU, 0x00680000LU, 0x00500000LU, 0x00180000LU, 0x00200000LU, 0x00100000LU, + 0x00700000LU, 0x00780000LU, 0x00600000LU, 0x00380000LU, 0x00300000LU, 0x00000000LU, 0x00480000LU, 0x00580000LU, + 0x04280000LU, 0x04400000LU, 0x04080000LU, 0x04680000LU, 0x04500000LU, 0x04180000LU, 0x04200000LU, 0x04100000LU, + 0x04700000LU, 0x04780000LU, 0x04600000LU, 0x04380000LU, 0x04300000LU, 0x04000000LU, 0x04480000LU, 0x04580000LU, + 0x04A80000LU, 0x04C00000LU, 0x04880000LU, 0x04E80000LU, 0x04D00000LU, 0x04980000LU, 0x04A00000LU, 0x04900000LU, + 0x04F00000LU, 0x04F80000LU, 0x04E00000LU, 0x04B80000LU, 0x04B00000LU, 0x04800000LU, 0x04C80000LU, 0x04D80000LU, + 0x07A80000LU, 0x07C00000LU, 0x07880000LU, 0x07E80000LU, 0x07D00000LU, 0x07980000LU, 0x07A00000LU, 0x07900000LU, + 0x07F00000LU, 0x07F80000LU, 0x07E00000LU, 0x07B80000LU, 0x07B00000LU, 0x07800000LU, 0x07C80000LU, 0x07D80000LU, + 0x07280000LU, 0x07400000LU, 0x07080000LU, 0x07680000LU, 0x07500000LU, 0x07180000LU, 0x07200000LU, 0x07100000LU, + 0x07700000LU, 0x07780000LU, 0x07600000LU, 0x07380000LU, 0x07300000LU, 0x07000000LU, 0x07480000LU, 0x07580000LU, + 0x02280000LU, 0x02400000LU, 0x02080000LU, 0x02680000LU, 0x02500000LU, 0x02180000LU, 0x02200000LU, 0x02100000LU, + 0x02700000LU, 0x02780000LU, 0x02600000LU, 0x02380000LU, 0x02300000LU, 0x02000000LU, 0x02480000LU, 0x02580000LU, + 0x03280000LU, 0x03400000LU, 0x03080000LU, 0x03680000LU, 0x03500000LU, 0x03180000LU, 0x03200000LU, 0x03100000LU, + 0x03700000LU, 0x03780000LU, 0x03600000LU, 0x03380000LU, 0x03300000LU, 0x03000000LU, 0x03480000LU, 0x03580000LU, + 0x06280000LU, 0x06400000LU, 0x06080000LU, 0x06680000LU, 0x06500000LU, 0x06180000LU, 0x06200000LU, 0x06100000LU, + 0x06700000LU, 0x06780000LU, 0x06600000LU, 0x06380000LU, 0x06300000LU, 0x06000000LU, 0x06480000LU, 0x06580000LU, + 0x05A80000LU, 0x05C00000LU, 0x05880000LU, 0x05E80000LU, 0x05D00000LU, 0x05980000LU, 0x05A00000LU, 0x05900000LU, + 0x05F00000LU, 0x05F80000LU, 0x05E00000LU, 0x05B80000LU, 0x05B00000LU, 0x05800000LU, 0x05C80000LU, 0x05D80000LU, + 0x01280000LU, 0x01400000LU, 0x01080000LU, 0x01680000LU, 0x01500000LU, 0x01180000LU, 0x01200000LU, 0x01100000LU, + 0x01700000LU, 0x01780000LU, 0x01600000LU, 0x01380000LU, 0x01300000LU, 0x01000000LU, 0x01480000LU, 0x01580000LU, + 0x02A80000LU, 0x02C00000LU, 0x02880000LU, 0x02E80000LU, 0x02D00000LU, 0x02980000LU, 0x02A00000LU, 0x02900000LU, + 0x02F00000LU, 0x02F80000LU, 0x02E00000LU, 0x02B80000LU, 0x02B00000LU, 0x02800000LU, 0x02C80000LU, 0x02D80000LU, + 0x01A80000LU, 0x01C00000LU, 0x01880000LU, 0x01E80000LU, 0x01D00000LU, 0x01980000LU, 0x01A00000LU, 0x01900000LU, + 0x01F00000LU, 0x01F80000LU, 0x01E00000LU, 0x01B80000LU, 0x01B00000LU, 0x01800000LU, 0x01C80000LU, 0x01D80000LU, + }, + { /* table 3 */ + 0x30000002LU, 0x60000002LU, 0x38000002LU, 0x08000002LU, 0x28000002LU, 0x78000002LU, 0x68000002LU, 0x40000002LU, + 0x20000002LU, 0x50000002LU, 0x48000002LU, 0x70000002LU, 0x00000002LU, 0x18000002LU, 0x58000002LU, 0x10000002LU, + 0xB0000005LU, 0xE0000005LU, 0xB8000005LU, 0x88000005LU, 0xA8000005LU, 0xF8000005LU, 0xE8000005LU, 0xC0000005LU, + 0xA0000005LU, 0xD0000005LU, 0xC8000005LU, 0xF0000005LU, 0x80000005LU, 0x98000005LU, 0xD8000005LU, 0x90000005LU, + 0x30000005LU, 0x60000005LU, 0x38000005LU, 0x08000005LU, 0x28000005LU, 0x78000005LU, 0x68000005LU, 0x40000005LU, + 0x20000005LU, 0x50000005LU, 0x48000005LU, 0x70000005LU, 0x00000005LU, 0x18000005LU, 0x58000005LU, 0x10000005LU, + 0x30000000LU, 0x60000000LU, 0x38000000LU, 0x08000000LU, 0x28000000LU, 0x78000000LU, 0x68000000LU, 0x40000000LU, + 0x20000000LU, 0x50000000LU, 0x48000000LU, 0x70000000LU, 0x00000000LU, 0x18000000LU, 0x58000000LU, 0x10000000LU, + 0xB0000003LU, 0xE0000003LU, 0xB8000003LU, 0x88000003LU, 0xA8000003LU, 0xF8000003LU, 0xE8000003LU, 0xC0000003LU, + 0xA0000003LU, 0xD0000003LU, 0xC8000003LU, 0xF0000003LU, 0x80000003LU, 0x98000003LU, 0xD8000003LU, 0x90000003LU, + 0x30000001LU, 0x60000001LU, 0x38000001LU, 0x08000001LU, 0x28000001LU, 0x78000001LU, 0x68000001LU, 0x40000001LU, + 0x20000001LU, 0x50000001LU, 0x48000001LU, 0x70000001LU, 0x00000001LU, 0x18000001LU, 0x58000001LU, 0x10000001LU, + 0xB0000000LU, 0xE0000000LU, 0xB8000000LU, 0x88000000LU, 0xA8000000LU, 0xF8000000LU, 0xE8000000LU, 0xC0000000LU, + 0xA0000000LU, 0xD0000000LU, 0xC8000000LU, 0xF0000000LU, 0x80000000LU, 0x98000000LU, 0xD8000000LU, 0x90000000LU, + 0xB0000006LU, 0xE0000006LU, 0xB8000006LU, 0x88000006LU, 0xA8000006LU, 0xF8000006LU, 0xE8000006LU, 0xC0000006LU, + 0xA0000006LU, 0xD0000006LU, 0xC8000006LU, 0xF0000006LU, 0x80000006LU, 0x98000006LU, 0xD8000006LU, 0x90000006LU, + 0xB0000001LU, 0xE0000001LU, 0xB8000001LU, 0x88000001LU, 0xA8000001LU, 0xF8000001LU, 0xE8000001LU, 0xC0000001LU, + 0xA0000001LU, 0xD0000001LU, 0xC8000001LU, 0xF0000001LU, 0x80000001LU, 0x98000001LU, 0xD8000001LU, 0x90000001LU, + 0x30000003LU, 0x60000003LU, 0x38000003LU, 0x08000003LU, 0x28000003LU, 0x78000003LU, 0x68000003LU, 0x40000003LU, + 0x20000003LU, 0x50000003LU, 0x48000003LU, 0x70000003LU, 0x00000003LU, 0x18000003LU, 0x58000003LU, 0x10000003LU, + 0x30000004LU, 0x60000004LU, 0x38000004LU, 0x08000004LU, 0x28000004LU, 0x78000004LU, 0x68000004LU, 0x40000004LU, + 0x20000004LU, 0x50000004LU, 0x48000004LU, 0x70000004LU, 0x00000004LU, 0x18000004LU, 0x58000004LU, 0x10000004LU, + 0xB0000002LU, 0xE0000002LU, 0xB8000002LU, 0x88000002LU, 0xA8000002LU, 0xF8000002LU, 0xE8000002LU, 0xC0000002LU, + 0xA0000002LU, 0xD0000002LU, 0xC8000002LU, 0xF0000002LU, 0x80000002LU, 0x98000002LU, 0xD8000002LU, 0x90000002LU, + 0xB0000004LU, 0xE0000004LU, 0xB8000004LU, 0x88000004LU, 0xA8000004LU, 0xF8000004LU, 0xE8000004LU, 0xC0000004LU, + 0xA0000004LU, 0xD0000004LU, 0xC8000004LU, 0xF0000004LU, 0x80000004LU, 0x98000004LU, 0xD8000004LU, 0x90000004LU, + 0x30000006LU, 0x60000006LU, 0x38000006LU, 0x08000006LU, 0x28000006LU, 0x78000006LU, 0x68000006LU, 0x40000006LU, + 0x20000006LU, 0x50000006LU, 0x48000006LU, 0x70000006LU, 0x00000006LU, 0x18000006LU, 0x58000006LU, 0x10000006LU, + 0xB0000007LU, 0xE0000007LU, 0xB8000007LU, 0x88000007LU, 0xA8000007LU, 0xF8000007LU, 0xE8000007LU, 0xC0000007LU, + 0xA0000007LU, 0xD0000007LU, 0xC8000007LU, 0xF0000007LU, 0x80000007LU, 0x98000007LU, 0xD8000007LU, 0x90000007LU, + 0x30000007LU, 0x60000007LU, 0x38000007LU, 0x08000007LU, 0x28000007LU, 0x78000007LU, 0x68000007LU, 0x40000007LU, + 0x20000007LU, 0x50000007LU, 0x48000007LU, 0x70000007LU, 0x00000007LU, 0x18000007LU, 0x58000007LU, 0x10000007LU, + }, + { /* table 4 */ + 0x000000E8LU, 0x000000D8LU, 0x000000A0LU, 0x00000088LU, 0x00000098LU, 0x000000F8LU, 0x000000A8LU, 0x000000C8LU, + 0x00000080LU, 0x000000D0LU, 0x000000F0LU, 0x000000B8LU, 0x000000B0LU, 0x000000C0LU, 0x00000090LU, 0x000000E0LU, + 0x000007E8LU, 0x000007D8LU, 0x000007A0LU, 0x00000788LU, 0x00000798LU, 0x000007F8LU, 0x000007A8LU, 0x000007C8LU, + 0x00000780LU, 0x000007D0LU, 0x000007F0LU, 0x000007B8LU, 0x000007B0LU, 0x000007C0LU, 0x00000790LU, 0x000007E0LU, + 0x000006E8LU, 0x000006D8LU, 0x000006A0LU, 0x00000688LU, 0x00000698LU, 0x000006F8LU, 0x000006A8LU, 0x000006C8LU, + 0x00000680LU, 0x000006D0LU, 0x000006F0LU, 0x000006B8LU, 0x000006B0LU, 0x000006C0LU, 0x00000690LU, 0x000006E0LU, + 0x00000068LU, 0x00000058LU, 0x00000020LU, 0x00000008LU, 0x00000018LU, 0x00000078LU, 0x00000028LU, 0x00000048LU, + 0x00000000LU, 0x00000050LU, 0x00000070LU, 0x00000038LU, 0x00000030LU, 0x00000040LU, 0x00000010LU, 0x00000060LU, + 0x000002E8LU, 0x000002D8LU, 0x000002A0LU, 0x00000288LU, 0x00000298LU, 0x000002F8LU, 0x000002A8LU, 0x000002C8LU, + 0x00000280LU, 0x000002D0LU, 0x000002F0LU, 0x000002B8LU, 0x000002B0LU, 0x000002C0LU, 0x00000290LU, 0x000002E0LU, + 0x000003E8LU, 0x000003D8LU, 0x000003A0LU, 0x00000388LU, 0x00000398LU, 0x000003F8LU, 0x000003A8LU, 0x000003C8LU, + 0x00000380LU, 0x000003D0LU, 0x000003F0LU, 0x000003B8LU, 0x000003B0LU, 0x000003C0LU, 0x00000390LU, 0x000003E0LU, + 0x00000568LU, 0x00000558LU, 0x00000520LU, 0x00000508LU, 0x00000518LU, 0x00000578LU, 0x00000528LU, 0x00000548LU, + 0x00000500LU, 0x00000550LU, 0x00000570LU, 0x00000538LU, 0x00000530LU, 0x00000540LU, 0x00000510LU, 0x00000560LU, + 0x00000268LU, 0x00000258LU, 0x00000220LU, 0x00000208LU, 0x00000218LU, 0x00000278LU, 0x00000228LU, 0x00000248LU, + 0x00000200LU, 0x00000250LU, 0x00000270LU, 0x00000238LU, 0x00000230LU, 0x00000240LU, 0x00000210LU, 0x00000260LU, + 0x000004E8LU, 0x000004D8LU, 0x000004A0LU, 0x00000488LU, 0x00000498LU, 0x000004F8LU, 0x000004A8LU, 0x000004C8LU, + 0x00000480LU, 0x000004D0LU, 0x000004F0LU, 0x000004B8LU, 0x000004B0LU, 0x000004C0LU, 0x00000490LU, 0x000004E0LU, + 0x00000168LU, 0x00000158LU, 0x00000120LU, 0x00000108LU, 0x00000118LU, 0x00000178LU, 0x00000128LU, 0x00000148LU, + 0x00000100LU, 0x00000150LU, 0x00000170LU, 0x00000138LU, 0x00000130LU, 0x00000140LU, 0x00000110LU, 0x00000160LU, + 0x000001E8LU, 0x000001D8LU, 0x000001A0LU, 0x00000188LU, 0x00000198LU, 0x000001F8LU, 0x000001A8LU, 0x000001C8LU, + 0x00000180LU, 0x000001D0LU, 0x000001F0LU, 0x000001B8LU, 0x000001B0LU, 0x000001C0LU, 0x00000190LU, 0x000001E0LU, + 0x00000768LU, 0x00000758LU, 0x00000720LU, 0x00000708LU, 0x00000718LU, 0x00000778LU, 0x00000728LU, 0x00000748LU, + 0x00000700LU, 0x00000750LU, 0x00000770LU, 0x00000738LU, 0x00000730LU, 0x00000740LU, 0x00000710LU, 0x00000760LU, + 0x00000368LU, 0x00000358LU, 0x00000320LU, 0x00000308LU, 0x00000318LU, 0x00000378LU, 0x00000328LU, 0x00000348LU, + 0x00000300LU, 0x00000350LU, 0x00000370LU, 0x00000338LU, 0x00000330LU, 0x00000340LU, 0x00000310LU, 0x00000360LU, + 0x000005E8LU, 0x000005D8LU, 0x000005A0LU, 0x00000588LU, 0x00000598LU, 0x000005F8LU, 0x000005A8LU, 0x000005C8LU, + 0x00000580LU, 0x000005D0LU, 0x000005F0LU, 0x000005B8LU, 0x000005B0LU, 0x000005C0LU, 0x00000590LU, 0x000005E0LU, + 0x00000468LU, 0x00000458LU, 0x00000420LU, 0x00000408LU, 0x00000418LU, 0x00000478LU, 0x00000428LU, 0x00000448LU, + 0x00000400LU, 0x00000450LU, 0x00000470LU, 0x00000438LU, 0x00000430LU, 0x00000440LU, 0x00000410LU, 0x00000460LU, + 0x00000668LU, 0x00000658LU, 0x00000620LU, 0x00000608LU, 0x00000618LU, 0x00000678LU, 0x00000628LU, 0x00000648LU, + 0x00000600LU, 0x00000650LU, 0x00000670LU, 0x00000638LU, 0x00000630LU, 0x00000640LU, 0x00000610LU, 0x00000660LU, + }, +}; diff --git a/ext/hash/php_hash_haval.h b/ext/hash/php_hash_haval.h new file mode 100644 index 000000000..1b7e7e72f --- /dev/null +++ b/ext/hash/php_hash_haval.h @@ -0,0 +1,59 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_haval.h,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_HAVAL_H +#define PHP_HASH_HAVAL_H + +#include "ext/standard/basic_functions.h" +/* HAVAL context. */ +typedef struct { + php_hash_uint32 state[8]; + php_hash_uint32 count[2]; + unsigned char buffer[128]; + + char passes; + short output; + void (*Transform)(php_hash_uint32 state[8], const unsigned char block[128]); +} PHP_HAVAL_CTX; + +#define PHP_HASH_HAVAL_INIT_DECL(p,b) PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *); \ + PHP_HASH_API void PHP_HAVAL##b##Final(unsigned char*, PHP_HAVAL_CTX *); + +PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *, const unsigned char *, unsigned int); + +PHP_HASH_HAVAL_INIT_DECL(3,128) +PHP_HASH_HAVAL_INIT_DECL(3,160) +PHP_HASH_HAVAL_INIT_DECL(3,192) +PHP_HASH_HAVAL_INIT_DECL(3,224) +PHP_HASH_HAVAL_INIT_DECL(3,256) + +PHP_HASH_HAVAL_INIT_DECL(4,128) +PHP_HASH_HAVAL_INIT_DECL(4,160) +PHP_HASH_HAVAL_INIT_DECL(4,192) +PHP_HASH_HAVAL_INIT_DECL(4,224) +PHP_HASH_HAVAL_INIT_DECL(4,256) + +PHP_HASH_HAVAL_INIT_DECL(5,128) +PHP_HASH_HAVAL_INIT_DECL(5,160) +PHP_HASH_HAVAL_INIT_DECL(5,192) +PHP_HASH_HAVAL_INIT_DECL(5,224) +PHP_HASH_HAVAL_INIT_DECL(5,256) + +#endif diff --git a/ext/hash/php_hash_md.h b/ext/hash/php_hash_md.h new file mode 100644 index 000000000..6f457d7d8 --- /dev/null +++ b/ext/hash/php_hash_md.h @@ -0,0 +1,88 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Original Author: Rasmus Lerdorf | + | Modified for pHASH by: Sara Golemon + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_md.h,v 1.2.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_MD_H +#define PHP_HASH_MD_H + +/* When SHA is removed from Core, + the ext/standard/sha1.c file can be removed + and the ext/standard/sha1.h file can be reduced to: + #define PHP_HASH_SHA1_NOT_IN_CORE + #include "ext/hash/php_hash_sha.h" + Don't forget to remove md5() and md5_file() entries from basic_functions.c + */ + +#include "ext/standard/md5.h" + +#ifdef PHP_HASH_MD5_NOT_IN_CORE +/* MD5.H - header file for MD5C.C + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. + */ + +/* MD5 context. */ +typedef struct { + php_hash_uint32 state[4]; /* state (ABCD) */ + php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} PHP_MD5_CTX; + +PHP_HASH_API void make_digest(char *md5str, unsigned char *digest); +PHP_HASH_API void PHP_MD5Init(PHP_MD5_CTX *); +PHP_HASH_API void PHP_MD5Update(PHP_MD5_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_MD5Final(unsigned char[16], PHP_MD5_CTX *); + +PHP_NAMED_FUNCTION(php_if_md5); +PHP_NAMED_FUNCTION(php_if_md5_file); +#endif /* PHP_HASH_MD5_NOT_IN_CORE */ + +/* MD4 context */ +typedef struct { + php_hash_uint32 state[4]; + php_hash_uint32 count[2]; + unsigned char buffer[64]; +} PHP_MD4_CTX; + +#define PHP_MD4Init PHP_MD5Init +PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX *context, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_MD4Final(unsigned char[16], PHP_MD4_CTX *); + +#endif diff --git a/ext/hash/php_hash_ripemd.h b/ext/hash/php_hash_ripemd.h new file mode 100644 index 000000000..97cf1aa08 --- /dev/null +++ b/ext/hash/php_hash_ripemd.h @@ -0,0 +1,46 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_ripemd.h,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_RIPEMD_H +#define PHP_HASH_RIPEMD_H +#include "ext/standard/basic_functions.h" + +/* RIPEMD context. */ +typedef struct { + php_hash_uint32 state[4]; /* state (ABCD) */ + php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} PHP_RIPEMD128_CTX; + +typedef struct { + php_hash_uint32 state[5]; /* state (ABCD) */ + php_hash_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} PHP_RIPEMD160_CTX; + +PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX *); +PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_RIPEMD128Final(unsigned char[16], PHP_RIPEMD128_CTX *); + +PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX *); +PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_RIPEMD160Final(unsigned char[20], PHP_RIPEMD160_CTX *); + +#endif /* PHP_HASH_RIPEMD_H */ diff --git a/ext/hash/php_hash_salsa.h b/ext/hash/php_hash_salsa.h new file mode 100644 index 000000000..12b0da4d2 --- /dev/null +++ b/ext/hash/php_hash_salsa.h @@ -0,0 +1,51 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_salsa.h,v 1.4.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_SALSA_H +#define PHP_HASH_SALSA_H + +#include "ext/standard/basic_functions.h" + +/* SALSA context */ +typedef struct { + php_hash_uint32 state[16]; + unsigned char init:1; + unsigned char length:7; + unsigned char buffer[64]; + void (*Transform)(php_hash_uint32 state[16], php_hash_uint32 data[16]); +} PHP_SALSA_CTX; + +#define PHP_SALSAInit PHP_SALSA20Init +PHP_HASH_API void PHP_SALSA10Init(PHP_SALSA_CTX *); +PHP_HASH_API void PHP_SALSA20Init(PHP_SALSA_CTX *); + +PHP_HASH_API void PHP_SALSAUpdate(PHP_SALSA_CTX *, const unsigned char *, size_t); +PHP_HASH_API void PHP_SALSAFinal(unsigned char[64], PHP_SALSA_CTX *); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h new file mode 100644 index 000000000..b4474cf30 --- /dev/null +++ b/ext/hash/php_hash_sha.h @@ -0,0 +1,86 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | SHA1 Author: Stefan Esser | + | SHA256 Author: Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_sha.h,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_SHA_H +#define PHP_HASH_SHA_H + +/* When SHA is removed from Core, + the ext/standard/sha1.c file can be removed + and the ext/standard/sha1.h file can be reduced to: + #define PHP_HASH_SHA1_NOT_IN_CORE + #include "ext/hash/php_hash_sha.h" + Don't forget to remove sha1() and sha1_file() from basic_functions.c + */ +#include "ext/standard/sha1.h" +#include "ext/standard/basic_functions.h" + +#ifdef PHP_HASH_SHA1_NOT_IN_CORE + +/* SHA1 context. */ +typedef struct { + php_hash_uint32 state[5]; /* state (ABCD) */ + php_hash_uint32 count[2]; /* number of bits, modulo 2^64 */ + unsigned char buffer[64]; /* input buffer */ +} PHP_SHA1_CTX; + +PHP_HASH_API void PHP_SHA1Init(PHP_SHA1_CTX *); +PHP_HASH_API void PHP_SHA1Update(PHP_SHA1_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_SHA1Final(unsigned char[20], PHP_SHA1_CTX *); + +PHP_FUNCTION(sha1); +PHP_FUNCTION(sha1_file); + +#endif /* PHP_HASH_SHA1_NOT_IN_CORE */ + +/* SHA256 context. */ +typedef struct { + php_hash_uint32 state[8]; /* state */ + php_hash_uint32 count[2]; /* number of bits, modulo 2^64 */ + unsigned char buffer[64]; /* input buffer */ +} PHP_SHA256_CTX; + +PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX *); +PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_SHA256Final(unsigned char[32], PHP_SHA256_CTX *); + +/* SHA384 context */ +typedef struct { + php_hash_uint64 state[8]; /* state */ + php_hash_uint64 count[2]; /* number of bits, modulo 2^128 */ + unsigned char buffer[128]; /* input buffer */ +} PHP_SHA384_CTX; + +PHP_HASH_API void PHP_SHA384Init(PHP_SHA384_CTX *); +PHP_HASH_API void PHP_SHA384Update(PHP_SHA384_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_SHA384Final(unsigned char[48], PHP_SHA384_CTX *); + +/* SHA512 context */ +typedef struct { + php_hash_uint64 state[8]; /* state */ + php_hash_uint64 count[2]; /* number of bits, modulo 2^128 */ + unsigned char buffer[128]; /* input buffer */ +} PHP_SHA512_CTX; + +PHP_HASH_API void PHP_SHA512Init(PHP_SHA512_CTX *); +PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX *, const unsigned char *, unsigned int); +PHP_HASH_API void PHP_SHA512Final(unsigned char[64], PHP_SHA512_CTX *); + +#endif /* PHP_HASH_SHA_H */ diff --git a/ext/hash/php_hash_snefru.h b/ext/hash/php_hash_snefru.h new file mode 100644 index 000000000..0709c0a00 --- /dev/null +++ b/ext/hash/php_hash_snefru.h @@ -0,0 +1,51 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_snefru.h,v 1.2.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_SNEFRU_H +#define PHP_HASH_SNEFRU_H + +/* SNEFRU-2.5a with 8 passes and 256 bit hash output + * AKA "Xerox Secure Hash Function" + */ + +#include "ext/standard/basic_functions.h" + +/* SNEFRU context */ +typedef struct { + php_hash_uint32 state[16]; + php_hash_uint32 count[2]; + unsigned char length; + unsigned char buffer[32]; +} PHP_SNEFRU_CTX; + +PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *); +PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *, const unsigned char *, size_t); +PHP_HASH_API void PHP_SNEFRUFinal(unsigned char[32], PHP_SNEFRU_CTX *); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_snefru_tables.h b/ext/hash/php_hash_snefru_tables.h new file mode 100644 index 000000000..3f501f59e --- /dev/null +++ b/ext/hash/php_hash_snefru_tables.h @@ -0,0 +1,942 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_snefru_tables.h,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +static const php_hash_uint32 tables[16][256]= { + + { /* Start of S Box 0 */ + +/* 0*/ 0x64f9001bL,0xfeddcdf6L,0x7c8ff1e2L,0x11d71514L,0x8b8c18d3L, +/* 5*/ 0xdddf881eL,0x6eab5056L,0x88ced8e1L,0x49148959L,0x69c56fd5L, +/* 10*/ 0xb7994f03L,0x0fbcee3eL,0x3c264940L,0x21557e58L,0xe14b3fc2L, +/* 15*/ 0x2e5cf591L,0xdceff8ceL,0x092a1648L,0xbe812936L,0xff7b0c6aL, +/* 20*/ 0xd5251037L,0xafa448f1L,0x7dafc95aL,0x1ea69c3fL,0xa417abe7L, +/* 25*/ 0x5890e423L,0xb0cb70c0L,0xc85025f7L,0x244d97e3L,0x1ff3595fL, +/* 30*/ 0xc4ec6396L,0x59181e17L,0xe635b477L,0x354e7dbfL,0x796f7753L, +/* 35*/ 0x66eb52ccL,0x77c3f995L,0x32e3a927L,0x80ccaed6L,0x4e2be89dL, +/* 40*/ 0x375bbd28L,0xad1a3d05L,0x2b1b42b3L,0x16c44c71L,0x4d54bfa8L, +/* 45*/ 0xe57ddc7aL,0xec6d8144L,0x5a71046bL,0xd8229650L,0x87fc8f24L, +/* 50*/ 0xcbc60e09L,0xb6390366L,0xd9f76092L,0xd393a70bL,0x1d31a08aL, +/* 55*/ 0x9cd971c9L,0x5c1ef445L,0x86fab694L,0xfdb44165L,0x8eaafcbeL, +/* 60*/ 0x4bcac6ebL,0xfb7a94e5L,0x5789d04eL,0xfa13cf35L,0x236b8da9L, +/* 65*/ 0x4133f000L,0x6224261cL,0xf412f23bL,0xe75e56a4L,0x30022116L, +/* 70*/ 0xbaf17f1fL,0xd09872f9L,0xc1a3699cL,0xf1e802aaL,0x0dd145dcL, +/* 75*/ 0x4fdce093L,0x8d8412f0L,0x6cd0f376L,0x3de6b73dL,0x84ba737fL, +/* 80*/ 0xb43a30f2L,0x44569f69L,0x00e4eacaL,0xb58de3b0L,0x959113c8L, +/* 85*/ 0xd62efee9L,0x90861f83L,0xced69874L,0x2f793ceeL,0xe8571c30L, +/* 90*/ 0x483665d1L,0xab07b031L,0x914c844fL,0x15bf3be8L,0x2c3f2a9aL, +/* 95*/ 0x9eb95fd4L,0x92e7472dL,0x2297cc5bL,0xee5f2782L,0x5377b562L, +/* 100*/ 0xdb8ebbcfL,0xf961deddL,0xc59b5c60L,0x1bd3910dL,0x26d206adL, +/* 105*/ 0xb28514d8L,0x5ecf6b52L,0x7fea78bbL,0x504879acL,0xed34a884L, +/* 110*/ 0x36e51d3cL,0x1753741dL,0x8c47caedL,0x9d0a40efL,0x3145e221L, +/* 115*/ 0xda27eb70L,0xdf730ba3L,0x183c8789L,0x739ac0a6L,0x9a58dfc6L, +/* 120*/ 0x54b134c1L,0xac3e242eL,0xcc493902L,0x7b2dda99L,0x8f15bc01L, +/* 125*/ 0x29fd38c7L,0x27d5318fL,0x604aaff5L,0xf29c6818L,0xc38aa2ecL, +/* 130*/ 0x1019d4c3L,0xa8fb936eL,0x20ed7b39L,0x0b686119L,0x89a0906fL, +/* 135*/ 0x1cc7829eL,0x9952ef4bL,0x850e9e8cL,0xcd063a90L,0x67002f8eL, +/* 140*/ 0xcfac8cb7L,0xeaa24b11L,0x988b4e6cL,0x46f066dfL,0xca7eec08L, +/* 145*/ 0xc7bba664L,0x831d17bdL,0x63f575e6L,0x9764350eL,0x47870d42L, +/* 150*/ 0x026ca4a2L,0x8167d587L,0x61b6adabL,0xaa6564d2L,0x70da237bL, +/* 155*/ 0x25e1c74aL,0xa1c901a0L,0x0eb0a5daL,0x7670f741L,0x51c05aeaL, +/* 160*/ 0x933dfa32L,0x0759ff1aL,0x56010ab8L,0x5fdecb78L,0x3f32edf8L, +/* 165*/ 0xaebedbb9L,0x39f8326dL,0xd20858c5L,0x9b638be4L,0xa572c80aL, +/* 170*/ 0x28e0a19fL,0x432099fcL,0x3a37c3cdL,0xbf95c585L,0xb392c12aL, +/* 175*/ 0x6aa707d7L,0x52f66a61L,0x12d483b1L,0x96435b5eL,0x3e75802bL, +/* 180*/ 0x3ba52b33L,0xa99f51a5L,0xbda1e157L,0x78c2e70cL,0xfcae7ce0L, +/* 185*/ 0xd1602267L,0x2affac4dL,0x4a510947L,0x0ab2b83aL,0x7a04e579L, +/* 190*/ 0x340dfd80L,0xb916e922L,0xe29d5e9bL,0xf5624af4L,0x4ca9d9afL, +/* 195*/ 0x6bbd2cfeL,0xe3b7f620L,0xc2746e07L,0x5b42b9b6L,0xa06919bcL, +/* 200*/ 0xf0f2c40fL,0x72217ab5L,0x14c19df3L,0xf3802daeL,0xe094beb4L, +/* 205*/ 0xa2101affL,0x0529575dL,0x55cdb27cL,0xa33bddb2L,0x6528b37dL, +/* 210*/ 0x740c05dbL,0xe96a62c4L,0x40782846L,0x6d30d706L,0xbbf48e2cL, +/* 215*/ 0xbce2d3deL,0x049e37faL,0x01b5e634L,0x2d886d8dL,0x7e5a2e7eL, +/* 220*/ 0xd7412013L,0x06e90f97L,0xe45d3ebaL,0xb8ad3386L,0x13051b25L, +/* 225*/ 0x0c035354L,0x71c89b75L,0xc638fbd0L,0x197f11a1L,0xef0f08fbL, +/* 230*/ 0xf8448651L,0x38409563L,0x452f4443L,0x5d464d55L,0x03d8764cL, +/* 235*/ 0xb1b8d638L,0xa70bba2fL,0x94b3d210L,0xeb6692a7L,0xd409c2d9L, +/* 240*/ 0x68838526L,0xa6db8a15L,0x751f6c98L,0xde769a88L,0xc9ee4668L, +/* 245*/ 0x1a82a373L,0x0896aa49L,0x42233681L,0xf62c55cbL,0x9f1c5404L, +/* 250*/ 0xf74fb15cL,0xc06e4312L,0x6ffe5d72L,0x8aa8678bL,0x337cd129L, +/* 255*/ 0x8211cefdL + /* End of S Box 0 */ }, + + + { /* Start of S Box 1 */ + +/* 0*/ 0x074a1d09L,0x52a10e5aL,0x9275a3f8L,0x4b82506cL,0x37df7e1bL, +/* 5*/ 0x4c78b3c5L,0xcefab1daL,0xf472267eL,0xb63045f6L,0xd66a1fc0L, +/* 10*/ 0x400298e3L,0x27e60c94L,0x87d2f1b8L,0xdf9e56ccL,0x45cd1803L, +/* 15*/ 0x1d35e098L,0xcce7c736L,0x03483bf1L,0x1f7307d7L,0xc6e8f948L, +/* 20*/ 0xe613c111L,0x3955c6ffL,0x1170ed7cL,0x8e95da41L,0x99c31bf4L, +/* 25*/ 0xa4da8021L,0x7b5f94fbL,0xdd0da51fL,0x6562aa77L,0x556bcb23L, +/* 30*/ 0xdb1bacc6L,0x798040b9L,0xbfe5378fL,0x731d55e6L,0xdaa5bfeeL, +/* 35*/ 0x389bbc60L,0x1b33fba4L,0x9c567204L,0x36c26c68L,0x77ee9d69L, +/* 40*/ 0x8aeb3e88L,0x2d50b5ceL,0x9579e790L,0x42b13cfcL,0x33fbd32bL, +/* 45*/ 0xee0503a7L,0xb5862824L,0x15e41eadL,0xc8412ef7L,0x9d441275L, +/* 50*/ 0x2fcec582L,0x5ff483b7L,0x8f3931dfL,0x2e5d2a7bL,0x49467bf9L, +/* 55*/ 0x0653dea9L,0x2684ce35L,0x7e655e5cL,0xf12771d8L,0xbb15cc67L, +/* 60*/ 0xab097ca1L,0x983dcf52L,0x10ddf026L,0x21267f57L,0x2c58f6b4L, +/* 65*/ 0x31043265L,0x0bab8c01L,0xd5492099L,0xacaae619L,0x944ce54aL, +/* 70*/ 0xf2d13d39L,0xadd3fc32L,0xcda08a40L,0xe2b0d451L,0x9efe08aeL, +/* 75*/ 0xb9d50fd2L,0xea5cd7fdL,0xc9a749ddL,0x13ea2253L,0x832debaaL, +/* 80*/ 0x24be640fL,0xe03e926aL,0x29e01cdeL,0x8bf59f18L,0x0f9d00b6L, +/* 85*/ 0xe1238b46L,0x1e7d8e34L,0x93619adbL,0x76b32f9fL,0xbd972cecL, +/* 90*/ 0xe31fa976L,0xa68fbb10L,0xfb3ba49dL,0x8587c41dL,0xa5add1d0L, +/* 95*/ 0xf3cf84bfL,0xd4e11150L,0xd9ffa6bcL,0xc3f6018cL,0xaef10572L, +/* 100*/ 0x74a64b2fL,0xe7dc9559L,0x2aae35d5L,0x5b6f587fL,0xa9e353feL, +/* 105*/ 0xca4fb674L,0x04ba24a8L,0xe5c6875fL,0xdcbc6266L,0x6bc5c03fL, +/* 110*/ 0x661eef02L,0xed740babL,0x058e34e4L,0xb7e946cfL,0x88698125L, +/* 115*/ 0x72ec48edL,0xb11073a3L,0xa13485ebL,0xa2a2429cL,0xfa407547L, +/* 120*/ 0x50b76713L,0x5418c37dL,0x96192da5L,0x170bb04bL,0x518a021eL, +/* 125*/ 0xb0ac13d1L,0x0963fa2aL,0x4a6e10e1L,0x58472bdcL,0xf7f8d962L, +/* 130*/ 0x979139eaL,0x8d856538L,0xc0997042L,0x48324d7aL,0x447623cbL, +/* 135*/ 0x8cbbe364L,0x6e0c6b0eL,0xd36d63b0L,0x3f244c84L,0x3542c971L, +/* 140*/ 0x2b228dc1L,0xcb0325bbL,0xf8c0d6e9L,0xde11066bL,0xa8649327L, +/* 145*/ 0xfc31f83eL,0x7dd80406L,0xf916dd61L,0xd89f79d3L,0x615144c2L, +/* 150*/ 0xebb45d31L,0x28002958L,0x56890a37L,0xf05b3808L,0x123ae844L, +/* 155*/ 0x86839e16L,0x914b0d83L,0xc506b43cL,0xcf3cba5eL,0x7c60f5c9L, +/* 160*/ 0x22deb2a0L,0x5d9c2715L,0xc77ba0efL,0x4f45360bL,0xc1017d8bL, +/* 165*/ 0xe45adc29L,0xa759909bL,0x412cd293L,0xd7d796b1L,0x00c8ff30L, +/* 170*/ 0x23a34a80L,0x4ec15c91L,0x714e78b5L,0x47b9e42eL,0x78f3ea4dL, +/* 175*/ 0x7f078f5bL,0x346c593aL,0xa3a87a1aL,0x9bcbfe12L,0x3d439963L, +/* 180*/ 0xb2ef6d8eL,0xb8d46028L,0x6c2fd5caL,0x62675256L,0x01f2a2f3L, +/* 185*/ 0xbc96ae0aL,0x709a8920L,0xb4146e87L,0x6308b9e2L,0x64bda7baL, +/* 190*/ 0xafed6892L,0x6037f2a2L,0xf52969e0L,0x0adb43a6L,0x82811400L, +/* 195*/ 0x90d0bdf0L,0x19c9549eL,0x203f6a73L,0x1accaf4fL,0x89714e6dL, +/* 200*/ 0x164d4705L,0x67665f07L,0xec206170L,0x0c2182b2L,0xa02b9c81L, +/* 205*/ 0x53289722L,0xf6a97686L,0x140e4179L,0x9f778849L,0x9a88e15dL, +/* 210*/ 0x25cadb54L,0xd157f36fL,0x32a421c3L,0xb368e98aL,0x5a92cd0dL, +/* 215*/ 0x757aa8d4L,0xc20ac278L,0x08b551c7L,0x849491e8L,0x4dc75ad6L, +/* 220*/ 0x697c33beL,0xbaf0ca33L,0x46125b4eL,0x59d677b3L,0x30d9c8f2L, +/* 225*/ 0xd0af860cL,0x1c7fd0faL,0xfe0ff72cL,0x5c8d6f43L,0x57fdec3bL, +/* 230*/ 0x6ab6ad97L,0xd22adf89L,0x18171785L,0x02bfe22dL,0x6db80917L, +/* 235*/ 0x80b216afL,0xe85e4f9aL,0x7a1c306eL,0x6fc49bf5L,0x3af7a11cL, +/* 240*/ 0x81e215e7L,0x68363fcdL,0x3e9357c8L,0xef52fd55L,0x3b8bab4cL, +/* 245*/ 0x3c8cf495L,0xbefceebdL,0xfd25b714L,0xc498d83dL,0x0d2e1a8dL, +/* 250*/ 0xe9f966acL,0x0e387445L,0x435419e5L,0x5e7ebec4L,0xaa90b8d9L, +/* 255*/ 0xff1a3a96L + /* End of S Box 1 */ }, + + + { /* Start of S Box 2 */ + +/* 0*/ 0x4a8fe4e3L,0xf27d99cdL,0xd04a40caL,0xcb5ff194L,0x3668275aL, +/* 5*/ 0xff4816beL,0xa78b394cL,0x4c6be9dbL,0x4eec38d2L,0x4296ec80L, +/* 10*/ 0xcdce96f8L,0x888c2f38L,0xe75508f5L,0x7b916414L,0x060aa14aL, +/* 15*/ 0xa214f327L,0xbe608dafL,0x1ebbdec2L,0x61f98ce9L,0xe92156feL, +/* 20*/ 0x4f22d7a3L,0x3f76a8d9L,0x559a4b33L,0x38ad2959L,0xf3f17e9eL, +/* 25*/ 0x85e1ba91L,0xe5eba6fbL,0x73dcd48cL,0xf5c3ff78L,0x481b6058L, +/* 30*/ 0x8a3297f7L,0x8f1f3bf4L,0x93785ab2L,0x477a4a5bL,0x6334eb5dL, +/* 35*/ 0x6d251b2eL,0x74a9102dL,0x07e38ffaL,0x915c9c62L,0xccc275eaL, +/* 40*/ 0x6be273ecL,0x3ebddd70L,0xd895796cL,0xdc54a91bL,0xc9afdf81L, +/* 45*/ 0x23633f73L,0x275119b4L,0xb19f6b67L,0x50756e22L,0x2bb152e2L, +/* 50*/ 0x76ea46a2L,0xa353e232L,0x2f596ad6L,0x0b1edb0bL,0x02d3d9a4L, +/* 55*/ 0x78b47843L,0x64893e90L,0x40f0caadL,0xf68d3ad7L,0x46fd1707L, +/* 60*/ 0x1c9c67efL,0xb5e086deL,0x96ee6ca6L,0x9aa34774L,0x1ba4f48aL, +/* 65*/ 0x8d01abfdL,0x183ee1f6L,0x5ff8aa7aL,0x17e4faaeL,0x303983b0L, +/* 70*/ 0x6c08668bL,0xd4ac4382L,0xe6c5849fL,0x92fefb53L,0xc1cac4ceL, +/* 75*/ 0x43501388L,0x441118cfL,0xec4fb308L,0x53a08e86L,0x9e0fe0c5L, +/* 80*/ 0xf91c1525L,0xac45be05L,0xd7987cb5L,0x49ba1487L,0x57938940L, +/* 85*/ 0xd5877648L,0xa958727fL,0x58dfe3c3L,0xf436cf77L,0x399e4d11L, +/* 90*/ 0xf0a5bfa9L,0xef61a33bL,0xa64cac60L,0x04a8d0baL,0x030dd572L, +/* 95*/ 0xb83d320fL,0xcab23045L,0xe366f2f0L,0x815d008dL,0xc897a43aL, +/* 100*/ 0x1d352df3L,0xb9cc571dL,0x8bf38744L,0x72209092L,0xeba124ebL, +/* 105*/ 0xfb99ce5eL,0x3bb94293L,0x28da549cL,0xaab8a228L,0xa4197785L, +/* 110*/ 0x33c70296L,0x25f6259bL,0x5c85da21L,0xdf15bdeeL,0x15b7c7e8L, +/* 115*/ 0xe2abef75L,0xfcc19bc1L,0x417ff868L,0x14884434L,0x62825179L, +/* 120*/ 0xc6d5c11cL,0x0e4705dcL,0x22700de0L,0xd3d2af18L,0x9be822a0L, +/* 125*/ 0x35b669f1L,0xc42bb55cL,0x0a801252L,0x115bf0fcL,0x3cd7d856L, +/* 130*/ 0xb43f5f9dL,0xc2306516L,0xa1231c47L,0xf149207eL,0x5209a795L, +/* 135*/ 0x34b3ccd8L,0x67aefe54L,0x2c83924eL,0x6662cbacL,0x5eedd161L, +/* 140*/ 0x84e681aaL,0x5d57d26bL,0xfa465cc4L,0x7e3ac3a8L,0xbf7c0cc6L, +/* 145*/ 0xe18a9aa1L,0xc32f0a6fL,0xb22cc00dL,0x3d280369L,0x994e554fL, +/* 150*/ 0x68f480d3L,0xadcff5e6L,0x3a8eb265L,0x83269831L,0xbd568a09L, +/* 155*/ 0x4bc8ae6aL,0x69f56d2bL,0x0f17eac8L,0x772eb6c7L,0x9f41343cL, +/* 160*/ 0xab1d0742L,0x826a6f50L,0xfea2097cL,0x1912c283L,0xce185899L, +/* 165*/ 0xe4444839L,0x2d8635d5L,0x65d0b1ffL,0x865a7f17L,0x326d9fb1L, +/* 170*/ 0x59e52820L,0x0090ade1L,0x753c7149L,0x9ddd8b98L,0xa5a691daL, +/* 175*/ 0x0d0382bbL,0x8904c930L,0x086cb000L,0x6e69d3bdL,0x24d4e7a7L, +/* 180*/ 0x05244fd0L,0x101a5e0cL,0x6a947dcbL,0xe840f77bL,0x7d0c5003L, +/* 185*/ 0x7c370f1fL,0x805245edL,0xe05e3d3fL,0x7906880eL,0xbabfcd35L, +/* 190*/ 0x1a7ec697L,0x8c052324L,0x0c6ec8dfL,0xd129a589L,0xc7a75b02L, +/* 195*/ 0x12d81de7L,0xd9be2a66L,0x1f4263abL,0xde73fdb6L,0x2a00680aL, +/* 200*/ 0x56649e36L,0x3133ed55L,0x90fa0bf2L,0x2910a02aL,0x949d9d46L, +/* 205*/ 0xa0d1dcddL,0xcfc9b7d4L,0xd2677be5L,0x95cb36b3L,0x13cd9410L, +/* 210*/ 0xdbf73313L,0xb7c6e8c0L,0xf781414bL,0x510b016dL,0xb0de1157L, +/* 215*/ 0xd6b0f62cL,0xbb074eccL,0x7f1395b7L,0xee792cf9L,0xea6fd63eL, +/* 220*/ 0x5bd6938eL,0xaf02fc64L,0xdab57ab8L,0x8edb3784L,0x8716318fL, +/* 225*/ 0x164d1a01L,0x26f26141L,0xb372e6b9L,0xf8fc2b06L,0x7ac00e04L, +/* 230*/ 0x3727b89aL,0x97e9bca5L,0x9c2a742fL,0xbc3b1f7dL,0x7165b471L, +/* 235*/ 0x609b4c29L,0x20925351L,0x5ae72112L,0x454be5d1L,0xc0ffb95fL, +/* 240*/ 0xdd0ef919L,0x6f2d70c9L,0x0974c5bfL,0x98aa6263L,0x01d91e4dL, +/* 245*/ 0x2184bb6eL,0x70c43c1eL,0x4d435915L,0xae7b8523L,0xb6fb06bcL, +/* 250*/ 0x5431ee76L,0xfdbc5d26L,0xed77493dL,0xc5712ee4L,0xa8380437L, +/* 255*/ 0x2eef261aL + /* End of S Box 2 */ }, + + + { /* Start of S Box 3 */ + +/* 0*/ 0x5a79392bL,0xb8af32c2L,0x41f7720aL,0x833a61ecL,0x13dfedacL, +/* 5*/ 0xc4990bc4L,0xdc0f54bcL,0xfedd5e88L,0x80da1881L,0x4dea1afdL, +/* 10*/ 0xfd402cc6L,0xae67cc7aL,0xc5238525L,0x8ea01254L,0xb56b9bd5L, +/* 15*/ 0x862fbd6dL,0xac8575d3L,0x6fba3714L,0xda7ebf46L,0x59cd5238L, +/* 20*/ 0x8ac9dbfeL,0x353729fcL,0xe497d7f2L,0xc3ab84e0L,0xf05a114bL, +/* 25*/ 0x7b887a75L,0xedc603ddL,0x5e6fe680L,0x2c84b399L,0x884eb1daL, +/* 30*/ 0x1cb8c8bfL,0xaa51098aL,0xc862231cL,0x8bac2221L,0x21b387e5L, +/* 35*/ 0x208a430dL,0x2a3f0f8bL,0xa5ff9cd2L,0x6012a2eaL,0x147a9ee7L, +/* 40*/ 0xf62a501dL,0xb4b2e51aL,0x3ef3484cL,0xc0253c59L,0x2b82b536L, +/* 45*/ 0x0aa9696bL,0xbe0c109bL,0xc70b7929L,0xce3e8a19L,0x2f66950eL, +/* 50*/ 0x459f1c2cL,0xe68fb93dL,0xa3c3ff3eL,0x62b45c62L,0x300991cbL, +/* 55*/ 0x01914c57L,0x7f7bc06aL,0x182831f5L,0xe7b74bcaL,0xfa50f6d0L, +/* 60*/ 0x523caa61L,0xe3a7cf05L,0xe9e41311L,0x280a21d1L,0x6a4297e1L, +/* 65*/ 0xf24dc67eL,0xfc3189e6L,0xb72bf34fL,0x4b1e67afL,0x543402ceL, +/* 70*/ 0x79a59867L,0x0648e02aL,0x00a3ac17L,0xc6208d35L,0x6e7f5f76L, +/* 75*/ 0xa45bb4beL,0xf168fa63L,0x3f4125f3L,0xf311406fL,0x02706565L, +/* 80*/ 0xbfe58022L,0x0cfcfdd9L,0x0735a7f7L,0x8f049092L,0xd98edc27L, +/* 85*/ 0xf5c5d55cL,0xe0f201dbL,0x0dcafc9aL,0x7727fb79L,0xaf43abf4L, +/* 90*/ 0x26e938c1L,0x401b26a6L,0x900720faL,0x2752d97bL,0xcff1d1b3L, +/* 95*/ 0xa9d9e424L,0x42db99abL,0x6cf8be5fL,0xe82cebe3L,0x3afb733bL, +/* 100*/ 0x6b734eb6L,0x1036414aL,0x975f667cL,0x049d6377L,0xba587c60L, +/* 105*/ 0xb1d10483L,0xde1aefccL,0x1129d055L,0x72051e91L,0x6946d623L, +/* 110*/ 0xf9e86ea7L,0x48768c00L,0xb0166c93L,0x9956bbf0L,0x1f1f6d84L, +/* 115*/ 0xfb15e18eL,0x033b495dL,0x56e3362eL,0x4f44c53cL,0x747cba51L, +/* 120*/ 0x89d37872L,0x5d9c331bL,0xd2ef9fa8L,0x254917f8L,0x1b106f47L, +/* 125*/ 0x37d75553L,0xb3f053b0L,0x7dccd8efL,0xd30eb802L,0x5889f42dL, +/* 130*/ 0x610206d7L,0x1a7d34a1L,0x92d87dd8L,0xe5f4a315L,0xd1cf0e71L, +/* 135*/ 0xb22dfe45L,0xb901e8ebL,0x0fc0ce5eL,0x2efa60c9L,0x2de74290L, +/* 140*/ 0x36d0c906L,0x381c70e4L,0x4c6da5b5L,0x3d81a682L,0x7e381f34L, +/* 145*/ 0x396c4f52L,0x95ad5901L,0x1db50c5aL,0x29982e9eL,0x1557689fL, +/* 150*/ 0x3471ee42L,0xd7e2f7c0L,0x8795a1e2L,0xbc324d8dL,0xe224c3c8L, +/* 155*/ 0x12837e39L,0xcdee3d74L,0x7ad2143fL,0x0e13d40cL,0x78bd4a68L, +/* 160*/ 0xa2eb194dL,0xdb9451f9L,0x859b71dcL,0x5c4f5b89L,0xca14a8a4L, +/* 165*/ 0xef92f003L,0x16741d98L,0x33aa4444L,0x9e967fbbL,0x092e3020L, +/* 170*/ 0xd86a35b8L,0x8cc17b10L,0xe1bf08aeL,0x55693fc5L,0x7680ad13L, +/* 175*/ 0x1e6546e8L,0x23b6e7b9L,0xee77a4b2L,0x08ed0533L,0x44fd2895L, +/* 180*/ 0xb6393b69L,0x05d6cacfL,0x9819b209L,0xecbbb72fL,0x9a75779cL, +/* 185*/ 0xeaec0749L,0x94a65aeeL,0xbdf52dc3L,0xd6a25d04L,0x82008e4eL, +/* 190*/ 0xa6de160fL,0x9b036afbL,0x228b3a66L,0x5fb10a70L,0xcc338b58L, +/* 195*/ 0x5378a9dfL,0xc908bca9L,0x4959e25bL,0x46909a97L,0x66ae8f6eL, +/* 200*/ 0xdd0683e9L,0x65f994b4L,0x6426cda5L,0xc24b8840L,0x32539da0L, +/* 205*/ 0x63175650L,0xd0c815ffL,0x50cbc41eL,0xf7c774a3L,0x31b0c231L, +/* 210*/ 0x8d0d8116L,0x24bef16cL,0xd555d256L,0xdf47ea8cL,0x6d21eccdL, +/* 215*/ 0xa887a012L,0x84542aedL,0xa7b9c1bdL,0x914c1bb1L,0xa0d5b67dL, +/* 220*/ 0x438ce937L,0x7030f873L,0x71f6b0c7L,0x574576baL,0xf8bc4541L, +/* 225*/ 0x9c61d348L,0x1960579dL,0x17c4daadL,0x96a4cb0bL,0xc193f2f6L, +/* 230*/ 0x756eafa2L,0x7c1d2f94L,0xf4fe2b43L,0xcb86e33aL,0xebd4c728L, +/* 235*/ 0x9d18ae64L,0x9fe13e30L,0x3ce0f5deL,0xaba1f985L,0xaddc2718L, +/* 240*/ 0x68ce6278L,0xd45e241fL,0xa15c82b7L,0x3b2293d4L,0x739edd32L, +/* 245*/ 0x674a6bf1L,0x5b5d587fL,0x4772deaaL,0x4a63968fL,0x0be68686L, +/* 250*/ 0x513d6426L,0x939a4787L,0xbba89296L,0x4ec20007L,0x818d0d08L, +/* 255*/ 0xff64dfd6L + /* End of S Box 3 */ }, + + + { /* Start of S Box 4 */ + +/* 0*/ 0xcb2297cbL,0xdb48a144L,0xa16cbe4bL,0xbbea1d6cL,0x5af6b6b7L, +/* 5*/ 0x8a8110b6L,0xf9236ef9L,0xc98f83e6L,0x0f9c65b8L,0x252d4a89L, +/* 10*/ 0xa497f068L,0xa5d7ed2dL,0x94c22845L,0x9da1c8c4L,0xe27c2e2eL, +/* 15*/ 0x6e8ba2b4L,0xc3dd17fbL,0x498cd482L,0x0dfe6a9fL,0xb0705829L, +/* 20*/ 0x9a1e6dc1L,0xf829717cL,0x07bb8e3aL,0xda3c0b02L,0x1af82fc7L, +/* 25*/ 0x73b70955L,0x7a04379cL,0x5ee20a28L,0x83712ae5L,0xf4c47c6dL, +/* 30*/ 0xdf72ba56L,0xd794858dL,0x8c0cf709L,0x18f0f390L,0xb6c69b35L, +/* 35*/ 0xbf2f01dbL,0x2fa74dcaL,0xd0cd9127L,0xbde66cecL,0x3deebd46L, +/* 40*/ 0x57c88fc3L,0xcee1406fL,0x0066385aL,0xf3c3444fL,0x3a79d5d5L, +/* 45*/ 0x75751eb9L,0x3e7f8185L,0x521c2605L,0xe1aaab6eL,0x38ebb80fL, +/* 50*/ 0xbee7e904L,0x61cb9647L,0xea54904eL,0x05ae00e4L,0x2d7ac65fL, +/* 55*/ 0x087751a1L,0xdcd82915L,0x0921ee16L,0xdd86d33bL,0xd6bd491aL, +/* 60*/ 0x40fbadf0L,0x4232cbd2L,0x33808d10L,0x39098c42L,0x193f3199L, +/* 65*/ 0x0bc1e47aL,0x4a82b149L,0x02b65a8aL,0x104cdc8eL,0x24a8f52cL, +/* 70*/ 0x685c6077L,0xc79f95c9L,0x1d11fe50L,0xc08dafcdL,0x7b1a9a03L, +/* 75*/ 0x1c1f11d8L,0x84250e7fL,0x979db248L,0xebdc0501L,0xb9553395L, +/* 80*/ 0xe3c05ea8L,0xb1e51c4cL,0x13b0e681L,0x3b407766L,0x36db3087L, +/* 85*/ 0xee17c9fcL,0x6c53ecf2L,0xadccc58fL,0xc427660bL,0xefd5867dL, +/* 90*/ 0x9b6d54a5L,0x6ff1aeffL,0x8e787952L,0x9e2bffe0L,0x8761d034L, +/* 95*/ 0xe00bdbadL,0xae99a8d3L,0xcc03f6e2L,0xfd0ed807L,0x0e508ae3L, +/* 100*/ 0xb74182abL,0x4349245dL,0xd120a465L,0xb246a641L,0xaf3b7ab0L, +/* 105*/ 0x2a6488bbL,0x4b3a0d1fL,0xe7c7e58cL,0x3faff2ebL,0x90445ffdL, +/* 110*/ 0xcf38c393L,0x995d07e7L,0xf24f1b36L,0x356f6891L,0x6d6ebcbeL, +/* 115*/ 0x8da9e262L,0x50fd520eL,0x5bca9e1eL,0x37472cf3L,0x69075057L, +/* 120*/ 0x7ec5fdedL,0x0cab892aL,0xfb2412baL,0x1728debfL,0xa000a988L, +/* 125*/ 0xd843ce79L,0x042e20ddL,0x4fe8f853L,0x56659c3cL,0x2739d119L, +/* 130*/ 0xa78a6120L,0x80960375L,0x70420611L,0x85e09f78L,0xabd17e96L, +/* 135*/ 0x1b513eafL,0x1e01eb63L,0x26ad2133L,0xa890c094L,0x7613cf60L, +/* 140*/ 0x817e781bL,0xa39113d7L,0xe957fa58L,0x4131b99eL,0x28b1efdaL, +/* 145*/ 0x66acfba7L,0xff68944aL,0x77a44fd1L,0x7f331522L,0x59ffb3faL, +/* 150*/ 0xa6df935bL,0xfa12d9dfL,0xc6bf6f3fL,0x89520cf6L,0x659edd6aL, +/* 155*/ 0x544da739L,0x8b052538L,0x7c30ea21L,0xc2345525L,0x15927fb2L, +/* 160*/ 0x144a436bL,0xba107b8bL,0x1219ac97L,0x06730432L,0x31831ab3L, +/* 165*/ 0xc55a5c24L,0xaa0fcd3eL,0xe5606be8L,0x5c88f19bL,0x4c0841eeL, +/* 170*/ 0x1fe37267L,0x11f9c4f4L,0x9f1b9daeL,0x864e76d0L,0xe637c731L, +/* 175*/ 0xd97d23a6L,0x32f53d5cL,0xb8161980L,0x93fa0f84L,0xcaef0870L, +/* 180*/ 0x8874487eL,0x98f2cc73L,0x645fb5c6L,0xcd853659L,0x2062470dL, +/* 185*/ 0x16ede8e9L,0x6b06dab5L,0x78b43900L,0xfc95b786L,0x5d8e7de1L, +/* 190*/ 0x465b5954L,0xfe7ba014L,0xf7d23f7bL,0x92bc8b18L,0x03593592L, +/* 195*/ 0x55cef4f7L,0x74b27317L,0x79de1fc2L,0xc8a0bfbdL,0x229398ccL, +/* 200*/ 0x62a602ceL,0xbcb94661L,0x5336d206L,0xd2a375feL,0x6a6ab483L, +/* 205*/ 0x4702a5a4L,0xa2e9d73dL,0x23a2e0f1L,0x9189140aL,0x581d18dcL, +/* 210*/ 0xb39a922bL,0x82356212L,0xd5f432a9L,0xd356c2a3L,0x5f765b4dL, +/* 215*/ 0x450afcc8L,0x4415e137L,0xe8ecdfbcL,0xed0de3eaL,0x60d42b13L, +/* 220*/ 0xf13df971L,0x71fc5da2L,0xc1455340L,0xf087742fL,0xf55e5751L, +/* 225*/ 0x67b3c1f8L,0xac6b8774L,0x7dcfaaacL,0x95983bc0L,0x489bb0b1L, +/* 230*/ 0x2c184223L,0x964b6726L,0x2bd3271cL,0x72266472L,0xded64530L, +/* 235*/ 0x0a2aa343L,0xd4f716a0L,0xb4dad6d9L,0x2184345eL,0x512c990cL, +/* 240*/ 0x29d92d08L,0x2ebe709aL,0x01144c69L,0x34584b9dL,0xe4634ed6L, +/* 245*/ 0xecc963cfL,0x3c6984aaL,0x4ed056efL,0x9ca56976L,0x8f3e80d4L, +/* 250*/ 0xb5bae7c5L,0x30b5caf5L,0x63f33a64L,0xa9e4bbdeL,0xf6b82298L, +/* 255*/ 0x4d673c1dL + /* End of S Box 4 */ }, + + + { /* Start of S Box 5 */ + +/* 0*/ 0x4b4f1121L,0xba183081L,0xc784f41fL,0xd17d0bacL,0x083d2267L, +/* 5*/ 0x37b1361eL,0x3581ad05L,0xfda2f6bcL,0x1e892cddL,0xb56d3c3aL, +/* 10*/ 0x32140e46L,0x138d8aabL,0xe14773d4L,0x5b0e71dfL,0x5d1fe055L, +/* 15*/ 0x3fb991d3L,0xf1f46c71L,0xa325988cL,0x10f66e80L,0xb1006348L, +/* 20*/ 0x726a9f60L,0x3b67f8baL,0x4e114ef4L,0x05c52115L,0x4c5ca11cL, +/* 25*/ 0x99e1efd8L,0x471b83b3L,0xcbf7e524L,0x43ad82f5L,0x690ca93bL, +/* 30*/ 0xfaa61bb2L,0x12a832b5L,0xb734f943L,0xbd22aea7L,0x88fec626L, +/* 35*/ 0x5e80c3e7L,0xbe3eaf5eL,0x44617652L,0xa5724475L,0xbb3b9695L, +/* 40*/ 0x7f3fee8fL,0x964e7debL,0x518c052dL,0x2a0bbc2bL,0xc2175f5cL, +/* 45*/ 0x9a7b3889L,0xa70d8d0cL,0xeaccdd29L,0xcccd6658L,0x34bb25e6L, +/* 50*/ 0xb8391090L,0xf651356fL,0x52987c9eL,0x0c16c1cdL,0x8e372d3cL, +/* 55*/ 0x2fc6ebbdL,0x6e5da3e3L,0xb0e27239L,0x5f685738L,0x45411786L, +/* 60*/ 0x067f65f8L,0x61778b40L,0x81ab2e65L,0x14c8f0f9L,0xa6b7b4ceL, +/* 65*/ 0x4036eaecL,0xbf62b00aL,0xecfd5e02L,0x045449a6L,0xb20afd28L, +/* 70*/ 0x2166d273L,0x0d13a863L,0x89508756L,0xd51a7530L,0x2d653f7aL, +/* 75*/ 0x3cdbdbc3L,0x80c9df4fL,0x3d5812d9L,0x53fbb1f3L,0xc0f185c0L, +/* 80*/ 0x7a3c3d7eL,0x68646410L,0x857607a0L,0x1d12622eL,0x97f33466L, +/* 85*/ 0xdb4c9917L,0x6469607cL,0x566e043dL,0x79ef1edbL,0x2c05898dL, +/* 90*/ 0xc9578e25L,0xcd380101L,0x46e04377L,0x7d1cc7a9L,0x6552b837L, +/* 95*/ 0x20192608L,0xb97500c5L,0xed296b44L,0x368648b4L,0x62995cd5L, +/* 100*/ 0x82731400L,0xf9aebd8bL,0x3844c0c7L,0x7c2de794L,0x33a1a770L, +/* 105*/ 0x8ae528c2L,0x5a2be812L,0x1f8f4a07L,0x2b5ed7caL,0x937eb564L, +/* 110*/ 0x6fda7e11L,0xe49b5d6cL,0xb4b3244eL,0x18aa53a4L,0x3a061334L, +/* 115*/ 0x4d6067a3L,0x83ba5868L,0x9bdf4dfeL,0x7449f261L,0x709f8450L, +/* 120*/ 0xcad133cbL,0xde941c3fL,0xf52ae484L,0x781d77edL,0x7e4395f0L, +/* 125*/ 0xae103b59L,0x922331bbL,0x42ce50c8L,0xe6f08153L,0xe7d941d0L, +/* 130*/ 0x5028ed6bL,0xb3d2c49bL,0xad4d9c3eL,0xd201fb6eL,0xa45bd5beL, +/* 135*/ 0xffcb7f4bL,0x579d7806L,0xf821bb5bL,0x59d592adL,0xd0be0c31L, +/* 140*/ 0xd4e3b676L,0x0107165aL,0x0fe939d2L,0x49bcaafdL,0x55ffcfe5L, +/* 145*/ 0x2ec1f783L,0xf39a09a5L,0x3eb42772L,0x19b55a5dL,0x024a0679L, +/* 150*/ 0x8c83b3f7L,0x8642ba1dL,0xacacd9eaL,0x87d352c4L,0x60931f45L, +/* 155*/ 0xa05f97d7L,0x1cecd42cL,0xe2fcc87bL,0xb60f94e2L,0x67a34b0bL, +/* 160*/ 0xfcdd40c9L,0x0b150a27L,0xd3ee9e04L,0x582e29e9L,0x4ac22b41L, +/* 165*/ 0x6ac4e1b8L,0xbccaa51aL,0x237af30eL,0xebc3b709L,0xc4a59d19L, +/* 170*/ 0x284bc98aL,0xe9d41a93L,0x6bfa2018L,0x73b2d651L,0x11f9a2faL, +/* 175*/ 0xce09bff1L,0x41a470aaL,0x25888f22L,0x77e754e8L,0xf7330d8eL, +/* 180*/ 0x158eab16L,0xc5d68842L,0xc685a6f6L,0xe5b82fdeL,0x09ea3a96L, +/* 185*/ 0x6dde1536L,0x4fa919daL,0x26c0be9fL,0x9eed6f69L,0xf05555f2L, +/* 190*/ 0xe06fc285L,0x9cd76d23L,0xaf452a92L,0xefc74cb7L,0x9d6b4732L, +/* 195*/ 0x8be408eeL,0x22401d0dL,0xee6c459dL,0x7587cb82L,0xe8746862L, +/* 200*/ 0x5cbdde87L,0x98794278L,0x31afb94dL,0xc11e0f2fL,0x30e8fc2aL, +/* 205*/ 0xcf3261efL,0x1a3023e1L,0xaa2f86cfL,0xf202e24aL,0x8d08dcffL, +/* 210*/ 0x764837c6L,0xa26374ccL,0x9f7c3e88L,0x949cc57dL,0xdd26a07fL, +/* 215*/ 0xc39efab0L,0xc8f879a1L,0xdce67bb9L,0xf4b0a435L,0x912c9ae0L, +/* 220*/ 0xd85603e4L,0x953a9bbfL,0xfb8290d6L,0x0aebcd5fL,0x16206a9aL, +/* 225*/ 0x6c787a14L,0xd9a0f16aL,0x29bf4f74L,0x8f8bce91L,0x0e5a9354L, +/* 230*/ 0xab038cb1L,0x1b8ad11bL,0xe327ff49L,0x0053da20L,0x90cf51dcL, +/* 235*/ 0xda92fe6dL,0x0390ca47L,0xa8958097L,0xa9dc5bafL,0x3931e3c1L, +/* 240*/ 0x840446b6L,0x63d069fbL,0xd7460299L,0x7124ecd1L,0x0791e613L, +/* 245*/ 0x485918fcL,0xd635d04cL,0xdf96ac33L,0x66f2d303L,0x247056aeL, +/* 250*/ 0xa1a7b2a8L,0x27d8cc9cL,0x17b6e998L,0x7bf5590fL,0xfe97f557L, +/* 255*/ 0x5471d8a2L + /* End of S Box 5 */ }, + + + { /* Start of S Box 6 */ + +/* 0*/ 0x83a327a1L,0x9f379f51L,0x40a7d007L,0x11307423L,0x224587c1L, +/* 5*/ 0xac27d63bL,0x3b7e64eaL,0x2e1cbfa6L,0x09996000L,0x03bc0e2cL, +/* 10*/ 0xd4c4478aL,0x4542e0abL,0xfeda26d4L,0xc1d10fcbL,0x8252f596L, +/* 15*/ 0x4494eb5cL,0xa362f314L,0xf5ba81fdL,0x75c3a376L,0x4ca214caL, +/* 20*/ 0xe164deddL,0x5088fa97L,0x4b0930e0L,0x2fcfb7e8L,0x33a6f4b2L, +/* 25*/ 0xc7e94211L,0x2d66c774L,0x43be8baeL,0xc663d445L,0x908eb130L, +/* 30*/ 0xf4e3be15L,0x63b9d566L,0x529396b5L,0x1e1be743L,0x4d5ff63fL, +/* 35*/ 0x985e4a83L,0x71ab9df7L,0xc516c6f5L,0x85c19ab4L,0x1f4daee4L, +/* 40*/ 0xf2973431L,0xb713dc5eL,0x3f2e159aL,0xc824da16L,0x06bf376aL, +/* 45*/ 0xb2fe23ecL,0xe39b1c22L,0xf1eecb5fL,0x08e82d52L,0x565686c2L, +/* 50*/ 0xab0aea93L,0xfd47219fL,0xebdbabd7L,0x2404a185L,0x8c7312b9L, +/* 55*/ 0xa8f2d828L,0x0c8902daL,0x65b42b63L,0xc0bbef62L,0x4e3e4cefL, +/* 60*/ 0x788f8018L,0xee1ebab7L,0x93928f9dL,0x683d2903L,0xd3b60689L, +/* 65*/ 0xafcb0ddcL,0x88a4c47aL,0xf6dd9c3dL,0x7ea5fca0L,0x8a6d7244L, +/* 70*/ 0xbe11f120L,0x04ff91b8L,0x8d2dc8c0L,0x27f97fdbL,0x7f9e1f47L, +/* 75*/ 0x1734f0c7L,0x26f3ed8eL,0x0df8f2bfL,0xb0833d9eL,0xe420a4e5L, +/* 80*/ 0xa423cae6L,0x95616772L,0x9ae6c049L,0x075941f2L,0xd8e12812L, +/* 85*/ 0x000f6f4fL,0x3c0d6b05L,0x6cef921cL,0xb82bc264L,0x396cb008L, +/* 90*/ 0x5d608a6fL,0x6d7782c8L,0x186550aaL,0x6b6fec09L,0x28e70b13L, +/* 95*/ 0x57ce5688L,0xecd3af84L,0x23335a95L,0x91f40cd2L,0x7b6a3b26L, +/* 100*/ 0xbd32b3b6L,0x3754a6fbL,0x8ed088f0L,0xf867e87cL,0x20851746L, +/* 105*/ 0x6410f9c6L,0x35380442L,0xc2ca10a7L,0x1adea27fL,0x76bddd79L, +/* 110*/ 0x92742cf4L,0x0e98f7eeL,0x164e931dL,0xb9c835b3L,0x69060a99L, +/* 115*/ 0xb44c531eL,0xfa7b66feL,0xc98a5b53L,0x7d95aae9L,0x302f467bL, +/* 120*/ 0x74b811deL,0xf3866abdL,0xb5b3d32dL,0xfc3157a4L,0xd251fe19L, +/* 125*/ 0x0b5d8eacL,0xda71ffd5L,0x47ea05a3L,0x05c6a9e1L,0xca0ee958L, +/* 130*/ 0x9939034dL,0x25dc5edfL,0x79083cb1L,0x86768450L,0xcf757d6dL, +/* 135*/ 0x5972b6bcL,0xa78d59c9L,0xc4ad8d41L,0x2a362ad3L,0xd1179991L, +/* 140*/ 0x601407ffL,0xdcf50917L,0x587069d0L,0xe0821ed6L,0xdbb59427L, +/* 145*/ 0x73911a4bL,0x7c904fc3L,0x844afb92L,0x6f8c955dL,0xe8c0c5bbL, +/* 150*/ 0xb67ab987L,0xa529d96cL,0xf91f7181L,0x618b1b06L,0xe718bb0cL, +/* 155*/ 0x8bd7615bL,0xd5a93a59L,0x54aef81bL,0x772136e3L,0xce44fd9cL, +/* 160*/ 0x10cda57eL,0x87d66e0bL,0x3d798967L,0x1b2c1804L,0x3edfbd68L, +/* 165*/ 0x15f6e62bL,0xef68b854L,0x3896db35L,0x12b7b5e2L,0xcb489029L, +/* 170*/ 0x9e4f98a5L,0x62eb77a8L,0x217c24a2L,0x964152f6L,0x49b2080aL, +/* 175*/ 0x53d23ee7L,0x48fb6d69L,0x1903d190L,0x9449e494L,0xbf6e7886L, +/* 180*/ 0xfb356cfaL,0x3a261365L,0x424bc1ebL,0xa1192570L,0x019ca782L, +/* 185*/ 0x9d3f7e0eL,0x9c127575L,0xedf02039L,0xad57bcceL,0x5c153277L, +/* 190*/ 0x81a84540L,0xbcaa7356L,0xccd59b60L,0xa62a629bL,0xa25ccd10L, +/* 195*/ 0x2b5b65cfL,0x1c535832L,0x55fd4e3aL,0x31d9790dL,0xf06bc37dL, +/* 200*/ 0x4afc1d71L,0xaeed5533L,0xba461634L,0xbb694b78L,0x5f3a5c73L, +/* 205*/ 0x6a3c764aL,0x8fb0cca9L,0xf725684cL,0x4fe5382fL,0x1d0163afL, +/* 210*/ 0x5aa07a8fL,0xe205a8edL,0xc30bad38L,0xff22cf1fL,0x72432e2eL, +/* 215*/ 0x32c2518bL,0x3487ce4eL,0x7ae0ac02L,0x709fa098L,0x0a3b395aL, +/* 220*/ 0x5b4043f8L,0xa9e48c36L,0x149a8521L,0xd07dee6bL,0x46acd2f3L, +/* 225*/ 0x8958dffcL,0xb3a1223cL,0xb11d31c4L,0xcd7f4d3eL,0x0f28e3adL, +/* 230*/ 0xe5b100beL,0xaac54824L,0xe9c9d7baL,0x9bd47001L,0x80f149b0L, +/* 235*/ 0x66022f0fL,0x020c4048L,0x6efa192aL,0x67073f8dL,0x13ec7bf9L, +/* 240*/ 0x3655011aL,0xe6afe157L,0xd9845f6eL,0xdecc4425L,0x511ae2ccL, +/* 245*/ 0xdf81b4d8L,0xd7809e55L,0xd6d883d9L,0x2cc7978cL,0x5e787cc5L, +/* 250*/ 0xdd0033d1L,0xa050c937L,0x97f75dcdL,0x299de580L,0x41e2b261L, +/* 255*/ 0xea5a54f1L + /* End of S Box 6 */ }, + + + { /* Start of S Box 7 */ + +/* 0*/ 0x7e672590L,0xbea513bbL,0x2c906fe6L,0x86029c2bL,0x55dc4f74L, +/* 5*/ 0x0553398eL,0x63e09647L,0xcafd0babL,0x264c37dfL,0x8272210fL, +/* 10*/ 0x67afa669L,0x12d98a5fL,0x8cab23c4L,0x75c68bd1L,0xc3370470L, +/* 15*/ 0x33f37f4eL,0x283992ffL,0xe73a3a67L,0x1032f283L,0xf5ad9fc2L, +/* 20*/ 0x963f0c5dL,0x664fbc45L,0x202ba41cL,0xc7c02d80L,0x54731e84L, +/* 25*/ 0x8a1085f5L,0x601d80fbL,0x2f968e55L,0x35e96812L,0xe45a8f78L, +/* 30*/ 0xbd7de662L,0x3b6e6eadL,0x8097c5efL,0x070b6781L,0xb1e508f3L, +/* 35*/ 0x24e4fae3L,0xb81a7805L,0xec0fc918L,0x43c8774bL,0x9b2512a9L, +/* 40*/ 0x2b05ad04L,0x32c2536fL,0xedf236e0L,0x8bc4b0cfL,0xbaceb837L, +/* 45*/ 0x4535b289L,0x0d0e94c3L,0xa5a371d0L,0xad695a58L,0x39e3437dL, +/* 50*/ 0x9186bffcL,0x21038c3bL,0x0aa9dff9L,0x5d1f06ceL,0x62def8a4L, +/* 55*/ 0xf740a2b4L,0xa2575868L,0x682683c1L,0xdbb30facL,0x61fe1928L, +/* 60*/ 0x468a6511L,0xc61cd5f4L,0xe54d9800L,0x6b98d7f7L,0x8418b6a5L, +/* 65*/ 0x5f09a5d2L,0x90b4e80bL,0x49b2c852L,0x69f11c77L,0x17412b7eL, +/* 70*/ 0x7f6fc0edL,0x56838dccL,0x6e9546a2L,0xd0758619L,0x087b9b9aL, +/* 75*/ 0xd231a01dL,0xaf46d415L,0x097060fdL,0xd920f657L,0x882d3f9fL, +/* 80*/ 0x3ae7c3c9L,0xe8a00d9bL,0x4fe67ebeL,0x2ef80eb2L,0xc1916b0cL, +/* 85*/ 0xf4dffea0L,0xb97eb3ebL,0xfdff84ddL,0xff8b14f1L,0xe96b0572L, +/* 90*/ 0xf64b508cL,0xae220a6eL,0x4423ae5aL,0xc2bece5eL,0xde27567cL, +/* 95*/ 0xfc935c63L,0x47075573L,0xe65b27f0L,0xe121fd22L,0xf2668753L, +/* 100*/ 0x2debf5d7L,0x8347e08dL,0xac5eda03L,0x2a7cebe9L,0x3fe8d92eL, +/* 105*/ 0x23542fe4L,0x1fa7bd50L,0xcf9b4102L,0x9d0dba39L,0x9cb8902aL, +/* 110*/ 0xa7249d8bL,0x0f6d667aL,0x5ebfa9ecL,0x6a594df2L,0x79600938L, +/* 115*/ 0x023b7591L,0xea2c79c8L,0xc99d07eaL,0x64cb5ee1L,0x1a9cab3dL, +/* 120*/ 0x76db9527L,0xc08e012fL,0x3dfb481aL,0x872f22e7L,0x2948d15cL, +/* 125*/ 0xa4782c79L,0x6f50d232L,0x78f0728aL,0x5a87aab1L,0xc4e2c19cL, +/* 130*/ 0xee767387L,0x1b2a1864L,0x7b8d10d3L,0xd1713161L,0x0eeac456L, +/* 135*/ 0xd8799e06L,0xb645b548L,0x4043cb65L,0xa874fb29L,0x4b12d030L, +/* 140*/ 0x7d687413L,0x18ef9a1fL,0xd7631d4cL,0x5829c7daL,0xcdfa30faL, +/* 145*/ 0xc5084bb0L,0x92cd20e2L,0xd4c16940L,0x03283ec0L,0xa917813fL, +/* 150*/ 0x9a587d01L,0x70041f8fL,0xdc6ab1dcL,0xddaee3d5L,0x31829742L, +/* 155*/ 0x198c022dL,0x1c9eafcbL,0x5bbc6c49L,0xd3d3293aL,0x16d50007L, +/* 160*/ 0x04bb8820L,0x3c5c2a41L,0x37ee7af8L,0x8eb04025L,0x9313ecbaL, +/* 165*/ 0xbffc4799L,0x8955a744L,0xef85d633L,0x504499a7L,0xa6ca6a86L, +/* 170*/ 0xbb3d3297L,0xb34a8236L,0x6dccbe4fL,0x06143394L,0xce19fc7bL, +/* 175*/ 0xccc3c6c6L,0xe36254aeL,0x77b7eda1L,0xa133dd9eL,0xebf9356aL, +/* 180*/ 0x513ccf88L,0xe2a1b417L,0x972ee5bdL,0x853824cdL,0x5752f4eeL, +/* 185*/ 0x6c1142e8L,0x3ea4f309L,0xb2b5934aL,0xdfd628aaL,0x59acea3eL, +/* 190*/ 0xa01eb92cL,0x389964bcL,0xda305dd4L,0x019a59b7L,0x11d2ca93L, +/* 195*/ 0xfaa6d3b9L,0x4e772ecaL,0x72651776L,0xfb4e5b0eL,0xa38f91a8L, +/* 200*/ 0x1d0663b5L,0x30f4f192L,0xb50051b6L,0xb716ccb3L,0x4abd1b59L, +/* 205*/ 0x146c5f26L,0xf134e2deL,0x00f67c6cL,0xb0e1b795L,0x98aa4ec7L, +/* 210*/ 0x0cc73b34L,0x654276a3L,0x8d1ba871L,0x740a5216L,0xe0d01a23L, +/* 215*/ 0x9ed161d6L,0x9f36a324L,0x993ebb7fL,0xfeb9491bL,0x365ddcdbL, +/* 220*/ 0x810cffc5L,0x71ec0382L,0x2249e7bfL,0x48817046L,0xf3a24a5bL, +/* 225*/ 0x4288e4d9L,0x0bf5c243L,0x257fe151L,0x95b64c0dL,0x4164f066L, +/* 230*/ 0xaaf7db08L,0x73b1119dL,0x8f9f7bb8L,0xd6844596L,0xf07a34a6L, +/* 235*/ 0x53943d0aL,0xf9dd166dL,0x7a8957afL,0xf8ba3ce5L,0x27c9621eL, +/* 240*/ 0x5cdae910L,0xc8518998L,0x941538feL,0x136115d8L,0xaba8443cL, +/* 245*/ 0x4d01f931L,0x34edf760L,0xb45f266bL,0xd5d4de14L,0x52d8ac35L, +/* 250*/ 0x15cfd885L,0xcbc5cd21L,0x4cd76d4dL,0x7c80ef54L,0xbc92ee75L, +/* 255*/ 0x1e56a1f6L + /* End of S Box 7 */ }, + + + { /* Start of S Box 8 */ + +/* 0*/ 0xbaa20b6cL,0x9ffbad26L,0xe1f7d738L,0x794aec8dL,0xc9e9cf3cL, +/* 5*/ 0x8a9a7846L,0xc57c4685L,0xb9a92fedL,0x29cb141fL,0x52f9ddb7L, +/* 10*/ 0xf68ba6bcL,0x19ccc020L,0x4f584aaaL,0x3bf6a596L,0x003b7cf7L, +/* 15*/ 0x54f0ce9aL,0xa7ec4303L,0x46cf0077L,0x78d33aa1L,0x215247d9L, +/* 20*/ 0x74bcdf91L,0x08381d30L,0xdac43e40L,0x64872531L,0x0beffe5fL, +/* 25*/ 0xb317f457L,0xaebb12daL,0xd5d0d67bL,0x7d75c6b4L,0x42a6d241L, +/* 30*/ 0x1502d0a9L,0x3fd97fffL,0xc6c3ed28L,0x81868d0aL,0x92628bc5L, +/* 35*/ 0x86679544L,0xfd1867afL,0x5ca3ea61L,0x568d5578L,0x4a2d71f4L, +/* 40*/ 0x43c9d549L,0x8d95de2bL,0x6e5c74a0L,0x9120ffc7L,0x0d05d14aL, +/* 45*/ 0xa93049d3L,0xbfa80e17L,0xf4096810L,0x043f5ef5L,0xa673b4f1L, +/* 50*/ 0x6d780298L,0xa4847783L,0x5ee726fbL,0x9934c281L,0x220a588cL, +/* 55*/ 0x384e240fL,0x933d5c69L,0x39e5ef47L,0x26e8b8f3L,0x4c1c6212L, +/* 60*/ 0x8040f75dL,0x074b7093L,0x6625a8d7L,0x36298945L,0x76285088L, +/* 65*/ 0x651d37c3L,0x24f5274dL,0xdbca3dabL,0x186b7ee1L,0xd80f8182L, +/* 70*/ 0x14210c89L,0x943a3075L,0x4e6e11c4L,0x4d7e6badL,0xf05064c8L, +/* 75*/ 0x025dcd97L,0x4bc10302L,0x7cede572L,0x8f90a970L,0xab88eebaL, +/* 80*/ 0xb5998029L,0x5124d839L,0xb0eeb6a3L,0x89ddabdcL,0xe8074d76L, +/* 85*/ 0xa1465223L,0x32518cf2L,0x9d39d4ebL,0xc0d84524L,0xe35e6ea8L, +/* 90*/ 0x7abf3804L,0x113e2348L,0x9ae6069dL,0xb4dfdabbL,0xa8c5313fL, +/* 95*/ 0x23ea3f79L,0x530e36a2L,0xa5fd228bL,0x95d1d350L,0x2b14cc09L, +/* 100*/ 0x40042956L,0x879d05ccL,0x2064b9caL,0xacaca40eL,0xb29c846eL, +/* 105*/ 0x9676c9e3L,0x752b7b8aL,0x7be2bcc2L,0x6bd58f5eL,0xd48f4c32L, +/* 110*/ 0x606835e4L,0x9cd7c364L,0x2c269b7aL,0x3a0d079cL,0x73b683feL, +/* 115*/ 0x45374f1eL,0x10afa242L,0x577f8666L,0xddaa10f6L,0xf34f561cL, +/* 120*/ 0x3d355d6bL,0xe47048aeL,0xaa13c492L,0x050344fdL,0x2aab5151L, +/* 125*/ 0xf5b26ae5L,0xed919a59L,0x5ac67900L,0xf1cde380L,0x0c79a11bL, +/* 130*/ 0x351533fcL,0xcd4d8e36L,0x1f856005L,0x690b9fddL,0xe736dccfL, +/* 135*/ 0x1d47bf6aL,0x7f66c72aL,0x85f21b7fL,0x983cbdb6L,0x01ebbebfL, +/* 140*/ 0x035f3b99L,0xeb111f34L,0x28cefdc6L,0x5bfc9ecdL,0xf22eacb0L, +/* 145*/ 0x9e41cbb2L,0xe0f8327cL,0x82e3e26fL,0xfc43fc86L,0xd0ba66dfL, +/* 150*/ 0x489ef2a7L,0xd9e0c81dL,0x68690d52L,0xcc451367L,0xc2232e16L, +/* 155*/ 0xe95a7335L,0x0fdae19bL,0xff5b962cL,0x97596527L,0xc46db333L, +/* 160*/ 0x3ed4c562L,0xc14c9d9eL,0x5d6faa21L,0x638e940dL,0xf9316d58L, +/* 165*/ 0x47b3b0eaL,0x30ffcad2L,0xce1bba7dL,0x1e6108e6L,0x2e1ea33dL, +/* 170*/ 0x507bf05bL,0xfafef94bL,0xd17de8e2L,0x5598b214L,0x1663f813L, +/* 175*/ 0x17d25a2dL,0xeefa5ff9L,0x582f4e37L,0x12128773L,0xfef17ab8L, +/* 180*/ 0x06005322L,0xbb32bbc9L,0x8c898508L,0x592c15f0L,0xd38a4054L, +/* 185*/ 0x4957b7d6L,0xd2b891dbL,0x37bd2d3eL,0x34ad20cbL,0x622288e9L, +/* 190*/ 0x2dc7345aL,0xafb416c0L,0x1cf459b1L,0xdc7739faL,0x0a711a25L, +/* 195*/ 0x13e18a0cL,0x5f72af4cL,0x6ac8db11L,0xbe53c18eL,0x1aa569b9L, +/* 200*/ 0xef551ea4L,0xa02a429fL,0xbd16e790L,0x7eb9171aL,0x77d693d8L, +/* 205*/ 0x8e06993aL,0x9bde7560L,0xe5801987L,0xc37a09beL,0xb8db76acL, +/* 210*/ 0xe2087294L,0x6c81616dL,0xb7f30fe7L,0xbc9b82bdL,0xfba4e4d4L, +/* 215*/ 0xc7b1012fL,0xa20c043bL,0xde9febd0L,0x2f9297ceL,0xe610aef8L, +/* 220*/ 0x70b06f19L,0xc86ae00bL,0x0e01988fL,0x41192ae0L,0x448c1cb5L, +/* 225*/ 0xadbe92eeL,0x7293a007L,0x1b54b5b3L,0xd61f63d1L,0xeae40a74L, +/* 230*/ 0x61a72b55L,0xec83a7d5L,0x88942806L,0x90a07da5L,0xd7424b95L, +/* 235*/ 0x67745b4eL,0xa31a1853L,0xca6021efL,0xdfb56c4fL,0xcbc2d915L, +/* 240*/ 0x3c48e918L,0x8bae3c63L,0x6f659c71L,0xf8b754c1L,0x2782f3deL, +/* 245*/ 0xf796f168L,0x71492c84L,0x33c0f5a6L,0x3144f6ecL,0x25dc412eL, +/* 250*/ 0xb16c5743L,0x83a1fa7eL,0x0997b101L,0xb627e6e8L,0xcf33905cL, +/* 255*/ 0x8456fb65L + /* End of S Box 8 */ }, + + + { /* Start of S Box 9 */ + +/* 0*/ 0xb29bea74L,0xc35da605L,0x305c1ca3L,0xd2e9f5bcL,0x6fd5bff4L, +/* 5*/ 0xff347703L,0xfc45b163L,0xf498e068L,0xb71229fcL,0x81acc3fbL, +/* 10*/ 0x78538a8bL,0x984ecf81L,0xa5da47a4L,0x8f259eefL,0x6475dc65L, +/* 15*/ 0x081865b9L,0x49e14a3cL,0x19e66079L,0xd382e91bL,0x5b109794L, +/* 20*/ 0x3f9f81e1L,0x4470a388L,0x41601abeL,0xaaf9f407L,0x8e175ef6L, +/* 25*/ 0xed842297L,0x893a4271L,0x1790839aL,0xd566a99eL,0x6b417deeL, +/* 30*/ 0x75c90d23L,0x715edb31L,0x723553f7L,0x9afb50c9L,0xfbc5f600L, +/* 35*/ 0xcd3b6a4eL,0x97ed0fbaL,0x29689aecL,0x63135c8eL,0xf0e26c7eL, +/* 40*/ 0x0692ae7fL,0xdbb208ffL,0x2ede3e9bL,0x6a65bebdL,0xd40867e9L, +/* 45*/ 0xc954afc5L,0x73b08201L,0x7ffdf809L,0x1195c24fL,0x1ca5adcaL, +/* 50*/ 0x74bd6d1fL,0xb393c455L,0xcadfd3faL,0x99f13011L,0x0ebca813L, +/* 55*/ 0x60e791b8L,0x6597ac7aL,0x18a7e46bL,0x09cb49d3L,0x0b27df6dL, +/* 60*/ 0xcfe52f87L,0xcef66837L,0xe6328035L,0xfa87c592L,0x37baff93L, +/* 65*/ 0xd71fcc99L,0xdcab205cL,0x4d7a5638L,0x48012510L,0x62797558L, +/* 70*/ 0xb6cf1fe5L,0xbc311834L,0x9c2373acL,0x14ec6175L,0xa439cbdfL, +/* 75*/ 0x54afb0eaL,0xd686960bL,0xfdd0d47bL,0x7b063902L,0x8b78bac3L, +/* 80*/ 0x26c6a4d5L,0x5c0055b6L,0x2376102eL,0x0411783eL,0x2aa3f1cdL, +/* 85*/ 0x51fc6ea8L,0x701ce243L,0x9b2a0abbL,0x0ad93733L,0x6e80d03dL, +/* 90*/ 0xaf6295d1L,0xf629896fL,0xa30b0648L,0x463d8dd4L,0x963f84cbL, +/* 95*/ 0x01ff94f8L,0x8d7fefdcL,0x553611c0L,0xa97c1719L,0xb96af759L, +/* 100*/ 0xe0e3c95eL,0x0528335bL,0x21fe5925L,0x821a5245L,0x807238b1L, +/* 105*/ 0x67f23db5L,0xea6b4eabL,0x0da6f985L,0xab1bc85aL,0xef8c90e4L, +/* 110*/ 0x4526230eL,0x38eb8b1cL,0x1b91cd91L,0x9fce5f0cL,0xf72cc72bL, +/* 115*/ 0xc64f2617L,0xdaf7857dL,0x7d373cf1L,0x28eaedd7L,0x203887d0L, +/* 120*/ 0xc49a155fL,0xa251b3b0L,0xf2d47ae3L,0x3d9ef267L,0x4a94ab2fL, +/* 125*/ 0x7755a222L,0x0205e329L,0xc28fa7a7L,0xaec1fe51L,0x270f164cL, +/* 130*/ 0x8c6d01bfL,0x53b5bc98L,0xc09d3febL,0x834986ccL,0x4309a12cL, +/* 135*/ 0x578b2a96L,0x3bb74b86L,0x69561b4aL,0x037e32f3L,0xde335b08L, +/* 140*/ 0xc5156be0L,0xe7ef09adL,0x93b834c7L,0xa7719352L,0x59302821L, +/* 145*/ 0xe3529d26L,0xf961da76L,0xcb142c44L,0xa0f3b98dL,0x76502457L, +/* 150*/ 0x945a414bL,0x078eeb12L,0xdff8de69L,0xeb6c8c2dL,0xbda90c4dL, +/* 155*/ 0xe9c44d16L,0x168dfd66L,0xad64763bL,0xa65fd764L,0x95a29c06L, +/* 160*/ 0x32d7713fL,0x40f0b277L,0x224af08fL,0x004cb5e8L,0x92574814L, +/* 165*/ 0x8877d827L,0x3e5b2d04L,0x68c2d5f2L,0x86966273L,0x1d433adaL, +/* 170*/ 0x8774988aL,0x3c0e0bfeL,0xddad581dL,0x2fd654edL,0x0f4769fdL, +/* 175*/ 0xc181ee9dL,0x5fd88f61L,0x341dbb3aL,0x528543f9L,0xd92235cfL, +/* 180*/ 0x1ea82eb4L,0xb5cd790fL,0x91d24f1eL,0xa869e6c2L,0x61f474d2L, +/* 185*/ 0xcc205addL,0x0c7bfba9L,0xbf2b0489L,0xb02d72d8L,0x2b46ece6L, +/* 190*/ 0xe4dcd90aL,0xb8a11440L,0xee8a63b7L,0x854dd1a1L,0xd1e00583L, +/* 195*/ 0x42b40e24L,0x9e8964deL,0xb4b35d78L,0xbec76f6eL,0x24b9c620L, +/* 200*/ 0xd8d399a6L,0x5adb2190L,0x2db12730L,0x3a5866afL,0x58c8fadbL, +/* 205*/ 0x5d8844e7L,0x8a4bf380L,0x15a01d70L,0x79f5c028L,0x66be3b8cL, +/* 210*/ 0xf3e42b53L,0x56990039L,0x2c0c3182L,0x5e16407cL,0xecc04515L, +/* 215*/ 0x6c440284L,0x4cb6701aL,0x13bfc142L,0x9d039f6aL,0x4f6e92c8L, +/* 220*/ 0xa1407c62L,0x8483a095L,0xc70ae1c4L,0xe20213a2L,0xbacafc41L, +/* 225*/ 0x4ecc12b3L,0x4bee3646L,0x1fe807aeL,0x25217f9cL,0x35dde5f5L, +/* 230*/ 0x7a7dd6ceL,0xf89cce50L,0xac07b718L,0x7e73d2c6L,0xe563e76cL, +/* 235*/ 0x123ca536L,0x3948ca56L,0x9019dd49L,0x10aa88d9L,0xc82451e2L, +/* 240*/ 0x473eb6d6L,0x506fe854L,0xe8bb03a5L,0x332f4c32L,0xfe1e1e72L, +/* 245*/ 0xb1ae572aL,0x7c0d7bc1L,0xe1c37eb2L,0xf542aa60L,0xf1a48ea0L, +/* 250*/ 0xd067b89fL,0xbbfa195dL,0x1a049b0dL,0x315946aaL,0x36d1b447L, +/* 255*/ 0x6d2ebdf0L + /* End of S Box 9 */ }, + + + { /* Start of S Box 10 */ + +/* 0*/ 0x0d188a6dL,0x12cea0dbL,0x7e63740eL,0x6a444821L,0x253d234fL, +/* 5*/ 0x6ffc6597L,0x94a6bdefL,0x33ee1b2fL,0x0a6c00c0L,0x3aa336b1L, +/* 10*/ 0x5af55d17L,0x265fb3dcL,0x0e89cf4dL,0x0786b008L,0xc80055b8L, +/* 15*/ 0x6b17c3ceL,0x72b05a74L,0xd21a8d78L,0xa6b70840L,0xfe8eae77L, +/* 20*/ 0xed69565cL,0x55e1bcf4L,0x585c2f60L,0xe06f1a62L,0xad67c0cdL, +/* 25*/ 0x7712af88L,0x9cc26acaL,0x1888053dL,0x37eb853eL,0x9215abd7L, +/* 30*/ 0xde30adfcL,0x1f1038e6L,0x70c51c8aL,0x8d586c26L,0xf72bdd90L, +/* 35*/ 0x4dc3ce15L,0x68eaeefaL,0xd0e9c8b9L,0x200f9c44L,0xddd141baL, +/* 40*/ 0x024bf1d3L,0x0f64c9d4L,0xc421e9e9L,0x9d11c14cL,0x9a0dd9e4L, +/* 45*/ 0x5f92ec19L,0x1b980df0L,0x1dcc4542L,0xb8fe8c56L,0x0c9c9167L, +/* 50*/ 0x4e81eb49L,0xca368f27L,0xe3603b37L,0xea08acccL,0xac516992L, +/* 55*/ 0xc34f513bL,0x804d100dL,0x6edca4c4L,0xfc912939L,0x29d219b0L, +/* 60*/ 0x278aaa3cL,0x4868da7dL,0x54e890b7L,0xb46d735aL,0x514589aaL, +/* 65*/ 0xd6c630afL,0x4980dfe8L,0xbe3ccc55L,0x59d41202L,0x650c078bL, +/* 70*/ 0xaf3a9e7bL,0x3ed9827aL,0x9e79fc6eL,0xaadbfbaeL,0xc5f7d803L, +/* 75*/ 0x3daf7f50L,0x67b4f465L,0x73406e11L,0x39313f8cL,0x8a6e6686L, +/* 80*/ 0xd8075f1fL,0xd3cbfed1L,0x69c7e49cL,0x930581e0L,0xe4b1a5a8L, +/* 85*/ 0xbbc45472L,0x09ddbf58L,0xc91d687eL,0xbdbffda5L,0x88c08735L, +/* 90*/ 0xe9e36bf9L,0xdb5ea9b6L,0x95559404L,0x08f432fbL,0xe24ea281L, +/* 95*/ 0x64663579L,0x000b8010L,0x7914e7d5L,0x32fd0473L,0xd1a7f0a4L, +/* 100*/ 0x445ab98eL,0xec72993fL,0xa29a4d32L,0xb77306d8L,0xc7c97cf6L, +/* 105*/ 0x7b6ab645L,0xf5ef7adfL,0xfb2e15f7L,0xe747f757L,0x5e944354L, +/* 110*/ 0x234a2669L,0x47e46359L,0x9b9d11a9L,0x40762cedL,0x56f1de98L, +/* 115*/ 0x11334668L,0x890a9a70L,0x1a296113L,0xb3bd4af5L,0x163b7548L, +/* 120*/ 0xd51b4f84L,0xb99b2abcL,0x3cc1dc30L,0xa9f0b56cL,0x812272b2L, +/* 125*/ 0x0b233a5fL,0xb650dbf2L,0xf1a0771bL,0x36562b76L,0xdc037b0fL, +/* 130*/ 0x104c97ffL,0xc2ec98d2L,0x90596f22L,0x28b6620bL,0xdf42b212L, +/* 135*/ 0xfdbc4243L,0xf3fb175eL,0x4a2d8b00L,0xe8f3869bL,0x30d69bc3L, +/* 140*/ 0x853714c8L,0xa7751d2eL,0x31e56deaL,0xd4840b0cL,0x9685d783L, +/* 145*/ 0x068c9333L,0x8fba032cL,0x76d7bb47L,0x6d0ee22bL,0xb546794bL, +/* 150*/ 0xd971b894L,0x8b09d253L,0xa0ad5761L,0xee77ba06L,0x46359f31L, +/* 155*/ 0x577cc7ecL,0x52825efdL,0xa4beed95L,0x9825c52aL,0xeb48029aL, +/* 160*/ 0xbaae59f8L,0xcf490ee1L,0xbc990164L,0x8ca49dfeL,0x4f38a6e7L, +/* 165*/ 0x2ba98389L,0x8228f538L,0x199f64acL,0x01a1cac5L,0xa8b51641L, +/* 170*/ 0x5ce72d01L,0x8e5df26bL,0x60f28e1eL,0xcd5be125L,0xe5b376bfL, +/* 175*/ 0x1c8d3116L,0x7132cbb3L,0xcb7ae320L,0xc0fa5366L,0xd7653e34L, +/* 180*/ 0x971c88c2L,0xc62c7dd0L,0x34d0a3daL,0x868f6709L,0x7ae6fa8fL, +/* 185*/ 0x22bbd523L,0x66cd3d5bL,0x1ef9288dL,0xf9cf58c1L,0x5b784e80L, +/* 190*/ 0x7439a191L,0xae134c36L,0x9116c463L,0x2e9e1396L,0xf8611f3aL, +/* 195*/ 0x2d2f3307L,0x247f37ddL,0xc1e2ff9dL,0x43c821e5L,0x05ed5cabL, +/* 200*/ 0xef74e80aL,0x4cca6028L,0xf0ac3cbdL,0x5d874b29L,0x6c62f6a6L, +/* 205*/ 0x4b2a2ef3L,0xb1aa2087L,0x62a5d0a3L,0x0327221cL,0xb096b4c6L, +/* 210*/ 0x417ec693L,0xaba840d6L,0x789725ebL,0xf4b9e02dL,0xe6e00975L, +/* 215*/ 0xcc04961aL,0x63f624bbL,0x7fa21ecbL,0x2c01ea7fL,0xb2415005L, +/* 220*/ 0x2a8bbeb5L,0x83b2b14eL,0xa383d1a7L,0x5352f96aL,0x043ecdadL, +/* 225*/ 0xce1918a1L,0xfa6be6c9L,0x50def36fL,0xf6b80ce2L,0x4543ef7cL, +/* 230*/ 0x9953d651L,0xf257955dL,0x87244914L,0xda1e0a24L,0xffda4785L, +/* 235*/ 0x14d327a2L,0x3b93c29fL,0x840684b4L,0x61ab71a0L,0x9f7b784aL, +/* 240*/ 0x2fd570cfL,0x15955bdeL,0x38f8d471L,0x3534a718L,0x133fb71dL, +/* 245*/ 0x3fd80f52L,0x4290a8beL,0x75ff44c7L,0xa554e546L,0xe1023499L, +/* 250*/ 0xbf2652e3L,0x7d20399eL,0xa1df7e82L,0x177092eeL,0x217dd3f1L, +/* 255*/ 0x7c1ff8d9L + /* End of S Box 10 */ }, + + + { /* Start of S Box 11 */ + +/* 0*/ 0x12113f2eL,0xbfbd0785L,0xf11793fbL,0xa5bff566L,0x83c7b0e5L, +/* 5*/ 0x72fb316bL,0x75526a9aL,0x41e0e612L,0x7156ba09L,0x53ce7deeL, +/* 10*/ 0x0aa26881L,0xa43e0d7dL,0x3da73ca3L,0x182761edL,0xbd5077ffL, +/* 15*/ 0x56db4aa0L,0xe792711cL,0xf0a4eb1dL,0x7f878237L,0xec65c4e8L, +/* 20*/ 0x08dc8d43L,0x0f8ce142L,0x8258abdaL,0xf4154e16L,0x49dec2fdL, +/* 25*/ 0xcd8d5705L,0x6c2c3a0fL,0x5c12bb88L,0xeff3cdb6L,0x2c89ed8cL, +/* 30*/ 0x7beba967L,0x2a142157L,0xc6d0836fL,0xb4f97e96L,0x6931e969L, +/* 35*/ 0x514e6c7cL,0xa7792600L,0x0bbbf780L,0x59671bbdL,0x0707b676L, +/* 40*/ 0x37482d93L,0x80af1479L,0x3805a60dL,0xe1f4cac1L,0x580b3074L, +/* 45*/ 0x30b8d6ceL,0x05a304beL,0xd176626dL,0xebca97f3L,0xbb201f11L, +/* 50*/ 0x6a1afe23L,0xffaa86e4L,0x62b4da49L,0x1b6629f5L,0xf5d9e092L, +/* 55*/ 0xf37f3dd1L,0x619bd45bL,0xa6ec8e4fL,0x29c80939L,0x0c7c0c34L, +/* 60*/ 0x9cfe6e48L,0xe65fd3acL,0x73613b65L,0xb3c669f9L,0xbe2e8a9eL, +/* 65*/ 0x286f9678L,0x5797fd13L,0x99805d75L,0xcfb641c5L,0xa91074baL, +/* 70*/ 0x6343af47L,0x6403cb46L,0x8894c8dbL,0x2663034cL,0x3c40dc5eL, +/* 75*/ 0x00995231L,0x96789aa2L,0x2efde4b9L,0x7dc195e1L,0x547dadd5L, +/* 80*/ 0x06a8ea04L,0xf2347a63L,0x5e0dc6f7L,0x8462dfc2L,0x1e6b2c3cL, +/* 85*/ 0x9bd275b3L,0x91d419e2L,0xbcefd17eL,0xb9003924L,0xd07e7320L, +/* 90*/ 0xdef0495cL,0xc36ad00eL,0x1785b1abL,0x92e20bcfL,0xb139f0e9L, +/* 95*/ 0x675bb9a1L,0xaecfa4afL,0x132376cbL,0xe84589d3L,0x79a05456L, +/* 100*/ 0xa2f860bcL,0x1ae4f8b5L,0x20df4db4L,0xa1e1428bL,0x3bf60a1aL, +/* 105*/ 0x27ff7bf1L,0xcb44c0e7L,0xf7f587c4L,0x1f3b9b21L,0x94368f01L, +/* 110*/ 0x856e23a4L,0x6f93de3fL,0x773f5bbfL,0x8b22056eL,0xdf41f654L, +/* 115*/ 0xb8246ff4L,0x8d57bff2L,0xd57167eaL,0xc5699f22L,0x40734ba7L, +/* 120*/ 0x5d5c2772L,0x033020a8L,0xe30a7c4dL,0xadc40fd6L,0x76353441L, +/* 125*/ 0x5aa5229bL,0x81516590L,0xda49f14eL,0x4fa672a5L,0x4d9fac5fL, +/* 130*/ 0x154be230L,0x8a7a5cc0L,0xce3d2f84L,0xcca15514L,0x5221360cL, +/* 135*/ 0xaf0fb81eL,0x5bdd5873L,0xf6825f8fL,0x1113d228L,0x70ad996cL, +/* 140*/ 0x93320051L,0x60471c53L,0xe9ba567bL,0x3a462ae3L,0x5f55e72dL, +/* 145*/ 0x1d3c5ad7L,0xdcfc45ecL,0x34d812efL,0xfa96ee1bL,0x369d1ef8L, +/* 150*/ 0xc9b1a189L,0x7c1d3555L,0x50845edcL,0x4bb31877L,0x8764a060L, +/* 155*/ 0x8c9a9415L,0x230e1a3aL,0xb05e9133L,0x242b9e03L,0xa3b99db7L, +/* 160*/ 0xc2d7fb0aL,0x3333849dL,0xd27278d4L,0xb5d3efa6L,0x78ac28adL, +/* 165*/ 0xc7b2c135L,0x0926ecf0L,0xc1374c91L,0x74f16d98L,0x2274084aL, +/* 170*/ 0x3f6d9cfaL,0x7ac0a383L,0xb73aff1fL,0x3909a23dL,0x9f1653aeL, +/* 175*/ 0x4e2f3e71L,0xca5ab22aL,0xe01e3858L,0x90c5a7ebL,0x3e4a17dfL, +/* 180*/ 0xaa987fb0L,0x488bbd62L,0xb625062bL,0x2d776bb8L,0x43b5fc08L, +/* 185*/ 0x1490d532L,0xd6d12495L,0x44e89845L,0x2fe60118L,0x9d9ef950L, +/* 190*/ 0xac38133eL,0xd3864329L,0x017b255aL,0xfdc2dd26L,0x256851e6L, +/* 195*/ 0x318e7086L,0x2bfa4861L,0x89eac706L,0xee5940c6L,0x68c3bc2fL, +/* 200*/ 0xe260334bL,0x98da90bbL,0xf818f270L,0x4706d897L,0x212d3799L, +/* 205*/ 0x4cf7e5d0L,0xd9c9649fL,0xa85db5cdL,0x35e90e82L,0x6b881152L, +/* 210*/ 0xab1c02c7L,0x46752b02L,0x664f598eL,0x45ab2e64L,0xc4cdb4b2L, +/* 215*/ 0xba42107fL,0xea2a808aL,0x971bf3deL,0x4a54a836L,0x4253aeccL, +/* 220*/ 0x1029be68L,0x6dcc9225L,0xe4bca56aL,0xc0ae50b1L,0x7e011d94L, +/* 225*/ 0xe59c162cL,0xd8e5c340L,0xd470fa0bL,0xb2be79ddL,0xd783889cL, +/* 230*/ 0x1cede8f6L,0x8f4c817aL,0xddb785c9L,0x860232d8L,0x198aaad9L, +/* 235*/ 0xa0814738L,0x3219cffcL,0x169546d2L,0xfc0cb759L,0x55911510L, +/* 240*/ 0x04d5cec3L,0xed08cc3bL,0x0d6cf427L,0xc8e38ccaL,0x0eeee3feL, +/* 245*/ 0x9ee7d7c8L,0xf9f24fa9L,0xdb04b35dL,0x9ab0c9e0L,0x651f4417L, +/* 250*/ 0x028f8b07L,0x6e28d9aaL,0xfba96319L,0x8ed66687L,0xfecbc58dL, +/* 255*/ 0x954ddb44L + /* End of S Box 11 */ }, + + + { /* Start of S Box 12 */ + +/* 0*/ 0x7b0bdffeL,0x865d16b1L,0x49a058c0L,0x97abaa3fL,0xcaacc75dL, +/* 5*/ 0xaba6c17dL,0xf8746f92L,0x6f48aeedL,0x8841d4b5L,0xf36a146aL, +/* 10*/ 0x73c390abL,0xe6fb558fL,0x87b1019eL,0x26970252L,0x246377b2L, +/* 15*/ 0xcbf676aeL,0xf923db06L,0xf7389116L,0x14c81a90L,0x83114eb4L, +/* 20*/ 0x8b137559L,0x95a86a7aL,0xd5b8da8cL,0xc4df780eL,0x5a9cb3e2L, +/* 25*/ 0xe44d4062L,0xe8dc8ef6L,0x9d180845L,0x817ad18bL,0xc286c85bL, +/* 30*/ 0x251f20deL,0xee6d5933L,0xf6edef81L,0xd4d16c1eL,0xc94a0c32L, +/* 35*/ 0x8437fd22L,0x3271ee43L,0x42572aeeL,0x5f91962aL,0x1c522d98L, +/* 40*/ 0x59b23f0cL,0xd86b8804L,0x08c63531L,0x2c0d7a40L,0xb97c4729L, +/* 45*/ 0x04964df9L,0x13c74a17L,0x5878362fL,0x4c808cd6L,0x092cb1e0L, +/* 50*/ 0x6df02885L,0xa0c2105eL,0x8aba9e68L,0x64e03057L,0xe5d61325L, +/* 55*/ 0x0e43a628L,0x16dbd62bL,0x2733d90bL,0x3ae57283L,0xc0c1052cL, +/* 60*/ 0x4b6fb620L,0x37513953L,0xfc898bb3L,0x471b179fL,0xdf6e66b8L, +/* 65*/ 0xd32142f5L,0x9b30fafcL,0x4ed92549L,0x105c6d99L,0x4acd69ffL, +/* 70*/ 0x2b1a27d3L,0x6bfcc067L,0x6301a278L,0xad36e6f2L,0xef3ff64eL, +/* 75*/ 0x56b3cadbL,0x0184bb61L,0x17beb9fdL,0xfaec6109L,0xa2e1ffa1L, +/* 80*/ 0x2fd224f8L,0x238f5be6L,0x8f8570cfL,0xaeb5f25aL,0x4f1d3e64L, +/* 85*/ 0x4377eb24L,0x1fa45346L,0xb2056386L,0x52095e76L,0xbb7b5adcL, +/* 90*/ 0x3514e472L,0xdde81e6eL,0x7acea9c4L,0xac15cc48L,0x71c97d93L, +/* 95*/ 0x767f941cL,0x911052a2L,0xffea09bfL,0xfe3ddcf0L,0x15ebf3aaL, +/* 100*/ 0x9235b8bcL,0x75408615L,0x9a723437L,0xe1a1bd38L,0x33541b7eL, +/* 105*/ 0x1bdd6856L,0xb307e13eL,0x90814bb0L,0x51d7217bL,0x0bb92219L, +/* 110*/ 0x689f4500L,0xc568b01fL,0x5df3d2d7L,0x3c0ecd0dL,0x2a0244c8L, +/* 115*/ 0x852574e8L,0xe72f23a9L,0x8e26ed02L,0x2d92cbddL,0xdabc0458L, +/* 120*/ 0xcdf5feb6L,0x9e4e8dccL,0xf4f1e344L,0x0d8c436dL,0x4427603bL, +/* 125*/ 0xbdd37fdaL,0x80505f26L,0x8c7d2b8eL,0xb73273c5L,0x397362eaL, +/* 130*/ 0x618a3811L,0x608bfb88L,0x06f7d714L,0x212e4677L,0x28efceadL, +/* 135*/ 0x076c0371L,0x36a3a4d9L,0x5487b455L,0x3429a365L,0x65d467acL, +/* 140*/ 0x78ee7eebL,0x99bf12b7L,0x4d129896L,0x772a5601L,0xcce284c7L, +/* 145*/ 0x2ed85c21L,0xd099e8a4L,0xa179158aL,0x6ac0ab1aL,0x299a4807L, +/* 150*/ 0xbe67a58dL,0xdc19544aL,0xb8949b54L,0x8d315779L,0xb6f849c1L, +/* 155*/ 0x53c5ac34L,0x66de92a5L,0xf195dd13L,0x318d3a73L,0x301ec542L, +/* 160*/ 0x0cc40da6L,0xf253ade4L,0x467ee566L,0xea5585ecL,0x3baf19bbL, +/* 165*/ 0x7de9f480L,0x79006e7cL,0xa9b7a197L,0xa44bd8f1L,0xfb2ba739L, +/* 170*/ 0xec342fd4L,0xed4fd32dL,0x3d1789baL,0x400f5d7fL,0xc798f594L, +/* 175*/ 0x4506a847L,0x034c0a95L,0xe2162c9dL,0x55a9cfd0L,0x692d832eL, +/* 180*/ 0xcf9db2caL,0x5e2287e9L,0xd2610ef3L,0x1ae7ecc2L,0x48399ca0L, +/* 185*/ 0xa7e4269bL,0x6ee3a0afL,0x7065bfe1L,0xa6ffe708L,0x2256804cL, +/* 190*/ 0x7476e21bL,0x41b0796cL,0x7c243b05L,0x000a950fL,0x1858416bL, +/* 195*/ 0xf5a53c89L,0xe9fef823L,0x3f443275L,0xe0cbf091L,0x0af27b84L, +/* 200*/ 0x3ebb0f27L,0x1de6f7f4L,0xc31c29f7L,0xb166de3dL,0x12932ec3L, +/* 205*/ 0x9c0c0674L,0x5cda81b9L,0xd1bd9d12L,0xaffd7c82L,0x8962bca7L, +/* 210*/ 0xa342c4a8L,0x62457151L,0x82089f03L,0xeb49c670L,0x5b5f6530L, +/* 215*/ 0x7e28bad2L,0x20880ba3L,0xf0faafcdL,0xce82b56fL,0x0275335cL, +/* 220*/ 0xc18e8afbL,0xde601d69L,0xba9b820aL,0xc8a2be4fL,0xd7cac335L, +/* 225*/ 0xd9a73741L,0x115e974dL,0x7f5ac21dL,0x383bf9c6L,0xbcaeb75fL, +/* 230*/ 0xfd0350ceL,0xb5d06b87L,0x9820e03cL,0x72d5f163L,0xe3644fc9L, +/* 235*/ 0xa5464c4bL,0x57048fcbL,0x9690c9dfL,0xdbf9eafaL,0xbff4649aL, +/* 240*/ 0x053c00e3L,0xb4b61136L,0x67593dd1L,0x503ee960L,0x9fb4993aL, +/* 245*/ 0x19831810L,0xc670d518L,0xb05b51d8L,0x0f3a1ce5L,0x6caa1f9cL, +/* 250*/ 0xaacc31beL,0x949ed050L,0x1ead07e7L,0xa8479abdL,0xd6cffcd5L, +/* 255*/ 0x936993efL + /* End of S Box 12 */ }, + + + { /* Start of S Box 13 */ + +/* 0*/ 0x472e91cbL,0x5444b5b6L,0x62be5861L,0x1be102c7L,0x63e4b31eL, +/* 5*/ 0xe81f71b7L,0x9e2317c9L,0x39a408aeL,0x518024f4L,0x1731c66fL, +/* 10*/ 0x68cbc918L,0x71fb0c9eL,0xd03b7fddL,0x7d6222ebL,0x9057eda3L, +/* 15*/ 0x1a34a407L,0x8cc2253dL,0xb6f6979dL,0x835675dcL,0xf319be9fL, +/* 20*/ 0xbe1cd743L,0x4d32fee4L,0x77e7d887L,0x37e9ebfdL,0x15f851e8L, +/* 25*/ 0x23dc3706L,0x19d78385L,0xbd506933L,0xa13ad4a6L,0x913f1a0eL, +/* 30*/ 0xdde560b9L,0x9a5f0996L,0xa65a0435L,0x48d34c4dL,0xe90839a7L, +/* 35*/ 0x8abba54eL,0x6fd13ce1L,0xc7eebd3cL,0x0e297602L,0x58b9bbb4L, +/* 40*/ 0xef7901e6L,0x64a28a62L,0xa509875aL,0xf8834442L,0x2702c709L, +/* 45*/ 0x07353f31L,0x3b39f665L,0xf5b18b49L,0x4010ae37L,0x784de00bL, +/* 50*/ 0x7a1121e9L,0xde918ed3L,0xc8529dcdL,0x816a5d05L,0x02ed8298L, +/* 55*/ 0x04e3dd84L,0xfd2bc3e2L,0xaf167089L,0x96af367eL,0xa4da6232L, +/* 60*/ 0x18ff7325L,0x05f9a9f1L,0x4fefb9f9L,0xcd94eaa5L,0xbfaa5069L, +/* 65*/ 0xa0b8c077L,0x60d86f57L,0xfe71c813L,0x29ebd2c8L,0x4ca86538L, +/* 70*/ 0x6bf1a030L,0xa237b88aL,0xaa8af41dL,0xe1f7b6ecL,0xe214d953L, +/* 75*/ 0x33057879L,0x49caa736L,0xfa45cff3L,0xc063b411L,0xba7e27d0L, +/* 80*/ 0x31533819L,0x2a004ac1L,0x210efc3fL,0x2646885eL,0x66727dcfL, +/* 85*/ 0x9d7fbf54L,0xa8dd0ea8L,0x3447caceL,0x3f0c14dbL,0xb8382aacL, +/* 90*/ 0x4ace3539L,0x0a518d51L,0x95178981L,0x35aee2caL,0x73f0f7e3L, +/* 95*/ 0x94281140L,0x59d0e523L,0xd292cb88L,0x565d1b27L,0x7ec8fbafL, +/* 100*/ 0x069af08dL,0xc127fd24L,0x0bc77b10L,0x5f03e7efL,0x453e99baL, +/* 105*/ 0xeed9ff7fL,0x87b55215L,0x7915ab4cL,0xd389a358L,0x5e75ce6dL, +/* 110*/ 0x28d655c0L,0xdad26c73L,0x2e2510ffL,0x9fa7eeccL,0x1d0629c3L, +/* 115*/ 0xdc9c9c46L,0x2d67ecd7L,0xe75e94bdL,0x3d649e2aL,0x6c413a2bL, +/* 120*/ 0x706f0d7cL,0xdfb0127bL,0x4e366b55L,0x2c825650L,0x24205720L, +/* 125*/ 0xb5c998f7L,0x3e95462cL,0x756e5c72L,0x3259488fL,0x11e8771aL, +/* 130*/ 0xa7c0a617L,0x577663e5L,0x089b6401L,0x8eab1941L,0xae55ef8cL, +/* 135*/ 0x3aac5460L,0xd4e6262fL,0x5d979a47L,0xb19823b0L,0x7f8d6a0cL, +/* 140*/ 0xffa08683L,0x0170cd0fL,0x858cd5d8L,0x53961c90L,0xc4c61556L, +/* 145*/ 0x41f2f226L,0xcfcd062dL,0xf24c03b8L,0xea81df5bL,0x7be2fa52L, +/* 150*/ 0xb361f98bL,0xc2901316L,0x55ba4bbcL,0x93b234a9L,0x0fbc6603L, +/* 155*/ 0x80a96822L,0x6d60491fL,0x22bd00f8L,0xbcad5aadL,0x52f3f13bL, +/* 160*/ 0x42fd2b28L,0xb41dd01cL,0xc52c93bfL,0xfc663094L,0x8f58d100L, +/* 165*/ 0x43fecc08L,0xc6331e5dL,0xe6480f66L,0xca847204L,0x4bdf1da0L, +/* 170*/ 0x30cc2efbL,0x13e02deaL,0xfb49ac45L,0xf9d4434fL,0xf47c5b9cL, +/* 175*/ 0x148879c2L,0x039fc234L,0xa3db9bfcL,0xd1a1dc5cL,0x763d7cd4L, +/* 180*/ 0xed6d2f93L,0xab13af6eL,0x1e8e054aL,0xd68f4f9aL,0xc30484b3L, +/* 185*/ 0xd7d50afaL,0x6930855fL,0xcc07db95L,0xce746db1L,0x744e967dL, +/* 190*/ 0xf16cf575L,0x8643e8b5L,0xf0eae38eL,0xe52de1d1L,0x6587dae0L, +/* 195*/ 0x0c4b8121L,0x1c7ac567L,0xac0db20aL,0x36c3a812L,0x5b1a4514L, +/* 200*/ 0xa9a3f868L,0xb9263baaL,0xcb3ce9d2L,0xe44fb1a4L,0x9221bc82L, +/* 205*/ 0xb29390feL,0x6ab41863L,0x974a3e2eL,0x89f531c5L,0x255ca13eL, +/* 210*/ 0x8b65d348L,0xec248f78L,0xd8fc16f0L,0x50ecdeeeL,0x09010792L, +/* 215*/ 0x3c7d1fb2L,0xeba5426bL,0x847b417aL,0x468b40d9L,0x8dc4e680L, +/* 220*/ 0x7cc1f391L,0x2f1eb086L,0x6e5baa6aL,0xe0b395daL,0xe31b2cf6L, +/* 225*/ 0xd9690b0dL,0x729ec464L,0x38403ddeL,0x610b80a2L,0x5cf433abL, +/* 230*/ 0xb0785fc4L,0xd512e4c6L,0xbbb7d699L,0x5a86591bL,0x10cf5376L, +/* 235*/ 0x12bf9f4bL,0x980fbaa1L,0x992a4e70L,0x20fa7ae7L,0xf7996ebbL, +/* 240*/ 0xc918a2beL,0x82de74f2L,0xad54209bL,0xf66b4d74L,0x1fc5b771L, +/* 245*/ 0x169d9229L,0x887761dfL,0x00b667d5L,0xdb425e59L,0xb72f2844L, +/* 250*/ 0x9b0ac1f5L,0x9c737e3aL,0x2b85476cL,0x6722add6L,0x44a63297L, +/* 255*/ 0x0d688cedL + /* End of S Box 13 */ }, + + + { /* Start of S Box 14 */ + +/* 0*/ 0xabc59484L,0x4107778aL,0x8ad94c6fL,0xfe83df90L,0x0f64053fL, +/* 5*/ 0xd1292e9dL,0xc5744356L,0x8dd1abb4L,0x4c4e7667L,0xfb4a7fc1L, +/* 10*/ 0x74f402cbL,0x70f06afdL,0xa82286f2L,0x918dd076L,0x7a97c5ceL, +/* 15*/ 0x48f7bde3L,0x6a04d11dL,0xac243ef7L,0x33ac10caL,0x2f7a341eL, +/* 20*/ 0x5f75157aL,0xf4773381L,0x591c870eL,0x78df8cc8L,0x22f3adb0L, +/* 25*/ 0x251a5993L,0x09fbef66L,0x796942a8L,0x97541d2eL,0x2373daa9L, +/* 30*/ 0x1bd2f142L,0xb57e8eb2L,0xe1a5bfdbL,0x7d0efa92L,0xb3442c94L, +/* 35*/ 0xd2cb6447L,0x386ac97eL,0x66d61805L,0xbdada15eL,0x11bc1aa7L, +/* 40*/ 0x14e9f6eaL,0xe533a0c0L,0xf935ee0aL,0x8fee8a04L,0x810d6d85L, +/* 45*/ 0x7c68b6d6L,0x4edc9aa2L,0x956e897dL,0xed87581aL,0x264be9d7L, +/* 50*/ 0xff4ddb29L,0x823857c2L,0xe005a9a0L,0xf1cc2450L,0x6f9951e1L, +/* 55*/ 0xaade2310L,0xe70c75f5L,0x83e1a31fL,0x4f7dde8eL,0xf723b563L, +/* 60*/ 0x368e0928L,0x86362b71L,0x21e8982dL,0xdfb3f92bL,0x44676352L, +/* 65*/ 0x99efba31L,0x2eab4e1cL,0xfc6ca5e7L,0x0ebe5d4eL,0xa0717d0cL, +/* 70*/ 0xb64f8199L,0x946b31a1L,0x5656cbc6L,0xcffec3efL,0x622766c9L, +/* 75*/ 0xfa211e35L,0x52f98b89L,0x6d01674bL,0x4978a802L,0xf651f701L, +/* 80*/ 0x15b0d43dL,0xd6ff4683L,0x3463855fL,0x672ba29cL,0xbc128312L, +/* 85*/ 0x4626a70dL,0xc8927a5aL,0xb8481cf9L,0x1c962262L,0xa21196baL, +/* 90*/ 0xbaba5ee9L,0x5bb162d0L,0x69943bd1L,0x0c47e35cL,0x8cc9619aL, +/* 95*/ 0xe284d948L,0x271bf264L,0xc27fb398L,0x4bc70897L,0x60cf202cL, +/* 100*/ 0x7f42d6aaL,0xa5a13506L,0x5d3e8860L,0xcea63d3cL,0x63bf0a8fL, +/* 105*/ 0xf02e9efaL,0xb17b0674L,0xb072b1d3L,0x06e5723bL,0x3737e436L, +/* 110*/ 0x24aa49c7L,0x0ded0d18L,0xdb256b14L,0x58b27877L,0xecb49f54L, +/* 115*/ 0x6c40256aL,0x6ea92ffbL,0x3906aa4cL,0xc9866fd5L,0x4549323eL, +/* 120*/ 0xa7b85fabL,0x1918cc27L,0x7308d7b5L,0x1e16c7adL,0x71850b37L, +/* 125*/ 0x3095fd78L,0xa63b70e6L,0xd880e2aeL,0x3e282769L,0xa39ba6bcL, +/* 130*/ 0x98700fa3L,0xf34c53e8L,0x288af426L,0xb99d930fL,0xf5b99df1L, +/* 135*/ 0xe9d0c8cfL,0x5ac8405dL,0x50e7217bL,0x511fbbbeL,0x2ca2e639L, +/* 140*/ 0xc020301bL,0x356dbc00L,0x8e43ddb9L,0x4d327b4aL,0xf20ff3edL, +/* 145*/ 0x1dbb29bdL,0x43d44779L,0xa1b68f70L,0x6114455bL,0xe63d280bL, +/* 150*/ 0x6bf6ff65L,0x10fc39e5L,0x3dae126eL,0xc1d7cf11L,0xcb60b795L, +/* 155*/ 0x1789d5b3L,0x9bca36b7L,0x08306075L,0x84615608L,0x8b3a0186L, +/* 160*/ 0xe88fbecdL,0x7ba47c4dL,0x2de44dacL,0x653fe58dL,0xcca0b968L, +/* 165*/ 0xd7fa0e72L,0x93901780L,0x1f2c26ccL,0xae595b6bL,0xa9ecea9bL, +/* 170*/ 0xe3dbf8c4L,0x319cc130L,0x12981196L,0x01a3a4deL,0x32c454b6L, +/* 175*/ 0x755bd817L,0x3cd871e4L,0xa48bb8daL,0x02fdec09L,0xfd2dc2e2L, +/* 180*/ 0x9e578088L,0x9a9f916dL,0x4065fe6cL,0x1853999eL,0xc7793f23L, +/* 185*/ 0xdc1016bbL,0x969355ffL,0x7ef292f6L,0xcdce4adcL,0x05e24416L, +/* 190*/ 0x85c16c46L,0xd441d37fL,0x57bd6855L,0x8746f54fL,0x9ca773dfL, +/* 195*/ 0x770bae22L,0x54828413L,0xb75e4b19L,0x04c35c03L,0xbf7cca07L, +/* 200*/ 0x2955c4ddL,0x721db041L,0xb2394f33L,0x03f51387L,0x89b73c9fL, +/* 205*/ 0x0b1737f3L,0x07e69024L,0x9231d245L,0x76193861L,0x88159c15L, +/* 210*/ 0xdeb552d9L,0xd9767e40L,0x20c6c0c3L,0x4281977cL,0xf8afe1e0L, +/* 215*/ 0xd32a0751L,0x3fc27432L,0xddf1dcc5L,0x68581f34L,0x3bcd5025L, +/* 220*/ 0x0091b2eeL,0x4aeb6944L,0x1602e743L,0xea09eb58L,0xef0a2a8bL, +/* 225*/ 0x641e03a5L,0xeb50e021L,0x5c8ccef8L,0x802ff0b8L,0xd5e3edfeL, +/* 230*/ 0xc4dd1b49L,0x5334cd2aL,0x13f82d2fL,0x47450c20L,0x55dafbd2L, +/* 235*/ 0xbec0c6f4L,0xb45d7959L,0x3ad36e8cL,0x0aa8ac57L,0x1a3c8d73L, +/* 240*/ 0xe45aafb1L,0x9f664838L,0xc6880053L,0xd0039bbfL,0xee5f19ebL, +/* 245*/ 0xca0041d8L,0xbbea3aafL,0xda628291L,0x9d5c95d4L,0xadd504a6L, +/* 250*/ 0xc39ab482L,0x5e9e14a4L,0x2be065f0L,0x2a13fc3aL,0x9052e8ecL, +/* 255*/ 0xaf6f5afcL + /* End of S Box 14 */ }, + + + { /* Start of S Box 15 */ + +/* 0*/ 0x519aa8b5L,0xbb303da9L,0xe00e2b10L,0xdfa6c1dbL,0x2e6b952eL, +/* 5*/ 0xee10dc23L,0x37936d09L,0x1fc42e92L,0x39b25a9fL,0x13ff89f4L, +/* 10*/ 0xc8f53feaL,0x18500bc7L,0x95a0379dL,0x98f751c2L,0x2289c42fL, +/* 15*/ 0xa21e4098L,0x6f391f41L,0xf27e7e58L,0x0d0df887L,0x4b79d540L, +/* 20*/ 0x8e8409aaL,0x71fe46f8L,0x688a9b29L,0x3f08b548L,0x84abe03aL, +/* 25*/ 0x5e91b6c1L,0xfde4c2aeL,0x251d0e72L,0x92d4fee5L,0xf9371967L, +/* 30*/ 0x9175108fL,0xe6e81835L,0x8c8cb8eeL,0xb55a67b3L,0xcef138ccL, +/* 35*/ 0x8b256268L,0x00d815f5L,0xe8810812L,0x77826189L,0xea73267dL, +/* 40*/ 0x19b90f8dL,0x45c33bb4L,0x82477056L,0xe1770075L,0x09467aa6L, +/* 45*/ 0xa7c6f54aL,0x79768742L,0x61b86bcaL,0xd6644a44L,0xe33f0171L, +/* 50*/ 0xc229fbcdL,0x41b08febL,0xd1903e30L,0x65ec9080L,0x563d6fbdL, +/* 55*/ 0xf56da488L,0xebf64cd8L,0x4934426bL,0x7c8592fcL,0x6aca8cf2L, +/* 60*/ 0x1cea111bL,0x3a57ee7aL,0xace11c0dL,0x9942d85eL,0xc4613407L, +/* 65*/ 0xfa8e643bL,0x327fc701L,0x4ca9be82L,0x3352526dL,0x2c047f63L, +/* 70*/ 0xf3a8f7ddL,0x1a4a98a8L,0x762ed4d1L,0x27c75008L,0xbdf497c0L, +/* 75*/ 0x7a7b84dfL,0x315c28abL,0x801f93e3L,0xf19b0ca1L,0x8f14e46aL, +/* 80*/ 0xe48ba333L,0x9605e625L,0xf03ecb60L,0x60385f2dL,0x902845baL, +/* 85*/ 0x7f96d66fL,0x24bff05cL,0x2820730bL,0x947133cbL,0xd444828aL, +/* 90*/ 0xb343f6f1L,0x0bef4705L,0x8da574f9L,0x01e25d6cL,0x1732793eL, +/* 95*/ 0x4f0f7b27L,0x364b7117L,0xb2d1da77L,0xa6c5f1e9L,0x574ca5b1L, +/* 100*/ 0x386a3076L,0xad6894d6L,0x1156d7faL,0xa48d1d9aL,0x4794c0afL, +/* 105*/ 0x150c0aa0L,0x26d348acL,0x29fdeabeL,0xa5dede53L,0x81671e8eL, +/* 110*/ 0x594ee3bfL,0xa96c56e6L,0x3426a726L,0xc5976579L,0xbc22e5e4L, +/* 115*/ 0xc1006319L,0xdaafdd2aL,0xa1a1aa83L,0x3badd0e7L,0xc3b14981L, +/* 120*/ 0xd770b155L,0xccd7c693L,0x42e944c5L,0x03e0064fL,0xca95b4efL, +/* 125*/ 0x3dee81c3L,0xfbbcd98cL,0x1e07e15bL,0x667ce949L,0xe7d6773fL, +/* 130*/ 0x21b6124bL,0x6b2a6ef7L,0xd3278a9cL,0x9a988304L,0x75d2ae9bL, +/* 135*/ 0xfe49e2ffL,0x9bc24f46L,0x74cc2cf6L,0xa3139f36L,0x6c9ef35aL, +/* 140*/ 0x9fc1dffeL,0x9e5facdcL,0xaadc8bbbL,0x5abdbc5fL,0x44b3b390L, +/* 145*/ 0xf754efa7L,0x5fe3bdb7L,0x4e59c886L,0x06a4c984L,0xa0338878L, +/* 150*/ 0xcd513cd7L,0x63ebd27eL,0x8aba80adL,0x50da144eL,0x5d9f4e97L, +/* 155*/ 0x025b751cL,0x2d580200L,0xb6c05837L,0x580aa15dL,0x54022a6eL, +/* 160*/ 0xb41a5415L,0x4863fab6L,0xb0b79957L,0x46d0d159L,0xdc2b8650L, +/* 165*/ 0x20a7bb0cL,0x4a032974L,0xec8636a2L,0x8548f24cL,0xf6a2bf16L, +/* 170*/ 0x1088f4b0L,0x0c2f3a94L,0x525dc396L,0x14065785L,0x2b4dca52L, +/* 175*/ 0x08aeed39L,0xabedfc99L,0xb1dbcf18L,0x87f85bbcL,0xae3aff61L, +/* 180*/ 0x433ccd70L,0x5b23cc64L,0x7b453213L,0x5355c545L,0x9318ec0aL, +/* 185*/ 0x78692d31L,0x0a21693dL,0xd5666814L,0x05fb59d9L,0xc71985b2L, +/* 190*/ 0x2abb8e0eL,0xcf6e6c91L,0xd9cfe7c6L,0xefe7132cL,0x9711ab28L, +/* 195*/ 0x3ce52732L,0x12d516d2L,0x7209a0d0L,0xd278d306L,0x70fa4b7bL, +/* 200*/ 0x1d407dd3L,0xdb0beba4L,0xbfd97621L,0xa8be21e1L,0x1b6f1b66L, +/* 205*/ 0x30650ddaL,0xba7ddbb9L,0x7df953fbL,0x9d1c3902L,0xedf0e8d5L, +/* 210*/ 0xb8741ae0L,0x0f240565L,0x62cd438bL,0xc616a924L,0xaf7a96a3L, +/* 215*/ 0x35365538L,0xe583af4dL,0x73415eb8L,0x23176a47L,0xfc9ccee8L, +/* 220*/ 0x7efc9de2L,0x695e03cfL,0xf8ce66d4L,0x88b4781dL,0x67dd9c03L, +/* 225*/ 0x3e8f9e73L,0xc0c95c51L,0xbe314d22L,0x55aa0795L,0xcb1bb011L, +/* 230*/ 0xe980fdc8L,0x9c62b7ceL,0xde2d239eL,0x042cadf3L,0xffdf04deL, +/* 235*/ 0x5ce6a60fL,0xd8c831edL,0xb7b5b9ecL,0xb9cbf962L,0xe253b254L, +/* 240*/ 0x0735ba1fL,0x16ac917fL,0xdd607c2bL,0x64a335c4L,0x40159a7cL, +/* 245*/ 0x869222f0L,0x6ef21769L,0x839d20a5L,0xd03b24c9L,0xf412601eL, +/* 250*/ 0x6d72a243L,0x0e018dfdL,0x89f3721aL,0xc94f4134L,0x2f992f20L, +/* 255*/ 0x4d87253cL + /* End of S Box 15 */ } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h new file mode 100644 index 000000000..e42426f37 --- /dev/null +++ b/ext/hash/php_hash_tiger.h @@ -0,0 +1,49 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_tiger.h,v 1.3.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_TIGER_H +#define PHP_HASH_TIGER_H + +/* TIGER context */ +typedef struct { + php_hash_uint64 state[3]; + php_hash_uint64 passed; + unsigned char passes:1; + unsigned char length:7; + unsigned char buffer[64]; +} PHP_TIGER_CTX; + +PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context); +PHP_HASH_API void PHP_4TIGERInit(PHP_TIGER_CTX *context); +PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *input, size_t len); +PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context); +PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context); +PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_tiger_tables.h b/ext/hash/php_hash_tiger_tables.h new file mode 100644 index 000000000..d61552a3f --- /dev/null +++ b/ext/hash/php_hash_tiger_tables.h @@ -0,0 +1,549 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Michael Wallner | + | Sara Golemon | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_tiger_tables.h,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#define t1 (table) +#define t2 (table+256) +#define t3 (table+256*2) +#define t4 (table+256*3) + +static const php_hash_uint64 table[4*256] = { + L64(0x02AAB17CF7E90C5E) /* 0 */, L64(0xAC424B03E243A8EC) /* 1 */, + L64(0x72CD5BE30DD5FCD3) /* 2 */, L64(0x6D019B93F6F97F3A) /* 3 */, + L64(0xCD9978FFD21F9193) /* 4 */, L64(0x7573A1C9708029E2) /* 5 */, + L64(0xB164326B922A83C3) /* 6 */, L64(0x46883EEE04915870) /* 7 */, + L64(0xEAACE3057103ECE6) /* 8 */, L64(0xC54169B808A3535C) /* 9 */, + L64(0x4CE754918DDEC47C) /* 10 */, L64(0x0AA2F4DFDC0DF40C) /* 11 */, + L64(0x10B76F18A74DBEFA) /* 12 */, L64(0xC6CCB6235AD1AB6A) /* 13 */, + L64(0x13726121572FE2FF) /* 14 */, L64(0x1A488C6F199D921E) /* 15 */, + L64(0x4BC9F9F4DA0007CA) /* 16 */, L64(0x26F5E6F6E85241C7) /* 17 */, + L64(0x859079DBEA5947B6) /* 18 */, L64(0x4F1885C5C99E8C92) /* 19 */, + L64(0xD78E761EA96F864B) /* 20 */, L64(0x8E36428C52B5C17D) /* 21 */, + L64(0x69CF6827373063C1) /* 22 */, L64(0xB607C93D9BB4C56E) /* 23 */, + L64(0x7D820E760E76B5EA) /* 24 */, L64(0x645C9CC6F07FDC42) /* 25 */, + L64(0xBF38A078243342E0) /* 26 */, L64(0x5F6B343C9D2E7D04) /* 27 */, + L64(0xF2C28AEB600B0EC6) /* 28 */, L64(0x6C0ED85F7254BCAC) /* 29 */, + L64(0x71592281A4DB4FE5) /* 30 */, L64(0x1967FA69CE0FED9F) /* 31 */, + L64(0xFD5293F8B96545DB) /* 32 */, L64(0xC879E9D7F2A7600B) /* 33 */, + L64(0x860248920193194E) /* 34 */, L64(0xA4F9533B2D9CC0B3) /* 35 */, + L64(0x9053836C15957613) /* 36 */, L64(0xDB6DCF8AFC357BF1) /* 37 */, + L64(0x18BEEA7A7A370F57) /* 38 */, L64(0x037117CA50B99066) /* 39 */, + L64(0x6AB30A9774424A35) /* 40 */, L64(0xF4E92F02E325249B) /* 41 */, + L64(0x7739DB07061CCAE1) /* 42 */, L64(0xD8F3B49CECA42A05) /* 43 */, + L64(0xBD56BE3F51382F73) /* 44 */, L64(0x45FAED5843B0BB28) /* 45 */, + L64(0x1C813D5C11BF1F83) /* 46 */, L64(0x8AF0E4B6D75FA169) /* 47 */, + L64(0x33EE18A487AD9999) /* 48 */, L64(0x3C26E8EAB1C94410) /* 49 */, + L64(0xB510102BC0A822F9) /* 50 */, L64(0x141EEF310CE6123B) /* 51 */, + L64(0xFC65B90059DDB154) /* 52 */, L64(0xE0158640C5E0E607) /* 53 */, + L64(0x884E079826C3A3CF) /* 54 */, L64(0x930D0D9523C535FD) /* 55 */, + L64(0x35638D754E9A2B00) /* 56 */, L64(0x4085FCCF40469DD5) /* 57 */, + L64(0xC4B17AD28BE23A4C) /* 58 */, L64(0xCAB2F0FC6A3E6A2E) /* 59 */, + L64(0x2860971A6B943FCD) /* 60 */, L64(0x3DDE6EE212E30446) /* 61 */, + L64(0x6222F32AE01765AE) /* 62 */, L64(0x5D550BB5478308FE) /* 63 */, + L64(0xA9EFA98DA0EDA22A) /* 64 */, L64(0xC351A71686C40DA7) /* 65 */, + L64(0x1105586D9C867C84) /* 66 */, L64(0xDCFFEE85FDA22853) /* 67 */, + L64(0xCCFBD0262C5EEF76) /* 68 */, L64(0xBAF294CB8990D201) /* 69 */, + L64(0xE69464F52AFAD975) /* 70 */, L64(0x94B013AFDF133E14) /* 71 */, + L64(0x06A7D1A32823C958) /* 72 */, L64(0x6F95FE5130F61119) /* 73 */, + L64(0xD92AB34E462C06C0) /* 74 */, L64(0xED7BDE33887C71D2) /* 75 */, + L64(0x79746D6E6518393E) /* 76 */, L64(0x5BA419385D713329) /* 77 */, + L64(0x7C1BA6B948A97564) /* 78 */, L64(0x31987C197BFDAC67) /* 79 */, + L64(0xDE6C23C44B053D02) /* 80 */, L64(0x581C49FED002D64D) /* 81 */, + L64(0xDD474D6338261571) /* 82 */, L64(0xAA4546C3E473D062) /* 83 */, + L64(0x928FCE349455F860) /* 84 */, L64(0x48161BBACAAB94D9) /* 85 */, + L64(0x63912430770E6F68) /* 86 */, L64(0x6EC8A5E602C6641C) /* 87 */, + L64(0x87282515337DDD2B) /* 88 */, L64(0x2CDA6B42034B701B) /* 89 */, + L64(0xB03D37C181CB096D) /* 90 */, L64(0xE108438266C71C6F) /* 91 */, + L64(0x2B3180C7EB51B255) /* 92 */, L64(0xDF92B82F96C08BBC) /* 93 */, + L64(0x5C68C8C0A632F3BA) /* 94 */, L64(0x5504CC861C3D0556) /* 95 */, + L64(0xABBFA4E55FB26B8F) /* 96 */, L64(0x41848B0AB3BACEB4) /* 97 */, + L64(0xB334A273AA445D32) /* 98 */, L64(0xBCA696F0A85AD881) /* 99 */, + L64(0x24F6EC65B528D56C) /* 100 */, L64(0x0CE1512E90F4524A) /* 101 */, + L64(0x4E9DD79D5506D35A) /* 102 */, L64(0x258905FAC6CE9779) /* 103 */, + L64(0x2019295B3E109B33) /* 104 */, L64(0xF8A9478B73A054CC) /* 105 */, + L64(0x2924F2F934417EB0) /* 106 */, L64(0x3993357D536D1BC4) /* 107 */, + L64(0x38A81AC21DB6FF8B) /* 108 */, L64(0x47C4FBF17D6016BF) /* 109 */, + L64(0x1E0FAADD7667E3F5) /* 110 */, L64(0x7ABCFF62938BEB96) /* 111 */, + L64(0xA78DAD948FC179C9) /* 112 */, L64(0x8F1F98B72911E50D) /* 113 */, + L64(0x61E48EAE27121A91) /* 114 */, L64(0x4D62F7AD31859808) /* 115 */, + L64(0xECEBA345EF5CEAEB) /* 116 */, L64(0xF5CEB25EBC9684CE) /* 117 */, + L64(0xF633E20CB7F76221) /* 118 */, L64(0xA32CDF06AB8293E4) /* 119 */, + L64(0x985A202CA5EE2CA4) /* 120 */, L64(0xCF0B8447CC8A8FB1) /* 121 */, + L64(0x9F765244979859A3) /* 122 */, L64(0xA8D516B1A1240017) /* 123 */, + L64(0x0BD7BA3EBB5DC726) /* 124 */, L64(0xE54BCA55B86ADB39) /* 125 */, + L64(0x1D7A3AFD6C478063) /* 126 */, L64(0x519EC608E7669EDD) /* 127 */, + L64(0x0E5715A2D149AA23) /* 128 */, L64(0x177D4571848FF194) /* 129 */, + L64(0xEEB55F3241014C22) /* 130 */, L64(0x0F5E5CA13A6E2EC2) /* 131 */, + L64(0x8029927B75F5C361) /* 132 */, L64(0xAD139FABC3D6E436) /* 133 */, + L64(0x0D5DF1A94CCF402F) /* 134 */, L64(0x3E8BD948BEA5DFC8) /* 135 */, + L64(0xA5A0D357BD3FF77E) /* 136 */, L64(0xA2D12E251F74F645) /* 137 */, + L64(0x66FD9E525E81A082) /* 138 */, L64(0x2E0C90CE7F687A49) /* 139 */, + L64(0xC2E8BCBEBA973BC5) /* 140 */, L64(0x000001BCE509745F) /* 141 */, + L64(0x423777BBE6DAB3D6) /* 142 */, L64(0xD1661C7EAEF06EB5) /* 143 */, + L64(0xA1781F354DAACFD8) /* 144 */, L64(0x2D11284A2B16AFFC) /* 145 */, + L64(0xF1FC4F67FA891D1F) /* 146 */, L64(0x73ECC25DCB920ADA) /* 147 */, + L64(0xAE610C22C2A12651) /* 148 */, L64(0x96E0A810D356B78A) /* 149 */, + L64(0x5A9A381F2FE7870F) /* 150 */, L64(0xD5AD62EDE94E5530) /* 151 */, + L64(0xD225E5E8368D1427) /* 152 */, L64(0x65977B70C7AF4631) /* 153 */, + L64(0x99F889B2DE39D74F) /* 154 */, L64(0x233F30BF54E1D143) /* 155 */, + L64(0x9A9675D3D9A63C97) /* 156 */, L64(0x5470554FF334F9A8) /* 157 */, + L64(0x166ACB744A4F5688) /* 158 */, L64(0x70C74CAAB2E4AEAD) /* 159 */, + L64(0xF0D091646F294D12) /* 160 */, L64(0x57B82A89684031D1) /* 161 */, + L64(0xEFD95A5A61BE0B6B) /* 162 */, L64(0x2FBD12E969F2F29A) /* 163 */, + L64(0x9BD37013FEFF9FE8) /* 164 */, L64(0x3F9B0404D6085A06) /* 165 */, + L64(0x4940C1F3166CFE15) /* 166 */, L64(0x09542C4DCDF3DEFB) /* 167 */, + L64(0xB4C5218385CD5CE3) /* 168 */, L64(0xC935B7DC4462A641) /* 169 */, + L64(0x3417F8A68ED3B63F) /* 170 */, L64(0xB80959295B215B40) /* 171 */, + L64(0xF99CDAEF3B8C8572) /* 172 */, L64(0x018C0614F8FCB95D) /* 173 */, + L64(0x1B14ACCD1A3ACDF3) /* 174 */, L64(0x84D471F200BB732D) /* 175 */, + L64(0xC1A3110E95E8DA16) /* 176 */, L64(0x430A7220BF1A82B8) /* 177 */, + L64(0xB77E090D39DF210E) /* 178 */, L64(0x5EF4BD9F3CD05E9D) /* 179 */, + L64(0x9D4FF6DA7E57A444) /* 180 */, L64(0xDA1D60E183D4A5F8) /* 181 */, + L64(0xB287C38417998E47) /* 182 */, L64(0xFE3EDC121BB31886) /* 183 */, + L64(0xC7FE3CCC980CCBEF) /* 184 */, L64(0xE46FB590189BFD03) /* 185 */, + L64(0x3732FD469A4C57DC) /* 186 */, L64(0x7EF700A07CF1AD65) /* 187 */, + L64(0x59C64468A31D8859) /* 188 */, L64(0x762FB0B4D45B61F6) /* 189 */, + L64(0x155BAED099047718) /* 190 */, L64(0x68755E4C3D50BAA6) /* 191 */, + L64(0xE9214E7F22D8B4DF) /* 192 */, L64(0x2ADDBF532EAC95F4) /* 193 */, + L64(0x32AE3909B4BD0109) /* 194 */, L64(0x834DF537B08E3450) /* 195 */, + L64(0xFA209DA84220728D) /* 196 */, L64(0x9E691D9B9EFE23F7) /* 197 */, + L64(0x0446D288C4AE8D7F) /* 198 */, L64(0x7B4CC524E169785B) /* 199 */, + L64(0x21D87F0135CA1385) /* 200 */, L64(0xCEBB400F137B8AA5) /* 201 */, + L64(0x272E2B66580796BE) /* 202 */, L64(0x3612264125C2B0DE) /* 203 */, + L64(0x057702BDAD1EFBB2) /* 204 */, L64(0xD4BABB8EACF84BE9) /* 205 */, + L64(0x91583139641BC67B) /* 206 */, L64(0x8BDC2DE08036E024) /* 207 */, + L64(0x603C8156F49F68ED) /* 208 */, L64(0xF7D236F7DBEF5111) /* 209 */, + L64(0x9727C4598AD21E80) /* 210 */, L64(0xA08A0896670A5FD7) /* 211 */, + L64(0xCB4A8F4309EBA9CB) /* 212 */, L64(0x81AF564B0F7036A1) /* 213 */, + L64(0xC0B99AA778199ABD) /* 214 */, L64(0x959F1EC83FC8E952) /* 215 */, + L64(0x8C505077794A81B9) /* 216 */, L64(0x3ACAAF8F056338F0) /* 217 */, + L64(0x07B43F50627A6778) /* 218 */, L64(0x4A44AB49F5ECCC77) /* 219 */, + L64(0x3BC3D6E4B679EE98) /* 220 */, L64(0x9CC0D4D1CF14108C) /* 221 */, + L64(0x4406C00B206BC8A0) /* 222 */, L64(0x82A18854C8D72D89) /* 223 */, + L64(0x67E366B35C3C432C) /* 224 */, L64(0xB923DD61102B37F2) /* 225 */, + L64(0x56AB2779D884271D) /* 226 */, L64(0xBE83E1B0FF1525AF) /* 227 */, + L64(0xFB7C65D4217E49A9) /* 228 */, L64(0x6BDBE0E76D48E7D4) /* 229 */, + L64(0x08DF828745D9179E) /* 230 */, L64(0x22EA6A9ADD53BD34) /* 231 */, + L64(0xE36E141C5622200A) /* 232 */, L64(0x7F805D1B8CB750EE) /* 233 */, + L64(0xAFE5C7A59F58E837) /* 234 */, L64(0xE27F996A4FB1C23C) /* 235 */, + L64(0xD3867DFB0775F0D0) /* 236 */, L64(0xD0E673DE6E88891A) /* 237 */, + L64(0x123AEB9EAFB86C25) /* 238 */, L64(0x30F1D5D5C145B895) /* 239 */, + L64(0xBB434A2DEE7269E7) /* 240 */, L64(0x78CB67ECF931FA38) /* 241 */, + L64(0xF33B0372323BBF9C) /* 242 */, L64(0x52D66336FB279C74) /* 243 */, + L64(0x505F33AC0AFB4EAA) /* 244 */, L64(0xE8A5CD99A2CCE187) /* 245 */, + L64(0x534974801E2D30BB) /* 246 */, L64(0x8D2D5711D5876D90) /* 247 */, + L64(0x1F1A412891BC038E) /* 248 */, L64(0xD6E2E71D82E56648) /* 249 */, + L64(0x74036C3A497732B7) /* 250 */, L64(0x89B67ED96361F5AB) /* 251 */, + L64(0xFFED95D8F1EA02A2) /* 252 */, L64(0xE72B3BD61464D43D) /* 253 */, + L64(0xA6300F170BDC4820) /* 254 */, L64(0xEBC18760ED78A77A) /* 255 */, + L64(0xE6A6BE5A05A12138) /* 256 */, L64(0xB5A122A5B4F87C98) /* 257 */, + L64(0x563C6089140B6990) /* 258 */, L64(0x4C46CB2E391F5DD5) /* 259 */, + L64(0xD932ADDBC9B79434) /* 260 */, L64(0x08EA70E42015AFF5) /* 261 */, + L64(0xD765A6673E478CF1) /* 262 */, L64(0xC4FB757EAB278D99) /* 263 */, + L64(0xDF11C6862D6E0692) /* 264 */, L64(0xDDEB84F10D7F3B16) /* 265 */, + L64(0x6F2EF604A665EA04) /* 266 */, L64(0x4A8E0F0FF0E0DFB3) /* 267 */, + L64(0xA5EDEEF83DBCBA51) /* 268 */, L64(0xFC4F0A2A0EA4371E) /* 269 */, + L64(0xE83E1DA85CB38429) /* 270 */, L64(0xDC8FF882BA1B1CE2) /* 271 */, + L64(0xCD45505E8353E80D) /* 272 */, L64(0x18D19A00D4DB0717) /* 273 */, + L64(0x34A0CFEDA5F38101) /* 274 */, L64(0x0BE77E518887CAF2) /* 275 */, + L64(0x1E341438B3C45136) /* 276 */, L64(0xE05797F49089CCF9) /* 277 */, + L64(0xFFD23F9DF2591D14) /* 278 */, L64(0x543DDA228595C5CD) /* 279 */, + L64(0x661F81FD99052A33) /* 280 */, L64(0x8736E641DB0F7B76) /* 281 */, + L64(0x15227725418E5307) /* 282 */, L64(0xE25F7F46162EB2FA) /* 283 */, + L64(0x48A8B2126C13D9FE) /* 284 */, L64(0xAFDC541792E76EEA) /* 285 */, + L64(0x03D912BFC6D1898F) /* 286 */, L64(0x31B1AAFA1B83F51B) /* 287 */, + L64(0xF1AC2796E42AB7D9) /* 288 */, L64(0x40A3A7D7FCD2EBAC) /* 289 */, + L64(0x1056136D0AFBBCC5) /* 290 */, L64(0x7889E1DD9A6D0C85) /* 291 */, + L64(0xD33525782A7974AA) /* 292 */, L64(0xA7E25D09078AC09B) /* 293 */, + L64(0xBD4138B3EAC6EDD0) /* 294 */, L64(0x920ABFBE71EB9E70) /* 295 */, + L64(0xA2A5D0F54FC2625C) /* 296 */, L64(0xC054E36B0B1290A3) /* 297 */, + L64(0xF6DD59FF62FE932B) /* 298 */, L64(0x3537354511A8AC7D) /* 299 */, + L64(0xCA845E9172FADCD4) /* 300 */, L64(0x84F82B60329D20DC) /* 301 */, + L64(0x79C62CE1CD672F18) /* 302 */, L64(0x8B09A2ADD124642C) /* 303 */, + L64(0xD0C1E96A19D9E726) /* 304 */, L64(0x5A786A9B4BA9500C) /* 305 */, + L64(0x0E020336634C43F3) /* 306 */, L64(0xC17B474AEB66D822) /* 307 */, + L64(0x6A731AE3EC9BAAC2) /* 308 */, L64(0x8226667AE0840258) /* 309 */, + L64(0x67D4567691CAECA5) /* 310 */, L64(0x1D94155C4875ADB5) /* 311 */, + L64(0x6D00FD985B813FDF) /* 312 */, L64(0x51286EFCB774CD06) /* 313 */, + L64(0x5E8834471FA744AF) /* 314 */, L64(0xF72CA0AEE761AE2E) /* 315 */, + L64(0xBE40E4CDAEE8E09A) /* 316 */, L64(0xE9970BBB5118F665) /* 317 */, + L64(0x726E4BEB33DF1964) /* 318 */, L64(0x703B000729199762) /* 319 */, + L64(0x4631D816F5EF30A7) /* 320 */, L64(0xB880B5B51504A6BE) /* 321 */, + L64(0x641793C37ED84B6C) /* 322 */, L64(0x7B21ED77F6E97D96) /* 323 */, + L64(0x776306312EF96B73) /* 324 */, L64(0xAE528948E86FF3F4) /* 325 */, + L64(0x53DBD7F286A3F8F8) /* 326 */, L64(0x16CADCE74CFC1063) /* 327 */, + L64(0x005C19BDFA52C6DD) /* 328 */, L64(0x68868F5D64D46AD3) /* 329 */, + L64(0x3A9D512CCF1E186A) /* 330 */, L64(0x367E62C2385660AE) /* 331 */, + L64(0xE359E7EA77DCB1D7) /* 332 */, L64(0x526C0773749ABE6E) /* 333 */, + L64(0x735AE5F9D09F734B) /* 334 */, L64(0x493FC7CC8A558BA8) /* 335 */, + L64(0xB0B9C1533041AB45) /* 336 */, L64(0x321958BA470A59BD) /* 337 */, + L64(0x852DB00B5F46C393) /* 338 */, L64(0x91209B2BD336B0E5) /* 339 */, + L64(0x6E604F7D659EF19F) /* 340 */, L64(0xB99A8AE2782CCB24) /* 341 */, + L64(0xCCF52AB6C814C4C7) /* 342 */, L64(0x4727D9AFBE11727B) /* 343 */, + L64(0x7E950D0C0121B34D) /* 344 */, L64(0x756F435670AD471F) /* 345 */, + L64(0xF5ADD442615A6849) /* 346 */, L64(0x4E87E09980B9957A) /* 347 */, + L64(0x2ACFA1DF50AEE355) /* 348 */, L64(0xD898263AFD2FD556) /* 349 */, + L64(0xC8F4924DD80C8FD6) /* 350 */, L64(0xCF99CA3D754A173A) /* 351 */, + L64(0xFE477BACAF91BF3C) /* 352 */, L64(0xED5371F6D690C12D) /* 353 */, + L64(0x831A5C285E687094) /* 354 */, L64(0xC5D3C90A3708A0A4) /* 355 */, + L64(0x0F7F903717D06580) /* 356 */, L64(0x19F9BB13B8FDF27F) /* 357 */, + L64(0xB1BD6F1B4D502843) /* 358 */, L64(0x1C761BA38FFF4012) /* 359 */, + L64(0x0D1530C4E2E21F3B) /* 360 */, L64(0x8943CE69A7372C8A) /* 361 */, + L64(0xE5184E11FEB5CE66) /* 362 */, L64(0x618BDB80BD736621) /* 363 */, + L64(0x7D29BAD68B574D0B) /* 364 */, L64(0x81BB613E25E6FE5B) /* 365 */, + L64(0x071C9C10BC07913F) /* 366 */, L64(0xC7BEEB7909AC2D97) /* 367 */, + L64(0xC3E58D353BC5D757) /* 368 */, L64(0xEB017892F38F61E8) /* 369 */, + L64(0xD4EFFB9C9B1CC21A) /* 370 */, L64(0x99727D26F494F7AB) /* 371 */, + L64(0xA3E063A2956B3E03) /* 372 */, L64(0x9D4A8B9A4AA09C30) /* 373 */, + L64(0x3F6AB7D500090FB4) /* 374 */, L64(0x9CC0F2A057268AC0) /* 375 */, + L64(0x3DEE9D2DEDBF42D1) /* 376 */, L64(0x330F49C87960A972) /* 377 */, + L64(0xC6B2720287421B41) /* 378 */, L64(0x0AC59EC07C00369C) /* 379 */, + L64(0xEF4EAC49CB353425) /* 380 */, L64(0xF450244EEF0129D8) /* 381 */, + L64(0x8ACC46E5CAF4DEB6) /* 382 */, L64(0x2FFEAB63989263F7) /* 383 */, + L64(0x8F7CB9FE5D7A4578) /* 384 */, L64(0x5BD8F7644E634635) /* 385 */, + L64(0x427A7315BF2DC900) /* 386 */, L64(0x17D0C4AA2125261C) /* 387 */, + L64(0x3992486C93518E50) /* 388 */, L64(0xB4CBFEE0A2D7D4C3) /* 389 */, + L64(0x7C75D6202C5DDD8D) /* 390 */, L64(0xDBC295D8E35B6C61) /* 391 */, + L64(0x60B369D302032B19) /* 392 */, L64(0xCE42685FDCE44132) /* 393 */, + L64(0x06F3DDB9DDF65610) /* 394 */, L64(0x8EA4D21DB5E148F0) /* 395 */, + L64(0x20B0FCE62FCD496F) /* 396 */, L64(0x2C1B912358B0EE31) /* 397 */, + L64(0xB28317B818F5A308) /* 398 */, L64(0xA89C1E189CA6D2CF) /* 399 */, + L64(0x0C6B18576AAADBC8) /* 400 */, L64(0xB65DEAA91299FAE3) /* 401 */, + L64(0xFB2B794B7F1027E7) /* 402 */, L64(0x04E4317F443B5BEB) /* 403 */, + L64(0x4B852D325939D0A6) /* 404 */, L64(0xD5AE6BEEFB207FFC) /* 405 */, + L64(0x309682B281C7D374) /* 406 */, L64(0xBAE309A194C3B475) /* 407 */, + L64(0x8CC3F97B13B49F05) /* 408 */, L64(0x98A9422FF8293967) /* 409 */, + L64(0x244B16B01076FF7C) /* 410 */, L64(0xF8BF571C663D67EE) /* 411 */, + L64(0x1F0D6758EEE30DA1) /* 412 */, L64(0xC9B611D97ADEB9B7) /* 413 */, + L64(0xB7AFD5887B6C57A2) /* 414 */, L64(0x6290AE846B984FE1) /* 415 */, + L64(0x94DF4CDEACC1A5FD) /* 416 */, L64(0x058A5BD1C5483AFF) /* 417 */, + L64(0x63166CC142BA3C37) /* 418 */, L64(0x8DB8526EB2F76F40) /* 419 */, + L64(0xE10880036F0D6D4E) /* 420 */, L64(0x9E0523C9971D311D) /* 421 */, + L64(0x45EC2824CC7CD691) /* 422 */, L64(0x575B8359E62382C9) /* 423 */, + L64(0xFA9E400DC4889995) /* 424 */, L64(0xD1823ECB45721568) /* 425 */, + L64(0xDAFD983B8206082F) /* 426 */, L64(0xAA7D29082386A8CB) /* 427 */, + L64(0x269FCD4403B87588) /* 428 */, L64(0x1B91F5F728BDD1E0) /* 429 */, + L64(0xE4669F39040201F6) /* 430 */, L64(0x7A1D7C218CF04ADE) /* 431 */, + L64(0x65623C29D79CE5CE) /* 432 */, L64(0x2368449096C00BB1) /* 433 */, + L64(0xAB9BF1879DA503BA) /* 434 */, L64(0xBC23ECB1A458058E) /* 435 */, + L64(0x9A58DF01BB401ECC) /* 436 */, L64(0xA070E868A85F143D) /* 437 */, + L64(0x4FF188307DF2239E) /* 438 */, L64(0x14D565B41A641183) /* 439 */, + L64(0xEE13337452701602) /* 440 */, L64(0x950E3DCF3F285E09) /* 441 */, + L64(0x59930254B9C80953) /* 442 */, L64(0x3BF299408930DA6D) /* 443 */, + L64(0xA955943F53691387) /* 444 */, L64(0xA15EDECAA9CB8784) /* 445 */, + L64(0x29142127352BE9A0) /* 446 */, L64(0x76F0371FFF4E7AFB) /* 447 */, + L64(0x0239F450274F2228) /* 448 */, L64(0xBB073AF01D5E868B) /* 449 */, + L64(0xBFC80571C10E96C1) /* 450 */, L64(0xD267088568222E23) /* 451 */, + L64(0x9671A3D48E80B5B0) /* 452 */, L64(0x55B5D38AE193BB81) /* 453 */, + L64(0x693AE2D0A18B04B8) /* 454 */, L64(0x5C48B4ECADD5335F) /* 455 */, + L64(0xFD743B194916A1CA) /* 456 */, L64(0x2577018134BE98C4) /* 457 */, + L64(0xE77987E83C54A4AD) /* 458 */, L64(0x28E11014DA33E1B9) /* 459 */, + L64(0x270CC59E226AA213) /* 460 */, L64(0x71495F756D1A5F60) /* 461 */, + L64(0x9BE853FB60AFEF77) /* 462 */, L64(0xADC786A7F7443DBF) /* 463 */, + L64(0x0904456173B29A82) /* 464 */, L64(0x58BC7A66C232BD5E) /* 465 */, + L64(0xF306558C673AC8B2) /* 466 */, L64(0x41F639C6B6C9772A) /* 467 */, + L64(0x216DEFE99FDA35DA) /* 468 */, L64(0x11640CC71C7BE615) /* 469 */, + L64(0x93C43694565C5527) /* 470 */, L64(0xEA038E6246777839) /* 471 */, + L64(0xF9ABF3CE5A3E2469) /* 472 */, L64(0x741E768D0FD312D2) /* 473 */, + L64(0x0144B883CED652C6) /* 474 */, L64(0xC20B5A5BA33F8552) /* 475 */, + L64(0x1AE69633C3435A9D) /* 476 */, L64(0x97A28CA4088CFDEC) /* 477 */, + L64(0x8824A43C1E96F420) /* 478 */, L64(0x37612FA66EEEA746) /* 479 */, + L64(0x6B4CB165F9CF0E5A) /* 480 */, L64(0x43AA1C06A0ABFB4A) /* 481 */, + L64(0x7F4DC26FF162796B) /* 482 */, L64(0x6CBACC8E54ED9B0F) /* 483 */, + L64(0xA6B7FFEFD2BB253E) /* 484 */, L64(0x2E25BC95B0A29D4F) /* 485 */, + L64(0x86D6A58BDEF1388C) /* 486 */, L64(0xDED74AC576B6F054) /* 487 */, + L64(0x8030BDBC2B45805D) /* 488 */, L64(0x3C81AF70E94D9289) /* 489 */, + L64(0x3EFF6DDA9E3100DB) /* 490 */, L64(0xB38DC39FDFCC8847) /* 491 */, + L64(0x123885528D17B87E) /* 492 */, L64(0xF2DA0ED240B1B642) /* 493 */, + L64(0x44CEFADCD54BF9A9) /* 494 */, L64(0x1312200E433C7EE6) /* 495 */, + L64(0x9FFCC84F3A78C748) /* 496 */, L64(0xF0CD1F72248576BB) /* 497 */, + L64(0xEC6974053638CFE4) /* 498 */, L64(0x2BA7B67C0CEC4E4C) /* 499 */, + L64(0xAC2F4DF3E5CE32ED) /* 500 */, L64(0xCB33D14326EA4C11) /* 501 */, + L64(0xA4E9044CC77E58BC) /* 502 */, L64(0x5F513293D934FCEF) /* 503 */, + L64(0x5DC9645506E55444) /* 504 */, L64(0x50DE418F317DE40A) /* 505 */, + L64(0x388CB31A69DDE259) /* 506 */, L64(0x2DB4A83455820A86) /* 507 */, + L64(0x9010A91E84711AE9) /* 508 */, L64(0x4DF7F0B7B1498371) /* 509 */, + L64(0xD62A2EABC0977179) /* 510 */, L64(0x22FAC097AA8D5C0E) /* 511 */, + L64(0xF49FCC2FF1DAF39B) /* 512 */, L64(0x487FD5C66FF29281) /* 513 */, + L64(0xE8A30667FCDCA83F) /* 514 */, L64(0x2C9B4BE3D2FCCE63) /* 515 */, + L64(0xDA3FF74B93FBBBC2) /* 516 */, L64(0x2FA165D2FE70BA66) /* 517 */, + L64(0xA103E279970E93D4) /* 518 */, L64(0xBECDEC77B0E45E71) /* 519 */, + L64(0xCFB41E723985E497) /* 520 */, L64(0xB70AAA025EF75017) /* 521 */, + L64(0xD42309F03840B8E0) /* 522 */, L64(0x8EFC1AD035898579) /* 523 */, + L64(0x96C6920BE2B2ABC5) /* 524 */, L64(0x66AF4163375A9172) /* 525 */, + L64(0x2174ABDCCA7127FB) /* 526 */, L64(0xB33CCEA64A72FF41) /* 527 */, + L64(0xF04A4933083066A5) /* 528 */, L64(0x8D970ACDD7289AF5) /* 529 */, + L64(0x8F96E8E031C8C25E) /* 530 */, L64(0xF3FEC02276875D47) /* 531 */, + L64(0xEC7BF310056190DD) /* 532 */, L64(0xF5ADB0AEBB0F1491) /* 533 */, + L64(0x9B50F8850FD58892) /* 534 */, L64(0x4975488358B74DE8) /* 535 */, + L64(0xA3354FF691531C61) /* 536 */, L64(0x0702BBE481D2C6EE) /* 537 */, + L64(0x89FB24057DEDED98) /* 538 */, L64(0xAC3075138596E902) /* 539 */, + L64(0x1D2D3580172772ED) /* 540 */, L64(0xEB738FC28E6BC30D) /* 541 */, + L64(0x5854EF8F63044326) /* 542 */, L64(0x9E5C52325ADD3BBE) /* 543 */, + L64(0x90AA53CF325C4623) /* 544 */, L64(0xC1D24D51349DD067) /* 545 */, + L64(0x2051CFEEA69EA624) /* 546 */, L64(0x13220F0A862E7E4F) /* 547 */, + L64(0xCE39399404E04864) /* 548 */, L64(0xD9C42CA47086FCB7) /* 549 */, + L64(0x685AD2238A03E7CC) /* 550 */, L64(0x066484B2AB2FF1DB) /* 551 */, + L64(0xFE9D5D70EFBF79EC) /* 552 */, L64(0x5B13B9DD9C481854) /* 553 */, + L64(0x15F0D475ED1509AD) /* 554 */, L64(0x0BEBCD060EC79851) /* 555 */, + L64(0xD58C6791183AB7F8) /* 556 */, L64(0xD1187C5052F3EEE4) /* 557 */, + L64(0xC95D1192E54E82FF) /* 558 */, L64(0x86EEA14CB9AC6CA2) /* 559 */, + L64(0x3485BEB153677D5D) /* 560 */, L64(0xDD191D781F8C492A) /* 561 */, + L64(0xF60866BAA784EBF9) /* 562 */, L64(0x518F643BA2D08C74) /* 563 */, + L64(0x8852E956E1087C22) /* 564 */, L64(0xA768CB8DC410AE8D) /* 565 */, + L64(0x38047726BFEC8E1A) /* 566 */, L64(0xA67738B4CD3B45AA) /* 567 */, + L64(0xAD16691CEC0DDE19) /* 568 */, L64(0xC6D4319380462E07) /* 569 */, + L64(0xC5A5876D0BA61938) /* 570 */, L64(0x16B9FA1FA58FD840) /* 571 */, + L64(0x188AB1173CA74F18) /* 572 */, L64(0xABDA2F98C99C021F) /* 573 */, + L64(0x3E0580AB134AE816) /* 574 */, L64(0x5F3B05B773645ABB) /* 575 */, + L64(0x2501A2BE5575F2F6) /* 576 */, L64(0x1B2F74004E7E8BA9) /* 577 */, + L64(0x1CD7580371E8D953) /* 578 */, L64(0x7F6ED89562764E30) /* 579 */, + L64(0xB15926FF596F003D) /* 580 */, L64(0x9F65293DA8C5D6B9) /* 581 */, + L64(0x6ECEF04DD690F84C) /* 582 */, L64(0x4782275FFF33AF88) /* 583 */, + L64(0xE41433083F820801) /* 584 */, L64(0xFD0DFE409A1AF9B5) /* 585 */, + L64(0x4325A3342CDB396B) /* 586 */, L64(0x8AE77E62B301B252) /* 587 */, + L64(0xC36F9E9F6655615A) /* 588 */, L64(0x85455A2D92D32C09) /* 589 */, + L64(0xF2C7DEA949477485) /* 590 */, L64(0x63CFB4C133A39EBA) /* 591 */, + L64(0x83B040CC6EBC5462) /* 592 */, L64(0x3B9454C8FDB326B0) /* 593 */, + L64(0x56F56A9E87FFD78C) /* 594 */, L64(0x2DC2940D99F42BC6) /* 595 */, + L64(0x98F7DF096B096E2D) /* 596 */, L64(0x19A6E01E3AD852BF) /* 597 */, + L64(0x42A99CCBDBD4B40B) /* 598 */, L64(0xA59998AF45E9C559) /* 599 */, + L64(0x366295E807D93186) /* 600 */, L64(0x6B48181BFAA1F773) /* 601 */, + L64(0x1FEC57E2157A0A1D) /* 602 */, L64(0x4667446AF6201AD5) /* 603 */, + L64(0xE615EBCACFB0F075) /* 604 */, L64(0xB8F31F4F68290778) /* 605 */, + L64(0x22713ED6CE22D11E) /* 606 */, L64(0x3057C1A72EC3C93B) /* 607 */, + L64(0xCB46ACC37C3F1F2F) /* 608 */, L64(0xDBB893FD02AAF50E) /* 609 */, + L64(0x331FD92E600B9FCF) /* 610 */, L64(0xA498F96148EA3AD6) /* 611 */, + L64(0xA8D8426E8B6A83EA) /* 612 */, L64(0xA089B274B7735CDC) /* 613 */, + L64(0x87F6B3731E524A11) /* 614 */, L64(0x118808E5CBC96749) /* 615 */, + L64(0x9906E4C7B19BD394) /* 616 */, L64(0xAFED7F7E9B24A20C) /* 617 */, + L64(0x6509EADEEB3644A7) /* 618 */, L64(0x6C1EF1D3E8EF0EDE) /* 619 */, + L64(0xB9C97D43E9798FB4) /* 620 */, L64(0xA2F2D784740C28A3) /* 621 */, + L64(0x7B8496476197566F) /* 622 */, L64(0x7A5BE3E6B65F069D) /* 623 */, + L64(0xF96330ED78BE6F10) /* 624 */, L64(0xEEE60DE77A076A15) /* 625 */, + L64(0x2B4BEE4AA08B9BD0) /* 626 */, L64(0x6A56A63EC7B8894E) /* 627 */, + L64(0x02121359BA34FEF4) /* 628 */, L64(0x4CBF99F8283703FC) /* 629 */, + L64(0x398071350CAF30C8) /* 630 */, L64(0xD0A77A89F017687A) /* 631 */, + L64(0xF1C1A9EB9E423569) /* 632 */, L64(0x8C7976282DEE8199) /* 633 */, + L64(0x5D1737A5DD1F7ABD) /* 634 */, L64(0x4F53433C09A9FA80) /* 635 */, + L64(0xFA8B0C53DF7CA1D9) /* 636 */, L64(0x3FD9DCBC886CCB77) /* 637 */, + L64(0xC040917CA91B4720) /* 638 */, L64(0x7DD00142F9D1DCDF) /* 639 */, + L64(0x8476FC1D4F387B58) /* 640 */, L64(0x23F8E7C5F3316503) /* 641 */, + L64(0x032A2244E7E37339) /* 642 */, L64(0x5C87A5D750F5A74B) /* 643 */, + L64(0x082B4CC43698992E) /* 644 */, L64(0xDF917BECB858F63C) /* 645 */, + L64(0x3270B8FC5BF86DDA) /* 646 */, L64(0x10AE72BB29B5DD76) /* 647 */, + L64(0x576AC94E7700362B) /* 648 */, L64(0x1AD112DAC61EFB8F) /* 649 */, + L64(0x691BC30EC5FAA427) /* 650 */, L64(0xFF246311CC327143) /* 651 */, + L64(0x3142368E30E53206) /* 652 */, L64(0x71380E31E02CA396) /* 653 */, + L64(0x958D5C960AAD76F1) /* 654 */, L64(0xF8D6F430C16DA536) /* 655 */, + L64(0xC8FFD13F1BE7E1D2) /* 656 */, L64(0x7578AE66004DDBE1) /* 657 */, + L64(0x05833F01067BE646) /* 658 */, L64(0xBB34B5AD3BFE586D) /* 659 */, + L64(0x095F34C9A12B97F0) /* 660 */, L64(0x247AB64525D60CA8) /* 661 */, + L64(0xDCDBC6F3017477D1) /* 662 */, L64(0x4A2E14D4DECAD24D) /* 663 */, + L64(0xBDB5E6D9BE0A1EEB) /* 664 */, L64(0x2A7E70F7794301AB) /* 665 */, + L64(0xDEF42D8A270540FD) /* 666 */, L64(0x01078EC0A34C22C1) /* 667 */, + L64(0xE5DE511AF4C16387) /* 668 */, L64(0x7EBB3A52BD9A330A) /* 669 */, + L64(0x77697857AA7D6435) /* 670 */, L64(0x004E831603AE4C32) /* 671 */, + L64(0xE7A21020AD78E312) /* 672 */, L64(0x9D41A70C6AB420F2) /* 673 */, + L64(0x28E06C18EA1141E6) /* 674 */, L64(0xD2B28CBD984F6B28) /* 675 */, + L64(0x26B75F6C446E9D83) /* 676 */, L64(0xBA47568C4D418D7F) /* 677 */, + L64(0xD80BADBFE6183D8E) /* 678 */, L64(0x0E206D7F5F166044) /* 679 */, + L64(0xE258A43911CBCA3E) /* 680 */, L64(0x723A1746B21DC0BC) /* 681 */, + L64(0xC7CAA854F5D7CDD3) /* 682 */, L64(0x7CAC32883D261D9C) /* 683 */, + L64(0x7690C26423BA942C) /* 684 */, L64(0x17E55524478042B8) /* 685 */, + L64(0xE0BE477656A2389F) /* 686 */, L64(0x4D289B5E67AB2DA0) /* 687 */, + L64(0x44862B9C8FBBFD31) /* 688 */, L64(0xB47CC8049D141365) /* 689 */, + L64(0x822C1B362B91C793) /* 690 */, L64(0x4EB14655FB13DFD8) /* 691 */, + L64(0x1ECBBA0714E2A97B) /* 692 */, L64(0x6143459D5CDE5F14) /* 693 */, + L64(0x53A8FBF1D5F0AC89) /* 694 */, L64(0x97EA04D81C5E5B00) /* 695 */, + L64(0x622181A8D4FDB3F3) /* 696 */, L64(0xE9BCD341572A1208) /* 697 */, + L64(0x1411258643CCE58A) /* 698 */, L64(0x9144C5FEA4C6E0A4) /* 699 */, + L64(0x0D33D06565CF620F) /* 700 */, L64(0x54A48D489F219CA1) /* 701 */, + L64(0xC43E5EAC6D63C821) /* 702 */, L64(0xA9728B3A72770DAF) /* 703 */, + L64(0xD7934E7B20DF87EF) /* 704 */, L64(0xE35503B61A3E86E5) /* 705 */, + L64(0xCAE321FBC819D504) /* 706 */, L64(0x129A50B3AC60BFA6) /* 707 */, + L64(0xCD5E68EA7E9FB6C3) /* 708 */, L64(0xB01C90199483B1C7) /* 709 */, + L64(0x3DE93CD5C295376C) /* 710 */, L64(0xAED52EDF2AB9AD13) /* 711 */, + L64(0x2E60F512C0A07884) /* 712 */, L64(0xBC3D86A3E36210C9) /* 713 */, + L64(0x35269D9B163951CE) /* 714 */, L64(0x0C7D6E2AD0CDB5FA) /* 715 */, + L64(0x59E86297D87F5733) /* 716 */, L64(0x298EF221898DB0E7) /* 717 */, + L64(0x55000029D1A5AA7E) /* 718 */, L64(0x8BC08AE1B5061B45) /* 719 */, + L64(0xC2C31C2B6C92703A) /* 720 */, L64(0x94CC596BAF25EF42) /* 721 */, + L64(0x0A1D73DB22540456) /* 722 */, L64(0x04B6A0F9D9C4179A) /* 723 */, + L64(0xEFFDAFA2AE3D3C60) /* 724 */, L64(0xF7C8075BB49496C4) /* 725 */, + L64(0x9CC5C7141D1CD4E3) /* 726 */, L64(0x78BD1638218E5534) /* 727 */, + L64(0xB2F11568F850246A) /* 728 */, L64(0xEDFABCFA9502BC29) /* 729 */, + L64(0x796CE5F2DA23051B) /* 730 */, L64(0xAAE128B0DC93537C) /* 731 */, + L64(0x3A493DA0EE4B29AE) /* 732 */, L64(0xB5DF6B2C416895D7) /* 733 */, + L64(0xFCABBD25122D7F37) /* 734 */, L64(0x70810B58105DC4B1) /* 735 */, + L64(0xE10FDD37F7882A90) /* 736 */, L64(0x524DCAB5518A3F5C) /* 737 */, + L64(0x3C9E85878451255B) /* 738 */, L64(0x4029828119BD34E2) /* 739 */, + L64(0x74A05B6F5D3CECCB) /* 740 */, L64(0xB610021542E13ECA) /* 741 */, + L64(0x0FF979D12F59E2AC) /* 742 */, L64(0x6037DA27E4F9CC50) /* 743 */, + L64(0x5E92975A0DF1847D) /* 744 */, L64(0xD66DE190D3E623FE) /* 745 */, + L64(0x5032D6B87B568048) /* 746 */, L64(0x9A36B7CE8235216E) /* 747 */, + L64(0x80272A7A24F64B4A) /* 748 */, L64(0x93EFED8B8C6916F7) /* 749 */, + L64(0x37DDBFF44CCE1555) /* 750 */, L64(0x4B95DB5D4B99BD25) /* 751 */, + L64(0x92D3FDA169812FC0) /* 752 */, L64(0xFB1A4A9A90660BB6) /* 753 */, + L64(0x730C196946A4B9B2) /* 754 */, L64(0x81E289AA7F49DA68) /* 755 */, + L64(0x64669A0F83B1A05F) /* 756 */, L64(0x27B3FF7D9644F48B) /* 757 */, + L64(0xCC6B615C8DB675B3) /* 758 */, L64(0x674F20B9BCEBBE95) /* 759 */, + L64(0x6F31238275655982) /* 760 */, L64(0x5AE488713E45CF05) /* 761 */, + L64(0xBF619F9954C21157) /* 762 */, L64(0xEABAC46040A8EAE9) /* 763 */, + L64(0x454C6FE9F2C0C1CD) /* 764 */, L64(0x419CF6496412691C) /* 765 */, + L64(0xD3DC3BEF265B0F70) /* 766 */, L64(0x6D0E60F5C3578A9E) /* 767 */, + L64(0x5B0E608526323C55) /* 768 */, L64(0x1A46C1A9FA1B59F5) /* 769 */, + L64(0xA9E245A17C4C8FFA) /* 770 */, L64(0x65CA5159DB2955D7) /* 771 */, + L64(0x05DB0A76CE35AFC2) /* 772 */, L64(0x81EAC77EA9113D45) /* 773 */, + L64(0x528EF88AB6AC0A0D) /* 774 */, L64(0xA09EA253597BE3FF) /* 775 */, + L64(0x430DDFB3AC48CD56) /* 776 */, L64(0xC4B3A67AF45CE46F) /* 777 */, + L64(0x4ECECFD8FBE2D05E) /* 778 */, L64(0x3EF56F10B39935F0) /* 779 */, + L64(0x0B22D6829CD619C6) /* 780 */, L64(0x17FD460A74DF2069) /* 781 */, + L64(0x6CF8CC8E8510ED40) /* 782 */, L64(0xD6C824BF3A6ECAA7) /* 783 */, + L64(0x61243D581A817049) /* 784 */, L64(0x048BACB6BBC163A2) /* 785 */, + L64(0xD9A38AC27D44CC32) /* 786 */, L64(0x7FDDFF5BAAF410AB) /* 787 */, + L64(0xAD6D495AA804824B) /* 788 */, L64(0xE1A6A74F2D8C9F94) /* 789 */, + L64(0xD4F7851235DEE8E3) /* 790 */, L64(0xFD4B7F886540D893) /* 791 */, + L64(0x247C20042AA4BFDA) /* 792 */, L64(0x096EA1C517D1327C) /* 793 */, + L64(0xD56966B4361A6685) /* 794 */, L64(0x277DA5C31221057D) /* 795 */, + L64(0x94D59893A43ACFF7) /* 796 */, L64(0x64F0C51CCDC02281) /* 797 */, + L64(0x3D33BCC4FF6189DB) /* 798 */, L64(0xE005CB184CE66AF1) /* 799 */, + L64(0xFF5CCD1D1DB99BEA) /* 800 */, L64(0xB0B854A7FE42980F) /* 801 */, + L64(0x7BD46A6A718D4B9F) /* 802 */, L64(0xD10FA8CC22A5FD8C) /* 803 */, + L64(0xD31484952BE4BD31) /* 804 */, L64(0xC7FA975FCB243847) /* 805 */, + L64(0x4886ED1E5846C407) /* 806 */, L64(0x28CDDB791EB70B04) /* 807 */, + L64(0xC2B00BE2F573417F) /* 808 */, L64(0x5C9590452180F877) /* 809 */, + L64(0x7A6BDDFFF370EB00) /* 810 */, L64(0xCE509E38D6D9D6A4) /* 811 */, + L64(0xEBEB0F00647FA702) /* 812 */, L64(0x1DCC06CF76606F06) /* 813 */, + L64(0xE4D9F28BA286FF0A) /* 814 */, L64(0xD85A305DC918C262) /* 815 */, + L64(0x475B1D8732225F54) /* 816 */, L64(0x2D4FB51668CCB5FE) /* 817 */, + L64(0xA679B9D9D72BBA20) /* 818 */, L64(0x53841C0D912D43A5) /* 819 */, + L64(0x3B7EAA48BF12A4E8) /* 820 */, L64(0x781E0E47F22F1DDF) /* 821 */, + L64(0xEFF20CE60AB50973) /* 822 */, L64(0x20D261D19DFFB742) /* 823 */, + L64(0x16A12B03062A2E39) /* 824 */, L64(0x1960EB2239650495) /* 825 */, + L64(0x251C16FED50EB8B8) /* 826 */, L64(0x9AC0C330F826016E) /* 827 */, + L64(0xED152665953E7671) /* 828 */, L64(0x02D63194A6369570) /* 829 */, + L64(0x5074F08394B1C987) /* 830 */, L64(0x70BA598C90B25CE1) /* 831 */, + L64(0x794A15810B9742F6) /* 832 */, L64(0x0D5925E9FCAF8C6C) /* 833 */, + L64(0x3067716CD868744E) /* 834 */, L64(0x910AB077E8D7731B) /* 835 */, + L64(0x6A61BBDB5AC42F61) /* 836 */, L64(0x93513EFBF0851567) /* 837 */, + L64(0xF494724B9E83E9D5) /* 838 */, L64(0xE887E1985C09648D) /* 839 */, + L64(0x34B1D3C675370CFD) /* 840 */, L64(0xDC35E433BC0D255D) /* 841 */, + L64(0xD0AAB84234131BE0) /* 842 */, L64(0x08042A50B48B7EAF) /* 843 */, + L64(0x9997C4EE44A3AB35) /* 844 */, L64(0x829A7B49201799D0) /* 845 */, + L64(0x263B8307B7C54441) /* 846 */, L64(0x752F95F4FD6A6CA6) /* 847 */, + L64(0x927217402C08C6E5) /* 848 */, L64(0x2A8AB754A795D9EE) /* 849 */, + L64(0xA442F7552F72943D) /* 850 */, L64(0x2C31334E19781208) /* 851 */, + L64(0x4FA98D7CEAEE6291) /* 852 */, L64(0x55C3862F665DB309) /* 853 */, + L64(0xBD0610175D53B1F3) /* 854 */, L64(0x46FE6CB840413F27) /* 855 */, + L64(0x3FE03792DF0CFA59) /* 856 */, L64(0xCFE700372EB85E8F) /* 857 */, + L64(0xA7BE29E7ADBCE118) /* 858 */, L64(0xE544EE5CDE8431DD) /* 859 */, + L64(0x8A781B1B41F1873E) /* 860 */, L64(0xA5C94C78A0D2F0E7) /* 861 */, + L64(0x39412E2877B60728) /* 862 */, L64(0xA1265EF3AFC9A62C) /* 863 */, + L64(0xBCC2770C6A2506C5) /* 864 */, L64(0x3AB66DD5DCE1CE12) /* 865 */, + L64(0xE65499D04A675B37) /* 866 */, L64(0x7D8F523481BFD216) /* 867 */, + L64(0x0F6F64FCEC15F389) /* 868 */, L64(0x74EFBE618B5B13C8) /* 869 */, + L64(0xACDC82B714273E1D) /* 870 */, L64(0xDD40BFE003199D17) /* 871 */, + L64(0x37E99257E7E061F8) /* 872 */, L64(0xFA52626904775AAA) /* 873 */, + L64(0x8BBBF63A463D56F9) /* 874 */, L64(0xF0013F1543A26E64) /* 875 */, + L64(0xA8307E9F879EC898) /* 876 */, L64(0xCC4C27A4150177CC) /* 877 */, + L64(0x1B432F2CCA1D3348) /* 878 */, L64(0xDE1D1F8F9F6FA013) /* 879 */, + L64(0x606602A047A7DDD6) /* 880 */, L64(0xD237AB64CC1CB2C7) /* 881 */, + L64(0x9B938E7225FCD1D3) /* 882 */, L64(0xEC4E03708E0FF476) /* 883 */, + L64(0xFEB2FBDA3D03C12D) /* 884 */, L64(0xAE0BCED2EE43889A) /* 885 */, + L64(0x22CB8923EBFB4F43) /* 886 */, L64(0x69360D013CF7396D) /* 887 */, + L64(0x855E3602D2D4E022) /* 888 */, L64(0x073805BAD01F784C) /* 889 */, + L64(0x33E17A133852F546) /* 890 */, L64(0xDF4874058AC7B638) /* 891 */, + L64(0xBA92B29C678AA14A) /* 892 */, L64(0x0CE89FC76CFAADCD) /* 893 */, + L64(0x5F9D4E0908339E34) /* 894 */, L64(0xF1AFE9291F5923B9) /* 895 */, + L64(0x6E3480F60F4A265F) /* 896 */, L64(0xEEBF3A2AB29B841C) /* 897 */, + L64(0xE21938A88F91B4AD) /* 898 */, L64(0x57DFEFF845C6D3C3) /* 899 */, + L64(0x2F006B0BF62CAAF2) /* 900 */, L64(0x62F479EF6F75EE78) /* 901 */, + L64(0x11A55AD41C8916A9) /* 902 */, L64(0xF229D29084FED453) /* 903 */, + L64(0x42F1C27B16B000E6) /* 904 */, L64(0x2B1F76749823C074) /* 905 */, + L64(0x4B76ECA3C2745360) /* 906 */, L64(0x8C98F463B91691BD) /* 907 */, + L64(0x14BCC93CF1ADE66A) /* 908 */, L64(0x8885213E6D458397) /* 909 */, + L64(0x8E177DF0274D4711) /* 910 */, L64(0xB49B73B5503F2951) /* 911 */, + L64(0x10168168C3F96B6B) /* 912 */, L64(0x0E3D963B63CAB0AE) /* 913 */, + L64(0x8DFC4B5655A1DB14) /* 914 */, L64(0xF789F1356E14DE5C) /* 915 */, + L64(0x683E68AF4E51DAC1) /* 916 */, L64(0xC9A84F9D8D4B0FD9) /* 917 */, + L64(0x3691E03F52A0F9D1) /* 918 */, L64(0x5ED86E46E1878E80) /* 919 */, + L64(0x3C711A0E99D07150) /* 920 */, L64(0x5A0865B20C4E9310) /* 921 */, + L64(0x56FBFC1FE4F0682E) /* 922 */, L64(0xEA8D5DE3105EDF9B) /* 923 */, + L64(0x71ABFDB12379187A) /* 924 */, L64(0x2EB99DE1BEE77B9C) /* 925 */, + L64(0x21ECC0EA33CF4523) /* 926 */, L64(0x59A4D7521805C7A1) /* 927 */, + L64(0x3896F5EB56AE7C72) /* 928 */, L64(0xAA638F3DB18F75DC) /* 929 */, + L64(0x9F39358DABE9808E) /* 930 */, L64(0xB7DEFA91C00B72AC) /* 931 */, + L64(0x6B5541FD62492D92) /* 932 */, L64(0x6DC6DEE8F92E4D5B) /* 933 */, + L64(0x353F57ABC4BEEA7E) /* 934 */, L64(0x735769D6DA5690CE) /* 935 */, + L64(0x0A234AA642391484) /* 936 */, L64(0xF6F9508028F80D9D) /* 937 */, + L64(0xB8E319A27AB3F215) /* 938 */, L64(0x31AD9C1151341A4D) /* 939 */, + L64(0x773C22A57BEF5805) /* 940 */, L64(0x45C7561A07968633) /* 941 */, + L64(0xF913DA9E249DBE36) /* 942 */, L64(0xDA652D9B78A64C68) /* 943 */, + L64(0x4C27A97F3BC334EF) /* 944 */, L64(0x76621220E66B17F4) /* 945 */, + L64(0x967743899ACD7D0B) /* 946 */, L64(0xF3EE5BCAE0ED6782) /* 947 */, + L64(0x409F753600C879FC) /* 948 */, L64(0x06D09A39B5926DB6) /* 949 */, + L64(0x6F83AEB0317AC588) /* 950 */, L64(0x01E6CA4A86381F21) /* 951 */, + L64(0x66FF3462D19F3025) /* 952 */, L64(0x72207C24DDFD3BFB) /* 953 */, + L64(0x4AF6B6D3E2ECE2EB) /* 954 */, L64(0x9C994DBEC7EA08DE) /* 955 */, + L64(0x49ACE597B09A8BC4) /* 956 */, L64(0xB38C4766CF0797BA) /* 957 */, + L64(0x131B9373C57C2A75) /* 958 */, L64(0xB1822CCE61931E58) /* 959 */, + L64(0x9D7555B909BA1C0C) /* 960 */, L64(0x127FAFDD937D11D2) /* 961 */, + L64(0x29DA3BADC66D92E4) /* 962 */, L64(0xA2C1D57154C2ECBC) /* 963 */, + L64(0x58C5134D82F6FE24) /* 964 */, L64(0x1C3AE3515B62274F) /* 965 */, + L64(0xE907C82E01CB8126) /* 966 */, L64(0xF8ED091913E37FCB) /* 967 */, + L64(0x3249D8F9C80046C9) /* 968 */, L64(0x80CF9BEDE388FB63) /* 969 */, + L64(0x1881539A116CF19E) /* 970 */, L64(0x5103F3F76BD52457) /* 971 */, + L64(0x15B7E6F5AE47F7A8) /* 972 */, L64(0xDBD7C6DED47E9CCF) /* 973 */, + L64(0x44E55C410228BB1A) /* 974 */, L64(0xB647D4255EDB4E99) /* 975 */, + L64(0x5D11882BB8AAFC30) /* 976 */, L64(0xF5098BBB29D3212A) /* 977 */, + L64(0x8FB5EA14E90296B3) /* 978 */, L64(0x677B942157DD025A) /* 979 */, + L64(0xFB58E7C0A390ACB5) /* 980 */, L64(0x89D3674C83BD4A01) /* 981 */, + L64(0x9E2DA4DF4BF3B93B) /* 982 */, L64(0xFCC41E328CAB4829) /* 983 */, + L64(0x03F38C96BA582C52) /* 984 */, L64(0xCAD1BDBD7FD85DB2) /* 985 */, + L64(0xBBB442C16082AE83) /* 986 */, L64(0xB95FE86BA5DA9AB0) /* 987 */, + L64(0xB22E04673771A93F) /* 988 */, L64(0x845358C9493152D8) /* 989 */, + L64(0xBE2A488697B4541E) /* 990 */, L64(0x95A2DC2DD38E6966) /* 991 */, + L64(0xC02C11AC923C852B) /* 992 */, L64(0x2388B1990DF2A87B) /* 993 */, + L64(0x7C8008FA1B4F37BE) /* 994 */, L64(0x1F70D0C84D54E503) /* 995 */, + L64(0x5490ADEC7ECE57D4) /* 996 */, L64(0x002B3C27D9063A3A) /* 997 */, + L64(0x7EAEA3848030A2BF) /* 998 */, L64(0xC602326DED2003C0) /* 999 */, + L64(0x83A7287D69A94086) /* 1000 */, L64(0xC57A5FCB30F57A8A) /* 1001 */, + L64(0xB56844E479EBE779) /* 1002 */, L64(0xA373B40F05DCBCE9) /* 1003 */, + L64(0xD71A786E88570EE2) /* 1004 */, L64(0x879CBACDBDE8F6A0) /* 1005 */, + L64(0x976AD1BCC164A32F) /* 1006 */, L64(0xAB21E25E9666D78B) /* 1007 */, + L64(0x901063AAE5E5C33C) /* 1008 */, L64(0x9818B34448698D90) /* 1009 */, + L64(0xE36487AE3E1E8ABB) /* 1010 */, L64(0xAFBDF931893BDCB4) /* 1011 */, + L64(0x6345A0DC5FBBD519) /* 1012 */, L64(0x8628FE269B9465CA) /* 1013 */, + L64(0x1E5D01603F9C51EC) /* 1014 */, L64(0x4DE44006A15049B7) /* 1015 */, + L64(0xBF6C70E5F776CBB1) /* 1016 */, L64(0x411218F2EF552BED) /* 1017 */, + L64(0xCB0C0708705A36A3) /* 1018 */, L64(0xE74D14754F986044) /* 1019 */, + L64(0xCD56D9430EA8280E) /* 1020 */, L64(0xC12591D7535F5065) /* 1021 */, + L64(0xC83223F1720AEF96) /* 1022 */, L64(0xC3A0396F7363A51F) /* 1023 */, +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_types.h b/ext/hash/php_hash_types.h new file mode 100644 index 000000000..382ad7d5d --- /dev/null +++ b/ext/hash/php_hash_types.h @@ -0,0 +1,67 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_types.h,v 1.2.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_TYPES_H +#define PHP_HASH_TYPES_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef PHP_WIN32 +#if SIZEOF_LONG == 8 +#define L64(x) x +typedef unsigned long php_hash_uint64; +#if SIZEOF_INT == 4 +typedef unsigned int php_hash_uint32; +#elif SIZEOF_SHORT == 4 +typedef unsigned short php_hash_uint32; +#else +#error "Need a 32bit integer type" +#endif +#elif SIZEOF_LONG_LONG == 8 +#define L64(x) x##LL +typedef unsigned long long php_hash_uint64; +#if SIZEOF_INT == 4 +typedef unsigned int php_hash_uint32; +#elif SIZEOF_LONG == 4 +typedef unsigned long php_hash_uint32; +#else +#error "Need a 32bit integer type" +#endif +#else +#error "Need a 64bit integer type" +#endif +#else +#define L64(x) x##i64 +typedef unsigned __int64 php_hash_uint64; +typedef unsigned __int32 php_hash_uint32; +#endif + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_whirlpool.h b/ext/hash/php_hash_whirlpool.h new file mode 100644 index 000000000..3bf41a58f --- /dev/null +++ b/ext/hash/php_hash_whirlpool.h @@ -0,0 +1,48 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_whirlpool.h,v 1.2.2.4 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_WHIRLPOOL_H +#define PHP_HASH_WHIRLPOOL_H + +/* WHIRLPOOL context */ +typedef struct { + php_hash_uint64 state[8]; + unsigned char bitlength[32]; + struct { + int pos; + int bits; + unsigned char data[64]; + } buffer; +} PHP_WHIRLPOOL_CTX; + +PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *); +PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *, const unsigned char *, size_t); +PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char[64], PHP_WHIRLPOOL_CTX *); + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/php_hash_whirlpool_tables.h b/ext/hash/php_hash_whirlpool_tables.h new file mode 100644 index 000000000..6769fe295 --- /dev/null +++ b/ext/hash/php_hash_whirlpool_tables.h @@ -0,0 +1,585 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Michael Wallner | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_hash_whirlpool_tables.h,v 1.1.2.3 2006/01/01 12:50:07 sniper Exp $ */ + +#ifndef PHP_HASH_WHIRLPOOL_TABLES_H +#define PHP_HASH_WHIRLPOOL_TABLES_H + +#define R 10 + +static const php_hash_uint64 rc[R + 1] = { + L64(0x0000000000000000), + L64(0x1823c6e887b8014f), + L64(0x36a6d2f5796f9152), + L64(0x60bc9b8ea30c7b35), + L64(0x1de0d7c22e4bfe57), + L64(0x157737e59ff04ada), + L64(0x58c9290ab1a06b85), + L64(0xbd5d10f4cb3e0567), + L64(0xe427418ba77d95d8), + L64(0xfbee7c66dd17479e), + L64(0xca2dbf07ad5a8333), +}; + +static const php_hash_uint64 C0[256] = { + L64(0x18186018c07830d8), L64(0x23238c2305af4626), L64(0xc6c63fc67ef991b8), L64(0xe8e887e8136fcdfb), + L64(0x878726874ca113cb), L64(0xb8b8dab8a9626d11), L64(0x0101040108050209), L64(0x4f4f214f426e9e0d), + L64(0x3636d836adee6c9b), L64(0xa6a6a2a6590451ff), L64(0xd2d26fd2debdb90c), L64(0xf5f5f3f5fb06f70e), + L64(0x7979f979ef80f296), L64(0x6f6fa16f5fcede30), L64(0x91917e91fcef3f6d), L64(0x52525552aa07a4f8), + L64(0x60609d6027fdc047), L64(0xbcbccabc89766535), L64(0x9b9b569baccd2b37), L64(0x8e8e028e048c018a), + L64(0xa3a3b6a371155bd2), L64(0x0c0c300c603c186c), L64(0x7b7bf17bff8af684), L64(0x3535d435b5e16a80), + L64(0x1d1d741de8693af5), L64(0xe0e0a7e05347ddb3), L64(0xd7d77bd7f6acb321), L64(0xc2c22fc25eed999c), + L64(0x2e2eb82e6d965c43), L64(0x4b4b314b627a9629), L64(0xfefedffea321e15d), L64(0x575741578216aed5), + L64(0x15155415a8412abd), L64(0x7777c1779fb6eee8), L64(0x3737dc37a5eb6e92), L64(0xe5e5b3e57b56d79e), + L64(0x9f9f469f8cd92313), L64(0xf0f0e7f0d317fd23), L64(0x4a4a354a6a7f9420), L64(0xdada4fda9e95a944), + L64(0x58587d58fa25b0a2), L64(0xc9c903c906ca8fcf), L64(0x2929a429558d527c), L64(0x0a0a280a5022145a), + L64(0xb1b1feb1e14f7f50), L64(0xa0a0baa0691a5dc9), L64(0x6b6bb16b7fdad614), L64(0x85852e855cab17d9), + L64(0xbdbdcebd8173673c), L64(0x5d5d695dd234ba8f), L64(0x1010401080502090), L64(0xf4f4f7f4f303f507), + L64(0xcbcb0bcb16c08bdd), L64(0x3e3ef83eedc67cd3), L64(0x0505140528110a2d), L64(0x676781671fe6ce78), + L64(0xe4e4b7e47353d597), L64(0x27279c2725bb4e02), L64(0x4141194132588273), L64(0x8b8b168b2c9d0ba7), + L64(0xa7a7a6a7510153f6), L64(0x7d7de97dcf94fab2), L64(0x95956e95dcfb3749), L64(0xd8d847d88e9fad56), + L64(0xfbfbcbfb8b30eb70), L64(0xeeee9fee2371c1cd), L64(0x7c7ced7cc791f8bb), L64(0x6666856617e3cc71), + L64(0xdddd53dda68ea77b), L64(0x17175c17b84b2eaf), L64(0x4747014702468e45), L64(0x9e9e429e84dc211a), + L64(0xcaca0fca1ec589d4), L64(0x2d2db42d75995a58), L64(0xbfbfc6bf9179632e), L64(0x07071c07381b0e3f), + L64(0xadad8ead012347ac), L64(0x5a5a755aea2fb4b0), L64(0x838336836cb51bef), L64(0x3333cc3385ff66b6), + L64(0x636391633ff2c65c), L64(0x02020802100a0412), L64(0xaaaa92aa39384993), L64(0x7171d971afa8e2de), + L64(0xc8c807c80ecf8dc6), L64(0x19196419c87d32d1), L64(0x494939497270923b), L64(0xd9d943d9869aaf5f), + L64(0xf2f2eff2c31df931), L64(0xe3e3abe34b48dba8), L64(0x5b5b715be22ab6b9), L64(0x88881a8834920dbc), + L64(0x9a9a529aa4c8293e), L64(0x262698262dbe4c0b), L64(0x3232c8328dfa64bf), L64(0xb0b0fab0e94a7d59), + L64(0xe9e983e91b6acff2), L64(0x0f0f3c0f78331e77), L64(0xd5d573d5e6a6b733), L64(0x80803a8074ba1df4), + L64(0xbebec2be997c6127), L64(0xcdcd13cd26de87eb), L64(0x3434d034bde46889), L64(0x48483d487a759032), + L64(0xffffdbffab24e354), L64(0x7a7af57af78ff48d), L64(0x90907a90f4ea3d64), L64(0x5f5f615fc23ebe9d), + L64(0x202080201da0403d), L64(0x6868bd6867d5d00f), L64(0x1a1a681ad07234ca), L64(0xaeae82ae192c41b7), + L64(0xb4b4eab4c95e757d), L64(0x54544d549a19a8ce), L64(0x93937693ece53b7f), L64(0x222288220daa442f), + L64(0x64648d6407e9c863), L64(0xf1f1e3f1db12ff2a), L64(0x7373d173bfa2e6cc), L64(0x12124812905a2482), + L64(0x40401d403a5d807a), L64(0x0808200840281048), L64(0xc3c32bc356e89b95), L64(0xecec97ec337bc5df), + L64(0xdbdb4bdb9690ab4d), L64(0xa1a1bea1611f5fc0), L64(0x8d8d0e8d1c830791), L64(0x3d3df43df5c97ac8), + L64(0x97976697ccf1335b), L64(0x0000000000000000), L64(0xcfcf1bcf36d483f9), L64(0x2b2bac2b4587566e), + L64(0x7676c57697b3ece1), L64(0x8282328264b019e6), L64(0xd6d67fd6fea9b128), L64(0x1b1b6c1bd87736c3), + L64(0xb5b5eeb5c15b7774), L64(0xafaf86af112943be), L64(0x6a6ab56a77dfd41d), L64(0x50505d50ba0da0ea), + L64(0x45450945124c8a57), L64(0xf3f3ebf3cb18fb38), L64(0x3030c0309df060ad), L64(0xefef9bef2b74c3c4), + L64(0x3f3ffc3fe5c37eda), L64(0x55554955921caac7), L64(0xa2a2b2a2791059db), L64(0xeaea8fea0365c9e9), + L64(0x656589650fecca6a), L64(0xbabad2bab9686903), L64(0x2f2fbc2f65935e4a), L64(0xc0c027c04ee79d8e), + L64(0xdede5fdebe81a160), L64(0x1c1c701ce06c38fc), L64(0xfdfdd3fdbb2ee746), L64(0x4d4d294d52649a1f), + L64(0x92927292e4e03976), L64(0x7575c9758fbceafa), L64(0x06061806301e0c36), L64(0x8a8a128a249809ae), + L64(0xb2b2f2b2f940794b), L64(0xe6e6bfe66359d185), L64(0x0e0e380e70361c7e), L64(0x1f1f7c1ff8633ee7), + L64(0x6262956237f7c455), L64(0xd4d477d4eea3b53a), L64(0xa8a89aa829324d81), L64(0x96966296c4f43152), + L64(0xf9f9c3f99b3aef62), L64(0xc5c533c566f697a3), L64(0x2525942535b14a10), L64(0x59597959f220b2ab), + L64(0x84842a8454ae15d0), L64(0x7272d572b7a7e4c5), L64(0x3939e439d5dd72ec), L64(0x4c4c2d4c5a619816), + L64(0x5e5e655eca3bbc94), L64(0x7878fd78e785f09f), L64(0x3838e038ddd870e5), L64(0x8c8c0a8c14860598), + L64(0xd1d163d1c6b2bf17), L64(0xa5a5aea5410b57e4), L64(0xe2e2afe2434dd9a1), L64(0x616199612ff8c24e), + L64(0xb3b3f6b3f1457b42), L64(0x2121842115a54234), L64(0x9c9c4a9c94d62508), L64(0x1e1e781ef0663cee), + L64(0x4343114322528661), L64(0xc7c73bc776fc93b1), L64(0xfcfcd7fcb32be54f), L64(0x0404100420140824), + L64(0x51515951b208a2e3), L64(0x99995e99bcc72f25), L64(0x6d6da96d4fc4da22), L64(0x0d0d340d68391a65), + L64(0xfafacffa8335e979), L64(0xdfdf5bdfb684a369), L64(0x7e7ee57ed79bfca9), L64(0x242490243db44819), + L64(0x3b3bec3bc5d776fe), L64(0xabab96ab313d4b9a), L64(0xcece1fce3ed181f0), L64(0x1111441188552299), + L64(0x8f8f068f0c890383), L64(0x4e4e254e4a6b9c04), L64(0xb7b7e6b7d1517366), L64(0xebeb8beb0b60cbe0), + L64(0x3c3cf03cfdcc78c1), L64(0x81813e817cbf1ffd), L64(0x94946a94d4fe3540), L64(0xf7f7fbf7eb0cf31c), + L64(0xb9b9deb9a1676f18), L64(0x13134c13985f268b), L64(0x2c2cb02c7d9c5851), L64(0xd3d36bd3d6b8bb05), + L64(0xe7e7bbe76b5cd38c), L64(0x6e6ea56e57cbdc39), L64(0xc4c437c46ef395aa), L64(0x03030c03180f061b), + L64(0x565645568a13acdc), L64(0x44440d441a49885e), L64(0x7f7fe17fdf9efea0), L64(0xa9a99ea921374f88), + L64(0x2a2aa82a4d825467), L64(0xbbbbd6bbb16d6b0a), L64(0xc1c123c146e29f87), L64(0x53535153a202a6f1), + L64(0xdcdc57dcae8ba572), L64(0x0b0b2c0b58271653), L64(0x9d9d4e9d9cd32701), L64(0x6c6cad6c47c1d82b), + L64(0x3131c43195f562a4), L64(0x7474cd7487b9e8f3), L64(0xf6f6fff6e309f115), L64(0x464605460a438c4c), + L64(0xacac8aac092645a5), L64(0x89891e893c970fb5), L64(0x14145014a04428b4), L64(0xe1e1a3e15b42dfba), + L64(0x16165816b04e2ca6), L64(0x3a3ae83acdd274f7), L64(0x6969b9696fd0d206), L64(0x09092409482d1241), + L64(0x7070dd70a7ade0d7), L64(0xb6b6e2b6d954716f), L64(0xd0d067d0ceb7bd1e), L64(0xeded93ed3b7ec7d6), + L64(0xcccc17cc2edb85e2), L64(0x424215422a578468), L64(0x98985a98b4c22d2c), L64(0xa4a4aaa4490e55ed), + L64(0x2828a0285d885075), L64(0x5c5c6d5cda31b886), L64(0xf8f8c7f8933fed6b), L64(0x8686228644a411c2), +}; + +static const php_hash_uint64 C1[256] = { + L64(0xd818186018c07830), L64(0x2623238c2305af46), L64(0xb8c6c63fc67ef991), L64(0xfbe8e887e8136fcd), + L64(0xcb878726874ca113), L64(0x11b8b8dab8a9626d), L64(0x0901010401080502), L64(0x0d4f4f214f426e9e), + L64(0x9b3636d836adee6c), L64(0xffa6a6a2a6590451), L64(0x0cd2d26fd2debdb9), L64(0x0ef5f5f3f5fb06f7), + L64(0x967979f979ef80f2), L64(0x306f6fa16f5fcede), L64(0x6d91917e91fcef3f), L64(0xf852525552aa07a4), + L64(0x4760609d6027fdc0), L64(0x35bcbccabc897665), L64(0x379b9b569baccd2b), L64(0x8a8e8e028e048c01), + L64(0xd2a3a3b6a371155b), L64(0x6c0c0c300c603c18), L64(0x847b7bf17bff8af6), L64(0x803535d435b5e16a), + L64(0xf51d1d741de8693a), L64(0xb3e0e0a7e05347dd), L64(0x21d7d77bd7f6acb3), L64(0x9cc2c22fc25eed99), + L64(0x432e2eb82e6d965c), L64(0x294b4b314b627a96), L64(0x5dfefedffea321e1), L64(0xd5575741578216ae), + L64(0xbd15155415a8412a), L64(0xe87777c1779fb6ee), L64(0x923737dc37a5eb6e), L64(0x9ee5e5b3e57b56d7), + L64(0x139f9f469f8cd923), L64(0x23f0f0e7f0d317fd), L64(0x204a4a354a6a7f94), L64(0x44dada4fda9e95a9), + L64(0xa258587d58fa25b0), L64(0xcfc9c903c906ca8f), L64(0x7c2929a429558d52), L64(0x5a0a0a280a502214), + L64(0x50b1b1feb1e14f7f), L64(0xc9a0a0baa0691a5d), L64(0x146b6bb16b7fdad6), L64(0xd985852e855cab17), + L64(0x3cbdbdcebd817367), L64(0x8f5d5d695dd234ba), L64(0x9010104010805020), L64(0x07f4f4f7f4f303f5), + L64(0xddcbcb0bcb16c08b), L64(0xd33e3ef83eedc67c), L64(0x2d0505140528110a), L64(0x78676781671fe6ce), + L64(0x97e4e4b7e47353d5), L64(0x0227279c2725bb4e), L64(0x7341411941325882), L64(0xa78b8b168b2c9d0b), + L64(0xf6a7a7a6a7510153), L64(0xb27d7de97dcf94fa), L64(0x4995956e95dcfb37), L64(0x56d8d847d88e9fad), + L64(0x70fbfbcbfb8b30eb), L64(0xcdeeee9fee2371c1), L64(0xbb7c7ced7cc791f8), L64(0x716666856617e3cc), + L64(0x7bdddd53dda68ea7), L64(0xaf17175c17b84b2e), L64(0x454747014702468e), L64(0x1a9e9e429e84dc21), + L64(0xd4caca0fca1ec589), L64(0x582d2db42d75995a), L64(0x2ebfbfc6bf917963), L64(0x3f07071c07381b0e), + L64(0xacadad8ead012347), L64(0xb05a5a755aea2fb4), L64(0xef838336836cb51b), L64(0xb63333cc3385ff66), + L64(0x5c636391633ff2c6), L64(0x1202020802100a04), L64(0x93aaaa92aa393849), L64(0xde7171d971afa8e2), + L64(0xc6c8c807c80ecf8d), L64(0xd119196419c87d32), L64(0x3b49493949727092), L64(0x5fd9d943d9869aaf), + L64(0x31f2f2eff2c31df9), L64(0xa8e3e3abe34b48db), L64(0xb95b5b715be22ab6), L64(0xbc88881a8834920d), + L64(0x3e9a9a529aa4c829), L64(0x0b262698262dbe4c), L64(0xbf3232c8328dfa64), L64(0x59b0b0fab0e94a7d), + L64(0xf2e9e983e91b6acf), L64(0x770f0f3c0f78331e), L64(0x33d5d573d5e6a6b7), L64(0xf480803a8074ba1d), + L64(0x27bebec2be997c61), L64(0xebcdcd13cd26de87), L64(0x893434d034bde468), L64(0x3248483d487a7590), + L64(0x54ffffdbffab24e3), L64(0x8d7a7af57af78ff4), L64(0x6490907a90f4ea3d), L64(0x9d5f5f615fc23ebe), + L64(0x3d202080201da040), L64(0x0f6868bd6867d5d0), L64(0xca1a1a681ad07234), L64(0xb7aeae82ae192c41), + L64(0x7db4b4eab4c95e75), L64(0xce54544d549a19a8), L64(0x7f93937693ece53b), L64(0x2f222288220daa44), + L64(0x6364648d6407e9c8), L64(0x2af1f1e3f1db12ff), L64(0xcc7373d173bfa2e6), L64(0x8212124812905a24), + L64(0x7a40401d403a5d80), L64(0x4808082008402810), L64(0x95c3c32bc356e89b), L64(0xdfecec97ec337bc5), + L64(0x4ddbdb4bdb9690ab), L64(0xc0a1a1bea1611f5f), L64(0x918d8d0e8d1c8307), L64(0xc83d3df43df5c97a), + L64(0x5b97976697ccf133), L64(0x0000000000000000), L64(0xf9cfcf1bcf36d483), L64(0x6e2b2bac2b458756), + L64(0xe17676c57697b3ec), L64(0xe68282328264b019), L64(0x28d6d67fd6fea9b1), L64(0xc31b1b6c1bd87736), + L64(0x74b5b5eeb5c15b77), L64(0xbeafaf86af112943), L64(0x1d6a6ab56a77dfd4), L64(0xea50505d50ba0da0), + L64(0x5745450945124c8a), L64(0x38f3f3ebf3cb18fb), L64(0xad3030c0309df060), L64(0xc4efef9bef2b74c3), + L64(0xda3f3ffc3fe5c37e), L64(0xc755554955921caa), L64(0xdba2a2b2a2791059), L64(0xe9eaea8fea0365c9), + L64(0x6a656589650fecca), L64(0x03babad2bab96869), L64(0x4a2f2fbc2f65935e), L64(0x8ec0c027c04ee79d), + L64(0x60dede5fdebe81a1), L64(0xfc1c1c701ce06c38), L64(0x46fdfdd3fdbb2ee7), L64(0x1f4d4d294d52649a), + L64(0x7692927292e4e039), L64(0xfa7575c9758fbcea), L64(0x3606061806301e0c), L64(0xae8a8a128a249809), + L64(0x4bb2b2f2b2f94079), L64(0x85e6e6bfe66359d1), L64(0x7e0e0e380e70361c), L64(0xe71f1f7c1ff8633e), + L64(0x556262956237f7c4), L64(0x3ad4d477d4eea3b5), L64(0x81a8a89aa829324d), L64(0x5296966296c4f431), + L64(0x62f9f9c3f99b3aef), L64(0xa3c5c533c566f697), L64(0x102525942535b14a), L64(0xab59597959f220b2), + L64(0xd084842a8454ae15), L64(0xc57272d572b7a7e4), L64(0xec3939e439d5dd72), L64(0x164c4c2d4c5a6198), + L64(0x945e5e655eca3bbc), L64(0x9f7878fd78e785f0), L64(0xe53838e038ddd870), L64(0x988c8c0a8c148605), + L64(0x17d1d163d1c6b2bf), L64(0xe4a5a5aea5410b57), L64(0xa1e2e2afe2434dd9), L64(0x4e616199612ff8c2), + L64(0x42b3b3f6b3f1457b), L64(0x342121842115a542), L64(0x089c9c4a9c94d625), L64(0xee1e1e781ef0663c), + L64(0x6143431143225286), L64(0xb1c7c73bc776fc93), L64(0x4ffcfcd7fcb32be5), L64(0x2404041004201408), + L64(0xe351515951b208a2), L64(0x2599995e99bcc72f), L64(0x226d6da96d4fc4da), L64(0x650d0d340d68391a), + L64(0x79fafacffa8335e9), L64(0x69dfdf5bdfb684a3), L64(0xa97e7ee57ed79bfc), L64(0x19242490243db448), + L64(0xfe3b3bec3bc5d776), L64(0x9aabab96ab313d4b), L64(0xf0cece1fce3ed181), L64(0x9911114411885522), + L64(0x838f8f068f0c8903), L64(0x044e4e254e4a6b9c), L64(0x66b7b7e6b7d15173), L64(0xe0ebeb8beb0b60cb), + L64(0xc13c3cf03cfdcc78), L64(0xfd81813e817cbf1f), L64(0x4094946a94d4fe35), L64(0x1cf7f7fbf7eb0cf3), + L64(0x18b9b9deb9a1676f), L64(0x8b13134c13985f26), L64(0x512c2cb02c7d9c58), L64(0x05d3d36bd3d6b8bb), + L64(0x8ce7e7bbe76b5cd3), L64(0x396e6ea56e57cbdc), L64(0xaac4c437c46ef395), L64(0x1b03030c03180f06), + L64(0xdc565645568a13ac), L64(0x5e44440d441a4988), L64(0xa07f7fe17fdf9efe), L64(0x88a9a99ea921374f), + L64(0x672a2aa82a4d8254), L64(0x0abbbbd6bbb16d6b), L64(0x87c1c123c146e29f), L64(0xf153535153a202a6), + L64(0x72dcdc57dcae8ba5), L64(0x530b0b2c0b582716), L64(0x019d9d4e9d9cd327), L64(0x2b6c6cad6c47c1d8), + L64(0xa43131c43195f562), L64(0xf37474cd7487b9e8), L64(0x15f6f6fff6e309f1), L64(0x4c464605460a438c), + L64(0xa5acac8aac092645), L64(0xb589891e893c970f), L64(0xb414145014a04428), L64(0xbae1e1a3e15b42df), + L64(0xa616165816b04e2c), L64(0xf73a3ae83acdd274), L64(0x066969b9696fd0d2), L64(0x4109092409482d12), + L64(0xd77070dd70a7ade0), L64(0x6fb6b6e2b6d95471), L64(0x1ed0d067d0ceb7bd), L64(0xd6eded93ed3b7ec7), + L64(0xe2cccc17cc2edb85), L64(0x68424215422a5784), L64(0x2c98985a98b4c22d), L64(0xeda4a4aaa4490e55), + L64(0x752828a0285d8850), L64(0x865c5c6d5cda31b8), L64(0x6bf8f8c7f8933fed), L64(0xc28686228644a411), +}; + +static const php_hash_uint64 C2[256] = { + L64(0x30d818186018c078), L64(0x462623238c2305af), L64(0x91b8c6c63fc67ef9), L64(0xcdfbe8e887e8136f), + L64(0x13cb878726874ca1), L64(0x6d11b8b8dab8a962), L64(0x0209010104010805), L64(0x9e0d4f4f214f426e), + L64(0x6c9b3636d836adee), L64(0x51ffa6a6a2a65904), L64(0xb90cd2d26fd2debd), L64(0xf70ef5f5f3f5fb06), + L64(0xf2967979f979ef80), L64(0xde306f6fa16f5fce), L64(0x3f6d91917e91fcef), L64(0xa4f852525552aa07), + L64(0xc04760609d6027fd), L64(0x6535bcbccabc8976), L64(0x2b379b9b569baccd), L64(0x018a8e8e028e048c), + L64(0x5bd2a3a3b6a37115), L64(0x186c0c0c300c603c), L64(0xf6847b7bf17bff8a), L64(0x6a803535d435b5e1), + L64(0x3af51d1d741de869), L64(0xddb3e0e0a7e05347), L64(0xb321d7d77bd7f6ac), L64(0x999cc2c22fc25eed), + L64(0x5c432e2eb82e6d96), L64(0x96294b4b314b627a), L64(0xe15dfefedffea321), L64(0xaed5575741578216), + L64(0x2abd15155415a841), L64(0xeee87777c1779fb6), L64(0x6e923737dc37a5eb), L64(0xd79ee5e5b3e57b56), + L64(0x23139f9f469f8cd9), L64(0xfd23f0f0e7f0d317), L64(0x94204a4a354a6a7f), L64(0xa944dada4fda9e95), + L64(0xb0a258587d58fa25), L64(0x8fcfc9c903c906ca), L64(0x527c2929a429558d), L64(0x145a0a0a280a5022), + L64(0x7f50b1b1feb1e14f), L64(0x5dc9a0a0baa0691a), L64(0xd6146b6bb16b7fda), L64(0x17d985852e855cab), + L64(0x673cbdbdcebd8173), L64(0xba8f5d5d695dd234), L64(0x2090101040108050), L64(0xf507f4f4f7f4f303), + L64(0x8bddcbcb0bcb16c0), L64(0x7cd33e3ef83eedc6), L64(0x0a2d050514052811), L64(0xce78676781671fe6), + L64(0xd597e4e4b7e47353), L64(0x4e0227279c2725bb), L64(0x8273414119413258), L64(0x0ba78b8b168b2c9d), + L64(0x53f6a7a7a6a75101), L64(0xfab27d7de97dcf94), L64(0x374995956e95dcfb), L64(0xad56d8d847d88e9f), + L64(0xeb70fbfbcbfb8b30), L64(0xc1cdeeee9fee2371), L64(0xf8bb7c7ced7cc791), L64(0xcc716666856617e3), + L64(0xa77bdddd53dda68e), L64(0x2eaf17175c17b84b), L64(0x8e45474701470246), L64(0x211a9e9e429e84dc), + L64(0x89d4caca0fca1ec5), L64(0x5a582d2db42d7599), L64(0x632ebfbfc6bf9179), L64(0x0e3f07071c07381b), + L64(0x47acadad8ead0123), L64(0xb4b05a5a755aea2f), L64(0x1bef838336836cb5), L64(0x66b63333cc3385ff), + L64(0xc65c636391633ff2), L64(0x041202020802100a), L64(0x4993aaaa92aa3938), L64(0xe2de7171d971afa8), + L64(0x8dc6c8c807c80ecf), L64(0x32d119196419c87d), L64(0x923b494939497270), L64(0xaf5fd9d943d9869a), + L64(0xf931f2f2eff2c31d), L64(0xdba8e3e3abe34b48), L64(0xb6b95b5b715be22a), L64(0x0dbc88881a883492), + L64(0x293e9a9a529aa4c8), L64(0x4c0b262698262dbe), L64(0x64bf3232c8328dfa), L64(0x7d59b0b0fab0e94a), + L64(0xcff2e9e983e91b6a), L64(0x1e770f0f3c0f7833), L64(0xb733d5d573d5e6a6), L64(0x1df480803a8074ba), + L64(0x6127bebec2be997c), L64(0x87ebcdcd13cd26de), L64(0x68893434d034bde4), L64(0x903248483d487a75), + L64(0xe354ffffdbffab24), L64(0xf48d7a7af57af78f), L64(0x3d6490907a90f4ea), L64(0xbe9d5f5f615fc23e), + L64(0x403d202080201da0), L64(0xd00f6868bd6867d5), L64(0x34ca1a1a681ad072), L64(0x41b7aeae82ae192c), + L64(0x757db4b4eab4c95e), L64(0xa8ce54544d549a19), L64(0x3b7f93937693ece5), L64(0x442f222288220daa), + L64(0xc86364648d6407e9), L64(0xff2af1f1e3f1db12), L64(0xe6cc7373d173bfa2), L64(0x248212124812905a), + L64(0x807a40401d403a5d), L64(0x1048080820084028), L64(0x9b95c3c32bc356e8), L64(0xc5dfecec97ec337b), + L64(0xab4ddbdb4bdb9690), L64(0x5fc0a1a1bea1611f), L64(0x07918d8d0e8d1c83), L64(0x7ac83d3df43df5c9), + L64(0x335b97976697ccf1), L64(0x0000000000000000), L64(0x83f9cfcf1bcf36d4), L64(0x566e2b2bac2b4587), + L64(0xece17676c57697b3), L64(0x19e68282328264b0), L64(0xb128d6d67fd6fea9), L64(0x36c31b1b6c1bd877), + L64(0x7774b5b5eeb5c15b), L64(0x43beafaf86af1129), L64(0xd41d6a6ab56a77df), L64(0xa0ea50505d50ba0d), + L64(0x8a5745450945124c), L64(0xfb38f3f3ebf3cb18), L64(0x60ad3030c0309df0), L64(0xc3c4efef9bef2b74), + L64(0x7eda3f3ffc3fe5c3), L64(0xaac755554955921c), L64(0x59dba2a2b2a27910), L64(0xc9e9eaea8fea0365), + L64(0xca6a656589650fec), L64(0x6903babad2bab968), L64(0x5e4a2f2fbc2f6593), L64(0x9d8ec0c027c04ee7), + L64(0xa160dede5fdebe81), L64(0x38fc1c1c701ce06c), L64(0xe746fdfdd3fdbb2e), L64(0x9a1f4d4d294d5264), + L64(0x397692927292e4e0), L64(0xeafa7575c9758fbc), L64(0x0c3606061806301e), L64(0x09ae8a8a128a2498), + L64(0x794bb2b2f2b2f940), L64(0xd185e6e6bfe66359), L64(0x1c7e0e0e380e7036), L64(0x3ee71f1f7c1ff863), + L64(0xc4556262956237f7), L64(0xb53ad4d477d4eea3), L64(0x4d81a8a89aa82932), L64(0x315296966296c4f4), + L64(0xef62f9f9c3f99b3a), L64(0x97a3c5c533c566f6), L64(0x4a102525942535b1), L64(0xb2ab59597959f220), + L64(0x15d084842a8454ae), L64(0xe4c57272d572b7a7), L64(0x72ec3939e439d5dd), L64(0x98164c4c2d4c5a61), + L64(0xbc945e5e655eca3b), L64(0xf09f7878fd78e785), L64(0x70e53838e038ddd8), L64(0x05988c8c0a8c1486), + L64(0xbf17d1d163d1c6b2), L64(0x57e4a5a5aea5410b), L64(0xd9a1e2e2afe2434d), L64(0xc24e616199612ff8), + L64(0x7b42b3b3f6b3f145), L64(0x42342121842115a5), L64(0x25089c9c4a9c94d6), L64(0x3cee1e1e781ef066), + L64(0x8661434311432252), L64(0x93b1c7c73bc776fc), L64(0xe54ffcfcd7fcb32b), L64(0x0824040410042014), + L64(0xa2e351515951b208), L64(0x2f2599995e99bcc7), L64(0xda226d6da96d4fc4), L64(0x1a650d0d340d6839), + L64(0xe979fafacffa8335), L64(0xa369dfdf5bdfb684), L64(0xfca97e7ee57ed79b), L64(0x4819242490243db4), + L64(0x76fe3b3bec3bc5d7), L64(0x4b9aabab96ab313d), L64(0x81f0cece1fce3ed1), L64(0x2299111144118855), + L64(0x03838f8f068f0c89), L64(0x9c044e4e254e4a6b), L64(0x7366b7b7e6b7d151), L64(0xcbe0ebeb8beb0b60), + L64(0x78c13c3cf03cfdcc), L64(0x1ffd81813e817cbf), L64(0x354094946a94d4fe), L64(0xf31cf7f7fbf7eb0c), + L64(0x6f18b9b9deb9a167), L64(0x268b13134c13985f), L64(0x58512c2cb02c7d9c), L64(0xbb05d3d36bd3d6b8), + L64(0xd38ce7e7bbe76b5c), L64(0xdc396e6ea56e57cb), L64(0x95aac4c437c46ef3), L64(0x061b03030c03180f), + L64(0xacdc565645568a13), L64(0x885e44440d441a49), L64(0xfea07f7fe17fdf9e), L64(0x4f88a9a99ea92137), + L64(0x54672a2aa82a4d82), L64(0x6b0abbbbd6bbb16d), L64(0x9f87c1c123c146e2), L64(0xa6f153535153a202), + L64(0xa572dcdc57dcae8b), L64(0x16530b0b2c0b5827), L64(0x27019d9d4e9d9cd3), L64(0xd82b6c6cad6c47c1), + L64(0x62a43131c43195f5), L64(0xe8f37474cd7487b9), L64(0xf115f6f6fff6e309), L64(0x8c4c464605460a43), + L64(0x45a5acac8aac0926), L64(0x0fb589891e893c97), L64(0x28b414145014a044), L64(0xdfbae1e1a3e15b42), + L64(0x2ca616165816b04e), L64(0x74f73a3ae83acdd2), L64(0xd2066969b9696fd0), L64(0x124109092409482d), + L64(0xe0d77070dd70a7ad), L64(0x716fb6b6e2b6d954), L64(0xbd1ed0d067d0ceb7), L64(0xc7d6eded93ed3b7e), + L64(0x85e2cccc17cc2edb), L64(0x8468424215422a57), L64(0x2d2c98985a98b4c2), L64(0x55eda4a4aaa4490e), + L64(0x50752828a0285d88), L64(0xb8865c5c6d5cda31), L64(0xed6bf8f8c7f8933f), L64(0x11c28686228644a4), +}; + +static const php_hash_uint64 C3[256] = { + L64(0x7830d818186018c0), L64(0xaf462623238c2305), L64(0xf991b8c6c63fc67e), L64(0x6fcdfbe8e887e813), + L64(0xa113cb878726874c), L64(0x626d11b8b8dab8a9), L64(0x0502090101040108), L64(0x6e9e0d4f4f214f42), + L64(0xee6c9b3636d836ad), L64(0x0451ffa6a6a2a659), L64(0xbdb90cd2d26fd2de), L64(0x06f70ef5f5f3f5fb), + L64(0x80f2967979f979ef), L64(0xcede306f6fa16f5f), L64(0xef3f6d91917e91fc), L64(0x07a4f852525552aa), + L64(0xfdc04760609d6027), L64(0x766535bcbccabc89), L64(0xcd2b379b9b569bac), L64(0x8c018a8e8e028e04), + L64(0x155bd2a3a3b6a371), L64(0x3c186c0c0c300c60), L64(0x8af6847b7bf17bff), L64(0xe16a803535d435b5), + L64(0x693af51d1d741de8), L64(0x47ddb3e0e0a7e053), L64(0xacb321d7d77bd7f6), L64(0xed999cc2c22fc25e), + L64(0x965c432e2eb82e6d), L64(0x7a96294b4b314b62), L64(0x21e15dfefedffea3), L64(0x16aed55757415782), + L64(0x412abd15155415a8), L64(0xb6eee87777c1779f), L64(0xeb6e923737dc37a5), L64(0x56d79ee5e5b3e57b), + L64(0xd923139f9f469f8c), L64(0x17fd23f0f0e7f0d3), L64(0x7f94204a4a354a6a), L64(0x95a944dada4fda9e), + L64(0x25b0a258587d58fa), L64(0xca8fcfc9c903c906), L64(0x8d527c2929a42955), L64(0x22145a0a0a280a50), + L64(0x4f7f50b1b1feb1e1), L64(0x1a5dc9a0a0baa069), L64(0xdad6146b6bb16b7f), L64(0xab17d985852e855c), + L64(0x73673cbdbdcebd81), L64(0x34ba8f5d5d695dd2), L64(0x5020901010401080), L64(0x03f507f4f4f7f4f3), + L64(0xc08bddcbcb0bcb16), L64(0xc67cd33e3ef83eed), L64(0x110a2d0505140528), L64(0xe6ce78676781671f), + L64(0x53d597e4e4b7e473), L64(0xbb4e0227279c2725), L64(0x5882734141194132), L64(0x9d0ba78b8b168b2c), + L64(0x0153f6a7a7a6a751), L64(0x94fab27d7de97dcf), L64(0xfb374995956e95dc), L64(0x9fad56d8d847d88e), + L64(0x30eb70fbfbcbfb8b), L64(0x71c1cdeeee9fee23), L64(0x91f8bb7c7ced7cc7), L64(0xe3cc716666856617), + L64(0x8ea77bdddd53dda6), L64(0x4b2eaf17175c17b8), L64(0x468e454747014702), L64(0xdc211a9e9e429e84), + L64(0xc589d4caca0fca1e), L64(0x995a582d2db42d75), L64(0x79632ebfbfc6bf91), L64(0x1b0e3f07071c0738), + L64(0x2347acadad8ead01), L64(0x2fb4b05a5a755aea), L64(0xb51bef838336836c), L64(0xff66b63333cc3385), + L64(0xf2c65c636391633f), L64(0x0a04120202080210), L64(0x384993aaaa92aa39), L64(0xa8e2de7171d971af), + L64(0xcf8dc6c8c807c80e), L64(0x7d32d119196419c8), L64(0x70923b4949394972), L64(0x9aaf5fd9d943d986), + L64(0x1df931f2f2eff2c3), L64(0x48dba8e3e3abe34b), L64(0x2ab6b95b5b715be2), L64(0x920dbc88881a8834), + L64(0xc8293e9a9a529aa4), L64(0xbe4c0b262698262d), L64(0xfa64bf3232c8328d), L64(0x4a7d59b0b0fab0e9), + L64(0x6acff2e9e983e91b), L64(0x331e770f0f3c0f78), L64(0xa6b733d5d573d5e6), L64(0xba1df480803a8074), + L64(0x7c6127bebec2be99), L64(0xde87ebcdcd13cd26), L64(0xe468893434d034bd), L64(0x75903248483d487a), + L64(0x24e354ffffdbffab), L64(0x8ff48d7a7af57af7), L64(0xea3d6490907a90f4), L64(0x3ebe9d5f5f615fc2), + L64(0xa0403d202080201d), L64(0xd5d00f6868bd6867), L64(0x7234ca1a1a681ad0), L64(0x2c41b7aeae82ae19), + L64(0x5e757db4b4eab4c9), L64(0x19a8ce54544d549a), L64(0xe53b7f93937693ec), L64(0xaa442f222288220d), + L64(0xe9c86364648d6407), L64(0x12ff2af1f1e3f1db), L64(0xa2e6cc7373d173bf), L64(0x5a24821212481290), + L64(0x5d807a40401d403a), L64(0x2810480808200840), L64(0xe89b95c3c32bc356), L64(0x7bc5dfecec97ec33), + L64(0x90ab4ddbdb4bdb96), L64(0x1f5fc0a1a1bea161), L64(0x8307918d8d0e8d1c), L64(0xc97ac83d3df43df5), + L64(0xf1335b97976697cc), L64(0x0000000000000000), L64(0xd483f9cfcf1bcf36), L64(0x87566e2b2bac2b45), + L64(0xb3ece17676c57697), L64(0xb019e68282328264), L64(0xa9b128d6d67fd6fe), L64(0x7736c31b1b6c1bd8), + L64(0x5b7774b5b5eeb5c1), L64(0x2943beafaf86af11), L64(0xdfd41d6a6ab56a77), L64(0x0da0ea50505d50ba), + L64(0x4c8a574545094512), L64(0x18fb38f3f3ebf3cb), L64(0xf060ad3030c0309d), L64(0x74c3c4efef9bef2b), + L64(0xc37eda3f3ffc3fe5), L64(0x1caac75555495592), L64(0x1059dba2a2b2a279), L64(0x65c9e9eaea8fea03), + L64(0xecca6a656589650f), L64(0x686903babad2bab9), L64(0x935e4a2f2fbc2f65), L64(0xe79d8ec0c027c04e), + L64(0x81a160dede5fdebe), L64(0x6c38fc1c1c701ce0), L64(0x2ee746fdfdd3fdbb), L64(0x649a1f4d4d294d52), + L64(0xe0397692927292e4), L64(0xbceafa7575c9758f), L64(0x1e0c360606180630), L64(0x9809ae8a8a128a24), + L64(0x40794bb2b2f2b2f9), L64(0x59d185e6e6bfe663), L64(0x361c7e0e0e380e70), L64(0x633ee71f1f7c1ff8), + L64(0xf7c4556262956237), L64(0xa3b53ad4d477d4ee), L64(0x324d81a8a89aa829), L64(0xf4315296966296c4), + L64(0x3aef62f9f9c3f99b), L64(0xf697a3c5c533c566), L64(0xb14a102525942535), L64(0x20b2ab59597959f2), + L64(0xae15d084842a8454), L64(0xa7e4c57272d572b7), L64(0xdd72ec3939e439d5), L64(0x6198164c4c2d4c5a), + L64(0x3bbc945e5e655eca), L64(0x85f09f7878fd78e7), L64(0xd870e53838e038dd), L64(0x8605988c8c0a8c14), + L64(0xb2bf17d1d163d1c6), L64(0x0b57e4a5a5aea541), L64(0x4dd9a1e2e2afe243), L64(0xf8c24e616199612f), + L64(0x457b42b3b3f6b3f1), L64(0xa542342121842115), L64(0xd625089c9c4a9c94), L64(0x663cee1e1e781ef0), + L64(0x5286614343114322), L64(0xfc93b1c7c73bc776), L64(0x2be54ffcfcd7fcb3), L64(0x1408240404100420), + L64(0x08a2e351515951b2), L64(0xc72f2599995e99bc), L64(0xc4da226d6da96d4f), L64(0x391a650d0d340d68), + L64(0x35e979fafacffa83), L64(0x84a369dfdf5bdfb6), L64(0x9bfca97e7ee57ed7), L64(0xb44819242490243d), + L64(0xd776fe3b3bec3bc5), L64(0x3d4b9aabab96ab31), L64(0xd181f0cece1fce3e), L64(0x5522991111441188), + L64(0x8903838f8f068f0c), L64(0x6b9c044e4e254e4a), L64(0x517366b7b7e6b7d1), L64(0x60cbe0ebeb8beb0b), + L64(0xcc78c13c3cf03cfd), L64(0xbf1ffd81813e817c), L64(0xfe354094946a94d4), L64(0x0cf31cf7f7fbf7eb), + L64(0x676f18b9b9deb9a1), L64(0x5f268b13134c1398), L64(0x9c58512c2cb02c7d), L64(0xb8bb05d3d36bd3d6), + L64(0x5cd38ce7e7bbe76b), L64(0xcbdc396e6ea56e57), L64(0xf395aac4c437c46e), L64(0x0f061b03030c0318), + L64(0x13acdc565645568a), L64(0x49885e44440d441a), L64(0x9efea07f7fe17fdf), L64(0x374f88a9a99ea921), + L64(0x8254672a2aa82a4d), L64(0x6d6b0abbbbd6bbb1), L64(0xe29f87c1c123c146), L64(0x02a6f153535153a2), + L64(0x8ba572dcdc57dcae), L64(0x2716530b0b2c0b58), L64(0xd327019d9d4e9d9c), L64(0xc1d82b6c6cad6c47), + L64(0xf562a43131c43195), L64(0xb9e8f37474cd7487), L64(0x09f115f6f6fff6e3), L64(0x438c4c464605460a), + L64(0x2645a5acac8aac09), L64(0x970fb589891e893c), L64(0x4428b414145014a0), L64(0x42dfbae1e1a3e15b), + L64(0x4e2ca616165816b0), L64(0xd274f73a3ae83acd), L64(0xd0d2066969b9696f), L64(0x2d12410909240948), + L64(0xade0d77070dd70a7), L64(0x54716fb6b6e2b6d9), L64(0xb7bd1ed0d067d0ce), L64(0x7ec7d6eded93ed3b), + L64(0xdb85e2cccc17cc2e), L64(0x578468424215422a), L64(0xc22d2c98985a98b4), L64(0x0e55eda4a4aaa449), + L64(0x8850752828a0285d), L64(0x31b8865c5c6d5cda), L64(0x3fed6bf8f8c7f893), L64(0xa411c28686228644), +}; + +static const php_hash_uint64 C4[256] = { + L64(0xc07830d818186018), L64(0x05af462623238c23), L64(0x7ef991b8c6c63fc6), L64(0x136fcdfbe8e887e8), + L64(0x4ca113cb87872687), L64(0xa9626d11b8b8dab8), L64(0x0805020901010401), L64(0x426e9e0d4f4f214f), + L64(0xadee6c9b3636d836), L64(0x590451ffa6a6a2a6), L64(0xdebdb90cd2d26fd2), L64(0xfb06f70ef5f5f3f5), + L64(0xef80f2967979f979), L64(0x5fcede306f6fa16f), L64(0xfcef3f6d91917e91), L64(0xaa07a4f852525552), + L64(0x27fdc04760609d60), L64(0x89766535bcbccabc), L64(0xaccd2b379b9b569b), L64(0x048c018a8e8e028e), + L64(0x71155bd2a3a3b6a3), L64(0x603c186c0c0c300c), L64(0xff8af6847b7bf17b), L64(0xb5e16a803535d435), + L64(0xe8693af51d1d741d), L64(0x5347ddb3e0e0a7e0), L64(0xf6acb321d7d77bd7), L64(0x5eed999cc2c22fc2), + L64(0x6d965c432e2eb82e), L64(0x627a96294b4b314b), L64(0xa321e15dfefedffe), L64(0x8216aed557574157), + L64(0xa8412abd15155415), L64(0x9fb6eee87777c177), L64(0xa5eb6e923737dc37), L64(0x7b56d79ee5e5b3e5), + L64(0x8cd923139f9f469f), L64(0xd317fd23f0f0e7f0), L64(0x6a7f94204a4a354a), L64(0x9e95a944dada4fda), + L64(0xfa25b0a258587d58), L64(0x06ca8fcfc9c903c9), L64(0x558d527c2929a429), L64(0x5022145a0a0a280a), + L64(0xe14f7f50b1b1feb1), L64(0x691a5dc9a0a0baa0), L64(0x7fdad6146b6bb16b), L64(0x5cab17d985852e85), + L64(0x8173673cbdbdcebd), L64(0xd234ba8f5d5d695d), L64(0x8050209010104010), L64(0xf303f507f4f4f7f4), + L64(0x16c08bddcbcb0bcb), L64(0xedc67cd33e3ef83e), L64(0x28110a2d05051405), L64(0x1fe6ce7867678167), + L64(0x7353d597e4e4b7e4), L64(0x25bb4e0227279c27), L64(0x3258827341411941), L64(0x2c9d0ba78b8b168b), + L64(0x510153f6a7a7a6a7), L64(0xcf94fab27d7de97d), L64(0xdcfb374995956e95), L64(0x8e9fad56d8d847d8), + L64(0x8b30eb70fbfbcbfb), L64(0x2371c1cdeeee9fee), L64(0xc791f8bb7c7ced7c), L64(0x17e3cc7166668566), + L64(0xa68ea77bdddd53dd), L64(0xb84b2eaf17175c17), L64(0x02468e4547470147), L64(0x84dc211a9e9e429e), + L64(0x1ec589d4caca0fca), L64(0x75995a582d2db42d), L64(0x9179632ebfbfc6bf), L64(0x381b0e3f07071c07), + L64(0x012347acadad8ead), L64(0xea2fb4b05a5a755a), L64(0x6cb51bef83833683), L64(0x85ff66b63333cc33), + L64(0x3ff2c65c63639163), L64(0x100a041202020802), L64(0x39384993aaaa92aa), L64(0xafa8e2de7171d971), + L64(0x0ecf8dc6c8c807c8), L64(0xc87d32d119196419), L64(0x7270923b49493949), L64(0x869aaf5fd9d943d9), + L64(0xc31df931f2f2eff2), L64(0x4b48dba8e3e3abe3), L64(0xe22ab6b95b5b715b), L64(0x34920dbc88881a88), + L64(0xa4c8293e9a9a529a), L64(0x2dbe4c0b26269826), L64(0x8dfa64bf3232c832), L64(0xe94a7d59b0b0fab0), + L64(0x1b6acff2e9e983e9), L64(0x78331e770f0f3c0f), L64(0xe6a6b733d5d573d5), L64(0x74ba1df480803a80), + L64(0x997c6127bebec2be), L64(0x26de87ebcdcd13cd), L64(0xbde468893434d034), L64(0x7a75903248483d48), + L64(0xab24e354ffffdbff), L64(0xf78ff48d7a7af57a), L64(0xf4ea3d6490907a90), L64(0xc23ebe9d5f5f615f), + L64(0x1da0403d20208020), L64(0x67d5d00f6868bd68), L64(0xd07234ca1a1a681a), L64(0x192c41b7aeae82ae), + L64(0xc95e757db4b4eab4), L64(0x9a19a8ce54544d54), L64(0xece53b7f93937693), L64(0x0daa442f22228822), + L64(0x07e9c86364648d64), L64(0xdb12ff2af1f1e3f1), L64(0xbfa2e6cc7373d173), L64(0x905a248212124812), + L64(0x3a5d807a40401d40), L64(0x4028104808082008), L64(0x56e89b95c3c32bc3), L64(0x337bc5dfecec97ec), + L64(0x9690ab4ddbdb4bdb), L64(0x611f5fc0a1a1bea1), L64(0x1c8307918d8d0e8d), L64(0xf5c97ac83d3df43d), + L64(0xccf1335b97976697), L64(0x0000000000000000), L64(0x36d483f9cfcf1bcf), L64(0x4587566e2b2bac2b), + L64(0x97b3ece17676c576), L64(0x64b019e682823282), L64(0xfea9b128d6d67fd6), L64(0xd87736c31b1b6c1b), + L64(0xc15b7774b5b5eeb5), L64(0x112943beafaf86af), L64(0x77dfd41d6a6ab56a), L64(0xba0da0ea50505d50), + L64(0x124c8a5745450945), L64(0xcb18fb38f3f3ebf3), L64(0x9df060ad3030c030), L64(0x2b74c3c4efef9bef), + L64(0xe5c37eda3f3ffc3f), L64(0x921caac755554955), L64(0x791059dba2a2b2a2), L64(0x0365c9e9eaea8fea), + L64(0x0fecca6a65658965), L64(0xb9686903babad2ba), L64(0x65935e4a2f2fbc2f), L64(0x4ee79d8ec0c027c0), + L64(0xbe81a160dede5fde), L64(0xe06c38fc1c1c701c), L64(0xbb2ee746fdfdd3fd), L64(0x52649a1f4d4d294d), + L64(0xe4e0397692927292), L64(0x8fbceafa7575c975), L64(0x301e0c3606061806), L64(0x249809ae8a8a128a), + L64(0xf940794bb2b2f2b2), L64(0x6359d185e6e6bfe6), L64(0x70361c7e0e0e380e), L64(0xf8633ee71f1f7c1f), + L64(0x37f7c45562629562), L64(0xeea3b53ad4d477d4), L64(0x29324d81a8a89aa8), L64(0xc4f4315296966296), + L64(0x9b3aef62f9f9c3f9), L64(0x66f697a3c5c533c5), L64(0x35b14a1025259425), L64(0xf220b2ab59597959), + L64(0x54ae15d084842a84), L64(0xb7a7e4c57272d572), L64(0xd5dd72ec3939e439), L64(0x5a6198164c4c2d4c), + L64(0xca3bbc945e5e655e), L64(0xe785f09f7878fd78), L64(0xddd870e53838e038), L64(0x148605988c8c0a8c), + L64(0xc6b2bf17d1d163d1), L64(0x410b57e4a5a5aea5), L64(0x434dd9a1e2e2afe2), L64(0x2ff8c24e61619961), + L64(0xf1457b42b3b3f6b3), L64(0x15a5423421218421), L64(0x94d625089c9c4a9c), L64(0xf0663cee1e1e781e), + L64(0x2252866143431143), L64(0x76fc93b1c7c73bc7), L64(0xb32be54ffcfcd7fc), L64(0x2014082404041004), + L64(0xb208a2e351515951), L64(0xbcc72f2599995e99), L64(0x4fc4da226d6da96d), L64(0x68391a650d0d340d), + L64(0x8335e979fafacffa), L64(0xb684a369dfdf5bdf), L64(0xd79bfca97e7ee57e), L64(0x3db4481924249024), + L64(0xc5d776fe3b3bec3b), L64(0x313d4b9aabab96ab), L64(0x3ed181f0cece1fce), L64(0x8855229911114411), + L64(0x0c8903838f8f068f), L64(0x4a6b9c044e4e254e), L64(0xd1517366b7b7e6b7), L64(0x0b60cbe0ebeb8beb), + L64(0xfdcc78c13c3cf03c), L64(0x7cbf1ffd81813e81), L64(0xd4fe354094946a94), L64(0xeb0cf31cf7f7fbf7), + L64(0xa1676f18b9b9deb9), L64(0x985f268b13134c13), L64(0x7d9c58512c2cb02c), L64(0xd6b8bb05d3d36bd3), + L64(0x6b5cd38ce7e7bbe7), L64(0x57cbdc396e6ea56e), L64(0x6ef395aac4c437c4), L64(0x180f061b03030c03), + L64(0x8a13acdc56564556), L64(0x1a49885e44440d44), L64(0xdf9efea07f7fe17f), L64(0x21374f88a9a99ea9), + L64(0x4d8254672a2aa82a), L64(0xb16d6b0abbbbd6bb), L64(0x46e29f87c1c123c1), L64(0xa202a6f153535153), + L64(0xae8ba572dcdc57dc), L64(0x582716530b0b2c0b), L64(0x9cd327019d9d4e9d), L64(0x47c1d82b6c6cad6c), + L64(0x95f562a43131c431), L64(0x87b9e8f37474cd74), L64(0xe309f115f6f6fff6), L64(0x0a438c4c46460546), + L64(0x092645a5acac8aac), L64(0x3c970fb589891e89), L64(0xa04428b414145014), L64(0x5b42dfbae1e1a3e1), + L64(0xb04e2ca616165816), L64(0xcdd274f73a3ae83a), L64(0x6fd0d2066969b969), L64(0x482d124109092409), + L64(0xa7ade0d77070dd70), L64(0xd954716fb6b6e2b6), L64(0xceb7bd1ed0d067d0), L64(0x3b7ec7d6eded93ed), + L64(0x2edb85e2cccc17cc), L64(0x2a57846842421542), L64(0xb4c22d2c98985a98), L64(0x490e55eda4a4aaa4), + L64(0x5d8850752828a028), L64(0xda31b8865c5c6d5c), L64(0x933fed6bf8f8c7f8), L64(0x44a411c286862286), +}; + +static const php_hash_uint64 C5[256] = { + L64(0x18c07830d8181860), L64(0x2305af462623238c), L64(0xc67ef991b8c6c63f), L64(0xe8136fcdfbe8e887), + L64(0x874ca113cb878726), L64(0xb8a9626d11b8b8da), L64(0x0108050209010104), L64(0x4f426e9e0d4f4f21), + L64(0x36adee6c9b3636d8), L64(0xa6590451ffa6a6a2), L64(0xd2debdb90cd2d26f), L64(0xf5fb06f70ef5f5f3), + L64(0x79ef80f2967979f9), L64(0x6f5fcede306f6fa1), L64(0x91fcef3f6d91917e), L64(0x52aa07a4f8525255), + L64(0x6027fdc04760609d), L64(0xbc89766535bcbcca), L64(0x9baccd2b379b9b56), L64(0x8e048c018a8e8e02), + L64(0xa371155bd2a3a3b6), L64(0x0c603c186c0c0c30), L64(0x7bff8af6847b7bf1), L64(0x35b5e16a803535d4), + L64(0x1de8693af51d1d74), L64(0xe05347ddb3e0e0a7), L64(0xd7f6acb321d7d77b), L64(0xc25eed999cc2c22f), + L64(0x2e6d965c432e2eb8), L64(0x4b627a96294b4b31), L64(0xfea321e15dfefedf), L64(0x578216aed5575741), + L64(0x15a8412abd151554), L64(0x779fb6eee87777c1), L64(0x37a5eb6e923737dc), L64(0xe57b56d79ee5e5b3), + L64(0x9f8cd923139f9f46), L64(0xf0d317fd23f0f0e7), L64(0x4a6a7f94204a4a35), L64(0xda9e95a944dada4f), + L64(0x58fa25b0a258587d), L64(0xc906ca8fcfc9c903), L64(0x29558d527c2929a4), L64(0x0a5022145a0a0a28), + L64(0xb1e14f7f50b1b1fe), L64(0xa0691a5dc9a0a0ba), L64(0x6b7fdad6146b6bb1), L64(0x855cab17d985852e), + L64(0xbd8173673cbdbdce), L64(0x5dd234ba8f5d5d69), L64(0x1080502090101040), L64(0xf4f303f507f4f4f7), + L64(0xcb16c08bddcbcb0b), L64(0x3eedc67cd33e3ef8), L64(0x0528110a2d050514), L64(0x671fe6ce78676781), + L64(0xe47353d597e4e4b7), L64(0x2725bb4e0227279c), L64(0x4132588273414119), L64(0x8b2c9d0ba78b8b16), + L64(0xa7510153f6a7a7a6), L64(0x7dcf94fab27d7de9), L64(0x95dcfb374995956e), L64(0xd88e9fad56d8d847), + L64(0xfb8b30eb70fbfbcb), L64(0xee2371c1cdeeee9f), L64(0x7cc791f8bb7c7ced), L64(0x6617e3cc71666685), + L64(0xdda68ea77bdddd53), L64(0x17b84b2eaf17175c), L64(0x4702468e45474701), L64(0x9e84dc211a9e9e42), + L64(0xca1ec589d4caca0f), L64(0x2d75995a582d2db4), L64(0xbf9179632ebfbfc6), L64(0x07381b0e3f07071c), + L64(0xad012347acadad8e), L64(0x5aea2fb4b05a5a75), L64(0x836cb51bef838336), L64(0x3385ff66b63333cc), + L64(0x633ff2c65c636391), L64(0x02100a0412020208), L64(0xaa39384993aaaa92), L64(0x71afa8e2de7171d9), + L64(0xc80ecf8dc6c8c807), L64(0x19c87d32d1191964), L64(0x497270923b494939), L64(0xd9869aaf5fd9d943), + L64(0xf2c31df931f2f2ef), L64(0xe34b48dba8e3e3ab), L64(0x5be22ab6b95b5b71), L64(0x8834920dbc88881a), + L64(0x9aa4c8293e9a9a52), L64(0x262dbe4c0b262698), L64(0x328dfa64bf3232c8), L64(0xb0e94a7d59b0b0fa), + L64(0xe91b6acff2e9e983), L64(0x0f78331e770f0f3c), L64(0xd5e6a6b733d5d573), L64(0x8074ba1df480803a), + L64(0xbe997c6127bebec2), L64(0xcd26de87ebcdcd13), L64(0x34bde468893434d0), L64(0x487a75903248483d), + L64(0xffab24e354ffffdb), L64(0x7af78ff48d7a7af5), L64(0x90f4ea3d6490907a), L64(0x5fc23ebe9d5f5f61), + L64(0x201da0403d202080), L64(0x6867d5d00f6868bd), L64(0x1ad07234ca1a1a68), L64(0xae192c41b7aeae82), + L64(0xb4c95e757db4b4ea), L64(0x549a19a8ce54544d), L64(0x93ece53b7f939376), L64(0x220daa442f222288), + L64(0x6407e9c86364648d), L64(0xf1db12ff2af1f1e3), L64(0x73bfa2e6cc7373d1), L64(0x12905a2482121248), + L64(0x403a5d807a40401d), L64(0x0840281048080820), L64(0xc356e89b95c3c32b), L64(0xec337bc5dfecec97), + L64(0xdb9690ab4ddbdb4b), L64(0xa1611f5fc0a1a1be), L64(0x8d1c8307918d8d0e), L64(0x3df5c97ac83d3df4), + L64(0x97ccf1335b979766), L64(0x0000000000000000), L64(0xcf36d483f9cfcf1b), L64(0x2b4587566e2b2bac), + L64(0x7697b3ece17676c5), L64(0x8264b019e6828232), L64(0xd6fea9b128d6d67f), L64(0x1bd87736c31b1b6c), + L64(0xb5c15b7774b5b5ee), L64(0xaf112943beafaf86), L64(0x6a77dfd41d6a6ab5), L64(0x50ba0da0ea50505d), + L64(0x45124c8a57454509), L64(0xf3cb18fb38f3f3eb), L64(0x309df060ad3030c0), L64(0xef2b74c3c4efef9b), + L64(0x3fe5c37eda3f3ffc), L64(0x55921caac7555549), L64(0xa2791059dba2a2b2), L64(0xea0365c9e9eaea8f), + L64(0x650fecca6a656589), L64(0xbab9686903babad2), L64(0x2f65935e4a2f2fbc), L64(0xc04ee79d8ec0c027), + L64(0xdebe81a160dede5f), L64(0x1ce06c38fc1c1c70), L64(0xfdbb2ee746fdfdd3), L64(0x4d52649a1f4d4d29), + L64(0x92e4e03976929272), L64(0x758fbceafa7575c9), L64(0x06301e0c36060618), L64(0x8a249809ae8a8a12), + L64(0xb2f940794bb2b2f2), L64(0xe66359d185e6e6bf), L64(0x0e70361c7e0e0e38), L64(0x1ff8633ee71f1f7c), + L64(0x6237f7c455626295), L64(0xd4eea3b53ad4d477), L64(0xa829324d81a8a89a), L64(0x96c4f43152969662), + L64(0xf99b3aef62f9f9c3), L64(0xc566f697a3c5c533), L64(0x2535b14a10252594), L64(0x59f220b2ab595979), + L64(0x8454ae15d084842a), L64(0x72b7a7e4c57272d5), L64(0x39d5dd72ec3939e4), L64(0x4c5a6198164c4c2d), + L64(0x5eca3bbc945e5e65), L64(0x78e785f09f7878fd), L64(0x38ddd870e53838e0), L64(0x8c148605988c8c0a), + L64(0xd1c6b2bf17d1d163), L64(0xa5410b57e4a5a5ae), L64(0xe2434dd9a1e2e2af), L64(0x612ff8c24e616199), + L64(0xb3f1457b42b3b3f6), L64(0x2115a54234212184), L64(0x9c94d625089c9c4a), L64(0x1ef0663cee1e1e78), + L64(0x4322528661434311), L64(0xc776fc93b1c7c73b), L64(0xfcb32be54ffcfcd7), L64(0x0420140824040410), + L64(0x51b208a2e3515159), L64(0x99bcc72f2599995e), L64(0x6d4fc4da226d6da9), L64(0x0d68391a650d0d34), + L64(0xfa8335e979fafacf), L64(0xdfb684a369dfdf5b), L64(0x7ed79bfca97e7ee5), L64(0x243db44819242490), + L64(0x3bc5d776fe3b3bec), L64(0xab313d4b9aabab96), L64(0xce3ed181f0cece1f), L64(0x1188552299111144), + L64(0x8f0c8903838f8f06), L64(0x4e4a6b9c044e4e25), L64(0xb7d1517366b7b7e6), L64(0xeb0b60cbe0ebeb8b), + L64(0x3cfdcc78c13c3cf0), L64(0x817cbf1ffd81813e), L64(0x94d4fe354094946a), L64(0xf7eb0cf31cf7f7fb), + L64(0xb9a1676f18b9b9de), L64(0x13985f268b13134c), L64(0x2c7d9c58512c2cb0), L64(0xd3d6b8bb05d3d36b), + L64(0xe76b5cd38ce7e7bb), L64(0x6e57cbdc396e6ea5), L64(0xc46ef395aac4c437), L64(0x03180f061b03030c), + L64(0x568a13acdc565645), L64(0x441a49885e44440d), L64(0x7fdf9efea07f7fe1), L64(0xa921374f88a9a99e), + L64(0x2a4d8254672a2aa8), L64(0xbbb16d6b0abbbbd6), L64(0xc146e29f87c1c123), L64(0x53a202a6f1535351), + L64(0xdcae8ba572dcdc57), L64(0x0b582716530b0b2c), L64(0x9d9cd327019d9d4e), L64(0x6c47c1d82b6c6cad), + L64(0x3195f562a43131c4), L64(0x7487b9e8f37474cd), L64(0xf6e309f115f6f6ff), L64(0x460a438c4c464605), + L64(0xac092645a5acac8a), L64(0x893c970fb589891e), L64(0x14a04428b4141450), L64(0xe15b42dfbae1e1a3), + L64(0x16b04e2ca6161658), L64(0x3acdd274f73a3ae8), L64(0x696fd0d2066969b9), L64(0x09482d1241090924), + L64(0x70a7ade0d77070dd), L64(0xb6d954716fb6b6e2), L64(0xd0ceb7bd1ed0d067), L64(0xed3b7ec7d6eded93), + L64(0xcc2edb85e2cccc17), L64(0x422a578468424215), L64(0x98b4c22d2c98985a), L64(0xa4490e55eda4a4aa), + L64(0x285d8850752828a0), L64(0x5cda31b8865c5c6d), L64(0xf8933fed6bf8f8c7), L64(0x8644a411c2868622), +}; + +static const php_hash_uint64 C6[256] = { + L64(0x6018c07830d81818), L64(0x8c2305af46262323), L64(0x3fc67ef991b8c6c6), L64(0x87e8136fcdfbe8e8), + L64(0x26874ca113cb8787), L64(0xdab8a9626d11b8b8), L64(0x0401080502090101), L64(0x214f426e9e0d4f4f), + L64(0xd836adee6c9b3636), L64(0xa2a6590451ffa6a6), L64(0x6fd2debdb90cd2d2), L64(0xf3f5fb06f70ef5f5), + L64(0xf979ef80f2967979), L64(0xa16f5fcede306f6f), L64(0x7e91fcef3f6d9191), L64(0x5552aa07a4f85252), + L64(0x9d6027fdc0476060), L64(0xcabc89766535bcbc), L64(0x569baccd2b379b9b), L64(0x028e048c018a8e8e), + L64(0xb6a371155bd2a3a3), L64(0x300c603c186c0c0c), L64(0xf17bff8af6847b7b), L64(0xd435b5e16a803535), + L64(0x741de8693af51d1d), L64(0xa7e05347ddb3e0e0), L64(0x7bd7f6acb321d7d7), L64(0x2fc25eed999cc2c2), + L64(0xb82e6d965c432e2e), L64(0x314b627a96294b4b), L64(0xdffea321e15dfefe), L64(0x41578216aed55757), + L64(0x5415a8412abd1515), L64(0xc1779fb6eee87777), L64(0xdc37a5eb6e923737), L64(0xb3e57b56d79ee5e5), + L64(0x469f8cd923139f9f), L64(0xe7f0d317fd23f0f0), L64(0x354a6a7f94204a4a), L64(0x4fda9e95a944dada), + L64(0x7d58fa25b0a25858), L64(0x03c906ca8fcfc9c9), L64(0xa429558d527c2929), L64(0x280a5022145a0a0a), + L64(0xfeb1e14f7f50b1b1), L64(0xbaa0691a5dc9a0a0), L64(0xb16b7fdad6146b6b), L64(0x2e855cab17d98585), + L64(0xcebd8173673cbdbd), L64(0x695dd234ba8f5d5d), L64(0x4010805020901010), L64(0xf7f4f303f507f4f4), + L64(0x0bcb16c08bddcbcb), L64(0xf83eedc67cd33e3e), L64(0x140528110a2d0505), L64(0x81671fe6ce786767), + L64(0xb7e47353d597e4e4), L64(0x9c2725bb4e022727), L64(0x1941325882734141), L64(0x168b2c9d0ba78b8b), + L64(0xa6a7510153f6a7a7), L64(0xe97dcf94fab27d7d), L64(0x6e95dcfb37499595), L64(0x47d88e9fad56d8d8), + L64(0xcbfb8b30eb70fbfb), L64(0x9fee2371c1cdeeee), L64(0xed7cc791f8bb7c7c), L64(0x856617e3cc716666), + L64(0x53dda68ea77bdddd), L64(0x5c17b84b2eaf1717), L64(0x014702468e454747), L64(0x429e84dc211a9e9e), + L64(0x0fca1ec589d4caca), L64(0xb42d75995a582d2d), L64(0xc6bf9179632ebfbf), L64(0x1c07381b0e3f0707), + L64(0x8ead012347acadad), L64(0x755aea2fb4b05a5a), L64(0x36836cb51bef8383), L64(0xcc3385ff66b63333), + L64(0x91633ff2c65c6363), L64(0x0802100a04120202), L64(0x92aa39384993aaaa), L64(0xd971afa8e2de7171), + L64(0x07c80ecf8dc6c8c8), L64(0x6419c87d32d11919), L64(0x39497270923b4949), L64(0x43d9869aaf5fd9d9), + L64(0xeff2c31df931f2f2), L64(0xabe34b48dba8e3e3), L64(0x715be22ab6b95b5b), L64(0x1a8834920dbc8888), + L64(0x529aa4c8293e9a9a), L64(0x98262dbe4c0b2626), L64(0xc8328dfa64bf3232), L64(0xfab0e94a7d59b0b0), + L64(0x83e91b6acff2e9e9), L64(0x3c0f78331e770f0f), L64(0x73d5e6a6b733d5d5), L64(0x3a8074ba1df48080), + L64(0xc2be997c6127bebe), L64(0x13cd26de87ebcdcd), L64(0xd034bde468893434), L64(0x3d487a7590324848), + L64(0xdbffab24e354ffff), L64(0xf57af78ff48d7a7a), L64(0x7a90f4ea3d649090), L64(0x615fc23ebe9d5f5f), + L64(0x80201da0403d2020), L64(0xbd6867d5d00f6868), L64(0x681ad07234ca1a1a), L64(0x82ae192c41b7aeae), + L64(0xeab4c95e757db4b4), L64(0x4d549a19a8ce5454), L64(0x7693ece53b7f9393), L64(0x88220daa442f2222), + L64(0x8d6407e9c8636464), L64(0xe3f1db12ff2af1f1), L64(0xd173bfa2e6cc7373), L64(0x4812905a24821212), + L64(0x1d403a5d807a4040), L64(0x2008402810480808), L64(0x2bc356e89b95c3c3), L64(0x97ec337bc5dfecec), + L64(0x4bdb9690ab4ddbdb), L64(0xbea1611f5fc0a1a1), L64(0x0e8d1c8307918d8d), L64(0xf43df5c97ac83d3d), + L64(0x6697ccf1335b9797), L64(0x0000000000000000), L64(0x1bcf36d483f9cfcf), L64(0xac2b4587566e2b2b), + L64(0xc57697b3ece17676), L64(0x328264b019e68282), L64(0x7fd6fea9b128d6d6), L64(0x6c1bd87736c31b1b), + L64(0xeeb5c15b7774b5b5), L64(0x86af112943beafaf), L64(0xb56a77dfd41d6a6a), L64(0x5d50ba0da0ea5050), + L64(0x0945124c8a574545), L64(0xebf3cb18fb38f3f3), L64(0xc0309df060ad3030), L64(0x9bef2b74c3c4efef), + L64(0xfc3fe5c37eda3f3f), L64(0x4955921caac75555), L64(0xb2a2791059dba2a2), L64(0x8fea0365c9e9eaea), + L64(0x89650fecca6a6565), L64(0xd2bab9686903baba), L64(0xbc2f65935e4a2f2f), L64(0x27c04ee79d8ec0c0), + L64(0x5fdebe81a160dede), L64(0x701ce06c38fc1c1c), L64(0xd3fdbb2ee746fdfd), L64(0x294d52649a1f4d4d), + L64(0x7292e4e039769292), L64(0xc9758fbceafa7575), L64(0x1806301e0c360606), L64(0x128a249809ae8a8a), + L64(0xf2b2f940794bb2b2), L64(0xbfe66359d185e6e6), L64(0x380e70361c7e0e0e), L64(0x7c1ff8633ee71f1f), + L64(0x956237f7c4556262), L64(0x77d4eea3b53ad4d4), L64(0x9aa829324d81a8a8), L64(0x6296c4f431529696), + L64(0xc3f99b3aef62f9f9), L64(0x33c566f697a3c5c5), L64(0x942535b14a102525), L64(0x7959f220b2ab5959), + L64(0x2a8454ae15d08484), L64(0xd572b7a7e4c57272), L64(0xe439d5dd72ec3939), L64(0x2d4c5a6198164c4c), + L64(0x655eca3bbc945e5e), L64(0xfd78e785f09f7878), L64(0xe038ddd870e53838), L64(0x0a8c148605988c8c), + L64(0x63d1c6b2bf17d1d1), L64(0xaea5410b57e4a5a5), L64(0xafe2434dd9a1e2e2), L64(0x99612ff8c24e6161), + L64(0xf6b3f1457b42b3b3), L64(0x842115a542342121), L64(0x4a9c94d625089c9c), L64(0x781ef0663cee1e1e), + L64(0x1143225286614343), L64(0x3bc776fc93b1c7c7), L64(0xd7fcb32be54ffcfc), L64(0x1004201408240404), + L64(0x5951b208a2e35151), L64(0x5e99bcc72f259999), L64(0xa96d4fc4da226d6d), L64(0x340d68391a650d0d), + L64(0xcffa8335e979fafa), L64(0x5bdfb684a369dfdf), L64(0xe57ed79bfca97e7e), L64(0x90243db448192424), + L64(0xec3bc5d776fe3b3b), L64(0x96ab313d4b9aabab), L64(0x1fce3ed181f0cece), L64(0x4411885522991111), + L64(0x068f0c8903838f8f), L64(0x254e4a6b9c044e4e), L64(0xe6b7d1517366b7b7), L64(0x8beb0b60cbe0ebeb), + L64(0xf03cfdcc78c13c3c), L64(0x3e817cbf1ffd8181), L64(0x6a94d4fe35409494), L64(0xfbf7eb0cf31cf7f7), + L64(0xdeb9a1676f18b9b9), L64(0x4c13985f268b1313), L64(0xb02c7d9c58512c2c), L64(0x6bd3d6b8bb05d3d3), + L64(0xbbe76b5cd38ce7e7), L64(0xa56e57cbdc396e6e), L64(0x37c46ef395aac4c4), L64(0x0c03180f061b0303), + L64(0x45568a13acdc5656), L64(0x0d441a49885e4444), L64(0xe17fdf9efea07f7f), L64(0x9ea921374f88a9a9), + L64(0xa82a4d8254672a2a), L64(0xd6bbb16d6b0abbbb), L64(0x23c146e29f87c1c1), L64(0x5153a202a6f15353), + L64(0x57dcae8ba572dcdc), L64(0x2c0b582716530b0b), L64(0x4e9d9cd327019d9d), L64(0xad6c47c1d82b6c6c), + L64(0xc43195f562a43131), L64(0xcd7487b9e8f37474), L64(0xfff6e309f115f6f6), L64(0x05460a438c4c4646), + L64(0x8aac092645a5acac), L64(0x1e893c970fb58989), L64(0x5014a04428b41414), L64(0xa3e15b42dfbae1e1), + L64(0x5816b04e2ca61616), L64(0xe83acdd274f73a3a), L64(0xb9696fd0d2066969), L64(0x2409482d12410909), + L64(0xdd70a7ade0d77070), L64(0xe2b6d954716fb6b6), L64(0x67d0ceb7bd1ed0d0), L64(0x93ed3b7ec7d6eded), + L64(0x17cc2edb85e2cccc), L64(0x15422a5784684242), L64(0x5a98b4c22d2c9898), L64(0xaaa4490e55eda4a4), + L64(0xa0285d8850752828), L64(0x6d5cda31b8865c5c), L64(0xc7f8933fed6bf8f8), L64(0x228644a411c28686), +}; + +static const php_hash_uint64 C7[256] = { + L64(0x186018c07830d818), L64(0x238c2305af462623), L64(0xc63fc67ef991b8c6), L64(0xe887e8136fcdfbe8), + L64(0x8726874ca113cb87), L64(0xb8dab8a9626d11b8), L64(0x0104010805020901), L64(0x4f214f426e9e0d4f), + L64(0x36d836adee6c9b36), L64(0xa6a2a6590451ffa6), L64(0xd26fd2debdb90cd2), L64(0xf5f3f5fb06f70ef5), + L64(0x79f979ef80f29679), L64(0x6fa16f5fcede306f), L64(0x917e91fcef3f6d91), L64(0x525552aa07a4f852), + L64(0x609d6027fdc04760), L64(0xbccabc89766535bc), L64(0x9b569baccd2b379b), L64(0x8e028e048c018a8e), + L64(0xa3b6a371155bd2a3), L64(0x0c300c603c186c0c), L64(0x7bf17bff8af6847b), L64(0x35d435b5e16a8035), + L64(0x1d741de8693af51d), L64(0xe0a7e05347ddb3e0), L64(0xd77bd7f6acb321d7), L64(0xc22fc25eed999cc2), + L64(0x2eb82e6d965c432e), L64(0x4b314b627a96294b), L64(0xfedffea321e15dfe), L64(0x5741578216aed557), + L64(0x155415a8412abd15), L64(0x77c1779fb6eee877), L64(0x37dc37a5eb6e9237), L64(0xe5b3e57b56d79ee5), + L64(0x9f469f8cd923139f), L64(0xf0e7f0d317fd23f0), L64(0x4a354a6a7f94204a), L64(0xda4fda9e95a944da), + L64(0x587d58fa25b0a258), L64(0xc903c906ca8fcfc9), L64(0x29a429558d527c29), L64(0x0a280a5022145a0a), + L64(0xb1feb1e14f7f50b1), L64(0xa0baa0691a5dc9a0), L64(0x6bb16b7fdad6146b), L64(0x852e855cab17d985), + L64(0xbdcebd8173673cbd), L64(0x5d695dd234ba8f5d), L64(0x1040108050209010), L64(0xf4f7f4f303f507f4), + L64(0xcb0bcb16c08bddcb), L64(0x3ef83eedc67cd33e), L64(0x05140528110a2d05), L64(0x6781671fe6ce7867), + L64(0xe4b7e47353d597e4), L64(0x279c2725bb4e0227), L64(0x4119413258827341), L64(0x8b168b2c9d0ba78b), + L64(0xa7a6a7510153f6a7), L64(0x7de97dcf94fab27d), L64(0x956e95dcfb374995), L64(0xd847d88e9fad56d8), + L64(0xfbcbfb8b30eb70fb), L64(0xee9fee2371c1cdee), L64(0x7ced7cc791f8bb7c), L64(0x66856617e3cc7166), + L64(0xdd53dda68ea77bdd), L64(0x175c17b84b2eaf17), L64(0x47014702468e4547), L64(0x9e429e84dc211a9e), + L64(0xca0fca1ec589d4ca), L64(0x2db42d75995a582d), L64(0xbfc6bf9179632ebf), L64(0x071c07381b0e3f07), + L64(0xad8ead012347acad), L64(0x5a755aea2fb4b05a), L64(0x8336836cb51bef83), L64(0x33cc3385ff66b633), + L64(0x6391633ff2c65c63), L64(0x020802100a041202), L64(0xaa92aa39384993aa), L64(0x71d971afa8e2de71), + L64(0xc807c80ecf8dc6c8), L64(0x196419c87d32d119), L64(0x4939497270923b49), L64(0xd943d9869aaf5fd9), + L64(0xf2eff2c31df931f2), L64(0xe3abe34b48dba8e3), L64(0x5b715be22ab6b95b), L64(0x881a8834920dbc88), + L64(0x9a529aa4c8293e9a), L64(0x2698262dbe4c0b26), L64(0x32c8328dfa64bf32), L64(0xb0fab0e94a7d59b0), + L64(0xe983e91b6acff2e9), L64(0x0f3c0f78331e770f), L64(0xd573d5e6a6b733d5), L64(0x803a8074ba1df480), + L64(0xbec2be997c6127be), L64(0xcd13cd26de87ebcd), L64(0x34d034bde4688934), L64(0x483d487a75903248), + L64(0xffdbffab24e354ff), L64(0x7af57af78ff48d7a), L64(0x907a90f4ea3d6490), L64(0x5f615fc23ebe9d5f), + L64(0x2080201da0403d20), L64(0x68bd6867d5d00f68), L64(0x1a681ad07234ca1a), L64(0xae82ae192c41b7ae), + L64(0xb4eab4c95e757db4), L64(0x544d549a19a8ce54), L64(0x937693ece53b7f93), L64(0x2288220daa442f22), + L64(0x648d6407e9c86364), L64(0xf1e3f1db12ff2af1), L64(0x73d173bfa2e6cc73), L64(0x124812905a248212), + L64(0x401d403a5d807a40), L64(0x0820084028104808), L64(0xc32bc356e89b95c3), L64(0xec97ec337bc5dfec), + L64(0xdb4bdb9690ab4ddb), L64(0xa1bea1611f5fc0a1), L64(0x8d0e8d1c8307918d), L64(0x3df43df5c97ac83d), + L64(0x976697ccf1335b97), L64(0x0000000000000000), L64(0xcf1bcf36d483f9cf), L64(0x2bac2b4587566e2b), + L64(0x76c57697b3ece176), L64(0x82328264b019e682), L64(0xd67fd6fea9b128d6), L64(0x1b6c1bd87736c31b), + L64(0xb5eeb5c15b7774b5), L64(0xaf86af112943beaf), L64(0x6ab56a77dfd41d6a), L64(0x505d50ba0da0ea50), + L64(0x450945124c8a5745), L64(0xf3ebf3cb18fb38f3), L64(0x30c0309df060ad30), L64(0xef9bef2b74c3c4ef), + L64(0x3ffc3fe5c37eda3f), L64(0x554955921caac755), L64(0xa2b2a2791059dba2), L64(0xea8fea0365c9e9ea), + L64(0x6589650fecca6a65), L64(0xbad2bab9686903ba), L64(0x2fbc2f65935e4a2f), L64(0xc027c04ee79d8ec0), + L64(0xde5fdebe81a160de), L64(0x1c701ce06c38fc1c), L64(0xfdd3fdbb2ee746fd), L64(0x4d294d52649a1f4d), + L64(0x927292e4e0397692), L64(0x75c9758fbceafa75), L64(0x061806301e0c3606), L64(0x8a128a249809ae8a), + L64(0xb2f2b2f940794bb2), L64(0xe6bfe66359d185e6), L64(0x0e380e70361c7e0e), L64(0x1f7c1ff8633ee71f), + L64(0x62956237f7c45562), L64(0xd477d4eea3b53ad4), L64(0xa89aa829324d81a8), L64(0x966296c4f4315296), + L64(0xf9c3f99b3aef62f9), L64(0xc533c566f697a3c5), L64(0x25942535b14a1025), L64(0x597959f220b2ab59), + L64(0x842a8454ae15d084), L64(0x72d572b7a7e4c572), L64(0x39e439d5dd72ec39), L64(0x4c2d4c5a6198164c), + L64(0x5e655eca3bbc945e), L64(0x78fd78e785f09f78), L64(0x38e038ddd870e538), L64(0x8c0a8c148605988c), + L64(0xd163d1c6b2bf17d1), L64(0xa5aea5410b57e4a5), L64(0xe2afe2434dd9a1e2), L64(0x6199612ff8c24e61), + L64(0xb3f6b3f1457b42b3), L64(0x21842115a5423421), L64(0x9c4a9c94d625089c), L64(0x1e781ef0663cee1e), + L64(0x4311432252866143), L64(0xc73bc776fc93b1c7), L64(0xfcd7fcb32be54ffc), L64(0x0410042014082404), + L64(0x515951b208a2e351), L64(0x995e99bcc72f2599), L64(0x6da96d4fc4da226d), L64(0x0d340d68391a650d), + L64(0xfacffa8335e979fa), L64(0xdf5bdfb684a369df), L64(0x7ee57ed79bfca97e), L64(0x2490243db4481924), + L64(0x3bec3bc5d776fe3b), L64(0xab96ab313d4b9aab), L64(0xce1fce3ed181f0ce), L64(0x1144118855229911), + L64(0x8f068f0c8903838f), L64(0x4e254e4a6b9c044e), L64(0xb7e6b7d1517366b7), L64(0xeb8beb0b60cbe0eb), + L64(0x3cf03cfdcc78c13c), L64(0x813e817cbf1ffd81), L64(0x946a94d4fe354094), L64(0xf7fbf7eb0cf31cf7), + L64(0xb9deb9a1676f18b9), L64(0x134c13985f268b13), L64(0x2cb02c7d9c58512c), L64(0xd36bd3d6b8bb05d3), + L64(0xe7bbe76b5cd38ce7), L64(0x6ea56e57cbdc396e), L64(0xc437c46ef395aac4), L64(0x030c03180f061b03), + L64(0x5645568a13acdc56), L64(0x440d441a49885e44), L64(0x7fe17fdf9efea07f), L64(0xa99ea921374f88a9), + L64(0x2aa82a4d8254672a), L64(0xbbd6bbb16d6b0abb), L64(0xc123c146e29f87c1), L64(0x535153a202a6f153), + L64(0xdc57dcae8ba572dc), L64(0x0b2c0b582716530b), L64(0x9d4e9d9cd327019d), L64(0x6cad6c47c1d82b6c), + L64(0x31c43195f562a431), L64(0x74cd7487b9e8f374), L64(0xf6fff6e309f115f6), L64(0x4605460a438c4c46), + L64(0xac8aac092645a5ac), L64(0x891e893c970fb589), L64(0x145014a04428b414), L64(0xe1a3e15b42dfbae1), + L64(0x165816b04e2ca616), L64(0x3ae83acdd274f73a), L64(0x69b9696fd0d20669), L64(0x092409482d124109), + L64(0x70dd70a7ade0d770), L64(0xb6e2b6d954716fb6), L64(0xd067d0ceb7bd1ed0), L64(0xed93ed3b7ec7d6ed), + L64(0xcc17cc2edb85e2cc), L64(0x4215422a57846842), L64(0x985a98b4c22d2c98), L64(0xa4aaa4490e55eda4), + L64(0x28a0285d88507528), L64(0x5c6d5cda31b8865c), L64(0xf8c7f8933fed6bf8), L64(0x86228644a411c286), +}; + +#endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 + */ diff --git a/ext/hash/tests/adler32.phpt b/ext/hash/tests/adler32.phpt new file mode 100644 index 000000000..acfcc2b27 --- /dev/null +++ b/ext/hash/tests/adler32.phpt @@ -0,0 +1,22 @@ +--TEST-- +ADLER32 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +01000000 +62006200 +27014d02 +86057529 +200b8690 +0c15db8a +6910b697 diff --git a/ext/hash/tests/crc32.phpt b/ext/hash/tests/crc32.phpt new file mode 100644 index 000000000..c51209c60 --- /dev/null +++ b/ext/hash/tests/crc32.phpt @@ -0,0 +1,36 @@ +--TEST-- +CRC32 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +00000000 +6b9b9319 +73bb8c64 +5703c9bf +9693bf77 +882174a0 +96790816 +00000000 +43beb7e8 +c2412435 +7f9d1520 +bd50274c +d2e6c21f +724aa97c diff --git a/ext/hash/tests/gost.phpt b/ext/hash/tests/gost.phpt new file mode 100644 index 000000000..b800e112e --- /dev/null +++ b/ext/hash/tests/gost.phpt @@ -0,0 +1,20 @@ +--TEST-- +gost +--SKIPIF-- + +--FILE-- + +--EXPECT-- +ce85b99cc46752fffee35cab9a7b0278abb4c2d2055cff685af4912c49490f8d +77b7fa410c9ac58a25f49bca7d0468c9296529315eaca76bd1a10f376d1f4294 +a3ebc4daaab78b0be131dab5737a7f67e602670d543521319150d2e14eeec445 +03840d6348763f11e28e7b1ecc4da0cdf7f898fa555b928ef684c6c5b8f46d9f +fd1b746d9397e78edd311baef391450434271e02816caa37680d6d7381c79d4e +715e59cdc8ebde9fdf0fe2a2e811b3bf7f48209a01505e467d2cd2aa2bbb5ecf diff --git a/ext/hash/tests/haval.phpt b/ext/hash/tests/haval.phpt new file mode 100644 index 000000000..16db2fa69 --- /dev/null +++ b/ext/hash/tests/haval.phpt @@ -0,0 +1,76 @@ +--TEST-- +haval algorithm (multi-vector, multi-pass, multi-width) +--SKIPIF-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--FILE-- + +--EXPECT-- +8617f366566a011837f4fb4ba5bedea2b892f3ed8b894023d16ae344b2be5881 +674caa75f9d8fd2089856b95e93a4fb42fa6c8702f8980e11d97a142d76cb358 +94682bc46e5fbb8417e2f3e10ed360484048d946bb8cbb0ea4cad2700dbeaab0 +c54c602ac46383716ee7200a76c9c90a7b435bbe31d13f04e0b00a7ea5c347fa +7a8539c59e192e8d70b1ab82aa86a1b54560d42020bda4e00ddd6d048fe3bcaa diff --git a/ext/hash/tests/tiger.phpt b/ext/hash/tests/tiger.phpt new file mode 100644 index 000000000..ee3f249bf --- /dev/null +++ b/ext/hash/tests/tiger.phpt @@ -0,0 +1,18 @@ +--TEST-- +tiger +--SKIPIF-- + +--FILE-- + +--EXPECT-- +24f0130c63ac933216166e76b1bb925ff373de2d49584e7a +f258c1e88414ab2a527ab541ffc5b8bf935f7b951c132951 +8ee409a14e6066933b63d5b2abca63d71a78f55e29eb4649 +2586156d16bf9ab1e6e48bdf5e038f8053c30e071db3bcb0 +3ee8a9405396ddba1bc038508af4164ac1fe59ef58916a85 diff --git a/ext/hash/tests/whirlpool.phpt b/ext/hash/tests/whirlpool.phpt new file mode 100644 index 000000000..5f9dd164d --- /dev/null +++ b/ext/hash/tests/whirlpool.phpt @@ -0,0 +1,14 @@ +--TEST-- +whirlpool +--SKIPIF-- + +--FILE-- + +--EXPECT-- +19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3 +916ce6431d2f384be68d96bcaba800c21b82e9cc2f07076554c9557f85476b5d8f2b263951121fa955e34b31a4cdc857bdf076b123c2252543dcef34f84a7ef3 +b51984710d11893ac08e10529519f9801d82ea534629d14bc8c810307934496017ccdf23bfcb62c7e1259664e84c9388ff646b0b46688b0a6c32e5571234dd95 diff --git a/ext/hwapi/hwapi.cpp b/ext/hwapi/hwapi.cpp index 468d58b06..7058057ba 100644 --- a/ext/hwapi/hwapi.cpp +++ b/ext/hwapi/hwapi.cpp @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hwapi.cpp,v 1.12 2005/08/03 14:07:15 sniper Exp $ */ +/* $Id: hwapi.cpp,v 1.12.2.3 2006/01/01 12:50:07 sniper Exp $ */ #include #include @@ -67,7 +67,7 @@ static zend_class_entry *hw_api_reason_class_entry_ptr; //} //#endif -function_entry hwapi_functions[] = { +zend_function_entry hwapi_functions[] = { PHP_FE(hwapi_dummy, NULL) PHP_FE(hwapi_init, NULL) PHP_FE(hwapi_hgcsp, NULL) @@ -102,7 +102,7 @@ function_entry hwapi_functions[] = { {NULL, NULL, NULL} }; -static function_entry php_hw_api_functions[] = { +static zend_function_entry php_hw_api_functions[] = { {"hgcsp", PHP_FN(hwapi_hgcsp), NULL}, {"object", PHP_FN(hwapi_object), NULL}, {"children", PHP_FN(hwapi_children), NULL}, @@ -148,7 +148,7 @@ static function_entry php_hw_api_functions[] = { {NULL, NULL, NULL} }; -static function_entry php_hw_api_object_functions[] = { +static zend_function_entry php_hw_api_object_functions[] = { {"hw_api_object", PHP_FN(hwapi_object_new), NULL}, {"count", PHP_FN(hwapi_object_count), NULL}, {"title", PHP_FN(hwapi_object_title), NULL}, @@ -161,7 +161,7 @@ static function_entry php_hw_api_object_functions[] = { {NULL, NULL, NULL} }; -static function_entry php_hw_api_attribute_functions[] = { +static zend_function_entry php_hw_api_attribute_functions[] = { {"hw_api_attribute", PHP_FN(hwapi_attribute_new), NULL}, {"key", PHP_FN(hwapi_attribute_key), NULL}, {"value", PHP_FN(hwapi_attribute_value), NULL}, @@ -170,20 +170,20 @@ static function_entry php_hw_api_attribute_functions[] = { {NULL, NULL, NULL} }; -static function_entry php_hw_api_error_functions[] = { +static zend_function_entry php_hw_api_error_functions[] = { {"count", PHP_FN(hwapi_error_count), NULL}, {"reason", PHP_FN(hwapi_error_reason), NULL}, {NULL, NULL, NULL} }; -static function_entry php_hw_api_content_functions[] = { +static zend_function_entry php_hw_api_content_functions[] = { {"hw_api_content", PHP_FN(hwapi_content_new), NULL}, {"read", PHP_FN(hwapi_content_read), NULL}, {"mimetype", PHP_FN(hwapi_content_mimetype), NULL}, {NULL, NULL, NULL} }; -static function_entry php_hw_api_reason_functions[] = { +static zend_function_entry php_hw_api_reason_functions[] = { {"type", PHP_FN(hwapi_reason_type), NULL}, {"description", PHP_FN(hwapi_reason_description), NULL}, {NULL, NULL, NULL} @@ -310,7 +310,7 @@ static void print_hwapi_stringarray(const HW_API_StringArray& strings) { } } -static int stringArray2indexArray(pval **return_value, HW_API_StringArray *values) { +static int stringArray2indexArray(zval **return_value, HW_API_StringArray *values) { array_init(*return_value); for (int i=0; icount(); i++) { HW_API_String str; @@ -321,7 +321,7 @@ static int stringArray2indexArray(pval **return_value, HW_API_StringArray *value return 1; } -static int objectArray2indexArray(pval **return_value, HW_API_ObjectArray *objarr) { +static int objectArray2indexArray(zval **return_value, HW_API_ObjectArray *objarr) { array_init(*return_value); for(int i=0; icount(); i++) { @@ -2233,7 +2233,7 @@ PHP_MINFO_FUNCTION(hwapi) { /* {{{ proto bool hwapi_dummy(int link, int id, int msgid) Hyperwave dummy function */ PHP_FUNCTION(hwapi_dummy) { - pval **arg1, **arg2, **arg3; + zval **arg1, **arg2, **arg3; int link, id, type, msgid; RETURN_TRUE; @@ -2323,7 +2323,7 @@ PHP_FUNCTION(hwapi_hgcsp) { /* {{{ proto object hwapi_object(array object_in) */ PHP_FUNCTION(hwapi_object) { - pval **arg1, *rv, *id; + zval **arg1, *rv, *id; HW_API_Object *newobj; HW_API_object_In *in; HW_API_object_Out out; @@ -2562,7 +2562,7 @@ PHP_FUNCTION(hwapi_find) { /* {{{ proto bool hwapi_identify(array parameters) Hyperwave dummy function */ PHP_FUNCTION(hwapi_identify) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_identify_In *in; HW_API_identify_Out out; HW_API_HGCSP *db; @@ -2600,7 +2600,7 @@ PHP_FUNCTION(hwapi_identify) { /* {{{ proto bool hwapi_remove(array parameters) Remove an object */ PHP_FUNCTION(hwapi_remove) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_remove_In *in; HW_API_remove_Out out; HW_API_HGCSP *db; @@ -2638,7 +2638,7 @@ PHP_FUNCTION(hwapi_remove) { /* {{{ proto object hwapi_content(array parameters) Retrieve content of object */ PHP_FUNCTION(hwapi_content) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_content_In *in; HW_API_content_Out out; HW_API_HGCSP *db; @@ -2675,7 +2675,7 @@ PHP_FUNCTION(hwapi_content) { /* {{{ proto object hwapi_copy(array parameters) */ PHP_FUNCTION(hwapi_copy) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_copy_In *in; HW_API_copy_Out out; HW_API_HGCSP *db; @@ -2714,7 +2714,7 @@ PHP_FUNCTION(hwapi_copy) { /* {{{ proto bool hwapi_link(array parameters) Hyperwave dummy function */ PHP_FUNCTION(hwapi_link) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_link_In *in; HW_API_link_Out out; HW_API_HGCSP *db; @@ -2752,7 +2752,7 @@ PHP_FUNCTION(hwapi_link) { /* {{{ proto bool hwapi_move(array parameters) */ PHP_FUNCTION(hwapi_move) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_move_In *in; HW_API_move_Out out; HW_API_HGCSP *db; @@ -2790,7 +2790,7 @@ PHP_FUNCTION(hwapi_move) { /* {{{ proto bool hwapi_lock(array parameters) */ PHP_FUNCTION(hwapi_lock) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_lock_In *in; HW_API_lock_Out out; HW_API_HGCSP *db; @@ -2828,7 +2828,7 @@ PHP_FUNCTION(hwapi_lock) { /* {{{ proto bool hwapi_unlock(array parameters) */ PHP_FUNCTION(hwapi_unlock) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_unlock_In *in; HW_API_unlock_Out out; HW_API_HGCSP *db; @@ -2866,7 +2866,7 @@ PHP_FUNCTION(hwapi_unlock) { /* {{{ proto object hwapi_replace(array parameters) */ PHP_FUNCTION(hwapi_replace) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_replace_In *in; HW_API_replace_Out out; HW_API_HGCSP *db; @@ -2903,7 +2903,7 @@ PHP_FUNCTION(hwapi_replace) { /* {{{ proto object hwapi_insert(array parameters) */ PHP_FUNCTION(hwapi_insert) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_insert_In *in; HW_API_insert_Out out; HW_API_HGCSP *db; @@ -2940,7 +2940,7 @@ PHP_FUNCTION(hwapi_insert) { /* {{{ proto object hwapi_insertdocument(array parameters) */ PHP_FUNCTION(hwapi_insertdocument) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_insertDocument_In *in; HW_API_insertDocument_Out out; HW_API_HGCSP *db; @@ -2979,7 +2979,7 @@ PHP_FUNCTION(hwapi_insertdocument) { /* {{{ proto object hwapi_insertcollection(array parameters) */ PHP_FUNCTION(hwapi_insertcollection) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_insertCollection_In *in; HW_API_insertCollection_Out out; HW_API_HGCSP *db; @@ -3018,7 +3018,7 @@ PHP_FUNCTION(hwapi_insertcollection) { /* {{{ proto object hwapi_insertanchor(array parameters) */ PHP_FUNCTION(hwapi_insertanchor) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_insertAnchor_In *in; HW_API_insertAnchor_Out out; HW_API_HGCSP *db; @@ -3057,7 +3057,7 @@ PHP_FUNCTION(hwapi_insertanchor) { /* {{{ proto array hwapi_srcanchors(array parameters) */ PHP_FUNCTION(hwapi_srcanchors) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_srcAnchors_In *in; HW_API_srcAnchors_Out out; @@ -3098,7 +3098,7 @@ PHP_FUNCTION(hwapi_srcanchors) { /* {{{ proto array hwapi_dstanchors(array parameters) */ PHP_FUNCTION(hwapi_dstanchors) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_dstAnchors_In *in; HW_API_dstAnchors_Out out; @@ -3139,7 +3139,7 @@ PHP_FUNCTION(hwapi_dstanchors) { /* {{{ proto object hwapi_objectbyanchor(array parameters) */ PHP_FUNCTION(hwapi_objectbyanchor) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_objectByAnchor_In *in; HW_API_objectByAnchor_Out out; HW_API_HGCSP *db; @@ -3181,7 +3181,7 @@ PHP_FUNCTION(hwapi_objectbyanchor) { /* {{{ proto object hwapi_dstofsrcanchor(array parameters) */ PHP_FUNCTION(hwapi_dstofsrcanchor) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_dstOfSrcAnchor_In *in; HW_API_dstOfSrcAnchor_Out out; HW_API_HGCSP *db; @@ -3220,7 +3220,7 @@ PHP_FUNCTION(hwapi_dstofsrcanchor) { /* {{{ proto array hwapi_srcsofdst(array parameters) */ PHP_FUNCTION(hwapi_srcsofdst) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_srcsOfDst_In *in; HW_API_srcsOfDst_Out out; @@ -3261,7 +3261,7 @@ PHP_FUNCTION(hwapi_srcsofdst) { /* {{{ proto object hwapi_checkin(array parameters) Checking in a document */ PHP_FUNCTION(hwapi_checkin) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_checkIn_In *in; HW_API_checkIn_Out out; @@ -3302,7 +3302,7 @@ PHP_FUNCTION(hwapi_checkin) { /* {{{ proto object hwapi_checkout(array parameters) Checking out a document */ PHP_FUNCTION(hwapi_checkout) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_checkOut_In *in; HW_API_checkOut_Out out; @@ -3343,7 +3343,7 @@ PHP_FUNCTION(hwapi_checkout) { /* {{{ proto object hwapi_setcommittedversion(array parameters) setcommittedversion */ PHP_FUNCTION(hwapi_setcommittedversion) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_setCommittedVersion_In *in; HW_API_setCommittedVersion_Out out; @@ -3384,7 +3384,7 @@ PHP_FUNCTION(hwapi_setcommittedversion) { /* {{{ proto object hwapi_revert(array parameters) Reverting to a former document */ PHP_FUNCTION(hwapi_revert) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_revert_In *in; HW_API_revert_Out out; @@ -3425,7 +3425,7 @@ PHP_FUNCTION(hwapi_revert) { /* {{{ proto array hwapi_history(array parameters) history */ PHP_FUNCTION(hwapi_history) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_history_In *in; HW_API_history_Out out; @@ -3466,7 +3466,7 @@ PHP_FUNCTION(hwapi_history) { /* {{{ proto object hwapi_removeversion(array parameters) Reverting to a former document */ PHP_FUNCTION(hwapi_removeversion) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_removeVersion_In *in; HW_API_removeVersion_Out out; @@ -3507,7 +3507,7 @@ PHP_FUNCTION(hwapi_removeversion) { /* {{{ proto object hwapi_freeversion(array parameters) freeversion */ PHP_FUNCTION(hwapi_freeversion) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_freeVersion_In *in; HW_API_freeVersion_Out out; @@ -3589,7 +3589,7 @@ PHP_FUNCTION(hwapi_configurationhistory) { /* {{{ proto object hwapi_saveconfiguration(array parameters) Save configuration for an object */ PHP_FUNCTION(hwapi_saveconfiguration) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_saveConfiguration_In *in; HW_API_saveConfiguration_Out out; @@ -3630,7 +3630,7 @@ PHP_FUNCTION(hwapi_saveconfiguration) { /* {{{ proto object hwapi_restoreconfiguration(array parameters) Restore configuration for an object */ PHP_FUNCTION(hwapi_restoreconfiguration) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_restoreConfiguration_In *in; HW_API_restoreConfiguration_Out out; @@ -3670,7 +3670,7 @@ PHP_FUNCTION(hwapi_restoreconfiguration) { /* {{{ proto object hwapi_mergeconfiguration(array parameters) Merge configuration for an object */ PHP_FUNCTION(hwapi_mergeconfiguration) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_mergeConfiguration_In *in; HW_API_mergeConfiguration_Out out; @@ -3710,7 +3710,7 @@ PHP_FUNCTION(hwapi_mergeconfiguration) { /* {{{ proto object hwapi_removeconfiguration(array parameters) Removes configuration */ PHP_FUNCTION(hwapi_removeconfiguration) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ObjectArray objarr; HW_API_removeConfiguration_In *in; HW_API_removeConfiguration_Out out; @@ -3751,7 +3751,7 @@ PHP_FUNCTION(hwapi_removeconfiguration) { /* {{{ proto object hwapi_user(array parameters) Returns information about user */ PHP_FUNCTION(hwapi_user) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_user_In *in; HW_API_user_Out out; HW_API_HGCSP *db; @@ -3856,7 +3856,7 @@ PHP_FUNCTION(hwapi_userlist) { /* {{{ proto object hwapi_hwstat(array parameters) Returns information about hgserver */ PHP_FUNCTION(hwapi_hwstat) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_hwStat_In *in; HW_API_hwStat_Out out; HW_API_HGCSP *db; @@ -3906,7 +3906,7 @@ PHP_FUNCTION(hwapi_hwstat) { /* {{{ proto object hwapi_dcstat(array parameters) Returns information about hgserver */ PHP_FUNCTION(hwapi_dcstat) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_dcStat_In *in; HW_API_dcStat_Out out; HW_API_HGCSP *db; @@ -3956,7 +3956,7 @@ PHP_FUNCTION(hwapi_dcstat) { /* {{{ proto object hwapi_dbstat(array parameters) Returns information about hgserver */ PHP_FUNCTION(hwapi_dbstat) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_dbStat_In *in; HW_API_dbStat_Out out; HW_API_HGCSP *db; @@ -4006,7 +4006,7 @@ PHP_FUNCTION(hwapi_dbstat) { /* {{{ proto object hwapi_ftstat(array parameters) Returns information about ftserver */ PHP_FUNCTION(hwapi_ftstat) { - pval **arg1, *id, *rv; + zval **arg1, *id, *rv; HW_API_ftStat_In *in; HW_API_ftStat_Out out; HW_API_HGCSP *db; @@ -4056,7 +4056,7 @@ PHP_FUNCTION(hwapi_ftstat) { /* {{{ proto array hwapi_info(array parameters) Returns information about server */ PHP_FUNCTION(hwapi_info) { - pval **arg1, *id, *rv, *rv1, *rv2, *rv3; + zval **arg1, *id, *rv, *rv1, *rv2, *rv3; HW_API_info_In *in; HW_API_info_Out out; HW_API_HGCSP *db; @@ -4124,7 +4124,7 @@ PHP_FUNCTION(hwapi_info) { /* {{{ proto object hwapi_object_new() Creates new HW_API_Object */ PHP_FUNCTION(hwapi_object_new) { - pval **arg1, **arg2, *rv; + zval **arg1, **arg2, *rv; HW_API_Object *obj; const HW_API_Object *srcobj; int ret; @@ -4144,7 +4144,7 @@ PHP_FUNCTION(hwapi_object_new) { } rv = php_hwapi_object_new(obj, le_hwapi_objectp); -//zend_print_pval_r(rv, 0); +//zend_print_zval_r(rv, 0); SEPARATE_ZVAL(&rv); *return_value = *rv; FREE_ZVAL(rv); @@ -4710,8 +4710,8 @@ PHP_FUNCTION(hwapi_reason_description) { /* hw_api_class_get_property(zend_property_reference *property_reference) {{{ * */ -pval hw_api_class_get_property(zend_property_reference *property_reference) { - pval result; +zval hw_api_class_get_property(zend_property_reference *property_reference) { + zval result; zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4736,7 +4736,7 @@ pval hw_api_class_get_property(zend_property_reference *property_reference) { printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } Z_STRVAL(result) = estrndup("testing", 7); @@ -4746,9 +4746,9 @@ pval hw_api_class_get_property(zend_property_reference *property_reference) { } /* }}} */ -/* hw_api_class_set_property(zend_property_reference *property_reference, pval *value) {{{ +/* hw_api_class_set_property(zend_property_reference *property_reference, zval *value) {{{ */ -int hw_api_class_set_property(zend_property_reference *property_reference, pval *value) { +int hw_api_class_set_property(zend_property_reference *property_reference, zval *value) { zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4775,7 +4775,7 @@ int hw_api_class_set_property(zend_property_reference *property_reference, pval printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } return 0; @@ -4798,8 +4798,8 @@ void hw_api_class_startup() { /* hw_api_object_class_get_property(zend_property_reference *property_reference) {{{ */ -pval hw_api_object_class_get_property(zend_property_reference *property_reference) { - pval result; +zval hw_api_object_class_get_property(zend_property_reference *property_reference) { + zval result; zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4824,7 +4824,7 @@ pval hw_api_object_class_get_property(zend_property_reference *property_referenc printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } Z_STRVAL(result) = estrndup("testing", 7); @@ -4834,9 +4834,9 @@ pval hw_api_object_class_get_property(zend_property_reference *property_referenc } /* }}} */ -/* hw_api_object_class_set_property(zend_property_reference *property_reference, pval *value) {{{ +/* hw_api_object_class_set_property(zend_property_reference *property_reference, zval *value) {{{ */ -int hw_api_object_class_set_property(zend_property_reference *property_reference, pval *value) { +int hw_api_object_class_set_property(zend_property_reference *property_reference, zval *value) { zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4863,7 +4863,7 @@ int hw_api_object_class_set_property(zend_property_reference *property_reference printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } return 0; @@ -4886,8 +4886,8 @@ void hw_api_object_class_startup() { /* hw_api_attribute_class_get_property(zend_property_reference *property_reference) {{{ */ -pval hw_api_attribute_class_get_property(zend_property_reference *property_reference) { - pval result; +zval hw_api_attribute_class_get_property(zend_property_reference *property_reference) { + zval result; zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4911,7 +4911,7 @@ pval hw_api_attribute_class_get_property(zend_property_reference *property_refer printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } Z_STRVAL(result) = estrndup("testing", 7); @@ -4921,9 +4921,9 @@ pval hw_api_attribute_class_get_property(zend_property_reference *property_refer } /* }}} */ -/* hw_api_attribute_class_set_property(zend_property_reference *property_reference, pval *value) {{{ +/* hw_api_attribute_class_set_property(zend_property_reference *property_reference, zval *value) {{{ */ -int hw_api_attribute_class_set_property(zend_property_reference *property_reference, pval *value) { +int hw_api_attribute_class_set_property(zend_property_reference *property_reference, zval *value) { zend_overloaded_element *overloaded_property; zend_llist_element *element; @@ -4950,7 +4950,7 @@ int hw_api_attribute_class_set_property(zend_property_reference *property_refere printf("'%s'\n", Z_STRVAL(overloaded_property->element)); break; } - pval_destructor(&overloaded_property->element); + zval_dtor(&overloaded_property->element); } return 0; diff --git a/ext/hwapi/php_hwapi.h b/ext/hwapi/php_hwapi.h index 64070cafe..6c698c6dd 100644 --- a/ext/hwapi/php_hwapi.h +++ b/ext/hwapi/php_hwapi.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hwapi.h,v 1.4 2005/08/03 14:07:15 sniper Exp $ */ +/* $Id: php_hwapi.h,v 1.4.2.1 2006/01/01 12:50:07 sniper Exp $ */ #ifndef PHP_HWAPI_H #define PHP_HWAPI_H diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 7400c507f..d2a25eca4 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.33.2.2 2005/10/13 19:28:58 sniper Exp $ +dnl $Id: config.m4,v 1.33.2.4 2006/01/03 13:25:06 sniper Exp $ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -14,9 +14,6 @@ if test "$PHP_ICONV" != "no"; then ]) if test "$iconv_avail" != "no"; then - iconv_cflags_save="$CFLAGS" - iconv_ldflags_save="$LDFLAGS" - if test -z "$ICONV_DIR"; then for i in /usr/local /usr; do if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then @@ -40,46 +37,55 @@ if test "$PHP_ICONV" != "no"; then PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" fi - if test -z "$iconv_lib_name"; then - AC_MSG_CHECKING([if iconv is glibc's]) - AC_TRY_LINK([#include ],[gnu_get_libc_version();], + AC_MSG_CHECKING([if iconv is glibc's]) + AC_TRY_LINK([#include ],[gnu_get_libc_version();], + [ + AC_MSG_RESULT(yes) + iconv_impl_name="glibc" + ],[ + AC_MSG_RESULT(no) + ]) + + if test -z "$iconv_impl_name"; then + AC_MSG_CHECKING([if using GNU libiconv]) + php_iconv_old_ld="$LDFLAGS" + LDFLAGS="-liconv $LDFLAGS" + AC_TRY_RUN([ +#include <$PHP_ICONV_H_PATH> +int main() { + printf("%d", _libiconv_version); + return 0; +} + ],[ + AC_MSG_RESULT(yes) + iconv_impl_name="gnu_libiconv" + ],[ + AC_MSG_RESULT(no) + LDFLAGS="$php_iconv_old_ld" + ]) + fi + + if test -z "$iconv_impl_name"; then + AC_MSG_CHECKING([if iconv is Konstantin Chuguev's]) + AC_TRY_LINK([#include ],[iconv_ccs_init(NULL, NULL);], [ AC_MSG_RESULT(yes) - iconv_impl_name="glibc" + iconv_impl_name="bsd" ],[ AC_MSG_RESULT(no) ]) - else - case "$iconv_lib_name" in - iconv [)] - AC_MSG_CHECKING([if iconv is Konstantin Chuguev's]) - AC_TRY_LINK([#include ],[iconv_ccs_init(NULL, NULL);], - [ - AC_MSG_RESULT(yes) - iconv_impl_name="bsd" - ],[ - AC_MSG_RESULT(no) - iconv_impl_name="gnu_libiconv" - ]) - ;; - - giconv [)] - iconv_impl_name="gnu_libiconv" - ;; - - biconv [)] - iconv_impl_name="bsd" - ;; - esac - fi + fi echo > ext/iconv/php_have_bsd_iconv.h echo > ext/iconv/php_have_glibc_iconv.h + echo > ext/iconv/php_have_libiconv.h case "$iconv_impl_name" in gnu_libiconv [)] PHP_DEFINE([PHP_ICONV_IMPL],[\"libiconv\"],[ext/iconv]) AC_DEFINE([PHP_ICONV_IMPL],["libiconv"],[Which iconv implementation to use]) + PHP_DEFINE([HAVE_LIBICONV],1,[ext/iconv]) + PHP_ADD_LIBRARY_WITH_PATH(iconv, "$PHP_ICONV_PREFIX/$PHP_LIBDIR", ICONV_SHARED_LIBADD) ;; bsd [)] @@ -141,9 +147,6 @@ int main() { AC_MSG_RESULT([no]) ]) - CFLAGS="$iconv_cflags_save" - LDFLAGS="$iconv_ldflags_save" - PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"]) PHP_SUBST(ICONV_SHARED_LIBADD) PHP_INSTALL_HEADERS([ext/iconv/]) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 4710f34f3..b6494d45f 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c,v 1.124.2.2 2005/10/20 16:51:03 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.124.2.5 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -64,7 +64,7 @@ /* {{{ iconv_functions[] */ -function_entry iconv_functions[] = { +zend_function_entry iconv_functions[] = { PHP_NAMED_FE(iconv,php_if_iconv, NULL) PHP_FE(ob_iconv_handler, NULL) PHP_FE(iconv_get_encoding, NULL) @@ -1366,7 +1366,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st if (cd == (iconv_t)(-1)) { if ((mode & PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR)) { - err = _php_iconv_appendl(pretval, encoded_word, (size_t)((p1 + 1) - encoded_word), cd); + err = _php_iconv_appendl(pretval, encoded_word, (size_t)((p1 + 1) - encoded_word), cd_pl); if (err != PHP_ICONV_ERR_SUCCESS) { goto out; } diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 9310e3825..b6149471d 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Revision: 1.28 $ */ +/* $Revision: 1.28.2.1 $ */ #ifndef PHP_ICONV_H #define PHP_ICONV_H diff --git a/ext/iconv/tests/iconv003.phpt b/ext/iconv/tests/iconv003.phpt index 9fcfe4b0c..9642cf1e7 100644 --- a/ext/iconv/tests/iconv003.phpt +++ b/ext/iconv/tests/iconv003.phpt @@ -1,5 +1,7 @@ --TEST-- iconv() test 3 +--SKIPIF-- + --FILE-- --FILE-- --INI-- iconv.internal_charset=iso-8859-1 diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 50f4cf41d..8c9841add 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.208.2.1 2005/08/30 22:03:28 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.208.2.4 2006/01/05 00:47:16 iliaa Exp $ */ #define IMAP41 @@ -79,7 +79,7 @@ void *fs_get(size_t size); /* {{{ imap_functions[] */ -function_entry imap_functions[] = { +zend_function_entry imap_functions[] = { PHP_FE(imap_open, NULL) PHP_FE(imap_reopen, NULL) PHP_FE(imap_close, NULL) @@ -2837,9 +2837,10 @@ PHP_FUNCTION(imap_mail_compose) char *cookie = NIL; ENVELOPE *env; BODY *bod=NULL, *topbod=NULL; - PART *mypart=NULL, *toppart=NULL, *part; + PART *mypart=NULL, *part; PARAMETER *param, *disp_param = NULL, *custom_headers_param = NULL, *tmp_param = NULL; char tmp[8 * MAILTMPLEN], *mystring=NULL, *t=NULL, *tempstring=NULL; + int toppart = 0; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &envelope, &body) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); @@ -2922,7 +2923,6 @@ PHP_FUNCTION(imap_mail_compose) php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter cannot be empty"); RETURN_FALSE; } - zend_hash_get_current_key(Z_ARRVAL_PP(body), &key, &ind, 0); /* FIXME: is this necessary? we're not using key/ind */ if (Z_TYPE_PP(data) == IS_ARRAY) { bod = mail_newbody(); @@ -3022,23 +3022,28 @@ PHP_FUNCTION(imap_mail_compose) zend_hash_move_forward(Z_ARRVAL_PP(body)); while (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) == SUCCESS) { - zend_hash_get_current_key(Z_ARRVAL_PP(body), &key, &ind, 0); /* FIXME: Is this necessary? We're not using key/ind */ if (Z_TYPE_PP(data) == IS_ARRAY) { + short type = -1; + if (zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &pvalue)== SUCCESS) { + convert_to_long_ex(pvalue); + type = (short) Z_LVAL_PP(pvalue); + } + if (!toppart) { bod->nested.part = mail_newbody_part(); mypart = bod->nested.part; - toppart = mypart; - bod=&mypart->body; + toppart = 1; } else { - mypart->next = mail_newbody_part(); - mypart = mypart->next; - bod = &mypart->body; + mypart->next = mail_newbody_part(); + mypart = mypart->next; } - if (zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &pvalue)== SUCCESS) { - convert_to_long_ex(pvalue); - bod->type = (short) Z_LVAL_PP(pvalue); - } + bod = &mypart->body; + + if (type != TYPEMULTIPART) { + bod->type = type; + } + if (zend_hash_find(Z_ARRVAL_PP(data), "encoding", sizeof("encoding"), (void **) &pvalue)== SUCCESS) { convert_to_long_ex(pvalue); bod->encoding = (short) Z_LVAL_PP(pvalue); @@ -3135,12 +3140,6 @@ PHP_FUNCTION(imap_mail_compose) goto done; } - if (bod && bod->type == TYPEMULTIPART && (!bod->nested.part || !bod->nested.part->next)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot generate multipart e-mail without components."); - RETVAL_FALSE; - goto done; - } - rfc822_encode_body_7bit(env, topbod); rfc822_header (tmp, env, topbod); diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h index 504620660..f29ba4af4 100644 --- a/ext/imap/php_imap.h +++ b/ext/imap/php_imap.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_imap.h,v 1.32 2005/08/03 14:07:17 sniper Exp $ */ +/* $Id: php_imap.h,v 1.32.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H diff --git a/ext/imap/tests/bug35669.phpt b/ext/imap/tests/bug35669.phpt new file mode 100644 index 000000000..1cc4e702b --- /dev/null +++ b/ext/imap/tests/bug35669.phpt @@ -0,0 +1,68 @@ +--TEST-- +Bug #35669 (imap_mail_compose() crashes with multipart-multiboundary-email) +--SKIPIF-- + +--FILE-- +'; + $envelope["to"] = 'The bad smurf '; + $envelope['date'] = 'Wed, 04 Jan 2006 19:24:43 -0500'; + + $multipart["type"] = TYPEMULTIPART; + $multipart["subtype"] = "MIXED"; + $body[] = $multipart; //add multipart stuff + + $textpart["type"] = TYPEMULTIPART; + $textpart["subtype"] = "ALTERNATIVE"; + $body[] = $textpart; //add body part + + $plain["type"] = TYPETEXT; + $plain["subtype"] = "PLAIN"; + $plain["charset"] = "iso-8859-1"; + $plain["encoding"] = ENCQUOTEDPRINTABLE; + $plain["description"] = "Plaintype part of message"; + $plain['disposition'] = "inline"; + $plain["contents.data"] = 'See mom, it will crash'; + + $body[] = $plain; //next add plain text part + + $html["type"] = TYPETEXT; + $html["subtype"] = "HTML"; + $html["charset"] = "iso-8859-1"; + $html["encoding"] = ENCQUOTEDPRINTABLE; + $html["description"] = "HTML part of message"; + $html['disposition'] = "inline"; + $html["contents.data"] = 'See mom, it will crash'; + + $body[] = $html; + + echo imap_mail_compose($envelope, $body); +?> +--EXPECTF-- +Date: Wed, 04 Jan 2006 19:24:43 -0500 +From: Santa +To: The bad smurf +MIME-Version: 1.0 +Content-Type: MULTIPART/MIXED; BOUNDARY="%s" + +--%s +Content-Type: TEXT/ALTERNATIVE; CHARSET=US-ASCII + + +--%s +Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1 +Content-Transfer-Encoding: QUOTED-PRINTABLE +Content-Description: Plaintype part of message + +See mom, it will crash +--%s +Content-Type: TEXT/HTML; CHARSET=iso-8859-1 +Content-Transfer-Encoding: QUOTED-PRINTABLE +Content-Description: HTML part of message + +See mom, it will crash +--%s-- diff --git a/ext/informix/ifx.ec b/ext/informix/ifx.ec index 4d58abdd4..b949ca933 100644 --- a/ext/informix/ifx.ec +++ b/ext/informix/ifx.ec @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ifx.ec,v 1.109 2005/08/03 14:07:17 sniper Exp $ */ +/* $Id: ifx.ec,v 1.109.2.3 2006/01/01 12:50:08 sniper Exp $ */ /* ------------------------------------------------------------------- * if you want a function reference : "grep '^\*\*' ifx.ec" will give @@ -140,7 +140,7 @@ typedef char IFX[128]; } \ } while (0) -function_entry ifx_functions[] = { +zend_function_entry ifx_functions[] = { PHP_FE(ifx_connect, NULL) PHP_FE(ifx_pconnect, NULL) PHP_FE(ifx_close, NULL) @@ -527,11 +527,11 @@ EXEC SQL END DECLARE SECTION; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void **) &le) == FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (IFXG(max_links) != -1 && IFXG(num_links) >= IFXG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", IFXG(num_links)); @@ -564,7 +564,7 @@ EXEC SQL END DECLARE SECTION; /* hash it up */ new_le.type = le_plink; new_le.ptr = ifx; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &new_le, sizeof(list_entry), NULL) == FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { free(ifx); efree(hashed_details); RETURN_FALSE; @@ -596,7 +596,7 @@ EXEC SQL END DECLARE SECTION; } ZEND_REGISTER_RESOURCE(return_value, ifx, le_plink); } else { /* non persistent */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual ifx link sits. @@ -670,7 +670,7 @@ EXEC SQL END DECLARE SECTION; /* add it to the hash */ new_index_ptr.ptr = (void *) return_value->value.lval; new_index_ptr.type = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &new_index_ptr, sizeof(list_entry), NULL) == FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1, (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { efree(hashed_details); RETURN_FALSE; } diff --git a/ext/informix/php_informix.h b/ext/informix/php_informix.h index 43eb8fab2..93fcd84fa 100644 --- a/ext/informix/php_informix.h +++ b/ext/informix/php_informix.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_informix.h,v 1.23 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: php_informix.h,v 1.23.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_INFORMIX_H #define PHP_INFORMIX_H diff --git a/ext/informix/php_informix_includes.h b/ext/informix/php_informix_includes.h index bf061c4c4..9d734e5d3 100644 --- a/ext/informix/php_informix_includes.h +++ b/ext/informix/php_informix_includes.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_informix_includes.h,v 1.7 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: php_informix_includes.h,v 1.7.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_INFORMIX_INCLUDES_H #define PHP_INFORMIX_INCLUDES_H diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c index 6de200107..4054c92c1 100644 --- a/ext/interbase/ibase_blobs.c +++ b/ext/interbase/ibase_blobs.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_blobs.c,v 1.9 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: ibase_blobs.c,v 1.9.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c index beff8cec8..47be9f24c 100644 --- a/ext/interbase/ibase_events.c +++ b/ext/interbase/ibase_events.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_events.c,v 1.8 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: ibase_events.c,v 1.8.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index e7518039d..79c27b24e 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_query.c,v 1.23 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: ibase_query.c,v 1.23.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c index 289267945..517f366ab 100644 --- a/ext/interbase/ibase_service.c +++ b/ext/interbase/ibase_service.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_service.c,v 1.11.2.1 2005/10/13 12:58:48 tony2001 Exp $ */ +/* $Id: ibase_service.c,v 1.11.2.2 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 6226e9db9..8bf92a6a0 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c,v 1.225 2005/08/03 14:07:19 sniper Exp $ */ +/* $Id: interbase.c,v 1.225.2.4 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ #define RETAIN 2 /* {{{ extension definition structures */ -function_entry ibase_functions[] = { +zend_function_entry ibase_functions[] = { PHP_FE(ibase_connect, NULL) PHP_FE(ibase_pconnect, NULL) PHP_FE(ibase_close, NULL) @@ -616,7 +616,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* int i, len[] = { 0, 0, 0, 0, 0 }; long largs[] = { 0, 0, 0 }; PHP_MD5_CTX hash_context; - list_entry new_index_ptr, *le; + zend_rsrc_list_entry new_index_ptr, *le; isc_db_handle db_handle = NULL; ibase_db_link *ib_link; @@ -715,7 +715,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link)); ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link); } else { - list_entry new_le; + zend_rsrc_list_entry new_le; ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); @@ -723,7 +723,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* Z_TYPE(new_le) = le_plink; new_le.ptr = ib_link; if (FAILURE == zend_hash_update(&EG(persistent_list), hash, sizeof(hash), - (void *) &new_le, sizeof(list_entry), NULL)) { + (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)) { free(ib_link); RETURN_FALSE; } @@ -742,7 +742,7 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; if (FAILURE == zend_hash_update(&EG(regular_list), hash, sizeof(hash), - (void *) &new_index_ptr, sizeof(list_entry), NULL)) { + (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)) { RETURN_FALSE; } zend_list_addref(IBG(default_link) = Z_LVAL_P(return_value)); diff --git a/ext/interbase/interbase.rc b/ext/interbase/interbase.rc index 6063d2392..16bd6a966 100644 --- a/ext/interbase/interbase.rc +++ b/ext/interbase/interbase.rc @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.rc,v 1.7 2005/08/03 14:07:22 sniper Exp $ */ +/* $Id: interbase.rc,v 1.7.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifdef APSTUDIO_INVOKED #error This file cannot be opened from the Visual Studio IDE diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h index 953078ce6..803ef47ba 100755 --- a/ext/interbase/php_ibase_includes.h +++ b/ext/interbase/php_ibase_includes.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_includes.h,v 1.16 2005/08/03 14:07:22 sniper Exp $ */ +/* $Id: php_ibase_includes.h,v 1.16.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_IBASE_INCLUDES_H #define PHP_IBASE_INCLUDES_H diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c index 5704fbd95..cb34947e0 100644 --- a/ext/interbase/php_ibase_udf.c +++ b/ext/interbase/php_ibase_udf.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_udf.c,v 1.9 2005/08/03 14:07:22 sniper Exp $ */ +/* $Id: php_ibase_udf.c,v 1.9.2.1 2006/01/01 12:50:08 sniper Exp $ */ /** * This UDF library adds the ability to call PHP functions from SQL diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index 04dce3a93..abf38ba48 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_interbase.h,v 1.71 2005/08/03 14:07:22 sniper Exp $ */ +/* $Id: php_interbase.h,v 1.71.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_INTERBASE_H #define PHP_INTERBASE_H diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index fed8557b6..9a39f65aa 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c,v 1.161 2005/08/03 14:07:22 sniper Exp $ */ +/* $Id: ldap.c,v 1.161.2.3 2006/01/01 12:50:08 sniper Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -97,7 +97,7 @@ static int le_link, le_result, le_result_entry, le_ber_entry; */ /* {{{ ldap_functions[] */ -function_entry ldap_functions[] = { +zend_function_entry ldap_functions[] = { PHP_FE(ldap_connect, NULL) PHP_FALIAS(ldap_close, ldap_unbind, NULL) PHP_FE(ldap_bind, NULL) @@ -314,7 +314,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,v 1.161 2005/08/03 14:07:22 sniper Exp $"); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.161.2.3 2006/01/01 12:50:08 sniper Exp $"); if (LDAPG(max_links) == -1) { snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links)); @@ -525,8 +525,9 @@ static php_ldap_bictx *_php_sasl_setdefs(LDAP *ld, char *sasl_mech, char *sasl_r return ctx; } +/* }}} */ -/* {{{ _php_sasl_setdefs +/* {{{ _php_sasl_freedefs */ static void _php_sasl_freedefs(php_ldap_bictx *ctx) { @@ -537,6 +538,7 @@ static void _php_sasl_freedefs(php_ldap_bictx *ctx) if (ctx->authzid) ber_memfree(ctx->authzid); ber_memfree(ctx); } +/* }}} */ /* {{{ _php_sasl_interact Internal interact function for SASL */ @@ -569,6 +571,7 @@ static int _php_sasl_interact(LDAP *ld, unsigned flags, void *defaults, void *in } return LDAP_SUCCESS; } +/* }}} */ /* {{{ proto bool ldap_sasl_bind(resource link [, string binddn, string password, string sasl_mech, string sasl_realm, string sasl_authz_id, string props]) Bind to LDAP directory using SASL */ diff --git a/ext/ldap/php_ldap.h b/ext/ldap/php_ldap.h index c4dea3d23..b12181833 100644 --- a/ext/ldap/php_ldap.h +++ b/ext/ldap/php_ldap.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ldap.h,v 1.32 2005/08/03 14:07:23 sniper Exp $ */ +/* $Id: php_ldap.h,v 1.32.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_LDAP_H #define PHP_LDAP_H diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 2d57931a1..d974f1272 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: libxml.c,v 1.32.2.5 2005/11/17 21:56:04 rasmus Exp $ */ +/* $Id: libxml.c,v 1.32.2.7 2006/01/01 12:50:08 sniper Exp $ */ #define IS_EXT_MODULE @@ -87,7 +87,7 @@ PHP_MINFO_FUNCTION(libxml); /* }}} */ /* {{{ extension definition structures */ -function_entry libxml_functions[] = { +zend_function_entry libxml_functions[] = { PHP_FE(libxml_set_streams_context, NULL) PHP_FE(libxml_use_internal_errors, NULL) PHP_FE(libxml_get_last_error, NULL) diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 5accb2b24..65a7ef186 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_libxml.h,v 1.15.2.1 2005/09/08 10:37:57 rrichards Exp $ */ +/* $Id: php_libxml.h,v 1.15.2.2 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_LIBXML_H #define PHP_LIBXML_H diff --git a/ext/libxml/php_libxml2.def b/ext/libxml/php_libxml2.def index 0dd470afc..f1998c320 100644 --- a/ext/libxml/php_libxml2.def +++ b/ext/libxml/php_libxml2.def @@ -1,1571 +1,1542 @@ -EXPORTS -__docbDefaultSAXHandler -__htmlDefaultSAXHandler -__oldXMLWDcompatibility -__xmlBufferAllocScheme -__xmlDefaultBufferSize -__xmlDefaultSAXHandler -__xmlDefaultSAXLocator -__xmlDeregisterNodeDefaultValue -__xmlDoValidityCheckingDefaultValue -xmlFree DATA -__xmlGenericError -__xmlGenericErrorContext -__xmlGetWarningsDefaultValue -__xmlIndentTreeOutput -xmlIsBaseCharGroup DATA -xmlIsCharGroup DATA -xmlIsCombiningGroup DATA -xmlIsDigitGroup DATA -xmlIsExtenderGroup DATA -xmlIsIdeographicGroup DATA -xmlIsPubidChar_tab DATA -__xmlKeepBlanksDefaultValue -xmlLastError DATA -__xmlLineNumbersDefaultValue -__xmlLoadExtDtdDefaultValue -xmlMalloc DATA -xmlMallocAtomic DATA -xmlMemStrdup DATA -__xmlParserDebugEntities -xmlParserMaxDepth DATA -__xmlParserVersion -__xmlPedanticParserDefaultValue -xmlRealloc DATA -__xmlRegisterNodeDefaultValue -__xmlSaveNoEmptyTags -xmlStringComment DATA -xmlStringText DATA -xmlStringTextNoenc DATA -xmlStructuredError DATA -__xmlSubstituteEntitiesDefaultValue -__xmlTreeIndentString -xmlXPathNAN DATA -xmlXPathNINF DATA -xmlXPathPINF DATA -UTF8ToHtml -UTF8Toisolat1 -attribute -attributeDecl -cdataBlock -characters -checkNamespace -comment -docbCreateFileParserCtxt -docbCreatePushParserCtxt -docbDefaultSAXHandlerInit -docbEncodeEntities -docbFreeParserCtxt -docbParseChunk -docbParseDoc -docbParseDocument -docbParseFile -docbSAXParseDoc -docbSAXParseFile -elementDecl -endDocument -endElement -entityDecl -externalSubset -getColumnNumber -getEntity -getLineNumber -getNamespace -getParameterEntity -getPublicId -getSystemId -globalNamespace -hasExternalSubset -hasInternalSubset -htmlAttrAllowed -htmlAutoCloseTag -htmlCreateFileParserCtxt -htmlCreateMemoryParserCtxt -htmlCreatePushParserCtxt -htmlCtxtReadDoc -htmlCtxtReadFd -htmlCtxtReadFile -htmlCtxtReadIO -htmlCtxtReadMemory -htmlCtxtReset -htmlCtxtUseOptions -htmlDefaultSAXHandlerInit -htmlDocContentDumpFormatOutput -htmlDocContentDumpOutput -htmlDocDump -htmlDocDumpMemory -htmlElementAllowedHere -htmlElementStatusHere -htmlEncodeEntities -htmlEntityLookup -htmlEntityValueLookup -htmlFreeParserCtxt -htmlGetMetaEncoding -htmlHandleOmittedElem -htmlInitAutoClose -htmlIsAutoClosed -htmlIsBooleanAttr -htmlIsScriptAttribute -htmlNewDoc -htmlNewDocNoDtD -htmlNodeDump -htmlNodeDumpFile -htmlNodeDumpFileFormat -htmlNodeDumpFormatOutput -htmlNodeDumpOutput -htmlNodeStatus -htmlParseCharRef -htmlParseChunk -htmlParseDoc -htmlParseDocument -htmlParseElement -htmlParseEntityRef -htmlParseFile -htmlReadDoc -htmlReadFd -htmlReadFile -htmlReadIO -htmlReadMemory -htmlSAXParseDoc -htmlSAXParseFile -htmlSaveFile -htmlSaveFileEnc -htmlSaveFileFormat -htmlSetMetaEncoding -htmlTagLookup -ignorableWhitespace -initGenericErrorDefaultFunc -initdocbDefaultSAXHandler -inithtmlDefaultSAXHandler -initxmlDefaultSAXHandler -inputPop -inputPush -internalSubset -isStandalone -isolat1ToUTF8 -namePop -namePush -namespaceDecl -nodePop -nodePush -notationDecl -processingInstruction -reference -resolveEntity -setDocumentLocator -setNamespace -startDocument -startElement -unparsedEntityDecl -valuePop -valuePush -xmlACatalogAdd -xmlACatalogDump -xmlACatalogRemove -xmlACatalogResolve -xmlACatalogResolvePublic -xmlACatalogResolveSystem -xmlACatalogResolveURI -xmlAddAttributeDecl -xmlAddChild -xmlAddChildList -xmlAddDocEntity -xmlAddDtdEntity -xmlAddElementDecl -xmlAddEncodingAlias -xmlAddID -xmlAddNextSibling -xmlAddNotationDecl -xmlAddPrevSibling -xmlAddRef -xmlAddSibling -xmlAllocOutputBuffer -xmlAllocParserInputBuffer -xmlAttrSerializeTxtContent -xmlAutomataCompile -xmlAutomataGetInitState -xmlAutomataIsDeterminist -xmlAutomataNewAllTrans -xmlAutomataNewCountTrans -xmlAutomataNewCountedTrans -xmlAutomataNewCounter -xmlAutomataNewCounterTrans -xmlAutomataNewEpsilon -xmlAutomataNewOnceTrans -xmlAutomataNewState -xmlAutomataNewTransition -xmlAutomataNewTransition2 -xmlAutomataSetFinalState -xmlBoolToText -xmlBufferAdd -xmlBufferAddHead -xmlBufferCCat -xmlBufferCat -xmlBufferContent -xmlBufferCreate -xmlBufferCreateSize -xmlBufferCreateStatic -xmlBufferDump -xmlBufferEmpty -xmlBufferFree -xmlBufferGrow -xmlBufferLength -xmlBufferResize -xmlBufferSetAllocationScheme -xmlBufferShrink -xmlBufferWriteCHAR -xmlBufferWriteChar -xmlBufferWriteQuotedString -xmlBuildQName -xmlBuildURI -xmlByteConsumed -xmlC14NDocDumpMemory -xmlC14NDocSave -xmlC14NDocSaveTo -xmlC14NExecute -xmlCanonicPath -xmlCatalogAdd -xmlCatalogAddLocal -xmlCatalogCleanup -xmlCatalogConvert -xmlCatalogDump -xmlCatalogFreeLocal -xmlCatalogGetDefaults -xmlCatalogGetPublic -xmlCatalogGetSystem -xmlCatalogIsEmpty -xmlCatalogLocalResolve -xmlCatalogLocalResolveURI -xmlCatalogRemove -xmlCatalogResolve -xmlCatalogResolvePublic -xmlCatalogResolveSystem -xmlCatalogResolveURI -xmlCatalogSetDebug -xmlCatalogSetDefaultPrefer -xmlCatalogSetDefaults -xmlCharEncCloseFunc -xmlCharEncFirstLine -xmlCharEncInFunc -xmlCharEncOutFunc -xmlCharInRange -xmlCharStrdup -xmlCharStrndup -xmlCheckFilename -xmlCheckHTTPInput -xmlCheckLanguageID -xmlCheckUTF8 -xmlCheckVersion -xmlCleanupCharEncodingHandlers -xmlCleanupEncodingAliases -xmlCleanupGlobals -xmlCleanupInputCallbacks -xmlCleanupMemory -xmlCleanupOutputCallbacks -xmlCleanupParser -xmlCleanupPredefinedEntities -xmlCleanupThreads -xmlClearNodeInfoSeq -xmlClearParserCtxt -xmlConvertSGMLCatalog -xmlCopyAttributeTable -xmlCopyChar -xmlCopyCharMultiByte -xmlCopyDoc -xmlCopyDtd -xmlCopyElementContent -xmlCopyElementTable -xmlCopyEntitiesTable -xmlCopyEnumeration -xmlCopyError -xmlCopyNamespace -xmlCopyNamespaceList -xmlCopyNode -xmlCopyNodeList -xmlCopyNotationTable -xmlCopyProp -xmlCopyPropList -xmlCreateDocParserCtxt -xmlCreateEntitiesTable -xmlCreateEntityParserCtxt -xmlCreateEnumeration -xmlCreateFileParserCtxt -xmlCreateIOParserCtxt -xmlCreateIntSubset -xmlCreateMemoryParserCtxt -xmlCreatePushParserCtxt -xmlCreateURI -xmlCreateURLParserCtxt -xmlCtxtGetLastError -xmlCtxtReadDoc -xmlCtxtReadFd -xmlCtxtReadFile -xmlCtxtReadIO -xmlCtxtReadMemory -xmlCtxtReset -xmlCtxtResetLastError -xmlCtxtResetPush -xmlCtxtUseOptions -xmlCurrentChar -xmlDictCreate -xmlDictCreateSub -xmlDictFree -xmlDictLookup -xmlDictOwns -xmlDictQLookup -xmlDictReference -xmlDictSize -xmlDebugDumpAttr -xmlDebugDumpAttrList -xmlDebugDumpDTD -xmlDebugDumpDocument -xmlDebugDumpDocumentHead -xmlDebugDumpEntities -xmlDebugDumpNode -xmlDebugDumpNodeList -xmlDebugDumpOneNode -xmlDebugDumpString -xmlDecodeEntities -xmlDefaultSAXHandlerInit -xmlDelEncodingAlias -xmlDeregisterNodeDefault -xmlDetectCharEncoding -xmlDictCreate -xmlDictCreateSub -xmlDictFree -xmlDictLookup -xmlDictOwns -xmlDictQLookup -xmlDictReference -xmlDictSize -xmlDocCopyNode -xmlDocDump -xmlDocDumpFormatMemory -xmlDocDumpFormatMemoryEnc -xmlDocDumpMemory -xmlDocDumpMemoryEnc -xmlDocFormatDump -xmlDocGetRootElement -xmlDocSetRootElement -xmlDumpAttributeDecl -xmlDumpAttributeTable -xmlDumpElementDecl -xmlDumpElementTable -xmlDumpEntitiesTable -xmlDumpEntityDecl -xmlDumpNotationDecl -xmlDumpNotationTable -xmlElemDump -xmlEncodeEntities -xmlEncodeEntitiesReentrant -xmlEncodeSpecialChars -xmlErrMemory -xmlFileClose -xmlFileMatch -xmlFileOpen -xmlFileRead -xmlFindCharEncodingHandler -xmlFreeAttributeTable -xmlFreeAutomata -xmlFreeCatalog -xmlFreeDoc -xmlFreeDtd -xmlFreeElementContent -xmlFreeElementTable -xmlFreeEntitiesTable -xmlFreeEnumeration -xmlFreeIDTable -xmlFreeInputStream -xmlFreeMutex -xmlFreeNode -xmlFreeNodeList -xmlFreeNotationTable -xmlFreeNs -xmlFreeNsList -xmlFreeParserCtxt -xmlFreeParserInputBuffer -xmlFreePattern -xmlFreePatternList -xmlFreeProp -xmlFreePropList -xmlFreeRMutex -xmlFreeRefTable -xmlFreeTextReader -xmlFreeTextWriter -xmlFreeURI -xmlFreeValidCtxt -xmlGcMemGet -xmlGcMemSetup -xmlGetBufferAllocationScheme -xmlGetCharEncodingHandler -xmlGetCharEncodingName -xmlGetCompressMode -xmlGetDocCompressMode -xmlGetDocEntity -xmlGetDtdAttrDesc -xmlGetDtdElementDesc -xmlGetDtdEntity -xmlGetDtdNotationDesc -xmlGetDtdQAttrDesc -xmlGetDtdQElementDesc -xmlGetEncodingAlias -xmlGetExternalEntityLoader -xmlGetFeature -xmlGetFeaturesList -xmlGetGlobalState -xmlGetID -xmlGetIntSubset -xmlGetLastChild -xmlGetLastError -xmlGetLineNo -xmlGetNoNsProp -xmlGetNodePath -xmlGetNsList -xmlGetNsProp -xmlGetParameterEntity -xmlGetPredefinedEntity -xmlGetProp -xmlGetRefs -xmlGetThreadId -xmlGetUTF8Char -xmlHandleEntity -xmlHasNsProp -xmlHasProp -xmlHashAddEntry -xmlHashAddEntry2 -xmlHashAddEntry3 -xmlHashCopy -xmlHashCreate -xmlHashFree -xmlHashLookup -xmlHashLookup2 -xmlHashLookup3 -xmlHashQLookup -xmlHashQLookup2 -xmlHashQLookup3 -xmlHashRemoveEntry -xmlHashRemoveEntry2 -xmlHashRemoveEntry3 -xmlHashScan -xmlHashScan3 -xmlHashScanFull -xmlHashScanFull3 -xmlHashSize -xmlHashUpdateEntry -xmlHashUpdateEntry2 -xmlHashUpdateEntry3 -xmlIOFTPClose -xmlIOFTPMatch -xmlIOFTPOpen -xmlIOFTPRead -xmlIOHTTPClose -xmlIOHTTPMatch -xmlIOHTTPOpen -xmlIOHTTPOpenW -xmlIOHTTPRead -xmlIOParseDTD -xmlInitCharEncodingHandlers -xmlInitGlobals -xmlInitMemory -xmlInitNodeInfoSeq -xmlInitParser -xmlInitParserCtxt -xmlInitThreads -xmlInitializeCatalog -xmlInitializeGlobalState -xmlInitializePredefinedEntities -xmlIsBaseChar -xmlIsBlank -xmlIsBlankNode -xmlIsChar -xmlIsCombining -xmlIsDigit -xmlIsExtender -xmlIsID -xmlIsIdeographic -xmlIsLetter -xmlIsMainThread -xmlIsMixedElement -xmlIsPubidChar -xmlIsRef -xmlIsXHTML -xmlIsBaseCharGroup DATA -xmlIsCharGroup DATA -xmlIsCombiningGroup DATA -xmlIsDigitGroup DATA -xmlIsExtenderGroup DATA -xmlIsIdeographicGroup DATA -xmlKeepBlanksDefault -xmlLineNumbersDefault -xmlLinkGetData -xmlListAppend -xmlListClear -xmlListCopy -xmlListCreate -xmlListDelete -xmlListDup -xmlListEmpty -xmlListEnd -xmlListFront -xmlListInsert -xmlListMerge -xmlListPopBack -xmlListPopFront -xmlListPushBack -xmlListPushFront -xmlListRemoveAll -xmlListRemoveFirst -xmlListRemoveLast -xmlListReverse -xmlListReverseSearch -xmlListReverseWalk -xmlListSearch -xmlListSize -xmlListSort -xmlListWalk -xmlLoadACatalog -xmlLoadCatalog -xmlLoadCatalogs -xmlLoadExternalEntity -xmlLoadSGMLSuperCatalog -xmlLockLibrary -xmlLsCountNode -xmlLsOneNode -xmlMallocAtomicLoc -xmlMallocLoc -xmlMemDisplay -xmlMemFree -xmlMemGet -xmlMemMalloc -xmlMemRealloc -xmlMemSetup -xmlMemShow -xmlMemStrdupLoc -xmlMemUsed -xmlMemoryDump -xmlMemoryStrdup -xmlMutexLock -xmlMutexUnlock -xmlNamespaceParseNCName -xmlNamespaceParseNSDef -xmlNamespaceParseQName -xmlNanoFTPCheckResponse -xmlNanoFTPCleanup -xmlNanoFTPClose -xmlNanoFTPCloseConnection -xmlNanoFTPConnect -xmlNanoFTPConnectTo -xmlNanoFTPCwd -xmlNanoFTPDele -xmlNanoFTPFreeCtxt -xmlNanoFTPGet -xmlNanoFTPGetConnection -xmlNanoFTPGetResponse -xmlNanoFTPGetSocket -xmlNanoFTPInit -xmlNanoFTPList -xmlNanoFTPNewCtxt -xmlNanoFTPOpen -xmlNanoFTPProxy -xmlNanoFTPQuit -xmlNanoFTPRead -xmlNanoFTPScanProxy -xmlNanoFTPUpdateURL -xmlNanoHTTPAuthHeader -xmlNanoHTTPCleanup -xmlNanoHTTPClose -xmlNanoHTTPEncoding -xmlNanoHTTPFetch -xmlNanoHTTPInit -xmlNanoHTTPMethod -xmlNanoHTTPMethodRedir -xmlNanoHTTPMimeType -xmlNanoHTTPOpen -xmlNanoHTTPOpenRedir -xmlNanoHTTPRead -xmlNanoHTTPRedir -xmlNanoHTTPReturnCode -xmlNanoHTTPSave -xmlNanoHTTPScanProxy -xmlNewAutomata -xmlNewCDataBlock -xmlNewCatalog -xmlNewCharEncodingHandler -xmlNewCharRef -xmlNewChild -xmlNewComment -xmlNewDoc -xmlNewDocComment -xmlNewDocFragment -xmlNewDocNode -xmlNewDocNodeEatName -xmlNewDocProp -xmlNewDocRawNode -xmlNewDocText -xmlNewDocTextLen -xmlNewDtd -xmlNewElementContent -xmlNewEntityInputStream -xmlNewGlobalNs -xmlNewIOInputStream -xmlNewInputFromFile -xmlNewInputStream -xmlNewMutex -xmlNewNode -xmlNewNodeEatName -xmlNewNs -xmlNewNsProp -xmlNewNsPropEatName -xmlNewPI -xmlNewParserCtxt -xmlNewProp -xmlNewRMutex -xmlNewReference -xmlNewStringInputStream -xmlNewText -xmlNewTextChild -xmlNewTextLen -xmlNewTextReader -xmlNewTextReaderFilename -xmlNewTextWriter -xmlNewTextWriterDoc -xmlNewTextWriterFilename -xmlNewTextWriterMemory -xmlNewTextWriterPushParser -xmlNewTextWriterTree -xmlNewValidCtxt -xmlNextChar -xmlNoNetExternalEntityLoader -xmlNodeAddContent -xmlNodeAddContentLen -xmlNodeBufGetContent -xmlNodeDump -xmlNodeDumpOutput -xmlNodeGetBase -xmlNodeGetContent -xmlNodeGetLang -xmlNodeGetSpacePreserve -xmlNodeIsText -xmlNodeListGetRawString -xmlNodeListGetString -xmlNodeSetBase -xmlNodeSetContent -xmlNodeSetContentLen -xmlNodeSetLang -xmlNodeSetName -xmlNodeSetSpacePreserve -xmlNormalizeURIPath -xmlNormalizeWindowsPath -xmlOutputBufferClose -xmlOutputBufferCreateFd -xmlOutputBufferCreateFile -xmlOutputBufferCreateFilename -xmlOutputBufferCreateIO -xmlOutputBufferFlush -xmlOutputBufferWrite -xmlOutputBufferWriteString -xmlParseAttValue -xmlParseAttribute -xmlParseAttributeListDecl -xmlParseAttributeType -xmlParseBalancedChunkMemory -xmlParseBalancedChunkMemoryRecover -xmlParseCDSect -xmlParseCatalogFile -xmlParseCharData -xmlParseCharEncoding -xmlParseCharRef -xmlParseChunk -xmlParseComment -xmlParseContent -xmlParseCtxtExternalEntity -xmlParseDTD -xmlParseDefaultDecl -xmlParseDoc -xmlParseDocTypeDecl -xmlParseDocument -xmlParseElement -xmlParseElementChildrenContentDecl -xmlParseElementContentDecl -xmlParseElementDecl -xmlParseElementMixedContentDecl -xmlParseEncName -xmlParseEncodingDecl -xmlParseEndTag -xmlParseEntity -xmlParseEntityDecl -xmlParseEntityRef -xmlParseEntityValue -xmlParseEnumeratedType -xmlParseEnumerationType -xmlParseExtParsedEnt -xmlParseExternalEntity -xmlParseExternalID -xmlParseExternalSubset -xmlParseFile -xmlParseMarkupDecl -xmlParseMemory -xmlParseMisc -xmlParseName -xmlParseNamespace -xmlParseNmtoken -xmlParseNotationDecl -xmlParseNotationType -xmlParsePEReference -xmlParsePI -xmlParsePITarget -xmlParsePubidLiteral -xmlParseQuotedString -xmlParseReference -xmlParseSDDecl -xmlParseStartTag -xmlParseSystemLiteral -xmlParseTextDecl -xmlParseURI -xmlParseURIReference -xmlParseVersionInfo -xmlParseVersionNum -xmlParseXMLDecl -xmlParserAddNodeInfo -xmlParserError -xmlParserFindNodeInfo -xmlParserFindNodeInfoIndex -xmlParserGetDirectory -xmlParserHandlePEReference -xmlParserHandleReference -xmlParserInputBufferCreateFd -xmlParserInputBufferCreateFile -xmlParserInputBufferCreateFilename -xmlParserInputBufferCreateIO -xmlParserInputBufferCreateMem -xmlParserInputBufferCreateStatic -xmlParserInputBufferGrow -xmlParserInputBufferPush -xmlParserInputBufferRead -xmlParserInputGrow -xmlParserInputRead -xmlParserInputShrink -xmlParserPrintFileContext -xmlParserPrintFileInfo -xmlParserValidityError -xmlParserValidityWarning -xmlParserWarning -xmlPatternMatch -xmlPatterncompile -xmlPedanticParserDefault -xmlPopInput -xmlPrintURI -xmlPushInput -xmlRMutexLock -xmlRMutexUnlock -xmlReadDoc -xmlReadFd -xmlReadFile -xmlReadIO -xmlReadMemory -xmlReaderForDoc -xmlReaderForFd -xmlReaderForFile -xmlReaderForIO -xmlReaderForMemory -xmlReaderNewDoc -xmlReaderNewFd -xmlReaderNewFile -xmlReaderNewIO -xmlReaderNewMemory -xmlReaderNewWalker -xmlReaderWalker -xmlReallocLoc -xmlReconciliateNs -xmlRecoverDoc -xmlRecoverFile -xmlRecoverMemory -xmlRegExecPushString -xmlRegExecPushString2 -xmlRegFreeExecCtxt -xmlRegFreeRegexp -xmlRegNewExecCtxt -xmlRegexpCompile -xmlRegexpExec -xmlRegexpIsDeterminist -xmlRegexpPrint -xmlRegisterCharEncodingHandler -xmlRegisterDefaultInputCallbacks -xmlRegisterDefaultOutputCallbacks -xmlRegisterHTTPPostCallbacks -xmlRegisterInputCallbacks -xmlRegisterNodeDefault -xmlRegisterOutputCallbacks -xmlRelaxNGCleanupTypes -xmlRelaxNGDump -xmlRelaxNGDumpTree -xmlRelaxNGFree -xmlRelaxNGFreeParserCtxt -xmlRelaxNGFreeValidCtxt -xmlRelaxNGGetParserErrors -xmlRelaxNGGetValidErrors -xmlRelaxNGNewDocParserCtxt -xmlRelaxNGNewMemParserCtxt -xmlRelaxNGNewParserCtxt -xmlRelaxNGNewValidCtxt -xmlRelaxNGParse -xmlRelaxNGSetParserErrors -xmlRelaxNGSetValidErrors -xmlRelaxNGValidateDoc -xmlRelaxNGValidateFullElement -xmlRelaxNGValidatePopElement -xmlRelaxNGValidatePushCData -xmlRelaxNGValidatePushElement -xmlRelaxParserSetFlag -xmlRemoveID -xmlRemoveProp -xmlRemoveRef -xmlReplaceNode -xmlResetError -xmlResetLastError -xmlSAX2AttributeDecl -xmlSAX2CDataBlock -xmlSAX2Characters -xmlSAX2Comment -xmlSAX2ElementDecl -xmlSAX2EndDocument -xmlSAX2EndElement -xmlSAX2EndElementNs -xmlSAX2EntityDecl -xmlSAX2ExternalSubset -xmlSAX2GetColumnNumber -xmlSAX2GetEntity -xmlSAX2GetLineNumber -xmlSAX2GetParameterEntity -xmlSAX2GetPublicId -xmlSAX2GetSystemId -xmlSAX2HasExternalSubset -xmlSAX2HasInternalSubset -xmlSAX2IgnorableWhitespace -xmlSAX2InitDefaultSAXHandler -xmlSAX2InitDocbDefaultSAXHandler -xmlSAX2InitHtmlDefaultSAXHandler -xmlSAX2InternalSubset -xmlSAX2IsStandalone -xmlSAX2NotationDecl -xmlSAX2ProcessingInstruction -xmlSAX2Reference -xmlSAX2ResolveEntity -xmlSAX2SetDocumentLocator -xmlSAX2StartDocument -xmlSAX2StartElement -xmlSAX2StartElementNs -xmlSAX2UnparsedEntityDecl -xmlSAXDefaultVersion -xmlSAXParseDTD -xmlSAXParseDoc -xmlSAXParseEntity -xmlSAXParseFile -xmlSAXParseFileWithData -xmlSAXParseMemory -xmlSAXParseMemoryWithData -xmlSAXUserParseFile -xmlSAXUserParseMemory -xmlSAXVersion -xmlSaveFile -xmlSaveFileEnc -xmlSaveFileTo -xmlSaveFormatFile -xmlSaveFormatFileEnc -xmlSaveFormatFileTo -xmlSaveUri -xmlScanName -xmlSchemaCheckFacet -xmlSchemaCleanupTypes -xmlSchemaCompareValues -xmlSchemaDump -xmlSchemaFree -xmlSchemaFreeFacet -xmlSchemaFreeParserCtxt -xmlSchemaFreeType -xmlSchemaFreeValidCtxt -xmlSchemaFreeValue -xmlSchemaGetPredefinedType -xmlSchemaInitTypes -xmlSchemaNewDocParserCtxt -xmlSchemaNewFacet -xmlSchemaNewMemParserCtxt -xmlSchemaNewParserCtxt -xmlSchemaNewValidCtxt -xmlSchemaParse -xmlSchemaSetParserErrors -xmlSchemaSetValidErrors -xmlSchemaValPredefTypeNode -xmlSchemaValidateDoc -xmlSchemaValidateFacet -xmlSchemaValidatePredefinedType -xmlSchemaValidateStream -xmlSearchNs -xmlSearchNsByHref -xmlSetBufferAllocationScheme -xmlSetCompressMode -xmlSetDocCompressMode -xmlSetEntityReferenceFunc -xmlSetExternalEntityLoader -xmlSetFeature -xmlSetGenericErrorFunc -xmlSetListDoc -xmlSetNs -xmlSetNsProp -xmlSetProp -xmlSetStructuredErrorFunc -xmlSetTreeDoc -xmlSetupParserForBuffer -xmlShell -xmlShellBase -xmlShellCat -xmlShellDir -xmlShellDu -xmlShellList -xmlShellLoad -xmlShellPrintNode -xmlShellPrintXPathError -xmlShellPrintXPathResult -xmlShellPwd -xmlShellSave -xmlShellValidate -xmlShellWrite -xmlSkipBlankChars -xmlSnprintfElementContent -xmlSplitQName -xmlSplitQName2 -xmlSplitQName3 -xmlSprintfElementContent -xmlStopParser -xmlStrEqual -xmlStrPrintf -xmlStrQEqual -xmlStrVPrintf -xmlStrcasecmp -xmlStrcasestr -xmlStrcat -xmlStrchr -xmlStrcmp -xmlStrdup -xmlStringCurrentChar -xmlStringDecodeEntities -xmlStringGetNodeList -xmlStringLenDecodeEntities -xmlStringLenGetNodeList -xmlStrlen -xmlStrncasecmp -xmlStrncat -xmlStrncatNew -xmlStrncmp -xmlStrndup -xmlStrstr -xmlStrsub -xmlSubstituteEntitiesDefault -xmlSwitchEncoding -xmlSwitchInputEncoding -xmlSwitchToEncoding -xmlTextConcat -xmlTextMerge -xmlTextReaderAttributeCount -xmlTextReaderBaseUri -xmlTextReaderClose -xmlTextReaderConstBaseUri -xmlTextReaderConstLocalName -xmlTextReaderConstName -xmlTextReaderConstNamespaceUri -xmlTextReaderConstPrefix -xmlTextReaderConstString -xmlTextReaderConstValue -xmlTextReaderConstXmlLang -xmlTextReaderCurrentDoc -xmlTextReaderCurrentNode -xmlTextReaderDepth -xmlTextReaderExpand -xmlTextReaderGetAttribute -xmlTextReaderGetAttributeNo -xmlTextReaderGetAttributeNs -xmlTextReaderGetErrorHandler -xmlTextReaderGetParserProp -xmlTextReaderGetRemainder -xmlTextReaderHasAttributes -xmlTextReaderHasValue -xmlTextReaderIsDefault -xmlTextReaderIsEmptyElement -xmlTextReaderIsValid -xmlTextReaderLocalName -xmlTextReaderLocatorBaseURI -xmlTextReaderLocatorLineNumber -xmlTextReaderLookupNamespace -xmlTextReaderMoveToAttribute -xmlTextReaderMoveToAttributeNo -xmlTextReaderMoveToAttributeNs -xmlTextReaderMoveToElement -xmlTextReaderMoveToFirstAttribute -xmlTextReaderMoveToNextAttribute -xmlTextReaderName -xmlTextReaderNamespaceUri -xmlTextReaderNext -xmlTextReaderNextSibling -xmlTextReaderNodeType -xmlTextReaderNormalization -xmlTextReaderPrefix -xmlTextReaderPreserve -xmlTextReaderPreservePattern -xmlTextReaderQuoteChar -xmlTextReaderRead -xmlTextReaderReadAttributeValue -xmlTextReaderReadInnerXml -xmlTextReaderReadOuterXml -xmlTextReaderReadState -xmlTextReaderReadString -xmlTextReaderRelaxNGSetSchema -xmlTextReaderRelaxNGValidate -xmlTextReaderSetErrorHandler -xmlTextReaderSetParserProp -xmlTextReaderSetStructuredErrorHandler -xmlTextReaderValue -xmlTextReaderXmlLang -xmlTextWriterEndAttribute -xmlTextWriterEndCDATA -xmlTextWriterEndComment -xmlTextWriterEndDTD -xmlTextWriterEndDocument -xmlTextWriterEndElement -xmlTextWriterEndPI -xmlTextWriterFlush -xmlTextWriterFullEndElement -xmlTextWriterSetIndent -xmlTextWriterSetIndentString -xmlTextWriterStartAttribute -xmlTextWriterStartAttributeNS -xmlTextWriterStartCDATA -xmlTextWriterStartComment -xmlTextWriterStartDTD -xmlTextWriterStartDTDAttlist -xmlTextWriterStartDTDElement -xmlTextWriterStartDTDEntity -xmlTextWriterStartDocument -xmlTextWriterStartElement -xmlTextWriterStartElementNS -xmlTextWriterStartPI -xmlTextWriterWriteAttribute -xmlTextWriterWriteAttributeNS -xmlTextWriterWriteBase64 -xmlTextWriterWriteBinHex -xmlTextWriterWriteCDATA -xmlTextWriterWriteComment -xmlTextWriterWriteDTD -xmlTextWriterWriteDTDAttlist -xmlTextWriterWriteDTDElement -xmlTextWriterWriteDTDEntity -xmlTextWriterWriteDTDExternalEntity -xmlTextWriterWriteDTDInternalEntity -xmlTextWriterWriteDTDNotation -xmlTextWriterWriteElement -xmlTextWriterWriteElementNS -xmlTextWriterWriteFormatAttribute -xmlTextWriterWriteFormatAttributeNS -xmlTextWriterWriteFormatCDATA -xmlTextWriterWriteFormatComment -xmlTextWriterWriteFormatDTD -xmlTextWriterWriteFormatDTDAttlist -xmlTextWriterWriteFormatDTDElement -xmlTextWriterWriteFormatDTDInternalEntity -xmlTextWriterWriteFormatElement -xmlTextWriterWriteFormatElementNS -xmlTextWriterWriteFormatPI -xmlTextWriterWriteFormatRaw -xmlTextWriterWriteFormatString -xmlTextWriterWritePI -xmlTextWriterWriteRaw -xmlTextWriterWriteRawLen -xmlTextWriterWriteString -xmlTextWriterWriteVFormatAttribute -xmlTextWriterWriteVFormatAttributeNS -xmlTextWriterWriteVFormatCDATA -xmlTextWriterWriteVFormatComment -xmlTextWriterWriteVFormatDTD -xmlTextWriterWriteVFormatDTDAttlist -xmlTextWriterWriteVFormatDTDElement -xmlTextWriterWriteVFormatDTDInternalEntity -xmlTextWriterWriteVFormatElement -xmlTextWriterWriteVFormatElementNS -xmlTextWriterWriteVFormatPI -xmlTextWriterWriteVFormatRaw -xmlTextWriterWriteVFormatString -xmlThrDefBufferAllocScheme -xmlThrDefDefaultBufferSize -xmlThrDefDeregisterNodeDefault -xmlThrDefDoValidityCheckingDefaultValue -xmlThrDefGetWarningsDefaultValue -xmlThrDefIndentTreeOutput -xmlThrDefKeepBlanksDefaultValue -xmlThrDefLineNumbersDefaultValue -xmlThrDefLoadExtDtdDefaultValue -xmlThrDefParserDebugEntities -xmlThrDefPedanticParserDefaultValue -xmlThrDefRegisterNodeDefault -xmlThrDefSaveNoEmptyTags -xmlThrDefSetGenericErrorFunc -xmlThrDefSetStructuredErrorFunc -xmlThrDefSubstituteEntitiesDefaultValue -xmlThrDefTreeIndentString -xmlUCSIsAegeanNumbers -xmlUCSIsAlphabeticPresentationForms -xmlUCSIsArabic -xmlUCSIsArabicPresentationFormsA -xmlUCSIsArabicPresentationFormsB -xmlUCSIsArmenian -xmlUCSIsArrows -xmlUCSIsBasicLatin -xmlUCSIsBengali -xmlUCSIsBlock -xmlUCSIsBlockElements -xmlUCSIsBopomofo -xmlUCSIsBopomofoExtended -xmlUCSIsBoxDrawing -xmlUCSIsBraillePatterns -xmlUCSIsBuhid -xmlUCSIsByzantineMusicalSymbols -xmlUCSIsCJKCompatibility -xmlUCSIsCJKCompatibilityForms -xmlUCSIsCJKCompatibilityIdeographs -xmlUCSIsCJKCompatibilityIdeographsSupplement -xmlUCSIsCJKRadicalsSupplement -xmlUCSIsCJKSymbolsandPunctuation -xmlUCSIsCJKUnifiedIdeographs -xmlUCSIsCJKUnifiedIdeographsExtensionA -xmlUCSIsCJKUnifiedIdeographsExtensionB -xmlUCSIsCat -xmlUCSIsCatC -xmlUCSIsCatCc -xmlUCSIsCatCf -xmlUCSIsCatCo -xmlUCSIsCatCs -xmlUCSIsCatL -xmlUCSIsCatLl -xmlUCSIsCatLm -xmlUCSIsCatLo -xmlUCSIsCatLt -xmlUCSIsCatLu -xmlUCSIsCatM -xmlUCSIsCatMc -xmlUCSIsCatMe -xmlUCSIsCatMn -xmlUCSIsCatN -xmlUCSIsCatNd -xmlUCSIsCatNl -xmlUCSIsCatNo -xmlUCSIsCatP -xmlUCSIsCatPc -xmlUCSIsCatPd -xmlUCSIsCatPe -xmlUCSIsCatPf -xmlUCSIsCatPi -xmlUCSIsCatPo -xmlUCSIsCatPs -xmlUCSIsCatS -xmlUCSIsCatSc -xmlUCSIsCatSk -xmlUCSIsCatSm -xmlUCSIsCatSo -xmlUCSIsCatZ -xmlUCSIsCatZl -xmlUCSIsCatZp -xmlUCSIsCatZs -xmlUCSIsCherokee -xmlUCSIsCombiningDiacriticalMarks -xmlUCSIsCombiningDiacriticalMarksforSymbols -xmlUCSIsCombiningHalfMarks -xmlUCSIsCombiningMarksforSymbols -xmlUCSIsControlPictures -xmlUCSIsCurrencySymbols -xmlUCSIsCypriotSyllabary -xmlUCSIsCyrillic -xmlUCSIsCyrillicSupplement -xmlUCSIsDeseret -xmlUCSIsDevanagari -xmlUCSIsDingbats -xmlUCSIsEnclosedAlphanumerics -xmlUCSIsEnclosedCJKLettersandMonths -xmlUCSIsEthiopic -xmlUCSIsGeneralPunctuation -xmlUCSIsGeometricShapes -xmlUCSIsGeorgian -xmlUCSIsGothic -xmlUCSIsGreek -xmlUCSIsGreekExtended -xmlUCSIsGreekandCoptic -xmlUCSIsGujarati -xmlUCSIsGurmukhi -xmlUCSIsHalfwidthandFullwidthForms -xmlUCSIsHangulCompatibilityJamo -xmlUCSIsHangulJamo -xmlUCSIsHangulSyllables -xmlUCSIsHanunoo -xmlUCSIsHebrew -xmlUCSIsHighPrivateUseSurrogates -xmlUCSIsHighSurrogates -xmlUCSIsHiragana -xmlUCSIsIPAExtensions -xmlUCSIsIdeographicDescriptionCharacters -xmlUCSIsKanbun -xmlUCSIsKangxiRadicals -xmlUCSIsKannada -xmlUCSIsKatakana -xmlUCSIsKatakanaPhoneticExtensions -xmlUCSIsKhmer -xmlUCSIsKhmerSymbols -xmlUCSIsLao -xmlUCSIsLatin1Supplement -xmlUCSIsLatinExtendedA -xmlUCSIsLatinExtendedAdditional -xmlUCSIsLatinExtendedB -xmlUCSIsLetterlikeSymbols -xmlUCSIsLimbu -xmlUCSIsLinearBIdeograms -xmlUCSIsLinearBSyllabary -xmlUCSIsLowSurrogates -xmlUCSIsMalayalam -xmlUCSIsMathematicalAlphanumericSymbols -xmlUCSIsMathematicalOperators -xmlUCSIsMiscellaneousMathematicalSymbolsA -xmlUCSIsMiscellaneousMathematicalSymbolsB -xmlUCSIsMiscellaneousSymbols -xmlUCSIsMiscellaneousSymbolsandArrows -xmlUCSIsMiscellaneousTechnical -xmlUCSIsMongolian -xmlUCSIsMusicalSymbols -xmlUCSIsMyanmar -xmlUCSIsNumberForms -xmlUCSIsOgham -xmlUCSIsOldItalic -xmlUCSIsOpticalCharacterRecognition -xmlUCSIsOriya -xmlUCSIsOsmanya -xmlUCSIsPhoneticExtensions -xmlUCSIsPrivateUse -xmlUCSIsPrivateUseArea -xmlUCSIsRunic -xmlUCSIsShavian -xmlUCSIsSinhala -xmlUCSIsSmallFormVariants -xmlUCSIsSpacingModifierLetters -xmlUCSIsSpecials -xmlUCSIsSuperscriptsandSubscripts -xmlUCSIsSupplementalArrowsA -xmlUCSIsSupplementalArrowsB -xmlUCSIsSupplementalMathematicalOperators -xmlUCSIsSupplementaryPrivateUseAreaA -xmlUCSIsSupplementaryPrivateUseAreaB -xmlUCSIsSyriac -xmlUCSIsTagalog -xmlUCSIsTagbanwa -xmlUCSIsTags -xmlUCSIsTaiLe -xmlUCSIsTaiXuanJingSymbols -xmlUCSIsTamil -xmlUCSIsTelugu -xmlUCSIsThaana -xmlUCSIsThai -xmlUCSIsTibetan -xmlUCSIsUgaritic -xmlUCSIsUnifiedCanadianAboriginalSyllabics -xmlUCSIsVariationSelectors -xmlUCSIsVariationSelectorsSupplement -xmlUCSIsYiRadicals -xmlUCSIsYiSyllables -xmlUCSIsYijingHexagramSymbols -xmlURIEscape -xmlURIEscapeStr -xmlURIUnescapeString -xmlUTF8Charcmp -xmlUTF8Size -xmlUTF8Strlen -xmlUTF8Strloc -xmlUTF8Strndup -xmlUTF8Strpos -xmlUTF8Strsize -xmlUTF8Strsub -xmlUnlinkNode -xmlUnlockLibrary -xmlUnsetNsProp -xmlUnsetProp -xmlValidBuildContentModel -xmlValidCtxtNormalizeAttributeValue -xmlValidGetPotentialChildren -xmlValidGetValidElements -xmlValidNormalizeAttributeValue -xmlValidateAttributeDecl -xmlValidateAttributeValue -xmlValidateDocument -xmlValidateDocumentFinal -xmlValidateDtd -xmlValidateDtdFinal -xmlValidateElement -xmlValidateElementDecl -xmlValidateNCName -xmlValidateNMToken -xmlValidateName -xmlValidateNameValue -xmlValidateNamesValue -xmlValidateNmtokenValue -xmlValidateNmtokensValue -xmlValidateNotationDecl -xmlValidateNotationUse -xmlValidateOneAttribute -xmlValidateOneElement -xmlValidateOneNamespace -xmlValidatePopElement -xmlValidatePushCData -xmlValidatePushElement -xmlValidateQName -xmlValidateRoot -xmlXIncludeFreeContext -xmlXIncludeNewContext -xmlXIncludeProcess -xmlXIncludeProcessFlags -xmlXIncludeProcessNode -xmlXIncludeProcessTree -xmlXIncludeProcessTreeFlags -xmlXIncludeSetFlags -xmlXPathAddValues -xmlXPathBooleanFunction -xmlXPathCastBooleanToNumber -xmlXPathCastBooleanToString -xmlXPathCastNodeSetToBoolean -xmlXPathCastNodeSetToNumber -xmlXPathCastNodeSetToString -xmlXPathCastNodeToNumber -xmlXPathCastNodeToString -xmlXPathCastNumberToBoolean -xmlXPathCastNumberToString -xmlXPathCastStringToBoolean -xmlXPathCastStringToNumber -xmlXPathCastToBoolean -xmlXPathCastToNumber -xmlXPathCastToString -xmlXPathCeilingFunction -xmlXPathCmpNodes -xmlXPathCtxtCompile -xmlXPathCompareValues -xmlXPathCompile -xmlXPathCompiledEval -xmlXPathConcatFunction -xmlXPathContainsFunction -xmlXPathConvertBoolean -xmlXPathConvertNumber -xmlXPathConvertString -xmlXPathCountFunction -xmlXPathCtxtCompile -xmlXPathDebugDumpCompExpr -xmlXPathDebugDumpObject -xmlXPathDifference -xmlXPathDistinct -xmlXPathDistinctSorted -xmlXPathDivValues -xmlXPathEqualValues -xmlXPathErr -xmlXPathEval -xmlXPathEvalExpr -xmlXPathEvalExpression -xmlXPathEvalPredicate -xmlXPathEvaluatePredicateResult -xmlXPathFalseFunction -xmlXPathFloorFunction -xmlXPathFreeCompExpr -xmlXPathFreeContext -xmlXPathFreeNodeSet -xmlXPathFreeNodeSetList -xmlXPathFreeObject -xmlXPathFreeParserContext -xmlXPathFunctionLookup -xmlXPathFunctionLookupNS -xmlXPathHasSameNodes -xmlXPathIdFunction -xmlXPathInit -xmlXPathIntersection -xmlXPathIsInf -xmlXPathIsNaN -xmlXPathIsNodeType -xmlXPathLangFunction -xmlXPathLastFunction -xmlXPathLeading -xmlXPathLeadingSorted -xmlXPathLocalNameFunction -xmlXPathModValues -xmlXPathMultValues -xmlXPathNamespaceURIFunction -xmlXPathNewBoolean -xmlXPathNewCString -xmlXPathNewContext -xmlXPathNewFloat -xmlXPathNewNodeSet -xmlXPathNewNodeSetList -xmlXPathNewParserContext -xmlXPathNewString -xmlXPathNewValueTree -xmlXPathNextAncestor -xmlXPathNextAncestorOrSelf -xmlXPathNextAttribute -xmlXPathNextChild -xmlXPathNextDescendant -xmlXPathNextDescendantOrSelf -xmlXPathNextFollowing -xmlXPathNextFollowingSibling -xmlXPathNextNamespace -xmlXPathNextParent -xmlXPathNextPreceding -xmlXPathNextPrecedingSibling -xmlXPathNextSelf -xmlXPathNodeLeading -xmlXPathNodeLeadingSorted -xmlXPathNodeSetAdd -xmlXPathNodeSetAddNs -xmlXPathNodeSetAddUnique -xmlXPathNodeSetContains -xmlXPathNodeSetCreate -xmlXPathNodeSetDel -xmlXPathNodeSetFreeNs -xmlXPathNodeSetMerge -xmlXPathNodeSetRemove -xmlXPathNodeSetSort -xmlXPathNodeTrailing -xmlXPathNodeTrailingSorted -xmlXPathNormalizeFunction -xmlXPathNotEqualValues -xmlXPathNotFunction -xmlXPathNsLookup -xmlXPathNumberFunction -xmlXPathObjectCopy -xmlXPathOrderDocElems -xmlXPathParseNCName -xmlXPathParseName -xmlXPathPopBoolean -xmlXPathPopExternal -xmlXPathPopNodeSet -xmlXPathPopNumber -xmlXPathPopString -xmlXPathPositionFunction -xmlXPathRegisterAllFunctions -xmlXPathRegisterFunc -xmlXPathRegisterFuncLookup -xmlXPathRegisterFuncNS -xmlXPathRegisterNs -xmlXPathRegisterVariable -xmlXPathRegisterVariableLookup -xmlXPathRegisterVariableNS -xmlXPathRegisteredFuncsCleanup -xmlXPathRegisteredNsCleanup -xmlXPathRegisteredVariablesCleanup -xmlXPathRoot -xmlXPathRoundFunction -xmlXPathStartsWithFunction -xmlXPathStringEvalNumber -xmlXPathStringFunction -xmlXPathStringLengthFunction -xmlXPathSubValues -xmlXPathSubstringAfterFunction -xmlXPathSubstringBeforeFunction -xmlXPathSubstringFunction -xmlXPathSumFunction -xmlXPathTrailing -xmlXPathTrailingSorted -xmlXPathTranslateFunction -xmlXPathTrueFunction -xmlXPathValueFlipSign -xmlXPathVariableLookup -xmlXPathVariableLookupNS -xmlXPathWrapCString -xmlXPathWrapExternal -xmlXPathWrapNodeSet -xmlXPathWrapString -xmlXPathErr -xmlXPatherror -xmlXPtrBuildNodeList -xmlXPtrEval -xmlXPtrEvalRangePredicate -xmlXPtrFreeLocationSet -xmlXPtrLocationSetAdd -xmlXPtrLocationSetCreate -xmlXPtrLocationSetDel -xmlXPtrLocationSetMerge -xmlXPtrLocationSetRemove -xmlXPtrNewCollapsedRange -xmlXPtrNewContext -xmlXPtrNewLocationSetNodeSet -xmlXPtrNewLocationSetNodes -xmlXPtrNewRange -xmlXPtrNewRangeNodeObject -xmlXPtrNewRangeNodePoint -xmlXPtrNewRangeNodes -xmlXPtrNewRangePointNode -xmlXPtrNewRangePoints -xmlXPtrRangeToFunction -xmlXPtrWrapLocationSet -xmlNewTextWriter -xmlNewTextWriterDoc -xmlNewTextWriterFilename -xmlNewTextWriterMemory -xmlNewTextWriterPushParser -xmlNewTextWriterTree -xmlFreeTextWriter -xmlTextWriterEndAttribute -xmlTextWriterEndCDATA -xmlTextWriterEndComment -xmlTextWriterEndDTD -xmlTextWriterEndDTDAttlist -xmlTextWriterEndDTDElement -xmlTextWriterEndDTDEntity -xmlTextWriterEndDocument -xmlTextWriterEndElement -xmlTextWriterEndPI -xmlTextWriterFlush -xmlTextWriterFullEndElement -xmlTextWriterSetIndent -xmlTextWriterSetIndentString -xmlTextWriterStartAttribute -xmlTextWriterStartAttributeNS -xmlTextWriterStartCDATA -xmlTextWriterStartComment -xmlTextWriterStartDTD -xmlTextWriterStartDTDAttlist -xmlTextWriterStartDTDElement -xmlTextWriterStartDTDEntity -xmlTextWriterStartDocument -xmlTextWriterStartElement -xmlTextWriterStartElementNS -xmlTextWriterStartPI -xmlTextWriterWriteAttribute -xmlTextWriterWriteAttributeNS -xmlTextWriterWriteBase64 -xmlTextWriterWriteBinHex -xmlTextWriterWriteCDATA -xmlTextWriterWriteComment -xmlTextWriterWriteDTD -xmlTextWriterWriteDTDAttlist -xmlTextWriterWriteDTDElement -xmlTextWriterWriteDTDEntity -xmlTextWriterWriteDTDExternalEntity -xmlTextWriterWriteDTDExternalEntityContents -xmlTextWriterWriteDTDInternalEntity -xmlTextWriterWriteDTDNotation -xmlTextWriterWriteElement -xmlTextWriterWriteElementNS -xmlTextWriterWriteFormatAttribute -xmlTextWriterWriteFormatAttributeNS -xmlTextWriterWriteFormatCDATA -xmlTextWriterWriteFormatComment -xmlTextWriterWriteFormatDTD -xmlTextWriterWriteFormatDTDAttlist -xmlTextWriterWriteFormatDTDElement -xmlTextWriterWriteFormatDTDInternalEntity -xmlTextWriterWriteFormatElement -xmlTextWriterWriteFormatElementNS -xmlTextWriterWriteFormatPI -xmlTextWriterWriteFormatRaw -xmlTextWriterWriteFormatString -xmlTextWriterWritePI -xmlTextWriterWriteRaw -xmlTextWriterWriteRawLen -xmlTextWriterWriteString +EXPORTS +__docbDefaultSAXHandler +__htmlDefaultSAXHandler +__oldXMLWDcompatibility +__xmlBufferAllocScheme +__xmlDefaultBufferSize +__xmlDefaultSAXHandler +__xmlDefaultSAXLocator +__xmlDeregisterNodeDefaultValue +__xmlDoValidityCheckingDefaultValue +xmlFree DATA +__xmlGenericError +__xmlGenericErrorContext +__xmlGetWarningsDefaultValue +__xmlIndentTreeOutput +xmlIsBaseCharGroup DATA +xmlIsCharGroup DATA +xmlIsCombiningGroup DATA +xmlIsDigitGroup DATA +xmlIsExtenderGroup DATA +xmlIsIdeographicGroup DATA +xmlIsPubidChar_tab DATA +__xmlKeepBlanksDefaultValue +xmlLastError DATA +__xmlLineNumbersDefaultValue +__xmlLoadExtDtdDefaultValue +xmlMalloc DATA +xmlMallocAtomic DATA +xmlMemStrdup DATA +xmlOutputBufferCreateFilenameValue DATA +__xmlParserDebugEntities +xmlParserInputBufferCreateFilenameValue DATA +xmlParserMaxDepth DATA +__xmlParserVersion +__xmlPedanticParserDefaultValue +xmlRealloc DATA +__xmlRegisterNodeDefaultValue +__xmlSaveNoEmptyTags +xmlStringComment DATA +xmlStringText DATA +xmlStringTextNoenc DATA +xmlStructuredError DATA +__xmlSubstituteEntitiesDefaultValue +__xmlTreeIndentString +xmlXPathNAN DATA +xmlXPathNINF DATA +xmlXPathPINF DATA +UTF8ToHtml +UTF8Toisolat1 +attribute +attributeDecl +cdataBlock +characters +checkNamespace +comment +docbCreateFileParserCtxt +docbCreatePushParserCtxt +docbDefaultSAXHandlerInit +docbEncodeEntities +docbFreeParserCtxt +docbParseChunk +docbParseDoc +docbParseDocument +docbParseFile +docbSAXParseDoc +docbSAXParseFile +elementDecl +endDocument +endElement +entityDecl +externalSubset +getColumnNumber +getEntity +getLineNumber +getNamespace +getParameterEntity +getPublicId +getSystemId +globalNamespace +hasExternalSubset +hasInternalSubset +htmlAttrAllowed +htmlAutoCloseTag +htmlCreateFileParserCtxt +htmlCreateMemoryParserCtxt +htmlCreatePushParserCtxt +htmlCtxtReadDoc +htmlCtxtReadFd +htmlCtxtReadFile +htmlCtxtReadIO +htmlCtxtReadMemory +htmlCtxtReset +htmlCtxtUseOptions +htmlDefaultSAXHandlerInit +htmlDocContentDumpFormatOutput +htmlDocContentDumpOutput +htmlDocDump +htmlDocDumpMemory +htmlElementAllowedHere +htmlElementStatusHere +htmlEncodeEntities +htmlEntityLookup +htmlEntityValueLookup +htmlFreeParserCtxt +htmlGetMetaEncoding +htmlHandleOmittedElem +htmlInitAutoClose +htmlIsAutoClosed +htmlIsBooleanAttr +htmlIsScriptAttribute +htmlNewDoc +htmlNewDocNoDtD +htmlNodeDump +htmlNodeDumpFile +htmlNodeDumpFileFormat +htmlNodeDumpFormatOutput +htmlNodeDumpOutput +htmlNodeStatus +htmlParseCharRef +htmlParseChunk +htmlParseDoc +htmlParseDocument +htmlParseElement +htmlParseEntityRef +htmlParseFile +htmlReadDoc +htmlReadFd +htmlReadFile +htmlReadIO +htmlReadMemory +htmlSAXParseDoc +htmlSAXParseFile +htmlSaveFile +htmlSaveFileEnc +htmlSaveFileFormat +htmlSetMetaEncoding +htmlTagLookup +ignorableWhitespace +initGenericErrorDefaultFunc +initdocbDefaultSAXHandler +inithtmlDefaultSAXHandler +initxmlDefaultSAXHandler +inputPop +inputPush +internalSubset +isStandalone +isolat1ToUTF8 +namePop +namePush +namespaceDecl +nodePop +nodePush +notationDecl +processingInstruction +reference +resolveEntity +setDocumentLocator +setNamespace +startDocument +startElement +unparsedEntityDecl +valuePop +valuePush +xmlACatalogAdd +xmlACatalogDump +xmlACatalogRemove +xmlACatalogResolve +xmlACatalogResolvePublic +xmlACatalogResolveSystem +xmlACatalogResolveURI +xmlAddAttributeDecl +xmlAddChild +xmlAddChildList +xmlAddDocEntity +xmlAddDtdEntity +xmlAddElementDecl +xmlAddEncodingAlias +xmlAddID +xmlAddNextSibling +xmlAddNotationDecl +xmlAddPrevSibling +xmlAddRef +xmlAddSibling +xmlAllocOutputBuffer +xmlAllocParserInputBuffer +xmlAttrSerializeTxtContent +xmlAutomataCompile +xmlAutomataGetInitState +xmlAutomataIsDeterminist +xmlAutomataNewAllTrans +xmlAutomataNewCountTrans +xmlAutomataNewCountTrans2 +xmlAutomataNewCountedTrans +xmlAutomataNewCounter +xmlAutomataNewCounterTrans +xmlAutomataNewEpsilon +xmlAutomataNewOnceTrans +xmlAutomataNewOnceTrans2 +xmlAutomataNewState +xmlAutomataNewTransition +xmlAutomataNewTransition2 +xmlAutomataSetFinalState +xmlBoolToText +xmlBufferAdd +xmlBufferAddHead +xmlBufferCCat +xmlBufferCat +xmlBufferContent +xmlBufferCreate +xmlBufferCreateSize +xmlBufferCreateStatic +xmlBufferDump +xmlBufferEmpty +xmlBufferFree +xmlBufferGrow +xmlBufferLength +xmlBufferResize +xmlBufferSetAllocationScheme +xmlBufferShrink +xmlBufferWriteCHAR +xmlBufferWriteChar +xmlBufferWriteQuotedString +xmlBuildQName +xmlBuildRelativeURI +xmlBuildURI +xmlByteConsumed +xmlC14NDocDumpMemory +xmlC14NDocSave +xmlC14NDocSaveTo +xmlC14NExecute +xmlCanonicPath +xmlCatalogAdd +xmlCatalogAddLocal +xmlCatalogCleanup +xmlCatalogConvert +xmlCatalogDump +xmlCatalogFreeLocal +xmlCatalogGetDefaults +xmlCatalogGetPublic +xmlCatalogGetSystem +xmlCatalogIsEmpty +xmlCatalogLocalResolve +xmlCatalogLocalResolveURI +xmlCatalogRemove +xmlCatalogResolve +xmlCatalogResolvePublic +xmlCatalogResolveSystem +xmlCatalogResolveURI +xmlCatalogSetDebug +xmlCatalogSetDefaultPrefer +xmlCatalogSetDefaults +xmlCharEncCloseFunc +xmlCharEncFirstLine +xmlCharEncInFunc +xmlCharEncOutFunc +xmlCharInRange +xmlCharStrdup +xmlCharStrndup +xmlCheckFilename +xmlCheckHTTPInput +xmlCheckLanguageID +xmlCheckUTF8 +xmlCheckVersion +xmlCleanupCharEncodingHandlers +xmlCleanupEncodingAliases +xmlCleanupGlobals +xmlCleanupInputCallbacks +xmlCleanupMemory +xmlCleanupOutputCallbacks +xmlCleanupParser +xmlCleanupPredefinedEntities +xmlCleanupThreads +xmlClearNodeInfoSeq +xmlClearParserCtxt +xmlConvertSGMLCatalog +xmlCopyAttributeTable +xmlCopyChar +xmlCopyCharMultiByte +xmlCopyDoc +xmlCopyDtd +xmlCopyElementContent +xmlCopyElementTable +xmlCopyEntitiesTable +xmlCopyEnumeration +xmlCopyError +xmlCopyNamespace +xmlCopyNamespaceList +xmlCopyNode +xmlCopyNodeList +xmlCopyNotationTable +xmlCopyProp +xmlCopyPropList +xmlCreateDocParserCtxt +xmlCreateEntitiesTable +xmlCreateEntityParserCtxt +xmlCreateEnumeration +xmlCreateFileParserCtxt +xmlCreateIOParserCtxt +xmlCreateIntSubset +xmlCreateMemoryParserCtxt +xmlCreatePushParserCtxt +xmlCreateURI +xmlCreateURLParserCtxt +xmlCtxtGetLastError +xmlCtxtReadDoc +xmlCtxtReadFd +xmlCtxtReadFile +xmlCtxtReadIO +xmlCtxtReadMemory +xmlCtxtReset +xmlCtxtResetLastError +xmlCtxtResetPush +xmlCtxtUseOptions +xmlCurrentChar +xmlDebugCheckDocument +xmlDebugDumpAttr +xmlDebugDumpAttrList +xmlDebugDumpDTD +xmlDebugDumpDocument +xmlDebugDumpDocumentHead +xmlDebugDumpEntities +xmlDebugDumpNode +xmlDebugDumpNodeList +xmlDebugDumpOneNode +xmlDebugDumpString +xmlDecodeEntities +xmlDefaultSAXHandlerInit +xmlDelEncodingAlias +xmlDeregisterNodeDefault +xmlDetectCharEncoding +xmlDictCreate +xmlDictCreateSub +xmlDictFree +xmlDictLookup +xmlDictOwns +xmlDictQLookup +xmlDictReference +xmlDictSize +xmlDocCopyNode +xmlDocCopyNodeList +xmlDocDump +xmlDocDumpFormatMemory +xmlDocDumpFormatMemoryEnc +xmlDocDumpMemory +xmlDocDumpMemoryEnc +xmlDocFormatDump +xmlDocGetRootElement +xmlDocSetRootElement +xmlDumpAttributeDecl +xmlDumpAttributeTable +xmlDumpElementDecl +xmlDumpElementTable +xmlDumpEntitiesTable +xmlDumpEntityDecl +xmlDumpNotationDecl +xmlDumpNotationTable +xmlElemDump +xmlEncodeEntities +xmlEncodeEntitiesReentrant +xmlEncodeSpecialChars +xmlErrMemory +xmlFileClose +xmlFileMatch +xmlFileOpen +xmlFileRead +xmlFindCharEncodingHandler +xmlFreeAttributeTable +xmlFreeAutomata +xmlFreeCatalog +xmlFreeDoc +xmlFreeDtd +xmlFreeElementContent +xmlFreeElementTable +xmlFreeEntitiesTable +xmlFreeEnumeration +xmlFreeIDTable +xmlFreeInputStream +xmlFreeMutex +xmlFreeNode +xmlFreeNodeList +xmlFreeNotationTable +xmlFreeNs +xmlFreeNsList +xmlFreeParserCtxt +xmlFreeParserInputBuffer +xmlFreePattern +xmlFreePatternList +xmlFreeProp +xmlFreePropList +xmlFreeRMutex +xmlFreeRefTable +xmlFreeTextReader +xmlFreeTextWriter +xmlFreeURI +xmlFreeValidCtxt +xmlGcMemGet +xmlGcMemSetup +xmlGetBufferAllocationScheme +xmlGetCharEncodingHandler +xmlGetCharEncodingName +xmlGetCompressMode +xmlGetDocCompressMode +xmlGetDocEntity +xmlGetDtdAttrDesc +xmlGetDtdElementDesc +xmlGetDtdEntity +xmlGetDtdNotationDesc +xmlGetDtdQAttrDesc +xmlGetDtdQElementDesc +xmlGetEncodingAlias +xmlGetExternalEntityLoader +xmlGetFeature +xmlGetFeaturesList +xmlGetGlobalState +xmlGetID +xmlGetIntSubset +xmlGetLastChild +xmlGetLastError +xmlGetLineNo +xmlGetNoNsProp +xmlGetNodePath +xmlGetNsList +xmlGetNsProp +xmlGetParameterEntity +xmlGetPredefinedEntity +xmlGetProp +xmlGetRefs +xmlGetThreadId +xmlGetUTF8Char +xmlHandleEntity +xmlHasNsProp +xmlHasProp +xmlHashAddEntry +xmlHashAddEntry2 +xmlHashAddEntry3 +xmlHashCopy +xmlHashCreate +xmlHashFree +xmlHashLookup +xmlHashLookup2 +xmlHashLookup3 +xmlHashQLookup +xmlHashQLookup2 +xmlHashQLookup3 +xmlHashRemoveEntry +xmlHashRemoveEntry2 +xmlHashRemoveEntry3 +xmlHashScan +xmlHashScan3 +xmlHashScanFull +xmlHashScanFull3 +xmlHashSize +xmlHashUpdateEntry +xmlHashUpdateEntry2 +xmlHashUpdateEntry3 +xmlIOFTPClose +xmlIOFTPMatch +xmlIOFTPOpen +xmlIOFTPRead +xmlIOHTTPClose +xmlIOHTTPMatch +xmlIOHTTPOpen +xmlIOHTTPOpenW +xmlIOHTTPRead +xmlIOParseDTD +xmlInitCharEncodingHandlers +xmlInitGlobals +xmlInitMemory +xmlInitNodeInfoSeq +xmlInitParser +xmlInitParserCtxt +xmlInitThreads +xmlInitializeCatalog +xmlInitializeGlobalState +xmlInitializePredefinedEntities +xmlIsBaseChar +xmlIsBlank +xmlIsBlankNode +xmlIsChar +xmlIsCombining +xmlIsDigit +xmlIsExtender +xmlIsID +xmlIsIdeographic +xmlIsLetter +xmlIsMainThread +xmlIsMixedElement +xmlIsPubidChar +xmlIsRef +xmlIsXHTML +xmlKeepBlanksDefault +xmlLineNumbersDefault +xmlLinkGetData +xmlListAppend +xmlListClear +xmlListCopy +xmlListCreate +xmlListDelete +xmlListDup +xmlListEmpty +xmlListEnd +xmlListFront +xmlListInsert +xmlListMerge +xmlListPopBack +xmlListPopFront +xmlListPushBack +xmlListPushFront +xmlListRemoveAll +xmlListRemoveFirst +xmlListRemoveLast +xmlListReverse +xmlListReverseSearch +xmlListReverseWalk +xmlListSearch +xmlListSize +xmlListSort +xmlListWalk +xmlLoadACatalog +xmlLoadCatalog +xmlLoadCatalogs +xmlLoadExternalEntity +xmlLoadSGMLSuperCatalog +xmlLockLibrary +xmlLsCountNode +xmlLsOneNode +xmlMallocAtomicLoc +xmlMallocLoc +xmlMemBlocks +xmlMemDisplay +xmlMemFree +xmlMemGet +xmlMemMalloc +xmlMemRealloc +xmlMemSetup +xmlMemShow +xmlMemStrdupLoc +xmlMemUsed +xmlMemoryDump +xmlMemoryStrdup +xmlModuleClose +xmlModuleFree +xmlModuleOpen +xmlModuleSymbol +xmlMutexLock +xmlMutexUnlock +xmlNamespaceParseNCName +xmlNamespaceParseNSDef +xmlNamespaceParseQName +xmlNanoFTPCheckResponse +xmlNanoFTPCleanup +xmlNanoFTPClose +xmlNanoFTPCloseConnection +xmlNanoFTPConnect +xmlNanoFTPConnectTo +xmlNanoFTPCwd +xmlNanoFTPDele +xmlNanoFTPFreeCtxt +xmlNanoFTPGet +xmlNanoFTPGetConnection +xmlNanoFTPGetResponse +xmlNanoFTPGetSocket +xmlNanoFTPInit +xmlNanoFTPList +xmlNanoFTPNewCtxt +xmlNanoFTPOpen +xmlNanoFTPProxy +xmlNanoFTPQuit +xmlNanoFTPRead +xmlNanoFTPScanProxy +xmlNanoFTPUpdateURL +xmlNanoHTTPAuthHeader +xmlNanoHTTPCleanup +xmlNanoHTTPClose +xmlNanoHTTPContentLength +xmlNanoHTTPEncoding +xmlNanoHTTPFetch +xmlNanoHTTPInit +xmlNanoHTTPMethod +xmlNanoHTTPMethodRedir +xmlNanoHTTPMimeType +xmlNanoHTTPOpen +xmlNanoHTTPOpenRedir +xmlNanoHTTPRead +xmlNanoHTTPRedir +xmlNanoHTTPReturnCode +xmlNanoHTTPSave +xmlNanoHTTPScanProxy +xmlNewAutomata +xmlNewCDataBlock +xmlNewCatalog +xmlNewCharEncodingHandler +xmlNewCharRef +xmlNewChild +xmlNewComment +xmlNewDoc +xmlNewDocComment +xmlNewDocFragment +xmlNewDocNode +xmlNewDocNodeEatName +xmlNewDocPI +xmlNewDocProp +xmlNewDocRawNode +xmlNewDocText +xmlNewDocTextLen +xmlNewDtd +xmlNewElementContent +xmlNewEntityInputStream +xmlNewGlobalNs +xmlNewIOInputStream +xmlNewInputFromFile +xmlNewInputStream +xmlNewMutex +xmlNewNode +xmlNewNodeEatName +xmlNewNs +xmlNewNsProp +xmlNewNsPropEatName +xmlNewPI +xmlNewParserCtxt +xmlNewProp +xmlNewRMutex +xmlNewReference +xmlNewStringInputStream +xmlNewText +xmlNewTextChild +xmlNewTextLen +xmlNewTextReader +xmlNewTextReaderFilename +xmlNewTextWriter +xmlNewTextWriterDoc +xmlNewTextWriterFilename +xmlNewTextWriterMemory +xmlNewTextWriterPushParser +xmlNewTextWriterTree +xmlNewValidCtxt +xmlNextChar +xmlNoNetExternalEntityLoader +xmlNodeAddContent +xmlNodeAddContentLen +xmlNodeBufGetContent +xmlNodeDump +xmlNodeDumpOutput +xmlNodeGetBase +xmlNodeGetContent +xmlNodeGetLang +xmlNodeGetSpacePreserve +xmlNodeIsText +xmlNodeListGetRawString +xmlNodeListGetString +xmlNodeSetBase +xmlNodeSetContent +xmlNodeSetContentLen +xmlNodeSetLang +xmlNodeSetName +xmlNodeSetSpacePreserve +xmlNormalizeURIPath +xmlNormalizeWindowsPath +xmlOutputBufferClose +xmlOutputBufferCreateFd +xmlOutputBufferCreateFile +xmlOutputBufferCreateFilename +xmlOutputBufferCreateFilenameDefault +xmlOutputBufferCreateIO +xmlOutputBufferFlush +xmlOutputBufferWrite +xmlOutputBufferWriteEscape +xmlOutputBufferWriteString +xmlParseAttValue +xmlParseAttribute +xmlParseAttributeListDecl +xmlParseAttributeType +xmlParseBalancedChunkMemory +xmlParseBalancedChunkMemoryRecover +xmlParseCDSect +xmlParseCatalogFile +xmlParseCharData +xmlParseCharEncoding +xmlParseCharRef +xmlParseChunk +xmlParseComment +xmlParseContent +xmlParseCtxtExternalEntity +xmlParseDTD +xmlParseDefaultDecl +xmlParseDoc +xmlParseDocTypeDecl +xmlParseDocument +xmlParseElement +xmlParseElementChildrenContentDecl +xmlParseElementContentDecl +xmlParseElementDecl +xmlParseElementMixedContentDecl +xmlParseEncName +xmlParseEncodingDecl +xmlParseEndTag +xmlParseEntity +xmlParseEntityDecl +xmlParseEntityRef +xmlParseEntityValue +xmlParseEnumeratedType +xmlParseEnumerationType +xmlParseExtParsedEnt +xmlParseExternalEntity +xmlParseExternalID +xmlParseExternalSubset +xmlParseFile +xmlParseInNodeContext +xmlParseMarkupDecl +xmlParseMemory +xmlParseMisc +xmlParseName +xmlParseNamespace +xmlParseNmtoken +xmlParseNotationDecl +xmlParseNotationType +xmlParsePEReference +xmlParsePI +xmlParsePITarget +xmlParsePubidLiteral +xmlParseQuotedString +xmlParseReference +xmlParseSDDecl +xmlParseStartTag +xmlParseSystemLiteral +xmlParseTextDecl +xmlParseURI +xmlParseURIReference +xmlParseVersionInfo +xmlParseVersionNum +xmlParseXMLDecl +xmlParserAddNodeInfo +xmlParserError +xmlParserFindNodeInfo +xmlParserFindNodeInfoIndex +xmlParserGetDirectory +xmlParserHandlePEReference +xmlParserHandleReference +xmlParserInputBufferCreateFd +xmlParserInputBufferCreateFile +xmlParserInputBufferCreateFilename +xmlParserInputBufferCreateFilenameDefault +xmlParserInputBufferCreateIO +xmlParserInputBufferCreateMem +xmlParserInputBufferCreateStatic +xmlParserInputBufferGrow +xmlParserInputBufferPush +xmlParserInputBufferRead +xmlParserInputGrow +xmlParserInputRead +xmlParserInputShrink +xmlParserPrintFileContext +xmlParserPrintFileInfo +xmlParserValidityError +xmlParserValidityWarning +xmlParserWarning +xmlPatternMatch +xmlPatterncompile +xmlPedanticParserDefault +xmlPopInput +xmlPopInputCallbacks +xmlPrintURI +xmlPushInput +xmlRMutexLock +xmlRMutexUnlock +xmlReadDoc +xmlReadFd +xmlReadFile +xmlReadIO +xmlReadMemory +xmlReaderForDoc +xmlReaderForFd +xmlReaderForFile +xmlReaderForIO +xmlReaderForMemory +xmlReaderNewDoc +xmlReaderNewFd +xmlReaderNewFile +xmlReaderNewIO +xmlReaderNewMemory +xmlReaderNewWalker +xmlReaderWalker +xmlReallocLoc +xmlReconciliateNs +xmlRecoverDoc +xmlRecoverFile +xmlRecoverMemory +xmlRegExecPushString +xmlRegExecPushString2 +xmlRegFreeExecCtxt +xmlRegFreeRegexp +xmlRegNewExecCtxt +xmlRegexpCompile +xmlRegexpExec +xmlRegexpIsDeterminist +xmlRegexpPrint +xmlRegisterCharEncodingHandler +xmlRegisterDefaultInputCallbacks +xmlRegisterDefaultOutputCallbacks +xmlRegisterHTTPPostCallbacks +xmlRegisterInputCallbacks +xmlRegisterNodeDefault +xmlRegisterOutputCallbacks +xmlRelaxNGCleanupTypes +xmlRelaxNGDump +xmlRelaxNGDumpTree +xmlRelaxNGFree +xmlRelaxNGFreeParserCtxt +xmlRelaxNGFreeValidCtxt +xmlRelaxNGGetParserErrors +xmlRelaxNGGetValidErrors +xmlRelaxNGInitTypes +xmlRelaxNGNewDocParserCtxt +xmlRelaxNGNewMemParserCtxt +xmlRelaxNGNewParserCtxt +xmlRelaxNGNewValidCtxt +xmlRelaxNGParse +xmlRelaxNGSetParserErrors +xmlRelaxNGSetValidErrors +xmlRelaxNGValidateDoc +xmlRelaxNGValidateFullElement +xmlRelaxNGValidatePopElement +xmlRelaxNGValidatePushCData +xmlRelaxNGValidatePushElement +xmlRelaxParserSetFlag +xmlRemoveID +xmlRemoveProp +xmlRemoveRef +xmlReplaceNode +xmlResetError +xmlResetLastError +xmlSAX2AttributeDecl +xmlSAX2CDataBlock +xmlSAX2Characters +xmlSAX2Comment +xmlSAX2ElementDecl +xmlSAX2EndDocument +xmlSAX2EndElement +xmlSAX2EndElementNs +xmlSAX2EntityDecl +xmlSAX2ExternalSubset +xmlSAX2GetColumnNumber +xmlSAX2GetEntity +xmlSAX2GetLineNumber +xmlSAX2GetParameterEntity +xmlSAX2GetPublicId +xmlSAX2GetSystemId +xmlSAX2HasExternalSubset +xmlSAX2HasInternalSubset +xmlSAX2IgnorableWhitespace +xmlSAX2InitDefaultSAXHandler +xmlSAX2InitDocbDefaultSAXHandler +xmlSAX2InitHtmlDefaultSAXHandler +xmlSAX2InternalSubset +xmlSAX2IsStandalone +xmlSAX2NotationDecl +xmlSAX2ProcessingInstruction +xmlSAX2Reference +xmlSAX2ResolveEntity +xmlSAX2SetDocumentLocator +xmlSAX2StartDocument +xmlSAX2StartElement +xmlSAX2StartElementNs +xmlSAX2UnparsedEntityDecl +xmlSAXDefaultVersion +xmlSAXParseDTD +xmlSAXParseDoc +xmlSAXParseEntity +xmlSAXParseFile +xmlSAXParseFileWithData +xmlSAXParseMemory +xmlSAXParseMemoryWithData +xmlSAXUserParseFile +xmlSAXUserParseMemory +xmlSAXVersion +xmlSaveClose +xmlSaveDoc +xmlSaveFile +xmlSaveFileEnc +xmlSaveFileTo +xmlSaveFlush +xmlSaveFormatFile +xmlSaveFormatFileEnc +xmlSaveFormatFileTo +xmlSaveSetAttrEscape +xmlSaveSetEscape +xmlSaveToFd +xmlSaveToFilename +xmlSaveToIO +xmlSaveTree +xmlSaveUri +xmlScanName +xmlSchemaCheckFacet +xmlSchemaCleanupTypes +xmlSchemaCollapseString +xmlSchemaCompareValues +xmlSchemaDump +xmlSchemaFree +xmlSchemaFreeFacet +xmlSchemaFreeParserCtxt +xmlSchemaFreeType +xmlSchemaFreeValidCtxt +xmlSchemaFreeValue +xmlSchemaFreeWildcard +xmlSchemaGetBuiltInListSimpleTypeItemType +xmlSchemaGetBuiltInType +xmlSchemaGetFacetValueAsULong +xmlSchemaGetParserErrors +xmlSchemaGetPredefinedType +xmlSchemaGetValidErrors +xmlSchemaInitTypes +xmlSchemaIsBuiltInTypeFacet +xmlSchemaNewDocParserCtxt +xmlSchemaNewFacet +xmlSchemaNewMemParserCtxt +xmlSchemaNewParserCtxt +xmlSchemaNewValidCtxt +xmlSchemaParse +xmlSchemaSetParserErrors +xmlSchemaSetValidErrors +xmlSchemaSetValidOptions +xmlSchemaValPredefTypeNode +xmlSchemaValPredefTypeNodeNoNorm +xmlSchemaValidCtxtGetOptions +xmlSchemaValidateDoc +xmlSchemaValidateFacet +xmlSchemaValidateLengthFacet +xmlSchemaValidateListSimpleTypeFacet +xmlSchemaValidateOneElement +xmlSchemaValidatePredefinedType +xmlSchemaValidateStream +xmlSearchNs +xmlSearchNsByHref +xmlSetBufferAllocationScheme +xmlSetCompressMode +xmlSetDocCompressMode +xmlSetEntityReferenceFunc +xmlSetExternalEntityLoader +xmlSetFeature +xmlSetGenericErrorFunc +xmlSetListDoc +xmlSetNs +xmlSetNsProp +xmlSetProp +xmlSetStructuredErrorFunc +xmlSetTreeDoc +xmlSetupParserForBuffer +xmlShell +xmlShellBase +xmlShellCat +xmlShellDir +xmlShellDu +xmlShellList +xmlShellLoad +xmlShellPrintNode +xmlShellPrintXPathError +xmlShellPrintXPathResult +xmlShellPwd +xmlShellSave +xmlShellValidate +xmlShellWrite +xmlSkipBlankChars +xmlSnprintfElementContent +xmlSplitQName +xmlSplitQName2 +xmlSplitQName3 +xmlSprintfElementContent +xmlStopParser +xmlStrEqual +xmlStrPrintf +xmlStrQEqual +xmlStrVPrintf +xmlStrcasecmp +xmlStrcasestr +xmlStrcat +xmlStrchr +xmlStrcmp +xmlStrdup +xmlStringCurrentChar +xmlStringDecodeEntities +xmlStringGetNodeList +xmlStringLenDecodeEntities +xmlStringLenGetNodeList +xmlStrlen +xmlStrncasecmp +xmlStrncat +xmlStrncatNew +xmlStrncmp +xmlStrndup +xmlStrstr +xmlStrsub +xmlSubstituteEntitiesDefault +xmlSwitchEncoding +xmlSwitchInputEncoding +xmlSwitchToEncoding +xmlTextConcat +xmlTextMerge +xmlTextReaderAttributeCount +xmlTextReaderBaseUri +xmlTextReaderClose +xmlTextReaderConstBaseUri +xmlTextReaderConstEncoding +xmlTextReaderConstLocalName +xmlTextReaderConstName +xmlTextReaderConstNamespaceUri +xmlTextReaderConstPrefix +xmlTextReaderConstString +xmlTextReaderConstValue +xmlTextReaderConstXmlLang +xmlTextReaderConstXmlVersion +xmlTextReaderCurrentDoc +xmlTextReaderCurrentNode +xmlTextReaderDepth +xmlTextReaderExpand +xmlTextReaderGetAttribute +xmlTextReaderGetAttributeNo +xmlTextReaderGetAttributeNs +xmlTextReaderGetErrorHandler +xmlTextReaderGetParserProp +xmlTextReaderGetRemainder +xmlTextReaderHasAttributes +xmlTextReaderHasValue +xmlTextReaderIsDefault +xmlTextReaderIsEmptyElement +xmlTextReaderIsNamespaceDecl +xmlTextReaderIsValid +xmlTextReaderLocalName +xmlTextReaderLocatorBaseURI +xmlTextReaderLocatorLineNumber +xmlTextReaderLookupNamespace +xmlTextReaderMoveToAttribute +xmlTextReaderMoveToAttributeNo +xmlTextReaderMoveToAttributeNs +xmlTextReaderMoveToElement +xmlTextReaderMoveToFirstAttribute +xmlTextReaderMoveToNextAttribute +xmlTextReaderName +xmlTextReaderNamespaceUri +xmlTextReaderNext +xmlTextReaderNextSibling +xmlTextReaderNodeType +xmlTextReaderNormalization +xmlTextReaderPrefix +xmlTextReaderPreserve +xmlTextReaderPreservePattern +xmlTextReaderQuoteChar +xmlTextReaderRead +xmlTextReaderReadAttributeValue +xmlTextReaderReadInnerXml +xmlTextReaderReadOuterXml +xmlTextReaderReadState +xmlTextReaderReadString +xmlTextReaderRelaxNGSetSchema +xmlTextReaderRelaxNGValidate +xmlTextReaderSetErrorHandler +xmlTextReaderSetParserProp +xmlTextReaderSetStructuredErrorHandler +xmlTextReaderStandalone +xmlTextReaderValue +xmlTextReaderXmlLang +xmlTextWriterEndAttribute +xmlTextWriterEndCDATA +xmlTextWriterEndComment +xmlTextWriterEndDTD +xmlTextWriterEndDTDAttlist +xmlTextWriterEndDTDElement +xmlTextWriterEndDTDEntity +xmlTextWriterEndDocument +xmlTextWriterEndElement +xmlTextWriterEndPI +xmlTextWriterFlush +xmlTextWriterFullEndElement +xmlTextWriterSetIndent +xmlTextWriterSetIndentString +xmlTextWriterStartAttribute +xmlTextWriterStartAttributeNS +xmlTextWriterStartCDATA +xmlTextWriterStartComment +xmlTextWriterStartDTD +xmlTextWriterStartDTDAttlist +xmlTextWriterStartDTDElement +xmlTextWriterStartDTDEntity +xmlTextWriterStartDocument +xmlTextWriterStartElement +xmlTextWriterStartElementNS +xmlTextWriterStartPI +xmlTextWriterWriteAttribute +xmlTextWriterWriteAttributeNS +xmlTextWriterWriteBase64 +xmlTextWriterWriteBinHex +xmlTextWriterWriteCDATA +xmlTextWriterWriteComment +xmlTextWriterWriteDTD +xmlTextWriterWriteDTDAttlist +xmlTextWriterWriteDTDElement +xmlTextWriterWriteDTDEntity +xmlTextWriterWriteDTDExternalEntity +xmlTextWriterWriteDTDExternalEntityContents +xmlTextWriterWriteDTDInternalEntity +xmlTextWriterWriteDTDNotation +xmlTextWriterWriteElement +xmlTextWriterWriteElementNS +xmlTextWriterWriteFormatAttribute +xmlTextWriterWriteFormatAttributeNS +xmlTextWriterWriteFormatCDATA +xmlTextWriterWriteFormatComment +xmlTextWriterWriteFormatDTD +xmlTextWriterWriteFormatDTDAttlist +xmlTextWriterWriteFormatDTDElement +xmlTextWriterWriteFormatDTDInternalEntity +xmlTextWriterWriteFormatElement +xmlTextWriterWriteFormatElementNS +xmlTextWriterWriteFormatPI +xmlTextWriterWriteFormatRaw +xmlTextWriterWriteFormatString +xmlTextWriterWritePI +xmlTextWriterWriteRaw +xmlTextWriterWriteRawLen +xmlTextWriterWriteString +xmlTextWriterWriteVFormatAttribute +xmlTextWriterWriteVFormatAttributeNS +xmlTextWriterWriteVFormatCDATA +xmlTextWriterWriteVFormatComment +xmlTextWriterWriteVFormatDTD +xmlTextWriterWriteVFormatDTDAttlist +xmlTextWriterWriteVFormatDTDElement +xmlTextWriterWriteVFormatDTDInternalEntity +xmlTextWriterWriteVFormatElement +xmlTextWriterWriteVFormatElementNS +xmlTextWriterWriteVFormatPI +xmlTextWriterWriteVFormatRaw +xmlTextWriterWriteVFormatString +xmlThrDefBufferAllocScheme +xmlThrDefDefaultBufferSize +xmlThrDefDeregisterNodeDefault +xmlThrDefDoValidityCheckingDefaultValue +xmlThrDefGetWarningsDefaultValue +xmlThrDefIndentTreeOutput +xmlThrDefKeepBlanksDefaultValue +xmlThrDefLineNumbersDefaultValue +xmlThrDefLoadExtDtdDefaultValue +xmlThrDefOutputBufferCreateFilenameDefault +xmlThrDefParserDebugEntities +xmlThrDefParserInputBufferCreateFilenameDefault +xmlThrDefPedanticParserDefaultValue +xmlThrDefRegisterNodeDefault +xmlThrDefSaveNoEmptyTags +xmlThrDefSetGenericErrorFunc +xmlThrDefSetStructuredErrorFunc +xmlThrDefSubstituteEntitiesDefaultValue +xmlThrDefTreeIndentString +xmlUCSIsAegeanNumbers +xmlUCSIsAlphabeticPresentationForms +xmlUCSIsArabic +xmlUCSIsArabicPresentationFormsA +xmlUCSIsArabicPresentationFormsB +xmlUCSIsArmenian +xmlUCSIsArrows +xmlUCSIsBasicLatin +xmlUCSIsBengali +xmlUCSIsBlock +xmlUCSIsBlockElements +xmlUCSIsBopomofo +xmlUCSIsBopomofoExtended +xmlUCSIsBoxDrawing +xmlUCSIsBraillePatterns +xmlUCSIsBuhid +xmlUCSIsByzantineMusicalSymbols +xmlUCSIsCJKCompatibility +xmlUCSIsCJKCompatibilityForms +xmlUCSIsCJKCompatibilityIdeographs +xmlUCSIsCJKCompatibilityIdeographsSupplement +xmlUCSIsCJKRadicalsSupplement +xmlUCSIsCJKSymbolsandPunctuation +xmlUCSIsCJKUnifiedIdeographs +xmlUCSIsCJKUnifiedIdeographsExtensionA +xmlUCSIsCJKUnifiedIdeographsExtensionB +xmlUCSIsCat +xmlUCSIsCatC +xmlUCSIsCatCc +xmlUCSIsCatCf +xmlUCSIsCatCo +xmlUCSIsCatCs +xmlUCSIsCatL +xmlUCSIsCatLl +xmlUCSIsCatLm +xmlUCSIsCatLo +xmlUCSIsCatLt +xmlUCSIsCatLu +xmlUCSIsCatM +xmlUCSIsCatMc +xmlUCSIsCatMe +xmlUCSIsCatMn +xmlUCSIsCatN +xmlUCSIsCatNd +xmlUCSIsCatNl +xmlUCSIsCatNo +xmlUCSIsCatP +xmlUCSIsCatPc +xmlUCSIsCatPd +xmlUCSIsCatPe +xmlUCSIsCatPf +xmlUCSIsCatPi +xmlUCSIsCatPo +xmlUCSIsCatPs +xmlUCSIsCatS +xmlUCSIsCatSc +xmlUCSIsCatSk +xmlUCSIsCatSm +xmlUCSIsCatSo +xmlUCSIsCatZ +xmlUCSIsCatZl +xmlUCSIsCatZp +xmlUCSIsCatZs +xmlUCSIsCherokee +xmlUCSIsCombiningDiacriticalMarks +xmlUCSIsCombiningDiacriticalMarksforSymbols +xmlUCSIsCombiningHalfMarks +xmlUCSIsCombiningMarksforSymbols +xmlUCSIsControlPictures +xmlUCSIsCurrencySymbols +xmlUCSIsCypriotSyllabary +xmlUCSIsCyrillic +xmlUCSIsCyrillicSupplement +xmlUCSIsDeseret +xmlUCSIsDevanagari +xmlUCSIsDingbats +xmlUCSIsEnclosedAlphanumerics +xmlUCSIsEnclosedCJKLettersandMonths +xmlUCSIsEthiopic +xmlUCSIsGeneralPunctuation +xmlUCSIsGeometricShapes +xmlUCSIsGeorgian +xmlUCSIsGothic +xmlUCSIsGreek +xmlUCSIsGreekExtended +xmlUCSIsGreekandCoptic +xmlUCSIsGujarati +xmlUCSIsGurmukhi +xmlUCSIsHalfwidthandFullwidthForms +xmlUCSIsHangulCompatibilityJamo +xmlUCSIsHangulJamo +xmlUCSIsHangulSyllables +xmlUCSIsHanunoo +xmlUCSIsHebrew +xmlUCSIsHighPrivateUseSurrogates +xmlUCSIsHighSurrogates +xmlUCSIsHiragana +xmlUCSIsIPAExtensions +xmlUCSIsIdeographicDescriptionCharacters +xmlUCSIsKanbun +xmlUCSIsKangxiRadicals +xmlUCSIsKannada +xmlUCSIsKatakana +xmlUCSIsKatakanaPhoneticExtensions +xmlUCSIsKhmer +xmlUCSIsKhmerSymbols +xmlUCSIsLao +xmlUCSIsLatin1Supplement +xmlUCSIsLatinExtendedA +xmlUCSIsLatinExtendedAdditional +xmlUCSIsLatinExtendedB +xmlUCSIsLetterlikeSymbols +xmlUCSIsLimbu +xmlUCSIsLinearBIdeograms +xmlUCSIsLinearBSyllabary +xmlUCSIsLowSurrogates +xmlUCSIsMalayalam +xmlUCSIsMathematicalAlphanumericSymbols +xmlUCSIsMathematicalOperators +xmlUCSIsMiscellaneousMathematicalSymbolsA +xmlUCSIsMiscellaneousMathematicalSymbolsB +xmlUCSIsMiscellaneousSymbols +xmlUCSIsMiscellaneousSymbolsandArrows +xmlUCSIsMiscellaneousTechnical +xmlUCSIsMongolian +xmlUCSIsMusicalSymbols +xmlUCSIsMyanmar +xmlUCSIsNumberForms +xmlUCSIsOgham +xmlUCSIsOldItalic +xmlUCSIsOpticalCharacterRecognition +xmlUCSIsOriya +xmlUCSIsOsmanya +xmlUCSIsPhoneticExtensions +xmlUCSIsPrivateUse +xmlUCSIsPrivateUseArea +xmlUCSIsRunic +xmlUCSIsShavian +xmlUCSIsSinhala +xmlUCSIsSmallFormVariants +xmlUCSIsSpacingModifierLetters +xmlUCSIsSpecials +xmlUCSIsSuperscriptsandSubscripts +xmlUCSIsSupplementalArrowsA +xmlUCSIsSupplementalArrowsB +xmlUCSIsSupplementalMathematicalOperators +xmlUCSIsSupplementaryPrivateUseAreaA +xmlUCSIsSupplementaryPrivateUseAreaB +xmlUCSIsSyriac +xmlUCSIsTagalog +xmlUCSIsTagbanwa +xmlUCSIsTags +xmlUCSIsTaiLe +xmlUCSIsTaiXuanJingSymbols +xmlUCSIsTamil +xmlUCSIsTelugu +xmlUCSIsThaana +xmlUCSIsThai +xmlUCSIsTibetan +xmlUCSIsUgaritic +xmlUCSIsUnifiedCanadianAboriginalSyllabics +xmlUCSIsVariationSelectors +xmlUCSIsVariationSelectorsSupplement +xmlUCSIsYiRadicals +xmlUCSIsYiSyllables +xmlUCSIsYijingHexagramSymbols +xmlURIEscape +xmlURIEscapeStr +xmlURIUnescapeString +xmlUTF8Charcmp +xmlUTF8Size +xmlUTF8Strlen +xmlUTF8Strloc +xmlUTF8Strndup +xmlUTF8Strpos +xmlUTF8Strsize +xmlUTF8Strsub +xmlUnlinkNode +xmlUnlockLibrary +xmlUnsetNsProp +xmlUnsetProp +xmlValidBuildContentModel +xmlValidCtxtNormalizeAttributeValue +xmlValidGetPotentialChildren +xmlValidGetValidElements +xmlValidNormalizeAttributeValue +xmlValidateAttributeDecl +xmlValidateAttributeValue +xmlValidateDocument +xmlValidateDocumentFinal +xmlValidateDtd +xmlValidateDtdFinal +xmlValidateElement +xmlValidateElementDecl +xmlValidateNCName +xmlValidateNMToken +xmlValidateName +xmlValidateNameValue +xmlValidateNamesValue +xmlValidateNmtokenValue +xmlValidateNmtokensValue +xmlValidateNotationDecl +xmlValidateNotationUse +xmlValidateOneAttribute +xmlValidateOneElement +xmlValidateOneNamespace +xmlValidatePopElement +xmlValidatePushCData +xmlValidatePushElement +xmlValidateQName +xmlValidateRoot +xmlXIncludeFreeContext +xmlXIncludeNewContext +xmlXIncludeProcess +xmlXIncludeProcessFlags +xmlXIncludeProcessNode +xmlXIncludeProcessTree +xmlXIncludeProcessTreeFlags +xmlXIncludeSetFlags +xmlXPathAddValues +xmlXPathBooleanFunction +xmlXPathCastBooleanToNumber +xmlXPathCastBooleanToString +xmlXPathCastNodeSetToBoolean +xmlXPathCastNodeSetToNumber +xmlXPathCastNodeSetToString +xmlXPathCastNodeToNumber +xmlXPathCastNodeToString +xmlXPathCastNumberToBoolean +xmlXPathCastNumberToString +xmlXPathCastStringToBoolean +xmlXPathCastStringToNumber +xmlXPathCastToBoolean +xmlXPathCastToNumber +xmlXPathCastToString +xmlXPathCeilingFunction +xmlXPathCmpNodes +xmlXPathCompareValues +xmlXPathCompile +xmlXPathCompiledEval +xmlXPathConcatFunction +xmlXPathContainsFunction +xmlXPathConvertBoolean +xmlXPathConvertNumber +xmlXPathConvertString +xmlXPathCountFunction +xmlXPathCtxtCompile +xmlXPathDebugDumpCompExpr +xmlXPathDebugDumpObject +xmlXPathDifference +xmlXPathDistinct +xmlXPathDistinctSorted +xmlXPathDivValues +xmlXPathEqualValues +xmlXPathErr +xmlXPathEval +xmlXPathEvalExpr +xmlXPathEvalExpression +xmlXPathEvalPredicate +xmlXPathEvaluatePredicateResult +xmlXPathFalseFunction +xmlXPathFloorFunction +xmlXPathFreeCompExpr +xmlXPathFreeContext +xmlXPathFreeNodeSet +xmlXPathFreeNodeSetList +xmlXPathFreeObject +xmlXPathFreeParserContext +xmlXPathFunctionLookup +xmlXPathFunctionLookupNS +xmlXPathHasSameNodes +xmlXPathIdFunction +xmlXPathInit +xmlXPathIntersection +xmlXPathIsInf +xmlXPathIsNaN +xmlXPathIsNodeType +xmlXPathLangFunction +xmlXPathLastFunction +xmlXPathLeading +xmlXPathLeadingSorted +xmlXPathLocalNameFunction +xmlXPathModValues +xmlXPathMultValues +xmlXPathNamespaceURIFunction +xmlXPathNewBoolean +xmlXPathNewCString +xmlXPathNewContext +xmlXPathNewFloat +xmlXPathNewNodeSet +xmlXPathNewNodeSetList +xmlXPathNewParserContext +xmlXPathNewString +xmlXPathNewValueTree +xmlXPathNextAncestor +xmlXPathNextAncestorOrSelf +xmlXPathNextAttribute +xmlXPathNextChild +xmlXPathNextDescendant +xmlXPathNextDescendantOrSelf +xmlXPathNextFollowing +xmlXPathNextFollowingSibling +xmlXPathNextNamespace +xmlXPathNextParent +xmlXPathNextPreceding +xmlXPathNextPrecedingSibling +xmlXPathNextSelf +xmlXPathNodeLeading +xmlXPathNodeLeadingSorted +xmlXPathNodeSetAdd +xmlXPathNodeSetAddNs +xmlXPathNodeSetAddUnique +xmlXPathNodeSetContains +xmlXPathNodeSetCreate +xmlXPathNodeSetDel +xmlXPathNodeSetFreeNs +xmlXPathNodeSetMerge +xmlXPathNodeSetRemove +xmlXPathNodeSetSort +xmlXPathNodeTrailing +xmlXPathNodeTrailingSorted +xmlXPathNormalizeFunction +xmlXPathNotEqualValues +xmlXPathNotFunction +xmlXPathNsLookup +xmlXPathNumberFunction +xmlXPathObjectCopy +xmlXPathOrderDocElems +xmlXPathParseNCName +xmlXPathParseName +xmlXPathPopBoolean +xmlXPathPopExternal +xmlXPathPopNodeSet +xmlXPathPopNumber +xmlXPathPopString +xmlXPathPositionFunction +xmlXPathRegisterAllFunctions +xmlXPathRegisterFunc +xmlXPathRegisterFuncLookup +xmlXPathRegisterFuncNS +xmlXPathRegisterNs +xmlXPathRegisterVariable +xmlXPathRegisterVariableLookup +xmlXPathRegisterVariableNS +xmlXPathRegisteredFuncsCleanup +xmlXPathRegisteredNsCleanup +xmlXPathRegisteredVariablesCleanup +xmlXPathRoot +xmlXPathRoundFunction +xmlXPathStartsWithFunction +xmlXPathStringEvalNumber +xmlXPathStringFunction +xmlXPathStringLengthFunction +xmlXPathSubValues +xmlXPathSubstringAfterFunction +xmlXPathSubstringBeforeFunction +xmlXPathSubstringFunction +xmlXPathSumFunction +xmlXPathTrailing +xmlXPathTrailingSorted +xmlXPathTranslateFunction +xmlXPathTrueFunction +xmlXPathValueFlipSign +xmlXPathVariableLookup +xmlXPathVariableLookupNS +xmlXPathWrapCString +xmlXPathWrapExternal +xmlXPathWrapNodeSet +xmlXPathWrapString +xmlXPatherror +xmlXPtrBuildNodeList +xmlXPtrEval +xmlXPtrEvalRangePredicate +xmlXPtrFreeLocationSet +xmlXPtrLocationSetAdd +xmlXPtrLocationSetCreate +xmlXPtrLocationSetDel +xmlXPtrLocationSetMerge +xmlXPtrLocationSetRemove +xmlXPtrNewCollapsedRange +xmlXPtrNewContext +xmlXPtrNewLocationSetNodeSet +xmlXPtrNewLocationSetNodes +xmlXPtrNewRange +xmlXPtrNewRangeNodeObject +xmlXPtrNewRangeNodePoint +xmlXPtrNewRangeNodes +xmlXPtrNewRangePointNode +xmlXPtrNewRangePoints +xmlXPtrRangeToFunction +xmlXPtrWrapLocationSet diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index b9980ed9c..98df11f48 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.58.2.2 2005/10/28 07:52:58 hyanantha Exp $ +dnl $Id: config.m4,v 1.58.2.3 2005/12/23 15:18:52 hirokawa Exp $ dnl AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ @@ -237,6 +237,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/nls/nls_uni.c libmbfl/nls/nls_zh.c libmbfl/nls/nls_hy.c + libmbfl/nls/nls_tr.c ]) PHP_MBSTRING_ADD_CFLAG([-DHAVE_CONFIG_H]) else diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32 index 6fc28084c..c4976a9c9 100644 --- a/ext/mbstring/config.w32 +++ b/ext/mbstring/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.10 2005/03/22 22:22:08 moriyoshi Exp $ +// $Id: config.w32,v 1.10.2.1 2005/12/23 15:18:52 hirokawa Exp $ // vim:ft=javascript ARG_ENABLE("mbstring", "multibyte string functions", "no"); @@ -40,7 +40,7 @@ if (PHP_MBSTRING == "yes") { ADD_SOURCES("ext/mbstring/libmbfl/nls", "nls_de.c nls_en.c nls_ja.c \ nls_kr.c nls_neutral.c nls_ru.c nls_uni.c nls_zh.c nls_hy.c \ - ", "mbstring"); + nls_tr.c", "mbstring"); AC_DEFINE('HAVE_MBSTRING', 1, 'Have mbstring support'); AC_DEFINE('HAVE_MBSTR_CN', 1, 'CN'); diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 0e7072fda..ec3409d8e 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -336,7 +336,7 @@ mbfl_buffer_converter_feed_result(mbfl_buffer_converter *convd, mbfl_string *str * encoding detector */ mbfl_encoding_detector * -mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz) +mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz, int strict) { mbfl_encoding_detector *identd; @@ -371,6 +371,9 @@ mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz) } identd->filter_list_size = num; + /* set strict flag */ + identd->strict = strict; + return identd; } @@ -441,10 +444,24 @@ enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *ident while (n >= 0) { filter = identd->filter_list[n]; if (!filter->flag) { + if (identd->strict && filter->status) { + continue; + } encoding = filter->encoding->no_encoding; } n--; } + + if (encoding == mbfl_no_encoding_invalid) { + n = identd->filter_list_size - 1; + while (n >= 0) { + filter = identd->filter_list[n]; + if (!filter->flag) { + encoding = filter->encoding->no_encoding; + } + n--; + } + } } return encoding; @@ -576,11 +593,25 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el for (i = 0; i < num; i++) { filter = &flist[i]; if (!filter->flag) { + if (strict && filter->status) { + continue; + } encoding = filter->encoding; break; } } + /* fall-back judge */ + if (!encoding) { + for (i = 0; i < num; i++) { + filter = &flist[i]; + if (!filter->flag) { + encoding = filter->encoding; + break; + } + } + } + /* cleanup */ /* dtors should be called in reverse order */ i = num; while (--i >= 0) { @@ -608,11 +639,11 @@ mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, i } enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz) +mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) { const mbfl_encoding *encoding; - encoding = mbfl_identify_encoding(string, elist, elistsz, 0); + encoding = mbfl_identify_encoding(string, elist, elistsz, strict); if (encoding != NULL && encoding->no_encoding > mbfl_no_encoding_charset_min && encoding->no_encoding < mbfl_no_encoding_charset_max) { diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index d0965251a..702079ac4 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -138,9 +138,10 @@ typedef struct _mbfl_encoding_detector mbfl_encoding_detector; struct _mbfl_encoding_detector { mbfl_identify_filter **filter_list; int filter_list_size; + int strict; }; -MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz); +MBFLAPI extern mbfl_encoding_detector * mbfl_encoding_detector_new(enum mbfl_no_encoding *elist, int elistsz, int strict); MBFLAPI extern void mbfl_encoding_detector_delete(mbfl_encoding_detector *identd); MBFLAPI extern int mbfl_encoding_detector_feed(mbfl_encoding_detector *identd, mbfl_string *string); MBFLAPI extern enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *identd); @@ -163,7 +164,7 @@ MBFLAPI extern const char * mbfl_identify_encoding_name(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); MBFLAPI extern enum mbfl_no_encoding -mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz); +mbfl_identify_encoding_no(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict); /* * strlen diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.c b/ext/mbstring/libmbfl/mbfl/mbfl_language.c index c5dab6550..aaeebbc8e 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.c @@ -59,6 +59,7 @@ #include "nls/nls_ru.h" #include "nls/nls_en.h" #include "nls/nls_hy.h" +#include "nls/nls_tr.h" #include "nls/nls_neutral.h" #ifndef HAVE_STRCASECMP @@ -77,6 +78,7 @@ static const mbfl_language *mbfl_language_ptr_table[] = { &mbfl_language_german, &mbfl_language_russian, &mbfl_language_armenian, + &mbfl_language_turkish, &mbfl_language_neutral, NULL }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_language.h b/ext/mbstring/libmbfl/mbfl/mbfl_language.h index f6b9ec208..caf1d8094 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_language.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_language.h @@ -58,6 +58,7 @@ enum mbfl_no_language { mbfl_no_language_traditional_chinese, /* zh-tw */ mbfl_no_language_russian, /* ru */ mbfl_no_language_armenian, /* hy */ + mbfl_no_language_turkish, /* tr */ mbfl_no_language_max }; diff --git a/ext/mbstring/libmbfl/nls/nls_tr.c b/ext/mbstring/libmbfl/nls/nls_tr.c new file mode 100644 index 000000000..c7044ff29 --- /dev/null +++ b/ext/mbstring/libmbfl/nls/nls_tr.c @@ -0,0 +1,21 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_STDDEF_H +#include +#endif + +#include "mbfilter.h" +#include "nls_tr.h" + +const mbfl_language mbfl_language_turkish = { + mbfl_no_language_turkish, + "Turkish", + "tr", + NULL, + mbfl_no_encoding_8859_9, + mbfl_no_encoding_qprint, + mbfl_no_encoding_8bit +}; + diff --git a/ext/mbstring/libmbfl/nls/nls_tr.h b/ext/mbstring/libmbfl/nls/nls_tr.h new file mode 100644 index 000000000..5c17f7daa --- /dev/null +++ b/ext/mbstring/libmbfl/nls/nls_tr.h @@ -0,0 +1,8 @@ +#ifndef MBFL_NLS_TR_H +#define MBFL_NLS_TR_H + +#include "mbfilter.h" + +extern const mbfl_language mbfl_language_turkish; + +#endif /* MBFL_NLS_TR_H */ diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 781da2c2f..2cf57b7fc 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mb_gpc.c,v 1.17 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: mb_gpc.c,v 1.17.2.2 2006/01/01 12:50:08 sniper Exp $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H @@ -266,7 +266,7 @@ enum mbfl_no_encoding _php_mb_encoding_handler_ex(const php_mb_encoding_handler_ } else { /* auto detect */ from_encoding = mbfl_no_encoding_invalid; - identd = mbfl_encoding_detector_new((enum mbfl_no_encoding *)info->from_encodings, info->num_from_encodings); + identd = mbfl_encoding_detector_new((enum mbfl_no_encoding *)info->from_encodings, info->num_from_encodings, MBSTRG(strict_detection)); if (identd) { n = 0; while (n < num) { diff --git a/ext/mbstring/mb_gpc.h b/ext/mbstring/mb_gpc.h index 32bb3b551..fdeb595d0 100644 --- a/ext/mbstring/mb_gpc.h +++ b/ext/mbstring/mb_gpc.h @@ -4,10 +4,10 @@ +----------------------------------------------------------------------+ | Copyright (c) 2001 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mb_gpc.h,v 1.5 2005/01/16 15:55:17 moriyoshi Exp $ */ +/* $Id: mb_gpc.h,v 1.5.2.1 2006/01/01 12:50:08 sniper Exp $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 6169888ee..8adce024f 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.224.2.5 2005/11/25 21:55:25 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.224.2.12 2006/01/01 12:50:08 sniper Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -135,6 +135,12 @@ static const enum mbfl_no_encoding php_mb_default_identify_list_hy[] = { mbfl_no_encoding_armscii8 }; +static const enum mbfl_no_encoding php_mb_default_identify_list_tr[] = { + mbfl_no_encoding_ascii, + mbfl_no_encoding_utf8, + mbfl_no_encoding_8859_9 +}; + static const enum mbfl_no_encoding php_mb_default_identify_list_neut[] = { mbfl_no_encoding_ascii, mbfl_no_encoding_utf8 @@ -148,6 +154,7 @@ static const php_mb_nls_ident_list php_mb_default_identify_list[] = { { mbfl_no_language_simplified_chinese, php_mb_default_identify_list_cn, sizeof(php_mb_default_identify_list_cn) / sizeof(php_mb_default_identify_list_cn[0]) }, { mbfl_no_language_russian, php_mb_default_identify_list_ru, sizeof(php_mb_default_identify_list_ru) / sizeof(php_mb_default_identify_list_ru[0]) }, { mbfl_no_language_armenian, php_mb_default_identify_list_hy, sizeof(php_mb_default_identify_list_hy) / sizeof(php_mb_default_identify_list_hy[0]) }, + { mbfl_no_language_turkish, php_mb_default_identify_list_tr, sizeof(php_mb_default_identify_list_tr) / sizeof(php_mb_default_identify_list_tr[0]) }, { mbfl_no_language_neutral, php_mb_default_identify_list_neut, sizeof(php_mb_default_identify_list_neut) / sizeof(php_mb_default_identify_list_neut[0]) } }; @@ -180,8 +187,8 @@ static const struct mb_overload_def mb_ovld[] = { }; /* }}} */ -/* {{{ function_entry mbstring_functions[] */ -function_entry mbstring_functions[] = { +/* {{{ zend_function_entry mbstring_functions[] */ +zend_function_entry mbstring_functions[] = { PHP_FE(mb_convert_case, NULL) PHP_FE(mb_strtoupper, NULL) PHP_FE(mb_strtolower, NULL) @@ -734,6 +741,9 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("mbstring.encoding_translation", "0", PHP_INI_SYSTEM | PHP_INI_PERDIR, OnUpdate_mbstring_encoding_translation, encoding_translation, zend_mbstring_globals, mbstring_globals) + + STD_PHP_INI_BOOLEAN("mbstring.strict_detection", "0", + PHP_INI_ALL, OnUpdateLong, strict_detection, zend_mbstring_globals, mbstring_globals) PHP_INI_END() /* }}} */ @@ -769,6 +779,7 @@ static void _php_mb_globals_ctor(zend_mbstring_globals *pglobals TSRMLS_DC) MBSTRG(current_filter_illegal_substchar) = 0x3f; /* '?' */ MBSTRG(func_overload) = 0; MBSTRG(encoding_translation) = 0; + MBSTRG(strict_detection) = 0; pglobals->outconv = NULL; #if HAVE_MBREGEX _php_mb_regex_globals_ctor(pglobals TSRMLS_CC); @@ -888,6 +899,9 @@ PHP_RINIT_FUNCTION(mbstring) case mbfl_no_language_armenian: default_enc = "ArmSCII-8"; break; + case mbfl_no_language_turkish: + default_enc = "ISO-8859-9"; + break; case mbfl_no_language_english: default: default_enc = "ISO-8859-1"; @@ -1763,6 +1777,11 @@ PHP_FUNCTION(mb_substr) } } + if (((MBSTRG(func_overload) & MB_OVERLOAD_STRING) == MB_OVERLOAD_STRING) + && (from >= mbfl_strlen(&string))) { + RETURN_FALSE; + } + ret = mbfl_substr(&string, &result, from, len); if (ret != NULL) { RETVAL_STRINGL((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */ @@ -1776,7 +1795,7 @@ PHP_FUNCTION(mb_substr) Returns part of a string */ PHP_FUNCTION(mb_strcut) { - pval **arg1, **arg2, **arg3, **arg4; + zval **arg1, **arg2, **arg3, **arg4; int argc, from, len; mbfl_string string, result, *ret; @@ -1844,6 +1863,13 @@ PHP_FUNCTION(mb_strcut) } } + if (from > Z_STRLEN_PP(arg1)) { + RETURN_FALSE; + } + if (((unsigned) from + (unsigned) len) > Z_STRLEN_PP(arg1)) { + len = Z_STRLEN_PP(arg1) - from; + } + ret = mbfl_strcut(&string, &result, from, len); if (ret != NULL) { RETVAL_STRINGL(ret->val, ret->len, 0); /* the string is already strdup()'ed */ @@ -1892,7 +1918,7 @@ PHP_FUNCTION(mb_strwidth) Trim the string in terminal width */ PHP_FUNCTION(mb_strimwidth) { - pval **arg1, **arg2, **arg3, **arg4, **arg5; + zval **arg1, **arg2, **arg3, **arg4, **arg5; int from, width; mbfl_string string, result, marker, *ret; @@ -2010,7 +2036,7 @@ MBSTRING_API char * php_mb_convert_encoding(char *input, size_t length, char *_t string.no_encoding = from_encoding; } else if (size > 1) { /* auto detect */ - from_encoding = mbfl_identify_encoding_no(&string, list, size); + from_encoding = mbfl_identify_encoding_no(&string, list, size, MBSTRG(strict_detection)); if (from_encoding != mbfl_no_encoding_invalid) { string.no_encoding = from_encoding; } else { @@ -2054,7 +2080,7 @@ MBSTRING_API char * php_mb_convert_encoding(char *input, size_t length, char *_t Returns converted string in desired encoding */ PHP_FUNCTION(mb_convert_encoding) { - pval **arg_str, **arg_new, **arg_old; + zval **arg_str, **arg_new, **arg_old; int i; size_t size, l, n; char *_from_encodings, *ret, *s_free = NULL; @@ -2198,7 +2224,7 @@ PHP_FUNCTION(mb_strtolower) Encodings of the given string is returned (as a string) */ PHP_FUNCTION(mb_detect_encoding) { - pval **arg_str, **arg_list, **arg_strict; + zval **arg_str, **arg_list, **arg_strict; mbfl_string string; const char *ret; enum mbfl_no_encoding *elist; @@ -2252,6 +2278,9 @@ PHP_FUNCTION(mb_detect_encoding) convert_to_long_ex(arg_strict); strict = Z_LVAL_PP(arg_strict); } + else { + strict = MBSTRG(strict_detection); + } if (size > 0 && list != NULL) { elist = list; @@ -2484,7 +2513,7 @@ PHP_FUNCTION(mb_convert_kana) Converts the string resource in variables to desired encoding */ PHP_FUNCTION(mb_convert_variables) { - pval ***args, ***stack, **var, **hash_entry; + zval ***args, ***stack, **var, **hash_entry; HashTable *target_hash; mbfl_string string, result, *ret; enum mbfl_no_encoding from_encoding, to_encoding; @@ -2499,7 +2528,7 @@ PHP_FUNCTION(mb_convert_variables) if (argc < 3) { WRONG_PARAM_COUNT; } - args = (pval ***)ecalloc(argc, sizeof(pval **)); + args = (zval ***)ecalloc(argc, sizeof(zval **)); if (zend_get_parameters_array_ex(argc, args) == FAILURE) { efree((void *)args); WRONG_PARAM_COUNT; @@ -2541,9 +2570,9 @@ PHP_FUNCTION(mb_convert_variables) /* auto detect */ from_encoding = mbfl_no_encoding_invalid; stack_max = PHP_MBSTR_STACK_BLOCK_SIZE; - stack = (pval ***)safe_emalloc(stack_max, sizeof(pval **), 0); + stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0); stack_level = 0; - identd = mbfl_encoding_detector_new(elist, elistsz); + identd = mbfl_encoding_detector_new(elist, elistsz, MBSTRG(strict_detection)); if (identd != NULL) { n = 2; while (n < argc || stack_level > 0) { @@ -2567,8 +2596,8 @@ PHP_FUNCTION(mb_convert_variables) if (Z_TYPE_PP(hash_entry) == IS_ARRAY || Z_TYPE_PP(hash_entry) == IS_OBJECT) { if (stack_level >= stack_max) { stack_max += PHP_MBSTR_STACK_BLOCK_SIZE; - ptmp = erealloc(stack, sizeof(pval **)*stack_max); - stack = (pval ***)ptmp; + ptmp = erealloc(stack, sizeof(zval **)*stack_max); + stack = (zval ***)ptmp; } stack[stack_level] = var; stack_level++; @@ -2624,7 +2653,7 @@ detect_end: /* convert */ if (convd != NULL) { stack_max = PHP_MBSTR_STACK_BLOCK_SIZE; - stack = (pval ***)safe_emalloc(stack_max, sizeof(pval **), 0); + stack = (zval ***)safe_emalloc(stack_max, sizeof(zval **), 0); stack_level = 0; n = 2; while (n < argc || stack_level > 0) { @@ -2648,8 +2677,8 @@ detect_end: if (Z_TYPE_PP(hash_entry) == IS_ARRAY || Z_TYPE_PP(hash_entry) == IS_OBJECT) { if (stack_level >= stack_max) { stack_max += PHP_MBSTR_STACK_BLOCK_SIZE; - ptmp = erealloc(stack, sizeof(pval **)*stack_max); - stack = (pval ***)ptmp; + ptmp = erealloc(stack, sizeof(zval **)*stack_max); + stack = (zval ***)ptmp; } stack[stack_level] = var; stack_level++; @@ -2707,7 +2736,7 @@ detect_end: static void php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) { - pval **arg1, **arg2, **arg3, **hash_entry; + zval **arg1, **arg2, **arg3, **hash_entry; HashTable *target_hash; int argc, i, *convmap, *mapelm, mapsize=0; mbfl_string string, result, *ret; @@ -3162,7 +3191,7 @@ PHP_FUNCTION(mb_send_mail) orig_str.no_encoding = MBSTRG(current_internal_encoding); if (orig_str.no_encoding == mbfl_no_encoding_invalid || orig_str.no_encoding == mbfl_no_encoding_pass) { - orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size)); + orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, head_enc, "\n", sizeof("Subject: [PHP-jp nnnnnnnn]")); if (pstr != NULL) { @@ -3182,7 +3211,7 @@ PHP_FUNCTION(mb_send_mail) if (orig_str.no_encoding == mbfl_no_encoding_invalid || orig_str.no_encoding == mbfl_no_encoding_pass) { - orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size)); + orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size), MBSTRG(strict_detection)); } pstr = NULL; @@ -3559,7 +3588,7 @@ MBSTRING_API int php_mb_gpc_encoding_detector(char **arg_string, int *arg_length mbfl_string_init(&string); string.no_language = MBSTRG(current_language); - identd = mbfl_encoding_detector_new(elist, size); + identd = mbfl_encoding_detector_new(elist, size, MBSTRG(strict_detection)); if (identd) { int n = 0; diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index f0eab49dc..2abcfe47f 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.h,v 1.66 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: mbstring.h,v 1.66.2.2 2006/01/01 12:50:08 sniper Exp $ */ /* * PHP 4 Multibyte String module "mbstring" (currently only for Japanese) @@ -180,6 +180,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring) int current_filter_illegal_substchar; long func_overload; zend_bool encoding_translation; + long strict_detection; mbfl_buffer_converter *outconv; #if HAVE_MBREGEX && defined(PHP_MBREGEX_GLOBALS) PHP_MBREGEX_GLOBALS diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index c67d77b0c..4a27aef48 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.c,v 1.53 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: php_mbregex.c,v 1.53.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h index 8c523b831..70460676f 100644 --- a/ext/mbstring/php_mbregex.h +++ b/ext/mbstring/php_mbregex.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.h,v 1.12 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: php_mbregex.h,v 1.12.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef _PHP_MBREGEX_H #define _PHP_MBREGEX_H diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 99eed1d8d..e65b4b4e2 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -44,6 +44,8 @@ #include "php_unicode.h" #include "unicode_data.h" +ZEND_EXTERN_MODULE_GLOBALS(mbstring) + /* * A simple array of 32-bit masks for lookup. */ @@ -142,7 +144,23 @@ static unsigned long case_lookup(unsigned long code, long l, long r, int field) return code; } -MBSTRING_API unsigned long php_unicode_toupper(unsigned long code) +MBSTRING_API unsigned long php_turkish_toupper(unsigned long code, long l, long r, int field) +{ + if (code == 0x0069L) { + return 0x0130L; + } + return case_lookup(code, l, r, field); +} + +MBSTRING_API unsigned long php_turkish_tolower(unsigned long code, long l, long r, int field) +{ + if (code == 0x0049L) { + return 0x0131L; + } + return case_lookup(code, l, r, field); +} + +MBSTRING_API unsigned long php_unicode_toupper(unsigned long code, enum mbfl_no_encoding enc TSRMLS_DC) { int field; long l, r; @@ -157,6 +175,12 @@ MBSTRING_API unsigned long php_unicode_toupper(unsigned long code) field = 2; l = _uccase_len[0]; r = (l + _uccase_len[1]) - 3; + + if (MBSTRG(current_language) == mbfl_no_language_turkish && + enc == mbfl_no_encoding_8859_9) { + return php_turkish_toupper(code, l, r, field); + } + } else { /* * The character is title case. @@ -168,7 +192,7 @@ MBSTRING_API unsigned long php_unicode_toupper(unsigned long code) return case_lookup(code, l, r, field); } -MBSTRING_API unsigned long php_unicode_tolower(unsigned long code) +MBSTRING_API unsigned long php_unicode_tolower(unsigned long code, enum mbfl_no_encoding enc TSRMLS_DC) { int field; long l, r; @@ -183,6 +207,12 @@ MBSTRING_API unsigned long php_unicode_tolower(unsigned long code) field = 1; l = 0; r = _uccase_len[0] - 3; + + if (MBSTRG(current_language) == mbfl_no_language_turkish && + enc == mbfl_no_encoding_8859_9) { + return php_turkish_tolower(code, l, r, field); + } + } else { /* * The character is title case. @@ -194,7 +224,7 @@ MBSTRING_API unsigned long php_unicode_tolower(unsigned long code) return case_lookup(code, l, r, field); } -MBSTRING_API unsigned long php_unicode_totitle(unsigned long code) +MBSTRING_API unsigned long php_unicode_totitle(unsigned long code, enum mbfl_no_encoding enc TSRMLS_DC) { int field; long l, r; @@ -246,25 +276,26 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t size_t unicode_len; unsigned char *unicode_ptr; size_t i; + enum mbfl_no_encoding _src_encoding = mbfl_name2no_encoding(src_encoding); unicode = php_mb_convert_encoding(srcstr, srclen, "UCS-4BE", src_encoding, &unicode_len TSRMLS_CC); if (unicode == NULL) return NULL; - unicode_ptr = unicode; + unicode_ptr = (unsigned char *)unicode; switch(case_mode) { case PHP_UNICODE_CASE_UPPER: for (i = 0; i < unicode_len; i+=4) { UINT32_TO_BE_ARY(&unicode_ptr[i], - php_unicode_toupper(BE_ARY_TO_UINT32(&unicode_ptr[i]))); + php_unicode_toupper(BE_ARY_TO_UINT32(&unicode_ptr[i]), _src_encoding TSRMLS_CC)); } break; case PHP_UNICODE_CASE_LOWER: for (i = 0; i < unicode_len; i+=4) { UINT32_TO_BE_ARY(&unicode_ptr[i], - php_unicode_tolower(BE_ARY_TO_UINT32(&unicode_ptr[i]))); + php_unicode_tolower(BE_ARY_TO_UINT32(&unicode_ptr[i]), _src_encoding TSRMLS_CC)); } break; @@ -278,7 +309,7 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t if (mode) { if (res) { UINT32_TO_BE_ARY(&unicode_ptr[i], - php_unicode_tolower(BE_ARY_TO_UINT32(&unicode_ptr[i]))); + php_unicode_tolower(BE_ARY_TO_UINT32(&unicode_ptr[i]), _src_encoding TSRMLS_CC)); } else { mode = 0; } @@ -286,7 +317,7 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t if (res) { mode = 1; UINT32_TO_BE_ARY(&unicode_ptr[i], - php_unicode_totitle(BE_ARY_TO_UINT32(&unicode_ptr[i]))); + php_unicode_totitle(BE_ARY_TO_UINT32(&unicode_ptr[i]), _src_encoding TSRMLS_CC)); } } } diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h index 6e3c5c1f7..6ed23e23b 100644 --- a/ext/mbstring/php_unicode.h +++ b/ext/mbstring/php_unicode.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/mbstring/tests/bug28220.phpt b/ext/mbstring/tests/bug28220.phpt index 563e2da74..f195606a1 100644 --- a/ext/mbstring/tests/bug28220.phpt +++ b/ext/mbstring/tests/bug28220.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #28220 (mb_strwidth() returns wrong width values for some Hangul characters) +--SKIPIF-- + --FILE-- --FILE-- 0x20ac, 0xa5 => 0x20af, 0xaa => 0x037a)); diff --git a/ext/mbstring/tests/bug31911.phpt b/ext/mbstring/tests/bug31911.phpt index eb6438d4e..48d497175 100644 --- a/ext/mbstring/tests/bug31911.phpt +++ b/ext/mbstring/tests/bug31911.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes) +--SKIPIF-- + --FILE-- | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c,v 1.91 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: mcrypt.c,v 1.91.2.3 2006/01/01 12:50:08 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -38,7 +38,12 @@ static int le_mcrypt; -function_entry mcrypt_functions[] = { +typedef struct _php_mcrypt { + MCRYPT td; + zend_bool init; +} php_mcrypt; + +zend_function_entry mcrypt_functions[] = { PHP_FE(mcrypt_ecb, NULL) PHP_FE(mcrypt_cbc, NULL) PHP_FE(mcrypt_cfb, NULL) @@ -194,11 +199,11 @@ ZEND_GET_MODULE(mcrypt) #define MCRYPT_GET_TD_ARG \ zval **mcryptind; \ - MCRYPT td; \ + php_mcrypt *pm; \ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &mcryptind) == FAILURE) { \ WRONG_PARAM_COUNT \ } \ - ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt); + ZEND_FETCH_RESOURCE (pm, php_mcrypt *, mcryptind, -1, "MCrypt", le_mcrypt); #define MCRYPT_GET_MODE_DIR_ARGS(DIRECTORY) \ char *dir = NULL; \ @@ -215,6 +220,12 @@ ZEND_GET_MODULE(mcrypt) #define MCRYPT_ENTRY2_2_4(a,b) REGISTER_STRING_CONSTANT("MCRYPT_" #a, b, CONST_PERSISTENT) #define MCRYPT_ENTRY2_4(a) MCRYPT_ENTRY_NAMED(a, a) +#define PHP_MCRYPT_INIT_CHECK \ + if (!pm->init) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Operation disallowed prior to mcrypt_generic_init()."); \ + RETURN_FALSE; \ + } \ + PHP_INI_BEGIN() STD_PHP_INI_ENTRY("mcrypt.algorithms_dir", NULL, PHP_INI_ALL, OnUpdateString, algorithms_dir, zend_mcrypt_globals, mcrypt_globals) STD_PHP_INI_ENTRY("mcrypt.modes_dir", NULL, PHP_INI_ALL, OnUpdateString, modes_dir, zend_mcrypt_globals, mcrypt_globals) @@ -222,9 +233,13 @@ PHP_INI_END() static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { - MCRYPT td = (MCRYPT) rsrc->ptr; - mcrypt_generic_deinit(td); - mcrypt_module_close (td); + php_mcrypt *pm = (php_mcrypt *) rsrc->ptr; + if (pm) { + mcrypt_generic_deinit(pm->td); + mcrypt_module_close(pm->td); + efree(pm); + pm = NULL; + } } @@ -357,6 +372,7 @@ PHP_FUNCTION(mcrypt_module_open) int cipher_len, cipher_dir_len; int mode_len, mode_dir_len; MCRYPT td; + php_mcrypt *pm; if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "ssss", &cipher, &cipher_len, &cipher_dir, &cipher_dir_len, @@ -375,7 +391,10 @@ PHP_FUNCTION(mcrypt_module_open) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not open encryption module"); RETURN_FALSE; } else { - ZEND_REGISTER_RESOURCE(return_value, td, le_mcrypt); + pm = emalloc(sizeof(php_mcrypt)); + pm->td = td; + pm->init = 0; + ZEND_REGISTER_RESOURCE(return_value, pm, le_mcrypt); } } /* }}} */ @@ -389,7 +408,7 @@ PHP_FUNCTION(mcrypt_generic_init) zval **mcryptind; unsigned char *key_s, *iv_s; int max_key_size, key_size, iv_size; - MCRYPT td; + php_mcrypt *pm; int argc; int result = 0; @@ -397,12 +416,12 @@ PHP_FUNCTION(mcrypt_generic_init) MCRYPT_CHECK_PARAM_COUNT (3,3) zend_get_parameters_ex(3, &mcryptind, &key, &iv); - ZEND_FETCH_RESOURCE(td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt); + ZEND_FETCH_RESOURCE(pm, php_mcrypt *, mcryptind, -1, "MCrypt", le_mcrypt); convert_to_string_ex(key); convert_to_string_ex(iv); - max_key_size = mcrypt_enc_get_key_size(td); - iv_size = mcrypt_enc_get_iv_size(td); + max_key_size = mcrypt_enc_get_key_size(pm->td); + iv_size = mcrypt_enc_get_iv_size(pm->td); if (Z_STRLEN_PP(key) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Key size is 0"); @@ -427,8 +446,8 @@ PHP_FUNCTION(mcrypt_generic_init) } memcpy(iv_s, Z_STRVAL_PP(iv), iv_size); - mcrypt_generic_deinit(td); - result = mcrypt_generic_init(td, key_s, key_size, iv_s); + mcrypt_generic_deinit(pm->td); + result = mcrypt_generic_init(pm->td, key_s, key_size, iv_s); /* If this function fails, close the mcrypt module to prevent crashes * when further functions want to access this resource */ @@ -447,6 +466,7 @@ PHP_FUNCTION(mcrypt_generic_init) break; } } + pm->init = 1; RETVAL_LONG(result); efree(iv_s); @@ -460,7 +480,7 @@ PHP_FUNCTION(mcrypt_generic_init) PHP_FUNCTION(mcrypt_generic) { zval **data, **mcryptind; - MCRYPT td; + php_mcrypt *pm; int argc; unsigned char* data_s; int block_size, data_size; @@ -469,12 +489,13 @@ PHP_FUNCTION(mcrypt_generic) MCRYPT_CHECK_PARAM_COUNT (2,2) zend_get_parameters_ex(2, &mcryptind, &data); - ZEND_FETCH_RESOURCE(td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt); + ZEND_FETCH_RESOURCE(pm, php_mcrypt *, mcryptind, -1, "MCrypt", le_mcrypt); + PHP_MCRYPT_INIT_CHECK convert_to_string_ex(data); /* Check blocksize */ - if (mcrypt_enc_is_block_mode(td) == 1) { /* It's a block algorithm */ - block_size = mcrypt_enc_get_block_size(td); + if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ + block_size = mcrypt_enc_get_block_size(pm->td); data_size = (((Z_STRLEN_PP(data) - 1) / block_size) + 1) * block_size; data_s = emalloc(data_size + 1); memset(data_s, 0, data_size); @@ -486,7 +507,7 @@ PHP_FUNCTION(mcrypt_generic) memcpy(data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data)); } - mcrypt_generic(td, data_s, data_size); + mcrypt_generic(pm->td, data_s, data_size); data_s[data_size] = '\0'; RETVAL_STRINGL(data_s, data_size, 1); @@ -500,7 +521,7 @@ PHP_FUNCTION(mcrypt_generic) PHP_FUNCTION(mdecrypt_generic) { zval **data, **mcryptind; - MCRYPT td; + php_mcrypt *pm; int argc; char* data_s; int block_size, data_size; @@ -509,12 +530,13 @@ PHP_FUNCTION(mdecrypt_generic) MCRYPT_CHECK_PARAM_COUNT (2,2) zend_get_parameters_ex(2, &mcryptind, &data); - ZEND_FETCH_RESOURCE(td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt); + ZEND_FETCH_RESOURCE(pm, php_mcrypt * , mcryptind, -1, "MCrypt", le_mcrypt); + PHP_MCRYPT_INIT_CHECK convert_to_string_ex(data); /* Check blocksize */ - if (mcrypt_enc_is_block_mode(td) == 1) { /* It's a block algorithm */ - block_size = mcrypt_enc_get_block_size(td); + if (mcrypt_enc_is_block_mode(pm->td) == 1) { /* It's a block algorithm */ + block_size = mcrypt_enc_get_block_size(pm->td); data_size = (((Z_STRLEN_PP(data) - 1) / block_size) + 1) * block_size; data_s = emalloc(data_size + 1); memset(data_s, 0, data_size); @@ -526,7 +548,7 @@ PHP_FUNCTION(mdecrypt_generic) memcpy(data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data)); } - mdecrypt_generic(td, data_s, data_size); + mdecrypt_generic(pm->td, data_s, data_size); RETVAL_STRINGL(data_s, data_size, 1); efree(data_s); @@ -544,7 +566,7 @@ PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes) MCRYPT_GET_TD_ARG array_init(return_value); - key_sizes = mcrypt_enc_get_supported_key_sizes(td, &count); + key_sizes = mcrypt_enc_get_supported_key_sizes(pm->td, &count); for (i = 0; i < count; i++) { add_index_long(return_value, i, key_sizes[i]); @@ -560,7 +582,7 @@ PHP_FUNCTION(mcrypt_enc_get_supported_key_sizes) PHP_FUNCTION(mcrypt_enc_self_test) { MCRYPT_GET_TD_ARG - RETURN_LONG(mcrypt_enc_self_test(td)); + RETURN_LONG(mcrypt_enc_self_test(pm->td)); } /* }}} */ @@ -591,7 +613,7 @@ PHP_FUNCTION(mcrypt_generic_deinit) { MCRYPT_GET_TD_ARG - if (mcrypt_generic_deinit(td) < 0) { + if (mcrypt_generic_deinit(pm->td) < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not terminate encryption specifier"); RETURN_FALSE } @@ -606,7 +628,7 @@ PHP_FUNCTION(mcrypt_enc_is_block_algorithm_mode) { MCRYPT_GET_TD_ARG - if (mcrypt_enc_is_block_algorithm_mode(td) == 1) { + if (mcrypt_enc_is_block_algorithm_mode(pm->td) == 1) { RETURN_TRUE } else { RETURN_FALSE @@ -621,7 +643,7 @@ PHP_FUNCTION(mcrypt_enc_is_block_algorithm) { MCRYPT_GET_TD_ARG - if (mcrypt_enc_is_block_algorithm(td) == 1) { + if (mcrypt_enc_is_block_algorithm(pm->td) == 1) { RETURN_TRUE } else { RETURN_FALSE @@ -636,7 +658,7 @@ PHP_FUNCTION(mcrypt_enc_is_block_mode) { MCRYPT_GET_TD_ARG - if (mcrypt_enc_is_block_mode(td) == 1) { + if (mcrypt_enc_is_block_mode(pm->td) == 1) { RETURN_TRUE } else { RETURN_FALSE @@ -650,7 +672,7 @@ PHP_FUNCTION(mcrypt_enc_is_block_mode) PHP_FUNCTION(mcrypt_enc_get_block_size) { MCRYPT_GET_TD_ARG - RETURN_LONG(mcrypt_enc_get_block_size(td)); + RETURN_LONG(mcrypt_enc_get_block_size(pm->td)); } /* }}} */ @@ -660,7 +682,7 @@ PHP_FUNCTION(mcrypt_enc_get_block_size) PHP_FUNCTION(mcrypt_enc_get_key_size) { MCRYPT_GET_TD_ARG - RETURN_LONG(mcrypt_enc_get_key_size(td)); + RETURN_LONG(mcrypt_enc_get_key_size(pm->td)); } /* }}} */ @@ -670,7 +692,7 @@ PHP_FUNCTION(mcrypt_enc_get_key_size) PHP_FUNCTION(mcrypt_enc_get_iv_size) { MCRYPT_GET_TD_ARG - RETURN_LONG(mcrypt_enc_get_iv_size(td)); + RETURN_LONG(mcrypt_enc_get_iv_size(pm->td)); } /* }}} */ @@ -682,7 +704,7 @@ PHP_FUNCTION(mcrypt_enc_get_algorithms_name) char *name; MCRYPT_GET_TD_ARG - name = mcrypt_enc_get_algorithms_name(td); + name = mcrypt_enc_get_algorithms_name(pm->td); RETVAL_STRING(name, 1); mcrypt_free(name); } @@ -696,7 +718,7 @@ PHP_FUNCTION(mcrypt_enc_get_modes_name) char *name; MCRYPT_GET_TD_ARG - name = mcrypt_enc_get_modes_name(td); + name = mcrypt_enc_get_modes_name(pm->td); RETVAL_STRING(name, 1); mcrypt_free(name); } diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h index a6bd1ffd0..bce9880f9 100644 --- a/ext/mcrypt/php_mcrypt.h +++ b/ext/mcrypt/php_mcrypt.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ | Derick Rethans | +----------------------------------------------------------------------+ */ -/* $Id: php_mcrypt.h,v 1.26 2005/08/03 14:07:24 sniper Exp $ */ +/* $Id: php_mcrypt.h,v 1.26.2.1 2006/01/01 12:50:08 sniper Exp $ */ #ifndef PHP_MCRYPT_H #define PHP_MCRYPT_H diff --git a/ext/mcrypt/tests/bug35496.phpt b/ext/mcrypt/tests/bug35496.phpt new file mode 100644 index 000000000..9d94ba4ca --- /dev/null +++ b/ext/mcrypt/tests/bug35496.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper init). +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 3 + +Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 4 diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c index 85c35be32..0d51c3899 100644 --- a/ext/mhash/mhash.c +++ b/ext/mhash/mhash.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ | Nikos Mavroyanopoulos (HMAC, KEYGEN) | +----------------------------------------------------------------------+ */ -/* $Id: mhash.c,v 1.48 2005/08/03 14:07:25 sniper Exp $ */ +/* $Id: mhash.c,v 1.48.2.2 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -33,7 +33,7 @@ #include "php_globals.h" #include "ext/standard/info.h" -function_entry mhash_functions[] = { +zend_function_entry mhash_functions[] = { PHP_FE(mhash_get_block_size, NULL) PHP_FE(mhash_get_hash_name, NULL) PHP_FE(mhash_keygen_s2k, NULL) diff --git a/ext/mhash/php_mhash.h b/ext/mhash/php_mhash.h index a48ff9da4..7a57bb55d 100644 --- a/ext/mhash/php_mhash.h +++ b/ext/mhash/php_mhash.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ | Nikos Mavroyanopoulos (HMAC, KEYGEN) | +----------------------------------------------------------------------+ */ -/* $Id: php_mhash.h,v 1.12 2005/08/03 14:07:25 sniper Exp $ */ +/* $Id: php_mhash.h,v 1.12.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHP_MHASH_H #define PHP_MHASH_H diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index fd87d1d4e..49a6a65e3 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe | +----------------------------------------------------------------------+ - $Id: mime_magic.c,v 1.42.2.3 2005/10/18 15:04:07 derick Exp $ + $Id: mime_magic.c,v 1.42.2.5 2006/01/01 12:50:09 sniper Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -218,7 +218,7 @@ ZEND_DECLARE_MODULE_GLOBALS(mime_magic) static magic_server_config_rec mime_global; /* {{{ mime_magic_functions[] */ -function_entry mime_magic_functions[] = { +zend_function_entry mime_magic_functions[] = { PHP_FE(mime_content_type, NULL) {NULL, NULL, NULL} }; diff --git a/ext/mime_magic/php_mime_magic.h b/ext/mime_magic/php_mime_magic.h index 6ccfe6973..1cbfa1028 100644 --- a/ext/mime_magic/php_mime_magic.h +++ b/ext/mime_magic/php_mime_magic.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: | +----------------------------------------------------------------------+ - $Id: php_mime_magic.h,v 1.11 2005/08/03 14:07:26 sniper Exp $ + $Id: php_mime_magic.h,v 1.11.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHP_MIME_MAGIC_H diff --git a/ext/mime_magic/phpmimemagic.h b/ext/mime_magic/phpmimemagic.h index b592d2440..4a875419a 100644 --- a/ext/mime_magic/phpmimemagic.h +++ b/ext/mime_magic/phpmimemagic.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: | +----------------------------------------------------------------------+ - $Id: phpmimemagic.h,v 1.3.2.1 2005/10/18 12:41:29 tony2001 Exp $ + $Id: phpmimemagic.h,v 1.3.2.2 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHPMIMEMAGIC_H diff --git a/ext/ming/config.m4 b/ext/ming/config.m4 index 1ee78103a..611b86504 100644 --- a/ext/ming/config.m4 +++ b/ext/ming/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.22.2.3 2005/11/24 00:51:42 helly Exp $ +dnl $Id: config.m4,v 1.22.2.6 2005/12/21 21:44:13 sniper Exp $ dnl PHP_ARG_WITH(ming, for MING support, @@ -9,7 +9,7 @@ if test "$PHP_MING" != "no"; then AC_CHECK_LIB(m, sin) for i in $PHP_MING /usr/local /usr; do - if test -f $i/$PHP_LIBDIR/libming.$SHLIB_SUFFIX_NAME -o -f $i/$PHP_LIBDIR/libming.a; then + if test -f $i/$PHP_LIBDIR/libming.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libming.a; then MING_DIR=$i break fi @@ -40,6 +40,10 @@ if test "$PHP_MING" != "no"; then PHP_ADD_INCLUDE($MING_INC_DIR) PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/$PHP_LIBDIR, MING_SHARED_LIBADD) + PHP_CHECK_LIBRARY(ming, SWFPrebuiltClip, [ AC_DEFINE(HAVE_SWFPREBUILTCLIP, 1, [ ]) ], [], []) + + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$MING_INC_DIR AC_MSG_CHECKING([for destroySWFBlock]) AC_TRY_RUN([ #include "ming.h" @@ -58,11 +62,7 @@ int main() { AC_MSG_RESULT([unknown]) ]) - PHP_CHECK_LIBRARY(ming, SWFPrebuiltClip, [ AC_DEFINE(HAVE_SWFPREBUILTCLIP, 1, [ ]) ], [], []) - dnl Check Ming version (FIXME: if/when ming has some better way to detect the version..) - old_CPPFLAGS=$CPPFLAGS - CPPFLAGS=-I$MING_INC_DIR AC_EGREP_CPP(yes, [ #include #ifdef SWF_SOUND_COMPRESSION @@ -72,14 +72,16 @@ yes AC_DEFINE(HAVE_NEW_MING, 1, [ ]) dnl FIXME: This is now unconditional..better check coming later. AC_DEFINE(HAVE_MING_ZLIB, 1, [ ]) - AC_TRY_COMPILE([ -#include -int main(int,void) { - SWFMovie_output(NULL, NULL, NULL, 0)); - return 0; -} - ], [ AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, []) ]) ]) + + dnl Check if SWFMovie_output() accepts the 4th parameter + AC_TRY_COMPILE([ +#include + ], [ +int main(void) { SWFMovie_output(NULL, NULL, NULL, 0); return 0; } + ], [ + AC_DEFINE(HAVE_MING_MOVIE_LEVEL, 1, [ ]) + ], []) CPPFLAGS=$old_CPPFLAGS PHP_NEW_EXTENSION(ming, ming.c, $ext_shared) diff --git a/ext/ming/ming.c b/ext/ming/ming.c index a5a031dd8..6d9d053a8 100644 --- a/ext/ming/ming.c +++ b/ext/ming/ming.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ming.c,v 1.79.2.2 2005/11/24 00:51:42 helly Exp $ */ +/* $Id: ming.c,v 1.79.2.3 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/ming/php_ming.h b/ext/ming/php_ming.h index 1ff7e2278..144e46b2b 100644 --- a/ext/ming/php_ming.h +++ b/ext/ming/php_ming.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ming.h,v 1.17 2005/08/03 14:07:27 sniper Exp $ */ +/* $Id: php_ming.h,v 1.17.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef _PHP_MING_H #define _PHP_MING_H diff --git a/ext/msession/msession.c b/ext/msession/msession.c index ffbe791c4..9f218300e 100644 --- a/ext/msession/msession.c +++ b/ext/msession/msession.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | msession 1.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -120,7 +120,7 @@ static int s_port=8086; static void * s_conn=NULL; static REQB * s_reqb=NULL; -function_entry msession_functions[] = { +zend_function_entry msession_functions[] = { PHP_FE(msession_connect,NULL) PHP_FE(msession_disconnect,NULL) PHP_FE(msession_lock,NULL) diff --git a/ext/msession/php_msession.h b/ext/msession/php_msession.h index c2f5f9b45..b41df742f 100644 --- a/ext/msession/php_msession.h +++ b/ext/msession/php_msession.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | msession 1.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/msession/reqclient.h b/ext/msession/reqclient.h index aa5220095..c8ff1c979 100644 --- a/ext/msession/reqclient.h +++ b/ext/msession/reqclient.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | msession 1.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index 13b35b529..7d328fdf0 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_msql.c,v 1.60 2005/08/03 14:07:28 sniper Exp $ */ +/* $Id: php_msql.c,v 1.60.2.4 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -46,7 +46,7 @@ static php_msql_globals msql_globals; /* {{{ msql_functions[] */ -function_entry msql_functions[] = { +zend_function_entry msql_functions[] = { PHP_FE(msql_connect, NULL) PHP_FE(msql_pconnect, NULL) PHP_FE(msql_close, NULL) @@ -243,9 +243,9 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) hashed_details_length=4+1; break; case 1: { - pval *yyhost; + zval *yyhost; - if (getParameters(ht, 1, &yyhost) == FAILURE) { + if (zend_get_parameters(ht, 1, &yyhost) == FAILURE) { RETURN_FALSE; } convert_to_string(yyhost); @@ -264,7 +264,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; if (msql_globals.max_links!=-1 && msql_globals.num_links>=msql_globals.max_links) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%d)", msql_globals.num_links); @@ -279,7 +279,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; /* create the link */ if ((msql=msqlConnect(host))==-1) { @@ -290,7 +290,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) /* hash it up */ Z_TYPE(new_le) = msql_globals.le_plink; new_le.ptr = (void *) msql; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } @@ -317,7 +317,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) } ZEND_REGISTER_RESOURCE(return_value, (void *) msql, msql_globals.le_plink); } else { - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual msql link sits. @@ -358,7 +358,7 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } @@ -401,7 +401,7 @@ PHP_FUNCTION(msql_pconnect) Close an mSQL connection */ PHP_FUNCTION(msql_close) { - pval *msql_link; + zval *msql_link; int id; int msql; @@ -410,7 +410,7 @@ PHP_FUNCTION(msql_close) id = msql_globals.default_link; break; case 1: - if (getParameters(ht, 1, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 1, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -440,19 +440,19 @@ PHP_FUNCTION(msql_close) Select an mSQL database */ PHP_FUNCTION(msql_select_db) { - pval *db,*msql_link; + zval *db,*msql_link; int id; int msql; switch(ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &db)==FAILURE) { + if (zend_get_parameters(ht, 1, &db)==FAILURE) { RETURN_FALSE; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 2: - if (getParameters(ht, 2, &db, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -479,19 +479,19 @@ PHP_FUNCTION(msql_select_db) Create an mSQL database */ PHP_FUNCTION(msql_create_db) { - pval *db,*msql_link; + zval *db,*msql_link; int id; int msql; switch(ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &db)==FAILURE) { + if (zend_get_parameters(ht, 1, &db)==FAILURE) { WRONG_PARAM_COUNT; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 2: - if (getParameters(ht, 2, &db, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &msql_link)==FAILURE) { WRONG_PARAM_COUNT; } id = -1; @@ -516,19 +516,19 @@ PHP_FUNCTION(msql_create_db) Drop (delete) an mSQL database */ PHP_FUNCTION(msql_drop_db) { - pval *db,*msql_link; + zval *db,*msql_link; int id; int msql; switch(ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &db)==FAILURE) { + if (zend_get_parameters(ht, 1, &db)==FAILURE) { WRONG_PARAM_COUNT; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 2: - if (getParameters(ht, 2, &db, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &msql_link)==FAILURE) { WRONG_PARAM_COUNT; } id = -1; @@ -553,20 +553,20 @@ PHP_FUNCTION(msql_drop_db) Send an SQL query to mSQL */ PHP_FUNCTION(msql_query) { - pval *query,*msql_link; + zval *query,*msql_link; int id; int msql; int af_rows; switch(ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &query)==FAILURE) { + if (zend_get_parameters(ht, 1, &query)==FAILURE) { WRONG_PARAM_COUNT; } id = msql_globals.default_link; break; case 2: - if (getParameters(ht, 2, &query, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 2, &query, &msql_link)==FAILURE) { WRONG_PARAM_COUNT; } id = -1; @@ -590,20 +590,20 @@ PHP_FUNCTION(msql_query) Send an SQL query to mSQL */ PHP_FUNCTION(msql_db_query) { - pval *db,*query,*msql_link; + zval *db,*query,*msql_link; int id; int msql; int af_rows; switch(ZEND_NUM_ARGS()) { case 2: - if (getParameters(ht, 2, &db, &query)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &query)==FAILURE) { RETURN_FALSE; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 3: - if (getParameters(ht, 3, &db, &query, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 3, &db, &query, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -632,7 +632,7 @@ PHP_FUNCTION(msql_db_query) List databases available on an mSQL server */ PHP_FUNCTION(msql_list_dbs) { - pval *msql_link; + zval *msql_link; int id; int msql; m_result *msql_result; @@ -642,7 +642,7 @@ PHP_FUNCTION(msql_list_dbs) id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 1: - if (getParameters(ht, 1, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 1, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -666,20 +666,20 @@ PHP_FUNCTION(msql_list_dbs) List tables in an mSQL database */ PHP_FUNCTION(msql_list_tables) { - pval *db,*msql_link; + zval *db,*msql_link; int id; int msql; m_result *msql_result; switch(ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &db)==FAILURE) { + if (zend_get_parameters(ht, 1, &db)==FAILURE) { RETURN_FALSE; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 2: - if (getParameters(ht, 2, &db, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -707,20 +707,20 @@ PHP_FUNCTION(msql_list_tables) List mSQL result fields */ PHP_FUNCTION(msql_list_fields) { - pval *db,*table,*msql_link; + zval *db,*table,*msql_link; int id; int msql; m_result *msql_result; switch(ZEND_NUM_ARGS()) { case 2: - if (getParameters(ht, 2, &db, &table)==FAILURE) { + if (zend_get_parameters(ht, 2, &db, &table)==FAILURE) { RETURN_FALSE; } id = php_msql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU); break; case 3: - if (getParameters(ht, 3, &db, &table, &msql_link)==FAILURE) { + if (zend_get_parameters(ht, 3, &db, &table, &msql_link)==FAILURE) { RETURN_FALSE; } id = -1; @@ -760,7 +760,7 @@ PHP_FUNCTION(msql_error) Get result data */ PHP_FUNCTION(msql_result) { - pval *result, *row, *field=NULL; + zval *result, *row, *field=NULL; m_result *msql_result; m_query *msql_query; m_row sql_row; @@ -768,12 +768,12 @@ PHP_FUNCTION(msql_result) switch (ZEND_NUM_ARGS()) { case 2: - if (getParameters(ht, 2, &result, &row)==FAILURE) { + if (zend_get_parameters(ht, 2, &result, &row)==FAILURE) { RETURN_FALSE; } break; case 3: - if (getParameters(ht, 3, &result, &row, &field)==FAILURE) { + if (zend_get_parameters(ht, 3, &result, &row, &field)==FAILURE) { RETURN_FALSE; } break; @@ -861,11 +861,11 @@ PHP_FUNCTION(msql_result) Get number of rows in a result */ PHP_FUNCTION(msql_num_rows) { - pval *result; + zval *result; m_result *msql_result; m_query *msql_query; - if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) { + if (ZEND_NUM_ARGS()!=1 || zend_get_parameters(ht, 1, &result)==FAILURE) { WRONG_PARAM_COUNT; } @@ -878,11 +878,11 @@ PHP_FUNCTION(msql_num_rows) Get number of fields in a result */ PHP_FUNCTION(msql_num_fields) { - pval *result; + zval *result; m_result *msql_result; m_query *msql_query; - if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) { + if (ZEND_NUM_ARGS()!=1 || zend_get_parameters(ht, 1, &result)==FAILURE) { WRONG_PARAM_COUNT; } @@ -895,7 +895,7 @@ PHP_FUNCTION(msql_num_fields) */ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) { - pval *result, *arg2; + zval *result, *arg2; m_result *msql_result; m_row msql_row; m_field *msql_field; @@ -905,7 +905,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) switch (ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &result)==FAILURE) { + if (zend_get_parameters(ht, 1, &result)==FAILURE) { RETURN_FALSE; } if (!result_type) { @@ -913,7 +913,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) } break; case 2: - if (getParameters(ht, 2, &result, &arg2)==FAILURE) { + if (zend_get_parameters(ht, 2, &result, &arg2)==FAILURE) { RETURN_FALSE; } convert_to_long(arg2); @@ -1002,11 +1002,11 @@ PHP_FUNCTION(msql_fetch_array) Move internal result pointer */ PHP_FUNCTION(msql_data_seek) { - pval *result,*offset; + zval *result,*offset; m_result *msql_result; m_query *msql_query; - if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) { + if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht, 2, &result, &offset)==FAILURE) { WRONG_PARAM_COUNT; } @@ -1068,19 +1068,19 @@ static char *php_msql_get_field_name(int field_type) Get column information from a result and return as an object */ PHP_FUNCTION(msql_fetch_field) { - pval *result, *field=NULL; + zval *result, *field=NULL; m_result *msql_result; m_field *msql_field; m_query *msql_query; switch (ZEND_NUM_ARGS()) { case 1: - if (getParameters(ht, 1, &result)==FAILURE) { + if (zend_get_parameters(ht, 1, &result)==FAILURE) { RETURN_FALSE; } break; case 2: - if (getParameters(ht, 2, &result, &field)==FAILURE) { + if (zend_get_parameters(ht, 2, &result, &field)==FAILURE) { RETURN_FALSE; } convert_to_long(field); @@ -1119,11 +1119,11 @@ PHP_FUNCTION(msql_fetch_field) Set result pointer to a specific field offset */ PHP_FUNCTION(msql_field_seek) { - pval *result, *offset; + zval *result, *offset; m_result *msql_result; m_query *msql_query; - if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &offset)==FAILURE) { + if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht, 2, &result, &offset)==FAILURE) { WRONG_PARAM_COUNT; } @@ -1152,12 +1152,12 @@ PHP_FUNCTION(msql_field_seek) */ static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { - pval *result, *field; + zval *result, *field; m_result *msql_result; m_field *msql_field; m_query *msql_query; - if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &result, &field)==FAILURE) { + if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht, 2, &result, &field)==FAILURE) { WRONG_PARAM_COUNT; } @@ -1280,11 +1280,11 @@ PHP_FUNCTION(msql_field_flags) Free result memory */ PHP_FUNCTION(msql_free_result) { - pval *result; + zval *result; m_result *msql_result; m_query *msql_query; - if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &result)==FAILURE) { + if (ZEND_NUM_ARGS()!=1 || zend_get_parameters(ht, 1, &result)==FAILURE) { WRONG_PARAM_COUNT; } @@ -1298,11 +1298,11 @@ PHP_FUNCTION(msql_free_result) Return number of affected rows */ PHP_FUNCTION(msql_affected_rows) { - pval *result; + zval *result; m_result *msql_result; m_query *msql_query; - if(ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &result) == FAILURE) { + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &result) == FAILURE) { WRONG_PARAM_COUNT; } MSQL_GET_QUERY(result); diff --git a/ext/msql/php_msql.h b/ext/msql/php_msql.h index b03e48c49..eb5a2a815 100644 --- a/ext/msql/php_msql.h +++ b/ext/msql/php_msql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_msql.h,v 1.13 2005/08/03 14:07:28 sniper Exp $ */ +/* $Id: php_msql.h,v 1.13.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHP_MSQL_H #define PHP_MSQL_H diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index e85c8dcd2..12c8a84bc 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.152.2.7 2005/11/18 21:23:20 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.152.2.12 2006/01/01 12:50:09 sniper Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -47,7 +47,7 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int static void _mssql_bind_hash_dtor(void *data); -function_entry mssql_functions[] = { +zend_function_entry mssql_functions[] = { PHP_FE(mssql_connect, NULL) PHP_FE(mssql_pconnect, NULL) PHP_FE(mssql_close, NULL) @@ -141,6 +141,9 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals) STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals) STD_PHP_INI_ENTRY_EX("mssql.max_procs", "-1", PHP_INI_ALL, OnUpdateLong, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers) +#ifdef HAVE_FREETDS + STD_PHP_INI_ENTRY("mssql.charset", "", PHP_INI_ALL, OnUpdateString, charset, zend_mssql_globals, mssql_globals) +#endif PHP_INI_END() /* error handler */ @@ -170,7 +173,7 @@ static int php_mssql_message_handler(DBPROCESS *dbproc, DBINT msgno,int msgstate return 0; } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == le_result) { mssql_link *mssql_ptr = ((mssql_result *) le->ptr)->mssql_ptr; @@ -495,7 +498,9 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) #endif #ifdef HAVE_FREETDS - DBSETLCHARSET(mssql.login, "ISO-8859-1"); + if (MS_SQL_G(charset) && strlen(MS_SQL_G(charset))) { + DBSETLCHARSET(mssql.login, MS_SQL_G(charset)); + } #endif DBSETLAPP(mssql.login,MS_SQL_G(appname)); @@ -510,11 +515,11 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (new_link || zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length + 1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (MS_SQL_G(max_links) != -1 && MS_SQL_G(num_links) >= MS_SQL_G(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MS_SQL_G(num_links)); @@ -566,7 +571,7 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) memcpy(mssql_ptr, &mssql, sizeof(mssql_link)); Z_TYPE(new_le) = le_plink; new_le.ptr = mssql_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1, &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { free(mssql_ptr); efree(hashed_details); dbfreelogin(mssql.login); @@ -619,7 +624,7 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } ZEND_REGISTER_RESOURCE(return_value, mssql_ptr, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual mssql link sits. @@ -696,7 +701,7 @@ static void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1,(void *) &new_index_ptr, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { efree(hashed_details); RETURN_FALSE; } @@ -1009,7 +1014,7 @@ static void _mssql_get_sp_result(mssql_link *mssql_ptr, mssql_statement *stateme /* Now to fetch RETVAL and OUTPUT values*/ num_rets = dbnumrets(mssql_ptr->link); - + if (num_rets!=0) { for (i = 1; i <= num_rets; i++) { parameter = (char*)dbretname(mssql_ptr->link, i); diff --git a/ext/mssql/php_mssql.h b/ext/mssql/php_mssql.h index 088dd329f..403817593 100644 --- a/ext/mssql/php_mssql.h +++ b/ext/mssql/php_mssql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ */ -/* $Id: php_mssql.h,v 1.42 2005/08/08 21:32:18 fmk Exp $ */ +/* $Id: php_mssql.h,v 1.42.2.3 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHP_MSSQL_H #define PHP_MSSQL_H @@ -158,11 +158,14 @@ ZEND_BEGIN_MODULE_GLOBALS(mssql) zend_bool allow_persistent; char *appname; char *server_message; +#ifdef HAVE_FREETDS + char *charset; +#endif long min_error_severity, min_message_severity; long cfg_min_error_severity, cfg_min_message_severity; long connect_timeout, timeout; zend_bool compatability_mode; - void (*get_column_content)(mssql_link *mssql_ptr,int offset,pval *result,int column_type TSRMLS_DC); + void (*get_column_content)(mssql_link *mssql_ptr,int offset,zval *result,int column_type TSRMLS_DC); long textsize, textlimit, batchsize; zend_bool datetimeconvert; HashTable *resource_list, *resource_plist; @@ -180,7 +183,7 @@ typedef struct mssql_field { } mssql_field; typedef struct mssql_result { - pval **data; + zval **data; mssql_field *fields; mssql_link *mssql_ptr; mssql_statement * statement; diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 163d3c514..106f45871 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.213.2.2 2005/09/04 17:10:56 wez Exp $ */ +/* $Id: php_mysql.c,v 1.213.2.6 2006/01/01 12:50:09 sniper Exp $ */ /* TODO: * @@ -123,7 +123,7 @@ typedef struct _php_mysql_conn { /* {{{ mysql_functions[] */ -function_entry mysql_functions[] = { +zend_function_entry mysql_functions[] = { PHP_FE(mysql_connect, NULL) PHP_FE(mysql_pconnect, NULL) PHP_FE(mysql_close, NULL) @@ -661,11 +661,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (MySG(max_links)!=-1 && MySG(num_links)>=MySG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MySG(num_links)); @@ -705,7 +705,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = mysql; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { free(mysql); efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); @@ -748,7 +748,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } ZEND_REGISTER_RESOURCE(return_value, mysql, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual mysql link sits. @@ -813,7 +813,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { efree(hashed_details); MYSQL_DO_CONNECT_RETURN_FALSE(); } @@ -2188,6 +2188,9 @@ static char *php_mysql_get_field_name(int field_type) case FIELD_TYPE_FLOAT: case FIELD_TYPE_DOUBLE: case FIELD_TYPE_DECIMAL: +#ifdef FIELD_TYPE_NEWDECIMAL + case FIELD_TYPE_NEWDECIMAL: +#endif return "real"; break; case FIELD_TYPE_TIMESTAMP: @@ -2199,11 +2202,25 @@ static char *php_mysql_get_field_name(int field_type) break; #endif case FIELD_TYPE_DATE: +#ifdef FIELD_TYPE_NEWDATE + case FIELD_TYPE_NEWDATE: +#endif return "date"; break; case FIELD_TYPE_TIME: return "time"; break; + case FIELD_TYPE_SET: + return "set"; + break; + case FIELD_TYPE_ENUM: + return "enum"; + break; +#ifdef FIELD_TYPE_GEOMETRY + case FIELD_TYPE_GEOMETRY: + return "geometry"; + break; +#endif case FIELD_TYPE_DATETIME: return "datetime"; break; diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h index 739cff7b1..a4d900551 100644 --- a/ext/mysql/php_mysql.h +++ b/ext/mysql/php_mysql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ */ -/* $Id: php_mysql.h,v 1.37 2005/08/03 14:07:30 sniper Exp $ */ +/* $Id: php_mysql.h,v 1.37.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef PHP_MYSQL_H #define PHP_MYSQL_H diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4 index bfb978bac..a249bb82b 100644 --- a/ext/mysqli/config.m4 +++ b/ext/mysqli/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.22 2005/06/07 12:39:02 sniper Exp $ +dnl $Id: config.m4,v 1.22.2.1 2005/11/29 17:32:40 sniper Exp $ dnl config.m4 for extension mysqli PHP_ARG_WITH(mysqli, for MySQLi support, @@ -30,8 +30,8 @@ dnl fi fi if test -x "$MYSQL_CONFIG" && $MYSQL_CONFIG $MYSQL_LIB_CFG > /dev/null 2>&1; then - MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | sed -e "s/'//g"` - MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | sed -e "s/'//g"` + MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | $SED -e "s/'//g"` + MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | $SED -e "s/'//g"` else AC_MSG_RESULT([mysql_config not found]) AC_MSG_ERROR([Please reinstall the mysql distribution]) diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index c09207c13..b968639ec 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli.c,v 1.72.2.5 2005/11/15 14:28:40 dmitry Exp $ + $Id: mysqli.c,v 1.72.2.7 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -155,11 +155,11 @@ static void mysqli_objects_destroy_object(void *object, zend_object_handle handl MY_STMT *stmt = (MY_STMT *)my_res->ptr; php_clear_stmt_bind(stmt); } - } else if (instanceof_function(intern->zo.ce, mysqli_result_class_entry TSRMLS_CC)) { /* stmt object */ + } else if (instanceof_function(intern->zo.ce, mysqli_result_class_entry TSRMLS_CC)) { /* result object */ if (my_res && my_res->ptr) { mysql_free_result(my_res->ptr); } - } else if (instanceof_function(intern->zo.ce, mysqli_warning_class_entry TSRMLS_CC)) { /* stmt object */ + } else if (instanceof_function(intern->zo.ce, mysqli_warning_class_entry TSRMLS_CC)) { /* warning object */ if (my_res && my_res->ptr) { php_clear_warnings((MYSQLI_WARNING *)my_res->info); } @@ -459,7 +459,7 @@ PHP_MINIT_FUNCTION(mysqli) zend_hash_init(&mysqli_driver_properties, 0, NULL, NULL, 1); MYSQLI_ADD_PROPERTIES(&mysqli_driver_properties, mysqli_driver_property_entries); zend_hash_add(&classes, ce->name, ce->name_length+1, &mysqli_driver_properties, sizeof(mysqli_driver_properties), NULL); - ce->ce_flags |= ZEND_ACC_FINAL_CLASS; + ce->ce_flags |= ZEND_ACC_FINAL_CLASS; REGISTER_MYSQLI_CLASS_ENTRY("mysqli", mysqli_link_class_entry, mysqli_link_methods); ce = mysqli_link_class_entry; @@ -469,7 +469,7 @@ PHP_MINIT_FUNCTION(mysqli) REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", mysqli_warning_class_entry, mysqli_warning_methods); ce = mysqli_warning_class_entry; - ce->ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED; + ce->ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED; zend_hash_init(&mysqli_warning_properties, 0, NULL, NULL, 1); MYSQLI_ADD_PROPERTIES(&mysqli_warning_properties, mysqli_warning_property_entries); zend_hash_add(&classes, ce->name, ce->name_length+1, &mysqli_warning_properties, sizeof(mysqli_warning_properties), NULL); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index f43722f79..4c5811560 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.118.2.6 2005/11/08 13:50:50 andrey Exp $ + $Id: mysqli_api.c,v 1.118.2.16 2006/01/01 16:55:01 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -285,7 +285,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result) bind[ofs].buffer = 0; bind[ofs].is_null = &stmt->result.is_null[ofs]; bind[ofs].buffer_length = 0; - break; + break; case MYSQL_TYPE_SHORT: case MYSQL_TYPE_TINY: @@ -299,6 +299,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result) bind[ofs].buffer_type = MYSQL_TYPE_LONG; bind[ofs].buffer = stmt->result.buf[ofs].val; bind[ofs].is_null = &stmt->result.is_null[ofs]; + bind[ofs].is_unsigned = (stmt->stmt->fields[ofs].flags & UNSIGNED_FLAG) ? 1 : 0; break; case MYSQL_TYPE_LONGLONG: @@ -309,6 +310,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result) bind[ofs].buffer = stmt->result.buf[ofs].val; bind[ofs].is_null = &stmt->result.is_null[ofs]; bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; + bind[ofs].is_unsigned = (stmt->stmt->fields[ofs].flags & UNSIGNED_FLAG) ? 1 : 0; break; case MYSQL_TYPE_DATE: @@ -323,20 +325,26 @@ PHP_FUNCTION(mysqli_stmt_bind_result) #ifdef FIELD_TYPE_NEWDECIMAL case MYSQL_TYPE_NEWDECIMAL: #endif + { + ulong tmp; stmt->result.buf[ofs].type = IS_STRING; /* If the user has called $stmt->store_result() then we have asked max_length to be updated. this is done only for BLOBS because we don't want to allocate big chunkgs of memory 2^16 or 2^24 */ - if (stmt->stmt->fields[ofs].max_length == 0) { + if (stmt->stmt->fields[ofs].max_length == 0 && + !mysql_stmt_attr_get(stmt->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &tmp) && !tmp) + { stmt->result.buf[ofs].buflen = (stmt->stmt->fields) ? (stmt->stmt->fields[ofs].length) ? stmt->stmt->fields[ofs].length + 1: 256: 256; } else { /* the user has called store_result(). if he does not there is no way to determine the + libmysql does not allow us to allocate 0 bytes for a buffer so we try 1 */ - stmt->result.buf[ofs].buflen = stmt->stmt->fields[ofs].max_length; + if (!(stmt->result.buf[ofs].buflen = stmt->stmt->fields[ofs].max_length)) + ++stmt->result.buf[ofs].buflen; } stmt->result.buf[ofs].val = (char *)emalloc(stmt->result.buf[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_STRING; @@ -345,6 +353,10 @@ PHP_FUNCTION(mysqli_stmt_bind_result) bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; bind[ofs].length = &stmt->result.buf[ofs].buflen; break; + } + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Server returned unknown type %ld. Probably your client library is incompatible with the server version you use!", col_type); + break; } } @@ -354,7 +366,13 @@ PHP_FUNCTION(mysqli_stmt_bind_result) if (rc) { efree(bind); efree(args); - php_clear_stmt_bind(stmt); + /* dont close the statement or subsequent usage (for example ->execute()) will lead to crash */ + for (i=0; i < var_cnt ; i++) { + if (stmt->result.buf[i].val) + efree(stmt->result.buf[i].val); + } + efree(stmt->result.buf); + efree(stmt->result.is_null); RETURN_FALSE; } @@ -608,8 +626,7 @@ PHP_FUNCTION(mysqli_stmt_fetch) zval *mysql_stmt; unsigned int i; ulong ret; - int lval; - unsigned int ulval; + unsigned int uval; double dval; my_ulonglong llval; @@ -634,8 +651,9 @@ PHP_FUNCTION(mysqli_stmt_fetch) if (!ret) { #endif for (i = 0; i < stmt->result.var_cnt; i++) { - if (stmt->result.vars[i]->type == IS_STRING && stmt->result.vars[i]->value.str.len) { - efree(stmt->result.vars[i]->value.str.val); + /* Even if the string is of length zero there is one byte alloced so efree() in all cases */ + if (Z_TYPE_P(stmt->result.vars[i]) == IS_STRING) { + efree(stmt->result.vars[i]->value.str.val); } if (!stmt->result.is_null[i]) { switch (stmt->result.buf[i].type) { @@ -644,19 +662,24 @@ PHP_FUNCTION(mysqli_stmt_fetch) && (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)) { /* unsigned int (11) */ - char tmp[12]; - memcpy (&ulval, stmt->result.buf[i].val, sizeof(lval)); - if (ulval > INT_MAX) { - sprintf((char *)&tmp, "%u", ulval); - ZVAL_STRING(stmt->result.vars[i], tmp, 1); - } else { - memcpy(&lval, stmt->result.buf[i].val, sizeof(lval)); - ZVAL_LONG(stmt->result.vars[i], lval); + uval= *(unsigned int *) stmt->result.buf[i].val; + + if (uval > INT_MAX) { + char *tmp, *p; + int j=10; + tmp= emalloc(11); + p= &tmp[9]; + do { + *p-- = (uval % 10) + 48; + uval = uval / 10; + } while (--j > 0); + tmp[10]= '\0'; + /* unsigned int > INT_MAX is 10 digis - ALWAYS */ + ZVAL_STRINGL(stmt->result.vars[i], tmp, 10, 0); + break; } - } else { - memcpy(&lval, stmt->result.buf[i].val, sizeof(lval)); - ZVAL_LONG(stmt->result.vars[i], lval); } + ZVAL_LONG(stmt->result.vars[i], *(int *)stmt->result.buf[i].val); break; case IS_DOUBLE: memcpy(&dval, stmt->result.buf[i].val, sizeof(dval)); @@ -664,27 +687,34 @@ PHP_FUNCTION(mysqli_stmt_fetch) break; case IS_STRING: if (stmt->stmt->bind[i].buffer_type == MYSQL_TYPE_LONGLONG) { - char tmp[50]; - memcpy (&llval, stmt->result.buf[i].val, sizeof(my_ulonglong)); - if (llval != (long)llval) { + my_bool uns= (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? 1:0; + llval= *(my_ulonglong *) stmt->result.buf[i].val; +#if SIZEOF_LONG==8 + if (uns && llval > 9223372036854775807L) { +#elif SIZEOF_LONG==4 + if ((uns && llval > L64(2147483647)) || + (!uns && (( L64(2147483647) < (my_longlong) llval) || (L64(-2147483648) > (my_longlong) llval)))) + { +#endif + char tmp[22]; /* even though lval is declared as unsigned, the value * may be negative. Therefor we cannot use %llu and must * use %lld. */ - sprintf((char *)&tmp, "%lld", llval); + sprintf((char *)&tmp, (stmt->stmt->fields[i].flags & UNSIGNED_FLAG)? "%llu":"%lld", llval); ZVAL_STRING(stmt->result.vars[i], tmp, 1); } else { ZVAL_LONG(stmt->result.vars[i], llval); } } else { - ZVAL_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val, stmt->result.buf[i].buflen, 1); + ZVAL_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val, stmt->result.buf[i].buflen, 1); } break; default: break; } } else { - stmt->result.vars[i]->type = IS_NULL; + ZVAL_NULL(stmt->result.vars[i]); } } } else { @@ -693,6 +723,13 @@ PHP_FUNCTION(mysqli_stmt_fetch) switch (ret) { case 0: +#ifdef MYSQL_DATA_TRUNCATED + /* according to SQL standard truncation (e.g. loss of precision is + not an error) - for detecting possible truncation you have to + check mysqli_stmt_warning + */ + case MYSQL_DATA_TRUNCATED: +#endif RETURN_TRUE; break; case 1: @@ -1382,7 +1419,7 @@ PHP_FUNCTION(mysqli_real_connect) php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); php_mysqli_throw_sql_exception( mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC, - mysql->mysql->net.last_error); + "%s", mysql->mysql->net.last_error); RETURN_FALSE; } diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index e63098ade..8e473eab0 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -145,7 +145,7 @@ mysqli_property_entry mysqli_driver_property_entries[] = { /* {{{ mysqli_driver_methods[] */ -function_entry mysqli_driver_methods[] = { +zend_function_entry mysqli_driver_methods[] = { PHP_FALIAS(embedded_server_start, mysqli_embedded_server_start, NULL) PHP_FALIAS(embedded_server_end, mysqli_embedded_server_end, NULL) {NULL, NULL, NULL} diff --git a/ext/mysqli/mysqli_embedded.c b/ext/mysqli/mysqli_embedded.c index 34405810d..38d4b46c1 100644 --- a/ext/mysqli/mysqli_embedded.c +++ b/ext/mysqli/mysqli_embedded.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/mysqli/mysqli_exception.c b/ext/mysqli/mysqli_exception.c index a65fd97eb..4b1877529 100644 --- a/ext/mysqli/mysqli_exception.c +++ b/ext/mysqli/mysqli_exception.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -30,7 +30,7 @@ /* {{{ mysqli_exception_methods[] */ -function_entry mysqli_exception_methods[] = { +zend_function_entry mysqli_exception_methods[] = { {NULL, NULL, NULL} }; /* }}} */ diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 9849e310a..8b88a5c9b 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_fe.c,v 1.49.2.2 2005/10/18 10:02:36 tony2001 Exp $ + $Id: mysqli_fe.c,v 1.49.2.5 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -50,7 +50,7 @@ static * * Every user visible function must have an entry in mysqli_functions[]. */ -function_entry mysqli_functions[] = { +zend_function_entry mysqli_functions[] = { PHP_FE(mysqli_affected_rows, NULL) PHP_FE(mysqli_autocommit, NULL) PHP_FE(mysqli_change_user, NULL) @@ -158,22 +158,15 @@ function_entry mysqli_functions[] = { PHP_FE(mysqli_warning_count, NULL) /* 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_client_encoding, - mysqli_character_set_name, NULL) - PHP_FALIAS(mysqli_escape_string, - mysqli_real_escape_string, NULL) - 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_send_long_data, - mysqli_stmt_send_long_data, NULL) - PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) + 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_client_encoding, mysqli_character_set_name, NULL) + PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, NULL) + 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_send_long_data, mysqli_stmt_send_long_data, NULL) + PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) {NULL, NULL, NULL} /* Must be the last line in mysqli_functions[] */ }; @@ -183,7 +176,7 @@ function_entry mysqli_functions[] = { * * Every user visible function must have an entry in mysqli_functions[]. */ -function_entry mysqli_link_methods[] = { +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) @@ -244,7 +237,7 @@ function_entry mysqli_link_methods[] = { * * Every user visible function must have an entry in mysqli_result_functions[]. */ -function_entry mysqli_result_methods[] = { +zend_function_entry mysqli_result_methods[] = { PHP_FALIAS(mysqli_result, mysqli_result_construct, NULL) PHP_FALIAS(close,mysqli_free_result,NULL) PHP_FALIAS(free,mysqli_free_result,NULL) @@ -267,7 +260,7 @@ function_entry mysqli_result_methods[] = { * * Every user visible function must have an entry in mysqli_stmt_functions[]. */ -function_entry mysqli_stmt_methods[] = { +zend_function_entry mysqli_stmt_methods[] = { PHP_FALIAS(mysqli_stmt, mysqli_stmt_construct, NULL) PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL) PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 2dc545978..2c408a99a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_nonapi.c,v 1.54.2.2 2005/10/10 20:06:35 tony2001 Exp $ + $Id: mysqli_nonapi.c,v 1.54.2.5 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -91,7 +91,7 @@ PHP_FUNCTION(mysqli_connect) /* Save error messages */ php_mysqli_throw_sql_exception( mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC, - mysql->mysql->net.last_error); + "%s", mysql->mysql->net.last_error); php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql) TSRMLS_CC); @@ -249,7 +249,7 @@ PHP_FUNCTION(mysqli_query) if (!result) { php_mysqli_throw_sql_exception(mysql->mysql->net.sqlstate, mysql->mysql->net.last_errno TSRMLS_CC, - mysql->mysql->net.last_error); + "%s", mysql->mysql->net.last_error); RETURN_FALSE; } @@ -335,7 +335,7 @@ PHP_FUNCTION(mysqli_set_charset) #endif #ifdef HAVE_MYSQLI_GET_CHARSET -/* {{{ object mysqli_get_charset(object link) +/* {{{ proto object mysqli_get_charset(object link) returns a character set object */ PHP_FUNCTION(mysqli_get_charset) { diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index 3a6792a56..664fe51d2 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_prop.c,v 1.23 2005/08/03 14:07:30 sniper Exp $ + $Id: mysqli_prop.c,v 1.23.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_repl.c b/ext/mysqli/mysqli_repl.c index f61d3713a..1f767d1ee 100644 --- a/ext/mysqli/mysqli_repl.c +++ b/ext/mysqli/mysqli_repl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_repl.c,v 1.3 2005/08/03 14:07:31 sniper Exp $ + $Id: mysqli_repl.c,v 1.3.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c index 058383be7..083c7c2d7 100644 --- a/ext/mysqli/mysqli_report.c +++ b/ext/mysqli/mysqli_report.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_report.c,v 1.11 2005/08/03 14:07:31 sniper Exp $ + $Id: mysqli_report.c,v 1.11.2.2 2006/01/01 12:50:09 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -46,7 +46,7 @@ PHP_FUNCTION(mysqli_report) /* {{{ void php_mysqli_report_error(char *sqlstate, int errorno, char *error) */ void php_mysqli_report_error(char *sqlstate, int errorno, char *error TSRMLS_DC) { - php_mysqli_throw_sql_exception(sqlstate, errorno TSRMLS_CC, error); + php_mysqli_throw_sql_exception(sqlstate, errorno TSRMLS_CC, "%s", error); } /* }}} */ diff --git a/ext/mysqli/mysqli_report.h b/ext/mysqli/mysqli_report.h index dee0aab71..a8c203082 100644 --- a/ext/mysqli/mysqli_report.h +++ b/ext/mysqli/mysqli_report.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: mysqli_report.h,v 1.5 2005/08/03 14:07:31 sniper Exp $ + $Id: mysqli_report.h,v 1.5.2.1 2006/01/01 12:50:09 sniper Exp $ */ #ifndef __HAVE_MYSQLI_PROFILER_H__ diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 19aa8eec8..427822bdc 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -211,7 +211,7 @@ PHP_METHOD(mysqli_warning, __construct) } /* }}} */ -function_entry mysqli_warning_methods[] = { +zend_function_entry mysqli_warning_methods[] = { PHP_ME(mysqli_warning, __construct, NULL, ZEND_ACC_PROTECTED) PHP_ME(mysqli_warning, next, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index 31e9040ac..d2a96f2e6 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ - $Id: php_mysqli.h,v 1.54.2.2 2005/10/18 13:51:50 tony2001 Exp $ + $Id: php_mysqli.h,v 1.54.2.5 2006/01/01 12:50:09 sniper Exp $ */ /* A little hack to prevent build break, when mysql is used together with @@ -121,13 +121,13 @@ typedef struct { #define PHP_MYSQLI_EXPORT(__type) PHP_MYSQLI_API __type extern zend_module_entry mysqli_module_entry; -extern function_entry mysqli_functions[]; -extern function_entry mysqli_link_methods[]; -extern function_entry mysqli_stmt_methods[]; -extern function_entry mysqli_result_methods[]; -extern function_entry mysqli_driver_methods[]; -extern function_entry mysqli_warning_methods[]; -extern function_entry mysqli_exception_methods[]; +extern zend_function_entry mysqli_functions[]; +extern zend_function_entry mysqli_link_methods[]; +extern zend_function_entry mysqli_stmt_methods[]; +extern zend_function_entry mysqli_result_methods[]; +extern zend_function_entry mysqli_driver_methods[]; +extern zend_function_entry mysqli_warning_methods[]; +extern zend_function_entry mysqli_exception_methods[]; extern mysqli_property_entry mysqli_link_property_entries[]; extern mysqli_property_entry mysqli_result_property_entries[]; @@ -446,6 +446,15 @@ MYSQLI_PROPERTY(my_prop_link_host); #define my_estrdup(x) (x) ? estrdup(x) : NULL #define my_efree(x) if (x) efree(x) +#ifdef PHP_WIN32 +#define L64(x) x##i64 +typedef __int64 my_longlong; +#else +#define L64(x) x##LL +typedef long long my_longlong; +#endif + + ZEND_EXTERN_MODULE_GLOBALS(mysqli) #endif /* PHP_MYSQLI.H */ diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index c80c7214e..fafc30ba0 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -14,16 +14,21 @@ mysqli fetch char/text mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch"); mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text)"); - mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test0')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567891', 'this is a test1')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567892', 'this is a test2')"); + mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567893', 'this is a test3')"); - $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch"); + $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1"); mysqli_bind_result($stmt, $c1, $c2); mysqli_execute($stmt); - mysqli_fetch($stmt); + $i=4; + while ($i--) { + mysqli_fetch($stmt); + $test = array($c1,$c2); + var_dump($test); + } - $test = array($c1,$c2); - - var_dump($test); mysqli_stmt_close($stmt); mysqli_close($link); @@ -33,5 +38,23 @@ array(2) { [0]=> string(10) "1234567890" [1]=> - string(14) "this is a test" + string(15) "this is a test0" +} +array(2) { + [0]=> + string(10) "1234567891" + [1]=> + string(15) "this is a test1" +} +array(2) { + [0]=> + string(10) "1234567892" + [1]=> + string(15) "this is a test2" +} +array(2) { + [0]=> + string(10) "1234567893" + [1]=> + string(15) "this is a test3" } diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt index c69447a00..32ed3c18f 100644 --- a/ext/mysqli/tests/009.phpt +++ b/ext/mysqli/tests/009.phpt @@ -1,5 +1,5 @@ --TEST-- -mysqli fetch bigint values +mysqli fetch bigint values (ok to fail with 4.1.x) --SKIPIF-- 40100 && mysqli_get_client_version() < 50000 && + mysqli_get_server_version($link) > 50000) + echo "error (4.1 library with 5.x server)"; + else + echo "error"; mysqli_close($link); ?> ---EXPECT-- -string(8) "11111111" +--EXPECTF-- +ok diff --git a/ext/mysqli/tests/bug35103.phpt b/ext/mysqli/tests/bug35103.phpt new file mode 100644 index 000000000..b6118b9b2 --- /dev/null +++ b/ext/mysqli/tests/bug35103.phpt @@ -0,0 +1,68 @@ +--TEST-- +bug #35103 Bad handling of unsigned bigint +--SKIPIF-- + +--FILE-- +query("DROP TABLE IF EXISTS test_bint"); + $mysql->query("CREATE TABLE test_bint (a bigint(20) default NULL) ENGINE=MYISAM"); + $mysql->query("INSERT INTO test_bint VALUES (9223372036854775807),(-9223372036854775808),(-2147483648),(-2147483649),(-2147483647),(2147483647),(2147483648),(2147483649)"); + + $mysql->query("DROP TABLE IF EXISTS test_buint"); + $mysql->query("CREATE TABLE test_buint (a bigint(20) unsigned default NULL)"); + $mysql->query("INSERT INTO test_buint VALUES (18446744073709551615),(9223372036854775807),(9223372036854775808),(2147483647),(2147483649),(4294967295)"); + + $stmt = $mysql->prepare("SELECT a FROM test_bint ORDER BY a"); + $stmt->bind_result($v); + $stmt->execute(); + $i=0; + echo "BIG INT SIGNED, TEST\n"; + while ($i++ < 8) { + $stmt->fetch(); + echo $v, "\n"; + } + $stmt->close(); + + echo str_repeat("-", 20), "\n"; + + $stmt = $mysql->prepare("SELECT a FROM test_buint ORDER BY a"); + $stmt->bind_result($v2); + $stmt->execute(); + $j=0; + echo "BIG INT UNSIGNED TEST\n"; + while ($j++ < 6) { + $stmt->fetch(); + echo $v2, "\n"; + } + $stmt->close(); + + $mysql->multi_query($drop); + + $mysql->close(); +?> +--EXPECT-- +BIG INT SIGNED, TEST +-9223372036854775808 +-2147483649 +-2147483648 +-2147483647 +2147483647 +2147483648 +2147483649 +9223372036854775807 +-------------------- +BIG INT UNSIGNED TEST +2147483647 +2147483649 +4294967295 +9223372036854775807 +9223372036854775808 +18446744073709551615 diff --git a/ext/mysqli/tests/bug35517.phpt b/ext/mysqli/tests/bug35517.phpt new file mode 100644 index 000000000..eb1b54346 --- /dev/null +++ b/ext/mysqli/tests/bug35517.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #35517 mysqli_stmt_fetch returns NULL +--SKIPIF-- + +--FILE-- +query("CREATE TABLE temp (id INT UNSIGNED NOT NULL)"); + $mysql->query("INSERT INTO temp (id) VALUES (3000000897),(3800001532),(3900002281),(3100059612)"); + + $stmt = $mysql->prepare("SELECT id FROM temp"); + $stmt->execute(); + $stmt->bind_result($id); + while ($stmt->fetch()) { + var_dump($id); + } + $stmt->close(); + + $mysql->query("DROP TABLE temp"); + $mysql->close(); +?> +--EXPECTF-- +string(10) "3000000897" +string(10) "3800001532" +string(10) "3900002281" +string(10) "3100059612" diff --git a/ext/mysqli/tests/bug35759.phpt b/ext/mysqli/tests/bug35759.phpt new file mode 100644 index 000000000..5f67a7624 --- /dev/null +++ b/ext/mysqli/tests/bug35759.phpt @@ -0,0 +1,44 @@ +--TEST-- +bug #35759 : mysqli_stmt_bind_result() makes huge allocation when column empty +--SKIPIF-- + +--FILE-- +query("DROP TABLE IF EXISTS blobby"); + $create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''"; + $i= 0; + while (++$i < $col_num) { + $create .= ", a$i MEDIUMBLOB NOT NULL DEFAULT ''"; + } + $create .= ")"; + + $mysql->query($create); + $mysql->query("INSERT INTO blobby (a0) VALUES ('')"); + + $stmt = $mysql->prepare("SELECT * FROM blobby"); + $stmt->execute(); + $stmt->store_result(); + $params= array_pad(array(), $col_num, ""); + call_user_func_array(array($stmt, "bind_result"), $params); + $stmt->fetch(); + + $stmt->close(); + + $mysql->query("DROP TABLE blobby"); + + $mysql->close(); + echo "OK\n"; +?> +--EXPECT-- +OK diff --git a/ext/ncurses/ncurses.c b/ext/ncurses/ncurses.c index 1c1516236..2216ec413 100644 --- a/ext/ncurses/ncurses.c +++ b/ext/ncurses/ncurses.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/ncurses/ncurses_fe.c b/ext/ncurses/ncurses_fe.c index 59f0a8b0e..db5aaee21 100644 --- a/ext/ncurses/ncurses_fe.c +++ b/ext/ncurses/ncurses_fe.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -50,7 +50,7 @@ static * * Every user visible function must have an entry in ncurses_functions[]. */ -function_entry ncurses_functions[] = { +zend_function_entry ncurses_functions[] = { PHP_FE(ncurses_addch, NULL) #ifdef HAVE_NCURSES_COLOR_SET PHP_FE(ncurses_color_set, NULL) diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c index 096c9b7c5..fd3e0e82e 100644 --- a/ext/ncurses/ncurses_functions.c +++ b/ext/ncurses/ncurses_functions.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -1824,7 +1824,7 @@ PHP_FUNCTION(ncurses_getmouse) } IS_NCURSES_INITIALIZED(); - pval_destructor(arg); + zval_dtor(arg); array_init(arg); retval = getmouse(&mevent); @@ -1843,7 +1843,7 @@ PHP_FUNCTION(ncurses_getmouse) Pushes mouse event to queue */ PHP_FUNCTION(ncurses_ungetmouse) { - zval *arg, **pvalue; + zval *arg, **zvalue; MEVENT mevent; ulong retval; @@ -1852,29 +1852,29 @@ PHP_FUNCTION(ncurses_ungetmouse) } IS_NCURSES_INITIALIZED(); - if (zend_hash_find(Z_ARRVAL_P(arg), "id", sizeof("id"), (void **) &pvalue) == SUCCESS) { - convert_to_long_ex(pvalue); - mevent.id = Z_LVAL_PP(pvalue); + if (zend_hash_find(Z_ARRVAL_P(arg), "id", sizeof("id"), (void **) &zvalue) == SUCCESS) { + convert_to_long_ex(zvalue); + mevent.id = Z_LVAL_PP(zvalue); } - if (zend_hash_find(Z_ARRVAL_P(arg), "x", sizeof("x"), (void **) &pvalue) == SUCCESS) { - convert_to_long_ex(pvalue); - mevent.x = Z_LVAL_PP(pvalue); + if (zend_hash_find(Z_ARRVAL_P(arg), "x", sizeof("x"), (void **) &zvalue) == SUCCESS) { + convert_to_long_ex(zvalue); + mevent.x = Z_LVAL_PP(zvalue); } - if (zend_hash_find(Z_ARRVAL_P(arg), "y", sizeof("y"), (void **) &pvalue) == SUCCESS) { - convert_to_long_ex(pvalue); - mevent.y = Z_LVAL_PP(pvalue); + if (zend_hash_find(Z_ARRVAL_P(arg), "y", sizeof("y"), (void **) &zvalue) == SUCCESS) { + convert_to_long_ex(zvalue); + mevent.y = Z_LVAL_PP(zvalue); } - if (zend_hash_find(Z_ARRVAL_P(arg), "z", sizeof("z"), (void **) &pvalue) == SUCCESS) { - convert_to_long_ex(pvalue); - mevent.z = Z_LVAL_PP(pvalue); + if (zend_hash_find(Z_ARRVAL_P(arg), "z", sizeof("z"), (void **) &zvalue) == SUCCESS) { + convert_to_long_ex(zvalue); + mevent.z = Z_LVAL_PP(zvalue); } - if (zend_hash_find(Z_ARRVAL_P(arg), "mmask", sizeof("mmask"), (void **) &pvalue) == SUCCESS) { - convert_to_long_ex(pvalue); - mevent.bstate = Z_LVAL_PP(pvalue); + if (zend_hash_find(Z_ARRVAL_P(arg), "mmask", sizeof("mmask"), (void **) &zvalue) == SUCCESS) { + convert_to_long_ex(zvalue); + mevent.bstate = Z_LVAL_PP(zvalue); } retval = ungetmouse(&mevent); diff --git a/ext/ncurses/php_ncurses.h b/ext/ncurses/php_ncurses.h index 6b0ebcce6..a9910f1b9 100644 --- a/ext/ncurses/php_ncurses.h +++ b/ext/ncurses/php_ncurses.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -36,7 +36,7 @@ extern int le_ncurses_panels; extern zend_module_entry ncurses_module_entry; #define phpext_ncurses_ptr &ncurses_module_entry -extern function_entry ncurses_functions[]; +extern zend_function_entry ncurses_functions[]; #include "php_ncurses_fe.h" #ifdef PHP_WIN32 diff --git a/ext/ncurses/php_ncurses_fe.h b/ext/ncurses/php_ncurses_fe.h index 3397d9cbd..42eb203fe 100644 --- a/ext/ncurses/php_ncurses_fe.h +++ b/ext/ncurses/php_ncurses_fe.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/oci8/CREDITS b/ext/oci8/CREDITS index 884efcaa9..18cad81c3 100644 --- a/ext/oci8/CREDITS +++ b/ext/oci8/CREDITS @@ -1,2 +1,2 @@ OCI8 -Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal +Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong diff --git a/ext/oci8/README b/ext/oci8/README new file mode 100644 index 000000000..b9df41db3 --- /dev/null +++ b/ext/oci8/README @@ -0,0 +1,61 @@ +Installing OCI8 +--------------- + +1. Common requirements. +2. Installing as shared extension. +3. Installing as statically compiled extension. +4. Installing from PECL. + + +1. Common requirements +---------------------- +In case if you use Oracle Instant Client, you don't have to set ORACLE_HOME and +most of the other environment variables to build PHP with OCI8 support. +The only variables you may have to set are: +LD_LIBRARY_PATH - it must include Instant Client libraries dir +NLS_LANG - in case if you want to change the default encoding used during +interaction with Oracle servers + +If you use common Oracle Client installation that comes along with the Oracle +server installation, you MUST set at least ORACLE_HOME environment variable +and make it visible for your web-server BEFORE it starts. Most appropriate +places to add ORACLE_HOME definition are: +- /etc/profile +- /etc/profile.local +- /etc/profile.d +and others. + +2. Installing as shared extension +--------------------------------- +To install OCI8 as shared extension (i.e. the one you should put into +your php.ini) use the following configure lines to configure PHP: +a) if you use common Oracle Client installation: +./configure --with-oci8=shared,$ORACLE_HOME + +b) with Oracle Instant Client: +./configure --with-oci8=shared,instantclient,/path/to/instant/client/lib +If you use rpm-based installation of Oracle Instant Client, your configure +line will look like this: +./configure --with-oci8=shared,instantclient,/usr/lib/oracle//client/lib + +Follow the usual building procedure after that and you'll get OCI8 shared +extension (i.e. oci8.so). Add it into the php.ini file like this: +extension=oci8.so +and don't forget to specify the right extension_dir for PHP to be able +to find shared extensions correctly. + +3. Installing as statically compiled extension +---------------------------------------------- +To install OCI8 as statically compiled module use the following configure lines: +a) with common Oracle Client installation +./configure --with-oci8=$ORACLE_HOME + +b) with Oracle Instant Client +./configure --with-oci8=instantclient,/path/to/instant/client/lib + +After successful compile, you don't have to add oci8.so to the php.ini, the module will +be usable without any additional actions. + +4. Installing from PECL +----------------------- +TBD diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index 591b6861c..6b87a775b 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -1,7 +1,13 @@ dnl -dnl $Id: config.m4,v 1.55 2005/05/29 23:16:42 sniper Exp $ +dnl $Id: config.m4,v 1.55.2.1 2005/12/01 13:39:42 tony2001 Exp $ dnl +if test -z "$SED"; then + PHP_OCI8_SED="sed"; +else + PHP_OCI8_SED="$SED"; +fi + AC_DEFUN([PHP_OCI_IF_DEFINED],[ old_CPPFLAGS=$CPPFLAGS CPPFLAGS=$3 @@ -19,7 +25,16 @@ AC_DEFUN([PHP_OCI_IF_DEFINED],[ ]) AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ - PHP_CHECK_64BIT([ TMP_OCI8_LIB_DIR=lib32 ], [ TMP_OCI8_LIB_DIR=lib ]) + AC_CHECK_SIZEOF(long int, 4) + AC_MSG_CHECKING([checking if we're at 64-bit platform]) + if test "$ac_cv_sizeof_long_int" = "4" ; then + AC_MSG_RESULT([no]) + TMP_OCI8_LIB_DIR=lib32 + else + AC_MSG_RESULT([yes]) + TMP_OCI8_LIB_DIR=lib + fi + AC_MSG_CHECKING([OCI8 libraries dir]) if test -d "$OCI8_DIR/lib" -a ! -d "$OCI8_DIR/lib32"; then OCI8_LIB_DIR=lib @@ -54,7 +69,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_DEFUN([AC_OCI8_VERSION],[ AC_MSG_CHECKING([Oracle version]) if test -s "$OCI8_DIR/orainst/unix.rgs"; then - OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4` + OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4` test -z "$OCI8_VERSION" && OCI8_VERSION=7.3 elif test -f $OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then OCI8_VERSION=10.1 @@ -76,26 +91,33 @@ AC_DEFUN([AC_OCI8_VERSION],[ AC_MSG_RESULT($OCI8_VERSION) ]) -PHP_ARG_WITH(oci8, for Oracle (OCI8) support using ORACLE_HOME installation, -[ --with-oci8[=DIR] Include Oracle (OCI8) support using an ORACLE_HOME - install. The default DIR is ORACLE_HOME]) - -if test "$PHP_OCI8" = "no"; then - PHP_ARG_WITH(oci8-instant-client, for Oracle (OCI8) support using Oracle Instant Client, - [ --with-oci8-instant-client[=DIR] - Include Oracle (OCI8) support using - Oracle Instant Client. DIR is the directory with the - Instant Client libraries. On Linux it will default to - /usr/lib/oracle//client/lib - Other platforms will need to have it explicitly specified]) -else - PHP_OCI8_INSTANT_CLIENT="no"; + +dnl --with-oci8=shared,instantclient,/path/to/client/dir/lib +dnl or +dnl --with-oci8=shared,/path/to/oracle/home +PHP_ARG_WITH(oci8, for Oracle (OCI8) support, +[ --with-oci8[=DIR] Include Oracle (OCI8) support. + The default DIR is ORACLE_HOME. + Use --with-oci8=instantclient,/path/to/oic/lib + to use Oracle Instant Client installation]) + +PHP_OCI8_INSTANT_CLIENT="no" + +if test "`echo $PHP_OCI8 | cut -d, -f2`" = "instantclient"; then + PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f3`" + PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f1,4`" + if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then + PHP_OCI8_INSTANT_CLIENT="yes" + fi +elif test "`echo $PHP_OCI8 | cut -d, -f1`" = "instantclient"; then + PHP_OCI8_INSTANT_CLIENT="`echo $PHP_OCI8 | cut -d, -f2`" + PHP_OCI8="`echo $PHP_OCI8 | cut -d, -f3,4`" + if test "$PHP_OCI8_INSTANT_CLIENT" = ""; then + PHP_OCI8_INSTANT_CLIENT="yes" + fi fi -if test "$PHP_OCI8" != "no"; then - if test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then - AC_MSG_ERROR([--with-oci8 and --with-oci8-instant-client are mutually exclusive]) - fi +if test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then AC_MSG_CHECKING([Oracle Install Directory]) if test "$PHP_OCI8" = "yes"; then @@ -138,12 +160,40 @@ if test "$PHP_OCI8" != "no"; then PHP_ADD_LIBRARY_WITH_PATH(core4, "", OCI8_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH(psa, "", OCI8_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH(clntsh, $OCI8_DIR/$OCI8_LIB_DIR, OCI8_SHARED_LIBADD) + + PHP_CHECK_LIBRARY(clntsh, OCIEnvCreate, + [ + AC_DEFINE(HAVE_OCI_ENV_CREATE,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) + + PHP_CHECK_LIBRARY(clntsh, OCIStmtPrepare2, + [ + AC_DEFINE(HAVE_OCI_STMT_PREPARE2,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) ;; 8.1) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) PHP_ADD_LIBPATH($OCI8_DIR/$OCI8_LIB_DIR, OCI8_SHARED_LIBADD) + PHP_CHECK_LIBRARY(clntsh, OCIEnvCreate, + [ + AC_DEFINE(HAVE_OCI_ENV_CREATE,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) + + PHP_CHECK_LIBRARY(clntsh, OCIStmtPrepare2, + [ + AC_DEFINE(HAVE_OCI_STMT_PREPARE2,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) + dnl dnl OCI_ATTR_STATEMENT is not available in all 8.1.x versions dnl @@ -160,7 +210,7 @@ if test "$PHP_OCI8" != "no"; then [ PHP_CHECK_LIBRARY(clntsh, OCINlsCharSetNameToId, [ - AC_DEFINE(HAVE_OCI_9_2,1,[ ]) + AC_DEFINE(HAVE_OCI_ENV_NLS_CREATE,1,[ ]) OCI8_VERSION=9.2 ], [], [ -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD @@ -168,13 +218,30 @@ if test "$PHP_OCI8" != "no"; then ], [], [ -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD ]) + + PHP_CHECK_LIBRARY(clntsh, OCIEnvCreate, + [ + AC_DEFINE(HAVE_OCI_ENV_CREATE,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) + + PHP_CHECK_LIBRARY(clntsh, OCIStmtPrepare2, + [ + AC_DEFINE(HAVE_OCI_STMT_PREPARE2,1,[ ]) + ], [], [ + -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD + ]) + ;; 10.1) PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD) PHP_ADD_LIBPATH($OCI8_DIR/$OCI8_LIB_DIR, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) - AC_DEFINE(HAVE_OCI_9_2,1,[ ]) + AC_DEFINE(HAVE_OCI_ENV_NLS_CREATE,1,[ ]) + AC_DEFINE(HAVE_OCI_ENV_CREATE,1,[ ]) + AC_DEFINE(HAVE_OCI_STMT_PREPARE2,1,[ ]) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ]) ;; @@ -207,18 +274,22 @@ if test "$PHP_OCI8" != "no"; then PHP_CHECK_LIBRARY(clntsh, OCICollAssign, [ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ]) - ], [], [ + PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c, $ext_shared) + ], + [ + PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_interface.c, $ext_shared) + ], + [ -L$OCI8_DIR/$OCI8_LIB_DIR $OCI8_SHARED_LIBADD ]) - PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared) AC_DEFINE(HAVE_OCI8,1,[ ]) PHP_SUBST_OLD(OCI8_SHARED_LIBADD) PHP_SUBST_OLD(OCI8_DIR) PHP_SUBST_OLD(OCI8_VERSION) -elif test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then +elif test "$PHP_OCI8" != "no" && test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then AC_MSG_CHECKING([Oracle Instant Client directory]) if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then @@ -227,7 +298,7 @@ dnl directory to the libraries. But on Linux we default to the most recent dnl version in /usr/lib PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1` if test -z "$PHP_OCI8_INSTANT_CLIENT"; then - AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8-instant-client=DIR]) + AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8=instantclient,DIR]) fi fi AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT) @@ -237,11 +308,14 @@ dnl version in /usr/lib AC_MSG_CHECKING([Oracle Instant Client SDK header directory]) dnl Header directory for Instant Client SDK RPM install - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | sed -e 's!^/usr/lib/oracle/\(.*\)/client/lib[[/]]*$!/usr/include/oracle/\1/client!'` + OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client/lib[[/]]*$!/usr/include/oracle/\1/client!'` dnl Header directory for Instant Client SDK zip file install OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include +dnl Header directory for manual installation + OCISDKMANINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!\(.*\)/lib[[/]]*$!\1/include!'` + if test -f "$OCISDKRPMINC/oci.h"; then AC_MSG_RESULT($OCISDKRPMINC) PHP_ADD_INCLUDE($OCISDKRPMINC) @@ -250,11 +324,15 @@ dnl Header directory for Instant Client SDK zip file install AC_MSG_RESULT($OCISDKZIPINC) PHP_ADD_INCLUDE($OCISDKZIPINC) OCI8INCDIR=$OCISDKZIPINC + elif test -f "$OCISDKMANINC/oci.h"; then + AC_MSG_RESULT($OCISDKMANINC) + PHP_ADD_INCLUDE($OCISDKMANINC) + OCI8INCDIR=$OCISDKMANINC else AC_MSG_ERROR([Oracle Instant Client SDK header files not found]) fi - OCISYSLIBLIST=`echo "$OCI8INCDIR" | sed -e 's!\(.*\)/include$!\1/demo/sysliblist!'` + OCISYSLIBLIST=`echo "$OCI8INCDIR" | $PHP_OCI_SED -e 's!\(.*\)/include$!\1/demo/sysliblist!'` if test -f "$OCISYSLIBLIST"; then PHP_EVAL_LIBLINE(`cat $OCISYSLIBLIST`, OCI8_SYSLIB) fi @@ -271,13 +349,15 @@ dnl Header directory for Instant Client SDK zip file install ;; esac + AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[ ]) AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) - AC_DEFINE(HAVE_OCI_9_2,1,[ ]) + AC_DEFINE(HAVE_OCI_ENV_NLS_CREATE,1,[ ]) + AC_DEFINE(HAVE_OCI_ENV_CREATE,1,[ ]) + AC_DEFINE(HAVE_OCI_STMT_PREPARE2,1,[ ]) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ]) - AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[ ]) - PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared) + PHP_NEW_EXTENSION(oci8, oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c, $ext_shared) AC_DEFINE(HAVE_OCI8,1,[ ]) PHP_SUBST_OLD(OCI8_SHARED_LIBADD) diff --git a/ext/oci8/config.w32 b/ext/oci8/config.w32 index 10ca4a9d1..90e1995e3 100644 --- a/ext/oci8/config.w32 +++ b/ext/oci8/config.w32 @@ -1,15 +1,15 @@ -// $Id: config.w32,v 1.3 2004/01/22 14:42:17 tony2001 Exp $ +// $Id: config.w32,v 1.3.4.1 2005/12/01 13:39:42 tony2001 Exp $ // vim:ft=javascript ARG_WITH("oci8", "OCI8 support", "no"); if (PHP_OCI8 != "no") { - if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", PHP_PHP_BUILD + "\\oci805\\include;" + PHP_OCI8) && - CHECK_LIB("oci.lib", "oci8", PHP_OCI8) + if (CHECK_HEADER_ADD_INCLUDE("oci.h", "CFLAGS_OCI8", PHP_PHP_BUILD + "\\include\\instantclient;" + PHP_OCI8) && + CHECK_LIB("oci.lib", "oci8", PHP_PHP_BUILD + "\\lib\\instantclient;" + PHP_OCI8) ) { - EXTENSION('oci8', 'oci8.c'); + EXTENSION('oci8', 'oci8.c oci8_lob.c oci8_statement.c oci8_collection.c oci8_interface.c'); AC_DEFINE('HAVE_OCI8_TEMP_LOB', 1); AC_DEFINE('HAVE_OCI8', 1); diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 5065087a6..3508f143d 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,44 +19,21 @@ | Collection support by Andy Sautins | | Temporary LOB support by David Benson | | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | +----------------------------------------------------------------------+ - */ - -/* $Id: oci8.c,v 1.269.2.3 2005/10/10 10:44:39 tony2001 Exp $ */ +*/ -/* TODO list: +/* $Id: oci8.c,v 1.269.2.8 2006/01/10 08:34:28 tony2001 Exp $ */ +/* TODO + * + * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() with OCI_ATTR_LOBEMPTY * - * - php.ini flags - * especialliy important for things like oci_ping - * allowpconns - * timeout - * maxlifetime - * maxpconns - * - Change return-value for OCIFetch*() (1-row read, 0-Normal end, false-error) - * - Error mode (print or shut up?) - * - binding of arrays - * - Character sets for NCLOBS - * - split the module into an upper (php-callable) and lower (c-callable) layer! - * - remove all XXXs - * - clean up and documentation - * - make OCIInternalDebug accept a mask of flags.... - * - have one ocifree() call. - * - make it possible to have persistent statements? - * - failover - * - change all the lob stuff to work without classes (optional)! - * - make sure that the callbacks terminate the strings with \0 - * - cleanup the ociexecute semantics for refcursors - * - make $lob->savefile use O_BINARY - * - line 2728: ub4 length = -1; needs fixing - * - delay OCIInitialize() as far as we can. - * - add PHP Array <-> OCICollection conversion - * - add Collection iterator object for INDEX BY tables - * - make auto-rollback only happen if we have an outstanding transaction - * - implement ocidisconnect - * - add OCI9-specific functions and separate them from OCI8 with ifdefs - */ - -/* {{{ includes & stuff */ + * get OCI_ATTR_CHARSET_ID attr of column to detect UTF string and multiply buffer in 4 times + * + * */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -65,30 +42,27 @@ #include "php.h" #include "ext/standard/info.h" #include "php_ini.h" +#include "ext/standard/php_smart_str.h" #if HAVE_OCI8 #include "php_oci8.h" +#include "php_oci8_int.h" -/* True globals, only used by thread safe functions */ -static TsHashTable *persistent_servers; -static TsHashTable *persistent_sessions; - -static long num_persistent = 0; -static long num_links = 0; +ZEND_DECLARE_MODULE_GLOBALS(oci) /* True globals, no need for thread safety */ -static int le_conn; -static int le_stmt; -static int le_desc; +int le_connection; +int le_pconnection; +int le_statement; +int le_descriptor; #ifdef PHP_OCI8_HAVE_COLLECTIONS -static int le_coll; +int le_collection; #endif -static int le_server; -static int le_session; -static zend_class_entry *oci_lob_class_entry_ptr; + +zend_class_entry *oci_lob_class_entry_ptr; #ifdef PHP_OCI8_HAVE_COLLECTIONS -static zend_class_entry *oci_coll_class_entry_ptr; +zend_class_entry *oci_coll_class_entry_ptr; #endif #ifndef SQLT_BFILEE @@ -98,195 +72,55 @@ static zend_class_entry *oci_coll_class_entry_ptr; #define SQLT_CFILEE 115 #endif -#define SAFE_STRING(s) ((s)?(s):"") +#define PHP_OCI_ERRBUF_LEN 512 -#ifdef ZTS -MUTEX_T mx_lock; - -#define mutex_alloc(mutex) mutex = tsrm_mutex_alloc() -#define mutex_free(mutex) tsrm_mutex_free(mutex) -#define mutex_lock(mutex) tsrm_mutex_lock(mutex) -#define mutex_unlock(mutex) tsrm_mutex_unlock(mutex) -#define thread_id() tsrm_thread_id() +#if ZEND_MODULE_API_NO > 20020429 +#define ONUPDATELONGFUNC OnUpdateLong #else -#define mutex_alloc(mutex) -#define mutex_free(mutex) -#define mutex_lock(mutex) -#define mutex_unlock(mutex) -#define thread_id() 1 -#endif - -/* dirty marcos to make sure we _never_ call oracle-functions recursivly - * - * i'm well aware that we should _never_ call exit directly - this core is for - * pure testing and commented out - as you can see;-) - * thies@thieso.net 20010723 - */ - -#define CALL_OCI(call) \ -{ \ - if (OCI(in_call)) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!"); \ - exit(-1); \ - } else { \ - OCI(in_call)=1; \ - call; \ - OCI(in_call)=0; \ - } \ -} - -#define CALL_OCI_RETURN(retcode,call) \ -{ \ - if (OCI(in_call)) { \ - retcode=-1; \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI8 Recursive call!"); \ - exit(-1); \ - } else { \ - OCI(in_call)=1; \ - retcode=call; \ - OCI(in_call)=0; \ - } \ -} - -#include - -#ifndef O_BINARY -#define O_BINARY 0 +#define ONUPDATELONGFUNC OnUpdateInt #endif -/* }}} */ -/* {{{ thread safety stuff */ +/* static protos {{{ */ +static void php_oci_connection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +static void php_oci_pconnection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +static void php_oci_statement_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +static void php_oci_descriptor_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +static void php_oci_collection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC); +static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC); #ifdef ZTS -int oci_globals_id; -#else -PHP_OCI_API php_oci_globals oci_globals; +static int php_oci_regular_helper(zend_rsrc_list_entry *le TSRMLS_DC); #endif - +static int php_oci_connection_ping(php_oci_connection * TSRMLS_DC); +static int php_oci_connection_status(php_oci_connection * TSRMLS_DC); +static int php_oci_connection_close(php_oci_connection * TSRMLS_DC); /* }}} */ -/* {{{ dynamically loadable module stuff */ +/* {{{ dynamically loadable module stuff */ #ifdef COMPILE_DL_OCI8 ZEND_GET_MODULE(oci8) -# ifdef PHP_WIN32 -# include "zend_arg_defs.c" -# endif #endif /* COMPILE_DL */ - -/* }}} */ -/* {{{ startup/shutdown/info/internal function prototypes */ - -PHP_MINIT_FUNCTION(oci); -PHP_RINIT_FUNCTION(oci); -PHP_MSHUTDOWN_FUNCTION(oci); -PHP_RSHUTDOWN_FUNCTION(oci); -PHP_MINFO_FUNCTION(oci); - -static ub4 oci_handle_error(oci_connection *connection, ub4 errcode); -static ub4 oci_error(OCIError *err_p, char *what, sword status); -static int oci_ping(oci_server *server); -static void oci_debug(const char *format, ...); - -static void _oci_conn_list_dtor(oci_connection *connection TSRMLS_DC); -static void _oci_stmt_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); -static void _oci_descriptor_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); -#ifdef PHP_OCI8_HAVE_COLLECTIONS -static void _oci_coll_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); -#endif -static void _oci_server_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); -static void _oci_session_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); -static void php_oci_free_conn_list(zend_rsrc_list_entry *rsrc TSRMLS_DC); - -static void _oci_column_hash_dtor(void *data); -static void _oci_define_hash_dtor(void *data); -static void _oci_bind_hash_dtor(void *data); -static void _oci_desc_flush_hash_dtor(void *data); - -static oci_connection *oci_get_conn(zval ** TSRMLS_DC); -static oci_statement *oci_get_stmt(zval ** TSRMLS_DC); -static oci_descriptor *oci_get_desc(int TSRMLS_DC); -#ifdef PHP_OCI8_HAVE_COLLECTIONS -/* Questionable name. Very close to oci_get_col */ -static oci_collection *oci_get_coll(int TSRMLS_DC); -#endif -static oci_out_column *oci_get_col(oci_statement *, int, zval **); - -static int _oci_make_zval(zval *, oci_statement *, oci_out_column *, char *, int mode TSRMLS_DC); -static oci_statement *oci_parse(oci_connection *, char *, int); -static int oci_execute(oci_statement *, char *, ub4 mode); -static int oci_fetch(oci_statement *, ub4, char * TSRMLS_DC); -static int oci_lobgetlen(oci_connection *, oci_descriptor *, ub4 *length); -static int oci_loadlob(oci_connection *, oci_descriptor *, char **, ub4 *length); -static int oci_readlob(oci_connection *, oci_descriptor *, char **, ub4 *len); -static int oci_setprefetch(oci_statement *statement, int size); - -static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclusive); - -static oci_server *_oci_open_server(char *dbname,int persistent); -static void _oci_close_server(oci_server *server); - -static oci_session *_oci_open_session(oci_server* server,char *username,char *password,int persistent,int exclusive, char *charset); -static void _oci_close_session(oci_session *session); - -static sb4 oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, dvoid **); -static sb4 oci_bind_out_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 **, ub1 *, dvoid **, ub2 **); - -#if 0 -static sb4 oci_failover_callback(dvoid *svchp,dvoid* envhp,dvoid *fo_ctx,ub4 fo_type, ub4 fo_event); -#endif - -static int oci_lob_flush(oci_descriptor *, int flush_flag TSRMLS_DC); - /* }}} */ -/* {{{ extension macros -*/ -#define OCI_GET_STMT(statement,value) \ - statement = oci_get_stmt(value TSRMLS_CC); \ - if (statement == NULL) { \ - RETURN_FALSE; \ - } - -#define OCI_GET_CONN(connection,value) \ - connection = oci_get_conn(value TSRMLS_CC); \ - if (connection == NULL) { \ - RETURN_FALSE; \ - } - -#define OCI_GET_DESC(descriptor,index) \ - descriptor = oci_get_desc(index TSRMLS_CC); \ - if (descriptor == NULL) { \ - RETURN_FALSE; \ - } - -#ifdef PHP_OCI8_HAVE_COLLECTIONS -#define OCI_GET_COLL(collection,index) \ - collection = oci_get_coll(index TSRMLS_CC); \ - if (collection == NULL) { \ - RETURN_FALSE; \ - } +#ifdef ZEND_ENGINE_2 +ZEND_BEGIN_ARG_INFO(oci_second_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(oci_third_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) +ZEND_END_ARG_INFO() +#else +static unsigned char oci_second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; +static unsigned char oci_third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; #endif -#define IS_LOB_INTERNAL(lob) \ - if (lob->type != OCI_DTYPE_LOB) { \ - switch (lob->type) { \ - case OCI_DTYPE_FILE: \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "internal LOB was expected, FILE locator is given"); \ - break; \ - case OCI_DTYPE_ROWID: \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "internal LOB was expected, ROWID locator is given"); \ - break; \ - default: \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "internal LOB was expected, locator of unknown type is given"); \ - break; \ - } \ - RETURN_FALSE; \ - } -/* }}} */ - /* {{{ extension function prototypes */ PHP_FUNCTION(oci_bind_by_name); +PHP_FUNCTION(oci_bind_array_by_name); PHP_FUNCTION(oci_define_by_name); PHP_FUNCTION(oci_field_is_null); PHP_FUNCTION(oci_field_name); @@ -363,20 +197,10 @@ PHP_FUNCTION(oci_collection_trim); /* {{{ extension definition structures */ -#define OCI_ASSOC 1<<0 -#define OCI_NUM 1<<1 -#define OCI_BOTH (OCI_ASSOC|OCI_NUM) - -#define OCI_RETURN_NULLS 1<<2 -#define OCI_RETURN_LOBS 1<<3 - -#define OCI_FETCHSTATEMENT_BY_COLUMN 1<<4 -#define OCI_FETCHSTATEMENT_BY_ROW 1<<5 -#define OCI_FETCHSTATEMENT_BY (OCI_FETCHSTATEMENT_BY_COLUMN | OCI_FETCHSTATEMENT_BY_ROW) - static zend_function_entry php_oci_functions[] = { - PHP_FE(oci_define_by_name, third_arg_force_ref) - PHP_FE(oci_bind_by_name, third_arg_force_ref) + PHP_FE(oci_define_by_name, oci_third_arg_force_ref) + PHP_FE(oci_bind_by_name, oci_third_arg_force_ref) + PHP_FE(oci_bind_array_by_name, oci_third_arg_force_ref) PHP_FE(oci_field_is_null, NULL) PHP_FE(oci_field_name, NULL) PHP_FE(oci_field_size, NULL) @@ -391,8 +215,8 @@ static zend_function_entry php_oci_functions[] = { PHP_FE(oci_fetch_row, NULL) PHP_FE(oci_fetch_assoc, NULL) PHP_FE(oci_fetch_array, NULL) - PHP_FE(ocifetchinto, second_arg_force_ref) - PHP_FE(oci_fetch_all, second_arg_force_ref) + PHP_FE(ocifetchinto, oci_second_arg_force_ref) + PHP_FE(oci_fetch_all, oci_second_arg_force_ref) PHP_FE(oci_free_statement, NULL) PHP_FE(oci_internal_debug, NULL) PHP_FE(oci_num_fields, NULL) @@ -445,8 +269,8 @@ static zend_function_entry php_oci_functions[] = { PHP_FALIAS(oci_free_cursor, oci_free_statement, NULL) PHP_FALIAS(ocifreecursor, oci_free_statement, NULL) - PHP_FALIAS(ocibindbyname, oci_bind_by_name, third_arg_force_ref) - PHP_FALIAS(ocidefinebyname, oci_define_by_name, third_arg_force_ref) + PHP_FALIAS(ocibindbyname, oci_bind_by_name, oci_third_arg_force_ref) + PHP_FALIAS(ocidefinebyname, oci_define_by_name, oci_third_arg_force_ref) PHP_FALIAS(ocicolumnisnull, oci_field_is_null, NULL) PHP_FALIAS(ocicolumnname, oci_field_name, NULL) PHP_FALIAS(ocicolumnsize, oci_field_size, NULL) @@ -457,7 +281,7 @@ static zend_function_entry php_oci_functions[] = { PHP_FALIAS(ociexecute, oci_execute, NULL) PHP_FALIAS(ocicancel, oci_cancel, NULL) PHP_FALIAS(ocifetch, oci_fetch, NULL) - PHP_FALIAS(ocifetchstatement, oci_fetch_all, second_arg_force_ref) + PHP_FALIAS(ocifetchstatement, oci_fetch_all, oci_second_arg_force_ref) PHP_FALIAS(ocifreestatement, oci_free_statement, NULL) PHP_FALIAS(ociinternaldebug, oci_internal_debug, NULL) PHP_FALIAS(ocinumcols, oci_num_fields, NULL) @@ -511,6 +335,8 @@ static zend_function_entry php_oci_lob_class_functions[] = { PHP_FALIAS(append, oci_lob_append, NULL) PHP_FALIAS(size, oci_lob_size, NULL) PHP_FALIAS(writetofile, oci_lob_export, NULL) + PHP_FALIAS(export, oci_lob_export, NULL) + PHP_FALIAS(import, oci_lob_import, NULL) #ifdef HAVE_OCI8_TEMP_LOB PHP_FALIAS(writetemporary, oci_lob_write_temporary, NULL) PHP_FALIAS(close, oci_lob_close, NULL) @@ -544,58 +370,98 @@ zend_module_entry oci8_module_entry = { PHP_RINIT(oci), /* per-request startup function */ PHP_RSHUTDOWN(oci), /* per-request shutdown function */ PHP_MINFO(oci), /* information function */ - NO_VERSION_YET, + "1.1", STANDARD_MODULE_PROPERTIES }; /* }}} */ +/* {{{ PHP_INI */ +PHP_INI_BEGIN() + STD_PHP_INI_ENTRY("oci8.max_persistent", "-1", PHP_INI_SYSTEM, ONUPDATELONGFUNC, max_persistent, zend_oci_globals, oci_globals) + STD_PHP_INI_ENTRY("oci8.persistent_timeout", "-1", PHP_INI_SYSTEM, ONUPDATELONGFUNC, persistent_timeout, zend_oci_globals, oci_globals) + STD_PHP_INI_ENTRY("oci8.ping_interval", "60", PHP_INI_SYSTEM, ONUPDATELONGFUNC, ping_interval, zend_oci_globals, oci_globals) + STD_PHP_INI_BOOLEAN("oci8.privileged_connect", "0", PHP_INI_SYSTEM, OnUpdateBool, privileged_connect, zend_oci_globals, oci_globals) + STD_PHP_INI_ENTRY("oci8.statement_cache_size", "20", PHP_INI_SYSTEM, ONUPDATELONGFUNC, statement_cache_size, zend_oci_globals, oci_globals) + STD_PHP_INI_ENTRY("oci8.default_prefetch", "10", PHP_INI_SYSTEM, ONUPDATELONGFUNC, default_prefetch, zend_oci_globals, oci_globals) + STD_PHP_INI_ENTRY("oci8.old_oci_close_semantics", "0", PHP_INI_SYSTEM, OnUpdateBool, old_oci_close_semantics, zend_oci_globals, oci_globals) +PHP_INI_END() +/* }}} */ + /* {{{ startup, shutdown and info functions */ -static void php_oci_init_globals(php_oci_globals *oci_globals_p TSRMLS_DC) -{ - OCI(shutdown) = 0; - OCI(in_call) = 0; - - CALL_OCI( - OCIEnvInit( - &OCI(pEnv), - OCI_DEFAULT, - 0, - NULL - ) - ); - - CALL_OCI( - OCIHandleAlloc( - OCI(pEnv), - (dvoid **)&OCI(pError), - OCI_HTYPE_ERROR, - 0, - NULL - ) - ); -} -static int _sessions_pcleanup(zend_llist *session_list) +/* {{{ php_oci_init_global_handles() + Initialize global handles only when they are needed +*/ +static void php_oci_init_global_handles(TSRMLS_D) { - zend_llist_destroy(session_list); + sword errcode; + sb4 error_code = 0; + text tmp_buf[PHP_OCI_ERRBUF_LEN]; - return 1; -} + errcode = OCIEnvInit (&OCI_G(env), OCI_DEFAULT, 0, NULL); + + if (errcode == OCI_ERROR) { + goto oci_error; + } + + errcode = OCIHandleAlloc (OCI_G(env), (dvoid **)&OCI_G(err), OCI_HTYPE_ERROR, 0, NULL); + + if (errcode == OCI_ERROR || errcode == OCI_SUCCESS_WITH_INFO) { + goto oci_error; + } -static int _session_pcleanup(oci_session *session) -{ - _oci_close_session(session); + return; + +oci_error: + + OCIErrorGet(OCI_G(env), (ub4)1, NULL, &error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR); - return 1; -} + if (error_code) { + int tmp_buf_len = strlen(tmp_buf); + + if (tmp_buf[tmp_buf_len - 1] == '\n') { + tmp_buf[tmp_buf_len - 1] = '\0'; + } + + if (errcode != OCI_SUCCESS_WITH_INFO) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_ERROR: %s", tmp_buf); + + OCIHandleFree((dvoid *) OCI_G(env), OCI_HTYPE_ENV); + + OCI_G(env) = NULL; + OCI_G(err) = NULL; + } + else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_SUCCESS_WITH_INFO: %s", tmp_buf); + } + } +} /* }}} */ -static int _server_pcleanup(oci_server *server) +/* {{{ php_oci_cleanup_global_handles() + Free global handles (if they were initialized before) +*/ +static void php_oci_cleanup_global_handles(TSRMLS_D) { - _oci_close_server(server); + if (OCI_G(err)) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) OCI_G(err), OCI_HTYPE_ERROR)); + OCI_G(err) = NULL; + } + + if (OCI_G(env)) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) OCI_G(env), OCI_HTYPE_ENV)); + OCI_G(env) = NULL; + } +} /* }}} */ - return 1; +/* {{{ php_oci_init_globals() + Zerofill globals during module init +*/ +static void php_oci_init_globals(zend_oci_globals *oci_globals TSRMLS_DC) +{ + memset(oci_globals, 0, sizeof(zend_oci_globals)); } +/* }}} */ PHP_MINIT_FUNCTION(oci) { @@ -604,53 +470,32 @@ PHP_MINIT_FUNCTION(oci) zend_class_entry oci_coll_class_entry; #endif -#ifdef HAVE_OCI8_SHARED_MODE - -#ifdef PHP_OCI8_HAVE_COLLECTIONS -#define PHP_OCI_INIT_MODE_TMP OCI_SHARED | OCI_OBJECT -#else -#define PHP_OCI_INIT_MODE_TMP OCI_SHARED -#endif - -#else - #ifdef PHP_OCI8_HAVE_COLLECTIONS #define PHP_OCI_INIT_MODE_TMP OCI_DEFAULT | OCI_OBJECT #else #define PHP_OCI_INIT_MODE_TMP OCI_DEFAULT #endif -#endif - #ifdef ZTS #define PHP_OCI_INIT_MODE PHP_OCI_INIT_MODE_TMP | OCI_THREADED #else #define PHP_OCI_INIT_MODE PHP_OCI_INIT_MODE_TMP #endif - mutex_alloc(mx_lock); - - persistent_servers = malloc(sizeof(TsHashTable)); - persistent_sessions = malloc(sizeof(TsHashTable)); - zend_ts_hash_init(persistent_servers, 13, NULL, (dtor_func_t) _server_pcleanup, 1); - zend_ts_hash_init(persistent_sessions, 13, NULL, (dtor_func_t) _sessions_pcleanup, 1); - +#if !HAVE_OCI_ENV_CREATE OCIInitialize(PHP_OCI_INIT_MODE, NULL, NULL, NULL, NULL); - -#ifdef ZTS - ts_allocate_id(&oci_globals_id, sizeof(php_oci_globals), (ts_allocate_ctor) php_oci_init_globals, NULL); -#else - php_oci_init_globals(&oci_globals TSRMLS_CC); #endif - le_stmt = zend_register_list_destructors_ex(_oci_stmt_list_dtor, NULL, "oci8 statement", module_number); - le_conn = zend_register_list_destructors_ex(php_oci_free_conn_list, NULL, "oci8 connection", module_number); - le_desc = zend_register_list_destructors_ex(_oci_descriptor_list_dtor, NULL, "oci8 descriptor", module_number); + ZEND_INIT_MODULE_GLOBALS(oci, php_oci_init_globals, NULL); + REGISTER_INI_ENTRIES(); + + le_statement = zend_register_list_destructors_ex(php_oci_statement_list_dtor, NULL, "oci8 statement", module_number); + le_connection = zend_register_list_destructors_ex(php_oci_connection_list_dtor, NULL, "oci8 connection", module_number); + le_pconnection = zend_register_list_destructors_ex(NULL, php_oci_pconnection_list_dtor, "oci8 persistent connection", module_number); + le_descriptor = zend_register_list_destructors_ex(php_oci_descriptor_list_dtor, NULL, "oci8 descriptor", module_number); #ifdef PHP_OCI8_HAVE_COLLECTIONS - le_coll = zend_register_list_destructors_ex(_oci_coll_list_dtor, NULL, "oci8 collection", module_number); + le_collection = zend_register_list_destructors_ex(php_oci_collection_list_dtor, NULL, "oci8 collection", module_number); #endif - le_server = zend_register_list_destructors_ex(_oci_server_list_dtor, NULL, "oci8 server", module_number); - le_session = zend_register_list_destructors_ex(_oci_session_list_dtor, NULL, "oci8 session", module_number); INIT_CLASS_ENTRY(oci_lob_class_entry, "OCI-Lob", php_oci_lob_class_functions); #ifdef PHP_OCI8_HAVE_COLLECTIONS @@ -664,14 +509,16 @@ PHP_MINIT_FUNCTION(oci) /* thies@thieso.net 990203 i do not think that we will need all of them - just in here for completeness for now! */ REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_SYSOPER",OCI_SYSOPER, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_SYSDBA",OCI_SYSDBA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_DESCRIBE_ONLY",OCI_DESCRIBE_ONLY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_COMMIT_ON_SUCCESS",OCI_COMMIT_ON_SUCCESS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_EXACT_FETCH",OCI_EXACT_FETCH, CONST_CS | CONST_PERSISTENT); /* for $LOB->seek() */ - REGISTER_LONG_CONSTANT("OCI_SEEK_SET",OCI_SEEK_SET, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_SEEK_CUR",OCI_SEEK_CUR, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_SEEK_END",OCI_SEEK_END, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_SEEK_SET",PHP_OCI_SEEK_SET, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_SEEK_CUR",PHP_OCI_SEEK_CUR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_SEEK_END",PHP_OCI_SEEK_END, CONST_CS | CONST_PERSISTENT); /* for $LOB->flush() */ REGISTER_LONG_CONSTANT("OCI_LOB_BUFFER_FREE",OCI_LOB_BUFFER_FREE, CONST_CS | CONST_PERSISTENT); @@ -682,11 +529,28 @@ PHP_MINIT_FUNCTION(oci) REGISTER_LONG_CONSTANT("SQLT_CLOB",SQLT_CLOB, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLT_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLT_RDD",SQLT_RDD, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_RSET",SQLT_RSET, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_AFC",SQLT_AFC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_CHR",SQLT_CHR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_VCS",SQLT_VCS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_AVC",SQLT_AVC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_STR",SQLT_STR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_LVC",SQLT_LVC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_FLT",SQLT_FLT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_UIN",SQLT_UIN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_LNG",SQLT_LNG, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_ODT",SQLT_ODT, CONST_CS | CONST_PERSISTENT); +#if defined(HAVE_OCI_INSTANT_CLIENT) || (defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION > 10) + REGISTER_LONG_CONSTANT("SQLT_BDOUBLE",SQLT_BDOUBLE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SQLT_BFLOAT",SQLT_BFLOAT, CONST_CS | CONST_PERSISTENT); +#endif #ifdef PHP_OCI8_HAVE_COLLECTIONS REGISTER_LONG_CONSTANT("OCI_B_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLT_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT("OCI_SYSDATE","SYSDATE",CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("OCI_SYSDATE","SYSDATE", CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("OCI_B_BFILE",SQLT_BFILEE, CONST_CS | CONST_PERSISTENT); @@ -696,17 +560,19 @@ PHP_MINIT_FUNCTION(oci) REGISTER_LONG_CONSTANT("OCI_B_ROWID",SQLT_RDD, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_B_CURSOR",SQLT_RSET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("OCI_B_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_B_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_B_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT); /* for OCIFetchStatement */ - REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_COLUMN", OCI_FETCHSTATEMENT_BY_COLUMN, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_ROW", OCI_FETCHSTATEMENT_BY_ROW, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_COLUMN", PHP_OCI_FETCHSTATEMENT_BY_COLUMN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_ROW", PHP_OCI_FETCHSTATEMENT_BY_ROW, CONST_CS | CONST_PERSISTENT); /* for OCIFetchInto & OCIResult */ - REGISTER_LONG_CONSTANT("OCI_ASSOC",OCI_ASSOC, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_NUM",OCI_NUM, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_BOTH",OCI_BOTH, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_RETURN_NULLS",OCI_RETURN_NULLS, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("OCI_RETURN_LOBS",OCI_RETURN_LOBS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_ASSOC",PHP_OCI_ASSOC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_NUM",PHP_OCI_NUM, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_BOTH",PHP_OCI_BOTH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_RETURN_NULLS",PHP_OCI_RETURN_NULLS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("OCI_RETURN_LOBS",PHP_OCI_RETURN_LOBS, CONST_CS | CONST_PERSISTENT); /* for OCINewDescriptor (real "oci" names + short "php" names*/ REGISTER_LONG_CONSTANT("OCI_DTYPE_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT); @@ -730,53 +596,40 @@ PHP_MINIT_FUNCTION(oci) PHP_RINIT_FUNCTION(oci) { - OCI(debug_mode) = 0; /* start "fresh" */ -/* OCI(in_call) = 0; i don't think we want this! */ - - oci_debug("php_rinit_oci"); + OCI_G(debug_mode) = 0; /* start "fresh" */ + OCI_G(num_links) = OCI_G(num_persistent); + OCI_G(errcode) = 0; return SUCCESS; } PHP_MSHUTDOWN_FUNCTION(oci) { - OCI(shutdown) = 1; - - oci_debug("START php_mshutdown_oci"); - - zend_ts_hash_destroy(persistent_sessions); - zend_ts_hash_destroy(persistent_servers); - - free(persistent_sessions); - free(persistent_servers); - - mutex_free(mx_lock); + OCI_G(shutdown) = 1; + + UNREGISTER_INI_ENTRIES(); - CALL_OCI( - OCIHandleFree( - (dvoid *) OCI(pEnv), - OCI_HTYPE_ENV - ) - ); +#ifndef ZTS + php_oci_cleanup_global_handles(TSRMLS_C); +#endif - oci_debug("END php_mshutdown_oci"); +#if !HAVE_OCI_ENV_CREATE + OCITerminate(OCI_DEFAULT); +#endif return SUCCESS; } PHP_RSHUTDOWN_FUNCTION(oci) { - oci_debug("START php_rshutdown_oci"); + /* check persistent connections and do the necessary actions if needed */ + zend_hash_apply(&EG(persistent_list), (apply_func_t) php_oci_persistent_helper TSRMLS_CC); -#if 0 - /* XXX free all statements, rollback all outstanding transactions */ - - zend_ts_hash_apply(persistent_sessions, (apply_func_t) _session_cleanup TSRMLS_CC); - zend_ts_hash_apply(persistent_servers, (apply_func_t) _server_cleanup TSRMLS_CC); +#ifdef ZTS + zend_hash_apply(&EG(regular_list), (apply_func_t) php_oci_regular_helper TSRMLS_CC); + php_oci_cleanup_global_handles(TSRMLS_C); #endif - oci_debug("END php_rshutdown_oci"); - return SUCCESS; } @@ -786,17 +639,22 @@ PHP_MINFO_FUNCTION(oci) php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.3 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.8 $"); - sprintf(buf, "%ld", num_persistent); - php_info_print_table_row(2, "Active Persistent Links", buf); - sprintf(buf, "%ld", num_links); - php_info_print_table_row(2, "Active Links", buf); + sprintf(buf, "%ld", OCI_G(num_persistent)); + php_info_print_table_row(2, "Active Persistent Connections", buf); + sprintf(buf, "%ld", OCI_G(num_links)); + php_info_print_table_row(2, "Active Connections", buf); -#ifndef PHP_WIN32 +#if !defined(PHP_WIN32) && !defined(HAVE_OCI_INSTANT_CLIENT) php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION ); php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR ); php_info_print_table_row(2, "Libraries Used", PHP_OCI8_SHARED_LIBADD ); +#else +# if defined(HAVE_OCI_INSTANT_CLIENT) && defined(OCI_MAJOR_VERSION) && defined(OCI_MINOR_VERSION) + sprintf(buf, "%d.%d", OCI_MAJOR_VERSION, OCI_MINOR_VERSION); + php_info_print_table_row(2, "Oracle Instant Client Version", buf); +# endif #endif #ifdef HAVE_OCI8_TEMP_LOB @@ -812,111 +670,116 @@ PHP_MINFO_FUNCTION(oci) #endif php_info_print_table_end(); + + DISPLAY_INI_ENTRIES(); } /* }}} */ -/* {{{ _oci_define_hash_dtor() -*/ -static void _oci_define_hash_dtor(void *data) -{ - oci_define *define = (oci_define *) data; +/* list destructors {{{ */ - oci_debug("_oci_define_hash_dtor: %s",define->name); - - zval_ptr_dtor(&define->zval); +/* {{{ php_oci_connection_list_dtor() + Non-persistent connection destructor */ +static void php_oci_connection_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) +{ + php_oci_connection *connection = (php_oci_connection *)entry->ptr; + php_oci_connection_close(connection TSRMLS_CC); + OCI_G(num_links)--; +} /* }}} */ - if (define->name) { - efree(define->name); - define->name = 0; - } -} -/* }}} */ +/* {{{ php_oci_pconnection_list_dtor() + Persistent connection destructor */ +static void php_oci_pconnection_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) +{ + php_oci_connection *connection = (php_oci_connection *)entry->ptr; + php_oci_connection_close(connection TSRMLS_CC); + OCI_G(num_persistent)--; +} /* }}} */ -/* {{{ _oci_desc_flush_hash_dtor() - */ -static void _oci_desc_flush_hash_dtor(void *data) +/* {{{ php_oci_statement_list_dtor() + Statement destructor */ +static void php_oci_statement_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) { - oci_descriptor *descr = *(oci_descriptor **)data; - TSRMLS_FETCH(); - - if (descr->buffering == 2 && (descr->type == OCI_DTYPE_LOB || descr->type == OCI_DTYPE_FILE)) { - oci_lob_flush(descr,OCI_LOB_BUFFER_FREE TSRMLS_CC); - descr->buffering = 1; - } -} -/* }}} */ + php_oci_statement *statement = (php_oci_statement *)entry->ptr; + php_oci_statement_free(statement TSRMLS_CC); +} /* }}} */ -/* {{{ _oci_bind_hash_dtor() -*/ -static void _oci_bind_hash_dtor(void *data) +/* {{{ php_oci_descriptor_list_dtor() + Descriptor destructor */ +static void php_oci_descriptor_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) { - oci_bind *bind = (oci_bind *) data; + php_oci_descriptor *descriptor = (php_oci_descriptor *)entry->ptr; + php_oci_lob_free(descriptor TSRMLS_CC); +} /* }}} */ - oci_debug("_oci_bind_hash_dtor:"); +/* {{{ php_oci_collection_list_dtor() + Collection destructor */ +static void php_oci_collection_list_dtor(zend_rsrc_list_entry *entry TSRMLS_DC) +{ + php_oci_collection *collection = (php_oci_collection *)entry->ptr; + php_oci_collection_close(collection TSRMLS_CC); +} /* }}} */ - zval_ptr_dtor(&(bind->zval)); -} /* }}} */ -/* {{{ _oci_bind_pre_exec() -*/ -static int _oci_bind_pre_exec(void *data TSRMLS_DC) -{ - oci_bind *bind = (oci_bind *) data; +/* hash destructors {{{ */ - /* reset all bind stuff to a normal state..-. */ +/* {{{ php_oci_define_hash_dtor() + Define hash destructor */ +void php_oci_define_hash_dtor(void *data) +{ + php_oci_define *define = (php_oci_define *) data; - bind->indicator = 0; + zval_ptr_dtor(&define->zval); - return 0; + if (define->name) { + efree(define->name); + define->name = NULL; + } } /* }}} */ -/* {{{ _oci_bind_post_exec() -*/ -static int _oci_bind_post_exec(void *data TSRMLS_DC) +/* {{{ php_oci_bind_hash_dtor() + Bind hash destructor */ +void php_oci_bind_hash_dtor(void *data) { - oci_bind *bind = (oci_bind *) data; + php_oci_bind *bind = (php_oci_bind *) data; - if (bind->indicator == -1) { /* NULL */ - zval *val = bind->zval; - if (Z_TYPE_P(val) == IS_STRING) { - *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */ - } - zval_dtor(val); - ZVAL_NULL(val); - } else if (Z_TYPE_P(bind->zval) == IS_STRING) { - 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'; + if (bind->array.elements) { + efree(bind->array.elements); } +/* if (bind->array.element_lengths) { + efree(bind->array.element_lengths); + } + if (bind->array.indicators) { + efree(bind->array.indicators); + } + if (bind->array.retcodes) { + efree(bind->array.retcodes); + } +*/ - - return 0; + zval_ptr_dtor(&bind->zval); } /* }}} */ -/* {{{ _oci_column_hash_dtor() -*/ -static void _oci_column_hash_dtor(void *data) -{ - oci_out_column *column = (oci_out_column *) data; +/* {{{ php_oci_column_hash_dtor() + Column hash destructor */ +void php_oci_column_hash_dtor(void *data) +{ + php_oci_out_column *column = (php_oci_out_column *) data; TSRMLS_FETCH(); - oci_debug("START _oci_column_hash_dtor: %s",column->name); - if (column->stmtid) { zend_list_delete(column->stmtid); } if (column->is_descr) { zend_list_delete(column->descid); - } else { - if (column->data) { - efree(column->data); - } } - oci_debug("END _oci_column_hash_dtor: %s",column->name); + if (column->data) { + efree(column->data); + } if (column->name) { efree(column->name); @@ -924,6259 +787,964 @@ static void _oci_column_hash_dtor(void *data) } /* }}} */ -/* {{{ _oci_stmt_list_dtor() -*/ -static void _oci_stmt_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - oci_statement *statement = (oci_statement *)rsrc->ptr; - oci_debug("START _oci_stmt_list_dtor: id=%d last_query=\"%s\"",statement->id,SAFE_STRING(statement->last_query)); - - if (statement->pStmt) { - CALL_OCI( - OCIHandleFree( - statement->pStmt, - OCI_HTYPE_STMT - ) - ); - - statement->pStmt = 0; - } - - if (statement->pError) { - CALL_OCI( - OCIHandleFree( - statement->pError, - OCI_HTYPE_ERROR - ) - ); - - statement->pError = 0; - } - - if (statement->last_query) { - efree(statement->last_query); - } - - if (statement->columns) { - zend_hash_destroy(statement->columns); - efree(statement->columns); - } - - if (statement->binds) { - zend_hash_destroy(statement->binds); - efree(statement->binds); - } - - if (statement->defines) { - zend_hash_destroy(statement->defines); - efree(statement->defines); - } - - oci_debug("END _oci_stmt_list_dtor: id=%d",statement->id); - - efree(statement); -} -/* }}} */ - -/* {{{ _oci_conn_list_dtor() -*/ -static void _oci_conn_list_dtor(oci_connection *connection TSRMLS_DC) +/* {{{ php_oci_descriptor_flush_hash_dtor() + Flush descriptors on commit */ +void php_oci_descriptor_flush_hash_dtor(void *data) { - /* - as the connection is "only" a in memory service context we do not disconnect from oracle. - */ - - oci_debug("START _oci_conn_list_dtor: id=%d",connection->id); - - if (connection->pServiceContext) { - - if (connection->needs_commit) { - oci_debug("OCITransRollback"); - CALL_OCI_RETURN(connection->error, - OCITransRollback( - connection->pServiceContext, - connection->pError, - (ub4)0 - ) - ); - - if (connection->error) { - oci_error(connection->pError, "failed to rollback outstanding transactions!", connection->error); - } - connection->needs_commit = 0; - } else { - oci_debug("nothing to do.."); - } - - CALL_OCI( - OCIHandleFree( - (dvoid *) connection->pServiceContext, - (ub4) OCI_HTYPE_SVCCTX - ) - ); - } + php_oci_descriptor *descriptor = *(php_oci_descriptor **)data; + TSRMLS_FETCH(); - if (connection->pError) { - CALL_OCI( - OCIHandleFree( - (dvoid *) connection->pError, - (ub4) OCI_HTYPE_ERROR - ) - ); - } - - if (connection->session && connection->session->exclusive) { - /* close associated session when destructed */ - zend_list_delete(connection->session->num); - } - - if (connection->descriptors) { - zend_hash_destroy(connection->descriptors); - efree(connection->descriptors); - } - - oci_debug("END _oci_conn_list_dtor: id=%d",connection->id); - - efree(connection); -} -/* }}} */ - -/* {{{ php_oci_free_conn_list - */ -static void php_oci_free_conn_list(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - oci_connection *conn = (oci_connection *)rsrc->ptr; - _oci_conn_list_dtor(conn TSRMLS_CC); -} -/* }}} */ - -#ifdef PHP_OCI8_HAVE_COLLECTIONS - -/* {{{ _oci_coll_list_dtor() - */ -static void _oci_coll_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - oci_collection *coll = (oci_collection *)rsrc->ptr; - oci_debug("START _oci_coll_list_dtor: %d",coll->id); - - /* Note sure if we need to free the object. Have an - oracle TAR out on this one. - OCIDescriptorFree(descr->ocidescr, descr->type); */ - - oci_debug("END _oci_coll_list_dtor: %d",coll->id); - - efree(coll); -} -/* }}} */ -#endif - -/* {{{ _oci_descriptor_list_dtor() - */ -static void _oci_descriptor_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - oci_descriptor *descr = (oci_descriptor *)rsrc->ptr; - oci_debug("START _oci_descriptor_list_dtor: %d",descr->id); - - /* flushing Lobs & Files with buffering enabled */ - if ((descr->type == OCI_DTYPE_FILE || descr->type == OCI_DTYPE_LOB) && descr->buffering == 2) { - oci_debug("descriptor #%d needs to be flushed. flushing..",descr->id); - oci_lob_flush(descr,OCI_LOB_BUFFER_FREE TSRMLS_CC); + if (descriptor && descriptor->buffering == PHP_OCI_LOB_BUFFER_USED && (descriptor->type == OCI_DTYPE_LOB || descriptor->type == OCI_DTYPE_FILE)) { + php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE TSRMLS_CC); + descriptor->buffering = PHP_OCI_LOB_BUFFER_ENABLED; } - - CALL_OCI( - OCIDescriptorFree( - descr->ocidescr, - descr->type - ) - ); - - oci_debug("END _oci_descriptor_list_dtor: %d",descr->id); - - efree(descr); + data = NULL; } /* }}} */ -/* {{{ _oci_server_list_dtor() - */ -static void _oci_server_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) +/* {{{ php_oci_descriptor_delete_from_hash() + Delete descriptor from the hash */ +int php_oci_descriptor_delete_from_hash(void *data, void *id TSRMLS_DC) { -#if 0 - oci_server *server = (oci_server *)rsrc->ptr; - if (server->persistent) - return; - - _oci_close_server(server); -#endif -} -/* }}} */ - -/* {{{ _oci_session_list_dtor() - */ -static void _oci_session_list_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -{ - oci_session *session = (oci_session *)rsrc->ptr; - if (session->persistent) { - /* clear thread assignment */ - session->thread = 0; - return; + php_oci_descriptor *descriptor = *(php_oci_descriptor **)data; + int *desc_id = (int *) id; + + if (descriptor && desc_id && descriptor->id == *desc_id) { + return 1; } - - _oci_close_session(session); + return 0; } /* }}} */ -/* {{{ oci_handle_error - */ -static ub4 oci_handle_error(oci_connection *connection, ub4 errcode) -{ - switch (errcode) { - case 1013: /* user requested cancel of current operation */ - zend_bailout(); - break; - - case 22: /* ORA-00022 Invalid session id */ - case 1012: /* ORA-01012: */ - case 3113: /* ORA-03113: end-of-file on communication channel */ - case 604: - case 1041: - connection->is_open = 0; - connection->session->is_open = 0; - connection->session->server->is_open = 0; - return 1; /* fatal error */ - } - - return 0; /* no fatal error */ -} /* }}} */ -/* {{{ oci_error() -*/ -static ub4 oci_error(OCIError *err_p, char *what, sword status) +/* {{{ php_oci_error() + Fetch & print out error message if we get an error */ +sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC) { - text errbuf[512]; + text *errbuf = (text *)NULL; sb4 errcode = 0; - TSRMLS_FETCH(); switch (status) { case OCI_SUCCESS: break; case OCI_SUCCESS_WITH_INFO: - CALL_OCI( - OCIErrorGet( - err_p, - (ub4)1, - NULL, - &errcode, - errbuf, - (ub4)sizeof(errbuf), - (ub4)OCI_HTYPE_ERROR - ) - ); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_SUCCESS_WITH_INFO: %s", what, errbuf); + errcode = php_oci_fetch_errmsg(err_p, &errbuf TSRMLS_CC); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_SUCCESS_WITH_INFO: %s", errbuf); + efree(errbuf); break; case OCI_NEED_DATA: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_NEED_DATA", what); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NEED_DATA"); break; case OCI_NO_DATA: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_NO_DATA", what); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA"); break; - case OCI_ERROR: { - CALL_OCI( - OCIErrorGet( - err_p, - (ub4)1, - NULL, - &errcode, - errbuf, - (ub4)sizeof(errbuf), - (ub4)OCI_HTYPE_ERROR - ) - ); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: %s", what, errbuf); + case OCI_ERROR: + errcode = php_oci_fetch_errmsg(err_p, &errbuf TSRMLS_CC); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errbuf); + efree(errbuf); break; - } case OCI_INVALID_HANDLE: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_INVALID_HANDLE", what); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_INVALID_HANDLE"); break; case OCI_STILL_EXECUTING: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_STILL_EXECUTING", what); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_STILL_EXECUTING"); break; case OCI_CONTINUE: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: OCI_CONTINUE", what); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_CONTINUE"); break; default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown OCI error code: %d", status); break; } return errcode; } /* }}} */ -/* {{{ oci_ping() -*/ -static int oci_ping(oci_server *server) +/* {{{ php_oci_fetch_errmsg() + Fetch error message into the buffer from the error handle provided */ +sb4 php_oci_fetch_errmsg(OCIError *error_handle, text **error_buf TSRMLS_DC) { - char version[256]; - TSRMLS_FETCH(); + sb4 error_code = 0; + text tmp_buf[PHP_OCI_ERRBUF_LEN]; + + tmp_buf[0] = '\0'; - CALL_OCI_RETURN(OCI(error), - OCIServerVersion( - server->pServer, - OCI(pError), - (text*)version, - sizeof(version), - OCI_HTYPE_SERVER - ) - ); - - if (OCI(error) == OCI_SUCCESS) { - return 1; + PHP_OCI_CALL(OCIErrorGet, (error_handle, (ub4)1, NULL, &error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR)); + + if (error_code) { + int tmp_buf_len = strlen(tmp_buf); + + if (tmp_buf[tmp_buf_len - 1] == '\n') { + tmp_buf[tmp_buf_len - 1] = '\0'; + } + if (error_buf) { + *error_buf = NULL; + *error_buf = estrndup(tmp_buf, tmp_buf_len + 1); + } } + return error_code; +} /* }}} */ - oci_error(OCI(pError), "oci_ping", OCI(error)); - - return 0; -} -/* }}} */ - -/************************* INTERNAL FUNCTIONS *************************/ - -/* {{{ oci_debug() -*/ -static void oci_debug(const char *format, ...) +#ifdef HAVE_OCI8_ATTR_STATEMENT +/* {{{ php_oci_fetch_sqltext_offset() + Compute offset in the SQL statement */ +int php_oci_fetch_sqltext_offset(php_oci_statement *statement, text **sqltext, ub2 *error_offset TSRMLS_DC) { - TSRMLS_FETCH(); - - if (OCI(debug_mode)) { - char buffer[1024]; - va_list args; + *sqltext = NULL; + *error_offset = 0; - va_start(args, format); - vsnprintf(buffer, sizeof(buffer)-1, format, args); - va_end(args); - buffer[sizeof(buffer)-1] = '\0'; - php_printf("OCIDebug: %s
\n", buffer); - } -} -/* }}} */ - -/* {{{ oci_get_conn() -*/ -static oci_connection *oci_get_conn(zval **conn TSRMLS_DC) -{ - oci_connection *connection; - - connection = (oci_connection *) zend_fetch_resource(conn TSRMLS_CC, -1, "OCI8-Connection", NULL, 1, le_conn); - - if (connection && connection->is_open) { - return connection; - } else { - return (oci_connection *) NULL; - } -} -/* }}} */ - -/* {{{ oci_get_stmt() -*/ -static oci_statement *oci_get_stmt(zval **stmt TSRMLS_DC) -{ - oci_statement *statement; - - statement = (oci_statement *) zend_fetch_resource(stmt TSRMLS_CC, -1, "OCI8-Statement", NULL, 1, le_stmt); - - if (statement && statement->conn->is_open) { - return statement; - } else { - return (oci_statement *) NULL; + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (text *) sqltext, (ub4 *)0, OCI_ATTR_STATEMENT, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + return 1; } -} -/* }}} */ - -/* {{{ oci_get_desc() -*/ -static oci_descriptor *oci_get_desc(int ind TSRMLS_DC) -{ - oci_descriptor *descriptor; - int actual_resource_type; - - descriptor = (oci_descriptor *) zend_list_find(ind, &actual_resource_type); - if (descriptor && (actual_resource_type == le_desc)) { - return descriptor; - } else { - return (oci_descriptor *) NULL; + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)error_offset, (ub4 *)0, OCI_ATTR_PARSE_ERROR_OFFSET, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + return 1; } -} -/* }}} */ + return 0; +} /* }}} */ +#endif -/* {{{ oci_get_col() -*/ -static oci_out_column *oci_get_col(oci_statement *statement, int col, zval **value) +/* {{{ php_oci_do_connect() + Connect wrapper */ +void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclusive) { - oci_out_column *outcol = NULL; - int i; - TSRMLS_FETCH(); + php_oci_connection *connection; + char *username, *password; + char *dbname = NULL, *charset = NULL; + int username_len = 0, password_len = 0; + int dbname_len = 0, charset_len = 0; + long session_mode = OCI_DEFAULT; - if (statement->columns == 0) { /* we release the columns at the end of a fetch */ - return NULL; + /* if a fourth parameter is handed over, it is the charset identifier (but is only used in Oracle 9i+) */ + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ssl", &username, &username_len, &password, &password_len, &dbname, &dbname_len, &charset, &charset_len, &session_mode) == FAILURE) { + return; + } + + if (!charset_len) { + charset = NULL; } + + connection = php_oci_do_connect_ex(username, username_len, password, password_len, NULL, 0, dbname, dbname_len, charset, session_mode, persistent, exclusive TSRMLS_CC); - if (value) { - if (Z_TYPE_PP(value) == IS_STRING) { - for (i = 0; i < statement->ncolumns; i++) { - outcol = oci_get_col(statement, i + 1, 0); - if (outcol == NULL) { - continue; - } else if (((int) outcol->name_len == Z_STRLEN_PP(value)) && - (!strncmp(outcol->name, Z_STRVAL_PP(value), Z_STRLEN_PP(value))) - ) { - return outcol; - } - } - } else { - convert_to_long_ex(value); - return oci_get_col(statement,Z_LVAL_PP(value),0); - } - } else if (col != -1) { - if (zend_hash_index_find(statement->columns, col, (void **)&outcol) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column %d", col); - return NULL; - } - return outcol; + if (!connection) { + RETURN_FALSE; } + RETURN_RESOURCE(connection->rsrc_id); + +} /* }}} */ - return NULL; -} -/* }}} */ - -/* {{{ oci_new_desc() -*/ -static oci_descriptor *oci_new_desc(int type, oci_connection *connection) +/* {{{ php_oci_do_connect_ex() + * The real connect function. Allocates all the resources needed, establishes the connection and returns the result handle (or NULL) */ +php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, char *dbname, int dbname_len, char *charset, long session_mode, int persistent, int exclusive TSRMLS_DC) { - oci_descriptor *descr; - TSRMLS_FETCH(); - - descr = emalloc(sizeof(oci_descriptor)); + zend_rsrc_list_entry *le; + zend_rsrc_list_entry new_le; + php_oci_connection *connection = NULL; + smart_str hashed_details = {0}; + time_t timestamp; +#if HAVE_OCI_ENV_NLS_CREATE + ub2 charsetid = 0; +#endif - descr->type = type; - - switch (descr->type) { - case OCI_DTYPE_FILE: - case OCI_DTYPE_LOB: - case OCI_DTYPE_ROWID: + switch (session_mode) { + case OCI_DEFAULT: + break; + case OCI_SYSOPER: + case OCI_SYSDBA: + if (!OCI_G(privileged_connect)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA"); + return NULL; + } break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown descriptor type %d.", descr->type); - efree(descr); - return 0; - } - - CALL_OCI_RETURN(OCI(error), - OCIDescriptorAlloc( - connection->session->pEnv, - (dvoid*)&(descr->ocidescr), - descr->type, - (size_t) 0, - (dvoid **) 0 - ) - ); - - if (OCI(error)) { - ub4 error; - error = oci_error(OCI(pError),"OCIDescriptorAlloc %d",OCI(error)); - oci_handle_error(connection, error); - efree(descr); - return 0; + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid session mode specified (%ld)", session_mode); + return NULL; + break; } - descr->id = zend_list_insert(descr,le_desc); - descr->conn = connection; - descr->lob_current_position = 0; - descr->lob_size = -1; /* we should set it to -1 to know, that it's just not initialized */ - descr->buffering = 0; /* buffering is off by default */ - zend_list_addref(connection->id); - - if (descr->type == OCI_DTYPE_LOB || descr->type == OCI_DTYPE_FILE) { - /* add Lobs & Files to hash. we'll flush them ate the end */ - if (!connection->descriptors) { - ALLOC_HASHTABLE(connection->descriptors); - zend_hash_init(connection->descriptors, 13, NULL, _oci_desc_flush_hash_dtor, 0); - } - - zend_hash_next_index_insert(connection->descriptors,&descr,sizeof(oci_descriptor *),NULL); + smart_str_appendl_ex(&hashed_details, "oci8___", sizeof("oci8___") - 1, 0); + smart_str_appendl_ex(&hashed_details, username, username_len, 0); + smart_str_appendl_ex(&hashed_details, "__", sizeof("__") - 1, 0); + if (dbname) { + smart_str_appendl_ex(&hashed_details, dbname, dbname_len, 0); } - oci_debug("oci_new_desc %d",descr->id); - - return descr; -} -/* }}} */ + smart_str_appendl_ex(&hashed_details, "__", sizeof("__") - 1, 0); -#ifdef PHP_OCI8_HAVE_COLLECTIONS +#if HAVE_OCI_ENV_NLS_CREATE + if (charset && *charset) { + smart_str_appends_ex(&hashed_details, charset, 1); + } + else { + size_t rsize; -/* {{{ _oci_get_ocicoll() -*/ -static int _oci_get_ocicoll(zval *id,oci_collection **collection TSRMLS_DC) -{ - zval **coll; - - if (zend_hash_find(Z_OBJPROP_P(id), "collection", sizeof("collection"), (void **)&coll) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot find collection"); - return 0; + PHP_OCI_CALL(OCINlsEnvironmentVariableGet, (&charsetid, 2, OCI_NLS_CHARSET_ID, 0, &rsize)); + smart_str_append_unsigned_ex(&hashed_details, charsetid, 0); } - if ((*collection = oci_get_coll(Z_LVAL_PP(coll) TSRMLS_CC)) == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "collection not found"); - return 0; +#else + if (charset && *charset) { + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Your version of Oracle Client doesn't support setting the charset; bad or no charset conversions may result"); } - - return Z_LVAL_PP(coll); -} -/* }}} */ - #endif -/* {{{ _oci_get_ocidesc() -*/ -static int _oci_get_ocidesc(zval *id,oci_descriptor **descriptor TSRMLS_DC) -{ - zval **desc; - - if (zend_hash_find(Z_OBJPROP_P(id), "descriptor", sizeof("descriptor"), (void **)&desc) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot find descriptor"); - return 0; - } - - if ((*descriptor = oci_get_desc(Z_LVAL_PP(desc) TSRMLS_CC)) == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "descriptor not found"); - return 0; - } + timestamp = time(NULL); - return Z_LVAL_PP(desc); -} -/* }}} */ + smart_str_append_unsigned_ex(&hashed_details, session_mode, 0); + smart_str_0(&hashed_details); -/* {{{ _oci_make_zval() -*/ -static int _oci_make_zval(zval *value,oci_statement *statement,oci_out_column *column, char *func, int mode TSRMLS_DC) -{ - oci_descriptor *descr; - ub4 loblen; - int size; - char *buffer; + /* make it lowercase */ + php_strtolower(hashed_details.c, hashed_details.len); - if (column->indicator || column->retcode) - if ((column->indicator != -1) && (column->retcode != 1405)) - oci_debug("_oci_make_zval: %16s,retlen = %4d,retlen4 = %d,storage_size4 = %4d,indicator %4d, retcode = %4d", - column->name,column->retlen,column->retlen4,column->storage_size4,column->indicator,column->retcode); + /* Initialize global handles if the weren't initialized before */ - if ((!statement->has_data) || (column->indicator == -1)) { /* column is NULL or statment has no current data */ - ZVAL_NULL(value); - return 0; + if (OCI_G(env) == NULL) { + php_oci_init_global_handles(TSRMLS_C); } - if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */ - ZVAL_RESOURCE(value,column->stmtid); - zend_list_addref(column->stmtid); - } else if (column->is_descr) { - if ((column->data_type != SQLT_RDD) && (mode & OCI_RETURN_LOBS)) { - /* OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */ - - descr = oci_get_desc(column->descid TSRMLS_CC); - if (!descr) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to find my descriptor %p",column->data); - return -1; + if (!exclusive && !new_password) { + + if (persistent && zend_hash_find(&EG(persistent_list), hashed_details.c, hashed_details.len+1, (void **) &le) == SUCCESS) { + /* found */ + if (le->type == le_pconnection) { + connection = (php_oci_connection *)le->ptr; + } + } + else if (!persistent && zend_hash_find(&EG(regular_list), hashed_details.c, hashed_details.len+1, (void **) &le) == SUCCESS) { + if (le->type == le_index_ptr) { + int type; + long link; + void *ptr; + + link = (long) le->ptr; + ptr = zend_list_find(link,&type); + if (ptr && (type == le_connection)) { + connection = (php_oci_connection *)ptr; + } } - - if (oci_loadlob(statement->conn,descr,&buffer,&loblen)) { - ZVAL_FALSE(value); - } else { - if (loblen > 0) { - ZVAL_STRINGL(value,buffer,loblen,0); + } + + if (connection) { + if (connection->is_open) { + /* found an open connection. now ping it */ + if (connection->is_persistent) { + /* check connection liveness in the following order: + * 1) always check OCI_ATTR_SERVER_STATUS + * 2) see if it's time to ping it + * 3) ping it if needed + * */ + if (php_oci_connection_status(connection TSRMLS_CC)) { + /* only ping if: + * 1) next_ping > 0, which means that ping_interval is not -1 (aka "Off") + * 2) current_timestamp > next_ping, which means "it's time to check if it's still alive" + * */ + if ( (connection->next_ping > 0) && (timestamp > connection->next_ping) && !php_oci_connection_ping(connection TSRMLS_CC)) { + /* server died */ + } + else { + /* okay, the connection is open and the server is still alive */ + connection->used_this_request = 1; + smart_str_free_ex(&hashed_details, 0); + connection->rsrc_id = zend_list_insert(connection, le_pconnection); + return connection; + } + } + /* server died */ + zend_hash_del(&EG(persistent_list), hashed_details.c, hashed_details.len+1); + php_oci_connection_close(connection TSRMLS_CC); + connection = NULL; + goto open; } else { - ZVAL_EMPTY_STRING(value); + /* we do not ping non-persistent connections */ + smart_str_free_ex(&hashed_details, 0); + zend_list_addref(connection->rsrc_id); + return connection; } - } - } else { - /* return the locator */ - object_init_ex(value, oci_lob_class_entry_ptr); - add_property_resource(value, "descriptor", column->descid); - zend_list_addref(column->descid); - } - } else { - switch (column->retcode) { - case 0: - /* intact value */ - if (column->piecewise) { - size = column->retlen4; } else { - size = column->retlen; + zend_hash_del(&EG(regular_list), hashed_details.c, hashed_details.len+1); + connection = NULL; + goto open; } - break; + } + else { + /* found something, but it's not a connection, delete it */ + if (persistent) { + zend_hash_del(&EG(persistent_list), hashed_details.c, hashed_details.len+1); + } + else { + zend_hash_del(&EG(regular_list), hashed_details.c, hashed_details.len+1); + } + } + } +open: + if (persistent) { + zend_bool alloc_non_persistent = 0; + + if (OCI_G(max_persistent)!=-1 && OCI_G(num_persistent)>=OCI_G(max_persistent)) { + /* try to find an idle connection and kill it */ + zend_hash_apply(&EG(persistent_list), (apply_func_t) php_oci_persistent_helper TSRMLS_CC); - default: - /* XXX we SHOULD maybe have a different behaviour for unknown results! */ - ZVAL_FALSE(value); - return 0; + if (OCI_G(max_persistent)!=-1 && OCI_G(num_persistent)>=OCI_G(max_persistent)) { + /* all persistent connactions are in use, fallback to non-persistent connection creation */ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Too many open persistent connections (%ld)", OCI_G(num_persistent)); + alloc_non_persistent = 1; + } } - ZVAL_STRINGL(value,column->data,size,1); + if (alloc_non_persistent) { + connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection)); + connection->hash_key = estrndup(hashed_details.c, hashed_details.len+1); + connection->is_persistent = 0; + } + else { + connection = (php_oci_connection *) calloc(1, sizeof(php_oci_connection)); + connection->hash_key = zend_strndup(hashed_details.c, hashed_details.len); + connection->is_persistent = 1; + } } - - return 0; -} -/* }}} */ - -/* {{{ oci_setprefetch() -*/ -static int oci_setprefetch(oci_statement *statement,int size) -{ - ub4 prefetch; - sword error; - TSRMLS_FETCH(); - - prefetch = size * 1024; - - CALL_OCI_RETURN(error, - OCIAttrSet( - statement->pStmt, - OCI_HTYPE_STMT, - &prefetch, - 0, - OCI_ATTR_PREFETCH_MEMORY, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrSet OCI_ATTR_PREFETCH_MEMORY", error); - - if (statement->error) { - oci_handle_error(statement->conn, statement->error); + else { + connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection)); + connection->hash_key = estrndup(hashed_details.c, hashed_details.len+1); + connection->is_persistent = 0; } - prefetch = size; - CALL_OCI_RETURN(error, - OCIAttrSet( - statement->pStmt, - OCI_HTYPE_STMT, - &prefetch, - 0, - OCI_ATTR_PREFETCH_ROWS, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrSet OCI_ATTR_PREFETCH_MEMORY", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); + connection->idle_expiry = (OCI_G(persistent_timeout) > 0) ? (timestamp + OCI_G(persistent_timeout)) : 0; + if (OCI_G(ping_interval) >= 0) { + connection->next_ping = timestamp + OCI_G(ping_interval); } - - return 1; -} -/* }}} */ - -/* {{{ oci_parse() -*/ -static oci_statement *oci_parse(oci_connection *connection, char *query, int len) -{ - oci_statement *statement; - sword error; - TSRMLS_FETCH(); - - statement = ecalloc(1,sizeof(oci_statement)); - - CALL_OCI( - OCIHandleAlloc( - connection->session->pEnv, - (dvoid **)&statement->pStmt, - OCI_HTYPE_STMT, - 0, - NULL - ) - ); - - CALL_OCI( - OCIHandleAlloc( - connection->session->pEnv, - (dvoid **)&statement->pError, - OCI_HTYPE_ERROR, - 0, - NULL - ) - ); - - if (len > 0) { - CALL_OCI_RETURN(error, - OCIStmtPrepare( - statement->pStmt, - connection->pError, - (text*)query, - len, - OCI_NTV_SYNTAX, - OCI_DEFAULT - ) - ); - - connection->error = oci_error(connection->pError, "OCIParse", error); - if (connection->error) { - CALL_OCI( - OCIHandleFree( - statement->pStmt, - OCI_HTYPE_STMT - ) - ); - - CALL_OCI( - OCIHandleFree( - statement->pError, - OCI_HTYPE_ERROR - ) - ); - - efree(statement); - oci_handle_error(connection, connection->error); - return 0; - } + else { + /* -1 means "Off" */ + connection->next_ping = 0; } + + smart_str_free_ex(&hashed_details, 0); - if (query) { - statement->last_query = estrdup(query); + /* allocate environment handle */ +#if HAVE_OCI_ENV_NLS_CREATE +#define PHP_OCI_INIT_FUNC_NAME "OCIEnvNlsCreate" + + if (charset && *charset) { + charsetid = PHP_OCI_CALL(OCINlsCharSetNameToId, (OCI_G(env), charset)); + connection->charset = charsetid; + } + else if (charsetid) { + connection->charset = charsetid; } - statement->conn = connection; - statement->has_data = 0; - - statement->id = zend_list_insert(statement,le_stmt); - - oci_debug("oci_parse \"%s\" id=%d conn=%d", - SAFE_STRING(query), - statement->id, - statement->conn->id); - - zend_list_addref(statement->conn->id); - - return statement; -} -/* }}} */ + /* create an environment using the character set id, Oracle 9i+ ONLY */ + OCI_G(errcode) = PHP_OCI_CALL(OCIEnvNlsCreate, (&(connection->env), PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, charsetid, charsetid)); -/* {{{ oci_execute() -*/ -static int oci_execute(oci_statement *statement, char *func,ub4 mode) -{ - oci_out_column *outcol; - oci_out_column column; - OCIParam *param = 0; - text *colname; - ub4 counter; - ub2 define_type; - ub4 iters; - ub4 colcount; - ub2 dynamic; - int dtype; - dvoid *buf; - oci_descriptor *descr; - sword error; - TSRMLS_FETCH(); +#elif HAVE_OCI_ENV_CREATE +#define PHP_OCI_INIT_FUNC_NAME "OCIEnvCreate" + + /* allocate env handle without NLS support */ + OCI_G(errcode) = PHP_OCI_CALL(OCIEnvCreate, (&(connection->env), PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL)); +#else +#define PHP_OCI_INIT_FUNC_NAME "OCIEnvInit" + + /* the simpliest way */ + OCI_G(errcode) = PHP_OCI_CALL(OCIEnvInit, (&(connection->env), OCI_DEFAULT, 0, NULL)); +#endif - if (!statement->stmttype) { - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (ub2 *)&statement->stmttype, - (ub4 *)0, - OCI_ATTR_STMT_TYPE, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_HTYPE_STMT/OCI_ATTR_STMT_TYPE", error); - - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; - } + if (OCI_G(errcode) != OCI_SUCCESS) { +#ifdef HAVE_OCI_INSTANT_CLIENT + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries"); +#else + php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP_OCI_INIT_FUNC_NAME "() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory"); +#endif + php_oci_connection_close(connection TSRMLS_CC); + return NULL; } + + /* allocate our server handle {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(connection->server), OCI_HTYPE_SERVER, 0, NULL)); + + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - if (statement->stmttype == OCI_STMT_SELECT) { - iters = 0; - } else { - iters = 1; - } + /* attach to the server {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIServerAttach, (connection->server, OCI_G(err), (text*)dbname, dbname_len, (ub4) OCI_DEFAULT)); - if (statement->last_query) { - /* if we execute refcursors we don't have a query and - we don't want to execute!!! */ + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ + connection->is_attached = 1; - if (statement->binds) { - zend_hash_apply(statement->binds, (apply_func_t) _oci_bind_pre_exec TSRMLS_CC); - } + /* allocate our session handle {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(connection->session), OCI_HTYPE_SESSION, 0, NULL)); + + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - CALL_OCI_RETURN(error, - OCIStmtExecute( - statement->conn->pServiceContext, - statement->pStmt, - statement->pError, - iters, - 0, - NULL, - NULL, - mode - ) - ); - - statement->error = oci_error(statement->pError, "OCIStmtExecute", error); - - if (statement->binds) { - zend_hash_apply(statement->binds, (apply_func_t) _oci_bind_post_exec TSRMLS_CC); - } + /* allocate our private error-handle {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(connection->err), OCI_HTYPE_ERROR, 0, NULL)); - oci_handle_error(statement->conn, statement->error); + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - if (statement->error) { - return 0; - } + /* allocate our service-context {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(connection->svc), OCI_HTYPE_SVCCTX, 0, NULL)); - if (mode & OCI_COMMIT_ON_SUCCESS) { - statement->conn->needs_commit = 0; - } else { - statement->conn->needs_commit = 1; - } - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - if ((statement->stmttype == OCI_STMT_SELECT) && (statement->executed == 0)) { - /* we only need to do the define step is this very statement is executed the first time! */ - statement->executed = 1; - - ALLOC_HASHTABLE(statement->columns); - zend_hash_init(statement->columns, 13, NULL, _oci_column_hash_dtor, 0); + /* set the username {{{ */ + if (username) { + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrSet, ((dvoid *) connection->session, (ub4) OCI_HTYPE_SESSION, (dvoid *) username, (ub4) username_len, (ub4) OCI_ATTR_USERNAME, OCI_G(err))); - counter = 1; - - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (dvoid *)&colcount, - (ub4 *)0, - OCI_ATTR_PARAM_COUNT, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_HTYPE_STMT/OCI_ATTR_PARAM_COUNT", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } + }/* }}} */ - statement->ncolumns = colcount; + /* set the password {{{ */ + if (password) { + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrSet, ((dvoid *) connection->session, (ub4) OCI_HTYPE_SESSION, (dvoid *) password, (ub4) password_len, (ub4) OCI_ATTR_PASSWORD, OCI_G(err))); - for (counter = 1; counter <= colcount; counter++) { - memset(&column,0,sizeof(oci_out_column)); - - if (zend_hash_index_update(statement->columns, counter, &column, - sizeof(oci_out_column), (void**) &outcol) == FAILURE) { - efree(statement->columns); - /* out of memory */ - return 0; - } - - outcol->statement = statement; - - CALL_OCI_RETURN(error, - OCIParamGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - statement->pError, - (dvoid**)¶m, - counter - ) - ); - - statement->error = oci_error(statement->pError, "OCIParamGet OCI_HTYPE_STMT", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } - - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)param, - OCI_DTYPE_PARAM, - (dvoid *)&outcol->data_type, - (ub4 *)0, - OCI_ATTR_DATA_TYPE, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_DTYPE_PARAM/OCI_ATTR_DATA_TYPE", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } - - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)param, - OCI_DTYPE_PARAM, - (dvoid *)&outcol->data_size, - (dvoid *)0, - OCI_ATTR_DATA_SIZE, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_DTYPE_PARAM/OCI_ATTR_DATA_SIZE", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } + }/* }}} */ - outcol->storage_size4 = outcol->data_size; - outcol->retlen = outcol->data_size; - - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)param, - OCI_DTYPE_PARAM, - (dvoid *)&outcol->scale, - (dvoid *)0, - OCI_ATTR_SCALE, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_DTYPE_PARAM/OCI_ATTR_SCALE", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we lose memory!!! */ - } + /* set the server handle in the service handle {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrSet, (connection->svc, OCI_HTYPE_SVCCTX, connection->server, 0, OCI_ATTR_SERVER, OCI_G(err))); - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)param, - OCI_DTYPE_PARAM, - (dvoid *)&outcol->precision, - (dvoid *)0, - OCI_ATTR_PRECISION, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_DTYPE_PARAM/OCI_ATTR_PRECISION", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we lose memory!!! */ - } - - CALL_OCI_RETURN(error, - OCIAttrGet( - (dvoid *)param, - OCI_DTYPE_PARAM, - (dvoid **)&colname, /* XXX this string is NOT zero terminated!!!! */ - (ub4 *)&outcol->name_len, - (ub4)OCI_ATTR_NAME, - statement->pError - ) - ); - - statement->error = oci_error(statement->pError, "OCIAttrGet OCI_DTYPE_PARAM/OCI_ATTR_NAME", error); - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - outcol->name = estrndup((char*) colname,outcol->name_len); + /* set the authentication handle in the service handle {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrSet, (connection->svc, OCI_HTYPE_SVCCTX, connection->session, 0, OCI_ATTR_SESSION, OCI_G(err))); - /* find a user-setted define */ - if (statement->defines) { - zend_hash_find(statement->defines,outcol->name,outcol->name_len,(void **) &outcol->define); - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ - buf = 0; - switch (outcol->data_type) { - case SQLT_RSET: - outcol->pstmt = oci_parse(statement->conn,0,0); - outcol->stmtid = outcol->pstmt->id; - - define_type = SQLT_RSET; - outcol->is_cursor = 1; - outcol->storage_size4 = -1; - outcol->retlen = -1; - dynamic = OCI_DEFAULT; - buf = &(outcol->pstmt->pStmt); - break; - - case SQLT_RDD: /* ROWID */ - case SQLT_BLOB: /* binary LOB */ - case SQLT_CLOB: /* character LOB */ - case SQLT_BFILE: /* binary file LOB */ - define_type = outcol->data_type; - outcol->is_descr = 1; - outcol->storage_size4 = -1; - dynamic = OCI_DEFAULT; - - if (outcol->data_type == SQLT_BFILE) { - dtype = OCI_DTYPE_FILE; - } else if (outcol->data_type == SQLT_RDD ) { - dtype = OCI_DTYPE_ROWID; - } else { - dtype = OCI_DTYPE_LOB; - } - - descr = oci_new_desc(dtype,statement->conn); - if (!descr) { - /* need better error checking XXX */ - } - outcol->descid = descr->id; - buf = &(descr->ocidescr); - break; - - case SQLT_LNG: - case SQLT_LBI: - if (outcol->data_type == SQLT_LBI) { - define_type = SQLT_BIN; - } else { - define_type = SQLT_CHR; - } - outcol->storage_size4 = OCI_MAX_DATA_SIZE; - outcol->piecewise = 1; - dynamic = OCI_DYNAMIC_FETCH; - break; - - case SQLT_BIN: - default: - define_type = SQLT_CHR; - if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM) -#ifdef SQLT_TIMESTAMP - || (outcol->data_type == SQLT_TIMESTAMP) -#endif -#ifdef SQLT_TIMESTAMP_TZ - || (outcol->data_type == SQLT_TIMESTAMP_TZ) -#endif - ) { - outcol->storage_size4 = 512; /* XXX this should fit "most" NLS date-formats and Numbers */ - } else { - outcol->storage_size4++; /* add one for string terminator */ - } - if (outcol->data_type == SQLT_BIN) { - outcol->storage_size4 *= 3; - } - dynamic = OCI_DEFAULT; - buf = outcol->data = (text *) emalloc(outcol->storage_size4); - break; - } + if (new_password) { + /* try to change password if new one was provided {{{ */ + OCI_G(errcode) = PHP_OCI_CALL(OCIPasswordChange, (connection->svc, OCI_G(err), (text *)username, username_len+1, (text *)password, password_len+1, (text *)new_password, new_password_len+1, OCI_AUTH)); - if (dynamic == OCI_DYNAMIC_FETCH) { - CALL_OCI_RETURN(error, - OCIDefineByPos( - statement->pStmt, /* IN/OUT handle to the requested SQL query */ - (OCIDefine **)&outcol->pDefine, /* IN/OUT pointer to a pointer to a define handle */ - statement->pError, /* IN/OUT An error handle */ - counter, /* IN position in the select list */ - (dvoid *)NULL, /* IN/OUT pointer to a buffer */ - outcol->storage_size4, /* IN The size of each valuep buffer in bytes */ - define_type, /* IN The data type */ - (dvoid *)&outcol->indicator, /* IN pointer to an indicator variable or arr */ - (ub2 *)NULL, /* IN/OUT Pointer to array of length of data fetched */ - (ub2 *)NULL, /* OUT Pointer to array of column-level return codes */ - OCI_DYNAMIC_FETCH /* IN mode (OCI_DEFAULT, OCI_DYNAMIC_FETCH) */ - ) - ); - - statement->error = oci_error(statement->pError, "OCIDefineByPos", error); - } else { - CALL_OCI_RETURN(error, - OCIDefineByPos( - statement->pStmt, /* IN/OUT handle to the requested SQL query */ - (OCIDefine **)&outcol->pDefine, /* IN/OUT pointer to a pointer to a define handle */ - statement->pError, /* IN/OUT An error handle */ - counter, /* IN position in the select list */ - (dvoid *)buf, /* IN/OUT pointer to a buffer */ - outcol->storage_size4, /* IN The size of each valuep buffer in bytes */ - define_type, /* IN The data type */ - (dvoid *)&outcol->indicator, /* IN pointer to an indicator variable or arr */ - (ub2 *)&outcol->retlen, /* IN/OUT Pointer to array of length of data fetched */ - (ub2 *)&outcol->retcode, /* OUT Pointer to array of column-level return codes */ - OCI_DEFAULT /* IN mode (OCI_DEFAULT, OCI_DYNAMIC_FETCH) */ - ) - ); - - statement->error = oci_error(statement->pError, "OCIDefineByPos", error); - } - if (statement->error) { - oci_handle_error(statement->conn, statement->error); - return 0; /* XXX we loose memory!!! */ - } + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; } - } - - return 1; -} -/* }}} */ - -/* {{{ oci_fetch() -*/ -static int _oci_column_pre_fetch(void *data TSRMLS_DC) -{ - oci_out_column *col = (oci_out_column *) data; - - if (col->piecewise) { - col->retlen4 = 0; - } - - return 0; -} - -static int oci_fetch(oci_statement *statement, ub4 nrows, char *func TSRMLS_DC) -{ - int i; - oci_out_column *column; - - if (statement->columns) { - zend_hash_apply(statement->columns, (apply_func_t) _oci_column_pre_fetch TSRMLS_CC); - } + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)connection->svc, OCI_HTYPE_SVCCTX, (dvoid *)&(connection->session), (ub4 *)0, OCI_ATTR_SESSION, OCI_G(err))); - CALL_OCI_RETURN(statement->error, - OCIStmtFetch( - statement->pStmt, - statement->pError, - nrows, - OCI_FETCH_NEXT, - OCI_DEFAULT - ) - ); - - if ((statement->error == OCI_NO_DATA) || (nrows == 0)) { - if (statement->last_query == 0) { - /* reset define-list for refcursors */ - if (statement->columns) { - zend_hash_destroy(statement->columns); - efree(statement->columns); - statement->columns = 0; - statement->ncolumns = 0; - } - statement->executed = 0; + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } /* }}} */ + } else { + /* start the session {{{ */ + switch (session_mode) { + case OCI_DEFAULT: +#if HAVE_OCI_STMT_PREPARE2 + /* statement caching is suported only in Oracle 9+ */ + OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_RDBMS, (ub4) OCI_STMT_CACHE)); +#else + /* others cannot use stmt caching, so we call OCISessionBegin() with OCI_DEFAULT */ + OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_RDBMS, (ub4) OCI_DEFAULT)); +#endif + break; + case OCI_SYSDBA: + case OCI_SYSOPER: + default: + OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, (connection->svc, OCI_G(err), connection->session, (ub4) OCI_CRED_EXT, (ub4) session_mode)); + break; } - - statement->error = 0; /* OCI_NO_DATA is NO error for us!!! */ - statement->has_data = 0; - - return 0; - } - - while (statement->error == OCI_NEED_DATA) { - for (i = 0; i < statement->ncolumns; i++) { - column = oci_get_col(statement, i + 1, 0); - if (column->piecewise) { - if (!column->data) { - column->data = (text *) emalloc(OCI_PIECE_SIZE); - } else { - column->data = erealloc(column->data,column->retlen4 + OCI_PIECE_SIZE); - } - - column->cb_retlen = OCI_PIECE_SIZE; - - CALL_OCI( - OCIStmtSetPieceInfo( - (void *) column->pDefine, - OCI_HTYPE_DEFINE, - statement->pError, - ((char*)column->data) + column->retlen4, - &(column->cb_retlen), - OCI_NEXT_PIECE, - &column->indicator, - &column->retcode - ) - ); - } - } - - CALL_OCI_RETURN(statement->error, - OCIStmtFetch( - statement->pStmt, - statement->pError, - nrows, - OCI_FETCH_NEXT, - OCI_DEFAULT - ) - ); - - for (i = 0; i < statement->ncolumns; i++) { - column = oci_get_col(statement, i + 1, 0); - if (column->piecewise) { - column->retlen4 += column->cb_retlen; - } - } - } - - if (statement->error == OCI_SUCCESS_WITH_INFO || statement->error == OCI_SUCCESS) { - statement->has_data = 1; - - /* do the stuff needed for OCIDefineByName */ - for (i = 0; i < statement->ncolumns; i++) { - column = oci_get_col(statement, i + 1, 0); - if (column == NULL) { - continue; - } - - if (!column->define) { - continue; - } - - zval_dtor(column->define->zval); - _oci_make_zval(column->define->zval,statement,column,"OCIFetch",0 TSRMLS_CC); - } - - return 1; - } - - oci_error(statement->pError, func, statement->error); - oci_handle_error(statement->conn, statement->error); - - statement->has_data = 0; - - return 0; -} -/* }}} */ - -/* {{{ oci_lobgetlen() -*/ -static int oci_lobgetlen(oci_connection *connection, oci_descriptor *mydescr, ub4 *loblen) -{ - TSRMLS_FETCH(); - - *loblen = 0; - - /* do we need to ask oracle about LOB's length, if we do already know it? I think no. */ - if (mydescr->lob_size >= 0) { - *loblen = mydescr->lob_size; - } else { - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileOpen( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - OCI_FILE_READONLY - ) - ); - if (connection->error) { - oci_error(connection->pError, "OCILobFileOpen",connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - } - - CALL_OCI_RETURN(connection->error, - OCILobGetLength( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - loblen - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobGetLength",connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - mydescr->lob_size = *loblen; - - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileClose( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileClose", connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - } - } - - oci_debug("oci_lobgetlen: len=%d",*loblen); - - return 0; -} -/* }}} */ - -/* {{{ oci_loadlob() -*/ -#define LOBREADSIZE 1048576l /* 1MB */ -static int oci_loadlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer, ub4 *loblen) -{ - ub4 siz = 0; - ub4 readlen = 0; - char *buf; - TSRMLS_FETCH(); - - *loblen = 0; - - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileOpen( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - OCI_FILE_READONLY - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileOpen",connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - } - - CALL_OCI_RETURN(connection->error, - OCILobGetLength( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - &readlen - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobGetLength",connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - - if (readlen == 0) { - return 0; - } - - buf = emalloc(readlen + 1); - - while (readlen > 0) { /* thies loop should not be entered on readlen == 0 */ - CALL_OCI_RETURN(connection->error, - OCILobRead( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - &readlen, /* IN/OUT bytes toread/read */ - siz + 1, /* offset (starts with 1) */ - (dvoid *) ((char *) buf + siz), - readlen, /* size of buffer */ - (dvoid *)0, - (OCICallbackLobRead) 0, /* callback... */ - (ub2) connection->session->charsetId, /* The character set ID of the buffer data. */ - (ub1) SQLCS_IMPLICIT /* The character set form of the buffer data. */ - ) - ); - - siz += readlen; - readlen = LOBREADSIZE; - - if (connection->error == OCI_NEED_DATA) { - buf = erealloc(buf,siz + LOBREADSIZE + 1); - continue; - } else { - break; - } - } - - if (connection->error) { - oci_error(connection->pError, "OCILobRead", connection->error); - oci_handle_error(connection, connection->error); - efree(buf); - return -1; - } - - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileClose( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileClose", connection->error); - oci_handle_error(connection, connection->error); - efree(buf); - return -1; - } - } - - buf = erealloc(buf,siz+1); - buf[ siz ] = 0; - - *buffer = buf; - *loblen = siz; - - oci_debug("oci_loadlob: size=%d",siz); - - return 0; -} -/* }}} */ - -/* {{{ oci_readlob() -*/ -static int oci_readlob(oci_connection *connection, oci_descriptor *mydescr, char **buffer, ub4 *len) -{ - ub4 siz = 0; - ub4 readlen = 0; - ub4 loblen = 0; - ub4 bytes = 0; - char *buf; - TSRMLS_FETCH(); - - /* we're not going to read LOB, if length is not known */ - if (!len || (int)*len <= 0) { - return -1; - } - - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileOpen( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - OCI_FILE_READONLY - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileOpen",connection->error); - oci_handle_error(connection, connection->error); - return -1; - } - } - - if (oci_lobgetlen(connection, mydescr, &loblen) != 0) { - *len = 0; - return -1; - } - - if (loblen == 0) { - return 0; - } - - /* check if we're in LOB's borders */ - if ((mydescr->lob_current_position + *len) > loblen) { - *len = loblen - mydescr->lob_current_position; - } - - if ((int)*len > 0) { - buf = emalloc(*len + 1); - - /* set offset to current LOB's position */ - siz = mydescr->lob_current_position; - - /* check if len is smaller, if not - using LOBREADSIZE' sized buffer */ - if (*len > LOBREADSIZE) { - readlen = LOBREADSIZE; - } else { - readlen = *len; - } - } else { - *len = 0; - return -1; - } - - while (readlen > 0 && bytes < *len && siz < loblen) { /* paranoia */ - CALL_OCI_RETURN(connection->error, - OCILobRead( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr, - &readlen, /* IN/OUT bytes toread/read */ - siz + 1, /* offset (starts with 1) */ - (dvoid *) ((char *) buf + bytes), - readlen, /* size of buffer */ - (dvoid *)0, - (OCICallbackLobRead) 0, /* callback... */ - (ub2) connection->session->charsetId, /* The character set ID of the buffer data. */ - (ub1) SQLCS_IMPLICIT /* The character set form of the buffer data. */ - ) - ); - - siz += readlen; - bytes += readlen; - - if ((*len - bytes) > LOBREADSIZE) { - readlen = LOBREADSIZE; - } else { - readlen = *len - bytes; - } - - if (connection->error == OCI_NEED_DATA) { - buf = erealloc(buf,bytes + LOBREADSIZE + 1); - continue; - } else { - break; - } - } - - /* moving current position */ - mydescr->lob_current_position = siz; - - if (connection->error) { - oci_error(connection->pError, "OCILobRead", connection->error); - oci_handle_error(connection, connection->error); - efree(buf); - return -1; - } - - if (mydescr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileClose( - connection->pServiceContext, - connection->pError, - mydescr->ocidescr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileClose", connection->error); - oci_handle_error(connection, connection->error); - efree(buf); - return -1; - } - } - - buf = erealloc(buf,bytes+1); - buf[ bytes ] = 0; - - *buffer = buf; - *len = bytes; - - oci_debug("oci_readlob: size=%d",bytes); - - return 0; -} -/* }}} */ - -/* {{{ oci_failover_callback() -*/ -#if 0 /* not needed yet ! */ -static sb4 oci_failover_callback(dvoid *svchp, dvoid *envhp, dvoid *fo_ctx, ub4 fo_type, ub4 fo_event) -{ - /* - this stuff is from an oci sample - it will get cleaned up as soon as i understand it!!! (thies@thieso.net 990420) - right now i cant get oracle to even call it;-((((((((((( - */ - - switch (fo_event) { - case OCI_FO_BEGIN: { - printf(" Failing Over ... Please stand by \n"); - printf(" Failover type was found to be %s \n", - ((fo_type==OCI_FO_NONE) ? "NONE" - :(fo_type==OCI_FO_SESSION) ? "SESSION" - :(fo_type==OCI_FO_SELECT) ? "SELECT" - : "UNKNOWN!")); - printf(" Failover Context is :%s\n", - (fo_ctx?(char *)fo_ctx:"NULL POINTER!")); - break; - } - - case OCI_FO_ABORT: { - printf(" Failover aborted. Failover will not take place.\n"); - break; - } - - case OCI_FO_END: { - printf(" Failover ended ...resuming services\n"); - break; - } - - case OCI_FO_REAUTH: { - printf(" Failed over user. Resuming services\n"); - - /* Application can check the OCI_ATTR_SESSION attribute of - the service handle to find out the user being - re-authenticated. - - After this, the application can replay any ALTER SESSION - commands associated with this session. These must have - been saved by the application in the fo_ctx - */ - break; - } - - case OCI_FO_ERROR: { - printf(" Failover error gotten. Sleeping...\n"); - php_sleep(3); - /* cannot find this blody define !!! return OCI_FO_RETRY; */ - break; - } - - default: { - printf("Bad Failover Event: %ld.\n", fo_event); - break; - } - } - - return 0; -} -#endif -/* }}} */ - -/* {{{ oci_bind_in_callback() -*/ -static sb4 oci_bind_in_callback( - dvoid *ictxp, /* context pointer */ - OCIBind *bindp, /* bind handle */ - ub4 iter, /* 0-based execute iteration value */ - ub4 index, /* index of current array for PL/SQL or row index for SQL */ - dvoid **bufpp, /* pointer to data */ - ub4 *alenp, /* size after value/piece has been read */ - ub1 *piecep, /* which piece */ - dvoid **indpp) /* indicator value */ -{ - oci_bind *phpbind; - zval *val; - TSRMLS_FETCH(); - - if (!(phpbind=(oci_bind *)ictxp) || !(val = phpbind->zval)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "!phpbind || !phpbind->val"); - return OCI_ERROR; - } - - if (ZVAL_IS_NULL(val)) { - /* we're going to insert a NULL column */ - phpbind->indicator = -1; - *bufpp = 0; - *alenp = -1; - *indpp = (dvoid *)&phpbind->indicator; - } else if ((phpbind->descr == 0) && (phpbind->pStmt == 0)) { - /* "normal string bind */ - convert_to_string(val); - - *bufpp = Z_STRVAL_P(val); - *alenp = Z_STRLEN_P(val); - *indpp = (dvoid *)&phpbind->indicator; - } else if (phpbind->pStmt != 0) { - /* RSET */ - *bufpp = phpbind->pStmt; - *alenp = -1; /* seems to be allright */ - *indpp = (dvoid *)&phpbind->indicator; - } else { - /* descriptor bind */ - *bufpp = phpbind->descr; - *alenp = -1; /* seems to be allright */ - *indpp = (dvoid *)&phpbind->indicator; - } - - *piecep = OCI_ONE_PIECE; /* pass all data in one go */ - - return OCI_CONTINUE; -} -/* }}} */ - -/* {{{ oci_bind_out_callback() */ -static sb4 oci_bind_out_callback( - dvoid *octxp, /* context pointer */ - OCIBind *bindp, /* bind handle */ - ub4 iter, /* 0-based execute iteration value */ - ub4 index, /* index of current array for PL/SQL or row index for SQL */ - dvoid **bufpp, /* pointer to data */ - ub4 **alenpp, /* size after value/piece has been read */ - ub1 *piecep, /* which piece */ - dvoid **indpp, /* indicator value */ - ub2 **rcodepp) /* return code */ -{ - oci_bind *phpbind; - zval *val; - sb4 retval = OCI_ERROR; - TSRMLS_FETCH(); - - if (!(phpbind=(oci_bind *)octxp) || !(val = phpbind->zval)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "!phpbind || !phpbind->val"); - return retval; - } - - if ((Z_TYPE_P(val) == IS_OBJECT) || (Z_TYPE_P(val) == IS_RESOURCE)) { - retval = OCI_CONTINUE; - } else { - convert_to_string(val); - zval_dtor(val); - - Z_STRLEN_P(val) = OCI_PIECE_SIZE; /* 64K-1 is max XXX */ - Z_STRVAL_P(val) = emalloc(Z_STRLEN_P(phpbind->zval)); - - /* XXX we assume that zend-zval len has 4 bytes */ - *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval); - *bufpp = Z_STRVAL_P(phpbind->zval); - *piecep = OCI_ONE_PIECE; - *rcodepp = &phpbind->retcode; - *indpp = &phpbind->indicator; - retval = OCI_CONTINUE; - } - - return retval; -} -/* }}} */ - -/* {{{ _oci_open_session() -*/ -#include "ext/standard/php_smart_str.h" -static oci_session *_oci_open_session(oci_server* server,char *username,char *password,int persistent,int exclusive,char *charset) -{ - zend_llist *session_list; - oci_session *session = NULL; - OCISvcCtx *svchp = NULL; - smart_str hashed_details = {0}; -#ifdef HAVE_OCI_9_2 - ub2 charsetid = 0; -#endif - TSRMLS_FETCH(); - - /* - check if we already have this user authenticated - - we will reuse authenticated users within a request no matter if the user requested a persistent - connections or not! - - but only as persistent requested connections will be kept between requests! - */ - -#if defined(HAVE_OCI_9_2) - if (*charset) { - smart_str_appends_ex(&hashed_details, charset, 1); - } else { - size_t rsize; - - /* Safe, charsetid is initialized to 0 */ - CALL_OCI( - OCINlsEnvironmentVariableGet( - &charsetid, - 2, - OCI_NLS_CHARSET_ID, - 0, - &rsize - ) - ); - - smart_str_append_unsigned_ex(&hashed_details, charsetid, 1); - - charsetid = 0; - } -#else - { - char *nls_lang = getenv("NLS_LANG"); - - /* extract charset from NLS_LANG=LANUAGE_TERRITORY.CHARSET */ - if (nls_lang) { - char *p = strchr(nls_lang, '.'); - - if (p) { - smart_str_appends_ex(&hashed_details, p + 1, 1); - } - } - } -#endif - - smart_str_appends_ex(&hashed_details, SAFE_STRING(username), 1); - smart_str_appends_ex(&hashed_details, SAFE_STRING(password), 1); - smart_str_appends_ex(&hashed_details, SAFE_STRING(server->dbname), 1); - smart_str_0(&hashed_details); - - if (!exclusive) { - mutex_lock(mx_lock); - if (zend_ts_hash_find(persistent_sessions, hashed_details.c, hashed_details.len+1, (void **) &session_list) != SUCCESS) { - zend_llist tmp; - /* first session, set up a session list */ - zend_llist_init(&tmp, sizeof(oci_session), (llist_dtor_func_t) _session_pcleanup, 1); - zend_ts_hash_update(persistent_sessions, hashed_details.c, hashed_details.len+1, &tmp, sizeof(zend_llist), (void **) &session_list); - } else { - - /* session list found, search for an idle session or an already opened session by the current thread */ - session = zend_llist_get_first(session_list); - while ((session != NULL) && session->thread && (session->thread != thread_id())) { - session = zend_llist_get_next(session_list); - } - - if (session != NULL) { - /* mark session as busy */ - session->thread = thread_id(); - } - - } - - if (session) { - if (session->is_open) { - if (persistent) { - session->persistent = 1; - } - smart_str_free_ex(&hashed_details, 1); - mutex_unlock(mx_lock); - return session; - } else { - _oci_close_session(session); - /* breakthru to open */ - } - } - mutex_unlock(mx_lock); - } - - session = ecalloc(1,sizeof(oci_session)); - - if (!session) { - goto CLEANUP; - } - - session->persistent = persistent; - session->server = server; - session->exclusive = exclusive; - session->sessions_list = session_list; - session->thread = thread_id(); - -#ifdef HAVE_OCI_9_2 - - /* following chunk is Oracle 9i+ ONLY */ - if (*charset) { - /* - get ub2 charset id based on charset - this is pretty secure, since if we don't have a valid character set name, - 0 comes back and we can still use the 0 in all further statements -> OCI uses NLS_LANG - setting in that case - */ - CALL_OCI_RETURN(charsetid, - OCINlsCharSetNameToId( - OCI(pEnv), - charset - ) - ); - - oci_debug("oci_do_connect: using charset id=%d",charsetid); - } - - session->charsetId = charsetid; - - /* create an environment using the character set id, Oracle 9i+ ONLY */ - CALL_OCI( - OCIEnvNlsCreate( - &session->pEnv, - PHP_OCI_INIT_MODE, - 0, - NULL, - NULL, - NULL, - 0, - NULL, - charsetid, - charsetid - ) - ); - -#else - - /* fallback solution (simply use global env and charset, same behaviour as always been) */ - session->pEnv = OCI(pEnv); - session->charsetId = 0; - -#endif /* HAVE_OCI_9_2 */ - - /* allocate temporary Service Context */ - CALL_OCI_RETURN(OCI(error), - OCIHandleAlloc( - session->pEnv, - (dvoid **)&svchp, - OCI_HTYPE_SVCCTX, - 0, - NULL - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_open_session: OCIHandleAlloc OCI_HTYPE_SVCCTX", OCI(error)); - goto CLEANUP; - } - - /* allocate private session-handle */ - CALL_OCI_RETURN(OCI(error), - OCIHandleAlloc( - session->pEnv, - (dvoid **)&session->pSession, - OCI_HTYPE_SESSION, - 0, - NULL - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_open_session: OCIHandleAlloc OCI_HTYPE_SESSION", OCI(error)); - goto CLEANUP; - } - - /* Set the server handle in service handle */ - CALL_OCI_RETURN(OCI(error), - OCIAttrSet( - svchp, - OCI_HTYPE_SVCCTX, - server->pServer, - 0, - OCI_ATTR_SERVER, - OCI(pError) - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_open_session: OCIAttrSet OCI_ATTR_SERVER", OCI(error)); - goto CLEANUP; - } - - /* set the username in user handle */ - CALL_OCI_RETURN(OCI(error), - OCIAttrSet( - (dvoid *) session->pSession, - (ub4) OCI_HTYPE_SESSION, - (dvoid *) username, - (ub4) strlen(username), - (ub4) OCI_ATTR_USERNAME, - OCI(pError) - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "OCIAttrSet OCI_ATTR_USERNAME", OCI(error)); - goto CLEANUP; - } - - /* set the password in user handle */ - CALL_OCI_RETURN(OCI(error), - OCIAttrSet( - (dvoid *) session->pSession, - (ub4) OCI_HTYPE_SESSION, - (dvoid *) password, - (ub4) strlen(password), - (ub4) OCI_ATTR_PASSWORD, - OCI(pError) - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "OCIAttrSet OCI_ATTR_PASSWORD", OCI(error)); - goto CLEANUP; - } - - CALL_OCI_RETURN(OCI(error), - OCISessionBegin( - svchp, - OCI(pError), - session->pSession, - (ub4) OCI_CRED_RDBMS, - (ub4) OCI_DEFAULT - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "OCISessionBegin", OCI(error)); - /* OCISessionBegin returns OCI_SUCCESS_WITH_INFO when - * user's password has expired, but is still usable. - * */ - if (OCI(error) != OCI_SUCCESS_WITH_INFO) { - goto CLEANUP; - } - } - - /* Free Temporary Service Context */ - CALL_OCI( - OCIHandleFree( - (dvoid *) svchp, - (ub4) OCI_HTYPE_SVCCTX - ) - ); - - session->is_open = 1; - - mutex_lock(mx_lock); - num_links++; - if (!exclusive) { - zend_llist_add_element(session_list, session); - efree(session); - session = (oci_session*) session_list->tail->data; - num_persistent++; - } - mutex_unlock(mx_lock); - - session->num = zend_list_insert(session, le_session); - oci_debug("_oci_open_session new sess=%d user=%s",session->num,username); - - return session; - -CLEANUP: - oci_debug("_oci_open_session: FAILURE -> CLEANUP called"); - - _oci_close_session(session); - - return 0; -} -/* }}} */ - -/* {{{ _oci_close_session() -*/ -static int _session_compare(void *a, void *b) -{ - oci_session *sess1 = (oci_session*) a; - oci_session *sess2 = (oci_session*) b; - - return sess1->num == sess2->num; -} - -static void _oci_close_session(oci_session *session) -{ - OCISvcCtx *svchp; - TSRMLS_FETCH(); - - if (!session) { - return; - } - - oci_debug("START _oci_close_session: logging-off sess=%d",session->num); - - if (session->is_open) { - /* Temporary Service Context */ - CALL_OCI_RETURN(OCI(error), - OCIHandleAlloc( - session->pEnv, - (dvoid **) &svchp, - (ub4) OCI_HTYPE_SVCCTX, - (size_t) 0, - (dvoid **) 0 - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_close_session OCIHandleAlloc OCI_HTYPE_SVCCTX", OCI(error)); - } - - /* Set the server handle in service handle */ - CALL_OCI_RETURN(OCI(error), - OCIAttrSet( - svchp, - OCI_HTYPE_SVCCTX, - session->server->pServer, - 0, - OCI_ATTR_SERVER, - OCI(pError) - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_close_session: OCIAttrSet OCI_ATTR_SERVER", OCI(error)); - } - - /* Set the Authentication handle in the service handle */ - CALL_OCI_RETURN(OCI(error), - OCIAttrSet( - svchp, - OCI_HTYPE_SVCCTX, - session->pSession, - 0, - OCI_ATTR_SESSION, - OCI(pError) - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_close_session: OCIAttrSet OCI_ATTR_SESSION", OCI(error)); - } - - CALL_OCI_RETURN(OCI(error), - OCISessionEnd( - svchp, - OCI(pError), - session->pSession, - (ub4) 0 - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "_oci_close_session: OCISessionEnd", OCI(error)); - } - - CALL_OCI( - OCIHandleFree( - (dvoid *) svchp, - (ub4) OCI_HTYPE_SVCCTX - ) - ); - - } else { - oci_debug("_oci_close_session: logging-off DEAD session"); - } - - if (session->pSession) { - CALL_OCI( - OCIHandleFree( - (dvoid *) session->pSession, - (ub4) OCI_HTYPE_SESSION - ) - ); - } - - mutex_lock(mx_lock); - num_links--; - if (!OCI(shutdown) && session->persistent) { - zend_llist_del_element(session->sessions_list, session, _session_compare); - num_persistent--; - } - mutex_unlock(mx_lock); - -#ifdef HAVE_OCI_9_2 - /* free environment handle (and fix bug #29652 with growing .msb FD number under weirdie Solarises) */ - CALL_OCI( - OCIHandleFree( - (dvoid *) session->pEnv, - OCI_HTYPE_ENV - ) - ); -#endif - if (session->exclusive) { - efree(session); - } -} -/* }}} */ - -/* {{{ _oci_open_server() -*/ -static oci_server *_oci_open_server(char *dbname,int persistent) -{ - oci_server *server, *pserver = NULL; - TSRMLS_FETCH(); - - /* - check if we already have this server open - - we will reuse servers within a request no matter if the user requested persistent - connections or not! - - but only as pesistent requested connections will be kept between requests! - */ - - /* TODO either keep servers global or don't reuse them at all */ - zend_ts_hash_find(persistent_servers, dbname, strlen(dbname)+1, (void **) &pserver); - - if (pserver) { - /* XXX ini-flag */ - /* - if (!oci_ping(pserver)) { - pserver->is_open = 0; - } - */ - if (pserver->is_open) { - /* if our new users uses this connection persistent, we're keeping it! */ - if (persistent) { - pserver->persistent = persistent; - } - - return pserver; - } else { /* server "died" in the meantime - try to reconnect! */ - _oci_close_server(pserver); - /* breakthru to open */ - } - } - - server = ecalloc(1,sizeof(oci_server)); - - server->persistent = persistent; - server->dbname = strdup(SAFE_STRING(dbname)); - - CALL_OCI( - OCIHandleAlloc( - OCI(pEnv), - (dvoid **)&server->pServer, - OCI_HTYPE_SERVER, - 0, - NULL - ) - ); - - CALL_OCI_RETURN(OCI(error), - OCIServerAttach( - server->pServer, - OCI(pError), - (text*)server->dbname, - strlen(server->dbname), - (ub4) OCI_DEFAULT - ) - ); - - if (OCI(error)) { - oci_error(OCI(pError), "_oci_open_server", OCI(error)); - goto CLEANUP; - } - - zend_ts_hash_update(persistent_servers, - server->dbname, - strlen(server->dbname)+1, - (void *)server, - sizeof(oci_server), - (void**)&pserver); - - pserver->num = zend_list_insert(pserver,le_server); - pserver->is_open = 1; - - oci_debug("_oci_open_server new conn=%d dname=%s",server->num,server->dbname); - - efree(server); - - return pserver; - -CLEANUP: - oci_debug("_oci_open_server: FAILURE -> CLEANUP called"); - - _oci_close_server(server); - - return 0; -} - -#if 0 - server->failover.fo_ctx = (dvoid *) server; - server->failover.callback_function = oci_failover_callback; - - error = OCIAttrSet((dvoid *)server->pServer, - (ub4) OCI_HTYPE_SERVER, - (dvoid *) &server->failover, - (ub4) 0, - (ub4) OCI_ATTR_FOCBK, - OCI(pError)); - - if (error) { - oci_error(OCI(pError), "_oci_open_server OCIAttrSet OCI_ATTR_FOCBK", error); - goto CLEANUP; - } -#endif -/* }}} */ - -/* {{{ _oci_close_server() -*/ -static int _oci_session_cleanup(void *data TSRMLS_DC) -{ - zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) data; - - if (le->type == le_session) { - oci_server *server = ((oci_session*) le->ptr)->server; - if (server && server->is_open == 2) - return 1; - } - return 0; -} - -static void _oci_close_server(oci_server *server) -{ - char *dbname; - int oldopen; - TSRMLS_FETCH(); - - oldopen = server->is_open; - server->is_open = 2; - if (!OCI(shutdown)) { - zend_hash_apply(&EG(regular_list), (apply_func_t) _oci_session_cleanup TSRMLS_CC); - } - server->is_open = oldopen; - - oci_debug("START _oci_close_server: detaching conn=%d dbname=%s",server->num,server->dbname); - - /* XXX close server here */ - - if (server->is_open) { - if (server->pServer && OCI(pError)) { - CALL_OCI_RETURN(OCI(error), - OCIServerDetach( - server->pServer, - OCI(pError), - OCI_DEFAULT - ) - ); - - if (OCI(error)) { - oci_error(OCI(pError), "oci_close_server OCIServerDetach", OCI(error)); - } - } - } else { - oci_debug("_oci_close_server: closing DEAD server"); - } - - if (server->pServer) { - CALL_OCI( - OCIHandleFree( - (dvoid *) server->pServer, - (ub4) OCI_HTYPE_SERVER - ) - ); - } - - dbname = server->dbname; - - if (!OCI(shutdown)) { - zend_ts_hash_del(persistent_servers, dbname, strlen(dbname)+1); - } - - free(dbname); -} -/* }}} */ - -/* {{{ oci_do_connect() - Connect to an Oracle database and log on. returns a new session. */ -static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclusive) -{ - char *username, *password, *dbname, *charset; - zval **userParam, **passParam, **dbParam, **charParam; - oci_server *server = 0; - oci_session *session = 0; - oci_connection *connection = 0; - - /* if a forth parameter is handed over, it is the charset identifier (but is only used in Oracle 9i+) */ - if (zend_get_parameters_ex(4, &userParam, &passParam, &dbParam, &charParam) == SUCCESS) { - convert_to_string_ex(userParam); - convert_to_string_ex(passParam); - convert_to_string_ex(dbParam); - convert_to_string_ex(charParam); - - username = Z_STRVAL_PP(userParam); - password = Z_STRVAL_PP(passParam); - dbname = Z_STRVAL_PP(dbParam); - charset = Z_STRVAL_PP(charParam); - oci_debug("oci_do_connect: using charset=%s",charset); - } else if (zend_get_parameters_ex(3, &userParam, &passParam, &dbParam) == SUCCESS) { - convert_to_string_ex(userParam); - convert_to_string_ex(passParam); - convert_to_string_ex(dbParam); - - username = Z_STRVAL_PP(userParam); - password = Z_STRVAL_PP(passParam); - dbname = Z_STRVAL_PP(dbParam); - charset = ""; - } else if (zend_get_parameters_ex(2, &userParam, &passParam) == SUCCESS) { - convert_to_string_ex(userParam); - convert_to_string_ex(passParam); - - username = Z_STRVAL_PP(userParam); - password = Z_STRVAL_PP(passParam); - dbname = ""; - charset = ""; - } else { - WRONG_PARAM_COUNT; - } - - connection = (oci_connection *) ecalloc(1,sizeof(oci_connection)); - - if (!connection) { - goto CLEANUP; - } - - server = _oci_open_server(dbname,persistent); - - if (!server) { - goto CLEANUP; - } - - if (exclusive) { - /* exlusive session can never be persistent!*/ - persistent = 0; - } else { - /* if our server-context is not persistent we can't */ - persistent = (server->persistent) ? persistent : 0; - } - - session = _oci_open_session(server,username,password,persistent,exclusive,charset); - - if (!session) { - goto CLEANUP; - } - - /* set our session */ - connection->session = session; - - /* allocate our private error-handle */ - CALL_OCI_RETURN(OCI(error), - OCIHandleAlloc( - connection->session->pEnv, - (dvoid **)&connection->pError, - OCI_HTYPE_ERROR, - 0, - NULL - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "oci_do_connect: OCIHandleAlloc OCI_HTYPE_ERROR",OCI(error)); - goto CLEANUP; - } - - /* allocate our service-context */ - CALL_OCI_RETURN(OCI(error), - OCIHandleAlloc( - connection->session->pEnv, - (dvoid **)&connection->pServiceContext, - OCI_HTYPE_SVCCTX, - 0, - NULL - ) - ); - - if (OCI(error) != OCI_SUCCESS) { - oci_error(OCI(pError), "oci_do_connect: OCIHandleAlloc OCI_HTYPE_SVCCTX",OCI(error)); - goto CLEANUP; - } - - /* Set the server handle in service handle */ - CALL_OCI_RETURN(connection->error, - OCIAttrSet( - connection->pServiceContext, - OCI_HTYPE_SVCCTX, - server->pServer, - 0, - OCI_ATTR_SERVER, - connection->pError - ) - ); - - if (connection->error != OCI_SUCCESS) { - oci_error(connection->pError, "oci_do_connect: OCIAttrSet OCI_ATTR_SERVER", connection->error); - goto CLEANUP; - } - - /* Set the Authentication handle in the service handle */ - CALL_OCI_RETURN(connection->error, - OCIAttrSet( - connection->pServiceContext, - OCI_HTYPE_SVCCTX, - session->pSession, - 0, - OCI_ATTR_SESSION, - connection->pError - ) - ); - - if (connection->error != OCI_SUCCESS) { - oci_error(connection->pError, "oci_do_connect: OCIAttrSet OCI_ATTR_SESSION", connection->error); - goto CLEANUP; - } - - /* - OCIAttrSet((dvoid *)session->server->pServer, - OCI_HTYPE_SERVER, - (dvoid *) "demo", - 0, - OCI_ATTR_EXTERNAL_NAME, - connection->pError); - - OCIAttrSet((dvoid *)session->server->pServer, - OCI_HTYPE_SERVER, - (dvoid *) "txn demo2", - 0, - OCI_ATTR_INTERNAL_NAME, - connection->pError); - */ - - connection->id = zend_list_insert(connection, le_conn); - - connection->is_open = 1; - - oci_debug("oci_do_connect: id=%d",connection->id); - - RETURN_RESOURCE(connection->id); - -CLEANUP: - oci_debug("oci_do_connect: FAILURE -> CLEANUP called"); - - if (connection->id) { - zend_list_delete(connection->id); - } else { - _oci_conn_list_dtor(connection TSRMLS_CC); - } - - RETURN_FALSE; -} -/* }}} */ - -/* {{{ oci_lob_flush() -*/ -static int oci_lob_flush(oci_descriptor* descr, int flush_flag TSRMLS_DC) -{ - OCILobLocator *mylob; - oci_connection *connection; - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - return 0; - } - - /* do not really flush buffer, but reporting success - * to suppress OCI error when flushing not used buffer - * */ - if (descr->buffering != 2) { - return 1; - } - - connection = descr->conn; - - CALL_OCI_RETURN(connection->error, - OCILobFlushBuffer( - connection->pServiceContext, - connection->pError, - mylob, - flush_flag - ) - ); - - oci_debug("oci_lob_flush: flush_flag=%d",flush_flag); - - if (connection->error) { - oci_error(connection->pError, "OCILobFlushBuffer", connection->error); - oci_handle_error(connection, connection->error); - return 0; - } - - /* marking buffer as enabled and not used */ - descr->buffering = 1; - return 1; -} -/* }}} */ - -/* {{{ php_oci_fetch_row() -*/ -static void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_args) -{ - zval **stmt, **arg2, **arg3; - oci_statement *statement; - oci_out_column *column; - ub4 nrows = 1; - int i; - - if (ZEND_NUM_ARGS() > expected_args) { - WRONG_PARAM_COUNT; - } - - if (expected_args > 2) { - /* only for ocifetchinto BC */ - - switch (ZEND_NUM_ARGS()) { - case 2: - if (zend_get_parameters_ex(2, &stmt, &arg2) == FAILURE) { - RETURN_FALSE; - } - if (!mode) { - mode = OCI_NUM; - } - break; - - case 3: - if (zend_get_parameters_ex(3, &stmt, &arg2, &arg3) == FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(arg3); - mode = Z_LVAL_PP(arg3); - break; - - default: - WRONG_PARAM_COUNT; - break; - } - - } else { - - switch (ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - RETURN_FALSE; - } - if (!mode) { - mode = OCI_BOTH; - } - break; - - case 2: - if (zend_get_parameters_ex(2, &stmt, &arg2)==FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(arg2); - mode = Z_LVAL_PP(arg2); - break; - - default: - WRONG_PARAM_COUNT; - break; - } - } - - OCI_GET_STMT(statement,stmt); - - if (!oci_fetch(statement, nrows, "OCIFetchInto" TSRMLS_CC)) { - RETURN_FALSE; - } - - array_init(return_value); - - for (i = 0; i < statement->ncolumns; i++) { - column = oci_get_col(statement, i + 1, 0); - if (column == NULL) { - continue; - } - if ((column->indicator == -1) && ((mode & OCI_RETURN_NULLS) == 0)) { - continue; - } - - if (!(column->indicator == -1)) { - zval *element; - - MAKE_STD_ZVAL(element); - _oci_make_zval(element,statement,column,"OCIFetchInto",mode TSRMLS_CC); - - if (mode & OCI_NUM || !(mode & OCI_ASSOC)) { - add_index_zval(return_value, i, element); - } - if (mode & OCI_ASSOC) { - if (mode & OCI_NUM) { - ZVAL_ADDREF(element); - } - add_assoc_zval(return_value, column->name, element); - } - - } else { - if (mode & OCI_NUM || !(mode & OCI_ASSOC)) { - add_index_null(return_value, i); - } - if (mode & OCI_ASSOC) { - add_assoc_null(return_value, column->name); - } - } - } - - if (expected_args > 2) { - /* only for ocifetchinto BC - * in all other cases we return array, not long - */ - REPLACE_ZVAL_VALUE(arg2, return_value, 1); /* copy return_value to given reference */ - zval_dtor(return_value); - RETURN_LONG(statement->ncolumns); - } -} -/* }}} */ - -/************************* EXTENSION FUNCTIONS *************************/ - -/* {{{ proto bool oci_define_by_name(resource stmt, string name, mixed &var [, int type]) - Define a PHP variable to an Oracle column by name */ -/* if you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining!!! */ -PHP_FUNCTION(oci_define_by_name) -{ - zval **stmt, **name, **var, **type; - oci_statement *statement; - oci_define *define, *tmp_define; - ub2 ocitype = SQLT_CHR; /* zero terminated string */ - int ac = ZEND_NUM_ARGS(); - - if (ac < 3 || ac > 4 || zend_get_parameters_ex(ac, &stmt, &name, &var, &type) == FAILURE) { - WRONG_PARAM_COUNT; - } - - switch (ac) { - case 4: - convert_to_long_ex(type); - ocitype = (ub2) Z_LVAL_PP(type); - /* possible breakthru */ - } - - OCI_GET_STMT(statement,stmt); - - convert_to_string_ex(name); - - if (statement->defines == NULL) { - ALLOC_HASHTABLE(statement->defines); - zend_hash_init(statement->defines, 13, NULL, _oci_define_hash_dtor, 0); - } - - define = ecalloc(1,sizeof(oci_define)); - - if (zend_hash_add(statement->defines, - Z_STRVAL_PP(name), - Z_STRLEN_PP(name), - define, - sizeof(oci_define), - (void **)&tmp_define) == SUCCESS) { - efree(define); - define = tmp_define; - } else { - efree(define); - RETURN_FALSE; - } - - define->name = (text*) estrndup(Z_STRVAL_PP(name),Z_STRLEN_PP(name)); - define->name_len = Z_STRLEN_PP(name); - define->type = ocitype; - define->zval = *var; - zval_add_ref(var); - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]]) - Bind a PHP variable to an Oracle placeholder by name */ -/* if you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding!!! */ -PHP_FUNCTION(oci_bind_by_name) -{ - zval **stmt, **name, **var, **maxlen, **type; - oci_statement *statement; - oci_statement *bindstmt; - oci_bind bind, *bindp; - oci_descriptor *descr; -#ifdef PHP_OCI8_HAVE_COLLECTIONS - oci_collection *coll; - dvoid *mycoll = 0; -#endif - int mode = OCI_DATA_AT_EXEC; - ub2 ocitype = SQLT_CHR; /* unterminated string */ - OCIStmt *mystmt = 0; - dvoid *mydescr = 0; - sb4 value_sz = -1; - int ac = ZEND_NUM_ARGS(), inx; - - if (ac < 3 || ac > 5 || zend_get_parameters_ex(ac, &stmt, &name, &var, &maxlen, &type) == FAILURE) { - WRONG_PARAM_COUNT; - } - - switch (ac) { - case 5: - convert_to_long_ex(type); - ocitype = (ub2) Z_LVAL_PP(type); - /* possible breakthru */ - case 4: - convert_to_long_ex(maxlen); - value_sz = Z_LVAL_PP(maxlen); - /* possible breakthru */ - } - - OCI_GET_STMT(statement,stmt); - - switch (ocitype) { -#ifdef PHP_OCI8_HAVE_COLLECTIONS - case SQLT_NTY: - if (Z_TYPE_PP(var) != IS_OBJECT) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable must be allocated using OCINewCollection()"); - RETURN_FALSE; - } - if ((inx = _oci_get_ocicoll(*var,&coll TSRMLS_CC)) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable must be allocated using OCINewCollection()"); - RETURN_FALSE; - } - if (!(mycoll = (dvoid *) coll->coll)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Collection empty"); - RETURN_FALSE; - } - value_sz = sizeof(void*); - mode = OCI_DEFAULT; -break; -#endif - case SQLT_BFILEE: - case SQLT_CFILEE: - case SQLT_CLOB: - case SQLT_BLOB: - case SQLT_RDD: - if (Z_TYPE_PP(var) != IS_OBJECT) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable must be allocated using OCINewDescriptor()"); - RETURN_FALSE; - } - - if ((inx = _oci_get_ocidesc(*var,&descr TSRMLS_CC)) == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variable must be allocated using OCINewDescriptor()"); - RETURN_FALSE; - } - - if (!(mydescr = (dvoid *) descr->ocidescr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Descriptor empty"); - RETURN_FALSE; - } - value_sz = sizeof(void*); - break; - - case SQLT_RSET: - OCI_GET_STMT(bindstmt,var); - - if (!(mystmt = bindstmt->pStmt)) { - RETURN_FALSE; - } - value_sz = sizeof(void*); - break; - case SQLT_CHR: - break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %u", ocitype); - RETURN_FALSE; - break; - } - - if ((ocitype == SQLT_CHR) && (value_sz == -1)) { - convert_to_string_ex(var); - value_sz = Z_STRLEN_PP(var); - } - - if (value_sz == 0) { - value_sz = 1; - } - - convert_to_string_ex(name); - - if (!statement->binds) { - ALLOC_HASHTABLE(statement->binds); - zend_hash_init(statement->binds, 13, NULL, _oci_bind_hash_dtor, 0); - } - - memset((void*)&bind,0,sizeof(oci_bind)); - zend_hash_update(statement->binds, Z_STRVAL_PP(name), Z_STRLEN_PP(name) + 1, &bind, sizeof(oci_bind), (void **)&bindp); - - bindp->descr = mydescr; - bindp->pStmt = mystmt; - bindp->zval = *var; - zval_add_ref(var); - - CALL_OCI_RETURN(statement->error, - OCIBindByName( - statement->pStmt, /* statement handle */ - (OCIBind **)&bindp->pBind, /* bind hdl (will alloc) */ - statement->pError, /* error handle */ - (text*) Z_STRVAL_PP(name), /* placeholder name */ - Z_STRLEN_PP(name), /* placeholder length */ - (dvoid *)0, /* in/out data */ - value_sz, /* OCI_MAX_DATA_SIZE, */ /* max size of input/output data */ - (ub2)ocitype, /* in/out data type */ - (dvoid *)&bindp->indicator, /* indicator (ignored) */ - (ub2 *)0, /* size array (ignored) */ - (ub2 *)&bindp->retcode, /* return code (ignored) */ - (ub4)0, /* maxarr_len (PL/SQL only?) */ - (ub4 *)0, /* actual array size (PL/SQL only?) */ - mode /* mode */ - ) - ); - - if (statement->error != OCI_SUCCESS) { - oci_error(statement->pError, "OCIBindByName", statement->error); - oci_handle_error(statement->conn, statement->error); - RETURN_FALSE; - } - - if (mode == OCI_DATA_AT_EXEC) { - CALL_OCI_RETURN(statement->error, - OCIBindDynamic( - bindp->pBind, - statement->pError, - (dvoid *)bindp, - oci_bind_in_callback, - (dvoid *)bindp, - oci_bind_out_callback - ) - ); - - if (statement->error != OCI_SUCCESS) { - oci_error(statement->pError, "OCIBindDynamic", statement->error); - oci_handle_error(statement->conn, statement->error); - RETURN_FALSE; - } - } - -#ifdef PHP_OCI8_HAVE_COLLECTIONS - if (ocitype == SQLT_NTY) { - /* Bind object */ - CALL_OCI_RETURN(statement->error, - OCIBindObject( - bindp->pBind, - statement->pError, - coll->tdo, - (dvoid **) &(coll->coll), - (ub4 *) 0, - (dvoid **) 0, - (ub4 *) 0 - ) - ); - - if (statement->error) { - oci_error(statement->pError, "OCIBindObject", statement->error); - RETURN_FALSE; - } - } -#endif - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_free_descriptor() - Deletes large object description */ -PHP_FUNCTION(oci_free_descriptor) -{ - zval *id; - int inx; - oci_descriptor *descriptor; - - if ((id = getThis()) != 0) { - inx = _oci_get_ocidesc(id,&descriptor TSRMLS_CC); - if (inx) { - oci_debug("oci_free_descriptor: descr=%d",inx); - zend_list_delete(inx); - RETURN_TRUE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_free_descriptor() should not be called like this. Use $somelob->free() to free a LOB"); - - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_save( string data [, int offset ]) - Saves a large object */ -PHP_FUNCTION(oci_lob_save) -{ - zval *id, **arg,**oarg; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int offparam,inx; - ub4 loblen; - ub4 curloblen; - ub4 offset; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - offset = 0; - if (zend_get_parameters_ex(2, &arg, &oarg) == SUCCESS) { - convert_to_long_ex(oarg); - offparam = Z_LVAL_PP(oarg); - - CALL_OCI_RETURN(connection->error, - OCILobGetLength( - connection->pServiceContext, - connection->pError, - mylob, - &curloblen - ) - ); - - oci_debug("oci_lob_save: curloblen=%d",curloblen); - - if (offparam == -1) { - offset = curloblen; - } else if ((ub4)offparam >= curloblen) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset is bigger than current LOB-Size - appending"); - offset = curloblen; - } else { - offset = (ub4)offparam; - } - } else if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_string_ex(arg); - loblen = Z_STRLEN_PP(arg); - - if (loblen < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot save a lob which size is less than 1 byte"); - RETURN_FALSE; - } - - if (offset <= 0) { - offset = 1; - } - - CALL_OCI_RETURN(connection->error, - OCILobWrite( - connection->pServiceContext, - connection->pError, - mylob, - &loblen, - (ub4) offset, - (dvoid *) Z_STRVAL_PP(arg), - (ub4) loblen, - OCI_ONE_PIECE, - (dvoid *)0, - (OCICallbackLobWrite) 0, - (ub2) 0, - (ub1) SQLCS_IMPLICIT - ) - ); - - oci_debug("oci_lob_save: size=%d offset=%d",loblen,offset); - - if (connection->error) { - oci_error(connection->pError, "OCILobWrite", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; - } - - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_import( string filename ) - Saves a large object to file */ -PHP_FUNCTION(oci_lob_import) -{ - zval *id, **arg; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - char *filename; - int fp,inx; - char buf[8192]; - ub4 offset = 1; - ub4 loblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_string_ex(arg); - - if (php_check_open_basedir(Z_STRVAL_PP(arg) TSRMLS_CC)) { - RETURN_FALSE; - } - - filename = Z_STRVAL_PP(arg); - - if ((fp = VCWD_OPEN(filename, O_RDONLY|O_BINARY)) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't open file %s", filename); - RETURN_FALSE; - } - - while ((loblen = read(fp, &buf, sizeof(buf))) > 0) { - CALL_OCI_RETURN(connection->error, - OCILobWrite( - connection->pServiceContext, - connection->pError, - mylob, - &loblen, - (ub4) offset, - (dvoid *) &buf, - (ub4) loblen, - OCI_ONE_PIECE, - (dvoid *)0, - (OCICallbackLobWrite) 0, - (ub2) 0, - (ub1) SQLCS_IMPLICIT - ) - ); - - oci_debug("oci_lob_import: size=%d",loblen); - - if (connection->error) { - oci_error(connection->pError, "OCILobWrite", connection->error); - oci_handle_error(connection, connection->error); - close(fp); - RETURN_FALSE; - } - - offset += loblen; - } - close(fp); - - RETURN_TRUE; - } - - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto string oci_lob_load() - Loads a large object */ -PHP_FUNCTION(oci_lob_load) -{ - zval *id; - oci_descriptor *descr; - char *buffer; - int inx; - ub4 loblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (!oci_loadlob(descr->conn,descr,&buffer,&loblen)) { - if (loblen > 0) { - RETURN_STRINGL(buffer,loblen,0); - } - else { - RETURN_EMPTY_STRING(); - } - } else { - RETURN_FALSE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_load() should not be called like this. Use $somelob->load() to load a LOB"); - - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto string oci_lob_read( int length ) - Reads particular part of a large object */ -PHP_FUNCTION(oci_lob_read) -{ - zval *id; - zval **len; - oci_descriptor *descr; - char *buffer; - int inx; - ub4 loblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(1, &len) == FAILURE) { - WRONG_PARAM_COUNT; - } - - loblen = Z_LVAL_PP(len); - if (oci_readlob(descr->conn,descr,&buffer,&loblen) == 0) { - if (loblen > 0) { - RETURN_STRINGL(buffer,loblen,0); - } - else { - RETURN_EMPTY_STRING(); - } - } else { - RETURN_FALSE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_read() should not be called like this. Use $somelob->read($len) to read a LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_eof() - Checks if EOF is reached */ -PHP_FUNCTION(oci_lob_eof) -{ - zval *id; - oci_descriptor *descr; - int inx; - int len; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (oci_lobgetlen(descr->conn,descr,&len) == 0 && descr->lob_size >= 0) { - if (descr->lob_size == descr->lob_current_position) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } - } - RETURN_FALSE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_eof() should not be called like this. Use $somelob->eof() to check if end of LOB is reached"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto int oci_lob_tell() - Tells LOB pointer position */ -PHP_FUNCTION(oci_lob_tell) -{ - zval *id; - oci_descriptor *descr; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - RETURN_LONG(descr->lob_current_position); - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_tell() should not be called like this. Use $somelob->tell() to get current position of LOB pointer"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_rewind() - Rewind pointer of a LOB */ -PHP_FUNCTION(oci_lob_rewind) -{ - zval *id; - oci_descriptor *descr; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - descr->lob_current_position = 0; - RETURN_TRUE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_rewind() should not be called like this. Use $somelob->rewind() to set current position of LOB pointer to beginning"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_seek( int offset [, int whence ]) - Moves the pointer of a LOB */ -PHP_FUNCTION(oci_lob_seek) -{ - zval *id; - zval **arg1, **arg2; - int argcount = ZEND_NUM_ARGS(), whence = OCI_SEEK_SET; - oci_descriptor *descr; - int inx, len; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (argcount < 1 || argcount > 2 || zend_get_parameters_ex(argcount, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(arg1); - - if (oci_lobgetlen(descr->conn,descr,&len) == 0 && descr->lob_size >= 0) { - if (argcount > 1) { - convert_to_long_ex(arg2); - whence = Z_LVAL_PP(arg2); - switch (whence) { - case OCI_SEEK_CUR: - descr->lob_current_position += Z_LVAL_PP(arg1); - break; - - case OCI_SEEK_END: - if (descr->lob_size + Z_LVAL_PP(arg1) >= 0) { - descr->lob_current_position = descr->lob_size + Z_LVAL_PP(arg1); - } else { - descr->lob_current_position = 0; - } - break; - - case OCI_SEEK_SET: - default: - descr->lob_current_position = Z_LVAL_PP(arg1); - break; - } - } else { - /* OCI_SEEK_SET by default */ - descr->lob_current_position = Z_LVAL_PP(arg1); - } - RETURN_TRUE; - } else { - RETURN_FALSE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_seek() should not be called like this. Use $somelob->seek($offset) to move pointer"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto int oci_lob_size() - Returns size of a large object */ -PHP_FUNCTION(oci_lob_size) -{ - zval *id; - oci_descriptor *descr; - int inx; - ub4 loblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (!oci_lobgetlen(descr->conn,descr,&loblen)) { - RETURN_LONG(loblen); - } else { - RETURN_FALSE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_size() should not be called like this. Use $somelob->size() to get size of a LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto int oci_lob_write( string string [, int length ]) - Writes data to current position of a LOB */ -PHP_FUNCTION(oci_lob_write) -{ - zval *id, **data,**length; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int write_length,inx; - ub4 loblen; - ub4 curloblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(2, &data, &length) == SUCCESS) { - convert_to_string_ex(data); - convert_to_long_ex(length); - write_length = Z_LVAL_PP(length); - } else if (zend_get_parameters_ex(1, &data) == SUCCESS) { - convert_to_string_ex(data); - write_length = Z_STRLEN_PP(data); - } else { - WRONG_PARAM_COUNT; - } - - if (write_length < 1) { - RETURN_LONG(0); - } - - loblen = write_length; - - CALL_OCI_RETURN(connection->error, - OCILobWrite( - connection->pServiceContext, - connection->pError, - mylob, - &loblen, - (ub4) descr->lob_current_position+1, - (dvoid *) Z_STRVAL_PP(data), - (ub4) loblen, - OCI_ONE_PIECE, - (dvoid *)0, - (OCICallbackLobWrite) 0, - (ub2) 0, - (ub1) SQLCS_IMPLICIT - ) - ); - - oci_debug("oci_lob_write: size=%d offset=%d",loblen,descr->lob_current_position); - - if (connection->error) { - oci_error(connection->pError, "OCILobWrite", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - descr->lob_current_position += loblen; - - if (descr->lob_current_position > descr->lob_size) { - descr->lob_size = descr->lob_current_position; - } - - /* marking buffer as used */ - if (descr->buffering == 1) { - descr->buffering = 2; - } - RETURN_LONG(loblen); - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_write() should not be called like this. Use $somelob->write($data,$len) to write to a LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_append( object lob ) - Appends data from a LOB to another LOB */ -PHP_FUNCTION(oci_lob_append) -{ - zval *id, **arg; - OCILobLocator *mylob,*my_fromlob; - oci_connection *connection; - oci_descriptor *descr,*from_descr; - int inx; - ub4 curloblen,from_curloblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(1, &arg) == SUCCESS) { - convert_to_object_ex(arg); - if ((inx = _oci_get_ocidesc(*arg,&from_descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - my_fromlob = (OCILobLocator *) from_descr->ocidescr; - - if (!my_fromlob) { - RETURN_FALSE; - } - - if (oci_lobgetlen(from_descr->conn,from_descr,&from_curloblen) != 0) { - RETURN_FALSE; - } - } else { - WRONG_PARAM_COUNT; - } - - if (from_descr->lob_size == 0) { - RETURN_LONG(0); - } - - CALL_OCI_RETURN(connection->error, - OCILobAppend( - connection->pServiceContext, - connection->pError, - mylob, - my_fromlob - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobAppend", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_append() should not be called like this. Use $somelob->append($LOB_from) to append data from a LOB to another LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_truncate( [ int length ]) - Truncates a LOB */ -PHP_FUNCTION(oci_lob_truncate) -{ - zval *id, **length; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int inx; - ub4 trim_length; - ub4 curloblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(1, &length) == SUCCESS) { - convert_to_long_ex(length); - trim_length = Z_LVAL_PP(length); - } else { - trim_length = 0; - } - - if (trim_length < 0) { - /* negative length is not allowed */ - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCILobTrim( - connection->pServiceContext, - connection->pError, - mylob, - trim_length - ) - ); - - oci_debug("oci_lob_truncate: trim_length=%d",trim_length); - - if (connection->error) { - oci_error(connection->pError, "OCILobTrim", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - descr->lob_size = trim_length; - RETURN_TRUE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_truncate() should not be called like this. Use $somelob->truncate($length) to truncate a LOB to a specified length"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto int oci_lob_erase( [ int offset [, int length ] ] ) - Erases a specified portion of the internal LOB, starting at a specified offset */ -PHP_FUNCTION(oci_lob_erase) -{ - zval *id, **length, **offset; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int inx; - ub4 erase_length, erase_offset; - ub4 curloblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(2, &offset, &length) == SUCCESS) { - convert_to_long_ex(offset); - convert_to_long_ex(length); - - erase_offset = Z_LVAL_PP(offset); - erase_length = Z_LVAL_PP(length); - } else if (zend_get_parameters_ex(1, &offset) == SUCCESS) { - convert_to_long_ex(offset); - - erase_offset = Z_LVAL_PP(offset); - erase_length = descr->lob_size - erase_offset; - } else { - erase_offset = 0; - erase_length = descr->lob_size; - } - - if (erase_length < 1) { - RETURN_LONG(0); - } - - if (erase_offset > descr->lob_size) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "oci_lob_erase(): offset is greater than LOB's length"); - } - - CALL_OCI_RETURN(connection->error, - OCILobErase( - connection->pServiceContext, - connection->pError, - mylob, - &erase_length, - erase_offset+1 - ) - ); - - oci_debug("oci_lob_erase: erase_length=%d, erase_offset=%d",erase_length,erase_offset); - - if (connection->error) { - oci_error(connection->pError, "OCILobErase", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_LONG(erase_length); - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_erase() should not be called like this. Use $somelob->erase($offset, $length) to erase specified part of LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_flush( [ int flag ] ) - Flushes the LOB buffer */ -PHP_FUNCTION(oci_lob_flush) -{ - zval *id, **flag; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int inx, flush_flag; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (zend_get_parameters_ex(1, &flag) == SUCCESS) { - convert_to_long_ex(flag); - flush_flag = Z_LVAL_PP(flag); - } else { - flush_flag = 0; - } - - if (descr->buffering == 0) { - /* buffering wasn't enabled, there is nothing to flush */ - RETURN_FALSE; - } - - if (oci_lob_flush(descr,flush_flag TSRMLS_CC) == 1) { - RETURN_TRUE; - } - RETURN_FALSE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_flush() should not be called like this. Use $somelob->flush() to flush LOB buffer"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool ocisetbufferinglob( boolean flag ) - Enables/disables buffering for a LOB */ -PHP_FUNCTION(ocisetbufferinglob) -{ - zval *id, **flag; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - int inx, buffering_flag; - ub4 curloblen; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(1, &flag) == SUCCESS) { - convert_to_boolean_ex(flag); - buffering_flag = Z_LVAL_PP(flag); - } else { - WRONG_PARAM_COUNT; - } - - /* we'll return true if function was called twice with the same parameter */ - if (buffering_flag == 0 && descr->buffering == 0) { - RETURN_TRUE; - } else if (buffering_flag == 1 && descr->buffering > 0) { - RETURN_TRUE; - } - - switch (buffering_flag) { - case 0: - CALL_OCI_RETURN(connection->error, - OCILobDisableBuffering( - connection->pServiceContext, - connection->pError, - mylob - ) - ); - break; - case 1: - CALL_OCI_RETURN(connection->error, - OCILobEnableBuffering( - connection->pServiceContext, - connection->pError, - mylob - ) - ); - break; - } - - oci_debug("oci_lob_set_buffering: buffering_flag=%d",buffering_flag); - - if (connection->error) { - oci_error(connection->pError, "OCILobFlushBuffer", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - descr->buffering = buffering_flag; - RETURN_TRUE; - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "OCISetBufferingLob() should not be called like this. Use $somelob->setBuffering($flag) to set buffering on/off for a LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool ocigetbufferinglob() - Returns current state of buffering for a LOB */ -PHP_FUNCTION(ocigetbufferinglob) -{ - zval *id; - OCILobLocator *mylob; - oci_descriptor *descr; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - switch (descr->buffering) { - case 1: - case 2: - RETURN_TRUE; - break; - - case 0: - default: - RETURN_FALSE; - break; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "OCIGetBufferingLob() should not be called like this. Use $somelob->getBuffering() to get current state of buffering for a LOB"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_copy( object lob_to, object lob_from [, int length ] ) - Copies data from a LOB to another LOB */ -PHP_FUNCTION(oci_lob_copy) -{ - zval **arg1, **arg2, **arg3; - OCILobLocator *mylob,*my_fromlob; - oci_connection *connection; - oci_descriptor *descr,*from_descr; - int inx, ac = ZEND_NUM_ARGS(); - ub4 curloblen,from_curloblen, copylen; - - if (ac < 2 || ac > 3 || zend_get_parameters_ex(ac, &arg1, &arg2, &arg3) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_object_ex(arg1); - convert_to_object_ex(arg2); - - if ((inx = _oci_get_ocidesc(*arg1,&descr TSRMLS_CC)) == 0 || (inx = _oci_get_ocidesc(*arg2,&from_descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - IS_LOB_INTERNAL(descr); - IS_LOB_INTERNAL(from_descr); - - mylob = (OCILobLocator *) descr->ocidescr; - my_fromlob = (OCILobLocator *) from_descr->ocidescr; - - if (!mylob || !my_fromlob) { - RETURN_FALSE; - } - - if (oci_lobgetlen(descr->conn,descr,&curloblen) != 0 || oci_lobgetlen(from_descr->conn,from_descr,&from_curloblen) != 0) { - RETURN_FALSE; - } - - if (ac == 3) { - convert_to_long_ex(arg3); - copylen = Z_LVAL_PP(arg3); - } else { - copylen = from_descr->lob_size - from_descr->lob_current_position; - } - - if ((int)copylen <= 0) { - RETURN_FALSE; - } - - connection = descr->conn; - - CALL_OCI_RETURN(connection->error, - OCILobCopy( - connection->pServiceContext, - connection->pError, - mylob, - my_fromlob, - copylen, - descr->lob_current_position+1, - from_descr->lob_current_position+1 - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobCopy", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_is_equal( object lob1, object lob2 ) - Tests to see if two LOB/FILE locators are equal */ -PHP_FUNCTION(oci_lob_is_equal) -{ - zval **arg1, **arg2; - OCILobLocator *first_lob,*second_lob; - oci_connection *connection; - oci_descriptor *first_descr,*second_descr; - int inx; - boolean is_equal; - - if (zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_object_ex(arg1); - convert_to_object_ex(arg2); - - if ((inx = _oci_get_ocidesc(*arg1,&first_descr TSRMLS_CC)) == 0 || (inx = _oci_get_ocidesc(*arg2,&second_descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - first_lob = (OCILobLocator *) first_descr->ocidescr; - second_lob = (OCILobLocator *) second_descr->ocidescr; - - if (!first_lob || !second_lob) { - RETURN_FALSE; - } - - connection = first_descr->conn; - - CALL_OCI_RETURN(connection->error, - OCILobIsEqual( - connection->session->pEnv, - first_lob, - second_lob, - &is_equal - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobIsEqual", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - if (is_equal == TRUE) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto bool oci_lob_export([string filename [, int start [, int length]]]) - Writes a large object into a file */ -PHP_FUNCTION(oci_lob_export) -{ - zval *id, **zfilename, **zstart, **zlength; - char *filename = NULL; - int start = -1; - ub4 length = -1; - oci_connection *connection; - oci_descriptor *descr; - char *buffer=0; - ub4 loblen; - int ac = ZEND_NUM_ARGS(); - int fp = -1,inx; - OCILobLocator *mylob; - int coffs; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocidesc(id,&descr TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (ac < 0 || ac > 3 || zend_get_parameters_ex(ac, &zfilename, &zstart, &zlength) == FAILURE) { - WRONG_PARAM_COUNT; - } - - switch (ac) { - case 3: - convert_to_long_ex(zlength); - length = Z_LVAL_PP(zlength); - case 2: - convert_to_long_ex(zstart); - start = Z_LVAL_PP(zstart); - case 1: - convert_to_string_ex(zfilename); - filename = Z_STRVAL_PP(zfilename); - } - - if (filename && *filename) { - if (php_check_open_basedir(filename TSRMLS_CC)) { - goto bail; - } - - if ((fp = VCWD_OPEN_MODE(filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600)) == -1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't create file %s", filename); - goto bail; - } - } - - CALL_OCI_RETURN(connection->error, - OCILobGetLength( - connection->pServiceContext, - connection->pError, - descr->ocidescr, - &loblen - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobGetLength", connection->error); - oci_handle_error(connection, connection->error); - goto bail; - } - - if (descr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileOpen( - connection->pServiceContext, - connection->pError, - descr->ocidescr, - OCI_FILE_READONLY - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileOpen",connection->error); - oci_handle_error(connection, connection->error); - goto bail; - } - } - - if (start == -1) { - start = 0; - } - - if (length == -1) { - length = loblen - start; - } - - if ((start + length) > loblen) { - length = loblen - start; - } - -#define OCI_LOB_READ_BUFFER 128*1024 - - buffer = emalloc(OCI_LOB_READ_BUFFER); - - coffs = start; - - oci_debug("oci_lob_export(start = %d, length = %d, loblen = %d",start,length,loblen); - - while (length > 0) { - ub4 toread; - - if (length > OCI_LOB_READ_BUFFER) { - toread = OCI_LOB_READ_BUFFER; - } else { - toread = length; - } - - oci_debug("oci_lob_read(coffs = %d, toread = %d",coffs,toread); - - CALL_OCI_RETURN(connection->error, - OCILobRead( - connection->pServiceContext, - connection->pError, - descr->ocidescr, - &toread, /* IN/OUT bytes toread/read */ - coffs+1, /* offset (starts with 1) */ - (dvoid *) buffer, - toread, /* size of buffer */ - (dvoid *)0, - (OCICallbackLobRead) 0, /* callback... */ - (ub2) 0, /* The character set ID of the buffer data. */ - (ub1) SQLCS_IMPLICIT /* The character set form of the buffer data. */ - ) - ); - - oci_debug("oci_lob_read(read - %d",toread); - - if (connection->error) { - oci_error(connection->pError, "OCILobRead", connection->error); - oci_handle_error(connection, connection->error); - goto bail; - } - - if (fp != -1) { - if ((ub4) write(fp,buffer,toread) != toread) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot write file!"); - goto bail; - } - } else { - PHPWRITE(buffer,toread); - } - - length -= toread; - coffs += toread; - } - - efree(buffer); - buffer = 0; - - if (fp != -1) { - close(fp); - fp = 0; - } - - if (descr->type == OCI_DTYPE_FILE) { - CALL_OCI_RETURN(connection->error, - OCILobFileClose( - connection->pServiceContext, - connection->pError, - descr->ocidescr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobFileClose", connection->error); - oci_handle_error(connection, connection->error); - goto bail; - } - } - RETURN_TRUE; - } - -bail: - if (fp != -1) { - close(fp); - } - - if (buffer) { - efree(buffer); - } - - RETURN_FALSE; -} -/* }}} */ - -#ifdef HAVE_OCI8_TEMP_LOB -/* {{{ proto bool oci_lob_write_temporary(string var [, int lob_type]) - Writes temporary blob */ -PHP_FUNCTION(oci_lob_write_temporary) -{ - zval *id, *var; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descr; - ub4 offset = 1; - ub4 loblen; - long lob_type = OCI_TEMP_CLOB; - - oci_debug ("oci_write_temporary_lob"); - - if ((id = getThis()) == 0) { - RETURN_FALSE; - } - - if (_oci_get_ocidesc(id,&descr TSRMLS_CC) == 0) { - RETURN_FALSE; - } - - mylob = (OCILobLocator *) descr->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descr->conn; - - if (ZEND_NUM_ARGS() < 1) WRONG_PARAM_COUNT; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &var, &lob_type) == FAILURE) { - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCILobCreateTemporary( - connection->pServiceContext, - connection->pError, - mylob, - OCI_DEFAULT, - OCI_DEFAULT, - lob_type, - OCI_ATTR_NOCACHE, - OCI_DURATION_SESSION - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobCreateTemporary", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCILobOpen( - connection->pServiceContext, - connection->pError, - mylob, - OCI_LOB_READWRITE - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobOpen", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - convert_to_string_ex(&var); - loblen = Z_STRLEN_P(var); - - if (loblen < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot save a lob that is less than 1 byte"); - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCILobWrite( - connection->pServiceContext, - connection->pError, - mylob, - (ub4 *) &loblen, - (ub4) offset, - (dvoid *) Z_STRVAL_P(var), - (ub4) loblen, - OCI_ONE_PIECE, - (dvoid *)0, - (sb4 (*)(dvoid *, dvoid *, ub4 *, ub1 *)) 0, - (ub2) 0, - (ub1) SQLCS_IMPLICIT - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobWrite", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_lob_close() - Closes lob descriptor */ -PHP_FUNCTION(oci_lob_close) -{ - zval *id; - int inx; - OCILobLocator *mylob; - oci_connection *connection; - oci_descriptor *descriptor; - int is_temporary; - - if ((id = getThis()) != 0) { - inx = _oci_get_ocidesc(id,&descriptor TSRMLS_CC); - if (inx) { - - mylob = (OCILobLocator *) descriptor->ocidescr; - - if (!mylob) { - RETURN_FALSE; - } - - connection = descriptor->conn; - - CALL_OCI_RETURN(connection->error, - OCILobClose( - connection->pServiceContext, - connection->pError, - mylob - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCILobClose", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - connection->error = - OCILobIsTemporary(connection->session->pEnv, - connection->pError, - mylob, - &is_temporary); - if (is_temporary) { - connection->error = - OCILobFreeTemporary(connection->pServiceContext, - connection->pError, - mylob); - - if (connection->error) { - oci_error(connection->pError, "OCILobFreeTemporary", - connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - oci_debug("oci_lob_free_temporary: descr=%d",inx); - } - - oci_debug("oci_close_lob: descr=%d",inx); - RETURN_TRUE; - } - } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_lob_close() should not be called like this. Use $somelob->close() to close a LOB"); - - RETURN_FALSE; -} -/* }}} */ -#endif - -/* {{{ proto object oci_new_descriptor(resource connection [, int type]) - Initialize a new empty descriptor LOB/FILE (LOB is default) */ -PHP_FUNCTION(oci_new_descriptor) -{ - zval **conn, **type; - oci_connection *connection; - oci_descriptor *descr; - int dtype; - - dtype = OCI_DTYPE_LOB; - - if (zend_get_parameters_ex(2, &conn, &type) == SUCCESS) { - convert_to_long_ex(type); - dtype = Z_LVAL_PP(type); - } else if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - descr = oci_new_desc(dtype,connection); - - if (!descr) { - RETURN_NULL(); - } - - object_init_ex(return_value, oci_lob_class_entry_ptr); - add_property_resource(return_value, "descriptor", descr->id); -} -/* }}} */ - -/* {{{ proto bool oci_rollback(resource conn) - Rollback the current context */ -PHP_FUNCTION(oci_rollback) -{ - zval **conn; - oci_connection *connection; - - if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - if (connection->descriptors) { - zend_hash_apply(connection->descriptors,(apply_func_t) _oci_desc_flush_hash_dtor TSRMLS_CC); - } - - oci_debug("error, - OCITransRollback( - connection->pServiceContext, - connection->pError, - (ub4) 0 - ) - ); - - connection->needs_commit = 0; - - oci_debug(">OCITransRollback"); - - if (connection->error) { - oci_error(connection->pError, "OCIRollback", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_commit(resource conn) - Commit the current context */ -PHP_FUNCTION(oci_commit) -{ - zval **conn; - oci_connection *connection; - - if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - if (connection->descriptors) { - zend_hash_apply(connection->descriptors,(apply_func_t) _oci_desc_flush_hash_dtor TSRMLS_CC); - } - - oci_debug("error, - OCITransCommit( - connection->pServiceContext, - connection->pError, - (ub4) 0 - ) - ); - - connection->needs_commit = 0; - - oci_debug(">OCITransCommit"); - - if (connection->error) { - oci_error(connection->pError, "OCICommit", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto string oci_field_name(resource stmt, int col) - Tell the name of a column */ -PHP_FUNCTION(oci_field_name) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - - RETURN_STRINGL(outcol->name, outcol->name_len, 1); -} -/* }}} */ - -/* {{{ proto int oci_field_size(resource stmt, int col) - Tell the maximum data size of a column */ -PHP_FUNCTION(oci_field_size) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - - oci_debug("oci_field_size: %16s, retlen = %4d, retlen4 = %d, data_size = %4d, storage_size4 = %4d, indicator %4d, retcode = %4d", - outcol->name,outcol->retlen,outcol->retlen4,outcol->data_size,outcol->storage_size4,outcol->indicator,outcol->retcode); - - /* Handle data type of LONG */ - if (outcol->data_type == SQLT_LNG){ - RETURN_LONG(outcol->storage_size4); - } else { - RETURN_LONG(outcol->data_size); - } -} -/* }}} */ - -/* {{{ proto int oci_field_scale(resource stmt, int col) - Tell the scale of a column */ -PHP_FUNCTION(oci_field_scale) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - RETURN_LONG(outcol->scale); -} -/* }}} */ - -/* {{{ proto int oci_field_precision(resource stmt, int col) - Tell the precision of a column */ -PHP_FUNCTION(oci_field_precision) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - RETURN_LONG(outcol->precision); -} -/* }}} */ - -/* {{{ proto mixed oci_field_type(resource stmt, int col) - Tell the data type of a column */ -PHP_FUNCTION(oci_field_type) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - switch (outcol->data_type) { -#ifdef SQLT_TIMESTAMP - case SQLT_TIMESTAMP: - RETVAL_STRING("TIMESTAMP",1); - break; -#endif -#ifdef SQLT_TIMESTAMP_TZ - case SQLT_TIMESTAMP_TZ: - RETVAL_STRING("TIMESTAMP_TZ",1); - break; -#endif - case SQLT_DAT: - RETVAL_STRING("DATE",1); - break; - case SQLT_NUM: - RETVAL_STRING("NUMBER",1); - break; - case SQLT_LNG: - RETVAL_STRING("LONG",1); - break; - case SQLT_BIN: - RETVAL_STRING("RAW",1); - break; - case SQLT_LBI: - RETVAL_STRING("LONG RAW",1); - break; - case SQLT_CHR: - RETVAL_STRING("VARCHAR",1); - break; - case SQLT_RSET: - RETVAL_STRING("REFCURSOR",1); - break; - case SQLT_AFC: - RETVAL_STRING("CHAR",1); - break; - case SQLT_BLOB: - RETVAL_STRING("BLOB",1); - break; - case SQLT_CLOB: - RETVAL_STRING("CLOB",1); - break; - case SQLT_BFILE: - RETVAL_STRING("BFILE",1); - break; - case SQLT_RDD: - RETVAL_STRING("ROWID",1); - break; - default: - RETVAL_LONG(outcol->data_type); - } -} -/* }}} */ - -/* {{{ proto int oci_field_type_raw(resource stmt, int col) - Tell the raw oracle data type of a column */ -PHP_FUNCTION(oci_field_type_raw) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - RETVAL_LONG(outcol->data_type); -} -/* }}} */ - -/* {{{ proto bool oci_field_is_null(resource stmt, int col) - Tell whether a column is NULL */ -PHP_FUNCTION(oci_field_is_null) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - if (outcol == NULL) { - RETURN_FALSE; - } - if (outcol->indicator == -1) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto void oci_internal_debug(int onoff) - Toggle internal debugging output for the OCI extension */ -PHP_FUNCTION(oci_internal_debug) -{ - zval **arg; - - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_long_ex(arg); - OCI(debug_mode) = Z_LVAL_PP(arg); -} -/* }}} */ - -/* {{{ proto bool oci_execute(resource stmt [, int mode]) - Execute a parsed statement */ -PHP_FUNCTION(oci_execute) -{ - zval **stmt,**mode; - oci_statement *statement; - ub4 execmode; - - if (zend_get_parameters_ex(2, &stmt, &mode) == SUCCESS) { - convert_to_long_ex(mode); - execmode = Z_LVAL_PP(mode); - } else if (zend_get_parameters_ex(1, &stmt) == SUCCESS) { - execmode = OCI_COMMIT_ON_SUCCESS; - } else { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - if (oci_execute(statement, "OCIExecute",execmode)) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto bool oci_cancel(resource stmt) - Cancel reading from a cursor */ -PHP_FUNCTION(oci_cancel) -{ - zval **stmt; - oci_statement *statement; - - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - if (oci_fetch(statement, 0, "OCICancel" TSRMLS_CC)) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto bool oci_fetch(resource stmt) - Prepare a new row of data for reading */ -PHP_FUNCTION(oci_fetch) -{ - zval **stmt; - oci_statement *statement; - ub4 nrows = 1; /* only one row at a time is supported for now */ - - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - if (oci_fetch(statement, nrows, "OCIFetch" TSRMLS_CC)) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto int ocifetchinto(resource stmt, array &output [, int mode]) - Fetch a row of result data into an array */ -PHP_FUNCTION(ocifetchinto) -{ - php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 3); -} -/* }}} */ - -/* {{{ proto int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]]) - Fetch all rows of result data into an array */ -PHP_FUNCTION(oci_fetch_all) -{ - zval **stmt, **array, *element, **zskip, **zmaxrows, **zflags, *tmp; - oci_statement *statement; - oci_out_column **columns; - zval ***outarrs; - ub4 nrows = 1; - int i; - int skip = 0, maxrows = -1; - int flags = 0; - int rows = 0; - int ac = ZEND_NUM_ARGS(); - - if (ac < 2 || ac > 5 || zend_get_parameters_ex(ac, &stmt, &array, &zskip, &zmaxrows, &zflags) == FAILURE) { - WRONG_PARAM_COUNT; - } - - switch (ac) { - case 5: - convert_to_long_ex(zflags); - flags = Z_LVAL_PP(zflags); - case 4: - convert_to_long_ex(zmaxrows); - maxrows = Z_LVAL_PP(zmaxrows); - case 3: - convert_to_long_ex(zskip); - skip = Z_LVAL_PP(zskip); - } - - OCI_GET_STMT(statement,stmt); - - zval_dtor(*array); - array_init(*array); - - while (skip--) { - if (!oci_fetch(statement, nrows, "OCIFetchStatement" TSRMLS_CC)) { - RETURN_LONG(0); - } - } - - if (flags & OCI_FETCHSTATEMENT_BY_ROW) { - columns = safe_emalloc(statement->ncolumns, sizeof(oci_out_column *), 0); - - for (i = 0; i < statement->ncolumns; i++) { - columns[ i ] = oci_get_col(statement, i + 1, 0); - } - - while (oci_fetch(statement, nrows, "OCIFetchStatement" TSRMLS_CC)) { - zval *row; - - MAKE_STD_ZVAL(row); - array_init(row); - - for (i = 0; i < statement->ncolumns; i++) { - MAKE_STD_ZVAL(element); - - _oci_make_zval(element,statement,columns[ i ], "OCIFetchStatement",OCI_RETURN_LOBS TSRMLS_CC); - - if (flags & OCI_NUM) { - zend_hash_next_index_insert(Z_ARRVAL_P(row), &element, sizeof(zval*), NULL); - } else { /* default to ASSOC */ - zend_hash_update(Z_ARRVAL_P(row), - columns[ i ]->name, columns[ i ]->name_len+1, - &element, sizeof(zval*), NULL); - } - } - - zend_hash_next_index_insert(Z_ARRVAL_PP(array), &row, sizeof(zval*), NULL); - - rows++; - - if ((maxrows != -1) && (rows == maxrows)) { - oci_fetch(statement, 0, "OCIFetchStatement" TSRMLS_CC); - break; - } - } - efree(columns); - - } else { /* default to BY_COLUMN */ - columns = safe_emalloc(statement->ncolumns, sizeof(oci_out_column *), 0); - outarrs = safe_emalloc(statement->ncolumns, sizeof(zval*), 0); - - if (flags & OCI_NUM) { - for (i = 0; i < statement->ncolumns; i++) { - columns[ i ] = oci_get_col(statement, i + 1, 0); - - MAKE_STD_ZVAL(tmp); - array_init(tmp); - - zend_hash_next_index_insert(Z_ARRVAL_PP(array), - &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); - } - } else { /* default to ASSOC */ - for (i = 0; i < statement->ncolumns; i++) { - columns[ i ] = oci_get_col(statement, i + 1, 0); - - MAKE_STD_ZVAL(tmp); - array_init(tmp); - - zend_hash_update(Z_ARRVAL_PP(array), - columns[ i ]->name, columns[ i ]->name_len+1, - (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); - } - } - - while (oci_fetch(statement, nrows, "OCIFetchStatement" TSRMLS_CC)) { - for (i = 0; i < statement->ncolumns; i++) { - MAKE_STD_ZVAL(element); - - _oci_make_zval(element,statement,columns[ i ], "OCIFetchStatement",OCI_RETURN_LOBS TSRMLS_CC); - - zend_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(zval*), NULL); - } - - rows++; - - if ((maxrows != -1) && (rows == maxrows)) { - oci_fetch(statement, 0, "OCIFetchStatement" TSRMLS_CC); - break; - } - } - - efree(columns); - efree(outarrs); - } - - RETURN_LONG(rows); -} -/* }}} */ - -/* {{{ proto object oci_fetch_object( resource stmt ) - Fetch a result row as an object */ -PHP_FUNCTION(oci_fetch_object) -{ - php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, OCI_ASSOC, 2); - - if (Z_TYPE_P(return_value) == IS_ARRAY) { - object_and_properties_init(return_value, ZEND_STANDARD_CLASS_DEF_PTR, Z_ARRVAL_P(return_value)); - } -} -/* }}} */ - -/* {{{ proto array oci_fetch_row( resource stmt ) - Fetch a result row as an enumerated array */ -PHP_FUNCTION(oci_fetch_row) -{ - php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, OCI_NUM, 1); -} -/* }}} */ - -/* {{{ proto array oci_fetch_assoc( resource stmt ) - Fetch a result row as an associative array */ -PHP_FUNCTION(oci_fetch_assoc) -{ - php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, OCI_ASSOC, 1); -} -/* }}} */ - -/* {{{ proto array oci_fetch_array( resource stmt [, int mode ]) - Fetch a result row as an array */ -PHP_FUNCTION(oci_fetch_array) -{ - php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, OCI_BOTH, 2); -} -/* }}} */ - -/* {{{ proto bool oci_free_statement(resource stmt) - Free all resources associated with a statement */ -PHP_FUNCTION(oci_free_statement) -{ - zval **stmt; - oci_statement *statement; - - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - zend_list_delete(statement->id); - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_close(resource conn) - Disconnect from database */ -PHP_FUNCTION(oci_close) -{ -#if 0 - this function does nothing any more. server-connections get automagiclly closed on - request-end. connection handles will "dissappear" as soon as they are no longer - referenced. as this module makes heavy use of zends reference-counting mechanism - this is the desired behavior. it has always been a bad idea to close a connection that - has outstanding transactions. this way we have a nice-clean approach. - (thies@thieso.net 20000110) - - oci_connection *connection; - zval **conn; - - if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - connection->is_open = 0; - - zend_hash_apply(list, (apply_func_t) _stmt_cleanup TSRMLS_CC); - - if (zend_list_delete(connection->id) == SUCCESS) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } -#endif -} -/* }}} */ - -/* {{{ proto resource oci_new_connect(string user, string pass [, string db]) - Connect to an Oracle database and log on. Returns a new session. */ -PHP_FUNCTION(oci_new_connect) -{ - oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); -} -/* }}} */ - -/* {{{ proto resource oci_connect(string user, string pass [, string db]) - Connect to an Oracle database and log on. Returns a new session. */ -PHP_FUNCTION(oci_connect) -{ - oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); -} -/* }}} */ - -/* {{{ proto resource oci_pconnect(string user, string pass [, string db]) - Connect to an Oracle database using a persistent connection and log on. Returns a new session. */ -PHP_FUNCTION(oci_pconnect) -{ - oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1,0); -} -/* }}} */ - -/* {{{ proto array oci_error([resource stmt|conn|global]) - Return the last error of stmt|conn|global. If no error happened returns false. */ -PHP_FUNCTION(oci_error) -{ - zval **arg; - oci_statement *statement; - oci_connection *connection; - text errbuf[512]; - sb4 errcode = 0; - sword error = 0; - dvoid *errh = NULL; -#ifdef HAVE_OCI8_ATTR_STATEMENT - ub2 errorofs = 0; - text *sqltext = NULL; -#endif - - if (zend_get_parameters_ex(1, &arg) == SUCCESS) { - statement = (oci_statement *) zend_fetch_resource(arg TSRMLS_CC, -1, NULL, NULL, 1, le_stmt); - if (statement) { - errh = statement->pError; - error = statement->error; - -#ifdef HAVE_OCI8_ATTR_STATEMENT - CALL_OCI_RETURN(statement->error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (text *) &sqltext, - (ub4 *)0, - OCI_ATTR_STATEMENT, - statement->pError - ) - ); - - CALL_OCI_RETURN(statement->error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (ub2 *)&errorofs, - (ub4 *)0, - OCI_ATTR_PARSE_ERROR_OFFSET, - statement->pError - ) - ); -#endif - - } else { - connection = (oci_connection *) zend_fetch_resource(arg TSRMLS_CC, -1, NULL, NULL, 1, le_conn); - if (connection) { - errh = connection->pError; - error = connection->error; - } - } - } else { - errh = OCI(pError); - error = OCI(error); - } - - if (!error) { /* no error set in the handle */ - RETURN_FALSE; - } - - if (!errh) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIError: unable to find Error handle"); - RETURN_FALSE; - } - - CALL_OCI( - OCIErrorGet( - errh, - 1, - NULL, - &errcode, - errbuf, - (ub4) sizeof(errbuf), - (ub4) OCI_HTYPE_ERROR - ) - ); - - if (errcode) { - array_init(return_value); - add_assoc_long(return_value, "code", errcode); - add_assoc_string(return_value, "message", (char*) errbuf, 1); -#ifdef HAVE_OCI8_ATTR_STATEMENT - add_assoc_long(return_value, "offset", errorofs); - add_assoc_string(return_value, "sqltext", sqltext ? (char *) sqltext : "", 1); -#endif - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto int oci_num_fields(resource stmt) - Return the number of result columns in a statement */ -PHP_FUNCTION(oci_num_fields) -{ - zval **stmt; - oci_statement *statement; - - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - RETURN_LONG(statement->ncolumns); -} -/* }}} */ - -/* {{{ proto resource oci_parse(resource conn, string query) - Parse a query and return a statement */ -PHP_FUNCTION(oci_parse) -{ - zval **conn, **query; - oci_connection *connection; - oci_statement *statement; - - if (zend_get_parameters_ex(2, &conn, &query) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - convert_to_string_ex(query); - - statement = oci_parse(connection,Z_STRVAL_PP(query),Z_STRLEN_PP(query)); - - if (statement) { - RETURN_RESOURCE(statement->id); - } else { - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto bool oci_set_prefetch(resource stmt, int prefetch_rows) - Sets the number of rows to be prefetched on execute to prefetch_rows for stmt */ -PHP_FUNCTION(oci_set_prefetch) -{ - zval **stmt, **size; - oci_statement *statement; - - if (zend_get_parameters_ex(2, &stmt, &size) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(size); - - OCI_GET_STMT(statement,stmt); - - oci_setprefetch(statement,Z_LVAL_PP(size)); - - RETURN_TRUE; -} -/* }}} */ - -/* {{{ proto bool oci_password_change(resource conn, string username, string old_password, string new_password) - Changes the password of an account */ -PHP_FUNCTION(oci_password_change) -{ - zval **conn, **user_param, **pass_old_param, **pass_new_param; - text *user, *pass_old, *pass_new; - oci_connection *connection; - - /* Disable in Safe Mode */ - if (PG(safe_mode)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "is disabled in Safe Mode"); - RETURN_FALSE; - } - - if (zend_get_parameters_ex(4, &conn, &user_param, &pass_old_param, &pass_new_param) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_string_ex(user_param); - convert_to_string_ex(pass_old_param); - convert_to_string_ex(pass_new_param); - - user = Z_STRVAL_PP(user_param); - pass_old = Z_STRVAL_PP(pass_old_param); - pass_new = Z_STRVAL_PP(pass_new_param); - - OCI_GET_CONN(connection, conn); - - CALL_OCI_RETURN(connection->error, - OCIPasswordChange( - connection->pServiceContext, - connection->pError, - user, - strlen(user)+1, - pass_old, - strlen(pass_old)+1, - pass_new, - strlen(pass_new)+1, - OCI_DEFAULT - ) - ); - - if (connection->error == OCI_SUCCESS) { - RETURN_TRUE; - } else { - oci_error(connection->pError, "OCIPasswordChange", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } -} -/* }}} */ - -/* {{{ proto resource oci_new_cursor(resource conn) - Return a new cursor (Statement-Handle) - use this to bind ref-cursors! */ -PHP_FUNCTION(oci_new_cursor) -{ - zval **conn; - oci_connection *connection; - oci_statement *statement; - - if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - statement = oci_parse(connection,0,0); - - RETURN_RESOURCE(statement->id); -} -/* }}} */ - -/* {{{ proto string oci_result(resource stmt, mixed column) - Return a single column of result data */ -PHP_FUNCTION(oci_result) -{ - zval **stmt, **col; - oci_statement *statement; - oci_out_column *outcol = NULL; - - if (zend_get_parameters_ex(2, &stmt, &col) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - outcol = oci_get_col(statement, -1, col); - - if (outcol == NULL) { - RETURN_FALSE; - } - - _oci_make_zval(return_value,statement,outcol, "OCIResult",0 TSRMLS_CC); -} -/* }}} */ - -/* {{{ proto string oci_server_version(resource conn) - Return a string containing server version information */ -PHP_FUNCTION(oci_server_version) -{ - oci_connection *connection; - zval **conn; - char version[256]; - - if (zend_get_parameters_ex(1, &conn) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_CONN(connection,conn); - - CALL_OCI_RETURN(connection->error, - OCIServerVersion( - connection->pServiceContext, - connection->pError, - (text*)version, - sizeof(version), - OCI_HTYPE_SVCCTX - ) - ); - - if (connection->error != OCI_SUCCESS) { - oci_error(connection->pError, "OCIServerVersion", connection->error); - oci_handle_error(connection, connection->error); - RETURN_FALSE; - } - - RETURN_STRING(version,1); -} -/* }}} */ - -/* {{{ proto string oci_statement_type(resource stmt) - Return the query type of an OCI statement */ -/* XXX it would be better with a general interface to OCIAttrGet() */ -PHP_FUNCTION(oci_statement_type) -{ - zval **stmt; - oci_statement *statement; - ub2 stmttype; - - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; - } - - OCI_GET_STMT(statement,stmt); - - CALL_OCI_RETURN(statement->error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (ub2 *)&stmttype, - (ub4 *)0, - OCI_ATTR_STMT_TYPE, - statement->pError - ) - ); - - if (statement->error != OCI_SUCCESS) { - oci_error(statement->pError, "OCIStatementType", statement->error); - oci_handle_error(statement->conn, statement->error); - RETURN_FALSE; - } - - switch (stmttype) { - case OCI_STMT_SELECT: - RETVAL_STRING("SELECT",1); - break; - case OCI_STMT_UPDATE: - RETVAL_STRING("UPDATE",1); - break; - case OCI_STMT_DELETE: - RETVAL_STRING("DELETE",1); - break; - case OCI_STMT_INSERT: - RETVAL_STRING("INSERT",1); - break; - case OCI_STMT_CREATE: - RETVAL_STRING("CREATE",1); - break; - case OCI_STMT_DROP: - RETVAL_STRING("DROP",1); - break; - case OCI_STMT_ALTER: - RETVAL_STRING("ALTER",1); - break; - case OCI_STMT_BEGIN: - RETVAL_STRING("BEGIN",1); - break; - case OCI_STMT_DECLARE: - RETVAL_STRING("DECLARE",1); - break; - default: - RETVAL_STRING("UNKNOWN",1); + + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + /* OCISessionBegin returns OCI_SUCCESS_WITH_INFO when + * user's password has expired, but is still usable. + * */ + if (OCI_G(errcode) != OCI_SUCCESS_WITH_INFO) { + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } + } /* }}} */ } -} -/* }}} */ -/* {{{ proto int oci_num_rows(resource stmt) - Return the row count of an OCI statement */ -PHP_FUNCTION(oci_num_rows) -{ - zval **stmt; - oci_statement *statement; - ub4 rowcount; +#if HAVE_OCI_STMT_PREPARE2 + if (connection->is_persistent) { + ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? OCI_G(statement_cache_size) : 0; - if (zend_get_parameters_ex(1, &stmt) == FAILURE) { - WRONG_PARAM_COUNT; + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrSet, ((dvoid *) connection->svc, (ub4) OCI_HTYPE_SVCCTX, (ub4 *) &statement_cache_size, 0, (ub4) OCI_ATTR_STMTCACHESIZE, OCI_G(err))); + + if (OCI_G(errcode) != OCI_SUCCESS) { + php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + php_oci_connection_close(connection TSRMLS_CC); + return NULL; + } } +#endif + + /* mark it as open */ + connection->is_open = 1; - OCI_GET_STMT(statement,stmt); - - CALL_OCI_RETURN(statement->error, - OCIAttrGet( - (dvoid *)statement->pStmt, - OCI_HTYPE_STMT, - (ub2 *)&rowcount, - (ub4 *)0, - OCI_ATTR_ROW_COUNT, - statement->pError - ) - ); - - if (statement->error != OCI_SUCCESS) { - oci_error(statement->pError, "OCIRowCount", statement->error); - oci_handle_error(statement->conn, statement->error); - RETURN_FALSE; + /* add to the appropriate hash */ + if (connection->is_persistent) { + new_le.ptr = connection; + new_le.type = le_pconnection; + connection->used_this_request = 1; + connection->rsrc_id = zend_list_insert(connection, le_pconnection); + zend_hash_update(&EG(persistent_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(zend_rsrc_list_entry), NULL); + OCI_G(num_persistent)++; } - - RETURN_LONG(rowcount); + else if (!exclusive) { + connection->rsrc_id = zend_list_insert(connection, le_connection); + new_le.ptr = (void *)connection->rsrc_id; + new_le.type = le_index_ptr; + zend_hash_update(&EG(regular_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(zend_rsrc_list_entry), NULL); + OCI_G(num_links)++; + } + else { + connection->rsrc_id = zend_list_insert(connection, le_connection); + OCI_G(num_links)++; + } + return connection; } /* }}} */ -#ifdef PHP_OCI8_HAVE_COLLECTIONS -/* {{{ oci_get_coll() */ -static oci_collection *oci_get_coll(int ind TSRMLS_DC) +/* {{{ php_oci_connection_ping() + * Ping connection. Uses OCIPing() or OCIServerVersion() depending on the Oracle Client version */ +static int php_oci_connection_ping(php_oci_connection *connection TSRMLS_DC) { - oci_collection *collection; - int actual_resource_type; - - collection = (oci_collection *) zend_list_find(ind, &actual_resource_type); - - if (collection && (actual_resource_type == le_coll)) { - return collection; - } else { - return (oci_collection *) NULL; +#if OCI_MAJOR_VERSION >= 10 && OCI_MINOR_VERSION >= 2 + /* OCIPing() is usable only in 10.2 */ + OCI_G(errcode) = PHP_OCI_CALL(OCIPing, (connection->svc, OCI_G(err), OCI_DEFAULT)); +#else + char version[256]; + /* use good old OCIServerVersion() by default */ + OCI_G(errcode) = PHP_OCI_CALL(OCIServerVersion, (connection->server, OCI_G(err), (text*)version, sizeof(version), OCI_HTYPE_SERVER)); +#endif + + if (OCI_G(errcode) == OCI_SUCCESS) { + return 1; } + + /* ignore errors here, just return failure + * php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); */ + return 0; } /* }}} */ -/* {{{ proto bool oci_free_collection() - Deletes collection object*/ -PHP_FUNCTION(oci_free_collection) +/* {{{ php_oci_connection_status() + Check connection status (pre-ping check) */ +static int php_oci_connection_status(php_oci_connection *connection TSRMLS_DC) { - zval *id; - int inx; - oci_collection *coll; - oci_connection *connection; - - if ((id = getThis()) != 0) { - inx = _oci_get_ocicoll(id,&coll TSRMLS_CC); - if (inx) { - /* - * Do we need to free the object? - * - */ - connection = coll->conn; - oci_debug("oci_free_collection: coll=%d",inx); - - CALL_OCI_RETURN(connection->error, - OCIObjectFree( - connection->session->pEnv, - connection->pError, - (dvoid *)coll->coll, - (ub2)(OCI_OBJECTFREE_FORCE) - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIObjectFree", connection->error); - RETURN_FALSE; - } + ub4 ss = 0; - zend_list_delete(inx); - RETURN_TRUE; - } + /* get OCI_ATTR_SERVER_STATUS */ + OCI_G(errcode) = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)connection->server, OCI_HTYPE_SERVER, (dvoid *)&ss, (ub4 *)0, OCI_ATTR_SERVER_STATUS, OCI_G(err))); + + if (OCI_G(errcode) == OCI_SUCCESS && ss == OCI_SERVER_NORMAL) { + return 1; } - RETURN_FALSE; + /* ignore errors here, just return failure + * php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); */ + return 0; } /* }}} */ -/* {{{ proto bool oci_collection_append(string value) - Append an object to the collection */ -PHP_FUNCTION(oci_collection_append) +/* {{{ php_oci_connection_rollback() + Rollback connection */ +int php_oci_connection_rollback(php_oci_connection *connection TSRMLS_DC) { - zval *id, **arg; - oci_connection *connection; - oci_collection *coll; - OCINumber num; - OCIString *ocistr = (OCIString *)0; - OCIInd new_ind = OCI_IND_NOTNULL; - OCIInd null_ind = OCI_IND_NULL; - OCIDate dt; - int inx; - double ndx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - connection = coll->conn; - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } + connection->errcode = PHP_OCI_CALL(OCITransRollback, (connection->svc, connection->err, (ub4) 0)); + connection->needs_commit = 0; - /* - * Handle NULLS. For consistency with the rest of the OCI8 library, when - * a value passed in is a 0 length string, consider it a null - */ - convert_to_string_ex(arg); - if (Z_STRLEN_PP(arg) == 0) { - CALL_OCI_RETURN(connection->error, - OCICollAppend( - connection->session->pEnv, - connection->pError, - (dvoid *)0, - &null_ind, - coll->coll - ) - ); - if (connection->error) { - oci_error(connection->pError, "OCICollAppend - NULL", connection->error); - RETURN_FALSE; - } + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + return 0; +} /* }}} */ - RETURN_TRUE; - } +/* {{{ php_oci_connection_commit() + Commit connection */ +int php_oci_connection_commit(php_oci_connection *connection TSRMLS_DC) +{ + connection->errcode = PHP_OCI_CALL(OCITransCommit, (connection->svc, connection->err, (ub4) 0)); + connection->needs_commit = 0; - switch(coll->element_typecode) { - case OCI_TYPECODE_DATE: - convert_to_string_ex(arg); - - CALL_OCI_RETURN(connection->error, - OCIDateFromText( - connection->pError, - Z_STRVAL_PP(arg), - Z_STRLEN_PP(arg), - 0, - 0, - 0, - 0, - &dt - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIDateFromText", connection->error); - RETURN_FALSE; - } + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + return 0; +} /* }}} */ - CALL_OCI_RETURN(connection->error, - OCICollAppend( - connection->session->pEnv, - connection->pError, - (dvoid *) &dt, - (dvoid *) &new_ind, - (OCIColl *) coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAppend", connection->error); - RETURN_FALSE; - } - RETURN_TRUE; - break; - case OCI_TYPECODE_VARCHAR2 : - convert_to_string_ex(arg); - - CALL_OCI_RETURN(connection->error, - OCIStringAssignText( - connection->session->pEnv, - connection->pError, - Z_STRVAL_PP(arg), - Z_STRLEN_PP(arg), - &ocistr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIStringAssignText", connection->error); - RETURN_FALSE; - } +/* {{{ php_oci_connection_close() + Close the connection and free all its resources */ +static int php_oci_connection_close(php_oci_connection *connection TSRMLS_DC) +{ + int result = 0; - CALL_OCI_RETURN(connection->error, - OCICollAppend( - connection->session->pEnv, - connection->pError, - (dvoid *) ocistr, - (dvoid *) &new_ind, - (OCIColl *) coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAppend", connection->error); - RETURN_FALSE; - } - RETURN_TRUE; - break; - case OCI_TYPECODE_UNSIGNED16 : /* UNSIGNED SHORT */ - case OCI_TYPECODE_UNSIGNED32 : /* UNSIGNED LONG */ - case OCI_TYPECODE_REAL : /* REAL */ - case OCI_TYPECODE_DOUBLE : /* DOUBLE */ - case OCI_TYPECODE_INTEGER : /* INT */ - case OCI_TYPECODE_SIGNED16 : /* SHORT */ - case OCI_TYPECODE_SIGNED32 : /* LONG */ - case OCI_TYPECODE_DECIMAL : /* DECIMAL */ - case OCI_TYPECODE_FLOAT : /* FLOAT */ - case OCI_TYPECODE_NUMBER : /* NUMBER */ - case OCI_TYPECODE_SMALLINT : /* SMALLINT */ - convert_to_double_ex(arg); - ndx = (double)Z_DVAL_PP(arg); - - CALL_OCI_RETURN(connection->error, - OCINumberFromReal( - connection->pError, - &ndx, - sizeof(double), - &num - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCINumberFromReal", connection->error); - RETURN_FALSE; - } + if (connection->descriptors) { + zend_hash_destroy(connection->descriptors); + efree(connection->descriptors); + } - CALL_OCI_RETURN(connection->error, - OCICollAppend( - connection->session->pEnv, - connection->pError, - (dvoid *) &num, - (dvoid *) &new_ind, - (OCIColl *) coll->coll - ) - ); - - RETURN_TRUE; - break; - default: - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element"); - RETURN_FALSE; - break; + if (connection->svc) { + /* rollback outstanding transactions */ + if (connection->needs_commit) { + if (php_oci_connection_rollback(connection TSRMLS_CC)) { + /* rollback failed */ + result = 1; + } } } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_append() should not be called like this. Use $collection->append($element) to append an element to the collection"); - RETURN_FALSE; -} -/* }}} */ -/* {{{ proto string oci_collection_element_get(int ndx) - Retrieve the value at collection index ndx */ -PHP_FUNCTION(oci_collection_element_get) -{ - zval *id,**arg; - oci_connection *connection; - oci_collection *coll; - ub4 ndx; - int inx; - dvoid *elem; - OCIInd *elemind; - boolean exists; - OCIString *ocistr = (OCIString *)0; - text *str; - char buff[1024]; - int len; - double dnum; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } + if (connection->svc && connection->session && connection->is_open) { + PHP_OCI_CALL(OCISessionEnd, (connection->svc, OCI_G(err), connection->session, (ub4) 0)); + } + + if (connection->session) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) connection->session, OCI_HTYPE_SESSION)); + } + + if (connection->is_attached) { + PHP_OCI_CALL(OCIServerDetach, (connection->server, OCI_G(err), OCI_DEFAULT)); + } + + if (connection->svc) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) connection->svc, (ub4) OCI_HTYPE_SVCCTX)); + } + + if (connection->err) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) connection->err, (ub4) OCI_HTYPE_ERROR)); + } + + if (connection->server) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) connection->server, (ub4) OCI_HTYPE_SERVER)); + } + + if (connection->env) { + PHP_OCI_CALL(OCIHandleFree, ((dvoid *) connection->env, OCI_HTYPE_ENV)); + } - convert_to_long_ex(arg); - ndx = Z_LVAL_PP(arg); - - connection = coll->conn; - - CALL_OCI_RETURN(connection->error, - OCICollGetElem( - connection->session->pEnv, - connection->pError, - coll->coll, - ndx, - &exists, - &elem, - (dvoid **)&elemind - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollGetElem", connection->error); - RETURN_NULL(); - } - - /* Return false if value does not exist at that location */ - if (exists == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCICollGetElem - Invalid index %d", ndx); - RETURN_FALSE; + if (connection->is_persistent) { + if (connection->hash_key) { + free(connection->hash_key); } - - /* Return null if the value is null */ - if (*elemind == OCI_IND_NULL) { - RETURN_NULL(); - } - - switch (coll->element_typecode) { - case OCI_TYPECODE_DATE: - len = 1024; - CALL_OCI( - OCIDateToText( - connection->pError, - elem, - 0, /* fmt */ - 0, /* fmt_length */ - 0, /* lang_name */ - 0, /* lang_length */ - &len, - buff - ) - ); - - RETURN_STRINGL(buff,len,1); - case OCI_TYPECODE_VARCHAR2 : - ocistr = *(OCIString **)elem; - str = OCIStringPtr(connection->session->pEnv,ocistr); /* XXX not protected against recursion! */ - RETURN_STRINGL(str,strlen(str),1); - break; - case OCI_TYPECODE_UNSIGNED16 : /* UNSIGNED SHORT */ - case OCI_TYPECODE_UNSIGNED32 : /* UNSIGNED LONG */ - case OCI_TYPECODE_REAL : /* REAL */ - case OCI_TYPECODE_DOUBLE : /* DOUBLE */ - case OCI_TYPECODE_INTEGER : /* INT */ - case OCI_TYPECODE_SIGNED16 : /* SHORT */ - case OCI_TYPECODE_SIGNED32 : /* LONG */ - case OCI_TYPECODE_DECIMAL : /* DECIMAL */ - case OCI_TYPECODE_FLOAT : /* FLOAT */ - case OCI_TYPECODE_NUMBER : /* NUMBER */ - case OCI_TYPECODE_SMALLINT : /* SMALLINT */ - CALL_OCI_RETURN(connection->error, - OCINumberToReal( - connection->pError, - (CONST OCINumber *) elem, - (uword) sizeof(dnum), - (dvoid *) &dnum - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCINumberToReal", connection->error); - RETURN_FALSE; - } - RETURN_DOUBLE(dnum); - break; - default: - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element"); - RETURN_FALSE; - break; + free(connection); + } + else { + if (connection->hash_key) { + efree(connection->hash_key); } + efree(connection); } + connection = NULL; + return result; +} /* }}} */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_element_get() should not be called like this. Use $collection->getelem($index) to get an element of the collection with the given index"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_collection_assign(object from) - Assign a collection from another existing collection */ -PHP_FUNCTION(oci_collection_assign) +/* {{{ php_oci_password_change() + Change password for the user with the username given */ +int php_oci_password_change(php_oci_connection *connection, char *user, int user_len, char *pass_old, int pass_old_len, char *pass_new, int pass_new_len TSRMLS_DC) { - zval *id,**from; - oci_connection *connection; - oci_collection *coll,*from_coll; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } + connection->errcode = PHP_OCI_CALL(OCIPasswordChange, (connection->svc, connection->err, (text *)user, user_len+1, (text *)pass_old, pass_old_len+1, (text *)pass_new, pass_new_len+1, OCI_DEFAULT)); - if (zend_get_parameters_ex(1, &from) == FAILURE) { - WRONG_PARAM_COUNT; - } + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + return 0; +} /* }}} */ - if ((inx = _oci_get_ocicoll(*from,&from_coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } +/* {{{ php_oci_server_get_version() + Get Oracle server version */ +int php_oci_server_get_version(php_oci_connection *connection, char **version TSRMLS_DC) +{ + char version_buff[256]; - connection = coll->conn; + connection->errcode = PHP_OCI_CALL(OCIServerVersion, (connection->svc, connection->err, (text*)version_buff, sizeof(version_buff), OCI_HTYPE_SVCCTX)); - CALL_OCI_RETURN(connection->error, - OCICollAssign( - connection->session->pEnv, - connection->pError, - from_coll->coll, - coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem", connection->error); - RETURN_FALSE; - } - RETURN_TRUE; + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; } + + *version = estrdup(version_buff); + return 0; +} /* }}} */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_assign() should not be called like this. Use $collection->assign($collection_value) to assign value to the collection"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_collection_element_assign(int index, string val) - Assign element val to collection at index ndx */ -PHP_FUNCTION(oci_collection_element_assign) +/* {{{ php_oci_column_to_zval() + Convert php_oci_out_column struct into zval */ +int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode TSRMLS_DC) { - zval *id,**index,**val; - oci_connection *connection; - oci_collection *coll; - OCINumber num; - OCIInd new_ind = OCI_IND_NOTNULL; - OCIInd null_ind = OCI_IND_NULL; - ub4 ndx; - int inx; - OCIString *ocistr = (OCIString *)0; - OCIDate dt; - double dnum; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - - if (zend_get_parameters_ex(2, &index,&val) == FAILURE) { - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(index); - ndx = Z_LVAL_PP(index); - - connection = coll->conn; - - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem", connection->error); - RETURN_FALSE; - } + php_oci_descriptor *descriptor; + ub4 lob_length; + int column_size; + char *lob_buffer; + + if (column->indicator == -1) { /* column is NULL */ + ZVAL_NULL(value); + return 0; + } + + if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */ + ZVAL_RESOURCE(value, column->stmtid); + zend_list_addref(column->stmtid); + } + else if (column->is_descr) { + + if (column->data_type != SQLT_RDD) { + int rsrc_type; + + /* reset descriptor's length */ + descriptor = (php_oci_descriptor *) zend_list_find(column->descid, &rsrc_type); - /* - * Handle NULLs. For consistency with the rest of the OCI8 library, when - * a value passed in is a 0 length string, consider it a null - */ - convert_to_string_ex(val); - - if (Z_STRLEN_PP(val) == 0) { - CALL_OCI_RETURN(connection->error, - OCICollAssignElem( - connection->session->pEnv, - connection->pError, - ndx, - (dvoid *)0, - &null_ind, - coll->coll - ) - ); - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem - NULL", connection->error); - RETURN_FALSE; + if (!descriptor || rsrc_type != le_descriptor) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find LOB descriptor #%d", column->descid); + return 1; } - - RETURN_TRUE; + + descriptor->lob_size = -1; + descriptor->lob_current_position = 0; + descriptor->buffering = 0; } - switch (coll->element_typecode) { - case OCI_TYPECODE_DATE: - convert_to_string_ex(val); - CALL_OCI_RETURN(connection->error, - OCIDateFromText( - connection->pError, - Z_STRVAL_PP(val), - Z_STRLEN_PP(val), - 0, - 0, - 0, - 0, - &dt - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIDateFromText", connection->error); - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCICollAssignElem( - connection->session->pEnv, - connection->pError, - ndx, - (dvoid *)&dt, - &new_ind, - coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem", connection->error); - RETURN_FALSE; - } - break; - case OCI_TYPECODE_VARCHAR2 : - convert_to_string_ex(val); - - CALL_OCI_RETURN(connection->error, - OCIStringAssignText( - connection->session->pEnv, - connection->pError, - Z_STRVAL_PP(val), - Z_STRLEN_PP(val), - &ocistr - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIStringAssignText", connection->error); - RETURN_FALSE; - } - - CALL_OCI_RETURN(connection->error, - OCICollAssignElem( - connection->session->pEnv, - connection->pError, - ndx, - (dvoid *)ocistr, - &new_ind, - coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem", connection->error); - RETURN_FALSE; + if (column->data_type != SQLT_RDD && (mode & PHP_OCI_RETURN_LOBS)) { + /* PHP_OCI_RETURN_LOBS means that we want the content of the LOB back instead of the locator */ + + if (php_oci_lob_read(descriptor, -1, 0, &lob_buffer, &lob_length TSRMLS_CC)) { + ZVAL_FALSE(value); + return 1; + } else { + if (lob_length > 0) { + ZVAL_STRINGL(value, lob_buffer, lob_length, 0); } - RETURN_TRUE; - break; - case OCI_TYPECODE_UNSIGNED16 : /* UNSIGNED SHORT */ - case OCI_TYPECODE_UNSIGNED32 : /* UNSIGNED LONG */ - case OCI_TYPECODE_REAL : /* REAL */ - case OCI_TYPECODE_DOUBLE : /* DOUBLE */ - case OCI_TYPECODE_INTEGER : /* INT */ - case OCI_TYPECODE_SIGNED16 : /* SHORT */ - case OCI_TYPECODE_SIGNED32 : /* LONG */ - case OCI_TYPECODE_DECIMAL : /* DECIMAL */ - case OCI_TYPECODE_FLOAT : /* FLOAT */ - case OCI_TYPECODE_NUMBER : /* NUMBER */ - case OCI_TYPECODE_SMALLINT : /* SMALLINT */ - convert_to_double_ex(val); - dnum = (double)Z_DVAL_PP(val); - - CALL_OCI_RETURN(connection->error, - OCINumberFromReal( - connection->pError, - &dnum, - sizeof(double), - &num - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCINumberFromReal", connection->error); - RETURN_FALSE; + else { + ZVAL_EMPTY_STRING(value); } - - CALL_OCI_RETURN(connection->error, - OCICollAssignElem( - connection->session->pEnv, - connection->pError, - ndx, - (dvoid *)&num, - &new_ind, - coll->coll - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollAssignElem", connection->error); - RETURN_FALSE; + return 0; + } + } else { + /* return the locator */ + object_init_ex(value, oci_lob_class_entry_ptr); + add_property_resource(value, "descriptor", column->descid); + zend_list_addref(column->descid); + } + } + else { + switch (column->retcode) { + case 0: + /* intact value */ + if (column->piecewise) { + column_size = column->retlen4; + } else { + column_size = column->retlen; } - RETURN_TRUE; break; + + default: + ZVAL_FALSE(value); + return 0; } + + ZVAL_STRINGL(value, column->data, column_size, 1); } - - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_element_assign() should not be called like this. Use $collection->assignelem($index, $value) to assign value to an element of the collection"); - RETURN_FALSE; + return 0; } /* }}} */ -/* {{{ proto int oci_collection_size() - Return the size of a collection */ -PHP_FUNCTION(oci_collection_size) +/* {{{ php_oci_fetch_row() + Fetch the next row from the given statement */ +void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_args) { - zval *id; - oci_connection *connection; - oci_collection *coll; - sb4 sz; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; - } - connection = coll->conn; - - CALL_OCI_RETURN(connection->error, - OCICollSize( - connection->session->pEnv, - coll->conn->pError, - coll->coll, - &sz - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCICollSize", connection->error); - RETURN_FALSE; - } - - RETURN_LONG(sz); - } + zval *z_statement, *array; + php_oci_statement *statement; + php_oci_out_column *column; + ub4 nrows = 1; + int i; + long fetch_mode = 0; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_size() should not be called like this. Use $collection->size() to get size of the collection"); - RETURN_FALSE; -} -/* }}} */ + if (expected_args > 2) { + /* only for ocifetchinto BC */ -/* {{{ proto int oci_collection_max() - Return the max value of a collection. For a varray this is the maximum length of the array */ -PHP_FUNCTION(oci_collection_max) -{ - zval *id; - oci_collection *coll; - sb4 sz; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz|l", &z_statement, &array, &fetch_mode) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() == 2) { + fetch_mode = mode; } - sz = OCICollMax(OCI(pEnv),coll->coll); /* XXX not protected against recursion */ - - RETURN_LONG(sz); } + else if (expected_args == 2) { + /* only for oci_fetch_array() */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_max() should not be called like this. Use $collection->max() to get maximum number of elements in the collection"); - RETURN_FALSE; -} -/* }}} */ - -/* {{{ proto bool oci_collection_trim(int num) - Trim num elements from the end of a collection */ -PHP_FUNCTION(oci_collection_trim) -{ - zval *id,**arg; - oci_collection *coll; - int inx; - - if ((id = getThis()) != 0) { - if ((inx = _oci_get_ocicoll(id,&coll TSRMLS_CC)) == 0) { - RETURN_FALSE; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &z_statement, &fetch_mode) == FAILURE) { + return; } - if (zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; + + if (ZEND_NUM_ARGS() == 1) { + fetch_mode = mode; } - convert_to_long_ex(arg); - - CALL_OCI_RETURN(coll->conn->error, - OCICollTrim( - OCI(pEnv), - coll->conn->pError, - Z_LVAL_PP(arg), - coll->coll - ) - ); - - if (coll->conn->error) { - oci_error(coll->conn->pError, "OCICollTrim", coll->conn->error); - RETURN_FALSE; + } + else { + /* for all oci_fetch_*() */ + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; } - RETURN_TRUE; + + fetch_mode = mode; } - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "oci_collection_trim() should not be called like this. Use $collection->trim($length) to trim collection to the given length"); - RETURN_FALSE; -} -/* }}} */ + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); -/* {{{ proto object oci_new_collection(resource connection, string tdo [, string schema]) - Initialize a new collection */ -PHP_FUNCTION(oci_new_collection) -{ - dvoid *dschp1; - dvoid *parmp1; - dvoid *parmp2; - zval **conn, **tdo, **schema; - oci_connection *connection; - oci_collection *coll; - int ac = ZEND_NUM_ARGS(); - - if (ac < 2 || ac > 3 || zend_get_parameters_ex(ac, &conn, &tdo, &schema) == FAILURE) { - WRONG_PARAM_COUNT; + if (php_oci_statement_fetch(statement, nrows TSRMLS_CC)) { + RETURN_FALSE; } - - convert_to_string_ex(tdo); - if (ac == 3) { - convert_to_string_ex(schema); - } + array_init(return_value); - coll = emalloc(sizeof(oci_collection)); - - OCI_GET_CONN(connection,conn); - - coll->conn = connection; - coll->id = zend_list_insert(coll,le_coll); - zend_list_addref(connection->id); - - CALL_OCI_RETURN(connection->error, - OCITypeByName( - connection->session->pEnv, - connection->pError, - connection->pServiceContext, - ac == 3 ? (text *) Z_STRVAL_PP(schema) : (text *) 0, - ac == 3 ? (ub4) Z_STRLEN_PP(schema) : (ub4) 0, - (text *) Z_STRVAL_PP(tdo), - (ub4) Z_STRLEN_PP(tdo), - (CONST text *) 0, - (ub4) 0, - OCI_DURATION_SESSION, - OCI_TYPEGET_ALL, - &(coll->tdo) - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCITypeByName", connection->error); - RETURN_FALSE; - } + for (i = 0; i < statement->ncolumns; i++) { + + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + + if (column == NULL) { + continue; + } + if ((column->indicator == -1) && ((fetch_mode & PHP_OCI_RETURN_NULLS) == 0)) { + continue; + } - CALL_OCI_RETURN(connection->error, - OCIHandleAlloc( - connection->session->pEnv, - (dvoid **) &dschp1, - (ub4) OCI_HTYPE_DESCRIBE, - (size_t) 0, - (dvoid **) 0 - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_HTYPE_DESCRIBE", connection->error); - RETURN_FALSE; - } + if (!(column->indicator == -1)) { + zval *element; + + MAKE_STD_ZVAL(element); + php_oci_column_to_zval(column, element, fetch_mode TSRMLS_CC); - CALL_OCI_RETURN(connection->error, - OCIDescribeAny( - connection->pServiceContext, - connection->pError, - (dvoid *) coll->tdo, - (ub4) 0, - OCI_OTYPE_PTR, - (ub1)1, - (ub1) OCI_PTYPE_TYPE, - dschp1 - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_OTYPE_PTR", connection->error); - RETURN_FALSE; + if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) { + add_index_zval(return_value, i, element); + } + if (fetch_mode & PHP_OCI_ASSOC) { + if (fetch_mode & PHP_OCI_NUM) { + ZVAL_ADDREF(element); + } + add_assoc_zval(return_value, column->name, element); + } + + } else { + if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) { + add_index_null(return_value, i); + } + if (fetch_mode & PHP_OCI_ASSOC) { + add_assoc_null(return_value, column->name); + } + } } - CALL_OCI_RETURN(connection->error, - OCIAttrGet( - (dvoid *) dschp1, - (ub4) OCI_HTYPE_DESCRIBE, - (dvoid *)&parmp1, - (ub4 *)0, - (ub4)OCI_ATTR_PARAM, - connection->pError - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_ATTR_PARAM", connection->error); - RETURN_FALSE; + if (expected_args > 2) { + /* only for ocifetchinto BC + * in all other cases we return array, not long + */ + REPLACE_ZVAL_VALUE(&array, return_value, 1); /* copy return_value to given reference */ + zval_dtor(return_value); + RETURN_LONG(statement->ncolumns); } +} +/* }}} */ - /* get the collection type code of the attribute */ - - CALL_OCI_RETURN(connection->error, - OCIAttrGet( - (dvoid*) parmp1, - (ub4) OCI_DTYPE_PARAM, - (dvoid*) &(coll->coll_typecode), - (ub4 *) 0, - (ub4) OCI_ATTR_COLLECTION_TYPECODE, - connection->pError - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_ATTR_COLLECTION_TYPECODE", connection->error); - RETURN_FALSE; - } +/* {{{ php_oci_persistent_helper() + Helper function to close/rollback persistent connections at the end of request */ +static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC) +{ + time_t timestamp; + php_oci_connection *connection; - switch(coll->coll_typecode) { - case OCI_TYPECODE_TABLE: - case OCI_TYPECODE_VARRAY: - CALL_OCI_RETURN(connection->error, - OCIAttrGet( - (dvoid*) parmp1, - (ub4) OCI_DTYPE_PARAM, - (dvoid*) &parmp2, - (ub4 *) 0, - (ub4) OCI_ATTR_COLLECTION_ELEMENT, - connection->pError - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_ATTR_COLLECTION_ELEMENT", connection->error); - RETURN_FALSE; - } + timestamp = time(NULL); + + if (le->type == le_pconnection) { + connection = (php_oci_connection *)le->ptr; - CALL_OCI_RETURN(connection->error, - OCIAttrGet( - (dvoid*) parmp2, - (ub4) OCI_DTYPE_PARAM, - (dvoid*) &(coll->elem_ref), - (ub4 *) 0, - (ub4) OCI_ATTR_REF_TDO, - connection->pError - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_ATTR_REF_TDO", connection->error); - RETURN_FALSE; + if (connection->used_this_request) { + if (connection->descriptors) { + zend_hash_destroy(connection->descriptors); + efree(connection->descriptors); + connection->descriptors = NULL; } - - CALL_OCI_RETURN(connection->error, - OCITypeByRef( - connection->session->pEnv, - connection->pError, - coll->elem_ref, - OCI_DURATION_SESSION, - OCI_TYPEGET_HEADER, - &(coll->element_type) - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_TYPEGET_HEADER", connection->error); - RETURN_FALSE; + + php_oci_connection_rollback(connection TSRMLS_CC); + + if (OCI_G(persistent_timeout) > 0) { + connection->idle_expiry = timestamp + OCI_G(persistent_timeout); + } + + if (OCI_G(ping_interval) >= 0) { + connection->next_ping = timestamp + OCI_G(ping_interval); + } + else { + /* ping_interval is -1 */ + connection->next_ping = 0; } - CALL_OCI_RETURN(connection->error, - OCIAttrGet( - (dvoid*) parmp2, - (ub4) OCI_DTYPE_PARAM, - (dvoid*) &(coll->element_typecode), - (ub4 *) 0, - (ub4) OCI_ATTR_TYPECODE, - connection->pError - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCI_ATTR_TYPECODE", connection->error); - RETURN_FALSE; + connection->used_this_request = 0; + } + else if (OCI_G(persistent_timeout) != -1) { + if (connection->idle_expiry < timestamp) { + /* connection has timed out */ + return 1; } - break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCINewCollection - Unknown Type %d", coll->coll_typecode); - break; - } - - /* Create object to hold return table */ - CALL_OCI_RETURN(connection->error, - OCIObjectNew( - connection->session->pEnv, - connection->pError, - connection->pServiceContext, - OCI_TYPECODE_TABLE, - coll->tdo, - (dvoid *)0, - OCI_DURATION_DEFAULT, - TRUE, - (dvoid **) &(coll->coll) - ) - ); - - if (connection->error) { - oci_error(connection->pError, "OCIObjectNew", connection->error); - RETURN_FALSE; + } } + return 0; +} /* }}} */ - object_init_ex(return_value, oci_coll_class_entry_ptr); - add_property_resource(return_value, "collection",coll->id); -} -/* }}} */ +#ifdef ZTS +/* {{{ php_oci_regular_helper() + Helper function to close non-persistent connections at the end of request in ZTS mode */ +static int php_oci_regular_helper(zend_rsrc_list_entry *le TSRMLS_DC) +{ + php_oci_connection *connection; + + if (le->type == le_connection) { + connection = (php_oci_connection *)le->ptr; + if (connection) { + return 1; + } + } + return 0; +} /* }}} */ #endif #endif /* HAVE_OCI8 */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/oci8/oci8.dsp b/ext/oci8/oci8.dsp index 73c05346e..f0b27fa82 100644 --- a/ext/oci8/oci8.dsp +++ b/ext/oci8/oci8.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D ZTS=1 /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\oci805\include" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\include\instantclient" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /D PHP_OCI8_HAVE_COLLECTIONS=1 /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" @@ -54,7 +54,7 @@ BSC32=bscmake.exe # 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 php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 php5ts.lib oci.lib 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 /out:"..\..\Release_TS/php_oci8.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\..\php_build\oci805\lib" /libpath:"..\..\Release_TS_Inline" +# ADD LINK32 php4ts.lib oci.lib 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 /out:"..\..\Release_TS/php_oci8.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\..\php_build\lib\instantclient" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "oci8 - Win32 Debug_TS" @@ -71,7 +71,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D ZTS=1 /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\include\oci805" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTP_EXPORTS" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /FR /YX /FD /c +# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\..\\" /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "..\..\..\php_build\include\instantclient" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTP_EXPORTS" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_OCI8=1 /D HAVE_OCI8_TEMP_LOB=1 /D HAVE_OCI8_ATTR_STATEMENT=1 /D COMPILE_DL_OCI8=1 /D PHP_OCI8_HAVE_COLLECTIONS=1 /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x406 /d "NDEBUG" @@ -81,7 +81,7 @@ BSC32=bscmake.exe # 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 php5ts.lib /nologo /dll /machine:I386 -# ADD LINK32 php5ts_debug.lib oci.lib 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 /out:"..\..\Debug_TS/php_oci8.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\php_build\lib\oci805" +# ADD LINK32 php4ts_debug.lib oci.lib 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 /out:"..\..\Debug_TS/php_oci8.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\php_build\lib\instantclient" !ENDIF @@ -96,6 +96,22 @@ LINK32=link.exe SOURCE=.\oci8.c # End Source File +# Begin Source File + +SOURCE=.\oci8_collection.c +# End Source File +# Begin Source File + +SOURCE=.\oci8_interface.c +# End Source File +# Begin Source File + +SOURCE=.\oci8_lob.c +# End Source File +# Begin Source File + +SOURCE=.\oci8_statement.c +# End Source File # End Group # Begin Group "Header Files" @@ -104,6 +120,10 @@ SOURCE=.\oci8.c SOURCE=.\php_oci8.h # End Source File +# Begin Source File + +SOURCE=.\php_oci8_int.h +# End Source File # End Group # Begin Group "Resource Files" diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c new file mode 100644 index 000000000..74d4b82aa --- /dev/null +++ b/ext/oci8/oci8_collection.c @@ -0,0 +1,611 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Stig Sæther Bakken | + | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | + +----------------------------------------------------------------------+ +*/ + +/* $Id: oci8_collection.c,v 1.5.2.3 2006/01/01 12:50:10 sniper Exp $ */ + + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "ext/standard/info.h" +#include "php_ini.h" + +#if HAVE_OCI8 + +#include "php_oci8.h" +#include "php_oci8_int.h" + +/* {{{ php_oci_collection_create() + Create and return connection handle */ +php_oci_collection * php_oci_collection_create(php_oci_connection* connection, char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC) +{ + dvoid *dschp1; + dvoid *parmp1; + dvoid *parmp2; + php_oci_collection *collection; + + collection = emalloc(sizeof(php_oci_collection)); + + collection->connection = connection; + collection->collection = NULL; + + /* get type handle by name */ + connection->errcode = PHP_OCI_CALL(OCITypeByName, (connection->env, connection->err, connection->svc, (text *) schema, (ub4) schema_len, (text *) tdo, (ub4) tdo_len, (CONST text *) 0, (ub4) 0, OCI_DURATION_SESSION, OCI_TYPEGET_ALL, &(collection->tdo))); + + if (connection->errcode) { + goto CLEANUP; + } + + /* allocate describe handle */ + connection->errcode = PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **) &dschp1, (ub4) OCI_HTYPE_DESCRIBE, (size_t) 0, (dvoid **) 0)); + + if (connection->errcode) { + goto CLEANUP; + } + + /* describe TDO */ + connection->errcode = PHP_OCI_CALL(OCIDescribeAny, (connection->svc, connection->err, (dvoid *) collection->tdo, (ub4) 0, OCI_OTYPE_PTR, (ub1) OCI_DEFAULT, (ub1) OCI_PTYPE_TYPE, dschp1)); + + if (connection->errcode) { + goto CLEANUP; + } + + /* get first parameter handle */ + connection->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *) dschp1, (ub4) OCI_HTYPE_DESCRIBE, (dvoid *)&parmp1, (ub4 *)0, (ub4)OCI_ATTR_PARAM, connection->err)); + + if (connection->errcode) { + goto CLEANUP; + } + + /* get the collection type code of the attribute */ + connection->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid*) parmp1, (ub4) OCI_DTYPE_PARAM, (dvoid*) &(collection->coll_typecode), (ub4 *) 0, (ub4) OCI_ATTR_COLLECTION_TYPECODE, connection->err)); + + if (connection->errcode) { + goto CLEANUP; + } + + switch(collection->coll_typecode) { + case OCI_TYPECODE_TABLE: + case OCI_TYPECODE_VARRAY: + /* get collection element handle */ + connection->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid*) parmp1, (ub4) OCI_DTYPE_PARAM, (dvoid*) &parmp2, (ub4 *) 0, (ub4) OCI_ATTR_COLLECTION_ELEMENT, connection->err)); + + if (connection->errcode) { + goto CLEANUP; + } + + /* get REF of the TDO for the type */ + connection->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid*) parmp2, (ub4) OCI_DTYPE_PARAM, (dvoid*) &(collection->elem_ref), (ub4 *) 0, (ub4) OCI_ATTR_REF_TDO, connection->err)); + + if (connection->errcode) { + goto CLEANUP; + } + + /* get the TDO (only header) */ + connection->errcode = PHP_OCI_CALL(OCITypeByRef, (connection->env, connection->err, collection->elem_ref, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER, &(collection->element_type))); + + if (connection->errcode) { + goto CLEANUP; + } + + /* get typecode */ + connection->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid*) parmp2, (ub4) OCI_DTYPE_PARAM, (dvoid*) &(collection->element_typecode), (ub4 *) 0, (ub4) OCI_ATTR_TYPECODE, connection->err)); + + if (connection->errcode) { + goto CLEANUP; + } + break; + /* we only support VARRAYs and TABLEs */ + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCINewCollection - Unknown Type %d", collection->coll_typecode); + break; + } + + /* Create object to hold return table */ + connection->errcode = PHP_OCI_CALL(OCIObjectNew, + ( + connection->env, + connection->err, + connection->svc, + OCI_TYPECODE_TABLE, + collection->tdo, + (dvoid *)0, + OCI_DURATION_DEFAULT, + TRUE, + (dvoid **) &(collection->collection) + ) + ); + + if (connection->errcode) { + goto CLEANUP; + } + + PHP_OCI_REGISTER_RESOURCE(collection, le_collection); + return collection; + +CLEANUP: + + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + php_oci_collection_close(collection TSRMLS_CC); + return NULL; +} /* }}} */ + +/* {{{ php_oci_collection_size() + Return size of the collection */ +int php_oci_collection_size(php_oci_collection *collection, sb4 *size TSRMLS_DC) +{ + php_oci_connection *connection = collection->connection; + + connection->errcode = PHP_OCI_CALL(OCICollSize, (connection->env, connection->err, collection->collection, (sb4 *)size)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_max() + Return max number of elements in the collection */ +int php_oci_collection_max(php_oci_collection *collection, long *max TSRMLS_DC) +{ + php_oci_connection *connection = collection->connection; + + *max = PHP_OCI_CALL(OCICollMax, (connection->env, collection->collection)); + + /* error handling is not necessary here? */ + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_trim() + Trim collection to the given number of elements */ +int php_oci_collection_trim(php_oci_collection *collection, long trim_size TSRMLS_DC) +{ + php_oci_connection *connection = collection->connection; + + connection->errcode = PHP_OCI_CALL(OCICollTrim, (connection->env, connection->err, trim_size, collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_append_null() + Append NULL element to the end of the collection */ +int php_oci_collection_append_null(php_oci_collection *collection TSRMLS_DC) +{ + OCIInd null_index = OCI_IND_NULL; + php_oci_connection *connection = collection->connection; + + /* append NULL element */ + connection->errcode = PHP_OCI_CALL(OCICollAppend, (connection->env, connection->err, (dvoid *)0, &null_index, collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_append_date() + Append DATE element to the end of the collection (use "DD-MON-YY" format) */ +int php_oci_collection_append_date(php_oci_collection *collection, char *date, int date_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + OCIDate oci_date; + php_oci_connection *connection = collection->connection; + + /* format and language are NULLs, so format is "DD-MON-YY" and language is the default language of the session */ + connection->errcode = PHP_OCI_CALL(OCIDateFromText, (connection->err, date, date_len, NULL, 0, NULL, 0, &oci_date)); + + if (connection->errcode != OCI_SUCCESS) { + /* failed to convert string to date */ + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAppend, (connection->env, connection->err, (dvoid *) &oci_date, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_append_number() + Append NUMBER to the end of the collection */ +int php_oci_collection_append_number(php_oci_collection *collection, char *number, int number_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + double element_double; + OCINumber oci_number; + php_oci_connection *connection = collection->connection; + + element_double = zend_strtod(number, NULL); + + connection->errcode = PHP_OCI_CALL(OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAppend, (connection->env, connection->err, (dvoid *) &oci_number, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_append_string() + Append STRING to the end of the collection */ +int php_oci_collection_append_string(php_oci_collection *collection, char *element, int element_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + OCIString *ocistr = (OCIString *)0; + php_oci_connection *connection = collection->connection; + + connection->errcode = PHP_OCI_CALL(OCIStringAssignText, (connection->env, connection->err, element, element_len, &ocistr)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAppend, (connection->env, connection->err, (dvoid *) ocistr, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_append() + Append wrapper. Appends any supported element to the end of the collection */ +int php_oci_collection_append(php_oci_collection *collection, char *element, int element_len TSRMLS_DC) +{ + if (element_len == 0) { + return php_oci_collection_append_null(collection TSRMLS_CC); + } + + switch(collection->element_typecode) { + case OCI_TYPECODE_DATE: + return php_oci_collection_append_date(collection, element, element_len TSRMLS_CC); + break; + + case OCI_TYPECODE_VARCHAR2 : + return php_oci_collection_append_string(collection, element, element_len TSRMLS_CC); + break; + + case OCI_TYPECODE_UNSIGNED16 : /* UNSIGNED SHORT */ + case OCI_TYPECODE_UNSIGNED32 : /* UNSIGNED LONG */ + case OCI_TYPECODE_REAL : /* REAL */ + case OCI_TYPECODE_DOUBLE : /* DOUBLE */ + case OCI_TYPECODE_INTEGER : /* INT */ + case OCI_TYPECODE_SIGNED16 : /* SHORT */ + case OCI_TYPECODE_SIGNED32 : /* LONG */ + case OCI_TYPECODE_DECIMAL : /* DECIMAL */ + case OCI_TYPECODE_FLOAT : /* FLOAT */ + case OCI_TYPECODE_NUMBER : /* NUMBER */ + case OCI_TYPECODE_SMALLINT : /* SMALLINT */ + return php_oci_collection_append_number(collection, element, element_len TSRMLS_CC); + break; + + default: + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element: %d", collection->element_typecode); + return 1; + break; + } + /* never reached */ + return 1; +} /* }}} */ + +/* {{{ php_oci_collection_element_get() + Get the element with the given index */ +int php_oci_collection_element_get(php_oci_collection *collection, long index, zval **result_element TSRMLS_DC) +{ + php_oci_connection *connection = collection->connection; + dvoid *element; + OCIInd *element_index; + boolean exists; + char buff[1024]; + int buff_len = 1024; + + MAKE_STD_ZVAL(*result_element); + ZVAL_NULL(*result_element); + + connection->errcode = PHP_OCI_CALL(OCICollGetElem, (connection->env, connection->err, collection->collection, (ub4)index, &exists, &element, (dvoid **)&element_index)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + FREE_ZVAL(*result_element); + return 1; + } + + if (exists == 0) { + /* element doesn't exist */ + FREE_ZVAL(*result_element); + return 1; + } + + if (*element_index == OCI_IND_NULL) { + /* this is not an error, we're returning NULL here */ + return 0; + } + + switch (collection->element_typecode) { + case OCI_TYPECODE_DATE: + connection->errcode = PHP_OCI_CALL(OCIDateToText, (connection->err, element, 0, 0, 0, 0, &buff_len, buff)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + FREE_ZVAL(*result_element); + return 1; + } + + ZVAL_STRINGL(*result_element, buff, buff_len, 1); + Z_STRVAL_P(*result_element)[buff_len] = '\0'; + + return 0; + break; + + case OCI_TYPECODE_VARCHAR2: + { + OCIString *oci_string = *(OCIString **)element; + text *str; + + str = (text *)PHP_OCI_CALL(OCIStringPtr, (connection->env, oci_string)); + + if (str) { + ZVAL_STRING(*result_element, str, 1); + } + return 0; + } + break; + + case OCI_TYPECODE_UNSIGNED16: /* UNSIGNED SHORT */ + case OCI_TYPECODE_UNSIGNED32: /* UNSIGNED LONG */ + case OCI_TYPECODE_REAL: /* REAL */ + case OCI_TYPECODE_DOUBLE: /* DOUBLE */ + case OCI_TYPECODE_INTEGER: /* INT */ + case OCI_TYPECODE_SIGNED16: /* SHORT */ + case OCI_TYPECODE_SIGNED32: /* LONG */ + case OCI_TYPECODE_DECIMAL: /* DECIMAL */ + case OCI_TYPECODE_FLOAT: /* FLOAT */ + case OCI_TYPECODE_NUMBER: /* NUMBER */ + case OCI_TYPECODE_SMALLINT: /* SMALLINT */ + { + double double_number; + + connection->errcode = PHP_OCI_CALL(OCINumberToReal, (connection->err, (CONST OCINumber *) element, (uword) sizeof(double), (dvoid *) &double_number)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + FREE_ZVAL(*result_element); + return 1; + } + + ZVAL_DOUBLE(*result_element, double_number); + + return 0; + } + break; + default: + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element: %d", collection->element_typecode); + FREE_ZVAL(*result_element); + return 1; + break; + } + /* never reached */ + return 1; +} /* }}} */ + +/* {{{ php_oci_collection_element_set_null() + Set the element with the given index to NULL */ +int php_oci_collection_element_set_null(php_oci_collection *collection, long index TSRMLS_DC) +{ + OCIInd null_index = OCI_IND_NULL; + php_oci_connection *connection = collection->connection; + + /* set NULL element */ + connection->errcode = PHP_OCI_CALL(OCICollAssignElem, (connection->env, connection->err, (ub4) index, (dvoid *)"", &null_index, collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_element_set_date() + Change element's value to the given DATE */ +int php_oci_collection_element_set_date(php_oci_collection *collection, long index, char *date, int date_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + OCIDate oci_date; + php_oci_connection *connection = collection->connection; + + /* format and language are NULLs, so format is "DD-MON-YY" and language is the default language of the session */ + connection->errcode = PHP_OCI_CALL(OCIDateFromText, (connection->err, date, date_len, NULL, 0, NULL, 0, &oci_date)); + + if (connection->errcode != OCI_SUCCESS) { + /* failed to convert string to date */ + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAssignElem, (connection->env, connection->err, (ub4)index, (dvoid *) &oci_date, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_element_set_number() + Change element's value to the given NUMBER */ +int php_oci_collection_element_set_number(php_oci_collection *collection, long index, char *number, int number_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + double element_double; + OCINumber oci_number; + php_oci_connection *connection = collection->connection; + + element_double = zend_strtod(number, NULL); + + connection->errcode = PHP_OCI_CALL(OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAssignElem, (connection->env, connection->err, (ub4) index, (dvoid *) &oci_number, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_element_set_string() + Change element's value to the given string */ +int php_oci_collection_element_set_string(php_oci_collection *collection, long index, char *element, int element_len TSRMLS_DC) +{ + OCIInd new_index = OCI_IND_NOTNULL; + OCIString *ocistr = (OCIString *)0; + php_oci_connection *connection = collection->connection; + + connection->errcode = PHP_OCI_CALL(OCIStringAssignText, (connection->env, connection->err, element, element_len, &ocistr)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCICollAssignElem, (connection->env, connection->err, (ub4)index, (dvoid *) ocistr, (dvoid *) &new_index, (OCIColl *) collection->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_element_set() + Collection element setter */ +int php_oci_collection_element_set(php_oci_collection *collection, long index, char *value, int value_len TSRMLS_DC) +{ + if (value_len == 0) { + return php_oci_collection_element_set_null(collection, index TSRMLS_CC); + } + + switch(collection->element_typecode) { + case OCI_TYPECODE_DATE: + return php_oci_collection_element_set_date(collection, index, value, value_len TSRMLS_CC); + break; + + case OCI_TYPECODE_VARCHAR2 : + return php_oci_collection_element_set_string(collection, index, value, value_len TSRMLS_CC); + break; + + case OCI_TYPECODE_UNSIGNED16 : /* UNSIGNED SHORT */ + case OCI_TYPECODE_UNSIGNED32 : /* UNSIGNED LONG */ + case OCI_TYPECODE_REAL : /* REAL */ + case OCI_TYPECODE_DOUBLE : /* DOUBLE */ + case OCI_TYPECODE_INTEGER : /* INT */ + case OCI_TYPECODE_SIGNED16 : /* SHORT */ + case OCI_TYPECODE_SIGNED32 : /* LONG */ + case OCI_TYPECODE_DECIMAL : /* DECIMAL */ + case OCI_TYPECODE_FLOAT : /* FLOAT */ + case OCI_TYPECODE_NUMBER : /* NUMBER */ + case OCI_TYPECODE_SMALLINT : /* SMALLINT */ + return php_oci_collection_element_set_number(collection, index, value, value_len TSRMLS_CC); + break; + + default: + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element: %d", collection->element_typecode); + return 1; + break; + } + /* never reached */ + return 1; +} /* }}} */ + +/* {{{ php_oci_collection_assign() + Assigns a value to the collection from another collection */ +int php_oci_collection_assign(php_oci_collection *collection_dest, php_oci_collection *collection_from TSRMLS_DC) +{ + php_oci_connection *connection = collection_dest->connection; + + connection->errcode = PHP_OCI_CALL(OCICollAssign, (connection->env, connection->err, collection_from->collection, collection_dest->collection)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_collection_close() + Destroy collection and all associated resources */ +void php_oci_collection_close(php_oci_collection *collection TSRMLS_DC) +{ + php_oci_connection *connection = collection->connection; + + if (collection->collection) { + connection->errcode = PHP_OCI_CALL(OCIObjectFree, (connection->env, connection->err, (dvoid *)collection->collection, (ub2)OCI_OBJECTFREE_FORCE)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + } + } + + zend_list_delete(collection->connection->rsrc_id); + + efree(collection); + return; +} /* }}} */ + +#endif /* HAVE_OCI8 */ diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c new file mode 100644 index 000000000..49c5190f3 --- /dev/null +++ b/ext/oci8/oci8_interface.c @@ -0,0 +1,2129 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Stig Sæther Bakken | + | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | + +----------------------------------------------------------------------+ +*/ + +/* $Id: oci8_interface.c,v 1.8.2.4 2006/01/05 13:42:35 tony2001 Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "ext/standard/info.h" +#include "php_ini.h" + +#if HAVE_OCI8 + +#include "php_oci8.h" +#include "php_oci8_int.h" + +/* {{{ proto bool oci_define_by_name(resource stmt, string name, mixed &var [, int type]) + Define a PHP variable to an Oracle column by name */ +/* if you want to define a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE defining!!! */ +PHP_FUNCTION(oci_define_by_name) +{ + zval *stmt, *var; + char *name; + int name_len; + long type = SQLT_CHR; + php_oci_statement *statement; + php_oci_define *define, *tmp_define; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsz/|l", &stmt, &name, &name_len, &var, &type) == FAILURE) { + return; + } + + if (!name_len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Column name cannot be empty"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_STATEMENT(stmt, statement); + + if (statement->defines == NULL) { + ALLOC_HASHTABLE(statement->defines); + zend_hash_init(statement->defines, 13, NULL, php_oci_define_hash_dtor, 0); + } + + define = ecalloc(1,sizeof(php_oci_define)); + + if (zend_hash_add(statement->defines, name, name_len, define, sizeof(php_oci_define), (void **)&tmp_define) == SUCCESS) { + efree(define); + define = tmp_define; + } else { + efree(define); + RETURN_FALSE; + } + + define->name = (text*) estrndup(name, name_len); + define->name_len = name_len; + define->type = type; + define->zval = var; + zval_add_ref(&var); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]]) + Bind a PHP variable to an Oracle placeholder by name */ +/* if you want to bind a LOB/CLOB etc make sure you allocate it via OCINewDescriptor BEFORE binding!!! */ +PHP_FUNCTION(oci_bind_by_name) +{ + ub2 bind_type = SQLT_CHR; /* unterminated string */ + int name_len; + long maxlen = -1, type = 0; + char *name; + zval *z_statement; + zval *bind_var = NULL; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsz/|ll", &z_statement, &name, &name_len, &bind_var, &maxlen, &type) == FAILURE) { + return; + } + + if (type) { + bind_type = (ub2) type; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_bind_by_name(statement, name, name_len, bind_var, maxlen, bind_type TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]]) + Bind a PHP array to an Oracle PL/SQL type by name */ +PHP_FUNCTION(oci_bind_array_by_name) +{ + int name_len; + long max_item_len = -1; + long max_array_len = 0; + long type = SQLT_AFC; + char *name; + zval *z_statement; + zval *bind_var = NULL; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsz/l|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (ZEND_NUM_ARGS() == 5 && max_item_len <= 0) { + max_item_len = -1; + } + + if (max_array_len <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Maximum array length must be greater than zero"); + RETURN_FALSE; + } + + if (php_oci_bind_array_by_name(statement, name, name_len, bind_var, max_array_len, max_item_len, type TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_free_descriptor() + Deletes large object description */ +PHP_FUNCTION(oci_free_descriptor) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + zend_list_delete(descriptor->id); + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_save( string data [, int offset ]) + Saves a large object */ +PHP_FUNCTION(oci_lob_save) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + char *data; + int data_len; + long offset = 0; + ub4 bytes_written; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &data, &data_len, &offset) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &offset) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (offset < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset parameter must be greater than or equal to 0"); + RETURN_FALSE; + } + + if (php_oci_lob_write(descriptor, offset, data, data_len, &bytes_written TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_import( string filename ) + Loads file into a LOB */ +PHP_FUNCTION(oci_lob_import) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + char *filename; + int filename_len; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_import(descriptor, filename TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto string oci_lob_load() + Loads a large object */ +PHP_FUNCTION(oci_lob_load) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + char *buffer = NULL; + ub4 buffer_len; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_read(descriptor, -1, 0, &buffer, &buffer_len TSRMLS_CC)) { + RETURN_FALSE; + } + if (buffer_len > 0) { + RETURN_STRINGL(buffer, buffer_len, 0); + } + else { + RETURN_EMPTY_STRING(); + } +} +/* }}} */ + +/* {{{ proto string oci_lob_read( int length ) + Reads particular part of a large object */ +PHP_FUNCTION(oci_lob_read) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + long length; + char *buffer; + ub4 buffer_len; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &length) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &z_descriptor, oci_lob_class_entry_ptr, &length) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (length <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0"); + RETURN_FALSE; + } + + if (php_oci_lob_read(descriptor, length, descriptor->lob_current_position, &buffer, &buffer_len TSRMLS_CC)) { + RETURN_FALSE; + } + if (buffer_len > 0) { + RETURN_STRINGL(buffer, buffer_len, 0); + } + else { + RETURN_EMPTY_STRING(); + } +} +/* }}} */ + +/* {{{ proto bool oci_lob_eof() + Checks if EOF is reached */ +PHP_FUNCTION(oci_lob_eof) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + ub4 lob_length; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (!php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC) && lob_length >= 0) { + if (lob_length == descriptor->lob_current_position) { + RETURN_TRUE; + } + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto int oci_lob_tell() + Tells LOB pointer position */ +PHP_FUNCTION(oci_lob_tell) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + RETURN_LONG(descriptor->lob_current_position); +} +/* }}} */ + +/* {{{ proto bool oci_lob_rewind() + Rewind pointer of a LOB */ +PHP_FUNCTION(oci_lob_rewind) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + descriptor->lob_current_position = 0; + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_seek( int offset [, int whence ]) + Moves the pointer of a LOB */ +PHP_FUNCTION(oci_lob_seek) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + long offset, whence = PHP_OCI_SEEK_SET; + ub4 lob_length; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &offset, &whence) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol|l", &z_descriptor, oci_lob_class_entry_ptr, &offset, &whence) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + RETURN_FALSE; + } + + switch(whence) { + case PHP_OCI_SEEK_CUR: + descriptor->lob_current_position += offset; + break; + case PHP_OCI_SEEK_END: + if (descriptor->lob_size + offset >= 0) { + descriptor->lob_current_position = descriptor->lob_size + offset; + } + else { + descriptor->lob_current_position = 0; + } + break; + case PHP_OCI_SEEK_SET: + default: + descriptor->lob_current_position = (offset > 0) ? offset : 0; + break; + } + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int oci_lob_size() + Returns size of a large object */ +PHP_FUNCTION(oci_lob_size) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + ub4 lob_length; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(lob_length); +} +/* }}} */ + +/* {{{ proto int oci_lob_write( string string [, int length ]) + Writes data to current position of a LOB */ +PHP_FUNCTION(oci_lob_write) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + int data_len; + long write_len = 0; + ub4 bytes_written; + char *data; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &data, &data_len, &write_len) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() == 2) { + data_len = MIN(data_len, write_len); + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &write_len) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() == 3) { + data_len = MIN(data_len, write_len); + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (data_len <= 0) { + RETURN_LONG(0); + } + + if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, data_len, &bytes_written TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(bytes_written); +} +/* }}} */ + +/* {{{ proto bool oci_lob_append( object lob ) + Appends data from a LOB to another LOB */ +PHP_FUNCTION(oci_lob_append) +{ + zval **tmp_dest, **tmp_from, *z_descriptor_dest = getThis(), *z_descriptor_from; + php_oci_descriptor *descriptor_dest, *descriptor_from; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor"), (void **)&tmp_dest) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); + RETURN_FALSE; + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor"), (void **)&tmp_from) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_dest, descriptor_dest); + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_from, descriptor_from); + + if (php_oci_lob_append(descriptor_dest, descriptor_from TSRMLS_CC)) { + RETURN_FALSE; + } + /* XXX should we increase lob_size here ? */ + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_truncate( [ int length ]) + Truncates a LOB */ +PHP_FUNCTION(oci_lob_truncate) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + ub4 trim_length = 0; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &trim_length) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &z_descriptor, oci_lob_class_entry_ptr, &trim_length) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_truncate(descriptor, trim_length TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int oci_lob_erase( [ int offset [, int length ] ] ) + Erases a specified portion of the internal LOB, starting at a specified offset */ +PHP_FUNCTION(oci_lob_erase) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + ub4 bytes_erased; + long offset = -1, length = -1; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll", &offset, &length) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 0 && offset < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset must be greater than or equal to 0"); + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() > 1 && length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length must be greater than or equal to 0"); + RETURN_FALSE; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|ll", &z_descriptor, oci_lob_class_entry_ptr, &offset, &length) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 1 && offset < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset must be greater than or equal to 0"); + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() > 2 && length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length must be greater than or equal to 0"); + RETURN_FALSE; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_erase(descriptor, offset, length, &bytes_erased TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(bytes_erased); +} +/* }}} */ + +/* {{{ proto bool oci_lob_flush( [ int flag ] ) + Flushes the LOB buffer */ +PHP_FUNCTION(oci_lob_flush) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + ub4 flush_flag = 0; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flush_flag) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", &z_descriptor, oci_lob_class_entry_ptr, &flush_flag) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (descriptor->buffering == PHP_OCI_LOB_BUFFER_DISABLED) { + /* buffering wasn't enabled, there is nothing to flush */ + RETURN_FALSE; + } + + if (php_oci_lob_flush(descriptor, flush_flag TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool ocisetbufferinglob( boolean flag ) + Enables/disables buffering for a LOB */ +PHP_FUNCTION(ocisetbufferinglob) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + zend_bool flag; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &flag) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ob", &z_descriptor, oci_lob_class_entry_ptr, &flag) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_set_buffering(descriptor, flag TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool ocigetbufferinglob() + Returns current state of buffering for a LOB */ +PHP_FUNCTION(ocigetbufferinglob) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (descriptor->buffering != PHP_OCI_LOB_BUFFER_DISABLED) { + RETURN_TRUE; + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_copy( object lob_to, object lob_from [, int length ] ) + Copies data from a LOB to another LOB */ +PHP_FUNCTION(oci_lob_copy) +{ + zval **tmp_dest, **tmp_from, *z_descriptor_dest, *z_descriptor_from; + php_oci_descriptor *descriptor_dest, *descriptor_from; + long length = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO|l", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr, &length) == FAILURE) { + return; + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor"), (void **)&tmp_dest) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); + RETURN_FALSE; + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor"), (void **)&tmp_from) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_dest, descriptor_dest); + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_from, descriptor_from); + + if (ZEND_NUM_ARGS() == 3 && length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0"); + RETURN_FALSE; + } + + if (ZEND_NUM_ARGS() == 2) { + /* indicate that we want to copy from the current position to the end of the LOB */ + length = -1; + } + + if (php_oci_lob_copy(descriptor_dest, descriptor_from, length TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_is_equal( object lob1, object lob2 ) + Tests to see if two LOB/FILE locators are equal */ +PHP_FUNCTION(oci_lob_is_equal) +{ + zval **tmp_first, **tmp_second, *z_descriptor_first, *z_descriptor_second; + php_oci_descriptor *descriptor_first, *descriptor_second; + boolean is_equal; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", &z_descriptor_first, oci_lob_class_entry_ptr, &z_descriptor_second, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor"), (void **)&tmp_first) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); + RETURN_FALSE; + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor_second), "descriptor", sizeof("descriptor"), (void **)&tmp_second) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_first, descriptor_first); + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp_second, descriptor_second); + + if (php_oci_lob_is_equal(descriptor_first, descriptor_second, &is_equal TSRMLS_CC)) { + RETURN_FALSE; + } + + if (is_equal == TRUE) { + RETURN_TRUE; + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_export([string filename [, int start [, int length]]]) + Writes a large object into a file */ +PHP_FUNCTION(oci_lob_export) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + char *filename, *buffer; + int filename_len; + long start = -1, length = -1, block_length; + php_stream *stream; + ub4 lob_length; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &filename, &filename_len, &start, &length) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 1 && start < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Start parameter must be greater than or equal to 0"); + RETURN_FALSE; + } + if (ZEND_NUM_ARGS() > 2 && length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than or equal to 0"); + RETURN_FALSE; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 2 && start < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Start parameter must be greater than or equal to 0"); + RETURN_FALSE; + } + if (ZEND_NUM_ARGS() > 3 && length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than or equal to 0"); + RETURN_FALSE; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + RETURN_FALSE; + } + + if (start == -1) { + start = 0; + } + + if (length == -1) { + length = lob_length - descriptor->lob_current_position; + } + + if (length == 0) { + /* nothing to write, fail silently */ + RETURN_FALSE; + } + + if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(filename TSRMLS_CC)) { + RETURN_FALSE; + } + + stream = php_stream_open_wrapper_ex(filename, "w", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, NULL); + + block_length = PHP_OCI_LOB_BUFFER_SIZE; + if (block_length > length) { + block_length = length; + } + + while(length > 0) { + ub4 tmp_bytes_read = 0; + if (php_oci_lob_read(descriptor, block_length, start, &buffer, &tmp_bytes_read TSRMLS_CC)) { + php_stream_close(stream); + RETURN_FALSE; + } + if (tmp_bytes_read && !php_stream_write(stream, buffer, tmp_bytes_read)) { + php_stream_close(stream); + efree(buffer); + RETURN_FALSE; + } + if (buffer) { + efree(buffer); + } + + length -= tmp_bytes_read; + descriptor->lob_current_position += tmp_bytes_read; + start += tmp_bytes_read; + + if (block_length > length) { + block_length = length; + } + } + + php_stream_close(stream); + RETURN_TRUE; +} +/* }}} */ + +#ifdef HAVE_OCI8_TEMP_LOB +/* {{{ proto bool oci_lob_write_temporary(string var [, int lob_type]) + Writes temporary blob */ +PHP_FUNCTION(oci_lob_write_temporary) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + char *data; + int data_len; + long type = OCI_TEMP_CLOB; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &data, &data_len, &type) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &type) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_write_tmp(descriptor, type, data, data_len TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_lob_close() + Closes lob descriptor */ +PHP_FUNCTION(oci_lob_close) +{ + zval **tmp, *z_descriptor = getThis(); + php_oci_descriptor *descriptor; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor); + + if (php_oci_lob_close(descriptor TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ +#endif + +/* {{{ proto object oci_new_descriptor(resource connection [, int type]) + Initialize a new empty descriptor LOB/FILE (LOB is default) */ +PHP_FUNCTION(oci_new_descriptor) +{ + zval *z_connection; + php_oci_connection *connection; + php_oci_descriptor *descriptor; + long type = OCI_DTYPE_LOB; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &z_connection, &type) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + /* php_oci_lob_create() checks type */ + descriptor = php_oci_lob_create(connection, type TSRMLS_CC); + + if (!descriptor) { + RETURN_NULL(); + } + + object_init_ex(return_value, oci_lob_class_entry_ptr); + add_property_resource(return_value, "descriptor", descriptor->id); +} +/* }}} */ + +/* {{{ proto bool oci_rollback(resource connection) + Rollback the current context */ +PHP_FUNCTION(oci_rollback) +{ + zval *z_connection; + php_oci_connection *connection; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_connection) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + if (connection->descriptors) { + zend_hash_destroy(connection->descriptors); + efree(connection->descriptors); + connection->descriptors = NULL; + } + + if (php_oci_connection_rollback(connection TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_commit(resource connection) + Commit the current context */ +PHP_FUNCTION(oci_commit) +{ + zval *z_connection; + php_oci_connection *connection; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_connection) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + if (connection->descriptors) { + zend_hash_destroy(connection->descriptors); + efree(connection->descriptors); + connection->descriptors = NULL; + } + + if (php_oci_connection_commit(connection TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto string oci_field_name(resource stmt, int col) + Tell the name of a column */ +PHP_FUNCTION(oci_field_name) +{ + php_oci_out_column *column; + + if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU) ) ) { + RETURN_STRINGL(column->name, column->name_len, 1); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto int oci_field_size(resource stmt, int col) + Tell the maximum data size of a column */ +PHP_FUNCTION(oci_field_size) +{ + php_oci_out_column *column; + + if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU) ) ) { + /* Handle data type of LONG */ + if (column->data_type == SQLT_LNG){ + RETURN_LONG(column->storage_size4); + } + RETURN_LONG(column->data_size); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto int oci_field_scale(resource stmt, int col) + Tell the scale of a column */ +PHP_FUNCTION(oci_field_scale) +{ + php_oci_out_column *column; + + if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU) ) ) { + RETURN_LONG(column->scale); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto int oci_field_precision(resource stmt, int col) + Tell the precision of a column */ +PHP_FUNCTION(oci_field_precision) +{ + php_oci_out_column *column; + + if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU) ) ) { + RETURN_LONG(column->precision); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto mixed oci_field_type(resource stmt, int col) + Tell the data type of a column */ +PHP_FUNCTION(oci_field_type) +{ + php_oci_out_column *column; + + column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU); + + if (!column) { + RETURN_FALSE; + } + + switch (column->data_type) { +#ifdef SQLT_TIMESTAMP + case SQLT_TIMESTAMP: + RETVAL_STRING("TIMESTAMP",1); + break; +#endif +#ifdef SQLT_TIMESTAMP_TZ + case SQLT_TIMESTAMP_TZ: + RETVAL_STRING("TIMESTAMP_TZ",1); + break; +#endif + case SQLT_DAT: + RETVAL_STRING("DATE",1); + break; + case SQLT_NUM: + RETVAL_STRING("NUMBER",1); + break; + case SQLT_LNG: + RETVAL_STRING("LONG",1); + break; + case SQLT_BIN: + RETVAL_STRING("RAW",1); + break; + case SQLT_LBI: + RETVAL_STRING("LONG RAW",1); + break; + case SQLT_CHR: + RETVAL_STRING("VARCHAR",1); + break; + case SQLT_RSET: + RETVAL_STRING("REFCURSOR",1); + break; + case SQLT_AFC: + RETVAL_STRING("CHAR",1); + break; + case SQLT_BLOB: + RETVAL_STRING("BLOB",1); + break; + case SQLT_CLOB: + RETVAL_STRING("CLOB",1); + break; + case SQLT_BFILE: + RETVAL_STRING("BFILE",1); + break; + case SQLT_RDD: + RETVAL_STRING("ROWID",1); + break; + default: + RETVAL_LONG(column->data_type); + } +} +/* }}} */ + +/* {{{ proto int oci_field_type_raw(resource stmt, int col) + Tell the raw oracle data type of a column */ +PHP_FUNCTION(oci_field_type_raw) +{ + php_oci_out_column *column; + + column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU); + if (column) { + RETURN_LONG(column->data_type); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool oci_field_is_null(resource stmt, int col) + Tell whether a column is NULL */ +PHP_FUNCTION(oci_field_is_null) +{ + php_oci_out_column *column; + + if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU) ) ) { + if (column->indicator == -1) { + RETURN_TRUE; + } + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto void oci_internal_debug(int onoff) + Toggle internal debugging output for the OCI extension */ +PHP_FUNCTION(oci_internal_debug) +{ + zend_bool on_off; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &on_off) == FAILURE) { + return; + } + OCI_G(debug_mode) = on_off; +} +/* }}} */ + +/* {{{ proto bool oci_execute(resource stmt [, int mode]) + Execute a parsed statement */ +PHP_FUNCTION(oci_execute) +{ + zval *z_statement; + php_oci_statement *statement; + long mode = OCI_COMMIT_ON_SUCCESS; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &z_statement, &mode) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_execute(statement, mode TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_cancel(resource stmt) + Cancel reading from a cursor */ +PHP_FUNCTION(oci_cancel) +{ + zval *z_statement; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_cancel(statement TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_fetch(resource stmt) + Prepare a new row of data for reading */ +PHP_FUNCTION(oci_fetch) +{ + zval *z_statement; + php_oci_statement *statement; + ub4 nrows = 1; /* only one row at a time is supported for now */ + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_fetch(statement, nrows TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int ocifetchinto(resource stmt, array &output [, int mode]) + Fetch a row of result data into an array */ +PHP_FUNCTION(ocifetchinto) +{ + php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_OCI_NUM, 3); +} +/* }}} */ + +/* {{{ proto int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]]) + Fetch all rows of result data into an array */ +PHP_FUNCTION(oci_fetch_all) +{ + zval *z_statement, *array, *element, *tmp; + php_oci_statement *statement; + php_oci_out_column **columns; + zval ***outarrs; + ub4 nrows = 1; + int i; + long rows = 0, flags = 0, skip = 0, maxrows = -1; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz/|lll", &z_statement, &array, &skip, &maxrows, &flags) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + zval_dtor(array); + array_init(array); + + while (skip--) { + if (php_oci_statement_fetch(statement, nrows TSRMLS_CC)) { + RETURN_LONG(0); + } + } + + if (flags & PHP_OCI_FETCHSTATEMENT_BY_ROW) { + columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0); + + for (i = 0; i < statement->ncolumns; i++) { + columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + } + + while (!php_oci_statement_fetch(statement, nrows TSRMLS_CC)) { + zval *row; + + MAKE_STD_ZVAL(row); + array_init(row); + + for (i = 0; i < statement->ncolumns; i++) { + MAKE_STD_ZVAL(element); + php_oci_column_to_zval(columns[ i ], element, PHP_OCI_RETURN_LOBS TSRMLS_CC); + + if (flags & PHP_OCI_NUM) { + zend_hash_next_index_insert(Z_ARRVAL_P(row), &element, sizeof(zval*), NULL); + } else { /* default to ASSOC */ + zend_hash_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL); + } + } + + zend_hash_next_index_insert(Z_ARRVAL_P(array), &row, sizeof(zval*), NULL); + rows++; + + if (maxrows != -1 && rows == maxrows) { + php_oci_statement_cancel(statement TSRMLS_CC); + break; + } + } + efree(columns); + + } else { /* default to BY_COLUMN */ + columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0); + outarrs = safe_emalloc(statement->ncolumns, sizeof(zval*), 0); + + if (flags & PHP_OCI_NUM) { + for (i = 0; i < statement->ncolumns; i++) { + columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + + MAKE_STD_ZVAL(tmp); + array_init(tmp); + zend_hash_next_index_insert(Z_ARRVAL_P(array), &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); + } + } else { /* default to ASSOC */ + for (i = 0; i < statement->ncolumns; i++) { + columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + + MAKE_STD_ZVAL(tmp); + array_init(tmp); + zend_hash_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); + } + } + + while (!php_oci_statement_fetch(statement, nrows TSRMLS_CC)) { + for (i = 0; i < statement->ncolumns; i++) { + MAKE_STD_ZVAL(element); + php_oci_column_to_zval(columns[ i ], element, PHP_OCI_RETURN_LOBS TSRMLS_CC); + zend_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(zval*), NULL); + } + + rows++; + + if (maxrows != -1 && rows == maxrows) { + php_oci_statement_cancel(statement TSRMLS_CC); + break; + } + } + + efree(columns); + efree(outarrs); + } + + RETURN_LONG(rows); +} +/* }}} */ + +/* {{{ proto object oci_fetch_object( resource stmt ) + Fetch a result row as an object */ +PHP_FUNCTION(oci_fetch_object) +{ + php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_OCI_ASSOC, 2); + + if (Z_TYPE_P(return_value) == IS_ARRAY) { + object_and_properties_init(return_value, ZEND_STANDARD_CLASS_DEF_PTR, Z_ARRVAL_P(return_value)); + } +} +/* }}} */ + +/* {{{ proto array oci_fetch_row( resource stmt ) + Fetch a result row as an enumerated array */ +PHP_FUNCTION(oci_fetch_row) +{ + php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_OCI_NUM, 1); +} +/* }}} */ + +/* {{{ proto array oci_fetch_assoc( resource stmt ) + Fetch a result row as an associative array */ +PHP_FUNCTION(oci_fetch_assoc) +{ + php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_OCI_ASSOC, 1); +} +/* }}} */ + +/* {{{ proto array oci_fetch_array( resource stmt [, int mode ]) + Fetch a result row as an array */ +PHP_FUNCTION(oci_fetch_array) +{ + php_oci_fetch_row(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_OCI_BOTH, 2); +} +/* }}} */ + +/* {{{ proto bool oci_free_statement(resource stmt) + Free all resources associated with a statement */ +PHP_FUNCTION(oci_free_statement) +{ + zval *z_statement; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + zend_list_delete(statement->id); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_close(resource connection) + Disconnect from database */ +PHP_FUNCTION(oci_close) +{ + zval *z_connection; + php_oci_connection *connection; + + if (OCI_G(old_oci_close_semantics)) { + /* do nothing to keep BC */ + return; + } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_connection) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + zend_list_delete(connection->rsrc_id); + ZVAL_NULL(z_connection); + + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto resource oci_new_connect(string user, string pass [, string db]) + Connect to an Oracle database and log on. Returns a new session. */ +PHP_FUNCTION(oci_new_connect) +{ + php_oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); +} +/* }}} */ + +/* {{{ proto resource oci_connect(string user, string pass [, string db]) + Connect to an Oracle database and log on. Returns a new session. */ +PHP_FUNCTION(oci_connect) +{ + php_oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); +} +/* }}} */ + +/* {{{ proto resource oci_pconnect(string user, string pass [, string db]) + Connect to an Oracle database using a persistent connection and log on. Returns a new session. */ +PHP_FUNCTION(oci_pconnect) +{ + php_oci_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +/* }}} */ + +/* {{{ proto array oci_error([resource stmt|connection|global]) + Return the last error of stmt|connection|global. If no error happened returns false. */ +PHP_FUNCTION(oci_error) +{ + zval *arg; + php_oci_statement *statement; + php_oci_connection *connection; + text *errbuf; + sb4 errcode = 0; + sword error = 0; + dvoid *errh = NULL; +#ifdef HAVE_OCI8_ATTR_STATEMENT + ub2 error_offset = 0; + text *sqltext = NULL; +#endif + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|r", &arg) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 0) { + statement = (php_oci_statement *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_statement); + + if (statement) { + errh = statement->err; + error = statement->errcode; + +#ifdef HAVE_OCI8_ATTR_STATEMENT + if (php_oci_fetch_sqltext_offset(statement, &sqltext, &error_offset TSRMLS_CC)) { + RETURN_FALSE; + } +#endif + } else { + connection = (php_oci_connection *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_connection); + + if (connection) { + errh = connection->err; + error = connection->errcode; + } + } + } else { + errh = OCI_G(err); + error = OCI_G(errcode); + } + + if (error == OCI_SUCCESS) { /* no error set in the handle */ + RETURN_FALSE; + } + + if (!errh) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIError: unable to find error handle"); + RETURN_FALSE; + } + + errcode = php_oci_fetch_errmsg(errh, &errbuf TSRMLS_CC); + + if (errcode) { + array_init(return_value); + add_assoc_long(return_value, "code", errcode); + add_assoc_string(return_value, "message", (char*) errbuf, 0); +#ifdef HAVE_OCI8_ATTR_STATEMENT + add_assoc_long(return_value, "offset", error_offset); + add_assoc_string(return_value, "sqltext", sqltext ? (char *) sqltext : "", 1); +#endif + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto int oci_num_fields(resource stmt) + Return the number of result columns in a statement */ +PHP_FUNCTION(oci_num_fields) +{ + zval *z_statement; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + RETURN_LONG(statement->ncolumns); +} +/* }}} */ + +/* {{{ proto resource oci_parse(resource connection, string query) + Parse a query and return a statement */ +PHP_FUNCTION(oci_parse) +{ + zval *z_connection; + php_oci_connection *connection; + php_oci_statement *statement; + char *query; + int query_len; + zend_bool cached = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|b", &z_connection, &query, &query_len, &cached) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + statement = php_oci_statement_create(connection, query, query_len, cached TSRMLS_CC); + + if (statement) { + RETURN_RESOURCE(statement->id); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool oci_set_prefetch(resource stmt, int prefetch_rows) + Sets the number of rows to be prefetched on execute to prefetch_rows for stmt */ +PHP_FUNCTION(oci_set_prefetch) +{ + zval *z_statement; + php_oci_statement *statement; + long size; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &z_statement, &size) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_set_prefetch(statement, size TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_password_change(resource connection, string username, string old_password, string new_password) + Changes the password of an account */ +PHP_FUNCTION(oci_password_change) +{ + zval *z_connection; + text *user, *pass_old, *pass_new, *dbname; + int user_len, pass_old_len, pass_new_len, dbname_len; + php_oci_connection *connection; + + /* Disable in Safe Mode */ + if (PG(safe_mode)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "is disabled in Safe Mode"); + RETURN_FALSE; + } + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "rsss", &z_connection, &user, &user_len, &pass_old, &pass_old_len, &pass_new, &pass_new_len) == SUCCESS) { + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + if (php_oci_password_change(connection, user, user_len, pass_old, pass_old_len, pass_new, pass_new_len TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; + } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "ssss", &dbname, &dbname_len, &user, &user_len, &pass_old, &pass_old_len, &pass_new, &pass_new_len) == SUCCESS) { + + connection = php_oci_do_connect_ex(user, user_len, pass_old, pass_old_len, pass_new, pass_new_len, dbname, dbname_len, NULL, OCI_DEFAULT, 0, 0 TSRMLS_CC); + if (!connection) { + RETURN_FALSE; + } + RETURN_RESOURCE(connection->rsrc_id); + } + WRONG_PARAM_COUNT; +} +/* }}} */ + +/* {{{ proto resource oci_new_cursor(resource connection) + Return a new cursor (Statement-Handle) - use this to bind ref-cursors! */ +PHP_FUNCTION(oci_new_cursor) +{ + zval *z_connection; + php_oci_connection *connection; + php_oci_statement *statement; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_connection) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + statement = php_oci_statement_create(connection, NULL, 0, 0 TSRMLS_CC); + + if (statement) { + RETURN_RESOURCE(statement->id); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto string oci_result(resource stmt, mixed column) + Return a single column of result data */ +PHP_FUNCTION(oci_result) +{ + php_oci_out_column *column; + + column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU); + if(column) { + php_oci_column_to_zval(column, return_value, 0 TSRMLS_CC); + } + else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto string oci_server_version(resource connection) + Return a string containing server version information */ +PHP_FUNCTION(oci_server_version) +{ + zval *z_connection; + php_oci_connection *connection; + char *version = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_connection) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + if (php_oci_server_get_version(connection, &version TSRMLS_CC)) { + RETURN_FALSE; + } + + RETURN_STRING(version, 0); +} +/* }}} */ + +/* {{{ proto string oci_statement_type(resource stmt) + Return the query type of an OCI statement */ +PHP_FUNCTION(oci_statement_type) +{ + zval *z_statement; + php_oci_statement *statement; + ub2 type; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_get_type(statement, &type TSRMLS_CC)) { + RETURN_FALSE; + } + + switch (type) { + case OCI_STMT_SELECT: + RETVAL_STRING("SELECT",1); + break; + case OCI_STMT_UPDATE: + RETVAL_STRING("UPDATE",1); + break; + case OCI_STMT_DELETE: + RETVAL_STRING("DELETE",1); + break; + case OCI_STMT_INSERT: + RETVAL_STRING("INSERT",1); + break; + case OCI_STMT_CREATE: + RETVAL_STRING("CREATE",1); + break; + case OCI_STMT_DROP: + RETVAL_STRING("DROP",1); + break; + case OCI_STMT_ALTER: + RETVAL_STRING("ALTER",1); + break; + case OCI_STMT_BEGIN: + RETVAL_STRING("BEGIN",1); + break; + case OCI_STMT_DECLARE: + RETVAL_STRING("DECLARE",1); + break; + default: + RETVAL_STRING("UNKNOWN",1); + } +} +/* }}} */ + +/* {{{ proto int oci_num_rows(resource stmt) + Return the row count of an OCI statement */ +PHP_FUNCTION(oci_num_rows) +{ + zval *z_statement; + php_oci_statement *statement; + ub4 rowcount; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_statement) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); + + if (php_oci_statement_get_numrows(statement, &rowcount TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(rowcount); +} +/* }}} */ + +#ifdef PHP_OCI8_HAVE_COLLECTIONS +/* {{{ proto bool oci_free_collection() + Deletes collection object*/ +PHP_FUNCTION(oci_free_collection) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + zend_list_delete(collection->id); + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_collection_append(string value) + Append an object to the collection */ +PHP_FUNCTION(oci_collection_append) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + char *value; + int value_len; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &value, &value_len) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &z_collection, oci_coll_class_entry_ptr, &value, &value_len) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_append(collection, value, value_len TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto string oci_collection_element_get(int ndx) + Retrieve the value at collection index ndx */ +PHP_FUNCTION(oci_collection_element_get) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + long element_index; + zval *value; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &element_index) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &z_collection, oci_coll_class_entry_ptr, &element_index) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_element_get(collection, element_index, &value TSRMLS_CC)) { + RETURN_FALSE; + } + + *return_value = *value; + zval_copy_ctor(return_value); + zval_ptr_dtor(&value); +} +/* }}} */ + +/* {{{ proto bool oci_collection_assign(object from) + Assign a collection from another existing collection */ +PHP_FUNCTION(oci_collection_assign) +{ + zval **tmp_dest, **tmp_from, *z_collection_dest = getThis(), *z_collection_from; + php_oci_collection *collection_dest, *collection_from; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_collection_from, oci_coll_class_entry_ptr) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", &z_collection_dest, oci_coll_class_entry_ptr, &z_collection_from, oci_coll_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection_dest), "collection", sizeof("collection"), (void **)&tmp_dest) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property. The first argument should be valid collection object"); + RETURN_FALSE; + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection_from), "collection", sizeof("collection"), (void **)&tmp_from) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property. The second argument should be valid collection object"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp_dest, collection_dest); + PHP_OCI_ZVAL_TO_COLLECTION(*tmp_from, collection_from); + + if (php_oci_collection_assign(collection_dest, collection_from TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto bool oci_collection_element_assign(int index, string val) + Assign element val to collection at index ndx */ +PHP_FUNCTION(oci_collection_element_assign) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + int value_len; + long element_index; + char *value; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &element_index, &value, &value_len) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ols", &z_collection, oci_coll_class_entry_ptr, &element_index, &value, &value_len) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_element_set(collection, element_index, value, value_len TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto int oci_collection_size() + Return the size of a collection */ +PHP_FUNCTION(oci_collection_size) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + sb4 size = 0; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_size(collection, &size TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(size); +} +/* }}} */ + +/* {{{ proto int oci_collection_max() + Return the max value of a collection. For a varray this is the maximum length of the array */ +PHP_FUNCTION(oci_collection_max) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + long max; + + if (!getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_max(collection, &max TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_LONG(max); +} +/* }}} */ + +/* {{{ proto bool oci_collection_trim(int num) + Trim num elements from the end of a collection */ +PHP_FUNCTION(oci_collection_trim) +{ + zval **tmp, *z_collection = getThis(); + php_oci_collection *collection; + long trim_size; + + if (getThis()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &trim_size) == FAILURE) { + return; + } + } + else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &z_collection, oci_coll_class_entry_ptr, &trim_size) == FAILURE) { + return; + } + } + + if (zend_hash_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + RETURN_FALSE; + } + + PHP_OCI_ZVAL_TO_COLLECTION(*tmp, collection); + + if (php_oci_collection_trim(collection, trim_size TSRMLS_CC)) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto object oci_new_collection(resource connection, string tdo [, string schema]) + Initialize a new collection */ +PHP_FUNCTION(oci_new_collection) +{ + zval *z_connection; + php_oci_connection *connection; + php_oci_collection *collection; + char *tdo, *schema = NULL; + int tdo_len, schema_len = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s", &z_connection, &tdo, &tdo_len, &schema, &schema_len) == FAILURE) { + return; + } + + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); + + if ( (collection = php_oci_collection_create(connection, tdo, tdo_len, schema, schema_len TSRMLS_CC)) ) { + object_init_ex(return_value, oci_coll_class_entry_ptr); + add_property_resource(return_value, "collection", collection->id); + } + else { + RETURN_FALSE; + } +} +/* }}} */ + +#endif + +#endif /* HAVE_OCI8 */ diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c new file mode 100644 index 000000000..6729b0511 --- /dev/null +++ b/ext/oci8/oci8_lob.c @@ -0,0 +1,712 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Stig Sæther Bakken | + | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | + +----------------------------------------------------------------------+ +*/ + +/* $Id: oci8_lob.c,v 1.7.2.4 2006/01/05 13:42:35 tony2001 Exp $ */ + + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "ext/standard/info.h" +#include "php_ini.h" + +#if HAVE_OCI8 + +#include "php_oci8.h" +#include "php_oci8_int.h" + +/* for import/export functions */ +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/* {{{ php_oci_lob_create() + Create LOB descriptor and allocate all the resources needed */ +php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long type TSRMLS_DC) +{ + php_oci_descriptor *descriptor; + + switch (type) { + case OCI_DTYPE_FILE: + case OCI_DTYPE_LOB: + case OCI_DTYPE_ROWID: + /* these three are allowed */ + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown descriptor type %ld.", type); + return NULL; + break; + } + + descriptor = ecalloc(1, sizeof(php_oci_descriptor)); + descriptor->type = type; + + OCI_G(errcode) = PHP_OCI_CALL(OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0)); + + if (OCI_G(errcode) != OCI_SUCCESS) { + connection->errcode = php_oci_error(OCI_G(err), OCI_G(errcode) TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + efree(descriptor); + return NULL; + } + + descriptor->connection = connection; + + PHP_OCI_REGISTER_RESOURCE(descriptor, le_descriptor); + + descriptor->lob_current_position = 0; + descriptor->lob_size = -1; /* we should set it to -1 to know, that it's just not initialized */ + descriptor->buffering = PHP_OCI_LOB_BUFFER_DISABLED; /* buffering is off by default */ + + if (descriptor->type == OCI_DTYPE_LOB || descriptor->type == OCI_DTYPE_FILE) { + /* add Lobs & Files to hash. we'll flush them at the end */ + if (!connection->descriptors) { + ALLOC_HASHTABLE(connection->descriptors); + zend_hash_init(connection->descriptors, 0, NULL, php_oci_descriptor_flush_hash_dtor, 0); + } + + zend_hash_next_index_insert(connection->descriptors,&descriptor,sizeof(php_oci_descriptor *),NULL); + } + return descriptor; + +} /* }}} */ + +/* {{{ php_oci_lob_get_length() + Get length of the LOB. The length is cached so we don't need to ask Oracle every time */ +int php_oci_lob_get_length (php_oci_descriptor *descriptor, ub4 *length TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + + *length = 0; + + if (descriptor->lob_size >= 0) { + *length = descriptor->lob_size; + return 0; + } else { + if (descriptor->type == OCI_DTYPE_FILE) { + connection->errcode = PHP_OCI_CALL(OCILobFileOpen, (connection->svc, connection->err, descriptor->descriptor, OCI_FILE_READONLY)); + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + } + + connection->errcode = PHP_OCI_CALL(OCILobGetLength, (connection->svc, connection->err, descriptor->descriptor, (ub4 *)length)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + descriptor->lob_size = *length; + + if (descriptor->type == OCI_DTYPE_FILE) { + connection->errcode = PHP_OCI_CALL(OCILobFileClose, (connection->svc, connection->err, descriptor->descriptor)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + } + } + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_read() + Read specified portion of the LOB into the buffer */ +int php_oci_lob_read (php_oci_descriptor *descriptor, long read_length, long initial_offset, char **data, ub4 *data_len TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + ub4 length = 0; + ub4 block_length = PHP_OCI_LOB_BUFFER_SIZE; + int bytes_read, bytes_total = 0, offset = 0, data_len_chars = 0; + int requested_len = read_length; /* this is by default */ + + *data_len = 0; + *data = NULL; + + if (php_oci_lob_get_length(descriptor, &length TSRMLS_CC)) { + return 1; + } + + if (length <= 0) { + return 0; + } + + if (initial_offset > length) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset must be less than size of the LOB"); + return 1; + } + + if (read_length == -1) { + requested_len = length; + } + + if (requested_len > (length - initial_offset)) { + requested_len = length - initial_offset; + } + + if (requested_len == 0) { + return 0; + } + + if (requested_len < block_length) { + block_length = requested_len; + } + + if (descriptor->type == OCI_DTYPE_FILE) { + connection->errcode = PHP_OCI_CALL(OCILobFileOpen, (connection->svc, connection->err, descriptor->descriptor, OCI_FILE_READONLY)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + } + + *data = (char *)emalloc(block_length + 1); + bytes_read = block_length; + offset = initial_offset; + + do { + connection->errcode = PHP_OCI_CALL(OCILobRead, + ( + connection->svc, + connection->err, + descriptor->descriptor, + &bytes_read, /* IN/OUT bytes toread/read */ + offset + 1, /* offset (starts with 1) */ + (dvoid *) ((char *) *data + *data_len), + block_length, /* size of buffer */ + (dvoid *)0, + (OCICallbackLobRead) 0, /* callback... */ + (ub2) connection->charset, /* The character set ID of the buffer data. */ + (ub1) SQLCS_IMPLICIT /* The character set form of the buffer data. */ + ) + ); + + bytes_total += bytes_read; + /* + * Oracle doesn't tell use how many CHARS were read, + * so we have to count them to get the correct offset for CLOBS */ + data_len_chars = OCIMultiByteStrnDisplayLength(connection->env, *data, bytes_total); + offset = initial_offset + data_len_chars; + + *data_len += bytes_read; + block_length = PHP_OCI_LOB_BUFFER_SIZE; + + if (connection->errcode != OCI_NEED_DATA) { + break; + } + *data = erealloc(*data, *data_len + PHP_OCI_LOB_BUFFER_SIZE + 1); + } while (connection->errcode == OCI_NEED_DATA); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + efree(*data); + *data = NULL; + return 1; + } + + descriptor->lob_current_position += data_len_chars; + + if (descriptor->type == OCI_DTYPE_FILE) { + connection->errcode = PHP_OCI_CALL(OCILobFileClose, (connection->svc, connection->err, descriptor->descriptor)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + efree(*data); + *data = NULL; + return 1; + } + } + + *data = erealloc(*data, *data_len + 1); + (*data)[ *data_len ] = 0; + + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_write() + Write data to the LOB */ +int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data, int data_len, ub4 *bytes_written TSRMLS_DC) +{ + OCILobLocator *lob = (OCILobLocator *) descriptor->descriptor; + php_oci_connection *connection = (php_oci_connection *) descriptor->connection; + ub4 lob_length; + + *bytes_written = 0; + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + return 1; + } + + if (!data || data_len <= 0) { + return 0; + } + + if (offset < 0) { + offset = 0; + } + + if (offset > descriptor->lob_current_position) { + offset = descriptor->lob_current_position; + } + + connection->errcode = PHP_OCI_CALL(OCILobWrite, (connection->svc, connection->err, lob, (ub4 *)&data_len, (ub4) offset + 1, (dvoid *) data, (ub4) data_len, OCI_ONE_PIECE, (dvoid *)0, (OCICallbackLobWrite) 0, (ub2) 0, (ub1) SQLCS_IMPLICIT)); + + if (connection->errcode) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + *bytes_written = 0; + return 1; + } + *bytes_written = data_len; + descriptor->lob_current_position += data_len; + + if (descriptor->lob_current_position > descriptor->lob_size) { + descriptor->lob_size = descriptor->lob_current_position; + } + + /* marking buffer as used */ + if (descriptor->buffering == PHP_OCI_LOB_BUFFER_ENABLED) { + descriptor->buffering = PHP_OCI_LOB_BUFFER_USED; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_set_buffering() + Turn buffering off/onn for this particular LOB */ +int php_oci_lob_set_buffering (php_oci_descriptor *descriptor, int on_off TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + + if (!on_off && descriptor->buffering == PHP_OCI_LOB_BUFFER_DISABLED) { + /* disabling when it's already off */ + return 0; + } + + if (on_off && descriptor->buffering != PHP_OCI_LOB_BUFFER_DISABLED) { + /* enabling when it's already on */ + return 0; + } + + if (on_off) { + connection->errcode = PHP_OCI_CALL(OCILobEnableBuffering, (connection->svc, connection->err, descriptor->descriptor)); + } + else { + connection->errcode = PHP_OCI_CALL(OCILobDisableBuffering, (connection->svc, connection->err, descriptor->descriptor)); + } + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + descriptor->buffering = on_off ? PHP_OCI_LOB_BUFFER_ENABLED : PHP_OCI_LOB_BUFFER_DISABLED; + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_get_buffering() + Return current buffering state for the LOB */ +int php_oci_lob_get_buffering (php_oci_descriptor *descriptor TSRMLS_DC) +{ + if (descriptor->buffering != PHP_OCI_LOB_BUFFER_DISABLED) { + return 1; + } + else { + return 0; + } +} /* }}} */ + +/* {{{ php_oci_lob_copy() + Copy one LOB (or its part) to another one */ +int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor *descriptor_from, long length TSRMLS_DC) +{ + php_oci_connection *connection = descriptor_dest->connection; + int length_dest, length_from, copy_len; + + if (php_oci_lob_get_length(descriptor_dest, &length_dest TSRMLS_CC)) { + return 1; + } + + if (php_oci_lob_get_length(descriptor_from, &length_from TSRMLS_CC)) { + return 1; + } + + if (length == -1) { + copy_len = length_from - descriptor_from->lob_current_position; + } + else { + copy_len = length; + } + + if ((int)copy_len <= 0) { + /* silently fail, there is nothing to copy */ + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCILobCopy, (connection->svc, connection->err, descriptor_dest->descriptor, descriptor_from->descriptor, copy_len, descriptor_dest->lob_current_position+1, descriptor_from->lob_current_position+1)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_close() + Close LOB */ +int php_oci_lob_close (php_oci_descriptor *descriptor TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + int is_temporary; + + connection->errcode = PHP_OCI_CALL(OCILobClose, (connection->svc, connection->err, descriptor->descriptor)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCILobIsTemporary, (connection->env,connection->err, descriptor->descriptor, &is_temporary)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + if (is_temporary) { + + connection->errcode = PHP_OCI_CALL(OCILobFreeTemporary, (connection->svc, connection->err, descriptor->descriptor)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + } + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_flush() + Flush buffers for the LOB (only if they have been used) */ +int php_oci_lob_flush(php_oci_descriptor *descriptor, int flush_flag TSRMLS_DC) +{ + OCILobLocator *lob = descriptor->descriptor; + php_oci_connection *connection = descriptor->connection; + + if (!lob) { + return 1; + } + + switch (flush_flag) { + case 0: + case OCI_LOB_BUFFER_FREE: + /* only these two are allowed */ + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid flag value: %d", flush_flag); + return 1; + break; + } + + /* do not really flush buffer, but report success + * to suppress OCI error when flushing not used buffer + * */ + if (descriptor->buffering != PHP_OCI_LOB_BUFFER_USED) { + return 0; + } + + connection->errcode = PHP_OCI_CALL(OCILobFlushBuffer, (connection->svc, connection->err, lob, flush_flag)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + /* marking buffer as enabled and not used */ + descriptor->buffering = PHP_OCI_LOB_BUFFER_ENABLED; + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_free() + Close LOB descriptor and free associated resources */ +void php_oci_lob_free (php_oci_descriptor *descriptor TSRMLS_DC) +{ + + if (!descriptor || !descriptor->connection) { + return; + } + + if (descriptor->connection->descriptors) { + /* delete descriptor from the hash */ + zend_hash_apply_with_argument(descriptor->connection->descriptors, php_oci_descriptor_delete_from_hash, (void *)&descriptor->id TSRMLS_CC); + } + + /* flushing Lobs & Files with buffering enabled */ + if ((descriptor->type == OCI_DTYPE_FILE || descriptor->type == OCI_DTYPE_LOB) && descriptor->buffering == PHP_OCI_LOB_BUFFER_USED) { + php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE TSRMLS_CC); + } + + PHP_OCI_CALL(OCIDescriptorFree, (descriptor->descriptor, descriptor->type)); + + zend_list_delete(descriptor->connection->rsrc_id); + efree(descriptor); +} /* }}} */ + +/* {{{ php_oci_lob_import() + Import LOB contents from the given file */ +int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename TSRMLS_DC) +{ + int fp, loblen; + OCILobLocator *lob = (OCILobLocator *)descriptor->descriptor; + php_oci_connection *connection = descriptor->connection; + char buf[8192]; + ub4 offset = 1; + + if ((PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)) { + return 1; + } + + if ((fp = VCWD_OPEN(filename, O_RDONLY|O_BINARY)) == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't open file %s", filename); + return 1; + } + + while ((loblen = read(fp, &buf, sizeof(buf))) > 0) { + connection->errcode = PHP_OCI_CALL( + OCILobWrite, + ( + connection->svc, + connection->err, + lob, + &loblen, + (ub4) offset, + (dvoid *) &buf, + (ub4) loblen, + OCI_ONE_PIECE, + (dvoid *)0, + (OCICallbackLobWrite) 0, + (ub2) 0, + (ub1) SQLCS_IMPLICIT + ) + ); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + close(fp); + return 1; + } + offset += loblen; + } + close(fp); + + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_append() + Append data to the end of the LOB */ +int php_oci_lob_append (php_oci_descriptor *descriptor_dest, php_oci_descriptor *descriptor_from TSRMLS_DC) +{ + php_oci_connection *connection = descriptor_dest->connection; + OCILobLocator *lob_dest = descriptor_dest->descriptor; + OCILobLocator *lob_from = descriptor_from->descriptor; + ub4 dest_len, from_len; + + if (php_oci_lob_get_length(descriptor_dest, &dest_len TSRMLS_CC)) { + return 1; + } + + if (php_oci_lob_get_length(descriptor_from, &from_len TSRMLS_CC)) { + return 1; + } + + if (from_len <= 0) { + return 0; + } + + connection->errcode = PHP_OCI_CALL(OCILobAppend, (connection->svc, connection->err, lob_dest, lob_from)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_truncate() + Truncate LOB to the given length */ +int php_oci_lob_truncate (php_oci_descriptor *descriptor, long new_lob_length TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + OCILobLocator *lob = descriptor->descriptor; + ub4 lob_length; + + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + return 1; + } + + if (lob_length <= 0) { + return 0; + } + + if (new_lob_length < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Size must be greater than or equal to 0"); + return 1; + } + + if (new_lob_length > lob_length) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Size must be less than or equal to the current LOB size"); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCILobTrim, (connection->svc, connection->err, lob, new_lob_length)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + descriptor->lob_size = new_lob_length; + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_erase() + Erase (or fill with whitespaces, depending on LOB type) the LOB (or its part) */ +int php_oci_lob_erase (php_oci_descriptor *descriptor, long offset, long length, ub4 *bytes_erased TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + OCILobLocator *lob = descriptor->descriptor; + ub4 lob_length; + + *bytes_erased = 0; + + if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) { + return 1; + } + + if (offset == -1) { + offset = descriptor->lob_current_position; + } + + if (length == -1) { + length = lob_length; + } + + connection->errcode = PHP_OCI_CALL(OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, offset+1)); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + *bytes_erased = length; + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_is_equal() + Compare two LOB descriptors and figure out if they are pointing to the same LOB */ +int php_oci_lob_is_equal (php_oci_descriptor *descriptor_first, php_oci_descriptor *descriptor_second, boolean *result TSRMLS_DC) +{ + php_oci_connection *connection = descriptor_first->connection; + OCILobLocator *first_lob = descriptor_first->descriptor; + OCILobLocator *second_lob = descriptor_second->descriptor; + + connection->errcode = PHP_OCI_CALL(OCILobIsEqual, (connection->env, first_lob, second_lob, result)); + + if (connection->errcode) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + return 0; +} /* }}} */ + +/* {{{ php_oci_lob_write_tmp() + Create temporary LOB and write data to it */ +int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, ub1 type, char *data, int data_len TSRMLS_DC) +{ + php_oci_connection *connection = descriptor->connection; + OCILobLocator *lob = descriptor->descriptor; + ub4 bytes_written = 0; + + switch (type) { + case OCI_TEMP_BLOB: + case OCI_TEMP_CLOB: + /* only these two are allowed */ + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid temporary lob type: %d", type); + return 1; + break; + } + + if (!data || data_len <= 0) { + /* nothing to write, silently fail */ + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCILobCreateTemporary, (connection->svc, connection->err, lob, OCI_DEFAULT, OCI_DEFAULT, type, OCI_ATTR_NOCACHE, OCI_DURATION_SESSION)); + + if (connection->errcode) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + connection->errcode = PHP_OCI_CALL(OCILobOpen, (connection->svc, connection->err, lob, OCI_LOB_READWRITE)); + + if (connection->errcode) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return 1; + } + + return php_oci_lob_write(descriptor, 0, data, data_len, &bytes_written TSRMLS_CC); +} /* }}} */ + +#endif /* HAVE_OCI8 */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c new file mode 100644 index 000000000..b0543d736 --- /dev/null +++ b/ext/oci8/oci8_statement.c @@ -0,0 +1,1351 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Stig Sæther Bakken | + | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | + +----------------------------------------------------------------------+ +*/ + +/* $Id: oci8_statement.c,v 1.7.2.8 2006/01/01 12:50:10 sniper Exp $ */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "ext/standard/info.h" +#include "php_ini.h" + +#if HAVE_OCI8 + +#include "php_oci8.h" +#include "php_oci8_int.h" + +/* {{{ php_oci_statement_create() + Create statemend handle and allocate necessary resources */ +php_oci_statement *php_oci_statement_create (php_oci_connection *connection, char *query, long query_len, zend_bool cached TSRMLS_DC) +{ + php_oci_statement *statement; + + statement = ecalloc(1,sizeof(php_oci_statement)); + +#if HAVE_OCI_STMT_PREPARE2 + if (!query_len) { + /* do not allocate stmt handle for refcursors, we'll get it from OCIStmtPrepare2() */ + PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->stmt), OCI_HTYPE_STMT, 0, NULL)); + } +#else + PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->stmt), OCI_HTYPE_STMT, 0, NULL)); +#endif + + PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->err), OCI_HTYPE_ERROR, 0, NULL)); + + if (query_len > 0) { +#if HAVE_OCI_STMT_PREPARE2 + connection->errcode = PHP_OCI_CALL(OCIStmtPrepare2, (connection->svc, &(statement->stmt), connection->err, (text *)query, query_len, NULL, 0, OCI_NTV_SYNTAX, OCI_DEFAULT)); +#else + connection->errcode = PHP_OCI_CALL(OCIStmtPrepare, (statement->stmt, connection->err, (text *)query, query_len, OCI_NTV_SYNTAX, OCI_DEFAULT)); +#endif + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + +#if HAVE_OCI_STMT_PREPARE2 + PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, OCI_DEFAULT)); + PHP_OCI_CALL(OCIHandleFree,(statement->err, OCI_HTYPE_ERROR)); +#else + PHP_OCI_CALL(OCIHandleFree,(statement->stmt, OCI_HTYPE_STMT)); + PHP_OCI_CALL(OCIHandleFree,(statement->err, OCI_HTYPE_ERROR)); +#endif + + efree(statement); + PHP_OCI_HANDLE_ERROR(connection, connection->errcode); + return NULL; + } + } + + if (query && query_len) { + statement->last_query = estrndup(query, query_len); + statement->last_query_len = query_len; + } + else { + statement->last_query = NULL; + statement->last_query_len = 0; + } + + statement->connection = connection; + statement->has_data = 0; + + if (OCI_G(default_prefetch) > 0) { + php_oci_statement_set_prefetch(statement, OCI_G(default_prefetch) TSRMLS_CC); + } + + PHP_OCI_REGISTER_RESOURCE(statement, le_statement); + + return statement; +} +/* }}} */ + +/* {{{ php_oci_statement_set_prefetch() + Set prefetch buffer size for the statement (we're assuming that one row is ~1K sized) */ +int php_oci_statement_set_prefetch(php_oci_statement *statement, ub4 size TSRMLS_DC) +{ + ub4 prefetch = size * 1024; + + if (size < 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of rows has to be greater than or equal to 1"); + return 1; + } + + statement->errcode = PHP_OCI_CALL (OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_MEMORY, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + prefetch = size; + statement->errcode = PHP_OCI_CALL (OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_ROWS, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + return 0; +} +/* }}} */ + +/* {{{ php_oci_statement_fetch() + Fetch a row from the statement */ +int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC) +{ + int i; + php_oci_out_column *column; + + statement->errcode = PHP_OCI_CALL(OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); + + if ( statement->errcode == OCI_NO_DATA || nrows == 0 ) { + if (statement->last_query == NULL) { + /* reset define-list for refcursors */ + if (statement->columns) { + zend_hash_destroy(statement->columns); + efree(statement->columns); + statement->columns = NULL; + statement->ncolumns = 0; + } + statement->executed = 0; + } + + statement->errcode = 0; /* OCI_NO_DATA is NO error for us!!! */ + statement->has_data = 0; + + if (nrows == 0) { + /* this is exactly what we requested */ + return 0; + } + + return 1; + } + + /* reset length for all piecewise columns */ + for (i = 0; i < statement->ncolumns; i++) { + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + if (column->piecewise) { + column->retlen4 = 0; + } + } + + while (statement->errcode == OCI_NEED_DATA) { + for (i = 0; i < statement->ncolumns; i++) { + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + if (column->piecewise) { + if (!column->data) { + column->data = (text *) emalloc(PHP_OCI_PIECE_SIZE); + } else { + column->data = erealloc(column->data, column->retlen4 + PHP_OCI_PIECE_SIZE); + } + + column->cb_retlen = PHP_OCI_PIECE_SIZE; + + PHP_OCI_CALL( OCIStmtSetPieceInfo, ((void *) column->oci_define, OCI_HTYPE_DEFINE, statement->err, ((char*)column->data) + column->retlen4, &(column->cb_retlen), OCI_NEXT_PIECE, &column->indicator, &column->retcode)); + } + } + + statement->errcode = PHP_OCI_CALL( OCIStmtFetch, (statement->stmt, statement->err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT)); + + for (i = 0; i < statement->ncolumns; i++) { + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + if (column && column->piecewise) { + column->retlen4 += column->cb_retlen; + } + } + } + + if (statement->errcode == OCI_SUCCESS_WITH_INFO || statement->errcode == OCI_SUCCESS) { + statement->has_data = 1; + + /* do the stuff needed for OCIDefineByName */ + for (i = 0; i < statement->ncolumns; i++) { + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + if (column == NULL) { + continue; + } + + if (!column->define) { + continue; + } + + zval_dtor(column->define->zval); + php_oci_column_to_zval(column, column->define->zval, 0 TSRMLS_CC); + } + + return 0; + } + + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + + statement->has_data = 0; + + return 1; +} +/* }}} */ + +/* {{{ php_oci_statement_get_column() + Get column from the result set */ +php_oci_out_column *php_oci_statement_get_column(php_oci_statement *statement, long column_index, char *column_name, long column_name_len TSRMLS_DC) +{ + php_oci_out_column *column = NULL; + int i; + + if (statement->columns == NULL) { /* we release the columns at the end of a fetch */ + return NULL; + } + + if (column_name) { + for (i = 0; i < statement->ncolumns; i++) { + column = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC); + if (column == NULL) { + continue; + } else if (((int) column->name_len == column_name_len) && (!strncmp(column->name, column_name, column_name_len))) { + return column; + } + } + } else if (column_index != -1) { + if (zend_hash_index_find(statement->columns, column_index, (void **)&column) == FAILURE) { + return NULL; + } + return column; + } + + return NULL; +} +/* }}} */ + +/* {{{ php_oci_statement_execute() + Execute statement */ +int php_oci_statement_execute(php_oci_statement *statement, ub4 mode TSRMLS_DC) +{ + php_oci_out_column *outcol; + php_oci_out_column column; + OCIParam *param = NULL; + text *colname; + ub4 counter; + ub2 define_type; + ub4 iters; + ub4 colcount; + ub2 dynamic; + int dtype; + dvoid *buf; + php_oci_descriptor *descr; + + switch (mode) { + case OCI_COMMIT_ON_SUCCESS: + case OCI_DEFAULT: + /* only these two are allowed */ + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid execute mode given: %d", mode); + return 1; + break; + } + + if (!statement->stmttype) { + /* get statement type */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement->stmttype, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + } + + if (statement->stmttype == OCI_STMT_SELECT) { + iters = 0; + } else { + iters = 1; + } + + if (statement->last_query) { + /* if we execute refcursors we don't have a query and + we don't want to execute!!! */ + + if (statement->binds) { + zend_hash_apply(statement->binds, (apply_func_t) php_oci_bind_pre_exec TSRMLS_CC); + } + + /* execute statement */ + statement->errcode = PHP_OCI_CALL(OCIStmtExecute, (statement->connection->svc, statement->stmt, statement->err, iters, 0, NULL, NULL, mode)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + if (statement->binds) { + zend_hash_apply(statement->binds, (apply_func_t) php_oci_bind_post_exec TSRMLS_CC); + } + + if (mode & OCI_COMMIT_ON_SUCCESS) { + statement->connection->needs_commit = 0; + } else { + statement->connection->needs_commit = 1; + } + } + + if (statement->stmttype == OCI_STMT_SELECT && statement->executed == 0) { + /* we only need to do the define step is this very statement is executed the first time! */ + statement->executed = 1; + + ALLOC_HASHTABLE(statement->columns); + zend_hash_init(statement->columns, 13, NULL, php_oci_column_hash_dtor, 0); + + counter = 1; + + /* get number of columns */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *)&colcount, (ub4 *)0, OCI_ATTR_PARAM_COUNT, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + statement->ncolumns = colcount; + + for (counter = 1; counter <= colcount; counter++) { + memset(&column,0,sizeof(php_oci_out_column)); + + if (zend_hash_index_update(statement->columns, counter, &column, sizeof(php_oci_out_column), (void**) &outcol) == FAILURE) { + efree(statement->columns); + /* out of memory */ + return 1; + } + + outcol->statement = statement; + + /* get column */ + statement->errcode = PHP_OCI_CALL(OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)¶m, counter)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + /* get column datatype */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->data_type, (ub4 *)0, OCI_ATTR_DATA_TYPE, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + /* get size of the column */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->data_size, (dvoid *)0, OCI_ATTR_DATA_SIZE, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + outcol->storage_size4 = outcol->data_size; + outcol->retlen = outcol->data_size; + + /* get scale of the column */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->scale, (dvoid *)0, OCI_ATTR_SCALE, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + /* get precision of the column */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->precision, (dvoid *)0, OCI_ATTR_PRECISION, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + /* get name of the column */ + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid **)&colname, (ub4 *)&outcol->name_len, (ub4)OCI_ATTR_NAME, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); + + outcol->name = estrndup((char*) colname, outcol->name_len); + + /* find a user-setted define */ + if (statement->defines) { + zend_hash_find(statement->defines,outcol->name,outcol->name_len,(void **) &outcol->define); + } + + buf = 0; + switch (outcol->data_type) { + case SQLT_RSET: + outcol->statement = php_oci_statement_create(statement->connection, NULL, 0, 0 TSRMLS_CC); + outcol->stmtid = outcol->statement->id; + + define_type = SQLT_RSET; + outcol->is_cursor = 1; + outcol->storage_size4 = -1; + outcol->retlen = -1; + dynamic = OCI_DEFAULT; + buf = &(outcol->statement->stmt); + break; + + case SQLT_RDD: /* ROWID */ + case SQLT_BLOB: /* binary LOB */ + case SQLT_CLOB: /* character LOB */ + case SQLT_BFILE: /* binary file LOB */ + define_type = outcol->data_type; + outcol->is_descr = 1; + outcol->storage_size4 = -1; + dynamic = OCI_DEFAULT; + + if (outcol->data_type == SQLT_BFILE) { + dtype = OCI_DTYPE_FILE; + } else if (outcol->data_type == SQLT_RDD ) { + dtype = OCI_DTYPE_ROWID; + } else { + dtype = OCI_DTYPE_LOB; + } + + descr = php_oci_lob_create(statement->connection, dtype TSRMLS_CC); + if (!descr) { + efree(outcol->name); + return 1; + } + outcol->descid = descr->id; + buf = &(descr->descriptor); + break; + + case SQLT_LNG: + case SQLT_LBI: + if (outcol->data_type == SQLT_LBI) { + define_type = SQLT_BIN; + } else { + define_type = SQLT_CHR; + } + outcol->storage_size4 = PHP_OCI_MAX_DATA_SIZE; + outcol->piecewise = 1; + dynamic = OCI_DYNAMIC_FETCH; + break; + + case SQLT_BIN: + default: + define_type = SQLT_CHR; + if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM) +#ifdef SQLT_TIMESTAMP + || (outcol->data_type == SQLT_TIMESTAMP) +#endif +#ifdef SQLT_TIMESTAMP_TZ + || (outcol->data_type == SQLT_TIMESTAMP_TZ) +#endif + ) { + outcol->storage_size4 = 512; /* XXX this should fit "most" NLS date-formats and Numbers */ + } else { + outcol->storage_size4++; /* add one for string terminator */ + } + + outcol->storage_size4 *= 3; + + dynamic = OCI_DEFAULT; + buf = outcol->data = (text *) emalloc(outcol->storage_size4); + break; + } + + if (dynamic == OCI_DYNAMIC_FETCH) { + statement->errcode = PHP_OCI_CALL( + OCIDefineByPos, + ( + statement->stmt, /* IN/OUT handle to the requested SQL query */ + (OCIDefine **)&outcol->oci_define, /* IN/OUT pointer to a pointer to a define handle */ + statement->err, /* IN/OUT An error handle */ + counter, /* IN position in the select list */ + (dvoid *)NULL, /* IN/OUT pointer to a buffer */ + outcol->storage_size4, /* IN The size of each valuep buffer in bytes */ + define_type, /* IN The data type */ + (dvoid *)&outcol->indicator, /* IN pointer to an indicator variable or arr */ + (ub2 *)NULL, /* IN/OUT Pointer to array of length of data fetched */ + (ub2 *)NULL, /* OUT Pointer to array of column-level return codes */ + OCI_DYNAMIC_FETCH /* IN mode (OCI_DEFAULT, OCI_DYNAMIC_FETCH) */ + ) + ); + + } else { + statement->errcode = PHP_OCI_CALL( + OCIDefineByPos, + ( + statement->stmt, /* IN/OUT handle to the requested SQL query */ + (OCIDefine **)&outcol->oci_define, /* IN/OUT pointer to a pointer to a define handle */ + statement->err, /* IN/OUT An error handle */ + counter, /* IN position in the select list */ + (dvoid *)buf, /* IN/OUT pointer to a buffer */ + outcol->storage_size4, /* IN The size of each valuep buffer in bytes */ + define_type, /* IN The data type */ + (dvoid *)&outcol->indicator, /* IN pointer to an indicator variable or arr */ + (ub2 *)&outcol->retlen, /* IN/OUT Pointer to array of length of data fetched */ + (ub2 *)&outcol->retcode, /* OUT Pointer to array of column-level return codes */ + OCI_DEFAULT /* IN mode (OCI_DEFAULT, OCI_DYNAMIC_FETCH) */ + ) + ); + + } + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 0; + } + } + } + + return 0; +} +/* }}} */ + +/* {{{ php_oci_statement_cancel() + Cancel statement */ +int php_oci_statement_cancel(php_oci_statement *statement TSRMLS_DC) +{ + + return php_oci_statement_fetch(statement, 0 TSRMLS_CC); + +} /* }}} */ + +/* {{{ php_oci_statement_free() + Destroy statement handle and free associated resources */ +void php_oci_statement_free(php_oci_statement *statement TSRMLS_DC) +{ + if (statement->stmt) { +#if HAVE_OCI_STMT_PREPARE2 + if (statement->last_query_len) { /* FIXME: magical */ + PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, statement->err, NULL, 0, OCI_DEFAULT)); + } + else { + PHP_OCI_CALL(OCIHandleFree, (statement->stmt, OCI_HTYPE_STMT)); + } +#else + PHP_OCI_CALL(OCIHandleFree, (statement->stmt, OCI_HTYPE_STMT)); +#endif + statement->stmt = 0; + } + + if (statement->err) { + PHP_OCI_CALL(OCIHandleFree, (statement->err, OCI_HTYPE_ERROR)); + statement->err = 0; + } + + if (statement->last_query) { + efree(statement->last_query); + } + + if (statement->columns) { + zend_hash_destroy(statement->columns); + efree(statement->columns); + } + + if (statement->binds) { + zend_hash_destroy(statement->binds); + efree(statement->binds); + } + + if (statement->defines) { + zend_hash_destroy(statement->defines); + efree(statement->defines); + } + + zend_list_delete(statement->connection->rsrc_id); + efree(statement); +} /* }}} */ + +/* {{{ php_oci_bind_pre_exec() + Helper function */ +int php_oci_bind_pre_exec(void *data TSRMLS_DC) +{ + php_oci_bind *bind = (php_oci_bind *) data; + + /* reset all bind stuff to a normal state..-. */ + + bind->indicator = 0; + + return 0; +} +/* }}} */ + +/* {{{ php_oci_bind_post_exec() + Helper function */ +int php_oci_bind_post_exec(void *data TSRMLS_DC) +{ + php_oci_bind *bind = (php_oci_bind *) data; + php_oci_connection *connection = bind->parent_statement->connection; + + if (bind->indicator == -1) { /* NULL */ + zval *val = bind->zval; + if (Z_TYPE_P(val) == IS_STRING) { + *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */ + } + zval_dtor(val); + ZVAL_NULL(val); + } else if (Z_TYPE_P(bind->zval) == IS_STRING && Z_STRLEN_P(bind->zval) > 0) { + 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) { + int i; + zval **entry; + HashTable *hash = HASH_OF(bind->zval); + + switch (bind->array.type) { + case SQLT_NUM: + case SQLT_INT: + case SQLT_LNG: + for (i = 0; i < bind->array.current_length; i++) { + if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + zval_dtor(*entry); + ZVAL_LONG(*entry, ((ub4 *)(bind->array.elements))[i]); + zend_hash_move_forward(hash); + } + else { + add_next_index_long(bind->zval, ((ub4 *)(bind->array.elements))[i]); + } + } + break; + case SQLT_FLT: + for (i = 0; i < bind->array.current_length; i++) { + if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + zval_dtor(*entry); + ZVAL_DOUBLE(*entry, ((double *)(bind->array.elements))[i]); + zend_hash_move_forward(hash); + } + else { + add_next_index_double(bind->zval, ((double *)(bind->array.elements))[i]); + } + } + break; + case SQLT_ODT: + for (i = 0; i < bind->array.current_length; i++) { + char buff[1024]; + int buff_len = 1024; + + memset((void*)buff,0,sizeof(buff)); + + if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + connection->errcode = PHP_OCI_CALL(OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff)); + zval_dtor(*entry); + + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + ZVAL_NULL(*entry); + } + else { + ZVAL_STRINGL(*entry, buff, buff_len, 1); + } + zend_hash_move_forward(hash); + } + else { + connection->errcode = PHP_OCI_CALL(OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff)); + if (connection->errcode != OCI_SUCCESS) { + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + add_next_index_null(bind->zval); + } + else { + add_next_index_stringl(bind->zval, buff, buff_len, 1); + } + } + } + break; + + case SQLT_AFC: + case SQLT_CHR: + case SQLT_VCS: + case SQLT_AVC: + case SQLT_STR: + case SQLT_LVC: + for (i = 0; i < bind->array.current_length; i++) { + int curr_element_length = strlen(((text *)bind->array.elements)+i*bind->array.max_length); + if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + zval_dtor(*entry); + ZVAL_STRINGL(*entry, ((text *)bind->array.elements)+i*bind->array.max_length, curr_element_length, 1); + zend_hash_move_forward(hash); + } + else { + add_next_index_stringl(bind->zval, ((text *)bind->array.elements)+i*bind->array.max_length, curr_element_length, 1); + } + } + break; + } + } + + return 0; +} +/* }}} */ + +/* {{{ php_oci_bind_by_name() + Bind zval to the given placeholder */ +int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long maxlength, long type TSRMLS_DC) +{ + php_oci_collection *bind_collection = NULL; + php_oci_descriptor *bind_descriptor = NULL; + php_oci_statement *bind_statement = NULL; + dvoid *oci_desc = NULL; + /* dvoid *php_oci_collection = NULL; */ + OCIStmt *oci_stmt = NULL; + dvoid *bind_data = NULL; + php_oci_bind bind, *bindp; + int mode = OCI_DATA_AT_EXEC; + sb4 value_sz = -1; + + switch (type) { +#ifdef PHP_OCI8_HAVE_COLLECTIONS + case SQLT_NTY: + { + zval **tmp; + + if (Z_TYPE_P(var) != IS_OBJECT || zend_hash_find(Z_OBJPROP_P(var), "collection", sizeof("collection"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find collection property"); + return 1; + } + + PHP_OCI_ZVAL_TO_COLLECTION_EX(*tmp, bind_collection); + value_sz = sizeof(void*); + mode = OCI_DEFAULT; + + if (!bind_collection->collection) { + return 1; + } + } + break; +#endif + case SQLT_BFILEE: + case SQLT_CFILEE: + case SQLT_CLOB: + case SQLT_BLOB: + case SQLT_RDD: + { + zval **tmp; + + if (Z_TYPE_P(var) != IS_OBJECT || zend_hash_find(Z_OBJPROP_P(var), "descriptor", sizeof("descriptor"), (void **)&tmp) == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find descriptor property"); + return 1; + } + + PHP_OCI_ZVAL_TO_DESCRIPTOR_EX(*tmp, bind_descriptor); + + value_sz = sizeof(void*); + + oci_desc = bind_descriptor->descriptor; + + if (!oci_desc) { + return 1; + } + } + break; + + case SQLT_INT: + case SQLT_NUM: + convert_to_long(var); + bind_data = (ub4 *)&Z_LVAL_P(var); + value_sz = sizeof(ub4); + mode = OCI_DEFAULT; + break; + + case SQLT_CHR: + /* this is the default case when type was not specified */ + convert_to_string(var); + if (maxlength == -1) { + value_sz = Z_STRLEN_P(var); + } + else { + value_sz = maxlength; + } + break; + + case SQLT_RSET: + PHP_OCI_ZVAL_TO_STATEMENT_EX(var, bind_statement); + value_sz = sizeof(void*); + + oci_stmt = bind_statement->stmt; + + if (!oci_stmt) { + return 1; + } + break; + + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %ld", type); + return 1; + break; + } + + if (value_sz == 0) { + value_sz = 1; + } + + if (!statement->binds) { + ALLOC_HASHTABLE(statement->binds); + zend_hash_init(statement->binds, 13, NULL, php_oci_bind_hash_dtor, 0); + } + + memset((void*)&bind,0,sizeof(php_oci_bind)); + zend_hash_update(statement->binds, name, name_len + 1, &bind, sizeof(php_oci_bind), (void **)&bindp); + + bindp->descriptor = oci_desc; + bindp->statement = oci_stmt; + bindp->parent_statement = statement; + bindp->zval = var; + zval_add_ref(&var); + + statement->errcode = PHP_OCI_CALL( + OCIBindByName, + ( + statement->stmt, /* statement handle */ + (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */ + statement->err, /* error handle */ + (text*) name, /* placeholder name */ + name_len, /* placeholder length */ + (dvoid *)bind_data, /* in/out data */ + value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */ + (ub2)type, /* in/out data type */ + (dvoid *)&bindp->indicator, /* indicator (ignored) */ + (ub2 *)0, /* size array (ignored) */ + (ub2 *)&bindp->retcode, /* return code (ignored) */ + (ub4)0, /* maxarr_len (PL/SQL only?) */ + (ub4 *)0, /* actual array size (PL/SQL only?) */ + mode /* mode */ + ) + ); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + if (mode == OCI_DATA_AT_EXEC) { + statement->errcode = PHP_OCI_CALL(OCIBindDynamic, (bindp->bind, statement->err, (dvoid *)bindp, php_oci_bind_in_callback, (dvoid *)bindp, php_oci_bind_out_callback)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + } + +#ifdef PHP_OCI8_HAVE_COLLECTIONS + if (type == SQLT_NTY) { + /* Bind object */ + statement->errcode = PHP_OCI_CALL(OCIBindObject, (bindp->bind, statement->err, bind_collection->tdo, (dvoid **) &(bind_collection->collection), (ub4 *) 0, (dvoid **) 0, (ub4 *) 0)); + + if (statement->errcode) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + } +#endif + + return 0; +} /* }}} */ + +/* {{{ php_oci_bind_in_callback() + Callback used when binding LOBs and VARCHARs */ +sb4 php_oci_bind_in_callback( + dvoid *ictxp, /* context pointer */ + OCIBind *bindp, /* bind handle */ + ub4 iter, /* 0-based execute iteration value */ + ub4 index, /* index of current array for PL/SQL or row index for SQL */ + dvoid **bufpp, /* pointer to data */ + ub4 *alenp, /* size after value/piece has been read */ + ub1 *piecep, /* which piece */ + dvoid **indpp) /* indicator value */ +{ + php_oci_bind *phpbind; + zval *val; + TSRMLS_FETCH(); + + if (!(phpbind=(php_oci_bind *)ictxp) || !(val = phpbind->zval)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid phpbind pointer value"); + return OCI_ERROR; + } + + if (ZVAL_IS_NULL(val)) { + /* we're going to insert a NULL column */ + phpbind->indicator = -1; + *bufpp = 0; + *alenp = -1; + *indpp = (dvoid *)&phpbind->indicator; + } else if ((phpbind->descriptor == 0) && (phpbind->statement == 0)) { + /* "normal string bind */ + convert_to_string(val); + + *bufpp = Z_STRVAL_P(val); + *alenp = Z_STRLEN_P(val); + *indpp = (dvoid *)&phpbind->indicator; + } else if (phpbind->statement != 0) { + /* RSET */ + *bufpp = phpbind->statement; + *alenp = -1; /* seems to be allright */ + *indpp = (dvoid *)&phpbind->indicator; + } else { + /* descriptor bind */ + *bufpp = phpbind->descriptor; + *alenp = -1; /* seems to be allright */ + *indpp = (dvoid *)&phpbind->indicator; + } + + *piecep = OCI_ONE_PIECE; /* pass all data in one go */ + + return OCI_CONTINUE; +}/* }}} */ + +/* {{{ php_oci_bind_out_callback() + Callback used when binding LOBs and VARCHARs */ +sb4 php_oci_bind_out_callback( + dvoid *octxp, /* context pointer */ + OCIBind *bindp, /* bind handle */ + ub4 iter, /* 0-based execute iteration value */ + ub4 index, /* index of current array for PL/SQL or row index for SQL */ + dvoid **bufpp, /* pointer to data */ + ub4 **alenpp, /* size after value/piece has been read */ + ub1 *piecep, /* which piece */ + dvoid **indpp, /* indicator value */ + ub2 **rcodepp) /* return code */ +{ + php_oci_bind *phpbind; + zval *val; + sb4 retval = OCI_ERROR; + TSRMLS_FETCH(); + + if (!(phpbind=(php_oci_bind *)octxp) || !(val = phpbind->zval)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid phpbind pointer value"); + return retval; + } + + if ((Z_TYPE_P(val) == IS_OBJECT) || (Z_TYPE_P(val) == IS_RESOURCE)) { + retval = OCI_CONTINUE; + } else { + convert_to_string(val); + zval_dtor(val); + + Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */ + Z_STRVAL_P(val) = emalloc(Z_STRLEN_P(phpbind->zval)); + + /* XXX we assume that zend-zval len has 4 bytes */ + *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval); + *bufpp = Z_STRVAL_P(phpbind->zval); + *piecep = OCI_ONE_PIECE; + *rcodepp = &phpbind->retcode; + *indpp = &phpbind->indicator; + retval = OCI_CONTINUE; + } + + return retval; +} +/* }}} */ + +/* {{{ php_oci_statement_get_column_helper() + Helper function to get column by name and index */ +php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS) +{ + zval *z_statement, *column_index; + php_oci_statement *statement; + php_oci_out_column *column; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &z_statement, &column_index) == FAILURE) { + return NULL; + } + + statement = (php_oci_statement *) zend_fetch_resource(&z_statement TSRMLS_CC, -1, "oci8 statement", NULL, 1, le_statement); + + if (!statement) { + return NULL; + } + + if (Z_TYPE_P(column_index) == IS_STRING) { + column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), Z_STRLEN_P(column_index) TSRMLS_CC); + if (!column) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column name \"%s\"", Z_STRVAL_P(column_index)); + return NULL; + } + } + else { + convert_to_long(column_index); + column = php_oci_statement_get_column(statement, Z_LVAL_P(column_index), NULL, 0 TSRMLS_CC); + if (!column) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column index \"%ld\"", Z_LVAL_P(column_index)); + return NULL; + } + } + return column; +} /* }}} */ + +/* {{{ php_oci_statement_get_type() + Return type of the statement */ +int php_oci_statement_get_type(php_oci_statement *statement, ub2 *type TSRMLS_DC) +{ + ub2 statement_type; + + *type = 0; + + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement_type, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + *type = statement_type; + + return 0; +} /* }}} */ + +/* {{{ php_oci_statement_get_numrows() + Get the number of rows fetched to the clientside (NOT the number of rows in the result set) */ +int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows TSRMLS_DC) +{ + ub4 statement_numrows; + + *numrows = 0; + + statement->errcode = PHP_OCI_CALL(OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub4 *)&statement_numrows, (ub4 *)0, OCI_ATTR_ROW_COUNT, statement->err)); + + if (statement->errcode != OCI_SUCCESS) { + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + + *numrows = statement_numrows; + + return 0; +} /* }}} */ + +/* {{{ php_oci_bind_array_by_name() + Bind arrays to PL/SQL types */ +int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long max_table_length, long maxlength, long type TSRMLS_DC) +{ + php_oci_bind *bind, *bindp; + + convert_to_array(var); + + if (maxlength < -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid max length value (%ld)", maxlength); + return 1; + } + + switch(type) { + case SQLT_NUM: + case SQLT_INT: + case SQLT_LNG: + bind = php_oci_bind_array_helper_number(var, max_table_length TSRMLS_CC); + break; + + case SQLT_FLT: + bind = php_oci_bind_array_helper_double(var, max_table_length TSRMLS_CC); + break; + + case SQLT_AFC: + case SQLT_CHR: + case SQLT_VCS: + case SQLT_AVC: + case SQLT_STR: + case SQLT_LVC: + if (maxlength == -1 && zend_hash_num_elements(Z_ARRVAL_P(var)) == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must provide max length value for empty arrays"); + return 1; + } + bind = php_oci_bind_array_helper_string(var, max_table_length, maxlength TSRMLS_CC); + break; + case SQLT_ODT: + bind = php_oci_bind_array_helper_date(var, max_table_length, statement->connection TSRMLS_CC); + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %ld", type); + return 1; + break; + } + + if (bind == NULL) { + /* failed to generate bind struct */ + return 1; + } + + if (!statement->binds) { + ALLOC_HASHTABLE(statement->binds); + zend_hash_init(statement->binds, 13, NULL, php_oci_bind_hash_dtor, 0); + } + + zend_hash_update(statement->binds, name, name_len + 1, bind, sizeof(php_oci_bind), (void **)&bindp); + + bindp->descriptor = NULL; + bindp->statement = NULL; + bindp->parent_statement = statement; + bindp->bind = NULL; + bindp->zval = var; + bindp->array.type = type; + zval_add_ref(&var); + + statement->errcode = PHP_OCI_CALL( + OCIBindByName, + ( + statement->stmt, + (OCIBind **)&bindp->bind, + statement->err, + (text *)name, + name_len, + (dvoid *) bindp->array.elements, + (sb4) bind->array.max_length, + type, + (dvoid *)0, /* bindp->array.indicators, */ + (ub2 *)0, /* bindp->array.element_lengths, */ + (ub2 *)0, /* bindp->array.retcodes, */ + (ub4) max_table_length, + (ub4 *) &(bindp->array.current_length), + (ub4) OCI_DEFAULT + ) + ); + + + if (statement->errcode != OCI_SUCCESS) { + efree(bind); + php_oci_error(statement->err, statement->errcode TSRMLS_CC); + PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); + return 1; + } + efree(bind); + return 0; +} /* }}} */ + +/* {{{ php_oci_bind_array_helper_string() + Bind arrays to PL/SQL types */ +php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length, long maxlength TSRMLS_DC) +{ + php_oci_bind *bind; + ub4 i; + HashTable *hash; + zval **entry; + + hash = HASH_OF(var); + + if (maxlength == -1) { + zend_hash_internal_pointer_reset(hash); + while (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE) { + convert_to_string_ex(entry); + if (Z_STRLEN_PP(entry) > maxlength) { + maxlength = Z_STRLEN_PP(entry) + 1; + } + zend_hash_move_forward(hash); + } + } + + bind = emalloc(sizeof(php_oci_bind)); + bind->array.elements = (text *)ecalloc(1, max_table_length * sizeof(text) * (maxlength + 1)); + bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); + bind->array.old_length = bind->array.current_length; + bind->array.max_length = maxlength; + + zend_hash_internal_pointer_reset(hash); + for (i = 0; i < max_table_length; i++) { + if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + int element_length; + + convert_to_string_ex(entry); + element_length = (maxlength > Z_STRLEN_PP(entry)) ? Z_STRLEN_PP(entry) : maxlength; + + memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_PP(entry), element_length); + ((text *)bind->array.elements)[i*maxlength + element_length] = '\0'; + + zend_hash_move_forward(hash); + } + else { + ((text *)bind->array.elements)[i*maxlength] = '\0'; + } + } + zend_hash_internal_pointer_reset(hash); + + return bind; +} /* }}} */ + +/* {{{ php_oci_bind_array_helper_number() + Bind arrays to PL/SQL types */ +php_oci_bind *php_oci_bind_array_helper_number(zval* var, long max_table_length TSRMLS_DC) +{ + php_oci_bind *bind; + ub4 i; + HashTable *hash; + zval **entry; + + hash = HASH_OF(var); + + bind = emalloc(sizeof(php_oci_bind)); + bind->array.elements = (ub4 *)emalloc(max_table_length * sizeof(ub4)); + bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); + bind->array.old_length = bind->array.current_length; + bind->array.max_length = sizeof(ub4); + + zend_hash_internal_pointer_reset(hash); + for (i = 0; i < max_table_length; i++) { + if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + convert_to_long_ex(entry); + ((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_PP(entry); + zend_hash_move_forward(hash); + } + else { + ((ub4 *)bind->array.elements)[i] = 0; + } + } + zend_hash_internal_pointer_reset(hash); + + return bind; +} /* }}} */ + +/* {{{ php_oci_bind_array_helper_double() + Bind arrays to PL/SQL types */ +php_oci_bind *php_oci_bind_array_helper_double(zval* var, long max_table_length TSRMLS_DC) +{ + php_oci_bind *bind; + ub4 i; + HashTable *hash; + zval **entry; + + hash = HASH_OF(var); + + bind = emalloc(sizeof(php_oci_bind)); + bind->array.elements = (double *)emalloc(max_table_length * sizeof(double)); + bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); + bind->array.old_length = bind->array.current_length; + bind->array.max_length = sizeof(double); + + zend_hash_internal_pointer_reset(hash); + for (i = 0; i < max_table_length; i++) { + if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + convert_to_double_ex(entry); + ((double *)bind->array.elements)[i] = (double) Z_DVAL_PP(entry); + zend_hash_move_forward(hash); + } + else { + ((double *)bind->array.elements)[i] = 0; + } + } + zend_hash_internal_pointer_reset(hash); + + return bind; +} /* }}} */ + +/* {{{ php_oci_bind_array_helper_date() + Bind arrays to PL/SQL types */ +php_oci_bind *php_oci_bind_array_helper_date(zval* var, long max_table_length, php_oci_connection *connection TSRMLS_DC) +{ + php_oci_bind *bind; + ub4 i; + HashTable *hash; + zval **entry; + + hash = HASH_OF(var); + + bind = emalloc(sizeof(php_oci_bind)); + bind->array.elements = (OCIDate *)emalloc(max_table_length * sizeof(OCIDate)); + bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var)); + bind->array.old_length = bind->array.current_length; + bind->array.max_length = sizeof(OCIDate); + + zend_hash_internal_pointer_reset(hash); + for (i = 0; i < max_table_length; i++) { + OCIDate oci_date; + if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) { + + convert_to_string_ex(entry); + connection->errcode = PHP_OCI_CALL(OCIDateFromText, (connection->err, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, 0, NULL, 0, &oci_date)); + + if (connection->errcode != OCI_SUCCESS) { + /* failed to convert string to date */ + efree(bind->array.elements); + efree(bind); + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return NULL; + } + + ((OCIDate *)bind->array.elements)[i] = oci_date; + zend_hash_move_forward(hash); + } + else { + connection->errcode = PHP_OCI_CALL(OCIDateFromText, (connection->err, "01-JAN-00", sizeof("01-JAN-00")-1, NULL, 0, NULL, 0, &oci_date)); + + if (connection->errcode != OCI_SUCCESS) { + /* failed to convert string to date */ + efree(bind->array.elements); + efree(bind); + php_oci_error(connection->err, connection->errcode TSRMLS_CC); + return NULL; + } + + ((OCIDate *)bind->array.elements)[i] = oci_date; + } + } + zend_hash_internal_pointer_reset(hash); + + return bind; +} /* }}} */ + +#endif /* HAVE_OCI8 */ diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index b0b168a02..ce9ff36ff 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -2,84 +2,200 @@ oci8 - Oracle 8 call interface functions + OCI8 functions tony2001 Antony Dovgal tony2001@php.net - developer + lead - ssb - Stig Bakken - ssb@php.net - developer + wez + Wez Furlong + wez@php.net + lead - thies - Thies C. Arntzen - thies@php.net - developer - - - asautins - Andy Sautins - asautins@php.net - developer - - - dbenson - David Benson - dbenson@php.net - developer - - - maxim - Maxim Maletsky - maxim@php.net - developer - - - phanto - Harald Radi - phanto@php.net - developer + andi + Andi Gutmans + andi@zend.com + lead -These functions allow you to access Oracle database servers using -the Oracle 8 call interface. + These functions allow you to access Oracle database servers using + the Oracle Call Interface (OCI8). PHP beta - 5.0.0rc1 - 2004-03-19 + 1.2 + 2005-??-?? -package.xml added to support intallation using pear installer + Fixed PECL bug #5571 (oci_new_connect() not closed by oci_close()) + Fixed bug #33383 (crash when retrieving empty BLOBs) - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + beta + 1.1.1 + 2005-09-22 + + Fixed segfault when binding empty values. + Fixed problem with oci_error() without arguments. + + + + beta + 1.1 + 2005-09-07 + + This release fixes a huge amount of bugs and adds support of + statement caching, external credentials etc. + See official announce for details. + + + + beta + 1.0 + 2004-03-19 + + package.xml added to support installation using pear installer + + + + diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index b9ddd3435..1e7cb6275 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -2,39 +2,34 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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: Stig Sæther Bakken | | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: php_oci8.h,v 1.36 2005/08/03 14:07:33 sniper Exp $ */ +/* $Id: php_oci8.h,v 1.36.2.2 2006/01/01 12:50:10 sniper Exp $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_H # define PHP_OCI8_H -# endif - -# if (defined(__osf__) && defined(__alpha)) -# ifndef A_OSF -# define A_OSF -# endif -# ifndef OSF1 -# define OSF1 -# endif -# ifndef _INTRINSICS -# define _INTRINSICS -# endif -# endif /* osf alpha */ #ifdef PHP_WIN32 #define PHP_OCI_API __declspec(dllexport) @@ -42,175 +37,21 @@ #define PHP_OCI_API #endif -#if defined(min) -#undef min -#endif -#if defined(max) -#undef max -#endif - -#include - -#define OCI_SEEK_SET 0 -#define OCI_SEEK_CUR 1 -#define OCI_SEEK_END 2 - -typedef struct { - int num; - int persistent; - int is_open; - char *dbname; - OCIServer *pServer; -#if 0 - OCIFocbkStruct failover; -#endif -} oci_server; - -typedef struct { - int num; - zend_bool persistent; - zend_bool is_open; - zend_bool exclusive; -#if ZTS - THREAD_T thread; -#else - zend_bool thread; +#ifdef ZTS +# include "TSRM.h" #endif - zend_llist *sessions_list; - oci_server *server; - OCISession *pSession; - OCIEnv *pEnv; /* sessions own environment */ - ub2 charsetId; /* sessions used character set (mostly this will be 0, so NLS_LANG will be used. */ -} oci_session; - -typedef struct { - int id; - int is_open; - oci_session *session; - OCISvcCtx *pServiceContext; - sword error; - OCIError *pError; - int needs_commit; - HashTable *descriptors; -} oci_connection; - -typedef struct { - int id; - oci_connection *conn; - dvoid *ocidescr; - ub4 type; - int lob_current_position; - int lob_size; /* -1 = Lob wasn't initialized yet */ - int buffering; /* 0 - off, 1 - on, 2 - on and buffer was used */ -} oci_descriptor; - -typedef struct { - int id; - oci_connection *conn; - OCIType *tdo; - OCITypeCode coll_typecode; - OCIRef *elem_ref; - OCIType *element_type; - OCITypeCode element_typecode; - OCIColl *coll; -} oci_collection; - -typedef struct { - zval *zval; - text *name; - ub4 name_len; - ub4 type; -} oci_define; - -typedef struct { - int id; - oci_connection *conn; - sword error; - OCIError *pError; - OCIStmt *pStmt; - char *last_query; - HashTable *columns; - HashTable *binds; - HashTable *defines; - int ncolumns; - int executed; - int has_data; - ub2 stmttype; -} oci_statement; - -typedef struct { - OCIBind *pBind; - zval *zval; - dvoid *descr; /* used for binding of LOBS etc */ - OCIStmt *pStmt; /* used for binding REFCURSORs */ - sb2 indicator; - ub2 retcode; -} oci_bind; - -typedef struct { - oci_statement *statement; - OCIDefine *pDefine; - char *name; - ub4 name_len; - ub2 data_type; - ub2 data_size; - ub4 storage_size4; - sb2 indicator; - ub2 retcode; - ub2 retlen; - ub4 retlen4; - ub2 is_descr; - ub2 is_cursor; - int descr; - oci_statement *pstmt; - int stmtid; - int descid; - void *data; - oci_define *define; - int piecewise; - ub4 cb_retlen; - ub2 scale; - ub2 precision; -} oci_out_column; - -typedef struct { - sword error; - OCIError *pError; - - /* - char *default_username; - char *default_password; - char *default_dbname; - */ - - long debug_mode; - - int shutdown; - - /* XXX NYI - long allow_persistent; - long max_persistent; - long max_links; - */ - - OCIEnv *pEnv; - - int in_call; -} php_oci_globals; extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry -#define OCI_MAX_NAME_LEN 64 -#define OCI_MAX_DATA_SIZE INT_MAX -#define OCI_PIECE_SIZE (64*1024)-1 -#ifdef ZTS -#define OCI(v) TSRMG(oci_globals_id, php_oci_globals *, v) -#else -#define OCI(v) (oci_globals.v) -#endif +PHP_MINIT_FUNCTION(oci); +PHP_RINIT_FUNCTION(oci); +PHP_MSHUTDOWN_FUNCTION(oci); +PHP_RSHUTDOWN_FUNCTION(oci); +PHP_MINFO_FUNCTION(oci); +# endif /* !PHP_OCI8_H */ #else /* !HAVE_OCI8 */ # define oci8_module_ptr NULL @@ -223,3 +64,5 @@ extern zend_module_entry oci8_module_entry; * c-basic-offset: 4 * End: */ + + diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h new file mode 100644 index 000000000..4f70fd920 --- /dev/null +++ b/ext/oci8/php_oci8_int.h @@ -0,0 +1,423 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Stig Sæther Bakken | + | Thies C. Arntzen | + | | + | Collection support by Andy Sautins | + | Temporary LOB support by David Benson | + | ZTS per process OCIPLogon by Harald Radi | + | | + | Redesigned by: Antony Dovgal | + | Andi Gutmans | + | Wez Furlong | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_oci8_int.h,v 1.11.2.4 2006/01/05 13:42:35 tony2001 Exp $ */ + +#if HAVE_OCI8 +# ifndef PHP_OCI8_INT_H +# define PHP_OCI8_INT_H + +/* misc defines {{{ */ +# if (defined(__osf__) && defined(__alpha)) +# ifndef A_OSF +# define A_OSF +# endif +# ifndef OSF1 +# define OSF1 +# endif +# ifndef _INTRINSICS +# define _INTRINSICS +# endif +# endif /* osf alpha */ + +#if defined(min) +#undef min +#endif +#if defined(max) +#undef max +#endif +/* }}} */ + +#include "ext/standard/php_string.h" +#include + +extern int le_connection; +extern int le_pconnection; +extern int le_statement; +extern int le_descriptor; +#ifdef PHP_OCI8_HAVE_COLLECTIONS +extern int le_collection; +#endif +extern int le_server; +extern int le_session; + +extern zend_class_entry *oci_lob_class_entry_ptr; +#ifdef PHP_OCI8_HAVE_COLLECTIONS +extern zend_class_entry *oci_coll_class_entry_ptr; +#endif + +/* constants {{{ */ +#define PHP_OCI_SEEK_SET 0 +#define PHP_OCI_SEEK_CUR 1 +#define PHP_OCI_SEEK_END 2 + +#define PHP_OCI_MAX_NAME_LEN 64 +#define PHP_OCI_MAX_DATA_SIZE INT_MAX +#define PHP_OCI_PIECE_SIZE (64*1024)-1 +#define PHP_OCI_LOB_BUFFER_SIZE 1048576l + +#define PHP_OCI_ASSOC 1<<0 +#define PHP_OCI_NUM 1<<1 +#define PHP_OCI_BOTH (PHP_OCI_ASSOC|PHP_OCI_NUM) + +#define PHP_OCI_RETURN_NULLS 1<<2 +#define PHP_OCI_RETURN_LOBS 1<<3 + +#define PHP_OCI_FETCHSTATEMENT_BY_COLUMN 1<<4 +#define PHP_OCI_FETCHSTATEMENT_BY_ROW 1<<5 +#define PHP_OCI_FETCHSTATEMENT_BY (PHP_OCI_FETCHSTATEMENT_BY_COLUMN | PHP_OCI_FETCHSTATEMENT_BY_ROW) + +#define PHP_OCI_LOB_BUFFER_DISABLED 0 +#define PHP_OCI_LOB_BUFFER_ENABLED 1 +#define PHP_OCI_LOB_BUFFER_USED 2 + +/* }}} */ + +typedef struct { /* php_oci_connection {{{ */ + OCIEnv *env; /* private env handle */ + ub2 charset; /* charset ID */ + OCIServer *server; /* private server handle */ + OCISvcCtx *svc; /* private service context handle */ + OCISession *session; /* private session handle */ + OCIError *err; /* private error handle */ + sword errcode; /* last errcode */ + + HashTable *descriptors; /* descriptors hash, used to flush all the LOBs using this connection on commit */ + unsigned is_open:1; /* hels to determine if the connection is dead or not */ + unsigned is_attached:1; /* hels to determine if we should detach from the server when closing/freeing the connection */ + unsigned is_persistent:1; /* self-descriptive */ + unsigned used_this_request:1; /* helps to determine if we should reset connection's next ping time and check its timeout */ + unsigned needs_commit:1; /* helps to determine if we should rollback this connection on close/shutdown */ + int rsrc_id; /* resource ID */ + time_t idle_expiry; /* time when the connection will be considered as expired */ + time_t next_ping; /* time of the next ping */ + char *hash_key; /* hashed details of the connection */ +} php_oci_connection; /* }}} */ + +typedef struct { /* php_oci_descriptor {{{ */ + int id; + php_oci_connection *connection; /* parent connection handle */ + dvoid *descriptor; /* OCI descriptor handle */ + ub4 type; /* descriptor type */ + int lob_current_position; /* LOB internal pointer */ + int lob_size; /* cached LOB size. -1 = Lob wasn't initialized yet */ + int buffering; /* cached buffering flag. 0 - off, 1 - on, 2 - on and buffer was used */ +} php_oci_descriptor; /* }}} */ + +typedef struct { /* php_oci_collection {{{ */ + int id; + php_oci_connection *connection; /* parent connection handle */ + OCIType *tdo; /* collection's type handle */ + OCITypeCode coll_typecode; /* collection's typecode handle */ + OCIRef *elem_ref; /* element's reference handle */ + OCIType *element_type; /* element's type handle */ + OCITypeCode element_typecode; /* element's typecode handle */ + OCIColl *collection; /* collection handle */ +} php_oci_collection; /* }}} */ + +typedef struct { /* php_oci_define {{{ */ + zval *zval; /* zval used in define */ + text *name; /* placeholder's name */ + ub4 name_len; /* placeholder's name length */ + ub4 type; /* define type */ +} php_oci_define; /* }}} */ + +typedef struct { /* php_oci_statement {{{ */ + int id; + php_oci_connection *connection; /* parent connection handle */ + sword errcode; /* last errcode*/ + OCIError *err; /* private error handle */ + OCIStmt *stmt; /* statement handle */ + char *last_query; /* last query issued. also used to determine if this is a statement or a refcursor recieved from Oracle */ + long last_query_len; /* last query length */ + HashTable *columns; /* hash containing all the result columns */ + HashTable *binds; /* binds hash */ + HashTable *defines; /* defines hash */ + int ncolumns; /* number of columns in the result */ + unsigned executed:1; /* statement executed flag */ + unsigned has_data:1; /* statement has more data flag */ + ub2 stmttype; /* statement type */ +} php_oci_statement; /* }}} */ + +typedef struct { /* php_oci_bind {{{ */ + OCIBind *bind; /* bind handle */ + zval *zval; /* value */ + dvoid *descriptor; /* used for binding of LOBS etc */ + OCIStmt *statement; /* used for binding REFCURSORs */ + php_oci_statement *parent_statement; /* pointer to the parent statement */ + struct { + void *elements; +/* ub2 *indicators; + ub2 *element_lengths; + ub2 *retcodes; */ + long current_length; + long old_length; + long max_length; + long type; + } array; + sb2 indicator; /* */ + ub2 retcode; /* */ +} php_oci_bind; /* }}} */ + +typedef struct { /* php_oci_out_column {{{ */ + php_oci_statement *statement; /* statement handle. used when fetching REFCURSORS */ + OCIDefine *oci_define; /* define handle */ + char *name; /* column name */ + ub4 name_len; /* column name length */ + ub2 data_type; /* column data type */ + ub2 data_size; /* data size */ + ub4 storage_size4; /* size used when allocating buffers */ + sb2 indicator; /* */ + ub2 retcode; /* code returned when fetching this particular column */ + ub2 retlen; /* */ + ub4 retlen4; /* */ + ub2 is_descr; /* column contains a descriptor */ + ub2 is_cursor; /* column contains a cursor */ + int stmtid; /* statement id for cursors */ + int descid; /* descriptor id for descriptors */ + void *data; /* */ + php_oci_define *define; /* define handle */ + int piecewise; /* column is fetched piece-by-piece */ + ub4 cb_retlen; /* */ + ub2 scale; /* column scale */ + ub2 precision; /* column precision */ +} php_oci_out_column; /* }}} */ + +/* {{{ macros */ + +#define PHP_OCI_CALL(func, params) \ + func params; \ + if (OCI_G(debug_mode)) { \ + php_printf ("OCI8 DEBUG: " #func " at (%s:%d) \n", __FILE__, __LINE__); \ + } + +#define PHP_OCI_HANDLE_ERROR(connection, errcode) \ +{ \ + switch (errcode) { \ + case 1013: \ + zend_bailout(); \ + break; \ + case 22: \ + case 1012: \ + case 3113: \ + case 604: \ + case 1041: \ + case 3114: \ + connection->is_open = 0; \ + break; \ + } \ +} \ + +#define PHP_OCI_REGISTER_RESOURCE(resource, le_resource) \ + resource->id = ZEND_REGISTER_RESOURCE(NULL, resource, le_resource); \ + zend_list_addref(resource->connection->rsrc_id); + +#define PHP_OCI_ZVAL_TO_CONNECTION(zval, connection) \ + ZEND_FETCH_RESOURCE2(connection, php_oci_connection *, &zval, -1, "oci8 connection", le_connection, le_pconnection); + +#define PHP_OCI_ZVAL_TO_STATEMENT(zval, statement) \ + ZEND_FETCH_RESOURCE(statement, php_oci_statement *, &zval, -1, "oci8 statement", le_statement) + +#define PHP_OCI_ZVAL_TO_DESCRIPTOR(zval, descriptor) \ + ZEND_FETCH_RESOURCE(descriptor, php_oci_descriptor *, &zval, -1, "oci8 descriptor", le_descriptor) + +#define PHP_OCI_ZVAL_TO_COLLECTION(zval, collection) \ + ZEND_FETCH_RESOURCE(collection, php_oci_collection *, &zval, -1, "oci8 collection", le_collection) + +#define PHP_OCI_FETCH_RESOURCE_EX(zval, var, type, name, resource_type) \ + var = (type) zend_fetch_resource(&zval TSRMLS_CC, -1, name, NULL, 1, resource_type); \ + if (!var) { \ + return 1; \ + } + +#define PHP_OCI_ZVAL_TO_CONNECTION_EX(zval, connection) \ + PHP_OCI_FETCH_RESOURCE_EX(zval, connection, php_oci_connection *, "oci8 connection", le_connection) + +#define PHP_OCI_ZVAL_TO_STATEMENT_EX(zval, statement) \ + PHP_OCI_FETCH_RESOURCE_EX(zval, statement, php_oci_statement *, "oci8 statement", le_statement) + +#define PHP_OCI_ZVAL_TO_DESCRIPTOR_EX(zval, descriptor) \ + PHP_OCI_FETCH_RESOURCE_EX(zval, descriptor, php_oci_descriptor *, "oci8 descriptor", le_descriptor) + +#define PHP_OCI_ZVAL_TO_COLLECTION_EX(zval, collection) \ + PHP_OCI_FETCH_RESOURCE_EX(zval, collection, php_oci_collection *, "oci8 collection", le_collection) + +/* }}} */ + +/* PROTOS */ + +/* main prototypes {{{ */ + +void php_oci_column_hash_dtor (void *data); +void php_oci_define_hash_dtor (void *data); +void php_oci_bind_hash_dtor (void *data); +void php_oci_descriptor_flush_hash_dtor (void *data); +int php_oci_descriptor_delete_from_hash(void *data, void *id TSRMLS_DC); + +sb4 php_oci_error (OCIError *, sword TSRMLS_DC); +sb4 php_oci_fetch_errmsg(OCIError *, text ** TSRMLS_DC); +#ifdef HAVE_OCI8_ATTR_STATEMENT +int php_oci_fetch_sqltext_offset(php_oci_statement *, text **, ub2 * TSRMLS_DC); +#endif + +void php_oci_do_connect (INTERNAL_FUNCTION_PARAMETERS, int , int); +php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, char *dbname, int dbname_len, char *charset, long session_mode, int persistent, int exclusive TSRMLS_DC); + +int php_oci_connection_rollback(php_oci_connection * TSRMLS_DC); +int php_oci_connection_commit(php_oci_connection * TSRMLS_DC); + +int php_oci_password_change(php_oci_connection *, char *, int, char *, int, char *, int TSRMLS_DC); +int php_oci_server_get_version(php_oci_connection *, char ** TSRMLS_DC); + +void php_oci_fetch_row(INTERNAL_FUNCTION_PARAMETERS, int, int); +int php_oci_column_to_zval(php_oci_out_column *, zval *, int TSRMLS_DC); + +/* }}} */ + +/* lob related prototypes {{{ */ + +php_oci_descriptor * php_oci_lob_create (php_oci_connection *, long TSRMLS_DC); +int php_oci_lob_get_length (php_oci_descriptor *, ub4 * TSRMLS_DC); +int php_oci_lob_read (php_oci_descriptor *, long, long, char **, ub4 * TSRMLS_DC); +int php_oci_lob_write (php_oci_descriptor *, ub4, char *, int, ub4 * TSRMLS_DC); +int php_oci_lob_flush (php_oci_descriptor *, int TSRMLS_DC); +int php_oci_lob_set_buffering (php_oci_descriptor *, int TSRMLS_DC); +int php_oci_lob_get_buffering (php_oci_descriptor * TSRMLS_DC); +int php_oci_lob_copy (php_oci_descriptor *, php_oci_descriptor *, long TSRMLS_DC); +#ifdef HAVE_OCI8_TEMP_LOB +int php_oci_lob_close (php_oci_descriptor * TSRMLS_DC); +int php_oci_lob_write_tmp (php_oci_descriptor *, ub1, char *, int TSRMLS_DC); +#endif +void php_oci_lob_free(php_oci_descriptor * TSRMLS_DC); +int php_oci_lob_import(php_oci_descriptor *descriptor, char * TSRMLS_DC); +int php_oci_lob_append (php_oci_descriptor *, php_oci_descriptor * TSRMLS_DC); +int php_oci_lob_truncate (php_oci_descriptor *, long TSRMLS_DC); +int php_oci_lob_erase (php_oci_descriptor *, long, long, ub4 * TSRMLS_DC); +int php_oci_lob_is_equal (php_oci_descriptor *, php_oci_descriptor *, boolean * TSRMLS_DC); + +/* }}} */ + +/* collection related prototypes {{{ */ + +php_oci_collection * php_oci_collection_create(php_oci_connection *, char *, int, char *, int TSRMLS_DC); +int php_oci_collection_size(php_oci_collection *, sb4 * TSRMLS_DC); +int php_oci_collection_max(php_oci_collection *, long * TSRMLS_DC); +int php_oci_collection_trim(php_oci_collection *, long TSRMLS_DC); +int php_oci_collection_append(php_oci_collection *, char *, int TSRMLS_DC); +int php_oci_collection_element_get(php_oci_collection *, long, zval** TSRMLS_DC); +int php_oci_collection_element_set(php_oci_collection *, long, char*, int TSRMLS_DC); +int php_oci_collection_element_set_null(php_oci_collection *, long TSRMLS_DC); +int php_oci_collection_element_set_date(php_oci_collection *, long, char *, int TSRMLS_DC); +int php_oci_collection_element_set_number(php_oci_collection *, long, char *, int TSRMLS_DC); +int php_oci_collection_element_set_string(php_oci_collection *, long, char *, int TSRMLS_DC); +int php_oci_collection_assign(php_oci_collection *, php_oci_collection * TSRMLS_DC); +void php_oci_collection_close(php_oci_collection * TSRMLS_DC); +int php_oci_collection_append_null(php_oci_collection * TSRMLS_DC); +int php_oci_collection_append_date(php_oci_collection *, char *, int TSRMLS_DC); +int php_oci_collection_append_number(php_oci_collection *, char *, int TSRMLS_DC); +int php_oci_collection_append_string(php_oci_collection *, char *, int TSRMLS_DC); + + +/* }}} */ + +/* statement related prototypes {{{ */ + +php_oci_statement * php_oci_statement_create (php_oci_connection *, char *, long, zend_bool TSRMLS_DC); +int php_oci_statement_set_prefetch (php_oci_statement *, ub4 TSRMLS_DC); +int php_oci_statement_fetch (php_oci_statement *, ub4 TSRMLS_DC); +php_oci_out_column * php_oci_statement_get_column (php_oci_statement *, long, char*, long TSRMLS_DC); +int php_oci_statement_execute (php_oci_statement *, ub4 TSRMLS_DC); +int php_oci_statement_cancel (php_oci_statement * TSRMLS_DC); +void php_oci_statement_free (php_oci_statement * TSRMLS_DC); +int php_oci_bind_pre_exec(void *data TSRMLS_DC); +int php_oci_bind_post_exec(void *data TSRMLS_DC); +int php_oci_bind_by_name(php_oci_statement *, char *, int, zval*, long, long TSRMLS_DC); +sb4 php_oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, dvoid **); +sb4 php_oci_bind_out_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 **, ub1 *, dvoid **, ub2 **); +php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS); + +int php_oci_statement_get_type(php_oci_statement *, ub2 * TSRMLS_DC); +int php_oci_statement_get_numrows(php_oci_statement *, ub4 * TSRMLS_DC); +int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval* var, long max_table_length, long maxlength, long type TSRMLS_DC); +php_oci_bind *php_oci_bind_array_helper_number(zval* var, long max_table_length TSRMLS_DC); +php_oci_bind *php_oci_bind_array_helper_double(zval* var, long max_table_length TSRMLS_DC); +php_oci_bind *php_oci_bind_array_helper_string(zval* var, long max_table_length, long maxlength TSRMLS_DC); +php_oci_bind *php_oci_bind_array_helper_date(zval* var, long max_table_length, php_oci_connection *connection TSRMLS_DC); + +/* }}} */ + +ZEND_BEGIN_MODULE_GLOBALS(oci) /* {{{ */ + sword errcode; /* global last error code (used when connect fails, for example) */ + OCIError *err; /* global error handle */ + + /* + char *default_username; + char *default_password; + char *default_dbname; + */ + + zend_bool debug_mode; /* debug mode flag */ + + long max_persistent; /* maximum number of persistent connections per process */ + long num_persistent; /* number of existing persistent connections */ + long num_links; /* non-persistent + persistent connections */ + long ping_interval; /* time interval between pings */ + long persistent_timeout; /* time period after which idle persistent connection is considered expired */ + long statement_cache_size; /* statement cache size. used with 9i+ clients only*/ + long default_prefetch; /* default prefetch setting */ + zend_bool privileged_connect; /* privileged connect flag (On/Off) */ + zend_bool old_oci_close_semantics; /* old_oci_close_semantics flag (to determine the way oci_close() should behave) */ + + int shutdown; /* in shutdown flag */ + + OCIEnv *env; /* global environment handle */ + +ZEND_END_MODULE_GLOBALS(oci) /* }}} */ + +#ifdef ZTS +#define OCI_G(v) TSRMG(oci_globals_id, zend_oci_globals *, v) +#else +#define OCI_G(v) (oci_globals.v) +#endif + +ZEND_EXTERN_MODULE_GLOBALS(oci) + +# endif /* !PHP_OCI8_INT_H */ +#else /* !HAVE_OCI8 */ + +# define oci8_module_ptr NULL + +#endif /* HAVE_OCI8 */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ + + diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt new file mode 100644 index 000000000..1310325ad --- /dev/null +++ b/ext/oci8/tests/array_bind_001.phpt @@ -0,0 +1,69 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 1 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): OCI-21560: argument 3 is null, invalid, or out of range in %s on line %d + +Warning: oci_execute(): ORA-01008: not all variables bound in %s on line %d +array(1) { + [0]=> + string(0) "" +} +Done diff --git a/ext/oci8/tests/array_bind_002.phpt b/ext/oci8/tests/array_bind_002.phpt new file mode 100644 index 000000000..4c76df42f --- /dev/null +++ b/ext/oci8/tests/array_bind_002.phpt @@ -0,0 +1,77 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 2 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): Maximum array length must be greater than zero in %s on line %d + +Warning: oci_execute(): ORA-01008: not all variables bound in %s on line %d +array(5) { + [0]=> + string(9) "06-DEC-05" + [1]=> + string(9) "10-DEC-80" + [2]=> + string(9) "21-AUG-91" + [3]=> + string(9) "26-OCT-17" + [4]=> + string(9) "05-NOV-05" +} +Done diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt new file mode 100644 index 000000000..497e46e49 --- /dev/null +++ b/ext/oci8/tests/array_bind_003.phpt @@ -0,0 +1,73 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 3 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_execute(): OCI_NO_DATA in %s on line %d +array(4) { + [0]=> + string(9) "06-DEC-05" + [1]=> + string(9) "10-DEC-80" + [2]=> + string(9) "21-AUG-91" + [3]=> + string(9) "26-OCT-17" +} +Done diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt new file mode 100644 index 000000000..1ddf85149 --- /dev/null +++ b/ext/oci8/tests/array_bind_004.phpt @@ -0,0 +1,65 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 4 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_execute(): OCI_NO_DATA in %s on line %d +array(0) { +} +Done diff --git a/ext/oci8/tests/array_bind_005.phpt b/ext/oci8/tests/array_bind_005.phpt new file mode 100644 index 000000000..192d15563 --- /dev/null +++ b/ext/oci8/tests/array_bind_005.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 5 +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + string(0) "" + [1]=> + string(0) "" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(0) "" +} +Done diff --git a/ext/oci8/tests/array_bind_006.phpt b/ext/oci8/tests/array_bind_006.phpt new file mode 100644 index 000000000..e229dd872 --- /dev/null +++ b/ext/oci8/tests/array_bind_006.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name(), SQLT_CHR and default max_length +--SKIPIF-- + +--FILE-- + +--EXPECT-- +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/array_bind_007.phpt b/ext/oci8/tests/array_bind_007.phpt new file mode 100644 index 000000000..10c92a8e7 --- /dev/null +++ b/ext/oci8/tests/array_bind_007.phpt @@ -0,0 +1,77 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 7 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: -1 in %s on line %d + +Warning: oci_execute(): ORA-01008: not all variables bound in %s on line %d +array(5) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) +} +Done diff --git a/ext/oci8/tests/array_bind_008.phpt b/ext/oci8/tests/array_bind_008.phpt new file mode 100644 index 000000000..c44304c11 --- /dev/null +++ b/ext/oci8/tests/array_bind_008.phpt @@ -0,0 +1,78 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 8 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_execute(): ORA-06550: line %d, column %d: +PLS-00418: array bind type must match PL/SQL table row type +ORA-06550: line %d, column %d: +PL/SQL: Statement ignored in %s on line %d +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "2" + [2]=> + string(1) "3" + [3]=> + string(1) "4" + [4]=> + string(1) "5" +} +Done diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt new file mode 100644 index 000000000..8e83b0982 --- /dev/null +++ b/ext/oci8/tests/array_bind_009.phpt @@ -0,0 +1,17 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 9 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/array_bind_010.phpt b/ext/oci8/tests/array_bind_010.phpt new file mode 100644 index 000000000..a77ed913e --- /dev/null +++ b/ext/oci8/tests/array_bind_010.phpt @@ -0,0 +1,36 @@ +--TEST-- +oci_bind_array_by_name() and invalid values 8 +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): ORA-01036: illegal variable name/number in %s on line %d +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "2" + [2]=> + string(1) "3" + [3]=> + string(1) "4" + [4]=> + string(1) "5" +} +Done diff --git a/ext/oci8/tests/array_bind_011.phpt b/ext/oci8/tests/array_bind_011.phpt new file mode 100644 index 000000000..e8e00a809 --- /dev/null +++ b/ext/oci8/tests/array_bind_011.phpt @@ -0,0 +1,67 @@ +--TEST-- +oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d + +Warning: oci_execute(): ORA-01008: not all variables bound in %s on line %d +array(0) { +} +Done diff --git a/ext/oci8/tests/array_bind_012.phpt b/ext/oci8/tests/array_bind_012.phpt new file mode 100644 index 000000000..2208f0b3b --- /dev/null +++ b/ext/oci8/tests/array_bind_012.phpt @@ -0,0 +1,26 @@ +--TEST-- +oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_array_by_name(): Invalid max length value (-10) in %s on line %d +array(0) { +} +Done diff --git a/ext/oci8/tests/array_bind_date.phpt b/ext/oci8/tests/array_bind_date.phpt new file mode 100644 index 000000000..63da558f9 --- /dev/null +++ b/ext/oci8/tests/array_bind_date.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_ODT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + string(9) "05-NOV-05" + [1]=> + string(9) "26-OCT-17" + [2]=> + string(9) "21-AUG-91" + [3]=> + string(9) "10-DEC-80" + [4]=> + string(9) "06-DEC-05" +} +Done diff --git a/ext/oci8/tests/array_bind_date1.phpt b/ext/oci8/tests/array_bind_date1.phpt new file mode 100644 index 000000000..ebf767570 --- /dev/null +++ b/ext/oci8/tests/array_bind_date1.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_ODT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + string(9) "05-NOV-05" + [1]=> + string(9) "26-OCT-17" + [2]=> + string(9) "21-AUG-91" + [3]=> + string(9) "10-DEC-80" + [4]=> + string(9) "06-DEC-05" +} +Done diff --git a/ext/oci8/tests/array_bind_float.phpt b/ext/oci8/tests/array_bind_float.phpt new file mode 100644 index 000000000..1aafb2431 --- /dev/null +++ b/ext/oci8/tests/array_bind_float.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_FLT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + float(5.9999) + [1]=> + float(4.2123) + [2]=> + float(3.4234) + [3]=> + float(2.5658) + [4]=> + float(1.243) +} +Done diff --git a/ext/oci8/tests/array_bind_float1.phpt b/ext/oci8/tests/array_bind_float1.phpt new file mode 100644 index 000000000..ead85890f --- /dev/null +++ b/ext/oci8/tests/array_bind_float1.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_FLT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + float(5.9999) + [1]=> + float(4.2123) + [2]=> + float(3.4234) + [3]=> + float(2.5658) + [4]=> + float(1.243) +} +Done diff --git a/ext/oci8/tests/array_bind_int.phpt b/ext/oci8/tests/array_bind_int.phpt new file mode 100644 index 000000000..3c8bfd4f5 --- /dev/null +++ b/ext/oci8/tests/array_bind_int.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_INT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + int(5) + [1]=> + int(4) + [2]=> + int(3) + [3]=> + int(2) + [4]=> + int(1) +} +Done diff --git a/ext/oci8/tests/array_bind_int1.phpt b/ext/oci8/tests/array_bind_int1.phpt new file mode 100644 index 000000000..eb2072adc --- /dev/null +++ b/ext/oci8/tests/array_bind_int1.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_INT +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(5) { + [0]=> + int(5) + [1]=> + int(4) + [2]=> + int(3) + [3]=> + int(2) + [4]=> + int(1) +} +Done diff --git a/ext/oci8/tests/array_bind_str.phpt b/ext/oci8/tests/array_bind_str.phpt new file mode 100644 index 000000000..c8e1e0cdb --- /dev/null +++ b/ext/oci8/tests/array_bind_str.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_AVC +--SKIPIF-- + +--FILE-- + +--EXPECT-- +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/array_bind_str1.phpt b/ext/oci8/tests/array_bind_str1.phpt new file mode 100644 index 000000000..af4dbfe22 --- /dev/null +++ b/ext/oci8/tests/array_bind_str1.phpt @@ -0,0 +1,74 @@ +--TEST-- +oci_bind_array_by_name() and SQLT_AVC +--SKIPIF-- + +--FILE-- + +--EXPECT-- +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/bind_empty.phpt b/ext/oci8/tests/bind_empty.phpt new file mode 100644 index 000000000..dc993016a --- /dev/null +++ b/ext/oci8/tests/bind_empty.phpt @@ -0,0 +1,39 @@ +--TEST-- +binding empty values +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Done diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index d3f0ed9bf..df319feb0 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -1,36 +1,34 @@ --TEST-- Bug #26133 (ocifreedesc() segfault) --SKIPIF-- - + --FILE-- free(); } - require 'drop_table.inc'; + require dirname(__FILE__).'/drop_table.inc'; echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- Done - diff --git a/ext/oci8/tests/bug27303.phpt b/ext/oci8/tests/bug27303.phpt new file mode 100644 index 000000000..191cdffe6 --- /dev/null +++ b/ext/oci8/tests/bug27303.phpt @@ -0,0 +1,252 @@ +--TEST-- +bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +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 diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt new file mode 100644 index 000000000..67f3552f1 --- /dev/null +++ b/ext/oci8/tests/bug27303_2.phpt @@ -0,0 +1,252 @@ +--TEST-- +bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +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 diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt new file mode 100644 index 000000000..3a8982d30 --- /dev/null +++ b/ext/oci8/tests/bug27303_3.phpt @@ -0,0 +1,252 @@ +--TEST-- +bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +int(1) +int(2) +int(3) +int(4) +int(5) +int(6) +int(7) +int(8) +int(9) +int(10) +int(11) +int(12) +int(13) +int(14) +int(15) +int(16) +int(17) +int(18) +int(19) +int(20) +int(21) +int(22) +int(23) +int(24) +int(25) +int(26) +int(27) +int(28) +int(29) +int(30) +int(31) +int(32) +int(33) +int(34) +int(35) +int(36) +int(37) +int(38) +int(39) +int(40) +int(41) +int(42) +int(43) +int(44) +int(45) +int(46) +int(47) +int(48) +int(49) +int(50) +int(51) +int(52) +int(53) +int(54) +int(55) +int(56) +int(57) +int(58) +int(59) +int(60) +int(61) +int(62) +int(63) +int(64) +int(65) +int(66) +int(67) +int(68) +int(69) +int(70) +int(71) +int(72) +int(73) +int(74) +int(75) +int(76) +int(77) +int(78) +int(79) +int(80) +int(81) +int(82) +int(83) +int(84) +int(85) +int(86) +int(87) +int(88) +int(89) +int(90) +int(91) +int(92) +int(93) +int(94) +int(95) +int(96) +int(97) +int(98) +int(99) +int(100) +int(101) +int(102) +int(103) +int(104) +int(105) +int(106) +int(107) +int(108) +int(109) +int(110) +int(111) +int(112) +int(113) +int(114) +int(115) +int(116) +int(117) +int(118) +int(119) +int(120) +int(121) +int(122) +int(123) +int(124) +int(125) +int(126) +int(127) +int(128) +int(129) +int(130) +int(131) +int(132) +int(133) +int(134) +int(135) +int(136) +int(137) +int(138) +int(139) +int(140) +int(141) +int(142) +int(143) +int(144) +int(145) +int(146) +int(147) +int(148) +int(149) +int(150) +int(151) +int(152) +int(153) +int(154) +int(155) +int(156) +int(157) +int(158) +int(159) +int(160) +int(161) +int(162) +int(163) +int(164) +int(165) +int(166) +int(167) +int(168) +int(169) +int(170) +int(171) +int(172) +int(173) +int(174) +int(175) +int(176) +int(177) +int(178) +int(179) +int(180) +int(181) +int(182) +int(183) +int(184) +int(185) +int(186) +int(187) +int(188) +int(189) +int(190) +int(191) +int(192) +int(193) +int(194) +int(195) +int(196) +int(197) +int(198) +int(199) +Done diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt new file mode 100644 index 000000000..8ba4ef44b --- /dev/null +++ b/ext/oci8/tests/bug27303_4.phpt @@ -0,0 +1,252 @@ +--TEST-- +bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +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 diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt new file mode 100644 index 000000000..6bfcd404e --- /dev/null +++ b/ext/oci8/tests/bug32325.phpt @@ -0,0 +1,39 @@ +--TEST-- +bug #32325 (Can't retrieve collection using OCI8) +--SKIPIF-- + +--FILE-- +size()); +var_dump($collection->getelem(1)); +var_dump($collection->getelem(2)); + +$drop_stmt = oci_parse($c, "drop type ut_num_list_t"); +oci_execute($drop_stmt); + +echo "Done\n"; +?> +--EXPECTF-- +int(4) +float(2) +float(3) +Done diff --git a/ext/oci8/tests/close.phpt b/ext/oci8/tests/close.phpt new file mode 100644 index 000000000..55bb4ea36 --- /dev/null +++ b/ext/oci8/tests/close.phpt @@ -0,0 +1,17 @@ +--TEST-- +connect/close/connect +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Done diff --git a/ext/oci8/tests/coll_001.phpt b/ext/oci8/tests/coll_001.phpt new file mode 100644 index 000000000..57d3cf1b4 --- /dev/null +++ b/ext/oci8/tests/coll_001.phpt @@ -0,0 +1,27 @@ +--TEST-- +oci_new_collection() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} + +Warning: oci_new_collection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_002.phpt b/ext/oci8/tests/coll_002.phpt new file mode 100644 index 000000000..6d3051989 --- /dev/null +++ b/ext/oci8/tests/coll_002.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_new_collection() + free() +--SKIPIF-- + +--FILE-- +free()); +var_dump($coll1->size()); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} +bool(true) + +Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_002_func.phpt b/ext/oci8/tests/coll_002_func.phpt new file mode 100644 index 000000000..58e641ee2 --- /dev/null +++ b/ext/oci8/tests/coll_002_func.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_new_collection() + free() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} +bool(true) + +Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_003.phpt b/ext/oci8/tests/coll_003.phpt new file mode 100644 index 000000000..b5236ef6f --- /dev/null +++ b/ext/oci8/tests/coll_003.phpt @@ -0,0 +1,34 @@ +--TEST-- +collection methods +--SKIPIF-- + +--FILE-- +size()); +var_dump($coll1->max()); +var_dump($coll1->trim(3)); +var_dump($coll1->append(1)); +var_dump($coll1->getElem(0)); +var_dump($coll1->assignElem(0,2)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +int(0) +int(0) + +Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d +bool(false) +bool(true) +float(1) +bool(true) +Done diff --git a/ext/oci8/tests/coll_003_func.phpt b/ext/oci8/tests/coll_003_func.phpt new file mode 100644 index 000000000..f5c6dc7f3 --- /dev/null +++ b/ext/oci8/tests/coll_003_func.phpt @@ -0,0 +1,34 @@ +--TEST-- +collection methods +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +int(0) +int(0) + +Warning: oci_collection_trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d +bool(false) +bool(true) +float(1) +bool(true) +Done diff --git a/ext/oci8/tests/coll_004.phpt b/ext/oci8/tests/coll_004.phpt new file mode 100644 index 000000000..eb2ac7e26 --- /dev/null +++ b/ext/oci8/tests/coll_004.phpt @@ -0,0 +1,29 @@ +--TEST-- +oci_collection_assign() +--SKIPIF-- + +--FILE-- +append(1)); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +float(1) +Done diff --git a/ext/oci8/tests/coll_004_func.phpt b/ext/oci8/tests/coll_004_func.phpt new file mode 100644 index 000000000..57dff2eb3 --- /dev/null +++ b/ext/oci8/tests/coll_004_func.phpt @@ -0,0 +1,29 @@ +--TEST-- +oci_collection_assign() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +float(1) +Done diff --git a/ext/oci8/tests/coll_005.phpt b/ext/oci8/tests/coll_005.phpt new file mode 100644 index 000000000..0f4006996 --- /dev/null +++ b/ext/oci8/tests/coll_005.phpt @@ -0,0 +1,27 @@ +--TEST-- +ocinewcollection() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} + +Warning: ocinewcollection(): OCI-22303: type ""."NONEXISTENT" not found in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_006.phpt b/ext/oci8/tests/coll_006.phpt new file mode 100644 index 000000000..cf258cbe3 --- /dev/null +++ b/ext/oci8/tests/coll_006.phpt @@ -0,0 +1,30 @@ +--TEST-- +ocinewcollection() + free() +--SKIPIF-- + +--FILE-- +free()); +var_dump($coll1->size()); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} +bool(true) + +Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_006_func.phpt b/ext/oci8/tests/coll_006_func.phpt new file mode 100644 index 000000000..56707d608 --- /dev/null +++ b/ext/oci8/tests/coll_006_func.phpt @@ -0,0 +1,30 @@ +--TEST-- +ocinewcollection() + free() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(OCI-Collection)#%d (1) { + ["collection"]=> + resource(%d) of type (oci8 collection) +} +bool(true) + +Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/coll_007.phpt b/ext/oci8/tests/coll_007.phpt new file mode 100644 index 000000000..31e10c065 --- /dev/null +++ b/ext/oci8/tests/coll_007.phpt @@ -0,0 +1,34 @@ +--TEST-- +collection methods +--SKIPIF-- + +--FILE-- +size()); +var_dump($coll1->max()); +var_dump($coll1->trim(3)); +var_dump($coll1->append(1)); +var_dump($coll1->getElem(0)); +var_dump($coll1->assignElem(0,2)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +int(0) +int(0) + +Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d +bool(false) +bool(true) +float(1) +bool(true) +Done diff --git a/ext/oci8/tests/coll_008.phpt b/ext/oci8/tests/coll_008.phpt new file mode 100644 index 000000000..57d44cc9a --- /dev/null +++ b/ext/oci8/tests/coll_008.phpt @@ -0,0 +1,29 @@ +--TEST-- +ocicollassign() +--SKIPIF-- + +--FILE-- +append(1)); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +float(1) +Done diff --git a/ext/oci8/tests/coll_009.phpt b/ext/oci8/tests/coll_009.phpt new file mode 100644 index 000000000..296d6493e --- /dev/null +++ b/ext/oci8/tests/coll_009.phpt @@ -0,0 +1,42 @@ +--TEST-- +collections and wrong dates +--SKIPIF-- + +--FILE-- +append("2005-07-28")); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +Warning: OCI-Collection::append(): OCI-01861: literal does not match format string in %s on line %d +bool(false) +bool(true) +bool(false) +Done diff --git a/ext/oci8/tests/coll_009_func.phpt b/ext/oci8/tests/coll_009_func.phpt new file mode 100644 index 000000000..3ed416ce0 --- /dev/null +++ b/ext/oci8/tests/coll_009_func.phpt @@ -0,0 +1,42 @@ +--TEST-- +collections and wrong dates +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_collection_append(): OCI-01861: literal does not match format string in %s on line %d +bool(false) +bool(true) +bool(false) +Done diff --git a/ext/oci8/tests/coll_010.phpt b/ext/oci8/tests/coll_010.phpt new file mode 100644 index 000000000..6f72dd16c --- /dev/null +++ b/ext/oci8/tests/coll_010.phpt @@ -0,0 +1,41 @@ +--TEST-- +collections and nulls +--SKIPIF-- + +--FILE-- +append(null)); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +NULL +Done diff --git a/ext/oci8/tests/coll_010_func.phpt b/ext/oci8/tests/coll_010_func.phpt new file mode 100644 index 000000000..7b63a276f --- /dev/null +++ b/ext/oci8/tests/coll_010_func.phpt @@ -0,0 +1,41 @@ +--TEST-- +collections and nulls +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +NULL +Done diff --git a/ext/oci8/tests/coll_011.phpt b/ext/oci8/tests/coll_011.phpt new file mode 100644 index 000000000..7d805d3f7 --- /dev/null +++ b/ext/oci8/tests/coll_011.phpt @@ -0,0 +1,43 @@ +--TEST-- +collections and strings +--SKIPIF-- + +--FILE-- +append("string")); +var_dump($coll1->append("string")); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) +string(6) "string" +Done diff --git a/ext/oci8/tests/coll_011_func.phpt b/ext/oci8/tests/coll_011_func.phpt new file mode 100644 index 000000000..dca640e84 --- /dev/null +++ b/ext/oci8/tests/coll_011_func.phpt @@ -0,0 +1,43 @@ +--TEST-- +collections and strings +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +bool(true) +string(6) "string" +Done diff --git a/ext/oci8/tests/coll_012.phpt b/ext/oci8/tests/coll_012.phpt new file mode 100644 index 000000000..543dafd90 --- /dev/null +++ b/ext/oci8/tests/coll_012.phpt @@ -0,0 +1,41 @@ +--TEST-- +collections and correct dates +--SKIPIF-- + +--FILE-- +append("28-JUL-05")); + +var_dump($coll2->assign($coll1)); + +var_dump($coll2->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +string(9) "28-JUL-05" +Done diff --git a/ext/oci8/tests/coll_012_func.phpt b/ext/oci8/tests/coll_012_func.phpt new file mode 100644 index 000000000..fd1019e41 --- /dev/null +++ b/ext/oci8/tests/coll_012_func.phpt @@ -0,0 +1,41 @@ +--TEST-- +collections and correct dates +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +string(9) "28-JUL-05" +Done diff --git a/ext/oci8/tests/coll_013.phpt b/ext/oci8/tests/coll_013.phpt new file mode 100644 index 000000000..00d88bb9a --- /dev/null +++ b/ext/oci8/tests/coll_013.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and correct dates (2) +--SKIPIF-- + +--FILE-- +append("28-JUL-05")); +var_dump($coll1->assignElem(0,"01-JAN-05")); +var_dump($coll1->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +string(9) "01-JAN-05" +Done diff --git a/ext/oci8/tests/coll_013_func.phpt b/ext/oci8/tests/coll_013_func.phpt new file mode 100644 index 000000000..0d01bc174 --- /dev/null +++ b/ext/oci8/tests/coll_013_func.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and correct dates (2) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +string(9) "01-JAN-05" +Done diff --git a/ext/oci8/tests/coll_014.phpt b/ext/oci8/tests/coll_014.phpt new file mode 100644 index 000000000..8458525ae --- /dev/null +++ b/ext/oci8/tests/coll_014.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and strings (2) +--SKIPIF-- + +--FILE-- +append("striing")); +var_dump($coll1->assignElem(0,"blah")); +var_dump($coll1->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +string(4) "blah" +Done diff --git a/ext/oci8/tests/coll_014_func.phpt b/ext/oci8/tests/coll_014_func.phpt new file mode 100644 index 000000000..a0fe555b6 --- /dev/null +++ b/ext/oci8/tests/coll_014_func.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and strings (2) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +string(4) "blah" +Done diff --git a/ext/oci8/tests/coll_015.phpt b/ext/oci8/tests/coll_015.phpt new file mode 100644 index 000000000..64b0aea10 --- /dev/null +++ b/ext/oci8/tests/coll_015.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and numbers (2) +--SKIPIF-- + +--FILE-- +append(1)); +var_dump($coll1->assignElem(0,2345)); +var_dump($coll1->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +float(2345) +Done diff --git a/ext/oci8/tests/coll_015_func.phpt b/ext/oci8/tests/coll_015_func.phpt new file mode 100644 index 000000000..eeed7839a --- /dev/null +++ b/ext/oci8/tests/coll_015_func.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and numbers (2) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +float(2345) +Done diff --git a/ext/oci8/tests/coll_016.phpt b/ext/oci8/tests/coll_016.phpt new file mode 100644 index 000000000..1a57a104e --- /dev/null +++ b/ext/oci8/tests/coll_016.phpt @@ -0,0 +1,48 @@ +--TEST-- +collections and negative/too big element indexes +--SKIPIF-- + +--FILE-- +append(1)); +var_dump($coll1->assignElem(-1,2345)); +var_dump($coll1->assignElem(5000,2345)); +var_dump($coll1->getElem(-1)); +var_dump($coll1->getElem(-100)); +var_dump($coll1->getElem(500)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECTF-- +bool(true) + +Warning: OCI-Collection::assignelem(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +bool(false) + +Warning: OCI-Collection::assignelem(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d +bool(false) +bool(false) +bool(false) +bool(false) +Done diff --git a/ext/oci8/tests/coll_016_func.phpt b/ext/oci8/tests/coll_016_func.phpt new file mode 100644 index 000000000..e090ca19e --- /dev/null +++ b/ext/oci8/tests/coll_016_func.phpt @@ -0,0 +1,48 @@ +--TEST-- +collections and negative/too big element indexes +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) + +Warning: oci_collection_element_assign(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +bool(false) + +Warning: oci_collection_element_assign(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d +bool(false) +bool(false) +bool(false) +bool(false) +Done diff --git a/ext/oci8/tests/coll_017.phpt b/ext/oci8/tests/coll_017.phpt new file mode 100644 index 000000000..42347ba6f --- /dev/null +++ b/ext/oci8/tests/coll_017.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and nulls (2) +--SKIPIF-- + +--FILE-- +append("string")); +var_dump($coll1->assignElem(0, null)); +var_dump($coll1->getElem(0)); + +echo "Done\n"; + +require dirname(__FILE__)."/drop_type.inc"; + +?> +--EXPECT-- +bool(true) +bool(true) +NULL +Done diff --git a/ext/oci8/tests/coll_017_func.phpt b/ext/oci8/tests/coll_017_func.phpt new file mode 100644 index 000000000..914844ae6 --- /dev/null +++ b/ext/oci8/tests/coll_017_func.phpt @@ -0,0 +1,38 @@ +--TEST-- +collections and nulls (2) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +NULL +Done diff --git a/ext/oci8/tests/commit.phpt b/ext/oci8/tests/commit.phpt new file mode 100644 index 000000000..3bef318c8 --- /dev/null +++ b/ext/oci8/tests/commit.phpt @@ -0,0 +1,148 @@ +--TEST-- +oci_commit()/oci_rollback() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +int(0) +array(5) { + ["ID"]=> + array(0) { + } + ["VALUE"]=> + array(0) { + } + ["BLOB"]=> + array(0) { + } + ["CLOB"]=> + array(0) { + } + ["STRING"]=> + array(0) { + } +} +bool(true) +int(4) +array(5) { + ["ID"]=> + array(4) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + [3]=> + string(1) "1" + } + ["VALUE"]=> + array(4) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + [3]=> + string(1) "1" + } + ["BLOB"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } + ["CLOB"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } + ["STRING"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } +} +Done diff --git a/ext/oci8/tests/commit_old.phpt b/ext/oci8/tests/commit_old.phpt new file mode 100644 index 000000000..196e0650c --- /dev/null +++ b/ext/oci8/tests/commit_old.phpt @@ -0,0 +1,146 @@ +--TEST-- +ocicommit()/ocirollback() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +int(0) +array(5) { + ["ID"]=> + array(0) { + } + ["VALUE"]=> + array(0) { + } + ["BLOB"]=> + array(0) { + } + ["CLOB"]=> + array(0) { + } + ["STRING"]=> + array(0) { + } +} +bool(true) +int(4) +array(5) { + ["ID"]=> + array(4) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + [3]=> + string(1) "1" + } + ["VALUE"]=> + array(4) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + [3]=> + string(1) "1" + } + ["BLOB"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } + ["CLOB"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } + ["STRING"]=> + array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + } +} +Done diff --git a/ext/oci8/tests/connect.inc b/ext/oci8/tests/connect.inc index a0013e20d..887c8fdaa 100644 --- a/ext/oci8/tests/connect.inc +++ b/ext/oci8/tests/connect.inc @@ -4,29 +4,27 @@ * Please, change user, password and dbase to match your configuration. * * */ - -$user = "user"; -$password = "pass"; -$dbase = "base"; + +$user = "system"; +$password = "system"; +$dbase = "oracle"; /* * You should have privileges to create tables in this schema * * */ - -$schema = "system"; - /* - * Remove the last line in skipif.inc to run tests - * - * */ - +$schema = "system"; +*/ +$table_name = "tb".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5); +$type_name = strtoupper("tp".substr(str_replace(Array(".", "-"), "_", php_uname("n")), 0, 5)); + if (!empty($dbase)) { - $connection = ocilogon($user,$password,$dbase); + $c = ocilogon($user,$password,$dbase); } else { - $connection = ocilogon($user,$password); + $c = ocilogon($user,$password); } if (!empty($schema)) { diff --git a/ext/oci8/tests/connect.phpt b/ext/oci8/tests/connect.phpt new file mode 100644 index 000000000..6ce4c533b --- /dev/null +++ b/ext/oci8/tests/connect.phpt @@ -0,0 +1,22 @@ +--TEST-- +oci_connect() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +Done diff --git a/ext/oci8/tests/connect_1.phpt b/ext/oci8/tests/connect_1.phpt new file mode 100644 index 000000000..647a92cee --- /dev/null +++ b/ext/oci8/tests/connect_1.phpt @@ -0,0 +1,35 @@ +--TEST-- +oci_pconnect() & oci_new_connect() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 persistent connection) +resource(%d) of type (oci8 connection) +bool(true) +bool(true) +Done diff --git a/ext/oci8/tests/connect_1_old.phpt b/ext/oci8/tests/connect_1_old.phpt new file mode 100644 index 000000000..8210b82d6 --- /dev/null +++ b/ext/oci8/tests/connect_1_old.phpt @@ -0,0 +1,35 @@ +--TEST-- +ociplogon() & ocinlogon() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 persistent connection) +resource(%d) of type (oci8 connection) +bool(true) +bool(true) +Done diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt new file mode 100644 index 000000000..55f1734a5 --- /dev/null +++ b/ext/oci8/tests/connect_old.phpt @@ -0,0 +1,22 @@ +--TEST-- +ocilogon() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +Done diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt new file mode 100644 index 000000000..513d60cef --- /dev/null +++ b/ext/oci8/tests/connect_without_oracle_home.phpt @@ -0,0 +1,25 @@ +--TEST-- +oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: ocilogon(): _oci_open_server failed, check ORACLE_HOME and NLS_LANG variables: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor in %sconnect.inc on line %d + +Warning: oci_connect(): _oci_open_server failed, check ORACLE_HOME and NLS_LANG variables: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor in %sconnect_without_oracle_home.php on line %d +bool(false) +Done diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt new file mode 100644 index 000000000..68b11de15 --- /dev/null +++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt @@ -0,0 +1,25 @@ +--TEST-- +ocilogon() without ORACLE_HOME set (OCIServerAttach() segfaults) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: ocilogon(): _oci_open_server failed, check ORACLE_HOME and NLS_LANG variables: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor in %sconnect.inc on line %d + +Warning: oci_connect(): _oci_open_server failed, check ORACLE_HOME and NLS_LANG variables: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor in %sconnect_without_oracle_home.php on line %d +bool(false) +Done diff --git a/ext/oci8/tests/create_table.inc b/ext/oci8/tests/create_table.inc index c423ce577..d6debf233 100644 --- a/ext/oci8/tests/create_table.inc +++ b/ext/oci8/tests/create_table.inc @@ -1,11 +1,18 @@ diff --git a/ext/oci8/tests/cursor_bind.phpt b/ext/oci8/tests/cursor_bind.phpt new file mode 100644 index 000000000..c2ce15cb3 --- /dev/null +++ b/ext/oci8/tests/cursor_bind.phpt @@ -0,0 +1,99 @@ +--TEST-- +bind and fetch cursor from a statement +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +bool(false) +Done diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt new file mode 100644 index 000000000..267c4d94f --- /dev/null +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -0,0 +1,48 @@ +--TEST-- +binding a cursor (with errors) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number in %s on line %d + +Warning: oci_fetch_assoc(): ORA-24338: statement handle not executed in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/cursors.phpt b/ext/oci8/tests/cursors.phpt new file mode 100644 index 000000000..6c92a2b91 --- /dev/null +++ b/ext/oci8/tests/cursors.phpt @@ -0,0 +1,59 @@ +--TEST-- +fetching cursor from a statement +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +bool(true) + +Warning: oci_fetch_assoc()%sORA-01002: fetch out of sequence in %scursors.php on line %d +bool(false) +bool(true) +Done diff --git a/ext/oci8/tests/cursors_old.phpt b/ext/oci8/tests/cursors_old.phpt new file mode 100644 index 000000000..cf3b5f957 --- /dev/null +++ b/ext/oci8/tests/cursors_old.phpt @@ -0,0 +1,64 @@ +--TEST-- +fetching cursor from a statement +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +bool(true) + +Warning: ocifetchinto():%sORA-01002: fetch out of sequence in %scursors_old.php on line %d +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +bool(true) +Done diff --git a/ext/oci8/tests/debug.phpt b/ext/oci8/tests/debug.phpt new file mode 100644 index 000000000..a3e393240 --- /dev/null +++ b/ext/oci8/tests/debug.phpt @@ -0,0 +1,31 @@ +--TEST-- +oci_internal_debug() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +OCI8 DEBUG: OCINlsEnvironmentVariableGet in php_oci_do_connect_ex() (%s/oci8.c:%d) +Done +OCI8 DEBUG: OCISessionEnd in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIHandleFree in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIServerDetach in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIHandleFree in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIHandleFree in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIHandleFree in php_oci_connection_close() (%s/oci8.c:%d) +OCI8 DEBUG: OCIHandleFree in php_oci_connection_close() (%s/oci8.c:%d) diff --git a/ext/oci8/tests/default_prefetch.phpt b/ext/oci8/tests/default_prefetch.phpt new file mode 100644 index 000000000..cc02b6a1c --- /dev/null +++ b/ext/oci8/tests/default_prefetch.phpt @@ -0,0 +1,50 @@ +--TEST-- +oci8.default_prefetch ini option +--SKIPIF-- + +--INI-- +oci8.default_prefetch=20 +--FILE-- + +--EXPECT-- +bool(true) +int(1) +Done diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt new file mode 100644 index 000000000..aa130e9f9 --- /dev/null +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -0,0 +1,50 @@ +--TEST-- +oci8.default_prefetch ini option +--SKIPIF-- + +--INI-- +oci8.default_prefetch=100 +--FILE-- + +--EXPECT-- +bool(true) +int(1) +Done diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt new file mode 100644 index 000000000..ac623a274 --- /dev/null +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -0,0 +1,53 @@ +--TEST-- +oci8.default_prefetch ini option +--SKIPIF-- + +--INI-- +oci8.default_prefetch=100 +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +int(1) +Done diff --git a/ext/oci8/tests/define.phpt b/ext/oci8/tests/define.phpt new file mode 100644 index 000000000..c76f360f2 --- /dev/null +++ b/ext/oci8/tests/define.phpt @@ -0,0 +1,41 @@ +--TEST-- +oci_define_by_name() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(4) "some" +Done diff --git a/ext/oci8/tests/define_old.phpt b/ext/oci8/tests/define_old.phpt new file mode 100644 index 000000000..da52e619c --- /dev/null +++ b/ext/oci8/tests/define_old.phpt @@ -0,0 +1,41 @@ +--TEST-- +ocidefinebyname() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(4) "some" +Done diff --git a/ext/oci8/tests/descriptors.phpt b/ext/oci8/tests/descriptors.phpt new file mode 100644 index 000000000..8be4f3a06 --- /dev/null +++ b/ext/oci8/tests/descriptors.phpt @@ -0,0 +1,49 @@ +--TEST-- +commit connection after destroying the descriptor +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(1) { + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +Done diff --git a/ext/oci8/tests/drop_table.inc b/ext/oci8/tests/drop_table.inc index 4e558f5e3..ffd99f5af 100644 --- a/ext/oci8/tests/drop_table.inc +++ b/ext/oci8/tests/drop_table.inc @@ -1,11 +1,11 @@ diff --git a/ext/oci8/tests/error.phpt b/ext/oci8/tests/error.phpt new file mode 100644 index 000000000..743820f90 --- /dev/null +++ b/ext/oci8/tests/error.phpt @@ -0,0 +1,40 @@ +--TEST-- +oci_error() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%s) of type (oci8 connection) +resource(%s) of type (oci8 statement) + +Warning: oci_execute(): ORA-00900: invalid SQL statement in %s on line %d +bool(false) +array(4) { + ["code"]=> + int(900) + ["message"]=> + string(32) "ORA-00900: invalid SQL statement" + ["offset"]=> + int(0) + ["sqltext"]=> + string(12) "WRONG SYNTAX" +} +Done diff --git a/ext/oci8/tests/error1.phpt b/ext/oci8/tests/error1.phpt new file mode 100644 index 000000000..28408f9c9 --- /dev/null +++ b/ext/oci8/tests/error1.phpt @@ -0,0 +1,18 @@ +--TEST-- +oci_error() when oci_connect() fails +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d +bool(false) +bool(false) +Done diff --git a/ext/oci8/tests/error_old.phpt b/ext/oci8/tests/error_old.phpt new file mode 100644 index 000000000..a6889c897 --- /dev/null +++ b/ext/oci8/tests/error_old.phpt @@ -0,0 +1,40 @@ +--TEST-- +ocierror() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%s) of type (oci8 connection) +resource(%s) of type (oci8 statement) + +Warning: ociexecute(): ORA-00900: invalid SQL statement in %s on line %d +bool(false) +array(4) { + ["code"]=> + int(900) + ["message"]=> + string(32) "ORA-00900: invalid SQL statement" + ["offset"]=> + int(0) + ["sqltext"]=> + string(12) "WRONG SYNTAX" +} +Done diff --git a/ext/oci8/tests/exec_fetch.phpt b/ext/oci8/tests/exec_fetch.phpt new file mode 100644 index 000000000..6734f6169 --- /dev/null +++ b/ext/oci8/tests/exec_fetch.phpt @@ -0,0 +1,19 @@ +--TEST-- +fetch after failed oci_execute() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Done diff --git a/ext/oci8/tests/execute_mode.phpt b/ext/oci8/tests/execute_mode.phpt new file mode 100644 index 000000000..90570cae8 --- /dev/null +++ b/ext/oci8/tests/execute_mode.phpt @@ -0,0 +1,19 @@ +--TEST-- +oci_execute() and invalid execute mode +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_execute(): Invalid execute mode given: -1 in %s on line %d +Done diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt new file mode 100644 index 000000000..33cba657b --- /dev/null +++ b/ext/oci8/tests/fetch.phpt @@ -0,0 +1,56 @@ +--TEST-- +ocifetch() & ociresult() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +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/fetch_all.phpt b/ext/oci8/tests/fetch_all.phpt new file mode 100644 index 000000000..5d3738b89 --- /dev/null +++ b/ext/oci8/tests/fetch_all.phpt @@ -0,0 +1,149 @@ +--TEST-- +oci_fetch_all() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(3) +array(5) { + ["ID"]=> + array(3) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + } + ["VALUE"]=> + array(3) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + } + ["BLOB"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } + ["CLOB"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } + ["STRING"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } +} +int(3) +array(5) { + ["ID"]=> + array(3) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + } + ["VALUE"]=> + array(3) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + string(1) "1" + } + ["BLOB"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } + ["CLOB"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } + ["STRING"]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } +} +Done diff --git a/ext/oci8/tests/fetch_array.phpt b/ext/oci8/tests/fetch_array.phpt new file mode 100644 index 000000000..bfffd4e7d --- /dev/null +++ b/ext/oci8/tests/fetch_array.phpt @@ -0,0 +1,230 @@ +--TEST-- +oci_fetch_array() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +Done diff --git a/ext/oci8/tests/fetch_assoc.phpt b/ext/oci8/tests/fetch_assoc.phpt new file mode 100644 index 000000000..2c9590db5 --- /dev/null +++ b/ext/oci8/tests/fetch_assoc.phpt @@ -0,0 +1,64 @@ +--TEST-- +oci_fetch_assoc() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +Done diff --git a/ext/oci8/tests/fetch_into.phpt b/ext/oci8/tests/fetch_into.phpt new file mode 100644 index 000000000..379f5fc14 --- /dev/null +++ b/ext/oci8/tests/fetch_into.phpt @@ -0,0 +1,82 @@ +--TEST-- +ocifetchinto() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(5) +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +int(5) +array(10) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" + [2]=> + NULL + ["BLOB"]=> + NULL + [3]=> + NULL + ["CLOB"]=> + NULL + [4]=> + NULL + ["STRING"]=> + NULL +} +Done diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt new file mode 100644 index 000000000..263590d14 --- /dev/null +++ b/ext/oci8/tests/fetch_into1.phpt @@ -0,0 +1,192 @@ +--TEST-- +various ocifetchinto() tests +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(5) +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +int(5) +array(2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +int(5) +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +int(5) +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +int(5) +array(4) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +int(5) +array(10) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" + [2]=> + NULL + ["BLOB"]=> + NULL + [3]=> + NULL + ["CLOB"]=> + NULL + [4]=> + NULL + ["STRING"]=> + NULL +} +int(5) +array(10) { + [0]=> + string(1) "1" + ["ID"]=> + string(1) "1" + [1]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" + [2]=> + NULL + ["BLOB"]=> + NULL + [3]=> + NULL + ["CLOB"]=> + NULL + [4]=> + NULL + ["STRING"]=> + NULL +} +int(5) +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +int(5) +array(5) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" + ["BLOB"]=> + NULL + ["CLOB"]=> + NULL + ["STRING"]=> + NULL +} +int(5) +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +Done diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt new file mode 100644 index 000000000..c196d39f6 --- /dev/null +++ b/ext/oci8/tests/fetch_into2.phpt @@ -0,0 +1,70 @@ +--TEST-- +ocifetchinto() & wrong number of params +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: ocifetchinto() expects at least 2 parameters, 1 given in %s on line %d +NULL + +Notice: Undefined variable: all in %s on line %d +NULL + +Warning: ocifetchinto() expects at most 3 parameters, 4 given in %s on line %d +NULL +NULL + +Warning: ocifetchinto(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) +NULL +int(5) +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +Done diff --git a/ext/oci8/tests/fetch_object.phpt b/ext/oci8/tests/fetch_object.phpt new file mode 100644 index 000000000..d6b2714b9 --- /dev/null +++ b/ext/oci8/tests/fetch_object.phpt @@ -0,0 +1,64 @@ +--TEST-- +oci_fetch_object() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +object(stdClass)#1 (2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +object(stdClass)#2 (2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +object(stdClass)#1 (2) { + ["ID"]=> + string(1) "1" + ["VALUE"]=> + string(1) "1" +} +Done diff --git a/ext/oci8/tests/fetch_row.phpt b/ext/oci8/tests/fetch_row.phpt new file mode 100644 index 000000000..d8a68cabb --- /dev/null +++ b/ext/oci8/tests/fetch_row.phpt @@ -0,0 +1,64 @@ +--TEST-- +oci_fetch_row() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +array(2) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" +} +Done diff --git a/ext/oci8/tests/field_funcs.phpt b/ext/oci8/tests/field_funcs.phpt new file mode 100644 index 000000000..2f1dbd710 --- /dev/null +++ b/ext/oci8/tests/field_funcs.phpt @@ -0,0 +1,105 @@ +--TEST-- +oci_field_*() family +--SKIPIF-- + +--FILE-- + $field) { + $num++; + var_dump(oci_field_is_null($s, $num)); + var_dump(oci_field_name($s, $num)); + var_dump(oci_field_type($s, $num)); + var_dump(oci_field_type_raw($s, $num)); + var_dump(oci_field_scale($s, $num)); + var_dump(oci_field_precision($s, $num)); + var_dump(oci_field_size($s, $num)); +} + + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +bool(false) +string(2) "ID" +string(6) "NUMBER" +int(2) +int(0) +int(0) +int(22) +bool(false) +string(5) "VALUE" +string(6) "NUMBER" +int(2) +int(0) +int(0) +int(22) +bool(true) +string(4) "BLOB" +string(4) "BLOB" +int(113) +int(0) +int(0) +int(4000) +bool(true) +string(4) "CLOB" +string(4) "CLOB" +int(112) +int(0) +int(0) +int(4000) +bool(true) +string(6) "STRING" +string(7) "VARCHAR" +int(1) +int(0) +int(0) +int(10) +Done diff --git a/ext/oci8/tests/field_funcs1.phpt b/ext/oci8/tests/field_funcs1.phpt new file mode 100644 index 000000000..68986e051 --- /dev/null +++ b/ext/oci8/tests/field_funcs1.phpt @@ -0,0 +1,179 @@ +--TEST-- +oci_field_*() family +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} + +Warning: oci_field_is_null(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_name(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_type(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_type_raw(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_scale(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_precision(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_size(): Invalid column index "-1" in %s on line %d +bool(false) + +Warning: oci_field_is_null(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_name(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_type(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_type_raw(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_scale(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_precision(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_size(): Invalid column name "none" in %s on line %d +bool(false) + +Warning: oci_field_is_null(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_name(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_type(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_type_raw(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_scale(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_precision(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_size(): supplied resource is not a valid oci8 statement resource in %s on line %d +bool(false) + +Warning: oci_field_is_null(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_name(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_type(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_type_raw(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_scale(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_precision(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_size(): Invalid column index "0" in %s on line %d +bool(false) + +Warning: oci_field_size() expects exactly 2 parameters, 1 given in %s on line %d +bool(false) +Done diff --git a/ext/oci8/tests/field_funcs_old.phpt b/ext/oci8/tests/field_funcs_old.phpt new file mode 100644 index 000000000..8627f6a78 --- /dev/null +++ b/ext/oci8/tests/field_funcs_old.phpt @@ -0,0 +1,105 @@ +--TEST-- +ocicolumn*() family +--SKIPIF-- + +--FILE-- + $field) { + $num++; + var_dump(ocicolumnisnull($s, $num)); + var_dump(ocicolumnname($s, $num)); + var_dump(ocicolumntype($s, $num)); + var_dump(ocicolumntyperaw($s, $num)); + var_dump(ocicolumnscale($s, $num)); + var_dump(ocicolumnprecision($s, $num)); + var_dump(ocicolumnsize($s, $num)); +} + + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +array(5) { + [0]=> + string(1) "1" + [1]=> + string(1) "1" + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL +} +bool(false) +string(2) "ID" +string(6) "NUMBER" +int(2) +int(0) +int(0) +int(22) +bool(false) +string(5) "VALUE" +string(6) "NUMBER" +int(2) +int(0) +int(0) +int(22) +bool(true) +string(4) "BLOB" +string(4) "BLOB" +int(113) +int(0) +int(0) +int(4000) +bool(true) +string(4) "CLOB" +string(4) "CLOB" +int(112) +int(0) +int(0) +int(4000) +bool(true) +string(6) "STRING" +string(7) "VARCHAR" +int(1) +int(0) +int(0) +int(10) +Done diff --git a/ext/oci8/tests/lob_001.phpt b/ext/oci8/tests/lob_001.phpt new file mode 100644 index 000000000..029888469 Binary files /dev/null and b/ext/oci8/tests/lob_001.phpt differ diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt new file mode 100644 index 000000000..ebbef1815 --- /dev/null +++ b/ext/oci8/tests/lob_002.phpt @@ -0,0 +1,66 @@ +--TEST-- +oci_lob_write() and friends (with errors) +--SKIPIF-- + +--FILE-- +write("test", -1)); +var_dump($blob->write("test", "str")); +var_dump($blob->write("test", 1000000)); +var_dump($blob->write(str_repeat("test", 10000), 1000000)); +var_dump($blob->tell()); +var_dump($blob->seek("str", -5)); +var_dump($blob->flush()); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name.""; +$s = oci_parse($c, $select_sql); +oci_execute($s); + +$row = oci_fetch_array($s, OCI_RETURN_LOBS); + +var_dump(strlen($row[0])); + + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +int(0) + +Warning: OCI-Lob::write() expects parameter 2 to be long, string given in %slob_002.php on line %d +NULL +int(4) +int(40000) +int(40004) + +Warning: OCI-Lob::seek() expects parameter 1 to be long, string given in %slob_002.php on line %d +NULL +bool(false) +int(40004) +Done diff --git a/ext/oci8/tests/lob_003.phpt b/ext/oci8/tests/lob_003.phpt new file mode 100644 index 000000000..8a492d16c Binary files /dev/null and b/ext/oci8/tests/lob_003.phpt differ diff --git a/ext/oci8/tests/lob_004.phpt b/ext/oci8/tests/lob_004.phpt new file mode 100644 index 000000000..32de4a012 --- /dev/null +++ b/ext/oci8/tests/lob_004.phpt @@ -0,0 +1,80 @@ +--TEST-- +oci_lob_seek()/rewind()/append() +--SKIPIF-- + +--FILE-- +write("test")); +var_dump($blob->rewind()); +var_dump($blob->write("str")); +var_dump($blob->seek(10, OCI_SEEK_SET)); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +var_dump($row = oci_fetch_array($s)); + +var_dump($row[0]->append($blob)); +var_dump($row[0]->read(10000)); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +$row = oci_fetch_array($s); + +var_dump($row[0]->read(10000)); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +int(4) +bool(true) +int(3) +bool(true) +array(2) { + [0]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +bool(true) +string(4) "strt" +string(8) "strtstrt" +Done diff --git a/ext/oci8/tests/lob_005.phpt b/ext/oci8/tests/lob_005.phpt new file mode 100644 index 000000000..e1ac6e534 --- /dev/null +++ b/ext/oci8/tests/lob_005.phpt @@ -0,0 +1,52 @@ +--TEST-- +oci_lob_is_equal() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(2) { + [0]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +bool(true) +Done diff --git a/ext/oci8/tests/lob_006.phpt b/ext/oci8/tests/lob_006.phpt new file mode 100644 index 000000000..3192ebc90 Binary files /dev/null and b/ext/oci8/tests/lob_006.phpt differ diff --git a/ext/oci8/tests/lob_007.phpt b/ext/oci8/tests/lob_007.phpt new file mode 100644 index 000000000..1fe63092c --- /dev/null +++ b/ext/oci8/tests/lob_007.phpt @@ -0,0 +1,66 @@ +--TEST-- +oci_lob_write()/size()/load() +--SKIPIF-- + +--FILE-- +size()); +var_dump($blob->write(str_repeat("string.", 1000))); +var_dump($blob->size()); +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +var_dump($row = oci_fetch_array($s)); + +var_dump($row[0]->size()); +var_dump(strlen($row[0]->load())); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +int(0) +int(7000) +int(7000) +array(2) { + [0]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +int(7000) +int(7000) +Done diff --git a/ext/oci8/tests/lob_008.phpt b/ext/oci8/tests/lob_008.phpt new file mode 100644 index 000000000..a36bb4a34 --- /dev/null +++ b/ext/oci8/tests/lob_008.phpt @@ -0,0 +1,65 @@ +--TEST-- +oci_lob_write()/read()/eof() +--SKIPIF-- + +--FILE-- +write(str_repeat("string.", 1000))); +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +var_dump($row = oci_fetch_array($s)); + + +$len = 0; +while (!$row[0]->eof()) { + $len += strlen($row[0]->read(1024)); +} +var_dump($len); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +int(7000) +array(2) { + [0]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +int(7000) +Done diff --git a/ext/oci8/tests/lob_009.phpt b/ext/oci8/tests/lob_009.phpt new file mode 100644 index 000000000..b9f740112 --- /dev/null +++ b/ext/oci8/tests/lob_009.phpt @@ -0,0 +1,69 @@ +--TEST-- +oci_lob_import()/read() +--SKIPIF-- + +--FILE-- +seek(10, OCI_SEEK_CUR)); +var_dump($blob->import(dirname(__FILE__)."/lob_009.txt")); +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +var_dump($row = oci_fetch_array($s)); + +while (!$row[0]->eof()) { + var_dump($row[0]->read(1024)); +} + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) +} +bool(true) +bool(true) +array(2) { + [0]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["BLOB"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +string(43) "this +is +a +test +file for +test lob_009.phpt +" +Done diff --git a/ext/oci8/tests/lob_009.txt b/ext/oci8/tests/lob_009.txt new file mode 100644 index 000000000..f57bc8af3 --- /dev/null +++ b/ext/oci8/tests/lob_009.txt @@ -0,0 +1,6 @@ +this +is +a +test +file for +test lob_009.phpt diff --git a/ext/oci8/tests/lob_010.phpt b/ext/oci8/tests/lob_010.phpt new file mode 100644 index 000000000..59f3e145f --- /dev/null +++ b/ext/oci8/tests/lob_010.phpt @@ -0,0 +1,46 @@ +--TEST-- +oci_lob_save() +--SKIPIF-- + +--FILE-- +save("string")); +var_dump($blob->save("string", 3)); +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +$row = oci_fetch_array($s); + +while (!$row[0]->eof()) { + var_dump($row[0]->read(1024)); +} + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +bool(true) +bool(true) +string(9) "strstring" +Done diff --git a/ext/oci8/tests/lob_011.phpt b/ext/oci8/tests/lob_011.phpt new file mode 100644 index 000000000..2dd78985f --- /dev/null +++ b/ext/oci8/tests/lob_011.phpt @@ -0,0 +1,76 @@ +--TEST-- +oci_lob_copy() +--SKIPIF-- + +--FILE-- +write("some string here. string, I said")); +oci_commit($c); + +$ora_sql = "INSERT INTO + ".$schema.$table_name." (id, blob) + VALUES (2, empty_blob()) + RETURNING + blob + INTO :v_blob "; + +$statement = oci_parse($c,$ora_sql); +$blob = oci_new_descriptor($c,OCI_D_LOB); +oci_bind_by_name($statement,":v_blob", $blob,-1,OCI_B_BLOB); +oci_execute($statement, OCI_DEFAULT); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." WHERE id = 1"; +$s = oci_parse($c, $select_sql); +oci_execute($s); + +$row1 = oci_fetch_array($s); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +$row2 = oci_fetch_array($s); + +var_dump(oci_lob_copy($row2[0], $row1[0])); +var_dump($row1[0]->read(100)); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +var_dump($row2 = oci_fetch_array($s, OCI_RETURN_LOBS)); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +int(32) +bool(true) +string(32) "some string here. string, I said" +array(1) { + [0]=> + string(32) "some string here. string, I said" +} +Done diff --git a/ext/oci8/tests/lob_012.phpt b/ext/oci8/tests/lob_012.phpt new file mode 100644 index 000000000..2061969bc --- /dev/null +++ b/ext/oci8/tests/lob_012.phpt @@ -0,0 +1,50 @@ +--TEST-- +oci_lob_export() +--SKIPIF-- + +--FILE-- +write("test string is here\nnew string")); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; +$s = oci_parse($c, $select_sql); +oci_execute($s, OCI_DEFAULT); + +$row = oci_fetch_array($s); + +var_dump($row[0]->export(dirname(__FILE__)."/lob_012.tmp", 3, 10)); + +var_dump(file_get_contents(dirname(__FILE__)."/lob_012.tmp")); + +@unlink(dirname(__FILE__)."/lob_012.tmp"); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +int(30) +bool(true) +string(10) "t string i" +Done diff --git a/ext/oci8/tests/lob_013.phpt b/ext/oci8/tests/lob_013.phpt new file mode 100644 index 000000000..c56de5619 --- /dev/null +++ b/ext/oci8/tests/lob_013.phpt @@ -0,0 +1,54 @@ +--TEST-- +lob buffering +--SKIPIF-- + +--FILE-- +write("test")); +var_dump($blob->getBuffering()); +var_dump($blob->setBuffering(true)); +var_dump($blob->write("test")); +var_dump($blob->getBuffering()); +var_dump($blob->flush()); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name.""; +$s = oci_parse($c, $select_sql); +oci_execute($s); + +$row = oci_fetch_array($s, OCI_RETURN_LOBS); + +var_dump($row[0]); + + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECT-- +int(4) +bool(false) +bool(true) +int(4) +bool(true) +bool(true) +string(8) "testtest" +Done diff --git a/ext/oci8/tests/lob_014.phpt b/ext/oci8/tests/lob_014.phpt new file mode 100644 index 000000000..60ed94531 --- /dev/null +++ b/ext/oci8/tests/lob_014.phpt @@ -0,0 +1,58 @@ +--TEST-- +oci_lob_free()/close() +--SKIPIF-- + +--FILE-- +write("test")); +var_dump($blob->close()); +var_dump($blob->write("test")); +var_dump($blob->free()); +var_dump($blob->write("test")); + +oci_commit($c); + +$select_sql = "SELECT blob FROM ".$schema.$table_name.""; +$s = oci_parse($c, $select_sql); +oci_execute($s); + +var_dump(oci_fetch_array($s, OCI_NUM + OCI_RETURN_LOBS)); + +require dirname(__FILE__).'/drop_table.inc'; + +echo "Done\n"; + +?> +--EXPECTF-- +int(4) + +Warning: OCI-Lob::close(): ORA-22289: cannot perform operation on an unopened file or LOB in %slob_014.php on line %d +bool(false) +int(4) +bool(true) + +Warning: OCI-Lob::write(): %d is not a valid oci8 descriptor resource in %slob_014.php on line %d +bool(false) +array(1) { + [0]=> + string(8) "testtest" +} +Done diff --git a/ext/oci8/tests/lob_015.phpt b/ext/oci8/tests/lob_015.phpt new file mode 100644 index 000000000..d2b7f0ad4 --- /dev/null +++ b/ext/oci8/tests/lob_015.phpt @@ -0,0 +1,51 @@ +--TEST-- +various tests with wrong param count +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_new_descriptor() expects at most 2 parameters, 5 given in %slob_015.php on line %d + +Warning: oci_bind_by_name() expects at most 5 parameters, 6 given in %slob_015.php on line %d + +Warning: oci_bind_by_name() expects at most 5 parameters, 7 given in %slob_015.php on line %d + +Notice: Object of class OCI-Lob to string conversion in %slob_015.php on line %d + +Warning: oci_bind_by_name() expects at least 3 parameters, 2 given in %slob_015.php on line %d + +Warning: oci_bind_by_name() expects at least 3 parameters, 1 given in %slob_015.php on line %d + +Warning: oci_execute(): ORA-00932: inconsistent datatypes: expected NUMBER got BLOB in %slob_015.php on line %d +string(6) "Object" +Done diff --git a/ext/oci8/tests/lob_016.phpt b/ext/oci8/tests/lob_016.phpt new file mode 100644 index 000000000..642e7195e --- /dev/null +++ b/ext/oci8/tests/lob_016.phpt @@ -0,0 +1,67 @@ +--TEST-- +returning multiple lobs +--SKIPIF-- + +--FILE-- +write("first"); +$row['LOB_2']->write("second"); + +unset($row); + +oci_commit($c); + +$select = "SELECT * FROM lob_test FOR UPDATE"; +$statement = oci_parse($c, $select); +oci_execute($statement, OCI_DEFAULT); + +$row = oci_fetch_assoc($statement); + +var_dump($row); +var_dump($row['LOB_1']->load()); +var_dump($row['LOB_2']->load()); + +$drop = "DROP table lob_test"; +$statement = oci_parse($c, $drop); +@oci_execute($statement); + +echo "Done\n"; + +?> +--EXPECTF-- +array(2) { + ["LOB_1"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["LOB_2"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +string(5) "first" +string(6) "second" +Done diff --git a/ext/oci8/tests/lob_017.phpt b/ext/oci8/tests/lob_017.phpt new file mode 100644 index 000000000..ed12cc468 --- /dev/null +++ b/ext/oci8/tests/lob_017.phpt @@ -0,0 +1,69 @@ +--TEST-- +returning multiple lobs (using persistent connection) +--SKIPIF-- + +--FILE-- +write("first"); +$row['LOB_2']->write("second"); + +unset($row); + +oci_commit($c); + +$select = "SELECT * FROM lob_test FOR UPDATE"; +$statement = oci_parse($c, $select); +oci_execute($statement, OCI_DEFAULT); + +$row = oci_fetch_assoc($statement); + +var_dump($row); +var_dump($row['LOB_1']->load()); +var_dump($row['LOB_2']->load()); + +$drop = "DROP table lob_test"; +$statement = oci_parse($c, $drop); +@oci_execute($statement); + +echo "Done\n"; + +?> +--EXPECTF-- +array(2) { + ["LOB_1"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } + ["LOB_2"]=> + object(OCI-Lob)#%d (1) { + ["descriptor"]=> + resource(%d) of type (oci8 descriptor) + } +} +string(5) "first" +string(6) "second" +Done diff --git a/ext/oci8/tests/lob_018.phpt b/ext/oci8/tests/lob_018.phpt new file mode 100644 index 000000000..35cec4bd7 --- /dev/null +++ b/ext/oci8/tests/lob_018.phpt @@ -0,0 +1,67 @@ +--TEST-- +fetching the same lob several times +--SKIPIF-- + +--FILE-- +save("data"); + +oci_commit($c); + +$init = "INSERT INTO lob_test (mykey, lob_1) VALUES(2, EMPTY_CLOB()) RETURNING lob_1 INTO :mylob"; +$statement = oci_parse($c, $init); +$clob = oci_new_descriptor($c, OCI_D_LOB); +oci_bind_by_name($statement, ":mylob", $clob, -1, OCI_B_CLOB); +oci_execute($statement, OCI_DEFAULT); +$clob->save("long data"); + +oci_commit($c); + + +$query = 'SELECT * FROM lob_test ORDER BY mykey ASC'; +$statement = oci_parse ($c, $query); +oci_execute($statement, OCI_DEFAULT); + +while ($row = oci_fetch_array($statement, OCI_ASSOC)) { + $result = $row['LOB_1']->load(); + var_dump($result); +} + +$query = 'SELECT * FROM lob_test ORDER BY mykey DESC'; +$statement = oci_parse ($c, $query); +oci_execute($statement, OCI_DEFAULT); + +while ($row = oci_fetch_array($statement, OCI_ASSOC)) { + $result = $row['LOB_1']->load(); + var_dump($result); +} + +$drop = "DROP table lob_test"; +$statement = oci_parse($c, $drop); +@oci_execute($statement); + +echo "Done\n"; + +?> +--EXPECTF-- +string(4) "data" +string(9) "long data" +string(9) "long data" +string(4) "data" +Done diff --git a/ext/oci8/tests/lob_temp.phpt b/ext/oci8/tests/lob_temp.phpt new file mode 100644 index 000000000..cad2d3905 --- /dev/null +++ b/ext/oci8/tests/lob_temp.phpt @@ -0,0 +1,36 @@ +--TEST-- +temporary lobs +--SKIPIF-- + +--FILE-- +writeTemporary("test")); +var_dump($blob->load()); +var_dump($blob->seek(0, SEEK_SET)); +var_dump($blob->read(2)); + +$c = oci_pconnect($user, $password, $dbase); + +$blob = oci_new_descriptor($c,OCI_D_LOB); +var_dump($blob->writeTemporary("test")); +var_dump($blob->load()); +var_dump($blob->seek(0, SEEK_SET)); +var_dump($blob->read(2)); + +echo "Done\n"; + +?> +--EXPECTF-- +bool(true) +string(4) "test" +bool(true) +string(2) "te" +bool(true) +string(4) "test" +bool(true) +string(2) "te" +Done diff --git a/ext/oci8/tests/lob_temp1.phpt b/ext/oci8/tests/lob_temp1.phpt new file mode 100644 index 000000000..2482d65f6 --- /dev/null +++ b/ext/oci8/tests/lob_temp1.phpt @@ -0,0 +1,32 @@ +--TEST-- +closing temporary lobs +--SKIPIF-- + +--FILE-- +writeTemporary("test")); +var_dump($blob->load()); +var_dump($blob->close()); + +$c = oci_pconnect($user, $password, $dbase); + +$blob = oci_new_descriptor($c,OCI_D_LOB); +var_dump($blob->writeTemporary("test")); +var_dump($blob->load()); +var_dump($blob->close()); + +echo "Done\n"; + +?> +--EXPECTF-- +bool(true) +string(4) "test" +bool(true) +bool(true) +string(4) "test" +bool(true) +Done diff --git a/ext/oci8/tests/num.phpt b/ext/oci8/tests/num.phpt new file mode 100644 index 000000000..3c333b4e3 --- /dev/null +++ b/ext/oci8/tests/num.phpt @@ -0,0 +1,66 @@ +--TEST-- +oci_num_*() family +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(0) +int(0) +int(5) +int(5) +int(3) +Done diff --git a/ext/oci8/tests/oci_execute_segfault.phpt b/ext/oci8/tests/oci_execute_segfault.phpt new file mode 100644 index 000000000..3859f4ffe --- /dev/null +++ b/ext/oci8/tests/oci_execute_segfault.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_execute() segfault after repeated bind +--SKIPIF-- + +--FILE-- + +--EXPECT-- +Done diff --git a/ext/oci8/tests/old_oci_close.phpt b/ext/oci8/tests/old_oci_close.phpt new file mode 100644 index 000000000..f15b7febe --- /dev/null +++ b/ext/oci8/tests/old_oci_close.phpt @@ -0,0 +1,23 @@ +--TEST-- +oci8.old_oci_close_semantics On +--SKIPIF-- + +--INI-- +oci8.old_oci_close_semantics=1 +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +NULL +resource(%d) of type (oci8 statement) +Done diff --git a/ext/oci8/tests/old_oci_close1.phpt b/ext/oci8/tests/old_oci_close1.phpt new file mode 100644 index 000000000..9af2eeb39 --- /dev/null +++ b/ext/oci8/tests/old_oci_close1.phpt @@ -0,0 +1,25 @@ +--TEST-- +oci8.old_oci_close_semantics Off +--SKIPIF-- + +--INI-- +oci8.old_oci_close_semantics=0 +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +bool(true) + +Warning: oci_parse() expects parameter 1 to be resource, null given in %s on line %d +NULL +Done diff --git a/ext/oci8/tests/password.phpt b/ext/oci8/tests/password.phpt new file mode 100644 index 000000000..a31843cfd --- /dev/null +++ b/ext/oci8/tests/password.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_password_change() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +Done diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt new file mode 100644 index 000000000..a31843cfd --- /dev/null +++ b/ext/oci8/tests/password_new.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_password_change() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +Done diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt new file mode 100644 index 000000000..d293fce87 --- /dev/null +++ b/ext/oci8/tests/password_old.phpt @@ -0,0 +1,30 @@ +--TEST-- +ocipasswordchange() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +resource(%d) of type (oci8 connection) +bool(true) +Done diff --git a/ext/oci8/tests/persistent.phpt b/ext/oci8/tests/persistent.phpt new file mode 100644 index 000000000..884cd35a4 --- /dev/null +++ b/ext/oci8/tests/persistent.phpt @@ -0,0 +1,26 @@ +--TEST-- +reusing persistent connections +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 persistent connection) +resource(%d) of type (oci8 persistent connection) +resource(%d) of type (oci8 persistent connection) +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +resource(%d) of type (oci8 connection) +Done diff --git a/ext/oci8/tests/prefetch.phpt b/ext/oci8/tests/prefetch.phpt new file mode 100644 index 000000000..fa4b8fdc6 --- /dev/null +++ b/ext/oci8/tests/prefetch.phpt @@ -0,0 +1,51 @@ +--TEST-- +oci_set_prefetch() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +int(1) +Done diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt new file mode 100644 index 000000000..cb9cb390e --- /dev/null +++ b/ext/oci8/tests/prefetch_old.phpt @@ -0,0 +1,51 @@ +--TEST-- +ocisetprefetch() +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +int(1) +Done diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt new file mode 100644 index 000000000..39122240a --- /dev/null +++ b/ext/oci8/tests/privileged_connect.phpt @@ -0,0 +1,25 @@ +--TEST-- +privileged connect tests +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA in %s on line %d + +Warning: oci_connect(): Privileged connect is disabled. Enable oci8.privileged_connect to be able to connect as SYSOPER or SYSDBA in %s on line %d + +Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d + +Warning: oci_connect() expects parameter 5 to be long, string given in %s on line %d +Done diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt new file mode 100644 index 000000000..a05a21093 --- /dev/null +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -0,0 +1,27 @@ +--TEST-- +privileged connect tests +--SKIPIF-- + +--INI-- +oci8.privileged_connect=1 +--FILE-- + +--EXPECTF-- +Warning: oci_connect(): ORA-01031: insufficient privileges in %s on line %d + +Warning: oci_connect(): ORA-01031: insufficient privileges in %s on line %d + +Warning: oci_connect(): Invalid session mode specified (-1) in %s on line %d + +Warning: oci_connect() expects parameter 5 to be long, string given in %s on line %d +Done diff --git a/ext/oci8/tests/select_null.phpt b/ext/oci8/tests/select_null.phpt new file mode 100644 index 000000000..20307b3e2 --- /dev/null +++ b/ext/oci8/tests/select_null.phpt @@ -0,0 +1,23 @@ +--TEST-- +SELECTing NULL values +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(1) { + [0]=> + NULL +} +Done diff --git a/ext/oci8/tests/serverversion.phpt b/ext/oci8/tests/serverversion.phpt new file mode 100644 index 000000000..bf32fe4b5 --- /dev/null +++ b/ext/oci8/tests/serverversion.phpt @@ -0,0 +1,30 @@ +--TEST-- +oci_server_version() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +string(%d) "%s" +string(%d) "%s" +Done diff --git a/ext/oci8/tests/statement_cache.phpt b/ext/oci8/tests/statement_cache.phpt new file mode 100644 index 000000000..e7c8911e8 --- /dev/null +++ b/ext/oci8/tests/statement_cache.phpt @@ -0,0 +1,35 @@ +--TEST-- +statement cache +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(2) { + [0]=> + string(1) "4" + ["1+3"]=> + string(1) "4" +} +array(2) { + [0]=> + string(1) "4" + ["1+3"]=> + string(1) "4" +} +Done diff --git a/ext/oci8/tests/statement_type.phpt b/ext/oci8/tests/statement_type.phpt new file mode 100644 index 000000000..45221a6c7 --- /dev/null +++ b/ext/oci8/tests/statement_type.phpt @@ -0,0 +1,46 @@ +--TEST-- +oci_statement_type() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +string(6) "SELECT" +string(6) "DELETE" +string(6) "INSERT" +string(6) "UPDATE" +string(4) "DROP" +string(6) "CREATE" +string(7) "UNKNOWN" +string(7) "UNKNOWN" +Done diff --git a/ext/oci8/tests/statement_type_old.phpt b/ext/oci8/tests/statement_type_old.phpt new file mode 100644 index 000000000..13da41bf7 --- /dev/null +++ b/ext/oci8/tests/statement_type_old.phpt @@ -0,0 +1,46 @@ +--TEST-- +ocistatementtype() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (oci8 connection) +string(6) "SELECT" +string(6) "DELETE" +string(6) "INSERT" +string(6) "UPDATE" +string(4) "DROP" +string(6) "CREATE" +string(7) "UNKNOWN" +string(7) "UNKNOWN" +Done diff --git a/ext/oci8/tests/uncommitted.phpt b/ext/oci8/tests/uncommitted.phpt new file mode 100644 index 000000000..3c341c8cb --- /dev/null +++ b/ext/oci8/tests/uncommitted.phpt @@ -0,0 +1,16 @@ +--TEST-- +uncommitted connection +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Done diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index 9ed07f4b8..60e76cd56 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: birdstep.c,v 1.13 2005/08/03 14:07:34 sniper Exp $ */ +/* $Id: birdstep.c,v 1.13.2.2 2006/01/01 12:50:10 sniper Exp $ */ /* * TODO: @@ -48,7 +48,7 @@ #include "php_birdstep.h" #include "ext/standard/info.h" -function_entry birdstep_functions[] = { +zend_function_entry birdstep_functions[] = { PHP_FE(birdstep_connect, NULL) PHP_FE(birdstep_close, NULL) PHP_FE(birdstep_exec, NULL) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index 1285f789f..107ea734e 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.78.2.1 2005/11/21 19:06:02 sniper Exp $ +dnl $Id: config.m4,v 1.78.2.2 2006/01/10 14:15:35 tony2001 Exp $ dnl AC_DEFUN([PHP_ODBC_CHECK_HEADER],[ @@ -578,7 +578,7 @@ if test -n "$ODBC_TYPE"; then if test "$ODBC_TYPE" != "dbmaker"; then ext_shared=$shared PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD) - if test "$ODBC_TYPE" != "birdstep"; then + if test "$ODBC_TYPE" != "birdstep" && test "$ODBC_TYPE" != "solid"; then AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ]) fi fi diff --git a/ext/odbc/php_birdstep.h b/ext/odbc/php_birdstep.h index 7c9e2ad79..b7180ec0e 100644 --- a/ext/odbc/php_birdstep.h +++ b/ext/odbc/php_birdstep.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_birdstep.h,v 1.5 2005/08/03 14:07:34 sniper Exp $ */ +/* $Id: php_birdstep.h,v 1.5.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_BIRDSTEP_H #define PHP_BIRDSTEP_H diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 3bd9cf531..83f18c839 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.189.2.1 2005/09/08 06:19:07 dmitry Exp $ */ +/* $Id: php_odbc.c,v 1.189.2.4 2006/01/01 12:50:10 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -68,7 +68,7 @@ static int le_result, le_conn, le_pconn; /* {{{ odbc_functions[] */ -function_entry odbc_functions[] = { +zend_function_entry odbc_functions[] = { PHP_FE(odbc_autocommit, NULL) PHP_FE(odbc_binmode, NULL) PHP_FE(odbc_close, NULL) @@ -616,7 +616,7 @@ void odbc_sql_error(ODBC_SQL_ERROR_PARAMS) void php_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode) { odbc_result *result; - pval **pv_res, **pv_flag; + zval **pv_res, **pv_flag; if (zend_get_parameters_ex(2, &pv_res, &pv_flag) == FAILURE) WRONG_PARAM_COUNT; @@ -697,7 +697,7 @@ void odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int type) { odbc_connection *conn; RETCODE rc; - pval **pv_conn; + zval **pv_conn; if (zend_get_parameters_ex(1, &pv_conn) == FAILURE) { WRONG_PARAM_COUNT; @@ -716,7 +716,7 @@ void odbc_transact(INTERNAL_FUNCTION_PARAMETERS, int type) /* }}} */ /* {{{ _close_pconn_with_id */ -static int _close_pconn_with_id(list_entry *le, int *id TSRMLS_DC) +static int _close_pconn_with_id(zend_rsrc_list_entry *le, int *id TSRMLS_DC) { if(Z_TYPE_P(le) == le_pconn && (((odbc_connection *)(le->ptr))->id == *id)){ return 1; @@ -741,7 +741,7 @@ void odbc_column_lengths(INTERNAL_FUNCTION_PARAMETERS, int type) #else SQLINTEGER len; #endif - pval **pv_res, **pv_num; + zval **pv_res, **pv_num; if (zend_get_parameters_ex(2, &pv_res, &pv_num) == FAILURE) { WRONG_PARAM_COUNT; @@ -838,7 +838,7 @@ PHP_FUNCTION(odbc_longreadlen) Prepares a statement for execution */ PHP_FUNCTION(odbc_prepare) { - pval **pv_conn, **pv_query; + zval **pv_conn, **pv_query; char *query; odbc_result *result = NULL; odbc_connection *conn; @@ -934,7 +934,7 @@ PHP_FUNCTION(odbc_prepare) Execute a prepared statement */ PHP_FUNCTION(odbc_execute) { - pval **pv_res, **pv_param_arr, **tmp; + zval **pv_res, **pv_param_arr, **tmp; typedef struct params_t { SDWORD vallen; int fp; @@ -1134,7 +1134,7 @@ PHP_FUNCTION(odbc_execute) Get cursor name */ PHP_FUNCTION(odbc_cursor) { - pval **pv_res; + zval **pv_res; SWORD len, max_len; char *cursorname; odbc_result *result; @@ -1254,7 +1254,7 @@ PHP_FUNCTION(odbc_data_source) /* XXX Use flags */ PHP_FUNCTION(odbc_exec) { - pval **pv_conn, **pv_query, **pv_flags; + zval **pv_conn, **pv_query, **pv_flags; int numArgs; char *query; odbc_result *result = NULL; @@ -1363,7 +1363,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) UDWORD crow; UWORD RowStatus[1]; SDWORD rownum = -1; - pval **pv_res, **pv_row, *tmp; + zval **pv_res, **pv_row, *tmp; switch(ZEND_NUM_ARGS()) { case 1: @@ -1383,7 +1383,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) } #else - pval **pv_res, *tmp; + zval **pv_res, *tmp; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pv_res) == FAILURE) { WRONG_PARAM_COUNT; @@ -1472,14 +1472,14 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) } if (result_type & ODBC_NUM) { - zend_hash_index_update(Z_ARRVAL_P(return_value), i, &tmp, sizeof(pval *), NULL); + zend_hash_index_update(Z_ARRVAL_P(return_value), i, &tmp, sizeof(zval *), NULL); } else { if (!*(result->values[i].name)) { zend_hash_update(Z_ARRVAL_P(return_value), Z_STRVAL_P(tmp), - Z_STRLEN_P(tmp)+1, &tmp, sizeof(pval *), NULL); + Z_STRLEN_P(tmp)+1, &tmp, sizeof(zval *), NULL); } else { zend_hash_update(Z_ARRVAL_P(return_value), result->values[i].name, - strlen(result->values[i].name)+1, &tmp, sizeof(pval *), NULL); + strlen(result->values[i].name)+1, &tmp, sizeof(zval *), NULL); } } } @@ -1517,9 +1517,9 @@ PHP_FUNCTION(odbc_fetch_into) RETCODE rc; SWORD sql_c_type; char *buf = NULL; - pval **pv_res, **pv_res_arr, *tmp; + zval **pv_res, **pv_res_arr, *tmp; #ifdef HAVE_SQL_EXTENDED_FETCH - pval **pv_row; + zval **pv_row; UDWORD crow; UWORD RowStatus[1]; SDWORD rownum = -1; @@ -1629,7 +1629,7 @@ PHP_FUNCTION(odbc_fetch_into) Z_STRVAL_P(tmp) = estrndup(result->values[i].value,Z_STRLEN_P(tmp)); break; } - zend_hash_index_update(Z_ARRVAL_PP(pv_res_arr), i, &tmp, sizeof(pval *), NULL); + zend_hash_index_update(Z_ARRVAL_PP(pv_res_arr), i, &tmp, sizeof(zval *), NULL); } if (buf) efree(buf); RETURN_LONG(result->numcols); @@ -1643,7 +1643,7 @@ PHP_FUNCTION(solid_fetch_prev) { odbc_result *result; RETCODE rc; - pval **pv_res; + zval **pv_res; if (zend_get_parameters_ex(1, &pv_res) == FAILURE) { WRONG_PARAM_COUNT; @@ -1675,7 +1675,7 @@ PHP_FUNCTION(odbc_fetch_row) SDWORD rownum = 1; odbc_result *result; RETCODE rc; - pval **pv_res, **pv_row; + zval **pv_res, **pv_row; #ifdef HAVE_SQL_EXTENDED_FETCH UDWORD crow; UWORD RowStatus[1]; @@ -1739,7 +1739,7 @@ PHP_FUNCTION(odbc_result) int i = 0; RETCODE rc; SDWORD fieldsize; - pval **pv_res, **pv_field; + zval **pv_res, **pv_field; #ifdef HAVE_SQL_EXTENDED_FETCH UDWORD crow; UWORD RowStatus[1]; @@ -1909,7 +1909,7 @@ PHP_FUNCTION(odbc_result_all) int i, numArgs; odbc_result *result; RETCODE rc; - pval **pv_res, **pv_format; + zval **pv_res, **pv_format; SWORD sql_c_type; #ifdef HAVE_SQL_EXTENDED_FETCH UDWORD crow; @@ -2028,7 +2028,7 @@ PHP_FUNCTION(odbc_result_all) Free resources associated with a result */ PHP_FUNCTION(odbc_free_result) { - pval **pv_res; + zval **pv_res; odbc_result *result; int i; @@ -2213,7 +2213,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) char *db = NULL; char *uid = NULL; char *pwd = NULL; - pval **pv_db, **pv_uid, **pv_pwd, **pv_opt; + zval **pv_db, **pv_uid, **pv_pwd, **pv_opt; odbc_connection *db_conn; char *hashed_details; int hashed_len, cur_opt; @@ -2274,11 +2274,11 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) try_and_get_another_connection: if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_len + 1, (void **) &le) == FAILURE) { /* the link is not in the persistent list */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (ODBCG(max_links) != -1 && ODBCG(num_links) >= ODBCG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", ODBCG(num_links)); @@ -2299,7 +2299,7 @@ try_and_get_another_connection: Z_TYPE(new_le) = le_pconn; new_le.ptr = db_conn; if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_len + 1, &new_le, - sizeof(list_entry), NULL) == FAILURE) { + sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { free(db_conn); efree(hashed_details); RETURN_FALSE; @@ -2343,7 +2343,7 @@ try_and_get_another_connection: } db_conn->id = ZEND_REGISTER_RESOURCE(return_value, db_conn, le_pconn); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; if (zend_hash_find(&EG(regular_list), hashed_details, hashed_len + 1, (void **) &index_ptr) == SUCCESS) { @@ -2378,7 +2378,7 @@ try_and_get_another_connection: new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; if (zend_hash_update(&EG(regular_list), hashed_details, hashed_len + 1, (void *) &new_index_ptr, - sizeof(list_entry), NULL) == FAILURE) { + sizeof(zend_rsrc_list_entry), NULL) == FAILURE) { efree(hashed_details); RETURN_FALSE; /* XXX Free Connection */ @@ -2393,7 +2393,7 @@ try_and_get_another_connection: Close an ODBC connection */ PHP_FUNCTION(odbc_close) { - pval **pv_conn; + zval **pv_conn; void *ptr; odbc_connection *conn; odbc_result *res; @@ -2439,7 +2439,7 @@ PHP_FUNCTION(odbc_num_rows) { odbc_result *result; SDWORD rows; - pval **pv_res; + zval **pv_res; if (zend_get_parameters_ex(1, &pv_res) == FAILURE) { WRONG_PARAM_COUNT; @@ -2456,7 +2456,7 @@ PHP_FUNCTION(odbc_num_rows) PHP_FUNCTION(odbc_next_result) { odbc_result *result; - pval **pv_res; + zval **pv_res; int rc, i; if (zend_get_parameters_ex(1, &pv_res) == FAILURE) { @@ -2504,7 +2504,7 @@ PHP_FUNCTION(odbc_next_result) PHP_FUNCTION(odbc_num_fields) { odbc_result *result; - pval **pv_res; + zval **pv_res; if (zend_get_parameters_ex(1, &pv_res) == FAILURE) { WRONG_PARAM_COUNT; @@ -2519,7 +2519,7 @@ PHP_FUNCTION(odbc_num_fields) PHP_FUNCTION(odbc_field_name) { odbc_result *result; - pval **pv_res, **pv_num; + zval **pv_res, **pv_num; if (zend_get_parameters_ex(2, &pv_res, &pv_num) == FAILURE) { WRONG_PARAM_COUNT; @@ -2555,7 +2555,7 @@ PHP_FUNCTION(odbc_field_type) odbc_result *result; char tmp[32]; SWORD tmplen; - pval **pv_res, **pv_num; + zval **pv_res, **pv_num; if (zend_get_parameters_ex(2, &pv_res, &pv_num) == FAILURE) { WRONG_PARAM_COUNT; @@ -2610,7 +2610,7 @@ PHP_FUNCTION(odbc_field_num) char *fname; odbc_result *result; int i; - pval **pv_res, **pv_name; + zval **pv_res, **pv_name; if (zend_get_parameters_ex(2, &pv_res, &pv_name) == FAILURE) { WRONG_PARAM_COUNT; @@ -2645,7 +2645,7 @@ PHP_FUNCTION(odbc_autocommit) { odbc_connection *conn; RETCODE rc; - pval **pv_conn, **pv_onoff = NULL; + zval **pv_conn, **pv_onoff = NULL; int argc; argc = ZEND_NUM_ARGS(); @@ -2706,7 +2706,7 @@ PHP_FUNCTION(odbc_rollback) static void php_odbc_lasterror(INTERNAL_FUNCTION_PARAMETERS, int mode) { odbc_connection *conn; - pval **pv_handle; + zval **pv_handle; char *ptr; int argc, len; @@ -2771,7 +2771,7 @@ PHP_FUNCTION(odbc_setoption) odbc_connection *conn; odbc_result *result; RETCODE rc; - pval **pv_handle, **pv_which, **pv_opt, **pv_val; + zval **pv_handle, **pv_which, **pv_opt, **pv_val; if (zend_get_parameters_ex(4, &pv_handle, &pv_which, &pv_opt, &pv_val) == FAILURE) { WRONG_PARAM_COUNT; @@ -2822,7 +2822,7 @@ PHP_FUNCTION(odbc_setoption) Call the SQLTables function */ PHP_FUNCTION(odbc_tables) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_type; + zval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_type; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL, *type = NULL; @@ -2901,7 +2901,7 @@ PHP_FUNCTION(odbc_tables) Returns a result identifier that can be used to fetch a list of column names in specified tables */ PHP_FUNCTION(odbc_columns) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_column; + zval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_column; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL, *column = NULL; @@ -2988,7 +2988,7 @@ PHP_FUNCTION(odbc_columns) Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table */ PHP_FUNCTION(odbc_columnprivileges) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_column; + zval **pv_conn, **pv_cat, **pv_schema, **pv_table, **pv_column; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL, *column = NULL; @@ -3064,8 +3064,8 @@ PHP_FUNCTION(odbc_columnprivileges) Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table */ PHP_FUNCTION(odbc_foreignkeys) { - pval **pv_conn, **pv_pcat, **pv_pschema, **pv_ptable; - pval **pv_fcat, **pv_fschema, **pv_ftable; + zval **pv_conn, **pv_pcat, **pv_pschema, **pv_ptable; + zval **pv_fcat, **pv_fschema, **pv_ftable; odbc_result *result = NULL; odbc_connection *conn; char *pcat = NULL, *pschema = NULL, *ptable = NULL; @@ -3159,7 +3159,7 @@ PHP_FUNCTION(odbc_foreignkeys) Returns a result identifier containing information about data types supported by the data source */ PHP_FUNCTION(odbc_gettypeinfo) { - pval **pv_conn, **pv_data_type; + zval **pv_conn, **pv_data_type; odbc_result *result = NULL; odbc_connection *conn; RETCODE rc; @@ -3227,7 +3227,7 @@ PHP_FUNCTION(odbc_gettypeinfo) Returns a result identifier listing the column names that comprise the primary key for a table */ PHP_FUNCTION(odbc_primarykeys) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_table; + zval **pv_conn, **pv_cat, **pv_schema, **pv_table; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL; @@ -3299,7 +3299,7 @@ PHP_FUNCTION(odbc_primarykeys) Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures */ PHP_FUNCTION(odbc_procedurecolumns) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_proc, **pv_col; + zval **pv_conn, **pv_cat, **pv_schema, **pv_proc, **pv_col; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *proc = NULL, *col = NULL; @@ -3379,7 +3379,7 @@ PHP_FUNCTION(odbc_procedurecolumns) Returns a result identifier containg the list of procedure names in a datasource */ PHP_FUNCTION(odbc_procedures) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_proc; + zval **pv_conn, **pv_cat, **pv_schema, **pv_proc; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *proc = NULL; @@ -3455,8 +3455,8 @@ PHP_FUNCTION(odbc_procedures) Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction */ PHP_FUNCTION(odbc_specialcolumns) { - pval **pv_conn, **pv_type, **pv_cat, **pv_schema, **pv_name; - pval **pv_scope, **pv_nullable; + zval **pv_conn, **pv_type, **pv_cat, **pv_schema, **pv_name; + zval **pv_scope, **pv_nullable; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *name = NULL; @@ -3539,8 +3539,8 @@ PHP_FUNCTION(odbc_specialcolumns) Returns a result identifier that contains statistics about a single table and the indexes associated with the table */ PHP_FUNCTION(odbc_statistics) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_name; - pval **pv_unique, **pv_reserved; + zval **pv_conn, **pv_cat, **pv_schema, **pv_name; + zval **pv_unique, **pv_reserved; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *name = NULL; @@ -3620,7 +3620,7 @@ PHP_FUNCTION(odbc_statistics) Returns a result identifier containing a list of tables and the privileges associated with each table */ PHP_FUNCTION(odbc_tableprivileges) { - pval **pv_conn, **pv_cat, **pv_schema, **pv_table; + zval **pv_conn, **pv_cat, **pv_schema, **pv_table; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL; diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h index 2c2b5bfe1..a1beb4a3e 100644 --- a/ext/odbc/php_odbc.h +++ b/ext/odbc/php_odbc.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.h,v 1.60 2005/08/03 14:07:34 sniper Exp $ */ +/* $Id: php_odbc.h,v 1.60.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_ODBC_H #define PHP_ODBC_H diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index 254896fb3..2bec71a2e 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc_includes.h,v 1.12 2005/08/03 14:07:34 sniper Exp $ */ +/* $Id: php_odbc_includes.h,v 1.12.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_ODBC_INCLUDES_H #define PHP_ODBC_INCLUDES_H diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index cc3f4e08d..9d306ea86 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.98.2.1 2005/08/18 13:34:37 sniper Exp $ */ +/* $Id: openssl.c,v 1.98.2.4 2006/01/01 12:50:10 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -79,7 +79,7 @@ enum php_openssl_cipher_type { /* {{{ openssl_functions[] */ -function_entry openssl_functions[] = { +zend_function_entry openssl_functions[] = { /* public/private key functions */ PHP_FE(openssl_pkey_free, NULL) PHP_FE(openssl_pkey_new, NULL) @@ -584,6 +584,7 @@ PHP_MINIT_FUNCTION(openssl) le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number); le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number); + SSL_library_init(); OpenSSL_add_all_ciphers(); OpenSSL_add_all_digests(); OpenSSL_add_all_algorithms(); diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index 15820a61c..1204f3fc8 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_openssl.h,v 1.16 2005/08/03 14:07:36 sniper Exp $ */ +/* $Id: php_openssl.h,v 1.16.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_OPENSSL_H #define PHP_OPENSSL_H diff --git a/ext/openssl/tests/001.phpt b/ext/openssl/tests/001.phpt index 9987c688b..4ca9970bc 100644 --- a/ext/openssl/tests/001.phpt +++ b/ext/openssl/tests/001.phpt @@ -1,8 +1,10 @@ --TEST-- OpenSSL private key functions --SKIPIF-- - + --FILE-- + --FILE-- diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index f291eea85..852b17a7e 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_ssl.c,v 1.22.2.1 2005/09/07 15:36:23 dmitry Exp $ */ +/* $Id: xp_ssl.c,v 1.22.2.2 2006/01/01 12:50:10 sniper Exp $ */ #include "php.h" #include "ext/standard/file.h" diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index c111d1e6b..bb3d55667 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pcntl.c,v 1.48 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: pcntl.c,v 1.48.2.2 2006/01/01 12:50:10 sniper Exp $ */ #define PCNTL_DEBUG 0 @@ -43,7 +43,7 @@ ZEND_DECLARE_MODULE_GLOBALS(pcntl) -function_entry pcntl_functions[] = { +zend_function_entry pcntl_functions[] = { PHP_FE(pcntl_fork, NULL) PHP_FE(pcntl_waitpid, second_arg_force_ref) PHP_FE(pcntl_wait, first_arg_force_ref) diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index 656e973f7..0f2af9443 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcntl.h,v 1.20 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: php_pcntl.h,v 1.20.2.1 2006/01/01 12:50:10 sniper Exp $ */ #ifndef PHP_PCNTL_H #define PHP_PCNTL_H diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index d088f67d0..a2eb9408b 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_signal.c,v 1.9 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: php_signal.c,v 1.9.2.1 2006/01/01 12:50:10 sniper Exp $ */ #include "php_signal.h" diff --git a/ext/pcntl/php_signal.h b/ext/pcntl/php_signal.h index 54f6d1abb..666254996 100644 --- a/ext/pcntl/php_signal.h +++ b/ext/pcntl/php_signal.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_signal.h,v 1.9 2005/08/03 14:07:37 sniper Exp $ */ +/* $Id: php_signal.h,v 1.9.2.1 2006/01/01 12:50:11 sniper Exp $ */ #include #ifndef PHP_SIGNAL_H diff --git a/ext/pcre/config.w32 b/ext/pcre/config.w32 index 2da2a3f31..f76373f76 100644 --- a/ext/pcre/config.w32 +++ b/ext/pcre/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.4.2.1 2005/08/09 06:25:24 sebastian Exp $ +// $Id: config.w32,v 1.4.2.3 2005/12/01 20:53:35 mike Exp $ // vim:ft=javascript ARG_WITH("pcre-regex", "Perl Compatible Regular Expressions", "yes"); @@ -7,6 +7,7 @@ if (PHP_PCRE_REGEX == "yes") { EXTENSION("pcre", "php_pcre.c", PHP_PCRE_REGEX_SHARED, "-DEXPORT= -DNEWLINE=10 -DSUPPORT_UTF8 -DSUPPORT_UCP -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DMATCH_LIMIT=10000000 -Iext/pcre/pcrelib -DNO_RECURSE"); ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_compile.c pcre_config.c pcre_dfa_exec.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_ord2utf8.c pcre_printint.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_ucp_findchar.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre"); + ADD_DEF_FILE("ext\\pcre\\php_pcre.def"); AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library'); AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library'); diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index c03cd4e7d..f36ac20e2 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config0.m4,v 1.36.2.1 2005/11/16 22:14:32 sniper Exp $ +dnl $Id: config0.m4,v 1.38.2.2 2005/12/07 17:44:43 helly Exp $ dnl dnl By default we'll compile and link against the bundled PCRE library @@ -27,7 +27,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then fi for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do - test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j + test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j done if test -z "$PCRE_LIBDIR" ; then diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index d5b1feaf1..28d4dc5b3 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.168.2.3 2005/10/28 08:30:41 dmitry Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.5 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1610,7 +1610,7 @@ PHP_FUNCTION(preg_grep) /* {{{ module definition structures */ -function_entry pcre_functions[] = { +zend_function_entry pcre_functions[] = { PHP_FE(preg_match, third_arg_force_ref) PHP_FE(preg_match_all, third_arg_force_ref) PHP_FE(preg_replace, NULL) diff --git a/ext/pcre/php_pcre.def b/ext/pcre/php_pcre.def new file mode 100644 index 000000000..d47b3773e --- /dev/null +++ b/ext/pcre/php_pcre.def @@ -0,0 +1,11 @@ +EXPORTS +php_pcre_compile +php_pcre_copy_substring +php_pcre_exec +php_pcre_substring +php_pcre_get_substring_list +php_pcre_info +php_pcre_maketables +php_pcre_study +php_pcre_version +php_pcre_fullinfo diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 13bbe5196..4e55a6da2 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.h,v 1.41 2005/08/03 14:07:38 sniper Exp $ */ +/* $Id: php_pcre.h,v 1.41.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PCRE_H #define PHP_PCRE_H diff --git a/ext/pdo/package.xml b/ext/pdo/package.xml deleted file mode 100755 index 2abd3ca55..000000000 --- a/ext/pdo/package.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - PDO - PHP Data Objects Interface - - - wez - Wez Furlong - wez@php.net - lead - - - helly - Marcus Boerger - helly@php.net - lead - - - iliaa - Ilia Alshanetsky - iliaa@php.net - lead - - - gschlossnagle - George Schlossnagle - george@omniti.com - lead - - - - - PDO provides a uniform data access interface, sporting advanced features such - as prepared statements and bound parameters. PDO drivers are dynamically - loadable and may be developed independently from the core, but still accessed - using the same API. - - Read the documentation at http://www.php.net/pdo for more information. - - PHP - - stable - 1.0.1 - 2005-11-26 - - -** NOTE WELL! ** -All the PDO_XXX constants have been renamed to PDO::XXX form for future -compatibility with PHP namespaces. Sorry for the inconvenience, especially -after Release Candidate 1. - -You need to install a PDO database driver to make use of PDO, -check http://pecl.php.net/package-search.php?pkg_name=PDO -for a list of available PDO drivers. - -It is highly recommended that you update to PHP 5.1 before using PDO. - -If you are running on Windows, you can find a precompiled binary at: -http://pecl4win.php.net/ext.php/php_pdo.dll - -You can find additional PDO drivers at: -http://pecl4win.php.net - -** Changes ** -- Changed PDO_XXX constants to PDO::XXX -- It is now possible to extend PDO and PDOStatement and override their constructors - -- Fixed Bug #35303; PDO::prepare() can cause crashes with invalid parameters -- Fixed Bug #35135; "new PDOStatement" can cause crashes. -- Fixed Bug #35293 and PECL Bug #5589; segfault when creating persistent connections -- Fixed PECL Bug #5010, problem installing headers -- renamed pdo_drivers() to PDO::getAvailableDrivers() -- Various fixes when building with SPL -- PDO::setAttribute(PDO::ATTR_STATEMENT_CLASS) allows you to set your own - PDOStatement replacement when extending PDO and PDOStatement -- Fixed Bug #34687; error information from PDO::query() was not always returned -- Fixed PECL Bug #5750; uri: DSN was not handled correctly -- Fixed PECL Bug #5589; segfault when persistent connection attempt fails -- Fixed Bug #34590; User defined PDOStatement class methods are not callable -- Fixed Bug #34908; FETCH_INTO segfaults without destination object -- Fixed PECL Bug #5809; PDOStatement::execute(array(...)) modifies args -- Fixed PECL Bug #5772; FETCH_FUNC cannot call functions with mixed case names - -** Note ** - -You should uninstall and re-install your individual database drivers whenever -you upgrade the base PDO package, otherwise you will see an error about PDO API -numbers when you run your PHP scripts. - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo/package2.xml b/ext/pdo/package2.xml new file mode 100644 index 000000000..d402867df --- /dev/null +++ b/ext/pdo/package2.xml @@ -0,0 +1,131 @@ + + + PDO + pecl.php.net + PHP Data Objects Interface + PDO provides a uniform data access interface, sporting advanced features such +as prepared statements and bound parameters. PDO drivers are dynamically +loadable and may be developed independently from the core, but still accessed +using the same API. +Read the documentation at http://www.php.net/pdo for more information. + + + Wez Furlong + wez + wez@php.net + yes + + + Marcus Boerger + helly + helly@php.net + yes + + + Ilia Alshanetsky + iliaa + iliaa@php.net + yes + + + George Schlossnagle + gschlossnagle + george@omniti.com + yes + + 2005-12-04 + + 1.0.3 + 1.0.3 + + + stable + stable + + PHP + ** NOTE WELL! ** +All the PDO_XXX constants have been renamed to PDO::XXX form for future +compatibility with PHP namespaces. Sorry for the inconvenience, especially +after Release Candidate 1. + +You need to install a PDO database driver to make use of PDO, +check http://pecl.php.net/package-search.php?pkg_name=PDO +for a list of available PDO drivers. + +It is highly recommended that you update to PHP 5.1 before using PDO. + +If you are running on Windows, you can find a precompiled binary at: +http://pecl4win.php.net/ext.php/php_pdo.dll + +You can find additional PDO drivers at: +http://pecl4win.php.net + +** Changes ** +- Fixed bug #35543 (crash when calling non-existing method in extended class). (Tony) +- Fixed bug #35508 (improved validation of fetch modes). (Tony) +- Fixed bug #35431 (PDO crashes when using LAZY fetch with fetchAll). (Wez) +- Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony) + +- Changed PDO_XXX constants to PDO::XXX +- It is now possible to extend PDO and PDOStatement and override their constructors + +- Fixed Bug #35303; PDO::prepare() can cause crashes with invalid parameters +- Fixed Bug #35135; "new PDOStatement" can cause crashes. +- Fixed Bug #35293 and PECL Bug #5589; segfault when creating persistent connections +- Fixed PECL Bug #5010, problem installing headers +- renamed pdo_drivers() to PDO::getAvailableDrivers() +- Various fixes when building with SPL +- PDO::setAttribute(PDO::ATTR_STATEMENT_CLASS) allows you to set your own + PDOStatement replacement when extending PDO and PDOStatement +- Fixed Bug #34687; error information from PDO::query() was not always returned +- Fixed PECL Bug #5750; uri: DSN was not handled correctly +- Fixed PECL Bug #5589; segfault when persistent connection attempt fails +- Fixed Bug #34590; User defined PDOStatement class methods are not callable +- Fixed Bug #34908; FETCH_INTO segfaults without destination object +- Fixed PECL Bug #5809; PDOStatement::execute(array(...)) modifies args +- Fixed PECL Bug #5772; FETCH_FUNC cannot call functions with mixed case names + +** Note ** + +You should uninstall and re-install your individual database drivers whenever +you upgrade the base PDO package, otherwise you will see an error about PDO API +numbers when you run your PHP scripts. + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + + PDO + + diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index b786ad982..10ece60c7 100755 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo.c,v 1.57.2.13 2005/11/26 21:22:49 wez Exp $ */ +/* $Id: pdo.c,v 1.57.2.17 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -101,7 +101,7 @@ PHP_FUNCTION(pdo_drivers) /* }}} */ /* {{{ pdo_functions[] */ -function_entry pdo_functions[] = { +zend_function_entry pdo_functions[] = { PHP_FE(pdo_drivers, NULL) {NULL, NULL, NULL} }; @@ -133,7 +133,7 @@ zend_module_entry pdo_module_entry = { PHP_RINIT(pdo), PHP_RSHUTDOWN(pdo), PHP_MINFO(pdo), - "1.0.1", + "1.0.3", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 987eedc25..ee72d5106 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dbh.c,v 1.82.2.18 2005/11/25 00:20:12 wez Exp $ */ +/* $Id: pdo_dbh.c,v 1.82.2.26 2006/01/01 12:50:11 sniper Exp $ */ /* The PDO Database Handle Class */ @@ -283,7 +283,7 @@ static PHP_METHOD(PDO, dbh_constructor) zval **v; int plen; char *hashkey = NULL; - list_entry *le; + zend_rsrc_list_entry *le; pdo_dbh_t *pdbh = NULL; if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_PERSISTENT, (void**)&v)) { @@ -377,7 +377,7 @@ static PHP_METHOD(PDO, dbh_constructor) /* all set */ if (is_persistent) { - list_entry le; + zend_rsrc_list_entry le; /* register in the persistent list etc. */ /* we should also need to replace the object store entry, @@ -1083,7 +1083,7 @@ static PHP_METHOD(PDO, getAvailableDrivers) } /* }}} */ -function_entry pdo_dbh_functions[] = { +zend_function_entry pdo_dbh_functions[] = { ZEND_MALIAS(PDO, __construct, dbh_constructor, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, prepare, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, beginTransaction,NULL, ZEND_ACC_PUBLIC) @@ -1106,13 +1106,13 @@ function_entry pdo_dbh_functions[] = { /* {{{ overloaded object handlers for PDO class */ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) { - function_entry *funcs; + zend_function_entry *funcs; zend_function func; zend_internal_function *ifunc = (zend_internal_function*)&func; int namelen; char *lc_name; - if (!dbh->methods->get_driver_methods) { + if (!dbh || !dbh->methods || !dbh->methods->get_driver_methods) { return 0; } funcs = dbh->methods->get_driver_methods(dbh, @@ -1344,6 +1344,11 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC) if (--dbh->refcount) return; + if (dbh->query_stmt) { + zval_dtor(&dbh->query_stmt_zval); + dbh->query_stmt = NULL; + } + if (dbh->methods) { dbh->methods->closer(dbh TSRMLS_CC); } @@ -1365,12 +1370,23 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC) for (i = 0; i < PDO_DBH_DRIVER_METHOD_KIND__MAX; i++) { if (dbh->cls_methods[i]) { zend_hash_destroy(dbh->cls_methods[i]); + pefree(dbh->cls_methods[i], dbh->is_persistent); } } pefree(dbh, dbh->is_persistent); } +PDO_API void php_pdo_dbh_addref(pdo_dbh_t *dbh TSRMLS_DC) +{ + dbh->refcount++; +} + +PDO_API void php_pdo_dbh_delref(pdo_dbh_t *dbh TSRMLS_DC) +{ + dbh_free(dbh TSRMLS_CC); +} + static void pdo_dbh_free_storage(pdo_dbh_t *dbh TSRMLS_DC) { if (dbh->in_txn && dbh->methods && dbh->methods->rollback) { diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index cf991268e..a6b20adfe 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -1,14 +1,14 @@ -/* Generated by re2c 0.9.9.rc1 on Sat Sep 10 15:53:03 2005 */ +/* Generated by re2c 0.9.11 on Sun Jan 1 14:38:30 2006 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sql_parser.c,v 1.35.2.2 2005/09/10 20:58:57 wez Exp $ */ +/* $Id: pdo_sql_parser.c,v 1.35.2.5 2006/01/01 12:50:11 sniper Exp $ */ #include "php.h" #include "php_pdo_driver.h" @@ -85,7 +85,7 @@ static int scan(Scanner *s) { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; ++YYCURSOR; yy0: diff --git a/ext/pdo/pdo_sql_parser.c.orig b/ext/pdo/pdo_sql_parser.c.orig index b20911698..453b35371 100644 --- a/ext/pdo/pdo_sql_parser.c.orig +++ b/ext/pdo/pdo_sql_parser.c.orig @@ -1,15 +1,15 @@ -/* Generated by re2c 0.9.9.rc1 on Sat Sep 10 15:53:03 2005 */ +/* Generated by re2c 0.9.11 on Sun Jan 1 14:38:30 2006 */ #line 1 "ext/pdo/pdo_sql_parser.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sql_parser.c,v 1.35.2.2 2005/09/10 20:58:57 wez Exp $ */ +/* $Id: pdo_sql_parser.c,v 1.35.2.5 2006/01/01 12:50:11 sniper Exp $ */ #include "php.h" #include "php_pdo_driver.h" @@ -85,10 +85,10 @@ static int scan(Scanner *s) 162, 162, 162, 162, 162, 162, 162, 162, }; -#line 89 "" +#line 89 "ext/pdo/pdo_sql_parser.c" { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; ++YYCURSOR; yy0: @@ -113,7 +113,7 @@ yy2: yyaccept = 0; yy3: #line 63 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } -#line 117 "" +#line 117 "ext/pdo/pdo_sql_parser.c" yy4: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yybm[0+yych] & 16) { @@ -150,7 +150,7 @@ yy6: ++YYCURSOR; yy7: #line 62 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_BIND_POS); } -#line 154 "" +#line 154 "ext/pdo/pdo_sql_parser.c" yy8: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -162,13 +162,13 @@ yy9: if(yybm[0+yych] & 2) { yy10: #line 64 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } -#line 166 "" +#line 166 "ext/pdo/pdo_sql_parser.c" yy11: ++YYCURSOR; goto yy12; yy12: #line 65 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_EOI); } -#line 172 "" +#line 172 "ext/pdo/pdo_sql_parser.c" yy13: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -180,7 +180,7 @@ yy14: if(yybm[0+yych] & 4) { yy15: #line 60 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } -#line 184 "" +#line 184 "ext/pdo/pdo_sql_parser.c" yy16: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -192,7 +192,7 @@ yy17: if(yybm[0+yych] & 8) { yy18: #line 61 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_BIND); } -#line 196 "" +#line 196 "ext/pdo/pdo_sql_parser.c" yy19: yyaccept = 1; YYMARKER = ++YYCURSOR; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); @@ -218,7 +218,7 @@ yy21: ++YYCURSOR; yy22: #line 59 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } -#line 222 "" +#line 222 "ext/pdo/pdo_sql_parser.c" yy23: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -250,7 +250,7 @@ yy28: ++YYCURSOR; yy29: #line 58 "ext/pdo/pdo_sql_parser.re" { RET(PDO_PARSER_TEXT); } -#line 254 "" +#line 254 "ext/pdo/pdo_sql_parser.c" yy30: yyaccept = 1; YYMARKER = ++YYCURSOR; if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 6e9d21f17..81b558c4e 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sql_parser.re,v 1.28.2.2 2005/09/10 20:58:19 wez Exp $ */ +/* $Id: pdo_sql_parser.re,v 1.28.2.3 2006/01/01 12:26:08 sniper Exp $ */ #include "php.h" #include "php_pdo_driver.h" diff --git a/ext/pdo/pdo_sqlstate.c b/ext/pdo/pdo_sqlstate.c index 8b833c5b6..338309f4c 100644 --- a/ext/pdo/pdo_sqlstate.c +++ b/ext/pdo/pdo_sqlstate.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlstate.c,v 1.7 2005/07/01 23:32:39 edink Exp $ */ +/* $Id: pdo_sqlstate.c,v 1.7.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index ac9e0a52f..dbc056247 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.118.2.21 2005/11/26 21:20:52 wez Exp $ */ +/* $Id: pdo_stmt.c,v 1.118.2.30 2006/01/01 20:07:41 iliaa Exp $ */ /* The PDO Statement Handle Class */ @@ -228,7 +228,7 @@ static void get_lazy_object(pdo_stmt_t *stmt, zval *return_value TSRMLS_DC) /* { Z_TYPE(stmt->lazy_object_ref) = IS_OBJECT; Z_OBJ_HANDLE(stmt->lazy_object_ref) = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_row_free_storage, NULL TSRMLS_CC); Z_OBJ_HT(stmt->lazy_object_ref) = &pdo_row_object_handlers; - /* stmt->refcount++; */ + stmt->refcount++; } Z_TYPE_P(return_value) = IS_OBJECT; Z_OBJ_HANDLE_P(return_value) = Z_OBJ_HANDLE(stmt->lazy_object_ref); @@ -1116,9 +1116,14 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS_DC) /* {{{ */ { int flags = mode & PDO_FETCH_FLAGS; - + mode = mode & ~PDO_FETCH_FLAGS; + if (mode < 0 || mode > PDO_FETCH__MAX) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode" TSRMLS_CC); + return 0; + } + if (mode == PDO_FETCH_USE_DEFAULT) { flags = stmt->default_fetch_type & PDO_FETCH_FLAGS; mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS; @@ -1138,6 +1143,13 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS return 0; } return 1; + + case PDO_FETCH_LAZY: + if (fetch_all) { + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_LAZY can't be used with PDOStatement::fetchAll()" TSRMLS_CC); + return 0; + } + /* fall through */ default: if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) { @@ -1353,13 +1365,15 @@ static PHP_METHOD(PDOStatement, fetchAll) switch(ZEND_NUM_ARGS()) { case 0: case 1: + pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "no fetch function specified" TSRMLS_CC); + error = 1; break; case 3: case 2: stmt->fetch.func.function = arg2; + do_fetch_func_prepare(stmt TSRMLS_CC); break; } - do_fetch_func_prepare(stmt TSRMLS_CC); break; case PDO_FETCH_COLUMN: @@ -1704,10 +1718,12 @@ fail_out: mode = Z_LVAL_PP(args[skip]); if (!pdo_stmt_verify_mode(stmt, mode, 0 TSRMLS_CC)) { + efree(args); return FAILURE; } switch (mode & ~PDO_FETCH_FLAGS) { + case PDO_FETCH_USE_DEFAULT: case PDO_FETCH_LAZY: case PDO_FETCH_ASSOC: case PDO_FETCH_NUM: @@ -1782,12 +1798,8 @@ fail_out: break; default: - if ((mode & ~PDO_FETCH_FLAGS) < PDO_FETCH__MAX && (mode & ~PDO_FETCH_FLAGS) >= 0) { - pdo_raise_impl_error(stmt->dbh, stmt, "22003", "unhandled mode; this is a PDO bug, please report it" TSRMLS_CC); - } else { - pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range" TSRMLS_CC); - } - return FAILURE; + pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid fetch mode specified" TSRMLS_CC); + goto fail_out; } stmt->default_fetch_type = mode; @@ -1948,7 +1960,7 @@ static PHP_METHOD(PDOStatement, __sleep) } /* }}} */ -function_entry pdo_dbstmt_functions[] = { +zend_function_entry pdo_dbstmt_functions[] = { PHP_ME(PDOStatement, execute, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, fetch, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, bindParam, second_arg_force_ref, ZEND_ACC_PUBLIC) @@ -2048,6 +2060,34 @@ static int dbstmt_compare(zval *object1, zval *object2 TSRMLS_DC) return -1; } +static zend_object_value dbstmt_clone_obj(zval *zobject TSRMLS_DC) +{ + zend_object_value retval; + zval *tmp; + pdo_stmt_t *stmt; + pdo_stmt_t *old_stmt; + zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); + + stmt = ecalloc(1, sizeof(*stmt)); + stmt->ce = Z_OBJCE_P(zobject); + stmt->refcount = 1; + ALLOC_HASHTABLE(stmt->properties); + zend_hash_init(stmt->properties, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_copy(stmt->properties, &stmt->ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + + old_stmt = (pdo_stmt_t *)zend_object_store_get_object(zobject TSRMLS_CC); + + retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, (zend_objects_store_clone_t)dbstmt_clone_obj TSRMLS_CC); + retval.handlers = Z_OBJ_HT_P(zobject); + + zend_objects_clone_members((zend_object *)stmt, retval, (zend_object *)old_stmt, handle TSRMLS_CC); + + zend_objects_store_add_ref(&old_stmt->database_object_handle TSRMLS_CC); + stmt->database_object_handle = old_stmt->database_object_handle; + + return retval; +} + zend_object_handlers pdo_dbstmt_object_handlers; void pdo_stmt_init(TSRMLS_D) @@ -2066,6 +2106,7 @@ void pdo_stmt_init(TSRMLS_D) pdo_dbstmt_object_handlers.unset_property = dbstmt_prop_delete; pdo_dbstmt_object_handlers.get_method = dbstmt_method_get; pdo_dbstmt_object_handlers.compare_objects = dbstmt_compare; + pdo_dbstmt_object_handlers.clone_obj = dbstmt_clone_obj; INIT_CLASS_ENTRY(ce, "PDORow", pdo_row_functions); pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); @@ -2160,7 +2201,7 @@ zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC) zend_hash_init(stmt->properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(stmt->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, (zend_objects_store_clone_t)dbstmt_clone_obj TSRMLS_CC); retval.handlers = &pdo_dbstmt_object_handlers; return retval; @@ -2285,7 +2326,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object TSRML /* {{{ overloaded handlers for PDORow class (used by PDO_FETCH_LAZY) */ -function_entry pdo_row_functions[] = { +zend_function_entry pdo_row_functions[] = { {NULL, NULL, NULL} }; @@ -2460,13 +2501,11 @@ zend_object_handlers pdo_row_object_handlers = { void pdo_row_free_storage(pdo_stmt_t *stmt TSRMLS_DC) { -#if 0 ZVAL_NULL(&stmt->lazy_object_ref); if (--stmt->refcount == 0) { free_statement(stmt TSRMLS_CC); } -#endif } zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC) diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index c5f9c4c5b..74078b4de 100755 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo.h,v 1.7.2.4 2005/10/02 20:38:18 helly Exp $ */ +/* $Id: php_pdo.h,v 1.7.2.5 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_H #define PHP_PDO_H diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index fefb5449d..321fdff65 100755 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_driver.h,v 1.66.2.6 2005/10/31 02:07:37 wez Exp $ */ +/* $Id: php_pdo_driver.h,v 1.66.2.9 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_DRIVER_H #define PHP_PDO_DRIVER_H @@ -44,7 +44,7 @@ PDO_API char *php_pdo_int64_to_str(pdo_int64_t i64 TSRMLS_DC); # define FALSE 0 #endif -#define PDO_DRIVER_API 20051031 +#define PDO_DRIVER_API 20051128 enum pdo_param_type { PDO_PARAM_NULL, @@ -284,7 +284,7 @@ enum { PDO_DBH_DRIVER_METHOD_KIND__MAX }; -typedef function_entry *(*pdo_dbh_get_driver_methods_func)(pdo_dbh_t *dbh, int kind TSRMLS_DC); +typedef zend_function_entry *(*pdo_dbh_get_driver_methods_func)(pdo_dbh_t *dbh, int kind TSRMLS_DC); struct pdo_dbh_methods { pdo_dbh_close_func closer; @@ -645,6 +645,9 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, PDO_API void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate, const char *supp TSRMLS_DC); +PDO_API void php_pdo_dbh_addref(pdo_dbh_t *dbh TSRMLS_DC); +PDO_API void php_pdo_dbh_delref(pdo_dbh_t *dbh TSRMLS_DC); + PDO_API void php_pdo_stmt_addref(pdo_stmt_t *stmt TSRMLS_DC); PDO_API void php_pdo_stmt_delref(pdo_stmt_t *stmt TSRMLS_DC); diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 8a4724630..fb567af8c 100755 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_int.h,v 1.17.2.4 2005/10/02 22:11:17 wez Exp $ */ +/* $Id: php_pdo_int.h,v 1.17.2.6 2006/01/01 12:50:11 sniper Exp $ */ /* Stuff private to the PDO extension and not for consumption by PDO drivers * */ @@ -32,12 +32,12 @@ void pdo_dbh_init(TSRMLS_D); void pdo_stmt_init(TSRMLS_D); extern zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC); -extern function_entry pdo_dbh_functions[]; +extern zend_function_entry pdo_dbh_functions[]; extern zend_class_entry *pdo_dbh_ce; extern ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor); extern zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC); -extern function_entry pdo_dbstmt_functions[]; +extern zend_function_entry pdo_dbstmt_functions[]; extern zend_class_entry *pdo_dbstmt_ce; void pdo_dbstmt_free_storage(pdo_stmt_t *stmt TSRMLS_DC); zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object TSRMLS_DC); @@ -46,7 +46,7 @@ int pdo_stmt_describe_columns(pdo_stmt_t *stmt TSRMLS_DC); int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int skip_first_arg); extern zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC); -extern function_entry pdo_row_functions[]; +extern zend_function_entry pdo_row_functions[]; extern zend_class_entry *pdo_row_ce; void pdo_row_free_storage(pdo_stmt_t *stmt TSRMLS_DC); extern zend_object_handlers pdo_row_object_handlers; diff --git a/ext/pdo/tests/pdo_test.inc b/ext/pdo/tests/pdo_test.inc index 3a3040eac..a023fd89b 100644 --- a/ext/pdo/tests/pdo_test.inc +++ b/ext/pdo/tests/pdo_test.inc @@ -35,6 +35,10 @@ class PDOTest { $db = new $classname($dsn, $user, $pass, $attr); + if (!$db) { + die("Could not create PDO object (DSN=$dsn, user=$user)\n"); + } + // clean up any crufty test tables we might have left behind // on a previous run static $test_tables = array( diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 2766ec2d3..fdc5ea037 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_driver.c,v 1.9.2.1 2005/10/09 19:00:34 iliaa Exp $ */ +/* $Id: dblib_driver.c,v 1.9.2.2 2006/01/01 12:47:32 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index bc390564c..814315439 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_stmt.c,v 1.6.2.1 2005/10/12 15:03:02 iliaa Exp $ */ +/* $Id: dblib_stmt.c,v 1.6.2.2 2006/01/01 12:47:32 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/package.xml b/ext/pdo_dblib/package.xml deleted file mode 100644 index 6b2335424..000000000 --- a/ext/pdo_dblib/package.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - PDO_DBLIB - FreeTDS/Sybase/MSSQL driver for PDO - - - wez - Wez Furlong - wez@php.net - lead - - - fmk - Frank M. Kromann - fmk@php.net - lead - - - - - This extension provides a FreeTDS/Sybase/MSSQL driver for PDO. - - PHP - - stable - 1.0 - 2005-11-26 - - -Update code for API changes in PDO; no actual changes have been made to this driver. - -Windows binaries can be found at: -http://pecl4win.php.net/ext.php/php_pdo_mssql.dll, - -however: you are *strongly* recommended to use PDO_ODBC instead of this driver on -Windows platforms. - -** Changes ** -- Fix Bug #34777; segfault when retrieving non-existent error info -- Fix Bug #35032; didn't find FreeTDS includes on some systems - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_dblib/package2.xml b/ext/pdo_dblib/package2.xml new file mode 100644 index 000000000..f1fcb76d7 --- /dev/null +++ b/ext/pdo_dblib/package2.xml @@ -0,0 +1,76 @@ + + + PDO_DBLIB + pecl.php.net + FreeTDS/Sybase/MSSQL driver for PDO + This extension provides a FreeTDS/Sybase/MSSQL driver for PDO. + + + Wez Furlong + wez + wez@php.net + yes + + + Frank M. Kromann + fmk + fmk@php.net + yes + + 2005-12-04 + + 1.0.1 + 1.0.1 + + + stable + stable + + PHP + +- Packaging update; no functional changes in this release +- Fix Bug #34777; segfault when retrieving non-existent error info +- Fix Bug #35032; didn't find FreeTDS includes on some systems + +Windows binaries can be found at: +http://pecl4win.php.net/ext.php/php_pdo_mssql.dll, + +however: you are *strongly* recommended to use PDO_ODBC instead of this driver on +Windows platforms. + + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_DBLIB + + diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c index 5c6b2c2f2..cd104a6ef 100644 --- a/ext/pdo_dblib/pdo_dblib.c +++ b/ext/pdo_dblib/pdo_dblib.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dblib.c,v 1.9.2.3 2005/11/26 20:50:07 wez Exp $ */ +/* $Id: pdo_dblib.c,v 1.9.2.6 2006/01/01 12:47:32 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -34,7 +34,7 @@ ZEND_DECLARE_MODULE_GLOBALS(dblib) -function_entry pdo_dblib_functions[] = { +zend_function_entry pdo_dblib_functions[] = { {NULL, NULL, NULL} }; @@ -65,7 +65,7 @@ zend_module_entry pdo_dblib_module_entry = { NULL, PHP_RSHUTDOWN(pdo_dblib), PHP_MINFO(pdo_dblib), - "1.0", + "1.0.1", STANDARD_MODULE_PROPERTIES }; diff --git a/ext/pdo_dblib/php_pdo_dblib.h b/ext/pdo_dblib/php_pdo_dblib.h index e832ee285..19e4feccc 100644 --- a/ext/pdo_dblib/php_pdo_dblib.h +++ b/ext/pdo_dblib/php_pdo_dblib.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_dblib.h,v 1.2 2005/01/18 02:42:52 wez Exp $ */ +/* $Id: php_pdo_dblib.h,v 1.2.2.1 2006/01/01 12:47:32 sniper Exp $ */ #ifndef PHP_PDO_DBLIB_H #define PHP_PDO_DBLIB_H diff --git a/ext/pdo_dblib/php_pdo_dblib_int.h b/ext/pdo_dblib/php_pdo_dblib_int.h index 5f7b055ee..38ed3632d 100644 --- a/ext/pdo_dblib/php_pdo_dblib_int.h +++ b/ext/pdo_dblib/php_pdo_dblib_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_dblib_int.h,v 1.4 2005/07/12 12:16:02 wez Exp $ */ +/* $Id: php_pdo_dblib_int.h,v 1.4.2.1 2006/01/01 12:47:32 sniper Exp $ */ #ifndef PHP_PDO_DBLIB_INT_H #define PHP_PDO_DBLIB_INT_H diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 0accbea87..82faa2b39 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_driver.c,v 1.17.2.1 2005/09/11 01:42:41 wez Exp $ */ +/* $Id: firebird_driver.c,v 1.17.2.2 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 95415e805..96947e771 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_statement.c,v 1.18 2005/08/03 14:07:39 sniper Exp $ */ +/* $Id: firebird_statement.c,v 1.18.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_firebird/package.xml b/ext/pdo_firebird/package.xml deleted file mode 100644 index b07870189..000000000 --- a/ext/pdo_firebird/package.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - PDO_FIREBIRD - Firebird/InterBase 6 driver for PDO - - - abies - Ard Biesheuvel - abies@php.net - lead - - - - - - - This extension provides a Firebird/InterBase driver for PDO. It supports - all versions of Firebird and InterBase versions 6 and up. - - PHP - - beta - 0.3 - 2005-09-11 - - - To compile and run this module, you will need to have the main PDO module and Firebird's - or InterBase's client library installed on your system. - - Hope it works! - - - - - - - - - - - - - - - connect.phpt - ddl.phpt - execute.phpt - - - - - - - - - diff --git a/ext/pdo_firebird/package2.xml b/ext/pdo_firebird/package2.xml new file mode 100644 index 000000000..414b9e6c8 --- /dev/null +++ b/ext/pdo_firebird/package2.xml @@ -0,0 +1,69 @@ + + + PDO_FIREBIRD + pecl.php.net + Firebird/InterBase 6 driver for PDO + This extension provides a Firebird/InterBase driver for PDO. It supports +all versions of Firebird and InterBase versions 6 and up. + + + Ard Biesheuvel + abies + abies@php.net + yes + + 2005-12-04 + + 0.3 + 0.3 + + + beta + beta + + PHP + To compile and run this module, you will need to have the main PDO module and Firebird's +or InterBase's client library installed on your system. +Hope it works! + + + + + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_FIREBIRD + + + + diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c index 956f836c1..dfb985a17 100644 --- a/ext/pdo_firebird/pdo_firebird.c +++ b/ext/pdo_firebird/pdo_firebird.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_firebird.c,v 1.4.2.1 2005/09/11 05:27:30 wez Exp $ */ +/* $Id: pdo_firebird.c,v 1.4.2.3 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -30,7 +30,7 @@ #include "php_pdo_firebird.h" #include "php_pdo_firebird_int.h" -function_entry pdo_firebird_functions[] = { /* {{{ */ +zend_function_entry pdo_firebird_functions[] = { /* {{{ */ {NULL, NULL, NULL} }; /* }}} */ diff --git a/ext/pdo_firebird/php_pdo_firebird.h b/ext/pdo_firebird/php_pdo_firebird.h index 5af158dfc..8545b4be1 100644 --- a/ext/pdo_firebird/php_pdo_firebird.h +++ b/ext/pdo_firebird/php_pdo_firebird.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_firebird.h,v 1.3 2005/08/03 14:07:39 sniper Exp $ */ +/* $Id: php_pdo_firebird.h,v 1.3.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_FIREBIRD_H #define PHP_PDO_FIREBIRD_H diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 62f68a313..01bdce9b2 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_firebird_int.h,v 1.10 2005/08/03 14:07:39 sniper Exp $ */ +/* $Id: php_pdo_firebird_int.h,v 1.10.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_FIREBIRD_INT_H #define PHP_PDO_FIREBIRD_INT_H diff --git a/ext/pdo_firebird/tests/common.phpt b/ext/pdo_firebird/tests/common.phpt index cb1caf315..00d4b239a 100644 --- a/ext/pdo_firebird/tests/common.phpt +++ b/ext/pdo_firebird/tests/common.phpt @@ -2,7 +2,7 @@ FIREBIRD --SKIPIF-- +if (!extension_loaded('pdo_firebird')) print 'skip'; ?> --REDIRECTTEST-- # magic auto-configuration diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index 1cfa766d0..b6d9ab8bb 100755 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.25.2.4 2005/11/25 17:07:49 wez Exp $ +dnl $Id: config.m4,v 1.25.2.6 2005/12/04 18:33:26 wez Exp $ dnl if test "$PHP_PDO" != "no"; then @@ -33,7 +33,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then fi else AC_MSG_RESULT([$PHP_PDO_MYSQL is not a directory]) - AC_MSG_ERROR([can't find mysql under the "$PHP_PDO_MYSQL" that you specified]) + AC_MSG_ERROR([can not find mysql under the "$PHP_PDO_MYSQL" that you specified]) fi else for i in /usr/local /usr ; do @@ -50,10 +50,12 @@ if test "$PHP_PDO_MYSQL" != "no"; then if test -n "$PDO_MYSQL_CONFIG" && test -x "$PDO_MYSQL_CONFIG" ; then AC_MSG_RESULT($PDO_MYSQL_CONFIG) - PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags` - PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs` - PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket` - PHP_SUBST_OLD(PDO_MYSQL_LIBS) + if test "x$SED" = "x"; then + AC_PATH_PROG(SED, sed) + fi + PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"` + PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"` + PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket` elif test -z "$PDO_MYSQL_DIR"; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([Cannot find MySQL header files under $PDO_MYSQL_DIR]) @@ -74,7 +76,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then if test -r "$PDO_MYSQL_LIB_DIR"; then AC_MSG_RESULT([libs under $PDO_MYSQL_LIB_DIR; seems promising]) else - AC_MSG_RESULT([can't find it]) + AC_MSG_RESULT([can not find it]) AC_MSG_ERROR([Unable to find your mysql installation]) fi @@ -118,7 +120,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, $ext_shared,,-I$pdo_inc_path $PDO_MYSQL_INCLUDE) ifdef([PHP_ADD_EXTENSION_DEP], [ - PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo) + PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo) ]) PDO_MYSQL_MODULE_TYPE=external diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 61f697203..f2ce644b8 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_driver.c,v 1.59.2.6 2005/11/25 12:56:04 tony2001 Exp $ */ +/* $Id: mysql_driver.c,v 1.59.2.8 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -266,7 +266,7 @@ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquote pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; *quoted = safe_emalloc(2, unquotedlen, 3); *quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen); - (*quoted)[0] =(*quoted)[++*quotedlen] = '"'; + (*quoted)[0] =(*quoted)[++*quotedlen] = '\''; (*quoted)[++*quotedlen] = '\0'; return 1; } diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 9009a3a74..5218e7b7f 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_statement.c,v 1.48.2.7 2005/10/29 02:41:50 wez Exp $ */ +/* $Id: mysql_statement.c,v 1.48.2.10 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -42,7 +42,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) S->result = NULL; } if (S->einfo.errmsg) { - efree(S->einfo.errmsg); + pefree(S->einfo.errmsg, stmt->dbh->is_persistent); S->einfo.errmsg = NULL; } #if HAVE_MYSQL_STMT_PREPARE @@ -503,11 +503,22 @@ static char *type_to_name_native(int type) PDO_MYSQL_NATIVE_TYPE_NAME(FLOAT) PDO_MYSQL_NATIVE_TYPE_NAME(DOUBLE) PDO_MYSQL_NATIVE_TYPE_NAME(DECIMAL) +#ifdef FIELD_TYPE_NEWDECIMAL + PDO_MYSQL_NATIVE_TYPE_NAME(NEWDECIMAL) +#endif +#ifdef FIELD_TYPE_GEOMETRY + PDO_MYSQL_NATIVE_TYPE_NAME(GEOMETRY) +#endif PDO_MYSQL_NATIVE_TYPE_NAME(TIMESTAMP) #ifdef MYSQL_HAS_YEAR PDO_MYSQL_NATIVE_TYPE_NAME(YEAR) #endif + PDO_MYSQL_NATIVE_TYPE_NAME(SET) + PDO_MYSQL_NATIVE_TYPE_NAME(ENUM) PDO_MYSQL_NATIVE_TYPE_NAME(DATE) +#ifdef FIELD_TYPE_NEWDATE + PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE) +#endif PDO_MYSQL_NATIVE_TYPE_NAME(TIME) PDO_MYSQL_NATIVE_TYPE_NAME(DATETIME) PDO_MYSQL_NATIVE_TYPE_NAME(TINY_BLOB) diff --git a/ext/pdo_mysql/package.xml b/ext/pdo_mysql/package.xml deleted file mode 100644 index ee53e1ac2..000000000 --- a/ext/pdo_mysql/package.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - PDO_MYSQL - MySQL driver for PDO - - - gschlossnagle - George Schlossnagle - george@omniti.com - lead - - - iliaa - Ilia Alshanetsky - iliaa@php.net - lead - - - wez - Wez Furlong - wez@php.net - lead - - - - - This extension provides a MySQL driver for PDO. - - PHP - - stable - 1.0 - 2005-11-26 - - -** Changes ** -- Improved error detection for OPTIMIZE queries -- Added PDO::MYSQL_ATTR_LOCAL_INFILE, PDO::MYSQL_ATTR_INIT_COMMAND, - PDO::MYSQL_ATTR_READ_DEFAULT_FILE, PDO::MYSQL_ATTR_READ_DEFAULT_GROUP -- Improved error reporting when using native prepared statements -- Fixed PECL Bug #5193: improved bounds checking when calling getColumnMeta() -- Fixed Bug #34630: improved (emulated) LOB support -- Fixed Bug #34623: crash when selecting longtext fields -- Fixed PECL Bug #5802; is_null flag was sticking -- Fixed PECL Bug #5645; added mysql client library version information to phpinfo() output. - -Windows binaries can be found at http://pecl4win.php.net/ext.php/php_pdo_mysql.dll - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_mysql/package2.xml b/ext/pdo_mysql/package2.xml new file mode 100644 index 000000000..fded1712f --- /dev/null +++ b/ext/pdo_mysql/package2.xml @@ -0,0 +1,85 @@ + + + PDO_MYSQL + pecl.php.net + MySQL driver for PDO + This extension provides a MySQL driver for PDO. + + + George Schlossnagle + gschlossnagle + george@omniti.com + yes + + + Ilia Alshanetsky + iliaa + iliaa@php.net + yes + + + Wez Furlong + wez + wez@php.net + yes + + 2005-12-04 + + 1.0.2 + 1.0.2 + + + stable + stable + + PHP + +- Repackage using package2.xml +- Fixed Bug #35480 and #35415, crash when using persistent connections. +- Improved error detection for OPTIMIZE queries +- Added PDO::MYSQL_ATTR_LOCAL_INFILE, PDO::MYSQL_ATTR_INIT_COMMAND, + PDO::MYSQL_ATTR_READ_DEFAULT_FILE, PDO::MYSQL_ATTR_READ_DEFAULT_GROUP +- Improved error reporting when using native prepared statements +- Fixed PECL Bug #5193: improved bounds checking when calling getColumnMeta() +- Fixed Bug #34630: improved (emulated) LOB support +- Fixed Bug #34623: crash when selecting longtext fields +- Fixed PECL Bug #5802; is_null flag was sticking +- Fixed PECL Bug #5645; added mysql client library version information to phpinfo() output. + +Windows binaries can be found at http://pecl4win.php.net/ext.php/php_pdo_mysql.dll + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_MYSQL + + diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index b46a075b7..2f8be1d52 100755 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_mysql.c,v 1.8.2.8 2005/11/26 20:50:07 wez Exp $ */ +/* $Id: pdo_mysql.c,v 1.8.2.12 2006/01/01 12:50:11 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -31,7 +31,7 @@ #include "php_pdo_mysql_int.h" /* {{{ pdo_mysql_functions[] */ -function_entry pdo_mysql_functions[] = { +zend_function_entry pdo_mysql_functions[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -60,7 +60,7 @@ zend_module_entry pdo_mysql_module_entry = { NULL, NULL, PHP_MINFO(pdo_mysql), - "1.0", + "1.0.2", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h index d994749e6..2439838df 100755 --- a/ext/pdo_mysql/php_pdo_mysql.h +++ b/ext/pdo_mysql/php_pdo_mysql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_mysql.h,v 1.3 2005/07/03 02:20:08 wez Exp $ */ +/* $Id: php_pdo_mysql.h,v 1.3.2.1 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_MYSQL_H #define PHP_PDO_MYSQL_H diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index 85a046368..2602e04e1 100755 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_mysql_int.h,v 1.16.2.1 2005/10/27 17:34:24 tony2001 Exp $ */ +/* $Id: php_pdo_mysql_int.h,v 1.16.2.2 2006/01/01 12:50:11 sniper Exp $ */ #ifndef PHP_PDO_MYSQL_INT_H #define PHP_PDO_MYSQL_INT_H diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index 23780f96c..084e111c1 100755 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.14.2.1 2005/09/24 23:23:24 sniper Exp $ +dnl $Id: config.m4,v 1.14.2.4 2006/01/06 11:48:19 tony2001 Exp $ if test "$PHP_PDO" != "no"; then @@ -7,16 +7,16 @@ AC_DEFUN([AC_PDO_OCI_VERSION],[ if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4` test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3 - elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then PDO_OCI_VERSION=10.1 - elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then PDO_OCI_VERSION=9.0 - elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then PDO_OCI_VERSION=8.1 - elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then + elif test -f $PDO_OCI_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then PDO_OCI_VERSION=8.0 - elif test -f $PDO_OCI_DIR/lib/libclntsh.a; then - if test -f $PDO_OCI_DIR/lib/libcore4.a; then + elif test -f $PDO_OCI_LIB_DIR/libclntsh.a; then + if test -f $PDO_OCI_LIB_DIR/libcore4.a; then PDO_OCI_VERSION=8.0 else PDO_OCI_VERSION=8.1 @@ -27,6 +27,30 @@ AC_DEFUN([AC_PDO_OCI_VERSION],[ AC_MSG_RESULT($PDO_OCI_VERSION) ]) +AC_DEFUN([AC_PDO_OCI_CHECK_LIB_DIR],[ + AC_CHECK_SIZEOF(long int, 4) + AC_MSG_CHECKING([checking if we're at 64-bit platform]) + if test "$ac_cv_sizeof_long_int" = "4" ; then + AC_MSG_RESULT([no]) + TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" + else + AC_MSG_RESULT([yes]) + TMP_PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" + fi + + AC_MSG_CHECKING([OCI8 libraries dir]) + if test -d "$PDO_OCI_DIR/lib" -a ! -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" + elif ! test -d "$PDO_OCI_DIR/lib" -a -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib32" + elif test -d "$PDO_OCI_DIR/lib" -a -d "$PDO_OCI_DIR/lib32"; then + PDO_OCI_LIB_DIR=$TMP_PDO_OCI_LIB_DIR + else + AC_MSG_ERROR([Oracle (OCI8) required libraries not found]) + fi + AC_MSG_RESULT($PDO_OCI_LIB_DIR) +]) + PHP_ARG_WITH(pdo-oci, Oracle OCI support for PDO, [ --with-pdo-oci[=DIR] PDO: Oracle-OCI support. Default DIR is ORACLE_HOME. You may also use --with-pdo-oci=instantclient,prefix,version to use @@ -35,7 +59,7 @@ PHP_ARG_WITH(pdo-oci, Oracle OCI support for PDO, if test "$PHP_PDO_OCI" != "no"; then AC_MSG_CHECKING([Oracle Install-Dir]) - if test "$PHP_PDO_OCI" = "yes" -o -z "$PHP_PDO_OCI"; then + if test "$PHP_PDO_OCI" = "yes" || test -z "$PHP_PDO_OCI"; then PDO_OCI_DIR=$ORACLE_HOME else PDO_OCI_DIR=$PHP_PDO_OCI @@ -51,6 +75,8 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. AC_MSG_RESULT([yes]) fi + AC_PDO_OCI_CHECK_LIB_DIR($PDO_OCI_DIR) + if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`" PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`" @@ -61,10 +87,24 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include) + elif test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then + PHP_ADD_INCLUDE($PDO_OCI_PREFIX/sdk/include) + AC_MSG_RESULT($PDO_OCI_PREFIX/sdk/include) + elif test -f $PDO_OCI_IC_PREFIX/client/include/oci.h ; then + PHP_ADD_INCLUDE($PDO_OCI_PREFIX/client/include) + AC_MSG_RESULT($PDO_OCI_PREFIX/client/include) else AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install]) fi - PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" + if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" + elif test -f "$PDO_OCI_IC_PREFIX/client/lib/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/client/lib" + elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.so" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" + else + AC_MSG_ERROR([I'm too dumb to figure out where the libraries are in your instant client install]) + fi PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`" else if test -d "$PDO_OCI_DIR/rdbms/public"; then @@ -88,12 +128,11 @@ You need to tell me where to find your oracle SDK, or set ORACLE_HOME. PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/include" fi - if test -f "$PDO_OCI_DIR/lib/sysliblist"; then - PHP_EVAL_LIBLINE(`cat $PDO_OCI_DIR/lib/sysliblist`, PDO_OCI_SYSLIB) + if test -f "$PDO_OCI_LIB_DIR/sysliblist"; then + PHP_EVAL_LIBLINE(`cat $PDO_OCI_LIB_DIR/sysliblist`, PDO_OCI_SYSLIB) elif test -f "$PDO_OCI_DIR/rdbms/lib/sysliblist"; then PHP_EVAL_LIBLINE(`cat $PDO_OCI_DIR/rdbms/lib/sysliblist`, PDO_OCI_SYSLIB) fi - PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib" AC_PDO_OCI_VERSION($PDO_OCI_DIR) fi diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 30d068c87..04d26ffff 100755 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci_driver.c,v 1.24.2.2 2005/09/11 01:42:38 wez Exp $ */ +/* $Id: oci_driver.c,v 1.24.2.4 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -149,10 +149,10 @@ ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, swor * so that we can catch the error information when execute * is called via query. See Bug #33707 */ if (H->einfo.errmsg) { - efree(H->einfo.errmsg); + pefree(H->einfo.errmsg, dbh->is_persistent); } H->einfo = *einfo; - H->einfo.errmsg = einfo->errmsg ? estrdup(einfo->errmsg) : NULL; + H->einfo.errmsg = einfo->errmsg ? pestrdup(einfo->errmsg, dbh->is_persistent) : NULL; strcpy(dbh->error_code, stmt->error_code); } diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index de34c9cea..061729e8a 100755 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci_statement.c,v 1.16.2.8 2005/11/04 18:11:40 wez Exp $ */ +/* $Id: oci_statement.c,v 1.16.2.9 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_oci/package.xml b/ext/pdo_oci/package.xml deleted file mode 100755 index 22cb4afd2..000000000 --- a/ext/pdo_oci/package.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - PDO_OCI - Oracle Call Interface driver for PDO - - - wez - Wez Furlong - wez@php.net - lead - - - - This extension provides an Oracle driver for PDO. - - PHP - - stable - 1.0 - 2005-11-26 - - -You need to install the PDO core module before you can make use of this one. -You also require Oracle OCI 8 or higher client libraries installed on the -machine where you intend to build and/or use it. - -If you are running on windows, you can download the binary from here: -http://pecl4win.php.net/ext.php/php_pdo_oci.dll - -** Changes ** -- Improved handling of long columns -- Fixed PECL Bug #5722; implemented LOB support. - - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_oci/package2.xml b/ext/pdo_oci/package2.xml new file mode 100644 index 000000000..f8cb18175 --- /dev/null +++ b/ext/pdo_oci/package2.xml @@ -0,0 +1,69 @@ + + + PDO_OCI + pecl.php.net + Oracle Call Interface driver for PDO + This extension provides an Oracle driver for PDO. + + + Wez Furlong + wez + wez@php.net + yes + + 2005-12-04 + + 1.0.1 + 1.0.1 + + + stable + stable + + PHP + +- Repackage with package2.xml +- Improved handling of long columns +- Fixed PECL Bug #5722; implemented LOB support. + +You require Oracle OCI 8 or higher client libraries (instantclient is also +supported) installed on the machine where you intend to build and/or use this +package. + +If you are running on windows, you can download the binary from here: +http://pecl4win.php.net/ext.php/php_pdo_oci.dll + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_OCI + + diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c index df7104876..472af7e3a 100755 --- a/ext/pdo_oci/pdo_oci.c +++ b/ext/pdo_oci/pdo_oci.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_oci.c,v 1.5.2.3 2005/11/26 21:25:39 wez Exp $ */ +/* $Id: pdo_oci.c,v 1.5.2.6 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -31,7 +31,7 @@ #include "php_pdo_oci_int.h" /* {{{ pdo_oci_functions[] */ -function_entry pdo_oci_functions[] = { +zend_function_entry pdo_oci_functions[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -59,7 +59,7 @@ zend_module_entry pdo_oci_module_entry = { NULL, NULL, PHP_MINFO(pdo_oci), - "1.0", + "1.0.1", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/pdo_oci/php_pdo_oci.h b/ext/pdo_oci/php_pdo_oci.h index 92362feb8..8a5c1be50 100755 --- a/ext/pdo_oci/php_pdo_oci.h +++ b/ext/pdo_oci/php_pdo_oci.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_oci.h,v 1.2 2005/01/12 05:47:03 wez Exp $ */ +/* $Id: php_pdo_oci.h,v 1.2.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PDO_OCI_H #define PHP_PDO_OCI_H diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h index edb344be5..828ecd8f9 100755 --- a/ext/pdo_oci/php_pdo_oci_int.h +++ b/ext/pdo_oci/php_pdo_oci_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_oci_int.h,v 1.4.2.1 2005/10/31 02:11:27 wez Exp $ */ +/* $Id: php_pdo_oci_int.h,v 1.4.2.2 2006/01/01 12:50:12 sniper Exp $ */ #include diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index b85dde44c..6ef1b7ff4 100755 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: odbc_driver.c,v 1.27.2.1 2005/09/26 21:37:33 wez Exp $ */ +/* $Id: odbc_driver.c,v 1.27.2.2 2005/12/14 04:56:22 wez Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -58,8 +58,10 @@ static int pdo_odbc_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *inf void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, char *what, const char *file, int line TSRMLS_DC) /* {{{ */ { - RETCODE rc; - SWORD errmsgsize = 0; + SQLRETURN rc; + SQLSMALLINT errmsgsize = 0; + SQLHANDLE eh; + SQLSMALLINT htype, recno = 1; pdo_odbc_db_handle *H = (pdo_odbc_db_handle*)dbh->driver_data; pdo_odbc_errinfo *einfo = &H->einfo; pdo_odbc_stmt *S = NULL; @@ -75,8 +77,19 @@ void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, if (statement == SQL_NULL_HSTMT && S) { statement = S->stmt; } - - rc = SQLError(H->env, H->dbc, statement, einfo->last_state, &einfo->last_error, + + if (statement) { + htype = SQL_HANDLE_STMT; + eh = statement; + } else if (H->dbc) { + htype = SQL_HANDLE_DBC; + eh = H->dbc; + } else { + htype = SQL_HANDLE_ENV; + eh = H->env; + } + + rc = SQLGetDiagRec(htype, eh, recno++, einfo->last_state, &einfo->last_error, einfo->last_err_msg, sizeof(einfo->last_err_msg)-1, &errmsgsize); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { @@ -94,6 +107,20 @@ void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] %s: %d %s", *pdo_err, what, einfo->last_error, einfo->last_err_msg); } + + /* just like a cursor, once you start pulling, you need to keep + * going until the end; SQL Server (at least) will mess with the + * actual cursor state if you don't finish retrieving all the + * diagnostic records (which can be generated by PRINT statements + * in the query, for instance). */ + while (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) { + char discard_state[5]; + char discard_buf[1024]; + SQLINTEGER code; + rc = SQLGetDiagRec(htype, eh, recno++, discard_state, &code, + discard_buf, sizeof(discard_buf)-1, &errmsgsize); + } + } /* }}} */ @@ -175,14 +202,12 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, p pdo_odbc_stmt_error("SQLPrepare"); } + stmt->driver_data = S; + stmt->methods = &odbc_stmt_methods; + if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { - SQLFreeHandle(SQL_HANDLE_STMT, S->stmt); return 0; } - - stmt->driver_data = S; - stmt->methods = &odbc_stmt_methods; - return 1; } diff --git a/ext/pdo_odbc/package.xml b/ext/pdo_odbc/package.xml deleted file mode 100755 index 3d066fbaa..000000000 --- a/ext/pdo_odbc/package.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - PDO_ODBC - ODBC v3 Interface driver for PDO - - - wez - Wez Furlong - wez@php.net - lead - - - - - - - This extension provides an ODBC v3 driver for PDO. It supports unixODBC - and IBM DB2 libraries, and will support more in future releases. - - PHP - - stable - 1.0 - 2005-11-26 - - -You need to install the PDO core module before you can make use of this one. -You also require either IBM DB2 CLI libraries or unixODBC. - -If you are running on windows, you can download the binary from here: -http://pecl4win.php.net/ext.php/php_pdo_odbc.dll - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_odbc/package2.xml b/ext/pdo_odbc/package2.xml new file mode 100644 index 000000000..ce50b8d42 --- /dev/null +++ b/ext/pdo_odbc/package2.xml @@ -0,0 +1,69 @@ + + + PDO_ODBC + pecl.php.net + ODBC v3 Interface driver for PDO + This extension provides an ODBC v3 driver for PDO. It supports unixODBC +and IBM DB2 libraries, and will support more in future releases. + + + Wez Furlong + wez + wez@php.net + yes + + 2005-12-04 + + 1.0.1 + 1.0.1 + + + stable + stable + + PHP + +- repackage with package2.xml + +You require either IBM DB2 CLI libraries or unixODBC to use this package. + +If you are running on windows, you can download the binary from here: +http://pecl4win.php.net/ext.php/php_pdo_odbc.dll + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_ODBC + + + + diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c index eaec0ba85..43292d8fd 100755 --- a/ext/pdo_odbc/pdo_odbc.c +++ b/ext/pdo_odbc/pdo_odbc.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_odbc.c,v 1.14.2.6 2005/11/26 20:50:07 wez Exp $ */ +/* $Id: pdo_odbc.c,v 1.14.2.7 2005/12/04 22:34:26 wez Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -60,7 +60,7 @@ zend_module_entry pdo_odbc_module_entry = { NULL, NULL, PHP_MINFO(pdo_odbc), - "1.0", + "1.0.1", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/pdo_pgsql/package.xml b/ext/pdo_pgsql/package.xml deleted file mode 100644 index 2f093a9ef..000000000 --- a/ext/pdo_pgsql/package.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - PDO_PGSQL - PostgreSQL driver for PDO - - - edink - Edin Kadribasic - edink@php.net - lead - - - iliaa - Ilia Alshanetsky - iliaa@php.net - lead - - - wez - Wez Furlong - wez@php.net - lead - - - - - This extension provides an PostgreSQL driver for PDO. - - PHP - - stable - 1.0 - 2005-11-26 - - -Now features native prepared statements and numerous other improvements. - -You need to install the PDO core module before you can make use of this one. -You also require PostgreSQL client libraries installed on the machine where you -intend to build and/or use it. - -If you are running on windows, you can download the binary from here: -http://pecl4win.php.net/ext.php/php_pdo_pgsql.dll - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_pgsql/package2.xml b/ext/pdo_pgsql/package2.xml new file mode 100644 index 000000000..3508bceb8 --- /dev/null +++ b/ext/pdo_pgsql/package2.xml @@ -0,0 +1,79 @@ + + + PDO_PGSQL + pecl.php.net + PostgreSQL driver for PDO + This extension provides an PostgreSQL driver for PDO. + + + Edin Kadribasic + edink + edink@php.net + yes + + + Ilia Alshanetsky + iliaa + iliaa@php.net + yes + + + Wez Furlong + wez + wez@php.net + yes + + 2005-12-04 + + 1.0.1 + 1.0.1 + + + stable + stable + + PHP + +- repackage with package2.xml +- Added PDO::pgsqlLOBCreate(), PDO::pgsqlLOBOpen() and PDO::pgsqlLOBUnlink(). + +You require PostgreSQL client libraries installed on the machine where you +intend to build and/or use this package. + +If you are running on windows, you can download the binary from here: +http://pecl4win.php.net/ext.php/php_pdo_pgsql.dll + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0.2 + PDO + + + + PDO_PGSQL + + diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 72dfac108..87cfb1b86 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_pgsql.c,v 1.7.2.6 2005/11/26 20:50:08 wez Exp $ */ +/* $Id: pdo_pgsql.c,v 1.7.2.10 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -31,7 +31,7 @@ #include "php_pdo_pgsql_int.h" /* {{{ pdo_pgsql_functions[] */ -function_entry pdo_pgsql_functions[] = { +zend_function_entry pdo_pgsql_functions[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -61,7 +61,7 @@ zend_module_entry pdo_pgsql_module_entry = { PHP_RINIT(pdo_pgsql), PHP_RSHUTDOWN(pdo_pgsql), PHP_MINFO(pdo_pgsql), - "1.0", + "1.0.2", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 99c37d681..8568d3697 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -2,21 +2,23 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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: Edin Kadribasic | + | Authors: Edin Kadribasic | + | Ilia Alshanestsky | + | Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: pgsql_driver.c,v 1.53.2.1 2005/11/25 03:35:04 wez Exp $ */ +/* $Id: pgsql_driver.c,v 1.53.2.10 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -28,6 +30,11 @@ #include "pdo/php_pdo.h" #include "pdo/php_pdo_driver.h" +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include "pg_config.h" /* needed for PG_VERSION */ #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" @@ -108,6 +115,81 @@ static int pdo_pgsql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *in } /* }}} */ +/* {{{ pdo_pgsql_create_lob_stream */ +static size_t pgsql_lob_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) +{ + struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract; + return lo_write(self->conn, self->lfd, (char*)buf, count); +} + +static size_t pgsql_lob_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) +{ + struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract; + return lo_read(self->conn, self->lfd, buf, count); +} + +static int pgsql_lob_close(php_stream *stream, int close_handle TSRMLS_DC) +{ + struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract; + pdo_dbh_t *dbh = self->dbh; + + if (close_handle) { + lo_close(self->conn, self->lfd); + } + efree(self); + php_pdo_dbh_delref(dbh TSRMLS_CC); + return 0; +} + +static int pgsql_lob_flush(php_stream *stream TSRMLS_DC) +{ + return 0; +} + +static int pgsql_lob_seek(php_stream *stream, off_t offset, int whence, + off_t *newoffset TSRMLS_DC) +{ + struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract; + int pos = lo_lseek(self->conn, self->lfd, offset, whence); + *newoffset = pos; + return pos >= 0 ? 0 : -1; +} + +php_stream_ops pdo_pgsql_lob_stream_ops = { + pgsql_lob_write, + pgsql_lob_read, + pgsql_lob_close, + pgsql_lob_flush, + "pdo_pgsql lob stream", + pgsql_lob_seek, + NULL, + NULL, + NULL +}; + +php_stream *pdo_pgsql_create_lob_stream(pdo_dbh_t *dbh, int lfd, Oid oid TSRMLS_DC) +{ + php_stream *stm; + struct pdo_pgsql_lob_self *self = ecalloc(1, sizeof(*self)); + pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; + + self->dbh = dbh; + self->lfd = lfd; + self->oid = oid; + self->conn = H->server; + + stm = php_stream_alloc(&pdo_pgsql_lob_stream_ops, self, 0, "r+b"); + + if (stm) { + php_pdo_dbh_addref(dbh TSRMLS_CC); + return stm; + } + + efree(self); + return NULL; +} +/* }}} */ + static int pgsql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ { pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; @@ -133,11 +215,9 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_pgsql_stmt *S = ecalloc(1, sizeof(pdo_pgsql_stmt)); int scrollable; #if HAVE_PQPREPARE - PGresult *res; int ret; char *nsql = NULL; int nsql_len = 0; - ExecStatusType status; #endif S->H = H; @@ -397,6 +477,131 @@ static int pgsql_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) return pdo_pgsql_transaction_cmd("ROLLBACK", dbh TSRMLS_CC); } +/* {{{ proto string PDO::pgsqlLOBCreate() + Creates a new large object, returning its identifier. Must be called inside a transaction. */ +static PHP_METHOD(PDO, pgsqlLOBCreate) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + Oid lfd; + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + lfd = lo_creat(H->server, INV_READ|INV_WRITE); + + if (lfd != InvalidOid) { + char *buf; + spprintf(&buf, 0, "%lu", (long) lfd); + RETURN_STRING(buf, 0); + } + + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "HY000"); + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto resource PDO::pgsqlLOBOpen(string oid [, string mode = 'rb']) + Opens an existing large object stream. Must be called inside a transaction. */ +static PHP_METHOD(PDO, pgsqlLOBOpen) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + Oid oid; + int lfd; + char *oidstr; + int oidstrlen; + char *modestr = "rb"; + int modestrlen; + int mode = INV_READ; + char *end_ptr; + + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + &oidstr, &oidstrlen, &modestr, &modestrlen)) { + RETURN_FALSE; + } + + oid = (Oid)strtoul(oidstr, &end_ptr, 10); + if (oid == 0 && (errno == ERANGE || errno == EINVAL)) { + RETURN_FALSE; + } + + if (strpbrk(modestr, "+w")) { + mode = INV_READ|INV_WRITE; + } + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + lfd = lo_open(H->server, oid, mode); + + if (lfd >= 0) { + php_stream *stream = pdo_pgsql_create_lob_stream(dbh, lfd, oid TSRMLS_CC); + if (stream) { + php_stream_to_zval(stream, return_value); + return; + } + } else { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "HY000"); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool PDO::pgsqlLOBUnlink(string oid) + Deletes the large object identified by oid. Must be called inside a transaction. */ +static PHP_METHOD(PDO, pgsqlLOBUnlink) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + Oid oid; + char *oidstr, *end_ptr; + int oidlen; + + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + &oidstr, &oidlen)) { + RETURN_FALSE; + } + + oid = (Oid)strtoul(oidstr, &end_ptr, 10); + if (oid == 0 && (errno == ERANGE || errno == EINVAL)) { + RETURN_FALSE; + } + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + if (1 == lo_unlink(H->server, oid)) { + RETURN_TRUE; + } + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "HY000"); + RETURN_FALSE; +} +/* }}} */ + + +static 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) + {NULL, NULL, NULL} +}; + +static zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) +{ + switch (kind) { + case PDO_DBH_DRIVER_METHOD_KIND_DBH: + return dbh_methods; + default: + return NULL; + } +} + static struct pdo_dbh_methods pgsql_methods = { pgsql_handle_closer, pgsql_handle_preparer, @@ -410,7 +615,7 @@ static struct pdo_dbh_methods pgsql_methods = { pdo_pgsql_fetch_error_func, pdo_pgsql_get_attribute, NULL, /* check_liveness */ - NULL /* get_driver_methods */ + pdo_pgsql_get_driver_methods /* get_driver_methods */ }; static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */ @@ -462,7 +667,7 @@ static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ H->pgoid = -1; dbh->methods = &pgsql_methods; - dbh->alloc_own_columns = 1; + dbh->alloc_own_columns = 0; dbh->max_escaped_char_length = 2; ret = 1; diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index f3a1fc8af..1d28d0b71 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -2,21 +2,23 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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: Edin Kadribasic | + | Authors: Edin Kadribasic | + | Ilia Alshanestsky | + | Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: pgsql_statement.c,v 1.31.2.4 2005/11/25 03:35:04 wez Exp $ */ +/* $Id: pgsql_statement.c,v 1.31.2.10 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -29,6 +31,9 @@ #include "pdo/php_pdo_driver.h" #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" +#if HAVE_NETINET_IN_H +#include +#endif /* from postgresql/src/include/catalog/pg_type.h */ #define BOOLOID 16 @@ -39,7 +44,6 @@ #define TEXTOID 25 #define OIDOID 26 - static int pgsql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) { pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; @@ -75,7 +79,14 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) efree(S->param_formats); S->param_formats = NULL; } - + if (S->param_types) { + efree(S->param_types); + S->param_types = NULL; + } + if (S->query) { + efree(S->query); + S->query = NULL; + } #endif if (S->cursor_name) { @@ -118,7 +129,8 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) if (S->stmt_name) { /* using a prepared statement */ - if (!stmt->executed) { + if (!S->is_prepared) { +stmt_retry: /* we deferred the prepare until now, because we didn't * know anything about the parameter types; now we do */ S->result = PQprepare(H->server, S->stmt_name, S->query, @@ -129,12 +141,31 @@ static int pgsql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) case PGRES_COMMAND_OK: case PGRES_TUPLES_OK: /* it worked */ + S->is_prepared = 1; PQclear(S->result); break; - default: - pdo_pgsql_error_stmt(stmt, status, - pdo_pgsql_sqlstate(S->result)); - return 0; + default: { + char *sqlstate = pdo_pgsql_sqlstate(S->result); + /* 42P05 means that the prepared statement already existed. this can happen if you use + * a connection pooling software line pgpool which doesn't close the db-connection once + * php disconnects. if php dies (no chanche to run RSHUTDOWN) during execution it has no + * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we + * deallocate it and retry ONCE (thies 2005.12.15) + */ + if (!strcmp(sqlstate, "42P05")) { + char buf[100]; /* stmt_name == "pdo_pgsql_cursor_%08x" */ + PGresult *res; + snprintf(buf, sizeof(buf), "DEALLOCATE %s", S->stmt_name); + res = PQexec(H->server, buf); + if (res) { + PQclear(res); + } + goto stmt_retry; + } else { + pdo_pgsql_error_stmt(stmt, status, sqlstate); + return 0; + } + } } } S->result = PQexecPrepared(H->server, S->stmt_name, @@ -184,6 +215,12 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * #if HAVE_PQPREPARE if (S->stmt_name && param->is_param) { switch (event_type) { + case PDO_PARAM_EVT_FREE: + if (param->driver_data) { + efree(param->driver_data); + } + break; + case PDO_PARAM_EVT_ALLOC: /* decode name from $1, $2 into 0, 1 etc. */ if (param->name) { @@ -224,10 +261,26 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data * php_stream *stm; php_stream_from_zval_no_verify(stm, ¶m->parameter); if (stm) { - SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); - Z_TYPE_P(param->parameter) = IS_STRING; - Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, - &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); + if (php_stream_is(stm, &pdo_pgsql_lob_stream_ops)) { + struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stm->abstract; + pdo_pgsql_bound_param *P = param->driver_data; + + if (P == NULL) { + P = ecalloc(1, sizeof(*P)); + param->driver_data = P; + } + P->oid = htonl(self->oid); + S->param_values[param->paramno] = (char*)&P->oid; + S->param_lengths[param->paramno] = sizeof(P->oid); + S->param_formats[param->paramno] = 1; + S->param_types[param->paramno] = OIDOID; + return 1; + } else { + SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter); + Z_TYPE_P(param->parameter) = IS_STRING; + Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, + &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); + } } else { /* expected a stream resource */ pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY105"); @@ -308,6 +361,7 @@ static int pgsql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) { pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data; struct pdo_column_data *cols = stmt->columns; + struct pdo_bound_param_data *param; if (!S->result) { return 0; @@ -324,10 +378,25 @@ static int pgsql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) case BOOLOID: cols[colno].param_type = PDO_PARAM_BOOL; break; + + case OIDOID: + /* did the user bind the column as a LOB ? */ + if (stmt->bound_columns && ( + SUCCESS == zend_hash_index_find(stmt->bound_columns, + colno, (void**)¶m) || + SUCCESS == zend_hash_find(stmt->bound_columns, + cols[colno].name, cols[colno].namelen, + (void**)¶m))) { + if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB) { + cols[colno].param_type = PDO_PARAM_LOB; + break; + } + } + cols[colno].param_type = PDO_PARAM_INT; + break; case INT2OID: case INT4OID: - case OIDOID: cols[colno].param_type = PDO_PARAM_INT; break; @@ -487,9 +556,24 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned break; case PDO_PARAM_LOB: - *ptr = php_pdo_pgsql_unescape_bytea(*ptr, &tmp_len); - *len = tmp_len; - *caller_frees = 1; + if (S->cols[colno].pgsql_type == OIDOID) { + /* ooo, a real large object */ + char *end_ptr; + Oid oid = (Oid)strtoul(*ptr, &end_ptr, 10); + int loid = lo_open(S->H->server, oid, INV_READ); + if (loid >= 0) { + *ptr = (char*)pdo_pgsql_create_lob_stream(stmt->dbh, loid, oid TSRMLS_CC); + *len = 0; + return *ptr ? 1 : 0; + } + *ptr = NULL; + *len = 0; + return 0; + } else { + *ptr = php_pdo_pgsql_unescape_bytea(*ptr, &tmp_len); + *len = tmp_len; + *caller_frees = 1; + } break; case PDO_PARAM_NULL: case PDO_PARAM_STR: diff --git a/ext/pdo_pgsql/php_pdo_pgsql.h b/ext/pdo_pgsql/php_pdo_pgsql.h index eddb7556c..4af13813e 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql.h +++ b/ext/pdo_pgsql/php_pdo_pgsql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_pgsql.h,v 1.3 2005/08/03 14:07:39 sniper Exp $ */ +/* $Id: php_pdo_pgsql.h,v 1.3.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PDO_PGSQL_H #define PHP_PDO_PGSQL_H diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index dc2437110..54914042e 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -2,26 +2,29 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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: Edin Kadribasic | + | Authors: Edin Kadribasic | + | Ilia Alshanestsky | + | Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_pgsql_int.h,v 1.13.2.1 2005/11/25 03:35:04 wez Exp $ */ +/* $Id: php_pdo_pgsql_int.h,v 1.13.2.4 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PDO_PGSQL_INT_H #define PHP_PDO_PGSQL_INT_H #include +#include #include #define PHP_PDO_PGSQL_CONNECTION_FAILURE_SQLSTATE "08006" @@ -62,14 +65,12 @@ typedef struct { int *param_lengths; int *param_formats; Oid *param_types; + zend_bool is_prepared; #endif } pdo_pgsql_stmt; typedef struct { - char *repr; - long repr_len; - int pgsql_type; - void *thing; /* for LOBS, REFCURSORS etc. */ + Oid oid; } pdo_pgsql_bound_param; extern pdo_driver_t pdo_pgsql_driver; @@ -90,6 +91,17 @@ enum { PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = PDO_ATTR_DRIVER_SPECIFIC, }; +struct pdo_pgsql_lob_self { + pdo_dbh_t *dbh; + PGconn *conn; + int lfd; + Oid oid; +}; + + +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; + #endif /* PHP_PDO_PGSQL_INT_H */ /* diff --git a/ext/pdo_pgsql/tests/bug_33876.phpt b/ext/pdo_pgsql/tests/bug_33876.phpt index 1184e7627..fc9d20f69 100644 --- a/ext/pdo_pgsql/tests/bug_33876.phpt +++ b/ext/pdo_pgsql/tests/bug_33876.phpt @@ -3,6 +3,7 @@ PDO PgSQL Bug #33876 --SKIPIF-- @@ -12,6 +13,7 @@ require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); +$db->exec("SET LC_MESSAGES='C'"); $db->exec('CREATE TABLE test (foo varchar(5) NOT NULL, bar bool NOT NULL)'); $db->exec("INSERT INTO test VALUES('false','f')"); $db->exec("INSERT INTO test VALUES('true', 't')"); diff --git a/ext/pdo_pgsql/tests/common.phpt b/ext/pdo_pgsql/tests/common.phpt index 383700904..2ecc2025f 100644 --- a/ext/pdo_pgsql/tests/common.phpt +++ b/ext/pdo_pgsql/tests/common.phpt @@ -5,6 +5,7 @@ Postgres if (!extension_loaded('pdo_pgsql')) print 'skip'; ?> --REDIRECTTEST-- # magic auto-configuration +# Also update config.inc if you make changes here... $config = array( 'TESTS' => 'ext/pdo/tests' diff --git a/ext/pdo_pgsql/tests/config.inc b/ext/pdo_pgsql/tests/config.inc new file mode 100644 index 000000000..6d616cddb --- /dev/null +++ b/ext/pdo_pgsql/tests/config.inc @@ -0,0 +1,14 @@ + $v) { + putenv("$k=$v"); +} diff --git a/ext/pdo_pgsql/tests/large_objects.phpt b/ext/pdo_pgsql/tests/large_objects.phpt new file mode 100644 index 000000000..f6ee9e29c --- /dev/null +++ b/ext/pdo_pgsql/tests/large_objects.phpt @@ -0,0 +1,61 @@ +--TEST-- +PDO PgSQL Large Objects +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); + +$db->exec('CREATE TABLE test (blobid integer not null primary key, bloboid OID)'); + +$db->beginTransaction(); +$oid = $db->pgsqlLOBCreate(); +try { +$stm = $db->pgsqlLOBOpen($oid); +fwrite($stm, "Hello dude\n"); + +$stmt = $db->prepare("INSERT INTO test (blobid, bloboid) values (?, ?)"); +$stmt->bindValue(1, 1); +/* bind as LOB; the oid from the pgsql stream will be inserted instead + * of the stream contents. Binding other streams will attempt to bind + * as bytea, and will most likely lead to an error. + * You can also just bind the $oid in as a string. */ +$stmt->bindParam(2, $stm, PDO::PARAM_LOB); +$stmt->execute(); +$stm = null; + +/* Pull it out */ +$stmt = $db->prepare("SELECT * from test"); +$stmt->execute(); +$stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); +echo "Fetching:\n"; +while (($row = $stmt->fetch(PDO::FETCH_ASSOC))) { + var_dump($row['blobid']); + var_dump(stream_get_contents($lob)); +} +echo "Fetched!\n"; +} catch (Exception $e) { + /* catch exceptions so that we can guarantee to clean + * up the LOB */ + echo "Exception! at line ", $e->getLine(), "\n"; + var_dump($e->getMessage()); +} + +/* Now to remove the large object from the database, so it doesn't + * linger and clutter up the storage */ +$db->pgsqlLOBUnlink($oid); + +--EXPECT-- +Fetching: +int(1) +string(11) "Hello dude +" +Fetched! diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index 7f7d7e5a0..cd9db22b4 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.26.2.6 2005/11/01 03:13:32 wez Exp $ +dnl $Id: config.m4,v 1.26.2.8 2005/12/31 00:56:06 sniper Exp $ dnl config.m4 for extension pdo_sqlite dnl vim:et:sw=2:ts=2: @@ -85,6 +85,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then $php_pdo_sqlite_sources_core $pdo_sqlite_sources, $ext_shared,,-I$ext_srcdir/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR -I$pdo_inc_path) + PHP_SUBST(PDO_SQLITE_SHARED_LIBADD) PHP_ADD_BUILD_DIR($ext_builddir/sqlite/src, 1) AC_CHECK_SIZEOF(char *,4) AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) @@ -94,7 +95,7 @@ if test "$PHP_PDO_SQLITE" != "no"; then touch $ext_srcdir/sqlite/src/parse.c $ext_srcdir/sqlite/src/parse.h - if test "$ext_shared" = "no" -o "$ext_srcdir" != "$abs_srcdir"; then + if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then echo '#include ' > $ext_srcdir/sqlite/src/config.h else echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/sqlite/src/config.h @@ -111,8 +112,11 @@ if test "$PHP_PDO_SQLITE" != "no"; then EOF AC_CHECK_FUNCS(usleep nanosleep) AC_CHECK_HEADERS(time.h) - + + dnl Solaris fix + PHP_CHECK_LIBRARY(rt, fdatasync, [PHP_ADD_LIBRARY(rt,, PDO_SQLITE_SHARED_LIBADD)]) fi + ifdef([PHP_ADD_EXTENSION_DEP], [ PHP_ADD_EXTENSION_DEP(pdo_sqlite, pdo) diff --git a/ext/pdo_sqlite/package.xml b/ext/pdo_sqlite/package.xml deleted file mode 100755 index 19ac59893..000000000 --- a/ext/pdo_sqlite/package.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - PDO_SQLITE - SQLite v3 Interface driver for PDO - - - wez - Wez Furlong - wez@php.net - lead - - - - - This extension provides an SQLite v3 driver for PDO. - SQLite V3 is NOT compatible with the bundled SQLite 2 in PHP 5, but is a significant - step forwards, featuring complete utf-8 support, native support for blobs, - native support for prepared statements with bound parameters and improved - concurrency. - - PHP - - stable - 1.0 - 2005-11-26 - - -You need to install the PDO core module before you can make use of this one. -This package includes a bundled SQLite 3 library. - -Windows binary: -http://pecl4win.php.net/ext.php/php_pdo_sqlite.dll - -- Fixed PECL Bug #5633; build issues -- Added sqliteCreateFunction() and sqliteCreateAggregate() -- Fixed PECL Bug #3452; problem when first row of a result set contains a NULL value. -- Upgraded bundled sqlite to 3.1.3 -- setting PDO_ATTR_TIMEOUT controls the busy timeout -- Fixed PECL Bug #3391; cannot bind NULL parameters -- Fixed build problem when building the bundled sqlite library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ext/pdo_sqlite/package2.xml b/ext/pdo_sqlite/package2.xml new file mode 100644 index 000000000..25d6e95dd --- /dev/null +++ b/ext/pdo_sqlite/package2.xml @@ -0,0 +1,187 @@ + + + PDO_SQLITE + pecl.php.net + SQLite v3 Interface driver for PDO + This extension provides an SQLite v3 driver for PDO. +SQLite V3 is NOT compatible with the bundled SQLite 2 in PHP 5, but is a significant +step forwards, featuring complete utf-8 support, native support for blobs, +native support for prepared statements with bound parameters and improved +concurrency. + + + + Wez Furlong + wez + wez@php.net + yes + + 2005-12-04 + + 1.0.1 + 1.0.1 + + + stable + stable + + PHP + +- Upgraded to new package2 format; no code changes in this release + +- Fixed PECL Bug #5633; build issues +- Added sqliteCreateFunction() and sqliteCreateAggregate() +- Fixed PECL Bug #3452; problem when first row of a result set contains a NULL value. +- Upgraded bundled sqlite to 3.1.3 +- setting PDO_ATTR_TIMEOUT controls the busy timeout +- Fixed PECL Bug #3391; cannot bind NULL parameters +- Fixed build problem when building the bundled sqlite library + +Windows binary: +http://pecl4win.php.net/ext.php/php_pdo_sqlite.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5.0.3 + + + 1.4.0 + + + pdo + pecl.php.net + 1.0 + PDO + + + + PDO_SQLITE + + + diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c index 7e9013168..4f04600ba 100644 --- a/ext/pdo_sqlite/pdo_sqlite.c +++ b/ext/pdo_sqlite/pdo_sqlite.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite.c,v 1.10.2.3 2005/11/26 20:50:08 wez Exp $ */ +/* $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -31,10 +31,10 @@ #include "php_pdo_sqlite_int.h" #include "zend_exceptions.h" -#define PHP_PDO_SQLITE_MODULE_VERSION "1.0" +#define PHP_PDO_SQLITE_MODULE_VERSION "1.0.1" /* {{{ pdo_sqlite_functions[] */ -function_entry pdo_sqlite_functions[] = { +zend_function_entry pdo_sqlite_functions[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -100,7 +100,7 @@ PHP_MINFO_FUNCTION(pdo_sqlite) "(bundled) " #endif PHP_PDO_SQLITE_MODULE_VERSION - " $Id: pdo_sqlite.c,v 1.10.2.3 2005/11/26 20:50:08 wez Exp $"); + " $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite3_libversion()); php_info_print_table_end(); } diff --git a/ext/pdo_sqlite/php_pdo_sqlite.h b/ext/pdo_sqlite/php_pdo_sqlite.h index dd0f8491b..a5a9fad4c 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite.h +++ b/ext/pdo_sqlite/php_pdo_sqlite.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite.h,v 1.2 2005/08/03 14:07:39 sniper Exp $ */ +/* $Id: php_pdo_sqlite.h,v 1.2.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PDO_SQLITE_H diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h index ad2d1d330..2f9c11621 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite_int.h +++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite_int.h,v 1.3 2005/06/10 02:50:37 wez Exp $ */ +/* $Id: php_pdo_sqlite_int.h,v 1.3.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PDO_SQLITE_INT_H #define PHP_PDO_SQLITE_INT_H diff --git a/ext/pdo_sqlite/sqlite/VERSION b/ext/pdo_sqlite/sqlite/VERSION index 406ebcbd9..f092941a7 100644 --- a/ext/pdo_sqlite/sqlite/VERSION +++ b/ext/pdo_sqlite/sqlite/VERSION @@ -1 +1 @@ -3.2.7 +3.2.8 diff --git a/ext/pdo_sqlite/sqlite/src/pager.c b/ext/pdo_sqlite/sqlite/src/pager.c index 1edfbb4e7..f06d3fec6 100644 --- a/ext/pdo_sqlite/sqlite/src/pager.c +++ b/ext/pdo_sqlite/sqlite/src/pager.c @@ -2981,7 +2981,7 @@ void sqlite3pager_dont_write(Pager *pPager, Pgno pgno){ pPg = pager_lookup(pPager, pgno); pPg->alwaysRollback = 1; - if( pPg && pPg->dirty ){ + if( pPg && pPg->dirty && !pPager->stmtInUse ){ if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSizedbSize ){ /* If this pages is the last page in the file and the file has grown ** during the current transaction, then do NOT mark the page as clean. diff --git a/ext/pdo_sqlite/sqlite/src/parse.c b/ext/pdo_sqlite/sqlite/src/parse.c index 8fe3ccde6..432a262fd 100644 --- a/ext/pdo_sqlite/sqlite/src/parse.c +++ b/ext/pdo_sqlite/sqlite/src/parse.c @@ -1,10 +1,10 @@ /* Driver template for the LEMON parser generator. -** The author disclaims copyright to this source code. +** The author disclaims copyright to this source code. */ /* First off, code is include which follows the "include" declaration ** in the input file. */ #include -#line 51 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 51 "ext/pdo_sqlite/sqlite/src/parse.y" #include "sqliteInt.h" #include "parse.h" @@ -43,7 +43,7 @@ struct TrigEvent { int a; IdList * b; }; */ struct AttachKey { int type; Token key; }; -#line 48 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 48 "ext/pdo_sqlite/sqlite/src/parse.c" /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ @@ -1325,9 +1325,9 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 162: case 195: case 212: -#line 370 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 370 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3SelectDelete((yypminor->yy375));} -#line 1332 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1332 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 176: case 177: @@ -1336,9 +1336,9 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 210: case 216: case 230: -#line 629 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 629 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3ExprDelete((yypminor->yy62));} -#line 1343 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1343 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 181: case 189: @@ -1351,43 +1351,43 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 219: case 222: case 228: -#line 876 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 876 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3ExprListDelete((yypminor->yy418));} -#line 1358 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1358 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 194: case 199: case 207: case 208: -#line 499 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 499 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3SrcListDelete((yypminor->yy151));} -#line 1366 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1366 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 204: -#line 561 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 561 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3ExprDelete((yypminor->yy220).pLimit); sqlite3ExprDelete((yypminor->yy220).pOffset); } -#line 1374 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1374 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 211: case 214: case 221: -#line 517 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 517 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3IdListDelete((yypminor->yy240));} -#line 1381 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1381 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 236: case 241: -#line 969 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 969 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3DeleteTriggerStep((yypminor->yy360));} -#line 1387 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1387 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 238: -#line 953 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 953 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3IdListDelete((yypminor->yy30).b);} -#line 1392 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1392 "ext/pdo_sqlite/sqlite/src/parse.c" break; default: break; /* If no destructor action specified: do nothing */ } @@ -1923,34 +1923,34 @@ static void yy_reduce( ** break; */ case 3: -#line 102 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 102 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3FinishCoding(pParse); } -#line 1930 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1930 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 6: -#line 105 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 105 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3BeginParse(pParse, 0); } -#line 1935 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1935 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 7: -#line 107 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 107 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3BeginParse(pParse, 1); } -#line 1940 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1940 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 8: -#line 108 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 108 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3BeginParse(pParse, 2); } -#line 1945 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1945 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 9: -#line 114 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 114 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy280);} -#line 1950 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1950 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 13: -#line 119 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 119 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = TK_DEFERRED;} -#line 1955 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1955 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 14: case 15: @@ -1958,27 +1958,27 @@ static void yy_reduce( case 104: case 106: case 107: -#line 120 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 120 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = yymsp[0].major;} -#line 1965 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1965 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 17: case 18: -#line 123 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 123 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3CommitTransaction(pParse);} -#line 1971 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1971 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 19: -#line 125 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 125 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3RollbackTransaction(pParse);} -#line 1976 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1976 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 21: -#line 130 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 130 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3StartTable(pParse,&yymsp[-4].minor.yy0,&yymsp[-1].minor.yy198,&yymsp[0].minor.yy198,yymsp[-3].minor.yy280,0); } -#line 1983 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1983 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 22: case 63: @@ -1986,9 +1986,9 @@ static void yy_reduce( case 109: case 224: case 227: -#line 135 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 135 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = 1;} -#line 1993 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 1993 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 23: case 62: @@ -1999,40 +1999,40 @@ static void yy_reduce( case 111: case 223: case 226: -#line 137 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 137 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = 0;} -#line 2006 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2006 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 24: -#line 138 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 138 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3EndTable(pParse,&yymsp[-1].minor.yy198,&yymsp[0].minor.yy0,0); } -#line 2013 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2013 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 25: -#line 141 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 141 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy375); sqlite3SelectDelete(yymsp[0].minor.yy375); } -#line 2021 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2021 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 28: -#line 153 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 153 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy198.z = yymsp[-2].minor.yy198.z; yygotominor.yy198.n = (pParse->sLastToken.z-yymsp[-2].minor.yy198.z) + pParse->sLastToken.n; } -#line 2029 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2029 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 29: -#line 157 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 157 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3AddColumn(pParse,&yymsp[0].minor.yy198); yygotominor.yy198 = yymsp[0].minor.yy198; } -#line 2037 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2037 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 30: case 31: @@ -2042,14 +2042,14 @@ static void yy_reduce( case 35: case 263: case 264: -#line 167 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 167 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198 = yymsp[0].minor.yy0;} -#line 2049 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2049 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 37: -#line 227 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 227 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy198);} -#line 2054 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2054 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 38: case 41: @@ -2060,152 +2060,152 @@ static void yy_reduce( case 251: case 261: case 262: -#line 228 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 228 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198 = yymsp[0].minor.yy198;} -#line 2067 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2067 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 39: -#line 229 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 229 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy198.z = yymsp[-3].minor.yy198.z; yygotominor.yy198.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy198.z; } -#line 2075 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2075 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 40: -#line 233 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 233 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy198.z = yymsp[-5].minor.yy198.z; yygotominor.yy198.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy198.z; } -#line 2083 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2083 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 42: -#line 239 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 239 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198.z=yymsp[-1].minor.yy198.z; yygotominor.yy198.n=yymsp[0].minor.yy198.n+(yymsp[0].minor.yy198.z-yymsp[-1].minor.yy198.z);} -#line 2088 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2088 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 43: -#line 241 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 241 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = atoi(yymsp[0].minor.yy198.z); } -#line 2093 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2093 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 44: -#line 242 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 242 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = -atoi(yymsp[0].minor.yy198.z); } -#line 2098 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2098 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 49: case 51: -#line 251 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 251 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy62);} -#line 2104 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2104 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 50: -#line 252 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 252 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy62);} -#line 2109 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2109 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 52: -#line 254 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 254 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *p = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy62, 0, 0); sqlite3AddDefaultValue(pParse,p); } -#line 2117 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2117 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 53: -#line 258 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 258 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *p = sqlite3Expr(TK_STRING, 0, 0, &yymsp[0].minor.yy198); sqlite3AddDefaultValue(pParse,p); } -#line 2125 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2125 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 55: -#line 267 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 267 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddNotNull(pParse, yymsp[0].minor.yy280);} -#line 2130 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2130 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 56: -#line 269 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 269 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy280,yymsp[0].minor.yy280);} -#line 2135 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2135 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 57: -#line 270 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 270 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy280,0,0);} -#line 2140 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2140 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 58: -#line 271 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 271 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3ExprDelete(yymsp[-2].minor.yy62);} -#line 2145 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2145 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 59: -#line 273 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 273 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy198,yymsp[-1].minor.yy418,yymsp[0].minor.yy280);} -#line 2150 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2150 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 60: -#line 274 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 274 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy280);} -#line 2155 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2155 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 61: -#line 275 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 275 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddCollateType(pParse, yymsp[0].minor.yy198.z, yymsp[0].minor.yy198.n);} -#line 2160 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2160 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 64: -#line 288 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 288 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = OE_Restrict * 0x010101; } -#line 2165 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2165 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 65: -#line 289 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 289 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = (yymsp[-1].minor.yy280 & yymsp[0].minor.yy359.mask) | yymsp[0].minor.yy359.value; } -#line 2170 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2170 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 66: -#line 291 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 291 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy359.value = 0; yygotominor.yy359.mask = 0x000000; } -#line 2175 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2175 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 67: -#line 292 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 292 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy359.value = yymsp[0].minor.yy280; yygotominor.yy359.mask = 0x0000ff; } -#line 2180 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2180 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 68: -#line 293 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 293 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy359.value = yymsp[0].minor.yy280<<8; yygotominor.yy359.mask = 0x00ff00; } -#line 2185 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2185 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 69: -#line 294 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 294 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy359.value = yymsp[0].minor.yy280<<16; yygotominor.yy359.mask = 0xff0000; } -#line 2190 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2190 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 70: -#line 296 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 296 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = OE_SetNull; } -#line 2195 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2195 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 71: -#line 297 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 297 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = OE_SetDflt; } -#line 2200 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2200 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 72: -#line 298 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 298 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = OE_Cascade; } -#line 2205 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2205 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 73: -#line 299 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 299 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = OE_Restrict; } -#line 2210 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2210 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 74: case 75: @@ -2214,92 +2214,92 @@ static void yy_reduce( case 94: case 95: case 166: -#line 301 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 301 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = yymsp[0].minor.yy280;} -#line 2221 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2221 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 79: -#line 311 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 311 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198.n = 0; yygotominor.yy198.z = 0;} -#line 2226 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2226 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 80: -#line 312 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 312 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198 = yymsp[-1].minor.yy0;} -#line 2231 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2231 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 85: -#line 318 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 318 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy418,yymsp[0].minor.yy280,yymsp[-2].minor.yy280);} -#line 2236 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2236 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 86: -#line 320 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 320 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy418,yymsp[0].minor.yy280,0,0);} -#line 2241 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2241 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 88: -#line 323 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 323 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy418, &yymsp[-3].minor.yy198, yymsp[-2].minor.yy418, yymsp[-1].minor.yy280); sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy280); } -#line 2249 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2249 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 91: case 93: -#line 337 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 337 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Default;} -#line 2255 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2255 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 96: -#line 342 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 342 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Ignore;} -#line 2260 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2260 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 97: case 167: -#line 343 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 343 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Replace;} -#line 2266 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2266 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 98: -#line 347 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 347 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy151, 0); } -#line 2273 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2273 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 99: -#line 354 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 354 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3CreateView(pParse, &yymsp[-6].minor.yy0, &yymsp[-3].minor.yy198, &yymsp[-2].minor.yy198, yymsp[0].minor.yy375, yymsp[-5].minor.yy280); } -#line 2280 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2280 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 100: -#line 357 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 357 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy151, 1); } -#line 2287 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2287 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 101: -#line 364 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 364 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3Select(pParse, yymsp[0].minor.yy375, SRT_Callback, 0, 0, 0, 0, 0); sqlite3SelectDelete(yymsp[0].minor.yy375); } -#line 2295 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2295 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 102: case 126: -#line 374 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 374 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy375 = yymsp[0].minor.yy375;} -#line 2301 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2301 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 103: -#line 376 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 376 "ext/pdo_sqlite/sqlite/src/parse.y" { if( yymsp[0].minor.yy375 ){ yymsp[0].minor.yy375->op = yymsp[-1].minor.yy280; @@ -2307,87 +2307,87 @@ static void yy_reduce( } yygotominor.yy375 = yymsp[0].minor.yy375; } -#line 2312 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2312 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 105: -#line 385 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 385 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = TK_ALL;} -#line 2317 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2317 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 108: -#line 390 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 390 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy375 = sqlite3SelectNew(yymsp[-6].minor.yy418,yymsp[-5].minor.yy151,yymsp[-4].minor.yy62,yymsp[-3].minor.yy418,yymsp[-2].minor.yy62,yymsp[-1].minor.yy418,yymsp[-7].minor.yy280,yymsp[0].minor.yy220.pLimit,yymsp[0].minor.yy220.pOffset); } -#line 2324 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2324 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 112: case 248: -#line 411 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 411 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = yymsp[-1].minor.yy418;} -#line 2330 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2330 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 113: case 140: case 150: case 247: -#line 412 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 412 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = 0;} -#line 2338 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2338 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 114: -#line 413 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 413 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-2].minor.yy418,yymsp[-1].minor.yy62,yymsp[0].minor.yy198.n?&yymsp[0].minor.yy198:0); } -#line 2345 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2345 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 115: -#line 416 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 416 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-1].minor.yy418, sqlite3Expr(TK_ALL, 0, 0, 0), 0); } -#line 2352 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2352 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 116: -#line 419 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 419 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *pRight = sqlite3Expr(TK_ALL, 0, 0, 0); Expr *pLeft = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy198); yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-3].minor.yy418, sqlite3Expr(TK_DOT, pLeft, pRight, 0), 0); } -#line 2361 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2361 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 119: -#line 431 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 431 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198.n = 0;} -#line 2366 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2366 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 120: -#line 443 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 443 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy151 = sqliteMalloc(sizeof(*yygotominor.yy151));} -#line 2371 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2371 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 121: -#line 444 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 444 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy151 = yymsp[0].minor.yy151;} -#line 2376 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2376 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 122: -#line 449 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 449 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy151 = yymsp[-1].minor.yy151; if( yygotominor.yy151 && yygotominor.yy151->nSrc>0 ) yygotominor.yy151->a[yygotominor.yy151->nSrc-1].jointype = yymsp[0].minor.yy280; } -#line 2384 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2384 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 123: -#line 453 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 453 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy151 = 0;} -#line 2389 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2389 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 124: -#line 454 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 454 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy151 = sqlite3SrcListAppend(yymsp[-5].minor.yy151,&yymsp[-4].minor.yy198,&yymsp[-3].minor.yy198); if( yymsp[-2].minor.yy198.n ) sqlite3SrcListAddAlias(yygotominor.yy151,&yymsp[-2].minor.yy198); @@ -2400,10 +2400,10 @@ static void yy_reduce( else { sqlite3IdListDelete(yymsp[0].minor.yy240); } } } -#line 2405 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2405 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 125: -#line 468 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 468 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy151 = sqlite3SrcListAppend(yymsp[-6].minor.yy151,0,0); yygotominor.yy151->a[yygotominor.yy151->nSrc-1].pSelect = yymsp[-4].minor.yy375; @@ -2417,45 +2417,45 @@ static void yy_reduce( else { sqlite3IdListDelete(yymsp[0].minor.yy240); } } } -#line 2422 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2422 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 127: -#line 489 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 489 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy375 = sqlite3SelectNew(0,yymsp[0].minor.yy151,0,0,0,0,0,0,0); } -#line 2429 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2429 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 128: -#line 495 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 495 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198.z=0; yygotominor.yy198.n=0;} -#line 2434 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2434 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 130: -#line 500 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 500 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy151 = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy198,&yymsp[0].minor.yy198);} -#line 2439 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2439 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 131: case 132: -#line 504 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 504 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = JT_INNER; } -#line 2445 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2445 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 133: -#line 506 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 506 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); } -#line 2450 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2450 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 134: -#line 507 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 507 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy198,0); } -#line 2455 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2455 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 135: -#line 509 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 509 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy198,&yymsp[-1].minor.yy198); } -#line 2460 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2460 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 136: case 144: @@ -2466,9 +2466,9 @@ static void yy_reduce( case 236: case 238: case 242: -#line 513 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 513 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = yymsp[0].minor.yy62;} -#line 2473 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2473 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 137: case 152: @@ -2477,163 +2477,163 @@ static void yy_reduce( case 237: case 239: case 243: -#line 514 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 514 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = 0;} -#line 2484 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2484 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 138: case 171: -#line 518 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 518 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy240 = yymsp[-1].minor.yy240;} -#line 2490 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2490 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 139: case 170: -#line 519 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 519 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy240 = 0;} -#line 2496 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2496 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 141: case 151: -#line 530 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 530 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = yymsp[0].minor.yy418;} -#line 2502 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2502 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 142: -#line 531 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 531 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-4].minor.yy418,yymsp[-2].minor.yy62,yymsp[-1].minor.yy198.n>0?&yymsp[-1].minor.yy198:0); if( yygotominor.yy418 ) yygotominor.yy418->a[yygotominor.yy418->nExpr-1].sortOrder = yymsp[0].minor.yy280; } -#line 2510 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2510 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 143: -#line 535 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 535 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(0,yymsp[-2].minor.yy62,yymsp[-1].minor.yy198.n>0?&yymsp[-1].minor.yy198:0); if( yygotominor.yy418 && yygotominor.yy418->a ) yygotominor.yy418->a[0].sortOrder = yymsp[0].minor.yy280; } -#line 2518 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2518 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 145: case 147: -#line 544 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 544 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = SQLITE_SO_ASC;} -#line 2524 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2524 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 146: -#line 545 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 545 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = SQLITE_SO_DESC;} -#line 2529 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2529 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 148: -#line 547 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 547 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy198.z = 0; yygotominor.yy198.n = 0;} -#line 2534 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2534 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 154: -#line 565 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 565 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy220.pLimit = 0; yygotominor.yy220.pOffset = 0;} -#line 2539 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2539 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 155: -#line 566 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 566 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy220.pLimit = yymsp[0].minor.yy62; yygotominor.yy220.pOffset = 0;} -#line 2544 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2544 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 156: -#line 568 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 568 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy220.pLimit = yymsp[-2].minor.yy62; yygotominor.yy220.pOffset = yymsp[0].minor.yy62;} -#line 2549 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2549 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 157: -#line 570 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 570 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy220.pOffset = yymsp[-2].minor.yy62; yygotominor.yy220.pLimit = yymsp[0].minor.yy62;} -#line 2554 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2554 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 158: -#line 574 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 574 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3DeleteFrom(pParse,yymsp[-1].minor.yy151,yymsp[0].minor.yy62);} -#line 2559 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2559 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 161: -#line 585 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 585 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Update(pParse,yymsp[-3].minor.yy151,yymsp[-1].minor.yy418,yymsp[0].minor.yy62,yymsp[-4].minor.yy280);} -#line 2564 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2564 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 162: -#line 591 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 591 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-4].minor.yy418,yymsp[0].minor.yy62,&yymsp[-2].minor.yy198);} -#line 2569 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2569 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 163: -#line 592 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 592 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = sqlite3ExprListAppend(0,yymsp[0].minor.yy62,&yymsp[-2].minor.yy198);} -#line 2574 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2574 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 164: -#line 598 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 598 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Insert(pParse, yymsp[-5].minor.yy151, yymsp[-1].minor.yy418, 0, yymsp[-4].minor.yy240, yymsp[-7].minor.yy280);} -#line 2579 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2579 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 165: -#line 600 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 600 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Insert(pParse, yymsp[-2].minor.yy151, 0, yymsp[0].minor.yy375, yymsp[-1].minor.yy240, yymsp[-4].minor.yy280);} -#line 2584 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2584 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 168: case 240: -#line 610 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 610 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-2].minor.yy418,yymsp[0].minor.yy62,0);} -#line 2590 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2590 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 169: case 241: -#line 611 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 611 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy418 = sqlite3ExprListAppend(0,yymsp[0].minor.yy62,0);} -#line 2596 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2596 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 172: -#line 620 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 620 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy240 = sqlite3IdListAppend(yymsp[-2].minor.yy240,&yymsp[0].minor.yy198);} -#line 2601 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2601 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 173: -#line 621 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 621 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy240 = sqlite3IdListAppend(0,&yymsp[0].minor.yy198);} -#line 2606 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2606 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 175: -#line 632 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 632 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = yymsp[-1].minor.yy62; sqlite3ExprSpan(yygotominor.yy62,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 2611 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2611 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 176: case 181: case 182: case 183: case 184: -#line 633 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 633 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = sqlite3Expr(yymsp[0].major, 0, 0, &yymsp[0].minor.yy0);} -#line 2620 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2620 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 177: case 178: -#line 634 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 634 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy0);} -#line 2626 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2626 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 179: -#line 636 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 636 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy198); Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy198); yygotominor.yy62 = sqlite3Expr(TK_DOT, temp1, temp2, 0); } -#line 2635 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2635 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 180: -#line 641 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 641 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-4].minor.yy198); Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy198); @@ -2641,32 +2641,32 @@ static void yy_reduce( Expr *temp4 = sqlite3Expr(TK_DOT, temp2, temp3, 0); yygotominor.yy62 = sqlite3Expr(TK_DOT, temp1, temp4, 0); } -#line 2646 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2646 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 185: -#line 652 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 652 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = sqlite3RegisterExpr(pParse, &yymsp[0].minor.yy0);} -#line 2651 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2651 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 186: -#line 653 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 653 "ext/pdo_sqlite/sqlite/src/parse.y" { Token *pToken = &yymsp[0].minor.yy0; Expr *pExpr = yygotominor.yy62 = sqlite3Expr(TK_VARIABLE, 0, 0, pToken); sqlite3ExprAssignVarNumber(pParse, pExpr); } -#line 2660 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2660 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 187: -#line 659 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 659 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_CAST, yymsp[-3].minor.yy62, 0, &yymsp[-1].minor.yy198); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0); } -#line 2668 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2668 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 188: -#line 664 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 664 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3ExprFunction(yymsp[-1].minor.yy418, &yymsp[-4].minor.yy0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0); @@ -2674,25 +2674,25 @@ static void yy_reduce( yygotominor.yy62->flags |= EP_Distinct; } } -#line 2679 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2679 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 189: -#line 671 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 671 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3ExprFunction(0, &yymsp[-3].minor.yy0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 2687 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2687 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 190: -#line 675 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 675 "ext/pdo_sqlite/sqlite/src/parse.y" { /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are ** treated as functions that return constants */ yygotominor.yy62 = sqlite3ExprFunction(0,&yymsp[0].minor.yy0); if( yygotominor.yy62 ) yygotominor.yy62->op = TK_CONST_FUNC; } -#line 2697 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2697 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 191: case 192: @@ -2712,22 +2712,22 @@ static void yy_reduce( case 206: case 207: case 208: -#line 681 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 681 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy62 = sqlite3Expr(yymsp[-1].major, yymsp[-2].minor.yy62, yymsp[0].minor.yy62, 0);} -#line 2719 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2719 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 209: -#line 700 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 700 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy222.operator = yymsp[0].minor.yy0; yygotominor.yy222.not = 0;} -#line 2724 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2724 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 210: -#line 701 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 701 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy222.operator = yymsp[0].minor.yy0; yygotominor.yy222.not = 1;} -#line 2729 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2729 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 213: -#line 705 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 705 "ext/pdo_sqlite/sqlite/src/parse.y" { ExprList *pList = sqlite3ExprListAppend(0, yymsp[-1].minor.yy62, 0); pList = sqlite3ExprListAppend(pList, yymsp[-3].minor.yy62, 0); @@ -2738,75 +2738,75 @@ static void yy_reduce( if( yymsp[-2].minor.yy222.not ) yygotominor.yy62 = sqlite3Expr(TK_NOT, yygotominor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62, &yymsp[-3].minor.yy62->span, &yymsp[-1].minor.yy62->span); } -#line 2743 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2743 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 214: -#line 716 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 716 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_ISNULL, yymsp[-1].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-1].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2751 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2751 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 215: -#line 720 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 720 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_ISNULL, yymsp[-2].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-2].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2759 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2759 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 216: -#line 724 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 724 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_NOTNULL, yymsp[-1].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-1].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2767 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2767 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 217: -#line 728 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 728 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_NOTNULL, yymsp[-2].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-2].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2775 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2775 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 218: -#line 732 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 732 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_NOTNULL, yymsp[-3].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-3].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2783 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2783 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 219: case 220: -#line 736 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 736 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(yymsp[-1].major, yymsp[0].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy62->span); } -#line 2792 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2792 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 221: -#line 744 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 744 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy62->span); } -#line 2800 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2800 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 222: -#line 748 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 748 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_UPLUS, yymsp[0].minor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy62->span); } -#line 2808 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2808 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 225: -#line 755 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 755 "ext/pdo_sqlite/sqlite/src/parse.y" { ExprList *pList = sqlite3ExprListAppend(0, yymsp[-2].minor.yy62, 0); pList = sqlite3ExprListAppend(pList, yymsp[0].minor.yy62, 0); @@ -2819,10 +2819,10 @@ static void yy_reduce( if( yymsp[-3].minor.yy280 ) yygotominor.yy62 = sqlite3Expr(TK_NOT, yygotominor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-4].minor.yy62->span,&yymsp[0].minor.yy62->span); } -#line 2824 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2824 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 228: -#line 771 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 771 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy62, 0, 0); if( yygotominor.yy62 ){ @@ -2833,10 +2833,10 @@ static void yy_reduce( if( yymsp[-3].minor.yy280 ) yygotominor.yy62 = sqlite3Expr(TK_NOT, yygotominor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-4].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2838 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2838 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 229: -#line 781 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 781 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_SELECT, 0, 0, 0); if( yygotominor.yy62 ){ @@ -2846,10 +2846,10 @@ static void yy_reduce( } sqlite3ExprSpan(yygotominor.yy62,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 2851 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2851 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 230: -#line 790 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 790 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy62, 0, 0); if( yygotominor.yy62 ){ @@ -2860,10 +2860,10 @@ static void yy_reduce( if( yymsp[-3].minor.yy280 ) yygotominor.yy62 = sqlite3Expr(TK_NOT, yygotominor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-4].minor.yy62->span,&yymsp[0].minor.yy0); } -#line 2865 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2865 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 231: -#line 800 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 800 "ext/pdo_sqlite/sqlite/src/parse.y" { SrcList *pSrc = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy198,&yymsp[0].minor.yy198); yygotominor.yy62 = sqlite3Expr(TK_IN, yymsp[-3].minor.yy62, 0, 0); @@ -2875,10 +2875,10 @@ static void yy_reduce( if( yymsp[-2].minor.yy280 ) yygotominor.yy62 = sqlite3Expr(TK_NOT, yygotominor.yy62, 0, 0); sqlite3ExprSpan(yygotominor.yy62,&yymsp[-3].minor.yy62->span,yymsp[0].minor.yy198.z?&yymsp[0].minor.yy198:&yymsp[-1].minor.yy198); } -#line 2880 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2880 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 232: -#line 811 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 811 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *p = yygotominor.yy62 = sqlite3Expr(TK_EXISTS, 0, 0, 0); if( p ){ @@ -2888,10 +2888,10 @@ static void yy_reduce( sqlite3SelectDelete(yymsp[-1].minor.yy375); } } -#line 2893 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2893 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 233: -#line 823 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 823 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_CASE, yymsp[-3].minor.yy62, yymsp[-1].minor.yy62, 0); if( yygotominor.yy62 ){ @@ -2901,46 +2901,46 @@ static void yy_reduce( } sqlite3ExprSpan(yygotominor.yy62, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0); } -#line 2906 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2906 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 234: -#line 834 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 834 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-4].minor.yy418, yymsp[-2].minor.yy62, 0); yygotominor.yy418 = sqlite3ExprListAppend(yygotominor.yy418, yymsp[0].minor.yy62, 0); } -#line 2914 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2914 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 235: -#line 838 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 838 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy418 = sqlite3ExprListAppend(0, yymsp[-2].minor.yy62, 0); yygotominor.yy418 = sqlite3ExprListAppend(yygotominor.yy418, yymsp[0].minor.yy62, 0); } -#line 2922 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2922 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 244: -#line 863 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 863 "ext/pdo_sqlite/sqlite/src/parse.y" { if( yymsp[-9].minor.yy280!=OE_None ) yymsp[-9].minor.yy280 = yymsp[0].minor.yy280; if( yymsp[-9].minor.yy280==OE_Default) yymsp[-9].minor.yy280 = OE_Abort; sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy198, &yymsp[-6].minor.yy198, sqlite3SrcListAppend(0,&yymsp[-4].minor.yy198,0),yymsp[-2].minor.yy418,yymsp[-9].minor.yy280, &yymsp[-10].minor.yy0, &yymsp[-1].minor.yy0); } -#line 2931 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2931 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 245: case 292: -#line 870 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 870 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Abort;} -#line 2937 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2937 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 246: -#line 871 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 871 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_None;} -#line 2942 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2942 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 249: -#line 881 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 881 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *p = 0; if( yymsp[-1].minor.yy198.n>0 ){ @@ -2949,10 +2949,10 @@ static void yy_reduce( } yygotominor.yy418 = sqlite3ExprListAppend(yymsp[-4].minor.yy418, p, &yymsp[-2].minor.yy198); } -#line 2954 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2954 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 250: -#line 889 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 889 "ext/pdo_sqlite/sqlite/src/parse.y" { Expr *p = 0; if( yymsp[-1].minor.yy198.n>0 ){ @@ -2961,256 +2961,256 @@ static void yy_reduce( } yygotominor.yy418 = sqlite3ExprListAppend(0, p, &yymsp[-2].minor.yy198); } -#line 2966 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2966 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 252: -#line 902 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 902 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3DropIndex(pParse, yymsp[0].minor.yy151);} -#line 2971 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2971 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 253: case 254: -#line 906 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 906 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Vacuum(pParse,0);} -#line 2977 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2977 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 255: case 257: -#line 912 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 912 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Pragma(pParse,&yymsp[-3].minor.yy198,&yymsp[-2].minor.yy198,&yymsp[0].minor.yy198,0);} -#line 2983 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2983 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 256: -#line 913 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 913 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Pragma(pParse,&yymsp[-3].minor.yy198,&yymsp[-2].minor.yy198,&yymsp[0].minor.yy0,0);} -#line 2988 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2988 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 258: -#line 915 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 915 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3Pragma(pParse,&yymsp[-3].minor.yy198,&yymsp[-2].minor.yy198,&yymsp[0].minor.yy198,1); } -#line 2995 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 2995 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 259: -#line 918 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 918 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Pragma(pParse,&yymsp[-4].minor.yy198,&yymsp[-3].minor.yy198,&yymsp[-1].minor.yy198,0);} -#line 3000 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3000 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 260: -#line 919 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 919 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Pragma(pParse,&yymsp[-1].minor.yy198,&yymsp[0].minor.yy198,0,0);} -#line 3005 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3005 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 267: -#line 932 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 932 "ext/pdo_sqlite/sqlite/src/parse.y" { Token all; all.z = yymsp[-3].minor.yy198.z; all.n = (yymsp[0].minor.yy0.z - yymsp[-3].minor.yy198.z) + yymsp[0].minor.yy0.n; sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy360, &all); } -#line 3015 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3015 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 268: -#line 941 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 941 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy198, &yymsp[-6].minor.yy198, yymsp[-5].minor.yy280, yymsp[-4].minor.yy30.a, yymsp[-4].minor.yy30.b, yymsp[-2].minor.yy151, yymsp[-1].minor.yy280, yymsp[0].minor.yy62, yymsp[-9].minor.yy280); yygotominor.yy198 = (yymsp[-6].minor.yy198.n==0?yymsp[-7].minor.yy198:yymsp[-6].minor.yy198); } -#line 3023 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3023 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 269: case 272: -#line 947 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 947 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = TK_BEFORE; } -#line 3029 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3029 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 270: -#line 948 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 948 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = TK_AFTER; } -#line 3034 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3034 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 271: -#line 949 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 949 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = TK_INSTEAD;} -#line 3039 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3039 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 273: case 274: case 275: -#line 954 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 954 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy30.a = yymsp[0].major; yygotominor.yy30.b = 0;} -#line 3046 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3046 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 276: -#line 957 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 957 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy30.a = TK_UPDATE; yygotominor.yy30.b = yymsp[0].minor.yy240;} -#line 3051 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3051 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 277: case 278: -#line 960 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 960 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = TK_ROW; } -#line 3057 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3057 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 279: -#line 962 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 962 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy280 = TK_STATEMENT; } -#line 3062 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3062 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 280: -#line 965 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 965 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = 0; } -#line 3067 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3067 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 281: -#line 966 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 966 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = yymsp[0].minor.yy62; } -#line 3072 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3072 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 282: -#line 970 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 970 "ext/pdo_sqlite/sqlite/src/parse.y" { yymsp[-2].minor.yy360->pNext = yymsp[0].minor.yy360; yygotominor.yy360 = yymsp[-2].minor.yy360; } -#line 3080 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3080 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 283: -#line 974 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 974 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy360 = 0; } -#line 3085 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3085 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 284: -#line 980 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 980 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy360 = sqlite3TriggerUpdateStep(&yymsp[-3].minor.yy198, yymsp[-1].minor.yy418, yymsp[0].minor.yy62, yymsp[-4].minor.yy280); } -#line 3090 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3090 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 285: -#line 985 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 985 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy360 = sqlite3TriggerInsertStep(&yymsp[-5].minor.yy198, yymsp[-4].minor.yy240, yymsp[-1].minor.yy418, 0, yymsp[-7].minor.yy280);} -#line 3095 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3095 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 286: -#line 988 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 988 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy360 = sqlite3TriggerInsertStep(&yymsp[-2].minor.yy198, yymsp[-1].minor.yy240, 0, yymsp[0].minor.yy375, yymsp[-4].minor.yy280);} -#line 3100 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3100 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 287: -#line 992 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 992 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy360 = sqlite3TriggerDeleteStep(&yymsp[-1].minor.yy198, yymsp[0].minor.yy62);} -#line 3105 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3105 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 288: -#line 995 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 995 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy360 = sqlite3TriggerSelectStep(yymsp[0].minor.yy375); } -#line 3110 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3110 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 289: -#line 998 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 998 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_RAISE, 0, 0, 0); yygotominor.yy62->iColumn = OE_Ignore; sqlite3ExprSpan(yygotominor.yy62, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 3119 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3119 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 290: -#line 1003 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1003 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy62 = sqlite3Expr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy198); yygotominor.yy62->iColumn = yymsp[-3].minor.yy280; sqlite3ExprSpan(yygotominor.yy62, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3128 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3128 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 291: -#line 1011 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1011 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Rollback;} -#line 3133 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3133 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 293: -#line 1013 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1013 "ext/pdo_sqlite/sqlite/src/parse.y" {yygotominor.yy280 = OE_Fail;} -#line 3138 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3138 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 294: -#line 1018 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1018 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3DropTrigger(pParse,yymsp[0].minor.yy151); } -#line 3145 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3145 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 295: -#line 1024 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1024 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3Attach(pParse, &yymsp[-3].minor.yy198, &yymsp[-1].minor.yy198, yymsp[0].minor.yy361.type, &yymsp[0].minor.yy361.key); } -#line 3152 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3152 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 296: -#line 1028 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1028 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy361.type = 0; } -#line 3157 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3157 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 297: -#line 1029 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1029 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy361.type=1; yygotominor.yy361.key = yymsp[0].minor.yy198; } -#line 3162 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3162 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 298: -#line 1030 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1030 "ext/pdo_sqlite/sqlite/src/parse.y" { yygotominor.yy361.type=2; yygotominor.yy361.key = yymsp[0].minor.yy0; } -#line 3167 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3167 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 301: -#line 1036 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1036 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3Detach(pParse, &yymsp[0].minor.yy198); } -#line 3174 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3174 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 302: -#line 1042 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1042 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Reindex(pParse, 0, 0);} -#line 3179 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3179 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 303: -#line 1043 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1043 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Reindex(pParse, &yymsp[-1].minor.yy198, &yymsp[0].minor.yy198);} -#line 3184 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3184 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 304: -#line 1048 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1048 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Analyze(pParse, 0, 0);} -#line 3189 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3189 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 305: -#line 1049 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1049 "ext/pdo_sqlite/sqlite/src/parse.y" {sqlite3Analyze(pParse, &yymsp[-1].minor.yy198, &yymsp[0].minor.yy198);} -#line 3194 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3194 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 306: -#line 1054 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1054 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy151,&yymsp[0].minor.yy198); } -#line 3201 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3201 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 307: -#line 1057 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1057 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy198); } -#line 3208 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3208 "ext/pdo_sqlite/sqlite/src/parse.c" break; case 308: -#line 1060 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 1060 "ext/pdo_sqlite/sqlite/src/parse.y" { sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy151); } -#line 3215 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3215 "ext/pdo_sqlite/sqlite/src/parse.c" break; }; yygoto = yyRuleInfo[yyruleno].lhs; @@ -3267,7 +3267,7 @@ static void yy_syntax_error( ){ sqlite3ParserARG_FETCH; #define TOKEN (yyminor.yy0) -#line 34 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.y" +#line 34 "ext/pdo_sqlite/sqlite/src/parse.y" if( pParse->zErrMsg==0 ){ if( TOKEN.z[0] ){ @@ -3276,7 +3276,7 @@ static void yy_syntax_error( sqlite3ErrorMsg(pParse, "incomplete SQL statement"); } } -#line 3282 "/home/rei/php_dev/php5.1/ext/pdo_sqlite/sqlite/src/parse.c" +#line 3282 "ext/pdo_sqlite/sqlite/src/parse.c" sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 763018aca..8caba37aa 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_driver.c,v 1.20.2.1 2005/09/20 19:52:24 iliaa Exp $ */ +/* $Id: sqlite_driver.c,v 1.20.2.5 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -42,7 +42,10 @@ int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int li einfo->line = line; if (einfo->errcode != SQLITE_OK) { - einfo->errmsg = (char*)sqlite3_errmsg(H->db); + if (einfo->errmsg) { + pefree(einfo->errmsg, dbh->is_persistent); + } + einfo->errmsg = pestrdup((char*)sqlite3_errmsg(H->db), dbh->is_persistent); } else { /* no error */ strcpy(*pdo_err, PDO_ERR_NONE); return 0; @@ -133,11 +136,17 @@ static int sqlite_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data; if (H) { + pdo_sqlite_error_info *einfo = &H->einfo; + pdo_sqlite_cleanup_callbacks(H TSRMLS_CC); if (H->db) { sqlite3_close(H->db); H->db = NULL; } + if (einfo->errmsg) { + pefree(einfo->errmsg, dbh->is_persistent); + einfo->errmsg = NULL; + } pefree(H, dbh->is_persistent); dbh->driver_data = NULL; } @@ -584,13 +593,13 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate) RETURN_FALSE; } /* }}} */ -static function_entry dbh_methods[] = { +static zend_function_entry dbh_methods[] = { PHP_ME(SQLite, sqliteCreateFunction, NULL, ZEND_ACC_PUBLIC) PHP_ME(SQLite, sqliteCreateAggregate, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; -static function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) +static zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) { switch (kind) { case PDO_DBH_DRIVER_METHOD_KIND_DBH: diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index c0e759e8b..15110772c 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_statement.c,v 1.18.2.3 2005/09/29 19:57:13 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.18.2.4 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/tests/bug35336.phpt b/ext/pdo_sqlite/tests/bug35336.phpt index 9fe77e19b..59dbda38b 100644 --- a/ext/pdo_sqlite/tests/bug35336.phpt +++ b/ext/pdo_sqlite/tests/bug35336.phpt @@ -1,5 +1,9 @@ --TEST-- Bug #35336 (crash on PDO::FETCH_CLASS + __set()) +--SKIPIF-- + --FILE-- @@ -36,6 +36,12 @@ #include "php_ini.h" #include "ext/standard/php_standard.h" #include "ext/standard/php_smart_str.h" + +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include "php_pgsql.h" #include "php_globals.h" #include "zend_exceptions.h" @@ -77,7 +83,7 @@ /* {{{ pgsql_functions[] */ -function_entry pgsql_functions[] = { +zend_function_entry pgsql_functions[] = { /* connection functions */ PHP_FE(pg_connect, NULL) PHP_FE(pg_pconnect, NULL) @@ -646,11 +652,11 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } if (persistent && PGG(allow_persistent)) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), str.c, str.len+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (PGG(max_links)!=-1 && PGG(num_links)>=PGG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, @@ -680,7 +686,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = pgsql; - if (zend_hash_update(&EG(persistent_list), str.c, str.len+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), str.c, str.len+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { goto err; } PGG(num_links)++; @@ -726,7 +732,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } ZEND_REGISTER_RESOURCE(return_value, pgsql, le_plink); } else { /* Non persistent connection */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual pgsql link sits. @@ -776,7 +782,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),str.c,str.len+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),str.c,str.len+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { goto err; } PGG(num_links)++; @@ -1633,7 +1639,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC) { PGresult *result; smart_str str = {0}; - list_entry *field_type; + zend_rsrc_list_entry *field_type; char *ret=NULL; /* try to lookup the type in the resource list */ @@ -1647,7 +1653,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC) int i,num_rows; int oid_offset,name_offset; char *tmp_oid, *end_ptr, *tmp_name; - list_entry new_oid_entry; + zend_rsrc_list_entry new_oid_entry; if ((result = PQexec(pgsql,"select oid,typname from pg_type")) == NULL || PQresultStatus(result) != PGRES_TUPLES_OK) { if (result) { @@ -1675,7 +1681,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC) } Z_TYPE(new_oid_entry) = le_string; new_oid_entry.ptr = estrdup(tmp_name); - zend_hash_update(list,str.c,str.len+1,(void *) &new_oid_entry, sizeof(list_entry), NULL); + zend_hash_update(list,str.c,str.len+1,(void *) &new_oid_entry, sizeof(zend_rsrc_list_entry), NULL); if (!ret && strtoul(tmp_oid, &end_ptr, 10)==oid) { ret = estrdup(tmp_name); } diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index e7ca2219c..68f110107 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pgsql.h,v 1.73 2005/08/03 14:07:41 sniper Exp $ */ +/* $Id: php_pgsql.h,v 1.73.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_PGSQL_H #define PHP_PGSQL_H diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt index ccb0c8082..b7611b98c 100644 --- a/ext/pgsql/tests/09notice.phpt +++ b/ext/pgsql/tests/09notice.phpt @@ -10,6 +10,7 @@ pgsql.ignore_notices=0 include 'config.inc'; $db = pg_connect($conn_str); +pg_exec($db, "SET LC_MESSAGES='C';"); pg_query($db, "BEGIN;"); pg_query($db, "BEGIN;"); diff --git a/ext/pgsql/tests/80_bug27597.phpt b/ext/pgsql/tests/80_bug27597.phpt index aa04a4a22..b27d6e94f 100755 --- a/ext/pgsql/tests/80_bug27597.phpt +++ b/ext/pgsql/tests/80_bug27597.phpt @@ -7,7 +7,7 @@ require_once('skipif.inc'); --FILE-- #ifndef HAVE_LIBEDIT #include @@ -249,7 +253,7 @@ PHP_FUNCTION(readline_info) Adds a line to the history */ PHP_FUNCTION(readline_add_history) { - pval **arg; + zval **arg; int ac = ZEND_NUM_ARGS(); if (ac != 1 || zend_get_parameters_ex(ac, &arg) == FAILURE) { @@ -308,7 +312,7 @@ PHP_FUNCTION(readline_list_history) Reads the history */ PHP_FUNCTION(readline_read_history) { - pval **arg; + zval **arg; char *filename = NULL; int ac = ZEND_NUM_ARGS(); @@ -335,7 +339,7 @@ PHP_FUNCTION(readline_read_history) Writes the history */ PHP_FUNCTION(readline_write_history) { - pval **arg; + zval **arg; char *filename = NULL; int ac = ZEND_NUM_ARGS(); @@ -421,7 +425,7 @@ static char **_readline_completion_cb(const char *text, int start, int end) if (call_user_function(CG(function_table), NULL, _readline_completion, &_readline_array, 3, params TSRMLS_CC) == SUCCESS) { if (Z_TYPE(_readline_array) == IS_ARRAY) { if (zend_hash_num_elements(Z_ARRVAL(_readline_array))) { - matches = completion_matches(text,_readline_command_generator); + matches = rl_completion_matches(text,_readline_command_generator); } else { matches = malloc(sizeof(char *) * 2); matches[0] = strdup(""); diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h index 37bcedef1..49e3db4cb 100644 --- a/ext/recode/php_recode.h +++ b/ext/recode/php_recode.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_recode.h,v 1.17 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: php_recode.h,v 1.17.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_RECODE_H #define PHP_RECODE_H diff --git a/ext/recode/recode.c b/ext/recode/recode.c index bbdb8e9f2..5b380eeef 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: recode.c,v 1.37 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: recode.c,v 1.37.2.1 2006/01/01 12:50:12 sniper Exp $ */ /* {{{ includes & prototypes */ @@ -119,7 +119,7 @@ PHP_MINFO_FUNCTION(recode) { php_info_print_table_start(); php_info_print_table_row(2, "Recode Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.37 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.37.2.1 $"); php_info_print_table_end(); } diff --git a/ext/reflection/CREDITS b/ext/reflection/CREDITS new file mode 100755 index 000000000..84be98880 --- /dev/null +++ b/ext/reflection/CREDITS @@ -0,0 +1,2 @@ +Reflection +Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter diff --git a/ext/reflection/config.m4 b/ext/reflection/config.m4 new file mode 100755 index 000000000..616c396b0 --- /dev/null +++ b/ext/reflection/config.m4 @@ -0,0 +1,13 @@ +dnl $Id: config.m4,v 1.4.2.3 2005/12/03 01:12:45 sniper Exp $ +dnl config.m4 for extension reflection + +PHP_ARG_ENABLE(reflection, whether to enable reflection support, +[ --disable-reflection Disable reflection support], yes, no) + +if test "$PHP_REFLECTION" != "no"; then + if test "$ext_shared" = "yes"; then + AC_MSG_ERROR(Cannot build reflection as a shared module) + fi + AC_DEFINE(HAVE_REFLECTION, 1, [Whether Reflection is enabled]) + PHP_NEW_EXTENSION(reflection, php_reflection.c) +fi diff --git a/ext/reflection/config.w32 b/ext/reflection/config.w32 new file mode 100755 index 000000000..1437c448e --- /dev/null +++ b/ext/reflection/config.w32 @@ -0,0 +1,9 @@ +// $Id: config.w32,v 1.2.2.2 2005/11/30 21:52:38 helly Exp $ +// vim:ft=javascript + +ARG_ENABLE("reflection", "disable reflection support", "yes"); + +if (PHP_REFLECTION != "no") { + EXTENSION("reflection", "php_reflection.c"); +} + diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c new file mode 100644 index 000000000..7ed925593 --- /dev/null +++ b/ext/reflection/php_reflection.c @@ -0,0 +1,4281 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Timm Friebe | + | George Schlossnagle | + | Andrei Zmievski | + | Marcus Boerger | + | Johannes Schlueter | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_reflection.c,v 1.164.2.17 2006/01/01 12:50:12 sniper Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "php_ini.h" +#include "php_reflection.h" +#include "ext/standard/info.h" + +#include "zend.h" +#include "zend_API.h" +#include "zend_exceptions.h" +#include "zend_operators.h" +#include "zend_constants.h" +#include "zend_ini.h" +#include "zend_interfaces.h" + +/* Undefine "getParameters" macro defined in "main/php3_compat.h" */ +#ifdef getParameters +# undef getParameters +#endif + +/* Class entry pointers */ +PHPAPI zend_class_entry *reflector_ptr; +PHPAPI zend_class_entry *reflection_exception_ptr; +PHPAPI zend_class_entry *reflection_ptr; +PHPAPI zend_class_entry *reflection_function_ptr; +PHPAPI zend_class_entry *reflection_parameter_ptr; +PHPAPI zend_class_entry *reflection_class_ptr; +PHPAPI zend_class_entry *reflection_object_ptr; +PHPAPI zend_class_entry *reflection_method_ptr; +PHPAPI zend_class_entry *reflection_property_ptr; +PHPAPI zend_class_entry *reflection_extension_ptr; + +#if MBO_0 +ZEND_BEGIN_MODULE_GLOBALS(reflection) + int dummy; +ZEND_END_MODULE_GLOBALS(reflection) + +#ifdef ZTS +# define REFLECTION_G(v) \ + TSRMG(reflection_globals_id, zend_reflection_globals*, v) +extern int reflection_globals_id; +#else +# define REFLECTION_G(v) (reflection_globals.v) +extern zend_reflection_globals reflectionglobals; +#endif + +ZEND_DECLARE_MODULE_GLOBALS(reflection) +#endif /* MBO_0 */ + +/* Method macros */ + +#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)); \ + return; \ + } \ + +#define METHOD_NOTSTATIC_NUMPARAMS(ce, c) METHOD_NOTSTATIC(ce) \ + if (ZEND_NUM_ARGS() > c) { \ + ZEND_WRONG_PARAM_COUNT(); \ + } \ + +/* Exception throwing macro */ +#define _DO_THROW(msg) \ + zend_throw_exception(reflection_exception_ptr, msg, 0 TSRMLS_CC); \ + return; \ + +#define RETURN_ON_EXCEPTION \ + if (EG(exception) && Z_OBJCE_P(EG(exception)) == reflection_exception_ptr) { \ + return; \ + } + +#define GET_REFLECTION_OBJECT_PTR(target) \ + 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"); \ + } \ + target = intern->ptr; \ + +/* Class constants */ +#define REGISTER_REFLECTION_CLASS_CONST_LONG(class_name, const_name, value) \ + zend_declare_class_constant_long(reflection_ ## class_name ## _ptr, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); + +/* {{{ Smart string functions */ +typedef struct _string { + char *string; + int len; + int alloced; +} string; + +static void string_init(string *str) +{ + str->string = (char *) emalloc(1024); + str->len = 1; + str->alloced = 1024; + *str->string = '\0'; +} + +static string *string_printf(string *str, const char *format, ...) +{ + int len; + va_list arg; + char *s_tmp; + + va_start(arg, format); + len = zend_vspprintf(&s_tmp, 0, format, arg); + if (len) { + register int nlen = (str->len + len + (1024 - 1)) & ~(1024 - 1); + if (str->alloced < nlen) { + str->alloced = nlen; + str->string = erealloc(str->string, str->alloced); + } + memcpy(str->string + str->len - 1, s_tmp, len + 1); + str->len += len; + } + efree(s_tmp); + va_end(arg); + return str; +} + +static string *string_write(string *str, char *buf, int len) +{ + register int nlen = (str->len + len + (1024 - 1)) & ~(1024 - 1); + if (str->alloced < nlen) { + str->alloced = nlen; + str->string = erealloc(str->string, str->alloced); + } + memcpy(str->string + str->len - 1, buf, len); + str->len += len; + str->string[str->len - 1] = '\0'; + return str; +} + +static string *string_append(string *str, string *append) +{ + if (append->len > 1) { + string_write(str, append->string, append->len - 1); + } + return str; +} + +static void string_free(string *str) +{ + efree(str->string); + str->len = 0; + str->alloced = 0; + str->string = NULL; +} +/* }}} */ + +/* Struct for properties */ +typedef struct _property_reference { + zend_class_entry *ce; + zend_property_info *prop; +} property_reference; + +/* Struct for parameters */ +typedef struct _parameter_reference { + zend_uint offset; + zend_uint required; + struct _zend_arg_info *arg_info; + zend_function *fptr; +} parameter_reference; + +/* Struct for reflection objects */ +typedef struct { + zend_object zo; + void *ptr; + unsigned int free_ptr:1; + zval *obj; + zend_class_entry *ce; +} reflection_object; + +static zend_object_handlers reflection_object_handlers; + +static void _default_get_entry(zval *object, char *name, int name_len, zval *return_value TSRMLS_DC) +{ + zval **value; + + if (zend_hash_find(Z_OBJPROP_P(object), name, name_len, (void **) &value) == FAILURE) { + RETURN_FALSE; + } + + *return_value = **value; + zval_copy_ctor(return_value); +} + +static void reflection_register_implement(zend_class_entry *class_entry, zend_class_entry *interface_entry TSRMLS_DC) +{ + zend_uint num_interfaces = ++class_entry->num_interfaces; + + class_entry->interfaces = (zend_class_entry **) realloc(class_entry->interfaces, sizeof(zend_class_entry *) * num_interfaces); + class_entry->interfaces[num_interfaces - 1] = interface_entry; +} + +static void reflection_free_objects_storage(void *object TSRMLS_DC) +{ + reflection_object *intern = (reflection_object *) object; + + if (intern->free_ptr && intern->ptr) { + efree(intern->ptr); + intern->ptr = NULL; + } + if (intern->obj) { + zval_ptr_dtor(&intern->obj); + } + zend_objects_free_object_storage(object TSRMLS_CC); +} + +static void reflection_objects_clone(void *object, void **object_clone TSRMLS_DC) +{ + reflection_object *intern = (reflection_object *) object; + reflection_object **intern_clone = (reflection_object **) object_clone; + + *intern_clone = emalloc(sizeof(reflection_object)); + (*intern_clone)->zo.ce = intern->zo.ce; + (*intern_clone)->zo.guards = NULL; + ALLOC_HASHTABLE((*intern_clone)->zo.properties); + (*intern_clone)->ptr = intern->ptr; + (*intern_clone)->free_ptr = intern->free_ptr; + (*intern_clone)->obj = intern->obj; + if (intern->obj) { + zval_add_ref(&intern->obj); + } +} + +static zend_object_value reflection_objects_new(zend_class_entry *class_type TSRMLS_DC) +{ + zval tmp; + zend_object_value retval; + reflection_object *intern; + + intern = emalloc(sizeof(reflection_object)); + intern->zo.ce = class_type; + intern->zo.guards = NULL; + intern->ptr = NULL; + intern->obj = NULL; + intern->free_ptr = 0; + + ALLOC_HASHTABLE(intern->zo.properties); + zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + retval.handle = zend_objects_store_put(intern, NULL, reflection_free_objects_storage, reflection_objects_clone TSRMLS_CC); + retval.handlers = &reflection_object_handlers; + return retval; +} + +static zval * reflection_instanciate(zend_class_entry *pce, zval *object TSRMLS_DC) +{ + if (!object) { + ALLOC_ZVAL(object); + } + Z_TYPE_P(object) = IS_OBJECT; + object_init_ex(object, pce); + object->refcount = 1; + object->is_ref = 1; + return object; +} + +static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC); +static void _function_string(string *str, zend_function *fptr, zend_class_entry *scope, char *indent TSRMLS_DC); +static void _property_string(string *str, zend_property_info *prop, char *prop_name, char* indent TSRMLS_DC); +static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *indent TSRMLS_DC); +static void _extension_string(string *str, zend_module_entry *module, char *indent TSRMLS_DC); + +/* {{{ _class_string */ +static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *indent TSRMLS_DC) +{ + int count, count_static_props = 0, count_static_funcs = 0, count_shadow_props = 0; + string sub_indent; + + string_init(&sub_indent); + string_printf(&sub_indent, "%s ", indent); + + /* TBD: Repair indenting of doc comment (or is this to be done in the parser?) */ + if (ce->type == ZEND_USER_CLASS && ce->doc_comment) { + string_printf(str, "%s%s", indent, ce->doc_comment); + string_write(str, "\n", 1); + } + + if (obj) { + string_printf(str, "%sObject of class [ ", indent); + } else { + string_printf(str, "%s%s [ ", indent, (ce->ce_flags & ZEND_ACC_INTERFACE) ? "Interface" : "Class"); + } + string_printf(str, (ce->type == ZEND_USER_CLASS) ? "module) { + string_printf(str, ":%s", ce->module->name); + } + string_printf(str, "> "); + if (ce->get_iterator != NULL) { + string_printf(str, " "); + } + if (ce->ce_flags & ZEND_ACC_INTERFACE) { + string_printf(str, "interface "); + } else { + if (ce->ce_flags & (ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) { + string_printf(str, "abstract "); + } + if (ce->ce_flags & ZEND_ACC_FINAL_CLASS) { + string_printf(str, "final "); + } + string_printf(str, "class "); + } + string_printf(str, "%s", ce->name); + if (ce->parent) { + string_printf(str, " extends %s", ce->parent->name); + } + + if (ce->num_interfaces) { + zend_uint i; + + string_printf(str, " implements %s", ce->interfaces[0]->name); + for (i = 1; i < ce->num_interfaces; ++i) { + string_printf(str, ", %s", ce->interfaces[i]->name); + } + } + string_printf(str, " ] {\n"); + + /* The information where a class is declared is only available for user classes */ + if (ce->type == ZEND_USER_CLASS) { + string_printf(str, "%s @@ %s %d-%d\n", indent, ce->filename, + ce->line_start, ce->line_end); + } + + /* Constants */ + if (&ce->constants_table) { + string_printf(str, "\n"); + count = zend_hash_num_elements(&ce->constants_table); + string_printf(str, "%s - Constants [%d] {\n", indent, count); + if (count > 0) { + HashPosition pos; + zval **value; + char *key; + uint key_len; + ulong num_index; + + zend_hash_internal_pointer_reset_ex(&ce->constants_table, &pos); + + while (zend_hash_get_current_data_ex(&ce->constants_table, (void **) &value, &pos) == SUCCESS) { + zend_hash_get_current_key_ex(&ce->constants_table, &key, &key_len, &num_index, 0, &pos); + + _const_string(str, key, *value, indent TSRMLS_CC); + zend_hash_move_forward_ex(&ce->constants_table, &pos); + } + } + string_printf(str, "%s }\n", indent); + } + + /* Static properties */ + if (&ce->properties_info) { + /* counting static properties */ + count = zend_hash_num_elements(&ce->properties_info); + if (count > 0) { + HashPosition pos; + zend_property_info *prop; + + zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); + + while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop, &pos) == SUCCESS) { + if(prop->flags & ZEND_ACC_SHADOW) { + count_shadow_props++; + } else if (prop->flags & ZEND_ACC_STATIC) { + count_static_props++; + } + zend_hash_move_forward_ex(&ce->properties_info, &pos); + } + } + + /* static properties */ + string_printf(str, "\n%s - Static properties [%d] {\n", indent, count_static_props); + if (count_static_props > 0) { + HashPosition pos; + zend_property_info *prop; + + zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); + + while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop, &pos) == SUCCESS) { + if ((prop->flags & ZEND_ACC_STATIC) && !(prop->flags & ZEND_ACC_SHADOW)) { + _property_string(str, prop, NULL, sub_indent.string TSRMLS_CC); + } + + zend_hash_move_forward_ex(&ce->properties_info, &pos); + } + } + string_printf(str, "%s }\n", indent); + } + + /* Static methods */ + if (&ce->function_table) { + /* counting static properties */ + count = zend_hash_num_elements(&ce->function_table); + if (count > 0) { + HashPosition pos; + zend_function *mptr; + + zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); + + while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { + if (mptr->common.fn_flags & ZEND_ACC_STATIC) { + count_static_funcs++; + } + zend_hash_move_forward_ex(&ce->function_table, &pos); + } + } + + /* static properties */ + string_printf(str, "\n%s - Static methods [%d] {", indent, count_static_funcs); + if (count_static_funcs > 0) { + HashPosition pos; + zend_function *mptr; + + zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); + + while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { + if (mptr->common.fn_flags & ZEND_ACC_STATIC) { + string_printf(str, "\n"); + _function_string(str, mptr, ce, sub_indent.string TSRMLS_CC); + } + zend_hash_move_forward_ex(&ce->function_table, &pos); + } + } else { + string_printf(str, "\n"); + } + string_printf(str, "%s }\n", indent); + } + + /* Default/Implicit properties */ + if (&ce->properties_info) { + count = zend_hash_num_elements(&ce->properties_info) - count_static_props - count_shadow_props; + string_printf(str, "\n%s - Properties [%d] {\n", indent, count); + if (count > 0) { + HashPosition pos; + zend_property_info *prop; + + zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos); + + while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop, &pos) == SUCCESS) { + if (!(prop->flags & (ZEND_ACC_STATIC|ZEND_ACC_SHADOW))) { + _property_string(str, prop, NULL, sub_indent.string TSRMLS_CC); + } + zend_hash_move_forward_ex(&ce->properties_info, &pos); + } + } + string_printf(str, "%s }\n", indent); + } + + if (obj && Z_OBJ_HT_P(obj)->get_properties) { + string dyn; + HashTable *properties = Z_OBJ_HT_P(obj)->get_properties(obj TSRMLS_CC); + HashPosition pos; + zval **prop; + + string_init(&dyn); + count = 0; + + zend_hash_internal_pointer_reset_ex(properties, &pos); + + while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) { + char *prop_name; + uint prop_name_size; + ulong index; + + if (zend_hash_get_current_key_ex(properties, &prop_name, &prop_name_size, &index, 1, &pos) == HASH_KEY_IS_STRING) { + if (prop_name_size && prop_name[0]) { /* skip all private and protected properties */ + if (!zend_hash_quick_exists(&ce->properties_info, prop_name, prop_name_size, zend_get_hash_value(prop_name, prop_name_size))) { + count++; + _property_string(&dyn, NULL, prop_name, sub_indent.string TSRMLS_CC); + } + } + efree(prop_name); + } + zend_hash_move_forward_ex(properties, &pos); + } + + string_printf(str, "\n%s - Dynamic properties [%d] {\n", indent, count); + string_append(str, &dyn); + string_printf(str, "%s }\n", indent); + string_free(&dyn); + } + + /* Non static methods */ + if (&ce->function_table) { + count = zend_hash_num_elements(&ce->function_table) - count_static_funcs; + string_printf(str, "\n%s - Methods [%d] {", indent, count); + if (count > 0) { + HashPosition pos; + zend_function *mptr; + + zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); + + while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { + if (!(mptr->common.fn_flags & ZEND_ACC_STATIC)) { + string_printf(str, "\n"); + _function_string(str, mptr, ce, sub_indent.string TSRMLS_CC); + } + zend_hash_move_forward_ex(&ce->function_table, &pos); + } + } else { + string_printf(str, "\n"); + } + string_printf(str, "%s }\n", indent); + } + + string_printf(str, "%s}\n", indent); + string_free(&sub_indent); +} +/* }}} */ + +/* {{{ _const_string */ +static void _const_string(string *str, char *name, zval *value, char *indent TSRMLS_DC) +{ + string_printf(str, "%s Constant [ %s %s ] { }\n", + indent, + zend_zval_type_name(value), + name); +} +/* }}} */ + +/* {{{ _get_recv_opcode */ +static zend_op* _get_recv_op(zend_op_array *op_array, zend_uint offset) +{ + zend_op *op = op_array->opcodes; + zend_op *end = op + op_array->last; + + ++offset; + while (op < end) { + if ((op->opcode == ZEND_RECV || op->opcode == ZEND_RECV_INIT) && + op->op1.u.constant.value.lval == offset) { + return op; + } + ++op; + } + return NULL; +} +/* }}} */ + +/* {{{ _parameter_string */ +static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg_info *arg_info, zend_uint offset, zend_uint required, char* indent TSRMLS_DC) +{ + string_printf(str, "Parameter #%d [ ", offset); + if (offset >= required) { + string_printf(str, " "); + } else { + string_printf(str, " "); + } + if (arg_info->class_name) { + string_printf(str, "%s ", arg_info->class_name); + if (arg_info->allow_null) { + string_printf(str, "or NULL "); + } + } else if (arg_info->array_type_hint) { + string_printf(str, "array "); + if (arg_info->allow_null) { + string_printf(str, "or NULL "); + } + } + if (arg_info->pass_by_reference) { + string_write(str, "&", sizeof("&")-1); + } + if (arg_info->name) { + string_printf(str, "$%s", arg_info->name); + } else { + string_printf(str, "$param%d", offset); + } + if (fptr->type == ZEND_USER_FUNCTION && offset >= required) { + zend_op *precv = _get_recv_op((zend_op_array*)fptr, offset); + if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2.op_type != IS_UNUSED) { + zval *zv, zv_copy; + int use_copy; + string_write(str, " = ", sizeof(" = ")-1); + ALLOC_ZVAL(zv); + *zv = precv->op2.u.constant; + zval_copy_ctor(zv); + INIT_PZVAL(zv); + zval_update_constant(&zv, (void*)1 TSRMLS_CC); + if (Z_TYPE_P(zv) == IS_BOOL) { + if (Z_LVAL_P(zv)) { + string_write(str, "true", sizeof("true")-1); + } else { + string_write(str, "false", sizeof("false")-1); + } + } else if (Z_TYPE_P(zv) == IS_NULL) { + string_write(str, "NULL", sizeof("NULL")-1); + } else if (Z_TYPE_P(zv) == IS_STRING) { + string_write(str, "'", sizeof("'")-1); + string_write(str, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 15)); + if (Z_STRLEN_P(zv) > 15) { + string_write(str, "...", sizeof("...")-1); + } + string_write(str, "'", sizeof("'")-1); + } else { + zend_make_printable_zval(zv, &zv_copy, &use_copy); + string_write(str, Z_STRVAL(zv_copy), Z_STRLEN(zv_copy)); + if (use_copy) { + zval_dtor(&zv_copy); + } + } + zval_ptr_dtor(&zv); + } + } + string_write(str, " ]", sizeof(" ]")-1); +} +/* }}} */ + +/* {{{ _function_parameter_string */ +static void _function_parameter_string(string *str, zend_function *fptr, char* indent TSRMLS_DC) +{ + struct _zend_arg_info *arg_info = fptr->common.arg_info; + zend_uint i, required = fptr->common.required_num_args; + + if (!arg_info) { + return; + } + + string_printf(str, "\n"); + string_printf(str, "%s- Parameters [%d] {\n", indent, fptr->common.num_args); + for (i = 0; i < fptr->common.num_args; i++) { + string_printf(str, "%s ", indent); + _parameter_string(str, fptr, arg_info, i, required, indent TSRMLS_CC); + string_write(str, "\n", sizeof("\n")-1); + arg_info++; + } + string_printf(str, "%s}\n", indent); +} +/* }}} */ + +/* {{{ _function_string */ +static void _function_string(string *str, zend_function *fptr, zend_class_entry *scope, char* indent TSRMLS_DC) +{ + string param_indent; + zend_function *overwrites; + char *lc_name; + unsigned int lc_name_len; + + /* TBD: Repair indenting of doc comment (or is this to be done in the parser?) + * What's "wrong" is that any whitespace before the doc comment start is + * swallowed, leading to an unaligned comment. + */ + if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { + string_printf(str, "%s%s\n", indent, fptr->op_array.doc_comment); + } + + string_printf(str, fptr->common.scope ? "%sMethod [ " : "%sFunction [ ", indent); + string_printf(str, (fptr->type == ZEND_USER_FUNCTION) ? "type == ZEND_INTERNAL_FUNCTION && ((zend_internal_function*)fptr)->module) { + string_printf(str, ":%s", ((zend_internal_function*)fptr)->module->name); + } +#endif + if (scope && fptr->common.scope) { + if (fptr->common.scope != scope) { + string_printf(str, ", inherits %s", fptr->common.scope->name); + } else if (fptr->common.scope->parent) { + lc_name_len = strlen(fptr->common.function_name); + lc_name = zend_str_tolower_dup(fptr->common.function_name, lc_name_len); + if (zend_hash_find(&fptr->common.scope->parent->function_table, lc_name, lc_name_len + 1, (void**) &overwrites) == SUCCESS) { + if (fptr->common.scope != overwrites->common.scope) { + string_printf(str, ", overwrites %s", overwrites->common.scope->name); + } + } + efree(lc_name); + } + } + if (fptr->common.prototype && fptr->common.prototype->common.scope) { + string_printf(str, ", prototype %s", fptr->common.prototype->common.scope->name); + } + if (fptr->common.fn_flags & ZEND_ACC_CTOR) { + string_printf(str, ", ctor"); + } + if (fptr->common.fn_flags & ZEND_ACC_DTOR) { + string_printf(str, ", dtor"); + } + string_printf(str, "> "); + + if (fptr->common.fn_flags & ZEND_ACC_ABSTRACT) { + string_printf(str, "abstract "); + } + if (fptr->common.fn_flags & ZEND_ACC_FINAL) { + string_printf(str, "final "); + } + if (fptr->common.fn_flags & ZEND_ACC_STATIC) { + string_printf(str, "static "); + } + + /* These are mutually exclusive */ + switch (fptr->common.fn_flags & ZEND_ACC_PPP_MASK) { + case ZEND_ACC_PUBLIC: + string_printf(str, "public "); + break; + case ZEND_ACC_PRIVATE: + string_printf(str, "private "); + break; + case ZEND_ACC_PROTECTED: + string_printf(str, "protected "); + break; + default: + string_printf(str, " "); + break; + } + + string_printf(str, fptr->common.scope ? "method " : "function "); + if (fptr->op_array.return_reference) { + string_printf(str, "&"); + } + string_printf(str, "%s ] {\n", fptr->common.function_name); + /* The information where a function is declared is only available for user classes */ + if (fptr->type == ZEND_USER_FUNCTION) { + string_printf(str, "%s @@ %s %d - %d\n", indent, + fptr->op_array.filename, + fptr->op_array.line_start, + fptr->op_array.line_end); + } + string_init(¶m_indent); + string_printf(¶m_indent, "%s ", indent); + _function_parameter_string(str, fptr, param_indent.string TSRMLS_CC); + string_free(¶m_indent); + string_printf(str, "%s}\n", indent); +} +/* }}} */ + +/* {{{ _property_string */ +static void _property_string(string *str, zend_property_info *prop, char *prop_name, char* indent TSRMLS_DC) +{ + char *class_name; + + string_printf(str, "%sProperty [ ", indent); + if (!prop) { + string_printf(str, " public $%s", prop_name); + } else { + if (!(prop->flags & ZEND_ACC_STATIC)) { + if (prop->flags & ZEND_ACC_IMPLICIT_PUBLIC) { + string_write(str, " ", sizeof(" ") - 1); + } else { + string_write(str, " ", sizeof(" ") - 1); + } + } + + /* These are mutually exclusive */ + switch (prop->flags & ZEND_ACC_PPP_MASK) { + case ZEND_ACC_PUBLIC: + string_printf(str, "public "); + break; + case ZEND_ACC_PRIVATE: + string_printf(str, "private "); + break; + case ZEND_ACC_PROTECTED: + string_printf(str, "protected "); + break; + } + if(prop->flags & ZEND_ACC_STATIC) { + string_printf(str, "static "); + } + + zend_unmangle_property_name(prop->name, &class_name, &prop_name); + string_printf(str, "$%s", prop_name); + } + + string_printf(str, " ]\n"); +} +/* }}} */ + +static int _extension_ini_string(zend_ini_entry *ini_entry, int num_args, va_list args, zend_hash_key *hash_key) +{ + string *str = va_arg(args, string *); + char *indent = va_arg(args, char *); + int number = va_arg(args, int); + char *comma = ""; + + if (number == ini_entry->module_number) { + string_printf(str, " %sEntry [ %s <", indent, ini_entry->name); + if (ini_entry->modifiable & ZEND_INI_ALL) { + string_printf(str, "ALL"); + } else { + if (ini_entry->modifiable & ZEND_INI_USER) { + string_printf(str, "USER"); + comma = ","; + } + if (ini_entry->modifiable & ZEND_INI_PERDIR) { + string_printf(str, "%sPERDIR", comma); + comma = ","; + } + if (ini_entry->modifiable & ZEND_INI_SYSTEM) { + string_printf(str, "%sSYSTEM", comma); + } + } + + string_printf(str, "> ]\n"); + string_printf(str, " %s Current = '%s'\n", indent, ini_entry->value ? ini_entry->value : ""); + if (ini_entry->modified) { + string_printf(str, " %s Default = '%s'\n", indent, ini_entry->orig_value ? ini_entry->orig_value : ""); + } + string_printf(str, " %s}\n", indent); + } + return ZEND_HASH_APPLY_KEEP; +} + +static int _extension_class_string(zend_class_entry **pce, int num_args, va_list args, zend_hash_key *hash_key) +{ + string *str = va_arg(args, string *); + char *indent = va_arg(args, char *); + struct _zend_module_entry *module = va_arg(args, struct _zend_module_entry*); + int *num_classes = va_arg(args, int*); + TSRMLS_FETCH(); + + if ((*pce)->module && !strcasecmp((*pce)->module->name, module->name)) { + string_printf(str, "\n"); + _class_string(str, *pce, NULL, indent TSRMLS_CC); + (*num_classes)++; + } + return ZEND_HASH_APPLY_KEEP; +} + +static int _extension_const_string(zend_constant *constant, int num_args, va_list args, zend_hash_key *hash_key) +{ + string *str = va_arg(args, string *); + char *indent = va_arg(args, char *); + struct _zend_module_entry *module = va_arg(args, struct _zend_module_entry*); + int *num_classes = va_arg(args, int*); + + if (constant->module_number == module->module_number) { + TSRMLS_FETCH(); + _const_string(str, constant->name, &constant->value, indent TSRMLS_CC); + (*num_classes)++; + } + return ZEND_HASH_APPLY_KEEP; +} + +/* {{{ _extension_string */ +static void _extension_string(string *str, zend_module_entry *module, char *indent TSRMLS_DC) +{ + string_printf(str, "%sExtension [ ", indent); + if (module->type == MODULE_PERSISTENT) { + string_printf(str, ""); + } + if (module->type == MODULE_TEMPORARY) { + string_printf(str, "" ); + } + string_printf(str, " extension #%d %s version %s ] {\n", + module->module_number, module->name, + (module->version == NO_VERSION_YET) ? "" : module->version); + + { + string str_ini; + string_init(&str_ini); + zend_hash_apply_with_arguments(EG(ini_directives), (apply_func_args_t) _extension_ini_string, 3, &str_ini, indent, module->module_number); + if (str_ini.len > 1) { + string_printf(str, "\n - INI {\n"); + string_append(str, &str_ini); + string_printf(str, "%s }\n", indent); + } + string_free(&str_ini); + } + + { + string str_constants; + int num_constants = 0; + + string_init(&str_constants); + zend_hash_apply_with_arguments(EG(zend_constants), (apply_func_args_t) _extension_const_string, 4, &str_constants, indent, module, &num_constants TSRMLS_CC); + if (num_constants) { + string_printf(str, "\n - Constants [%d] {\n", num_constants); + string_append(str, &str_constants); + string_printf(str, "%s }\n", indent); + } + string_free(&str_constants); + } + + if (module->functions && module->functions->fname) { + zend_function *fptr; + zend_function_entry *func = module->functions; + + string_printf(str, "\n - Functions {\n"); + + /* 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); + continue; + } + + _function_string(str, fptr, NULL, " " TSRMLS_CC); + func++; + } + string_printf(str, "%s }\n", indent); + } + + { + string str_classes; + string sub_indent; + int num_classes = 0; + + string_init(&sub_indent); + string_printf(&sub_indent, "%s ", indent); + string_init(&str_classes); + zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t) _extension_class_string, 4, &str_classes, sub_indent.string, module, &num_classes TSRMLS_CC); + if (num_classes) { + string_printf(str, "\n - Classes [%d] {", num_classes); + string_append(str, &str_classes); + string_printf(str, "%s }\n", indent); + } + string_free(&str_classes); + string_free(&sub_indent); + } + + string_printf(str, "%s}\n", indent); +} +/* }}} */ + +/* {{{ _function_check_flag */ +static void _function_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0); + GET_REFLECTION_OBJECT_PTR(mptr); + RETURN_BOOL(mptr->common.fn_flags & mask); +} +/* }}} */ + +/* {{{ zend_reflection_class_factory */ +PHPAPI void zend_reflection_class_factory(zend_class_entry *ce, zval *object TSRMLS_DC) +{ + reflection_object *intern; + zval *name; + + MAKE_STD_ZVAL(name); + ZVAL_STRINGL(name, ce->name, ce->name_length, 1); + reflection_instanciate(reflection_class_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + intern->ptr = ce; + intern->free_ptr = 0; + intern->ce = ce; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ reflection_extension_factory */ +static void reflection_extension_factory(zval *object, char *name_str TSRMLS_DC) +{ + reflection_object *intern; + zval *name; + int name_len = strlen(name_str); + char *lcname; + struct _zend_module_entry *module; + + lcname = do_alloca(name_len + 1); + zend_str_tolower_copy(lcname, name_str, name_len); + if (zend_hash_find(&module_registry, lcname, name_len + 1, (void **)&module) == FAILURE) { + free_alloca(lcname); + return; + } + free_alloca(lcname); + + reflection_instanciate(reflection_extension_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + MAKE_STD_ZVAL(name); + ZVAL_STRINGL(name, module->name, name_len, 1); + intern->ptr = module; + intern->free_ptr = 0; + intern->ce = NULL; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ reflection_parameter_factory */ +static void reflection_parameter_factory(zend_function *fptr, struct _zend_arg_info *arg_info, zend_uint offset, zend_uint required, zval *object TSRMLS_DC) +{ + reflection_object *intern; + parameter_reference *reference; + zval *name; + + MAKE_STD_ZVAL(name); + if (arg_info->name) { + ZVAL_STRINGL(name, arg_info->name, arg_info->name_len, 1); + } else { + ZVAL_NULL(name); + } + reflection_instanciate(reflection_parameter_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + reference = (parameter_reference*) emalloc(sizeof(parameter_reference)); + reference->arg_info = arg_info; + reference->offset = offset; + reference->required = required; + reference->fptr = fptr; + intern->ptr = reference; + intern->free_ptr = 1; + intern->ce = fptr->common.scope; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ reflection_function_factory */ +static void reflection_function_factory(zend_function *function, zval *object TSRMLS_DC) +{ + reflection_object *intern; + zval *name; + + MAKE_STD_ZVAL(name); + ZVAL_STRING(name, function->common.function_name, 1); + + reflection_instanciate(reflection_function_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + intern->ptr = function; + intern->free_ptr = 0; + intern->ce = NULL; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ reflection_method_factory */ +static void reflection_method_factory(zend_class_entry *ce, zend_function *method, zval *object TSRMLS_DC) +{ + reflection_object *intern; + zval *name; + zval *classname; + + MAKE_STD_ZVAL(name); + MAKE_STD_ZVAL(classname); + ZVAL_STRING(name, method->common.function_name, 1); + ZVAL_STRINGL(classname, ce->name, ce->name_length, 1); + reflection_instanciate(reflection_method_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + intern->ptr = method; + intern->free_ptr = 0; + intern->ce = ce; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ reflection_property_factory */ +static void reflection_property_factory(zend_class_entry *ce, zend_property_info *prop, zval *object TSRMLS_DC) +{ + reflection_object *intern; + zval *name; + zval *classname; + property_reference *reference; + char *class_name, *prop_name; + + zend_unmangle_property_name(prop->name, &class_name, &prop_name); + + if (!(prop->flags & ZEND_ACC_PRIVATE)) { + /* we have to seach the class hierarchy for this (implicit) public or protected property */ + zend_class_entry *tmp_ce = ce->parent; + zend_property_info *tmp_info; + + while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, strlen(prop_name) + 1, (void **) &tmp_info) == SUCCESS) { + if (tmp_info->flags & ZEND_ACC_PRIVATE) { + /* private in super class => NOT the same property */ + break; + } + ce = tmp_ce; + prop = tmp_info; + tmp_ce = tmp_ce->parent; + } + } + + MAKE_STD_ZVAL(name); + MAKE_STD_ZVAL(classname); + ZVAL_STRING(name, prop_name, 1); + ZVAL_STRINGL(classname, ce->name, ce->name_length, 1); + + reflection_instanciate(reflection_property_ptr, object TSRMLS_CC); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + reference = (property_reference*) emalloc(sizeof(property_reference)); + reference->ce = ce; + reference->prop = prop; + intern->ptr = reference; + intern->free_ptr = 1; + intern->ce = ce; + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL); +} +/* }}} */ + +/* {{{ _reflection_export */ +static void _reflection_export(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_ptr, int ctor_argc) +{ + zval *reflector_ptr; + zval output, *output_ptr = &output; + zval *argument_ptr, *argument2_ptr; + zval *retval_ptr, **params[2]; + int result; + int return_output = 0; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + zval fname; + + if (ctor_argc == 1) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &argument_ptr, &return_output) == FAILURE) { + return; + } + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|b", &argument_ptr, &argument2_ptr, &return_output) == FAILURE) { + return; + } + } + + INIT_PZVAL(&output); + + /* Create object */ + MAKE_STD_ZVAL(reflector_ptr); + if (object_and_properties_init(reflector_ptr, ce_ptr, NULL) == FAILURE) { + _DO_THROW("Could not create reflector"); + } + + /* Call __construct() */ + params[0] = &argument_ptr; + params[1] = &argument2_ptr; + + fci.size = sizeof(fci); + fci.function_table = NULL; + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = &reflector_ptr; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = ctor_argc; + fci.params = params; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = ce_ptr->constructor; + fcc.calling_scope = ce_ptr; + fcc.object_pp = &reflector_ptr; + + result = zend_call_function(&fci, &fcc TSRMLS_CC); + + if (retval_ptr) { + zval_ptr_dtor(&retval_ptr); + } + + if (EG(exception)) { + zval_ptr_dtor(&reflector_ptr); + return; + } + if (result == FAILURE) { + zval_ptr_dtor(&reflector_ptr); + _DO_THROW("Could not create reflector"); + } + + /* Call static reflection::export */ + ZVAL_BOOL(&output, return_output); + params[0] = &reflector_ptr; + params[1] = &output_ptr; + + ZVAL_STRINGL(&fname, "export", sizeof("export") - 1, 0); + fci.function_table = &reflection_ptr->function_table; + fci.function_name = &fname; + fci.object_pp = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = 2; + fci.params = params; + fci.no_separation = 1; + + result = zend_call_function(&fci, NULL TSRMLS_CC); + + if (result == FAILURE && EG(exception) == NULL) { + zval_ptr_dtor(&reflector_ptr); + zval_ptr_dtor(&retval_ptr); + _DO_THROW("Could not execute reflection::export()"); + } + + if (return_output) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } else { + zval_ptr_dtor(&retval_ptr); + } + + /* Destruct reflector which is no longer needed */ + zval_ptr_dtor(&reflector_ptr); +} +/* }}} */ + +/* {{{ Preventing __clone from being called */ +ZEND_METHOD(reflection, __clone) +{ + /* Should never be executable */ + _DO_THROW("Cannot clone object using __clone()"); +} +/* }}} */ + +/* {{{ proto public static mixed Reflection::export(Reflector r [, bool return]) + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection, export) +{ + zval *object, fname, *retval_ptr; + int result; + zend_bool return_output = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, reflector_ptr, &return_output) == FAILURE) { + return; + } + + /* Invoke the __toString() method */ + ZVAL_STRINGL(&fname, "__tostring", sizeof("__tostring") - 1, 1); + result= call_user_function_ex(NULL, &object, &fname, &retval_ptr, 0, NULL, 0, NULL TSRMLS_CC); + zval_dtor(&fname); + + if (result == FAILURE) { + _DO_THROW("Invocation of method __toString() failed"); + /* Returns from this function */ + } + + if (!retval_ptr) { + zend_error(E_WARNING, "%s::__toString() did not return anything", Z_OBJCE_P(object)->name); + RETURN_FALSE; + } + + if (return_output) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } else { + /* No need for _r variant, return of __toString should always be a string */ + zend_print_zval(retval_ptr, 0); + zend_printf("\n"); + zval_ptr_dtor(&retval_ptr); + } +} +/* }}} */ + +/* {{{ proto public static array Reflection::getModifierNames(int modifiers) + Returns an array of modifier names */ +ZEND_METHOD(reflection, getModifierNames) +{ + long modifiers; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &modifiers) == FAILURE) { + return; + } + + array_init(return_value); + + if (modifiers & (ZEND_ACC_ABSTRACT | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) { + add_next_index_stringl(return_value, "abstract", sizeof("abstract")-1, 1); + } + if (modifiers & (ZEND_ACC_FINAL | ZEND_ACC_FINAL_CLASS)) { + add_next_index_stringl(return_value, "final", sizeof("final")-1, 1); + } + + /* These are mutually exclusive */ + switch (modifiers & ZEND_ACC_PPP_MASK) { + case ZEND_ACC_PUBLIC: + add_next_index_stringl(return_value, "public", sizeof("public")-1, 1); + break; + case ZEND_ACC_PRIVATE: + add_next_index_stringl(return_value, "private", sizeof("private")-1, 1); + break; + case ZEND_ACC_PROTECTED: + add_next_index_stringl(return_value, "protected", sizeof("protected")-1, 1); + break; + } + + if (modifiers & ZEND_ACC_STATIC) { + add_next_index_stringl(return_value, "static", sizeof("static")-1, 1); + } +} +/* }}} */ + +/* {{{ proto public static mixed ReflectionFunction::export(string name [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_function, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_function_ptr, 1); +} +/* }}} */ + +/* {{{ proto public ReflectionFunction::__construct(string name) + Constructor. Throws an Exception in case the given function does not exist */ +ZEND_METHOD(reflection_function, __construct) +{ + zval *name; + zval *object; + char *lcname; + reflection_object *intern; + zend_function *fptr; + char *name_str; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name_str, &name_len) == FAILURE) { + return; + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + lcname = zend_str_tolower_dup(name_str, name_len); + if (zend_hash_find(EG(function_table), lcname, name_len + 1, (void **)&fptr) == FAILURE) { + efree(lcname); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Function %s() does not exist", name_str); + return; + } + efree(lcname); + MAKE_STD_ZVAL(name); + ZVAL_STRING(name, fptr->common.function_name, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + intern->ptr = fptr; + intern->free_ptr = 0; + intern->ce = NULL; +} +/* }}} */ + +/* {{{ proto public string ReflectionFunction::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_function, __toString) +{ + reflection_object *intern; + zend_function *fptr; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + string_init(&str); + _function_string(&str, fptr, intern->ce, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public string ReflectionFunction::getName() + Returns this function's name */ +ZEND_METHOD(reflection, function_getName) +{ + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionFunction::isInternal() + Returns whether this is an internal function */ +ZEND_METHOD(reflection, function_isInternal) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION); +} +/* }}} */ + +/* {{{ proto public bool ReflectionFunction::isUserDefined() + Returns whether this is an user-defined function */ +ZEND_METHOD(reflection_function, isUserDefined) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + RETURN_BOOL(fptr->type == ZEND_USER_FUNCTION); +} +/* }}} */ + +/* {{{ proto public string ReflectionFunction::getFileName() + Returns the filename of the file this function was declared in */ +ZEND_METHOD(reflection_function, getFileName) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + if (fptr->type == ZEND_USER_FUNCTION) { + RETURN_STRING(fptr->op_array.filename, 1); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public int ReflectionFunction::getStartLine() + Returns the line this function's declaration starts at */ +ZEND_METHOD(reflection_function, getStartLine) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + if (fptr->type == ZEND_USER_FUNCTION) { + RETURN_LONG(fptr->op_array.line_start); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public int ReflectionFunction::getEndLine() + Returns the line this function's declaration ends at */ +ZEND_METHOD(reflection_function, getEndLine) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + if (fptr->type == ZEND_USER_FUNCTION) { + RETURN_LONG(fptr->op_array.line_end); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public string ReflectionFunction::getDocComment() + Returns the doc comment for this function */ +ZEND_METHOD(reflection_function, getDocComment) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) { + RETURN_STRINGL(fptr->op_array.doc_comment, fptr->op_array.doc_comment_len, 1); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public array ReflectionFunction::getStaticVariables() + Returns an associative array containing this function's static variables and their values */ +ZEND_METHOD(reflection_function, getStaticVariables) +{ + zval *tmp_copy; + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_function_ptr, 0); + GET_REFLECTION_OBJECT_PTR(fptr); + + /* Return an empty array in case no static variables exist */ + array_init(return_value); + if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) { + zend_hash_apply_with_argument(fptr->op_array.static_variables, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); + zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *)); + } +} +/* }}} */ + +/* {{{ proto public mixed ReflectionFunction::invoke(mixed* args) + Invokes the function */ +ZEND_METHOD(reflection_function, invoke) +{ + zval *retval_ptr; + zval ***params; + int result; + int argc = ZEND_NUM_ARGS(); + zend_fcall_info fci; + zend_fcall_info_cache fcc; + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + params = safe_emalloc(sizeof(zval **), argc, 0); + if (zend_get_parameters_array_ex(argc, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + + fci.size = sizeof(fci); + fci.function_table = NULL; + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = argc; + fci.params = params; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = fptr; + fcc.calling_scope = EG(scope); + fcc.object_pp = NULL; + + result = zend_call_function(&fci, &fcc TSRMLS_CC); + + efree(params); + + if (result == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Invocation of function %s() failed", fptr->common.function_name); + return; + } + + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } +} +/* }}} */ + +static int _zval_array_to_c_array(zval **arg, zval ****params TSRMLS_DC) /* {{{ */ +{ + *(*params)++ = arg; + return ZEND_HASH_APPLY_KEEP; +} /* }}} */ + +/* {{{ proto public mixed ReflectionFunction::invokeArgs(array args) + Invokes the function and pass its arguments as array. */ +ZEND_METHOD(reflection_function, invokeArgs) +{ + zval *retval_ptr; + zval ***params; + int result; + int argc; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + reflection_object *intern; + zend_function *fptr; + zval *param_array; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", ¶m_array) == FAILURE) { + return; + } + + argc = zend_hash_num_elements(Z_ARRVAL_P(param_array)); + + params = safe_emalloc(sizeof(zval **), argc, 0); + zend_hash_apply_with_argument(Z_ARRVAL_P(param_array), (apply_func_arg_t)_zval_array_to_c_array, ¶ms TSRMLS_CC); + params -= argc; + + fci.size = sizeof(fci); + fci.function_table = NULL; + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = NULL; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = argc; + fci.params = params; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = fptr; + fcc.calling_scope = EG(scope); + fcc.object_pp = NULL; + + result = zend_call_function(&fci, &fcc TSRMLS_CC); + + efree(params); + + if (result == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Invocation of function %s() failed", fptr->common.function_name); + return; + } + + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } +} +/* }}} */ + +/* {{{ proto public bool ReflectionFunction::returnsReference() + Gets whether this function returns a reference */ +ZEND_METHOD(reflection_function, returnsReference) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + RETURN_BOOL(fptr->op_array.return_reference); +} +/* }}} */ + +/* {{{ proto public bool ReflectionFunction::getNumberOfParameters() + Gets the number of required parameters */ +ZEND_METHOD(reflection_function, getNumberOfParameters) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + RETURN_LONG(fptr->common.num_args); +} +/* }}} */ + +/* {{{ proto public bool ReflectionFunction::getNumberOfRequiredParameters() + Gets the number of required parameters */ +ZEND_METHOD(reflection_function, getNumberOfRequiredParameters) +{ + reflection_object *intern; + zend_function *fptr; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + RETURN_LONG(fptr->common.required_num_args); +} +/* }}} */ + +/* {{{ proto public ReflectionParameter[] ReflectionFunction::getParameters() + Returns an array of parameter objects for this function */ +ZEND_METHOD(reflection_function, getParameters) +{ + reflection_object *intern; + zend_function *fptr; + zend_uint i; + struct _zend_arg_info *arg_info; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + arg_info= fptr->common.arg_info; + + array_init(return_value); + for (i = 0; i < fptr->common.num_args; i++) { + zval *parameter; + + ALLOC_ZVAL(parameter); + reflection_parameter_factory(fptr, arg_info, i, fptr->common.required_num_args, parameter TSRMLS_CC); + add_next_index_zval(return_value, parameter); + + arg_info++; + } +} +/* }}} */ + +#if MBO_0 +/* {{{ proto public ReflectionExtension|NULL ReflectionFunction::getExtension() + Returns NULL or the extension the function belongs to */ +ZEND_METHOD(reflection_function, getExtension) +{ + reflection_object *intern; + zend_function *fptr; + zend_internal_function *internal; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + if (fptr->type != ZEND_INTERNAL_FUNCTION) { + RETURN_NULL(); + } + + internal = (zend_internal_function *)fptr; + if (internal->module) { + reflection_extension_factory(return_value, internal->module->name TSRMLS_CC); + } else { + RETURN_NULL(); + } +} +/* }}} */ +#endif + +#if MBO_0 +/* {{{ proto public string|false ReflectionFunction::getExtensionName() + Returns false or the name of the extension the function belongs to */ +ZEND_METHOD(reflection_function, getExtensionName) +{ + reflection_object *intern; + zend_function *fptr; + zend_internal_function *internal; + + METHOD_NOTSTATIC(reflection_function_ptr); + GET_REFLECTION_OBJECT_PTR(fptr); + + if (fptr->type != ZEND_INTERNAL_FUNCTION) { + RETURN_FALSE; + } + + internal = (zend_internal_function *)fptr; + if (internal->module) { + RETURN_STRING(internal->module->name, 1); + } else { + RETURN_FALSE; + } +} +/* }}} */ +#endif + +/* {{{ proto public static mixed ReflectionParameter::export(mixed function, mixed parameter [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_parameter, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_parameter_ptr, 2); +} +/* }}} */ + +/* {{{ proto public ReflectionParameter::__construct(mixed function, mixed parameter) + Constructor. Throws an Exception in case the given method does not exist */ +ZEND_METHOD(reflection_parameter, __construct) +{ + parameter_reference *ref; + zval *reference, *parameter; + zval *object; + zval *name; + reflection_object *intern; + zend_function *fptr; + struct _zend_arg_info *arg_info; + int position; + zend_class_entry *ce = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &reference, ¶meter) == FAILURE) { + return; + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + + /* First, find the function */ + switch (Z_TYPE_P(reference)) { + case IS_STRING: { + unsigned int lcname_len; + char *lcname; + + convert_to_string_ex(&reference); + lcname_len = Z_STRLEN_P(reference); + lcname = zend_str_tolower_dup(Z_STRVAL_P(reference), lcname_len); + if (zend_hash_find(EG(function_table), lcname, lcname_len + 1, (void**) &fptr) == FAILURE) { + efree(lcname); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Function %s() does not exist", Z_STRVAL_P(reference)); + return; + } + efree(lcname); + } + break; + + case IS_ARRAY: { + zval **classref; + zval **method; + zend_class_entry **pce; + unsigned int lcname_len; + char *lcname; + + if ((zend_hash_index_find(Z_ARRVAL_P(reference), 0, (void **) &classref) == FAILURE) + || (zend_hash_index_find(Z_ARRVAL_P(reference), 1, (void **) &method) == FAILURE)) { + _DO_THROW("Expected array($object, $method) or array($classname, $method)"); + /* returns out of this function */ + } + + if (Z_TYPE_PP(classref) == IS_OBJECT) { + ce = Z_OBJCE_PP(classref); + } else { + convert_to_string_ex(classref); + if (zend_lookup_class(Z_STRVAL_PP(classref), Z_STRLEN_PP(classref), &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not exist", Z_STRVAL_PP(classref)); + return; + } + ce = *pce; + } + + convert_to_string_ex(method); + lcname_len = Z_STRLEN_PP(method); + lcname = zend_str_tolower_dup(Z_STRVAL_PP(method), lcname_len); + if (zend_hash_find(&ce->function_table, lcname, lcname_len + 1, (void **) &fptr) == FAILURE) { + efree(lcname); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Method %s::%s() does not exist", Z_STRVAL_PP(classref), Z_TYPE_PP(method), Z_STRVAL_PP(method)); + return; + } + efree(lcname); + } + break; + + default: + _DO_THROW("The parameter class is expected to be either a string or an array(class, method)"); + /* returns out of this function */ + } + + /* Now, search for the parameter */ + arg_info = fptr->common.arg_info; + if (Z_TYPE_P(parameter) == IS_LONG) { + position= Z_LVAL_P(parameter); + if (position < 0 || (zend_uint)position >= fptr->common.num_args) { + _DO_THROW("The parameter specified by its offset could not be found"); + /* returns out of this function */ + } + } else { + zend_uint i; + + position= -1; + convert_to_string_ex(¶meter); + for (i = 0; i < fptr->common.num_args; i++) { + if (arg_info[i].name && strcmp(arg_info[i].name, Z_STRVAL_P(parameter)) == 0) { + position= i; + break; + } + } + if (position == -1) { + _DO_THROW("The parameter specified by its name could not be found"); + /* returns out of this function */ + } + } + + MAKE_STD_ZVAL(name); + if (arg_info[position].name) { + ZVAL_STRINGL(name, arg_info[position].name, arg_info[position].name_len, 1); + } else { + ZVAL_NULL(name); + } + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + + ref = (parameter_reference*) emalloc(sizeof(parameter_reference)); + ref->arg_info = &arg_info[position]; + ref->offset = (zend_uint)position; + ref->required = fptr->common.required_num_args; + ref->fptr = fptr; + intern->ptr = ref; + intern->free_ptr = 1; + intern->ce = ce; +} +/* }}} */ + +/* {{{ proto public string ReflectionParameter::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_parameter, __toString) +{ + reflection_object *intern; + parameter_reference *param; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + string_init(&str); + _parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public string ReflectionParameter::getName() + Returns this parameters's name */ +ZEND_METHOD(reflection_parameter, getName) +{ + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public ReflectionClass ReflectionParameter::getClass() + Returns this parameters's class hint or NULL if there is none */ +ZEND_METHOD(reflection_parameter, getClass) +{ + reflection_object *intern; + parameter_reference *param; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + if (!param->arg_info->class_name) { + RETURN_NULL(); + } else { + zend_class_entry **pce; + + if (zend_lookup_class_ex(param->arg_info->class_name, param->arg_info->class_name_len, 1, &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not exist", param->arg_info->class_name); + return; + } + zend_reflection_class_factory(*pce, return_value TSRMLS_CC); + } +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::isArray() + Returns whether parameter MUST be an array */ +ZEND_METHOD(reflection_parameter, isArray) +{ + reflection_object *intern; + parameter_reference *param; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + RETVAL_BOOL(param->arg_info->array_type_hint); +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::allowsNull() + Returns whether NULL is allowed as this parameters's value */ +ZEND_METHOD(reflection_parameter, allowsNull) +{ + reflection_object *intern; + parameter_reference *param; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + RETVAL_BOOL(param->arg_info->allow_null); +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::isPassedByReference() + Returns whether this parameters is passed to by reference */ +ZEND_METHOD(reflection_parameter, isPassedByReference) +{ + reflection_object *intern; + parameter_reference *param; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + RETVAL_BOOL(param->arg_info->pass_by_reference); +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::isOptional() + Returns whether this parameter is an optional parameter */ +ZEND_METHOD(reflection_parameter, isOptional) +{ + reflection_object *intern; + parameter_reference *param; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + RETVAL_BOOL(param->offset >= param->required); +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::isDefaultValueAvailable() + Returns whether the default value of this parameter is available */ +ZEND_METHOD(reflection_parameter, isDefaultValueAvailable) +{ + reflection_object *intern; + parameter_reference *param; + zend_op *precv; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + if (param->fptr->type != ZEND_USER_FUNCTION) + { + RETURN_FALSE; + } + if (param->offset < param->required) { + RETURN_FALSE; + } + precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); + if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) { + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ + +/* {{{ proto public bool ReflectionParameter::getDefaultValue() + Returns the default value of this parameter or throws an exception */ +ZEND_METHOD(reflection_parameter, getDefaultValue) +{ + reflection_object *intern; + parameter_reference *param; + zend_op *precv; + zval *zv, zv_copy; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_parameter_ptr, 0); + GET_REFLECTION_OBJECT_PTR(param); + + if (param->fptr->type != ZEND_USER_FUNCTION) + { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions"); + return; + } + if (param->offset < param->required) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional"); + return; + } + precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); + if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error"); + return; + } + + zv_copy = precv->op2.u.constant; + zv = &zv_copy; + zval_update_constant(&zv, (void*)0 TSRMLS_CC); + RETURN_ZVAL(zv, 1, 1); +} +/* }}} */ + +/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_method, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_method_ptr, 2); +} +/* }}} */ + +/* {{{ proto public ReflectionMethod::__construct(mixed class_or_method [, string name]) + Constructor. Throws an Exception in case the given method does not exist */ +ZEND_METHOD(reflection_method, __construct) +{ + zval *name, *classname; + zval *object; + reflection_object *intern; + char *lcname; + zend_class_entry **pce; + zend_class_entry *ce; + zend_function *mptr; + char *name_str, *tmp; + int name_len, tmp_len; + zval ztmp; + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "zs", &classname, &name_str, &name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name_str, &name_len) == FAILURE) { + return; + } + if ((tmp = strstr(name_str, "::")) == NULL) { + return; + } + classname = &ztmp; + tmp_len = tmp - name_str; + ZVAL_STRINGL(classname, name_str, tmp_len, 1); + name_len = name_len - (tmp_len + 2); + name_str = tmp + 2; + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + + /* Find the class entry */ + switch (Z_TYPE_P(classname)) { + case IS_STRING: + if (zend_lookup_class(Z_STRVAL_P(classname), Z_STRLEN_P(classname), &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not exist", Z_STRVAL_P(classname)); + return; + } + ce = *pce; + break; + + case IS_OBJECT: + ce = Z_OBJCE_P(classname); + break; + + default: + _DO_THROW("The parameter class is expected to be either a string or an object"); + /* returns out of this function */ + } + + if (classname == &ztmp) { + zval_dtor(&ztmp); + } + + MAKE_STD_ZVAL(classname); + ZVAL_STRINGL(classname, ce->name, ce->name_length, 1); + + zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL); + + lcname = zend_str_tolower_dup(name_str, name_len); + + if (zend_hash_find(&ce->function_table, lcname, name_len + 1, (void **) &mptr) == FAILURE) { + efree(lcname); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Method %s::%s() does not exist", ce->name, name_str); + return; + } + efree(lcname); + + MAKE_STD_ZVAL(name); + ZVAL_STRING(name, mptr->common.function_name, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + intern->ptr = mptr; + intern->free_ptr = 0; + intern->ce = ce; +} +/* }}} */ + +/* {{{ proto public string ReflectionMethod::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_method, __toString) +{ + reflection_object *intern; + zend_function *mptr; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0); + GET_REFLECTION_OBJECT_PTR(mptr); + string_init(&str); + _function_string(&str, mptr, intern->ce, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args) + Invokes the method. */ +ZEND_METHOD(reflection_method, invoke) +{ + zval *retval_ptr; + zval ***params; + zval **object_pp; + reflection_object *intern; + zend_function *mptr; + int argc = ZEND_NUM_ARGS(); + int result; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + zend_class_entry *obj_ce; + + METHOD_NOTSTATIC(reflection_method_ptr); + + if (argc < 1) { + zend_error(E_WARNING, "Invoke() expects at least one parameter, none given"); + RETURN_FALSE; + } + + GET_REFLECTION_OBJECT_PTR(mptr); + + if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || + (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { + if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke abstract method %s::%s()", + mptr->common.scope->name, mptr->common.function_name); + } else { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke %s method %s::%s() from scope %s", + mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", + mptr->common.scope->name, mptr->common.function_name, + Z_OBJCE_P(getThis())->name); + } + return; + } + + params = safe_emalloc(sizeof(zval **), argc, 0); + if (zend_get_parameters_array_ex(argc, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + + /* In case this is a static method, we should'nt pass an object_pp + * (which is used as calling context aka $this). We can thus ignore the + * first parameter. + * + * Else, we verify that the given object is an instance of the class. + */ + if (mptr->common.fn_flags & ZEND_ACC_STATIC) { + object_pp = NULL; + obj_ce = NULL; + } else { + if ((Z_TYPE_PP(params[0]) != IS_OBJECT)) { + efree(params); + _DO_THROW("Non-object passed to Invoke()"); + /* Returns from this function */ + } + obj_ce = Z_OBJCE_PP(params[0]); + + if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) { + efree(params); + _DO_THROW("Given object is not an instance of the class this method was declared in"); + /* Returns from this function */ + } + + object_pp = params[0]; + } + + fci.size = sizeof(fci); + fci.function_table = NULL; + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = object_pp; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = argc-1; + fci.params = params+1; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = mptr; + fcc.calling_scope = obj_ce; + fcc.object_pp = object_pp; + + result = zend_call_function(&fci, &fcc TSRMLS_CC); + + efree(params); + + if (result == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Invocation of method %s::%s() failed", mptr->common.scope->name, mptr->common.function_name); + return; + } + + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } +} +/* }}} */ + +/* {{{ proto public mixed ReflectionMethod::invokeArgs(mixed object, array args) + Invokes the function and pass its arguments as array. */ +ZEND_METHOD(reflection_method, invokeArgs) +{ + zval *retval_ptr; + zval ***params; + zval *object; + reflection_object *intern; + zend_function *mptr; + int argc; + int result; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + zend_class_entry *obj_ce; + zval *param_array; + + METHOD_NOTSTATIC(reflection_method_ptr); + + GET_REFLECTION_OBJECT_PTR(mptr); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a", &object, ¶m_array) == FAILURE) { + return; + } + + if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || + (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { + if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke abstract method %s::%s", + mptr->common.scope->name, mptr->common.function_name); + } else { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke %s method %s::%s from scope %s", + mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", + mptr->common.scope->name, mptr->common.function_name, + Z_OBJCE_P(getThis())->name); + } + return; + } + + argc = zend_hash_num_elements(Z_ARRVAL_P(param_array)); + + params = safe_emalloc(sizeof(zval **), argc, 0); + zend_hash_apply_with_argument(Z_ARRVAL_P(param_array), (apply_func_arg_t)_zval_array_to_c_array, ¶ms TSRMLS_CC); + params -= argc; + + /* In case this is a static method, we should'nt pass an object_pp + * (which is used as calling context aka $this). We can thus ignore the + * first parameter. + * + * Else, we verify that the given object is an instance of the class. + */ + if (mptr->common.fn_flags & ZEND_ACC_STATIC) { + object = NULL; + obj_ce = NULL; + } else { + if (!object) { + efree(params); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Trying to invoke non static method %s::%s without an object", + mptr->common.scope->name, mptr->common.function_name); + return; + } + + obj_ce = Z_OBJCE_P(object); + + if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) { + efree(params); + _DO_THROW("Given object is not an instance of the class this method was declared in"); + /* Returns from this function */ + } + } + + fci.size = sizeof(fci); + fci.function_table = NULL; + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = &object; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = argc; + fci.params = params; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = mptr; + fcc.calling_scope = obj_ce; + fcc.object_pp = &object; + + result = zend_call_function(&fci, &fcc TSRMLS_CC); + + efree(params); + + if (result == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Invocation of method %s::%s() failed", mptr->common.scope->name, mptr->common.function_name); + return; + } + + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr); + } +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isFinal() + Returns whether this method is final */ +ZEND_METHOD(reflection_method, isFinal) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isAbstract() + Returns whether this method is abstract */ +ZEND_METHOD(reflection_method, isAbstract) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_ABSTRACT); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isPublic() + Returns whether this method is public */ +ZEND_METHOD(reflection_method, isPublic) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isPrivate() + Returns whether this method is private */ +ZEND_METHOD(reflection_method, isPrivate) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isProtected() + Returns whether this method is protected */ +ZEND_METHOD(reflection_method, isProtected) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isStatic() + Returns whether this method is static */ +ZEND_METHOD(reflection_method, isStatic) +{ + _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_STATIC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isConstructor() + Returns whether this method is the constructor */ +ZEND_METHOD(reflection_method, isConstructor) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0); + GET_REFLECTION_OBJECT_PTR(mptr); + /* we need to check if the ctor is the ctor of the class level we we + * looking at since we might be looking at an inherited old style ctor + * defined in base class. */ + RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_CTOR && intern->ce->constructor && intern->ce->constructor->common.scope == mptr->common.scope); +} +/* }}} */ + +/* {{{ proto public bool ReflectionMethod::isDestructor() + Returns whether this method is static */ +ZEND_METHOD(reflection_method, isDestructor) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0); + GET_REFLECTION_OBJECT_PTR(mptr); + RETURN_BOOL(mptr->common.fn_flags & ZEND_ACC_DTOR); +} +/* }}} */ + +/* {{{ proto public int ReflectionMethod::getModifiers() + Returns a bitfield of the access modifiers for this method */ +ZEND_METHOD(reflection_method, getModifiers) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_method_ptr, 0); + GET_REFLECTION_OBJECT_PTR(mptr); + + RETURN_LONG(mptr->common.fn_flags); +} +/* }}} */ + +/* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass() + Get the declaring class */ +ZEND_METHOD(reflection_method, getDeclaringClass) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC(reflection_method_ptr); + GET_REFLECTION_OBJECT_PTR(mptr); + + zend_reflection_class_factory(mptr->common.scope, return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public ReflectionClass ReflectionMethod::getPrototype() + Get the prototype */ +ZEND_METHOD(reflection_method, getPrototype) +{ + reflection_object *intern; + zend_function *mptr; + + METHOD_NOTSTATIC(reflection_method_ptr); + GET_REFLECTION_OBJECT_PTR(mptr); + + if (!mptr->common.prototype) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Method %s::%s does not have a prototype", intern->ce->name, mptr->common.function_name); + return; + } + + reflection_method_factory(mptr->common.prototype->common.scope, mptr->common.prototype, return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public static mixed ReflectionClass::export(mixed argument [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_class, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_ptr, 1); +} +/* }}} */ + +/* {{{ reflection_class_object_ctor */ +static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_object) +{ + zval *argument; + zval *object; + zval *classname; + reflection_object *intern; + zend_class_entry **ce; + + if (is_object) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &argument) == FAILURE) { + return; + } + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &argument) == FAILURE) { + return; + } + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + + if (Z_TYPE_P(argument) == IS_OBJECT) { + MAKE_STD_ZVAL(classname); + ZVAL_STRINGL(classname, Z_OBJCE_P(argument)->name, Z_OBJCE_P(argument)->name_length, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &classname, sizeof(zval *), NULL); + intern->ptr = Z_OBJCE_P(argument); + if (is_object) { + intern->obj = argument; + zval_add_ref(&argument); + } + } else { + convert_to_string_ex(&argument); + if (zend_lookup_class(Z_STRVAL_P(argument), Z_STRLEN_P(argument), &ce TSRMLS_CC) == FAILURE) { + if (!EG(exception)) { + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not exist", Z_STRVAL_P(argument)); + } + return; + } + + MAKE_STD_ZVAL(classname); + ZVAL_STRINGL(classname, (*ce)->name, (*ce)->name_length, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &classname, sizeof(zval *), NULL); + + intern->ptr = *ce; + } + intern->free_ptr = 0; +} +/* }}} */ + +/* {{{ proto public ReflectionClass::__construct(mixed argument) throws ReflectionException + Constructor. Takes a string or an instance as an argument */ +ZEND_METHOD(reflection_class, __construct) +{ + reflection_class_object_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +/* {{{ proto public array ReflectionClass::getStaticProperties() + Returns an associative array containing all static property values of the class */ +ZEND_METHOD(reflection_class, getStaticProperties) +{ + zval *tmp_copy; + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + + zend_update_class_constants(ce TSRMLS_CC); + + array_init(return_value); + zend_hash_copy(Z_ARRVAL_P(return_value), CE_STATIC_MEMBERS(ce), (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *)); +} +/* }}} */ + +/* {{{ proto public mixed ReflectionClass::getStaticPropertyValue(string name [, mixed default]) + Returns the value of a tsstic property */ +ZEND_METHOD(reflection_class, getStaticPropertyValue) +{ + reflection_object *intern; + zend_class_entry *ce; + char *name; + int name_len; + zval **prop, *def_value = NULL; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &name, &name_len, &def_value) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + + zend_update_class_constants(ce TSRMLS_CC); + prop = zend_std_get_static_property(ce, name, name_len, 1 TSRMLS_CC); + if (!prop) { + if (def_value) { + RETURN_ZVAL(def_value, 1, 0); + } else { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not have a property named %s", ce->name, name); + } + return; + } else { + RETURN_ZVAL(*prop, 1, 0); + } +} +/* }}} */ + +/* {{{ proto public void ReflectionClass::setStaticPropertyValue($name, $value) + Sets the value of a static property */ +ZEND_METHOD(reflection_class, setStaticPropertyValue) +{ + reflection_object *intern; + zend_class_entry *ce; + char *name; + int name_len; + zval **variable_ptr, *value; + int refcount; + zend_uchar is_ref; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", &name, &name_len, &value) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + + zend_update_class_constants(ce TSRMLS_CC); + variable_ptr = zend_std_get_static_property(ce, name, name_len, 1 TSRMLS_CC); + if (!variable_ptr) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not have a property named %s", ce->name, name); + return; + } + refcount = (*variable_ptr)->refcount; + is_ref = (*variable_ptr)->is_ref; + zval_dtor(*variable_ptr); + **variable_ptr = *value; + zval_copy_ctor(*variable_ptr); + (*variable_ptr)->refcount = refcount; + (*variable_ptr)->is_ref = is_ref; + +} +/* }}} */ + +/* {{{ proto public array ReflectionClass::getDefaultProperties() + Returns an associative array containing copies of all default property values of the class */ +ZEND_METHOD(reflection_class, getDefaultProperties) +{ + reflection_object *intern; + zend_class_entry *ce; + int count; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + array_init(return_value); + + zend_update_class_constants(ce TSRMLS_CC); + + count = zend_hash_num_elements(&ce->default_properties); + if (count > 0) { + HashPosition pos; + zval **prop; + + zend_hash_internal_pointer_reset_ex(&ce->default_properties, &pos); + while (zend_hash_get_current_data_ex(&ce->default_properties, (void **) &prop, &pos) == SUCCESS) { + char *key, *class_name, *prop_name; + uint key_len; + ulong num_index; + zval *prop_copy; + + zend_hash_get_current_key_ex(&ce->default_properties, &key, &key_len, &num_index, 0, &pos); + zend_hash_move_forward_ex(&ce->default_properties, &pos); + zend_unmangle_property_name(key, &class_name, &prop_name); + if (class_name && class_name[0] != '*' && strcmp(class_name, ce->name)) { + /* filter privates from base classes */ + continue; + } + + /* copy: enforce read only access */ + ALLOC_ZVAL(prop_copy); + *prop_copy = **prop; + zval_copy_ctor(prop_copy); + INIT_PZVAL(prop_copy); + + add_assoc_zval(return_value, prop_name, prop_copy); + } + } +} +/* }}} */ + +/* {{{ proto public string ReflectionClass::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_class, __toString) +{ + reflection_object *intern; + zend_class_entry *ce; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + string_init(&str); + _class_string(&str, ce, intern->obj, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public string ReflectionClass::getName() + Returns the class' name */ +ZEND_METHOD(reflection_class, getName) +{ + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isInternal() + Returns whether this class is an internal class */ +ZEND_METHOD(reflection_class, isInternal) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + RETURN_BOOL(ce->type == ZEND_INTERNAL_CLASS); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isUserDefined() + Returns whether this class is user-defined */ +ZEND_METHOD(reflection_class, isUserDefined) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + RETURN_BOOL(ce->type == ZEND_USER_CLASS); +} +/* }}} */ + +/* {{{ proto public string ReflectionClass::getFileName() + Returns the filename of the file this class was declared in */ +ZEND_METHOD(reflection_class, getFileName) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + if (ce->type == ZEND_USER_CLASS) { + RETURN_STRING(ce->filename, 1); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public int ReflectionClass::getStartLine() + Returns the line this class' declaration starts at */ +ZEND_METHOD(reflection_class, getStartLine) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + if (ce->type == ZEND_USER_FUNCTION) { + RETURN_LONG(ce->line_start); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public int ReflectionClass::getEndLine() + Returns the line this class' declaration ends at */ +ZEND_METHOD(reflection_class, getEndLine) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + if (ce->type == ZEND_USER_CLASS) { + RETURN_LONG(ce->line_end); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public string ReflectionClass::getDocComment() + Returns the doc comment for this class */ +ZEND_METHOD(reflection_class, getDocComment) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + if (ce->type == ZEND_USER_CLASS && ce->doc_comment) { + RETURN_STRINGL(ce->doc_comment, ce->doc_comment_len, 1); + } + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto public ReflectionMethod ReflectionClass::getConstructor() + Returns the class' constructor if there is one, NULL otherwise */ +ZEND_METHOD(reflection_class, getConstructor) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + + if (ce->constructor) { + reflection_method_factory(ce, ce->constructor, return_value TSRMLS_CC); + } else { + RETURN_NULL(); + } +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::hasMethod(string name) + Returns whether a method exists or not */ +ZEND_METHOD(reflection_class, hasMethod) +{ + reflection_object *intern; + zend_class_entry *ce; + char *name, *lc_name; + int name_len; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + 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)) { + efree(lc_name); + RETURN_TRUE; + } else { + efree(lc_name); + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto public ReflectionMethod ReflectionClass::getMethod(string name) throws ReflectionException + Returns the class' method specified by its name */ +ZEND_METHOD(reflection_class, getMethod) +{ + reflection_object *intern; + zend_class_entry *ce; + zend_function *mptr; + char *name, *lc_name; + int name_len; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + lc_name = zend_str_tolower_dup(name, name_len); + if (zend_hash_find(&ce->function_table, lc_name, name_len + 1, (void**) &mptr) == SUCCESS) { + reflection_method_factory(ce, mptr, return_value TSRMLS_CC); + efree(lc_name); + } else { + efree(lc_name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Method %s does not exist", name); + return; + } +} +/* }}} */ + +/* {{{ _addmethod */ +static int _addmethod(zend_function *mptr, int num_args, va_list args, zend_hash_key *hash_key TSRMLS_DC) +{ + zval *method; + zend_class_entry *ce = *va_arg(args, zend_class_entry**); + zval *retval = va_arg(args, zval*); + long filter = va_arg(args, long); + + if (mptr->common.fn_flags & filter) { + TSRMLS_FETCH(); + ALLOC_ZVAL(method); + reflection_method_factory(ce, mptr, method TSRMLS_CC); + add_next_index_zval(retval, method); + } + return 0; +} +/* }}} */ + +/* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods() + Returns an array of this class' methods */ +ZEND_METHOD(reflection_class, getMethods) +{ + reflection_object *intern; + zend_class_entry *ce; + long filter = 0; + int argc = ZEND_NUM_ARGS(); + + METHOD_NOTSTATIC(reflection_class_ptr); + if (argc) { + if (zend_parse_parameters(argc TSRMLS_CC, "|l", &filter) == FAILURE) { + return; + } + } else { + /* No parameters given, default to "return all" */ + filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; + } + + GET_REFLECTION_OBJECT_PTR(ce); + + array_init(return_value); + zend_hash_apply_with_arguments(&ce->function_table, (apply_func_args_t) _addmethod, 3, &ce, return_value, filter); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::hasProperty(string name) + Returns whether a property exists or not */ +ZEND_METHOD(reflection_class, hasProperty) +{ + reflection_object *intern; + zend_class_entry *ce; + char *name; + int name_len; + zval *property; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + if (zend_hash_exists(&ce->properties_info, name, name_len + 1)) { + RETURN_TRUE; + } else { + if (intern->obj && Z_OBJ_HANDLER_P(intern->obj, has_property)) + { + MAKE_STD_ZVAL(property); + ZVAL_STRINGL(property, name, name_len, 1); + if (Z_OBJ_HANDLER_P(intern->obj, has_property)(intern->obj, property, 2 TSRMLS_CC)) { + zval_ptr_dtor(&property); + RETURN_TRUE; + } + zval_ptr_dtor(&property); + } + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto public ReflectionProperty ReflectionClass::getProperty(string name) throws ReflectionException + Returns the class' property specified by its name */ +ZEND_METHOD(reflection_class, getProperty) +{ + reflection_object *intern; + zend_class_entry *ce, **pce; + zend_property_info *property_info; + char *name, *tmp, *classname; + int name_len, classname_len; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + if (zend_hash_find(&ce->properties_info, name, name_len + 1, (void**) &property_info) == SUCCESS && (property_info->flags & ZEND_ACC_SHADOW) == 0) { + reflection_property_factory(ce, property_info, return_value TSRMLS_CC); + return; + } + if ((tmp = strstr(name, "::")) != NULL) { + classname_len = tmp - name; + classname = zend_str_tolower_dup(name, classname_len); + classname[classname_len] = '\0'; + name_len = name_len - (classname_len + 2); + name = tmp + 2; + + if (zend_lookup_class(classname, classname_len, &pce TSRMLS_CC) == FAILURE) { + if (!EG(exception)) { + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not exist", classname); + } + efree(classname); + return; + } + efree(classname); + + if (!instanceof_function(ce, *pce TSRMLS_CC)) { + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Fully qualified property name %s::%s does not specify a base class of %s", (*pce)->name, name, ce->name); + return; + } + ce = *pce; + + if (zend_hash_find(&ce->properties_info, name, name_len + 1, (void**) &property_info) == SUCCESS && (property_info->flags & ZEND_ACC_SHADOW) == 0) { + reflection_property_factory(ce, property_info, return_value TSRMLS_CC); + return; + } + } + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Property %s does not exist", name); +} +/* }}} */ + +/* {{{ _addproperty */ +static int _addproperty(zend_property_info *pptr, int num_args, va_list args, zend_hash_key *hash_key TSRMLS_DC) +{ + zval *property; + zend_class_entry *ce = *va_arg(args, zend_class_entry**); + zval *retval = va_arg(args, zval*); + long filter = va_arg(args, long); + + if (pptr->flags & ZEND_ACC_SHADOW) { + return 0; + } + + if (pptr->flags & filter) { + TSRMLS_FETCH(); + ALLOC_ZVAL(property); + reflection_property_factory(ce, pptr, property TSRMLS_CC); + add_next_index_zval(retval, property); + } + return 0; +} +/* }}} */ + +/* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties() + Returns an array of this class' properties */ +ZEND_METHOD(reflection_class, getProperties) +{ + reflection_object *intern; + zend_class_entry *ce; + long filter = 0; + int argc = ZEND_NUM_ARGS(); + + METHOD_NOTSTATIC(reflection_class_ptr); + if (argc) { + if (zend_parse_parameters(argc TSRMLS_CC, "|l", &filter) == FAILURE) { + return; + } + } else { + /* No parameters given, default to "return all" */ + filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + } + + GET_REFLECTION_OBJECT_PTR(ce); + + array_init(return_value); + zend_hash_apply_with_arguments(&ce->properties_info, (apply_func_args_t) _addproperty, 3, &ce, return_value, filter); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::hasConstant(string name) + Returns whether a constant exists or not */ +ZEND_METHOD(reflection_class, hasConstant) +{ + reflection_object *intern; + zend_class_entry *ce; + char *name; + int name_len; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + if (zend_hash_exists(&ce->constants_table, name, name_len + 1)) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto public array ReflectionClass::getConstants() + Returns an associative array containing this class' constants and their values */ +ZEND_METHOD(reflection_class, getConstants) +{ + zval *tmp_copy; + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + array_init(return_value); + zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); + zend_hash_copy(Z_ARRVAL_P(return_value), &ce->constants_table, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *)); +} +/* }}} */ + +/* {{{ proto public mixed ReflectionClass::getConstant(string name) + Returns the class' constant specified by its name */ +ZEND_METHOD(reflection_class, getConstant) +{ + reflection_object *intern; + zend_class_entry *ce; + zval **value; + char *name; + int name_len; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + + GET_REFLECTION_OBJECT_PTR(ce); + zend_hash_apply_with_argument(&ce->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC); + if (zend_hash_find(&ce->constants_table, name, name_len + 1, (void **) &value) == FAILURE) { + RETURN_FALSE; + } + *return_value = **value; + zval_copy_ctor(return_value); +} +/* }}} */ + +/* {{{ _class_check_flag */ +static void _class_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + RETVAL_BOOL(ce->ce_flags & mask); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isInstantiable() + Returns whether this class is instantiable */ +ZEND_METHOD(reflection_class, isInstantiable) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + if (ce->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS | ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)) { + RETURN_FALSE; + } + + /* Basically, the class is instantiable. Though, if there is a constructor + * and it is not publicly accessible, it isn't! */ + if (!ce->constructor) { + RETURN_TRUE; + } + + RETURN_BOOL(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isInterface() + Returns whether this is an interface or a class */ +ZEND_METHOD(reflection_class, isInterface) +{ + _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_INTERFACE); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isFinal() + Returns whether this class is final */ +ZEND_METHOD(reflection_class, isFinal) +{ + _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_FINAL_CLASS); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isAbstract() + Returns whether this class is abstract */ +ZEND_METHOD(reflection_class, isAbstract) +{ + _class_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); +} +/* }}} */ + +/* {{{ proto public int ReflectionClass::getModifiers() + Returns a bitfield of the access modifiers for this class */ +ZEND_METHOD(reflection_class, getModifiers) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + + RETURN_LONG(ce->ce_flags); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isInstance(stdclass object) + Returns whether the given object is an instance of this class */ +ZEND_METHOD(reflection_class, isInstance) +{ + reflection_object *intern; + zend_class_entry *ce; + zval *object; + + METHOD_NOTSTATIC(reflection_class_ptr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &object) == FAILURE) { + return; + } + GET_REFLECTION_OBJECT_PTR(ce); + RETURN_BOOL(ce == Z_OBJCE_P(object)); +} +/* }}} */ + +/* {{{ proto public stdclass ReflectionClass::newInstance(mixed* args, ...) + Returns an instance of this class */ +ZEND_METHOD(reflection_class, newInstance) +{ + zval *retval_ptr; + reflection_object *intern; + zend_class_entry *ce; + int argc = ZEND_NUM_ARGS(); + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + object_init_ex(return_value, ce); + + /* Run the constructor if there is one */ + if (ce->constructor) { + zval ***params; + zend_fcall_info fci; + zend_fcall_info_cache fcc; + + if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public constructor of class %s", ce->name); + return; + } + + params = safe_emalloc(sizeof(zval **), argc, 0); + if (zend_get_parameters_array_ex(argc, params) == FAILURE) { + efree(params); + RETURN_FALSE; + } + + fci.size = sizeof(fci); + fci.function_table = EG(function_table); + fci.function_name = NULL; + fci.symbol_table = NULL; + fci.object_pp = &return_value; + fci.retval_ptr_ptr = &retval_ptr; + fci.param_count = argc; + fci.params = params; + fci.no_separation = 1; + + fcc.initialized = 1; + fcc.function_handler = ce->constructor; + fcc.calling_scope = EG(scope); + fcc.object_pp = &return_value; + + if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { + efree(params); + zval_ptr_dtor(&retval_ptr); + zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name); + RETURN_NULL(); + } + if (retval_ptr) { + zval_ptr_dtor(&retval_ptr); + } + efree(params); + } +} +/* }}} */ + +/* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces() + Returns an array of interfaces this class implements */ +ZEND_METHOD(reflection_class, getInterfaces) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + + /* Return an empty array if this class implements no interfaces */ + array_init(return_value); + + if (ce->num_interfaces) { + zend_uint i; + + for (i=0; i < ce->num_interfaces; i++) { + zval *interface; + ALLOC_ZVAL(interface); + zend_reflection_class_factory(ce->interfaces[i], interface TSRMLS_CC); + add_assoc_zval_ex(return_value, ce->interfaces[i]->name, ce->interfaces[i]->name_length, interface); + } + } +} +/* }}} */ + +/* {{{ proto public ReflectionClass ReflectionClass::getParentClass() + Returns the class' parent class, or, if none exists, FALSE */ +ZEND_METHOD(reflection_class, getParentClass) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_class_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ce); + + if (ce->parent) { + zend_reflection_class_factory(ce->parent, return_value TSRMLS_CC); + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isSubclassOf(string|ReflectionClass class) + Returns whether this class is a subclass of another class */ +ZEND_METHOD(reflection_class, isSubclassOf) +{ + reflection_object *intern, *argument; + zend_class_entry *ce, **pce, *class_ce; + zval *class_name; + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &class_name) == FAILURE) { + return; + } + + switch(class_name->type) { + case IS_STRING: + if (zend_lookup_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Interface %s does not exist", Z_STRVAL_P(class_name)); + return; + } + class_ce = *pce; + break; + case IS_OBJECT: + 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"); + /* Bails out */ + } + class_ce = argument->ptr; + break; + } + /* no break */ + default: + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Parameter one must either be a string or a ReflectionClass object"); + return; + } + + + RETURN_BOOL(instanceof_function(ce, class_ce TSRMLS_CC)); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::implementsInterface(string|ReflectionClass interface_name) + Returns whether this class is a subclass of another class */ +ZEND_METHOD(reflection_class, implementsInterface) +{ + reflection_object *intern, *argument; + zend_class_entry *ce, *interface_ce, **pce; + zval *interface; + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &interface) == FAILURE) { + return; + } + + switch(interface->type) { + case IS_STRING: + if (zend_lookup_class(Z_STRVAL_P(interface), Z_STRLEN_P(interface), &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Interface %s does not exist", Z_STRVAL_P(interface)); + return; + } + interface_ce = *pce; + break; + case IS_OBJECT: + 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"); + /* Bails out */ + } + interface_ce = argument->ptr; + break; + } + /* no break */ + default: + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Parameter one must either be a string or a ReflectionClass object"); + return; + } + + if (!(interface_ce->ce_flags & ZEND_ACC_INTERFACE)) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Interface %s is a Class", interface_ce->name); + return; + } + RETURN_BOOL(instanceof_function(ce, interface_ce TSRMLS_CC)); +} +/* }}} */ + +/* {{{ proto public bool ReflectionClass::isIterateable() + Returns whether this class is iterateable (can be used inside foreach) */ +ZEND_METHOD(reflection_class, isIterateable) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + RETURN_BOOL(ce->get_iterator != NULL); +} +/* }}} */ + +/* {{{ proto public ReflectionExtension|NULL ReflectionClass::getExtension() + Returns NULL or the extension the class belongs to */ +ZEND_METHOD(reflection_class, getExtension) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + if (ce->module) { + reflection_extension_factory(return_value, ce->module->name TSRMLS_CC); + } +} +/* }}} */ + +/* {{{ proto public string|false ReflectionClass::getExtensionName() + Returns false or the name of the extension the class belongs to */ +ZEND_METHOD(reflection_class, getExtensionName) +{ + reflection_object *intern; + zend_class_entry *ce; + + METHOD_NOTSTATIC(reflection_class_ptr); + GET_REFLECTION_OBJECT_PTR(ce); + + if (ce->module) { + RETURN_STRING(ce->module->name, 1); + } else { + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto public static mixed ReflectionObject::export(mixed argument [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_object, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_object_ptr, 1); +} +/* }}} */ + +/* {{{ proto public ReflectionObject::__construct(mixed argument) throws ReflectionException + Constructor. Takes an instance as an argument */ +ZEND_METHOD(reflection_object, __construct) +{ + reflection_class_object_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + +/* {{{ proto public static mixed ReflectionProperty::export(mixed class, string name [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_property, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_property_ptr, 2); +} +/* }}} */ + +/* {{{ proto public ReflectionProperty::__construct(mixed class, string name) + Constructor. Throws an Exception in case the given property does not exist */ +ZEND_METHOD(reflection_property, __construct) +{ + zval *propname, *classname; + char *name_str, *class_name, *prop_name; + int name_len; + zval *object; + reflection_object *intern; + zend_class_entry **pce; + zend_class_entry *ce; + zend_property_info *property_info; + property_reference *reference; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &classname, &name_str, &name_len) == FAILURE) { + return; + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + + /* Find the class entry */ + switch (Z_TYPE_P(classname)) { + case IS_STRING: + if (zend_lookup_class(Z_STRVAL_P(classname), Z_STRLEN_P(classname), &pce TSRMLS_CC) == FAILURE) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Class %s does not exist", Z_STRVAL_P(classname)); + return; + } + ce = *pce; + break; + + case IS_OBJECT: + ce = Z_OBJCE_P(classname); + break; + + default: + _DO_THROW("The parameter class is expected to be either a string or an object"); + /* returns out of this function */ + } + + if (zend_hash_find(&ce->properties_info, name_str, name_len + 1, (void **) &property_info) == FAILURE || (property_info->flags & ZEND_ACC_SHADOW)) { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Property %s::$%s does not exist", ce->name, name_str); + return; + } + + if (!(property_info->flags & ZEND_ACC_PRIVATE)) { + /* we have to seach the class hierarchy for this (implicit) public or protected property */ + zend_class_entry *tmp_ce = ce->parent; + zend_property_info *tmp_info; + + while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, name_str, name_len + 1, (void **) &tmp_info) == SUCCESS) { + if (tmp_info->flags & ZEND_ACC_PRIVATE) { + /* private in super class => NOT the same property */ + break; + } + ce = tmp_ce; + property_info = tmp_info; + tmp_ce = tmp_ce->parent; + } + } + + MAKE_STD_ZVAL(classname); + ZVAL_STRINGL(classname, ce->name, ce->name_length, 1); + zend_hash_update(Z_OBJPROP_P(object), "class", sizeof("class"), (void **) &classname, sizeof(zval *), NULL); + + zend_unmangle_property_name(property_info->name, &class_name, &prop_name); + MAKE_STD_ZVAL(propname); + ZVAL_STRING(propname, prop_name, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &propname, sizeof(zval *), NULL); + + reference = (property_reference*) emalloc(sizeof(property_reference)); + reference->ce = ce; + reference->prop = property_info; + intern->ptr = reference; + intern->free_ptr = 1; + intern->ce = ce; +} +/* }}} */ + +/* {{{ proto public string ReflectionProperty::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_property, __toString) +{ + reflection_object *intern; + property_reference *ref; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ref); + string_init(&str); + _property_string(&str, ref->prop, NULL, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public string ReflectionProperty::getName() + Returns the class' name */ +ZEND_METHOD(reflection_property, getName) +{ + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC); +} +/* }}} */ + +static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) +{ + reflection_object *intern; + property_reference *ref; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ref); + RETURN_BOOL(ref->prop->flags & mask); +} + +/* {{{ proto public bool ReflectionProperty::isPublic() + Returns whether this property is public */ +ZEND_METHOD(reflection_property, isPublic) +{ + _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PUBLIC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionProperty::isPrivate() + Returns whether this property is private */ +ZEND_METHOD(reflection_property, isPrivate) +{ + _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PRIVATE); +} +/* }}} */ + +/* {{{ proto public bool ReflectionProperty::isProtected() + Returns whether this property is protected */ +ZEND_METHOD(reflection_property, isProtected) +{ + _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_PROTECTED); +} +/* }}} */ + +/* {{{ proto public bool ReflectionProperty::isStatic() + Returns whether this property is static */ +ZEND_METHOD(reflection_property, isStatic) +{ + _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_STATIC); +} +/* }}} */ + +/* {{{ proto public bool ReflectionProperty::isDefault() + Returns whether this property is default (declared at compilation time). */ +ZEND_METHOD(reflection_property, isDefault) +{ + _property_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ~ZEND_ACC_IMPLICIT_PUBLIC); +} +/* }}} */ + +/* {{{ proto public int ReflectionProperty::getModifiers() + Returns a bitfield of the access modifiers for this property */ +ZEND_METHOD(reflection_property, getModifiers) +{ + reflection_object *intern; + property_reference *ref; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ref); + + RETURN_LONG(ref->prop->flags); +} +/* }}} */ + +/* {{{ proto public mixed ReflectionProperty::getValue([stdclass object]) + Returns this property's value */ +ZEND_METHOD(reflection_property, getValue) +{ + reflection_object *intern; + property_reference *ref; + zval *object; + zval **member= NULL; + + METHOD_NOTSTATIC(reflection_property_ptr); + GET_REFLECTION_OBJECT_PTR(ref); + +#if MBO_0 + if (!(ref->prop->flags & ZEND_ACC_PUBLIC)) { + _DO_THROW("Cannot access non-public member"); + /* Returns from this function */ + } +#endif + + 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", ref->prop->name); + /* Bails out */ + } + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &object) == FAILURE) { + return; + } + if (zend_hash_quick_find(Z_OBJPROP_P(object), 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", ref->prop->name); + /* Bails out */ + } + } + + *return_value= **member; + zval_copy_ctor(return_value); + INIT_PZVAL(return_value); +} +/* }}} */ + +/* {{{ proto public void ReflectionProperty::setValue([stdclass object,] mixed value) + Sets this property's value */ +ZEND_METHOD(reflection_property, setValue) +{ + reflection_object *intern; + property_reference *ref; + zval **variable_ptr; + zval *object; + zval *value; + int setter_done = 0; + zval *tmp; + HashTable *prop_table; + + METHOD_NOTSTATIC(reflection_property_ptr); + GET_REFLECTION_OBJECT_PTR(ref); + + if (ref->prop->flags & ~(ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)) { + _DO_THROW("Cannot access non-public member"); + /* Returns from this function */ + } + + if ((ref->prop->flags & ZEND_ACC_STATIC)) { + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &tmp, &value) == FAILURE) { + return; + } + } + zend_update_class_constants(intern->ce TSRMLS_CC); + prop_table = CE_STATIC_MEMBERS(intern->ce); + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oz", &object, &value) == FAILURE) { + return; + } + prop_table = Z_OBJPROP_P(object); + } + + 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", ref->prop->name); + /* Bails out */ + } + if (*variable_ptr == value) { + setter_done = 1; + } else { + if (PZVAL_IS_REF(*variable_ptr)) { + zval_dtor(*variable_ptr); + (*variable_ptr)->type = value->type; + (*variable_ptr)->value = value->value; + if (value->refcount > 0) { + zval_copy_ctor(*variable_ptr); + } + setter_done = 1; + } + } + if (!setter_done) { + zval **foo; + + value->refcount++; + if (PZVAL_IS_REF(value)) { + SEPARATE_ZVAL(&value); + } + zend_hash_quick_update(prop_table, ref->prop->name, ref->prop->name_length+1, ref->prop->h, &value, sizeof(zval *), (void **) &foo); + } +} +/* }}} */ + +/* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass() + Get the declaring class */ +ZEND_METHOD(reflection_property, getDeclaringClass) +{ + reflection_object *intern; + property_reference *ref; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ref); + + zend_reflection_class_factory(ref->ce, return_value TSRMLS_CC); +} + +/* {{{ proto public string ReflectionProperty::getDocComment() + Returns the doc comment for this property */ +ZEND_METHOD(reflection_property, getDocComment) +{ + reflection_object *intern; + property_reference *ref; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_property_ptr, 0); + GET_REFLECTION_OBJECT_PTR(ref); + if (ref->prop->doc_comment) { + RETURN_STRINGL(ref->prop->doc_comment, ref->prop->doc_comment_len, 1); + } + RETURN_FALSE; +} +/* }}} */ +/* {{{ proto public static mixed ReflectionExtension::export(string name [, bool return]) throws ReflectionException + Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ +ZEND_METHOD(reflection_extension, export) +{ + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_extension_ptr, 1); +} +/* }}} */ + +/* {{{ proto public ReflectionExtension::__construct(string name) + Constructor. Throws an Exception in case the given extension does not exist */ +ZEND_METHOD(reflection_extension, __construct) +{ + zval *name; + zval *object; + char *lcname; + reflection_object *intern; + zend_module_entry *module; + char *name_str; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name_str, &name_len) == FAILURE) { + return; + } + + object = getThis(); + intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); + if (intern == NULL) { + return; + } + lcname = do_alloca(name_len + 1); + zend_str_tolower_copy(lcname, name_str, name_len); + if (zend_hash_find(&module_registry, lcname, name_len + 1, (void **)&module) == FAILURE) { + free_alloca(lcname); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Extension %s does not exist", name_str); + return; + } + free_alloca(lcname); + MAKE_STD_ZVAL(name); + ZVAL_STRING(name, module->name, 1); + zend_hash_update(Z_OBJPROP_P(object), "name", sizeof("name"), (void **) &name, sizeof(zval *), NULL); + intern->ptr = module; + intern->free_ptr = 0; + intern->ce = NULL; +} +/* }}} */ + +/* {{{ proto public string ReflectionExtension::__toString() + Returns a string representation */ +ZEND_METHOD(reflection_extension, __toString) +{ + reflection_object *intern; + zend_module_entry *module; + string str; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + string_init(&str); + _extension_string(&str, module, "" TSRMLS_CC); + RETURN_STRINGL(str.string, str.len - 1, 0); +} +/* }}} */ + +/* {{{ proto public string ReflectionExtension::getName() + Returns this extension's name */ +ZEND_METHOD(reflection_extension, getName) +{ + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + _default_get_entry(getThis(), "name", sizeof("name"), return_value TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public string ReflectionExtension::getVersion() + Returns this extension's version */ +ZEND_METHOD(reflection_extension, getVersion) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + /* An extension does not necessarily have a version number */ + if (module->version == NO_VERSION_YET) { + RETURN_NULL(); + } else { + RETURN_STRING(module->version, 1); + } +} +/* }}} */ + +/* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions() + Returns an array of this extension's fuctions */ +ZEND_METHOD(reflection_extension, getFunctions) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + array_init(return_value); + if (module->functions) { + zval *function; + zend_function *fptr; + zend_function_entry *func = module->functions; + + /* 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); + continue; + } + + ALLOC_ZVAL(function); + reflection_function_factory(fptr, function TSRMLS_CC); + add_assoc_zval_ex(return_value, func->fname, strlen(func->fname)+1, function); + func++; + } + } +} +/* }}} */ + +static int _addconstant(zend_constant *constant, int num_args, va_list args, zend_hash_key *hash_key) +{ + zval *const_val; + zval *retval = va_arg(args, zval*); + int number = va_arg(args, int); + + if (number == constant->module_number) { + ALLOC_ZVAL(const_val); + *const_val = constant->value; + zval_copy_ctor(const_val); + INIT_PZVAL(const_val); + add_assoc_zval_ex(retval, constant->name, constant->name_len, const_val); + } + return 0; +} + +/* {{{ proto public array ReflectionExtension::getConstants() + Returns an associative array containing this extension's constants and their values */ +ZEND_METHOD(reflection_extension, getConstants) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + array_init(return_value); + zend_hash_apply_with_arguments(EG(zend_constants), (apply_func_args_t) _addconstant, 2, return_value, module->module_number); +} +/* }}} */ + +/* {{{ _addinientry */ +static int _addinientry(zend_ini_entry *ini_entry, int num_args, va_list args, zend_hash_key *hash_key) +{ + zval *retval = va_arg(args, zval*); + int number = va_arg(args, int); + + if (number == ini_entry->module_number) { + if (ini_entry->value) { + add_assoc_stringl(retval, ini_entry->name, ini_entry->value, ini_entry->value_length, 1); + } else { + add_assoc_null(retval, ini_entry->name); + } + } + return ZEND_HASH_APPLY_KEEP; +} +/* }}} */ + +/* {{{ proto public array ReflectionExtension::getINIEntries() + Returns an associative array containing this extension's INI entries and their values */ +ZEND_METHOD(reflection_extension, getINIEntries) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + array_init(return_value); + zend_hash_apply_with_arguments(EG(ini_directives), (apply_func_args_t) _addinientry, 2, return_value, module->module_number); +} +/* }}} */ + +/* {{{ add_extension_class */ +static int add_extension_class(zend_class_entry **pce, int num_args, va_list args, zend_hash_key *hash_key) +{ + zval *class_array = va_arg(args, zval*), *zclass; + struct _zend_module_entry *module = va_arg(args, struct _zend_module_entry*); + int add_reflection_class = va_arg(args, int); + + if ((*pce)->module && !strcasecmp((*pce)->module->name, module->name)) { + TSRMLS_FETCH(); + if (add_reflection_class) { + ALLOC_ZVAL(zclass); + zend_reflection_class_factory(*pce, zclass TSRMLS_CC); + add_assoc_zval_ex(class_array, (*pce)->name, (*pce)->name_length + 1, zclass); + } else { + add_next_index_stringl(class_array, (*pce)->name, (*pce)->name_length, 1); + } + } + return ZEND_HASH_APPLY_KEEP; +} +/* }}} */ + +/* {{{ proto public ReflectionClass[] ReflectionExtension::getClasses() + Returns an array containing ReflectionClass objects for all classes of this extension */ +ZEND_METHOD(reflection_extension, getClasses) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + array_init(return_value); + zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t) add_extension_class, 3, return_value, module, 1 TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto public array ReflectionExtension::getClassNames() + Returns an array containing all names of all classes of this extension */ +ZEND_METHOD(reflection_extension, getClassNames) +{ + reflection_object *intern; + zend_module_entry *module; + + METHOD_NOTSTATIC_NUMPARAMS(reflection_extension_ptr, 0); + GET_REFLECTION_OBJECT_PTR(module); + + array_init(return_value); + zend_hash_apply_with_arguments(EG(class_table), (apply_func_args_t) add_extension_class, 3, return_value, module, 0 TSRMLS_CC); +} +/* }}} */ + +/* {{{ method tables */ +static zend_function_entry reflection_exception_functions[] = { + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_functions[] = { + ZEND_ME(reflection, getModifierNames, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + ZEND_ME(reflection, export, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflector_functions[] = { + ZEND_FENTRY(export, NULL, NULL, ZEND_ACC_STATIC|ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) + ZEND_ABSTRACT_ME(reflector, __toString, NULL) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_function_functions[] = { + ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) + ZEND_ME(reflection_function, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_function, __construct, NULL, 0) + ZEND_ME(reflection_function, __toString, NULL, 0) + ZEND_ME(reflection_function, isInternal, NULL, 0) + ZEND_ME(reflection_function, isUserDefined, NULL, 0) + ZEND_ME(reflection_function, getName, NULL, 0) + ZEND_ME(reflection_function, getFileName, NULL, 0) + ZEND_ME(reflection_function, getStartLine, NULL, 0) + ZEND_ME(reflection_function, getEndLine, NULL, 0) + ZEND_ME(reflection_function, getDocComment, NULL, 0) + ZEND_ME(reflection_function, getStaticVariables, NULL, 0) + ZEND_ME(reflection_function, invoke, NULL, 0) + ZEND_ME(reflection_function, invokeArgs, NULL, 0) + ZEND_ME(reflection_function, returnsReference, NULL, 0) + ZEND_ME(reflection_function, getParameters, NULL, 0) + ZEND_ME(reflection_function, getNumberOfParameters, NULL, 0) + ZEND_ME(reflection_function, getNumberOfRequiredParameters, NULL, 0) +#if MBO_0 + ZEND_ME(reflection_function, getExtension, NULL, 0) + ZEND_ME(reflection_function, getExtensionName, NULL, 0) +#endif + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_method_functions[] = { + ZEND_ME(reflection_method, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_method, __construct, NULL, 0) + ZEND_ME(reflection_method, __toString, NULL, 0) + ZEND_ME(reflection_method, isPublic, NULL, 0) + ZEND_ME(reflection_method, isPrivate, NULL, 0) + ZEND_ME(reflection_method, isProtected, NULL, 0) + ZEND_ME(reflection_method, isAbstract, NULL, 0) + ZEND_ME(reflection_method, isFinal, NULL, 0) + ZEND_ME(reflection_method, isStatic, NULL, 0) + ZEND_ME(reflection_method, isConstructor, NULL, 0) + ZEND_ME(reflection_method, isDestructor, NULL, 0) + ZEND_ME(reflection_method, getModifiers, NULL, 0) + ZEND_ME(reflection_method, invoke, NULL, 0) + ZEND_ME(reflection_method, invokeArgs, NULL, 0) + ZEND_ME(reflection_method, getDeclaringClass, NULL, 0) + ZEND_ME(reflection_method, getPrototype, NULL, 0) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_class_functions[] = { + ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) + ZEND_ME(reflection_class, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_class, __construct, NULL, 0) + ZEND_ME(reflection_class, __toString, NULL, 0) + ZEND_ME(reflection_class, getName, NULL, 0) + ZEND_ME(reflection_class, isInternal, NULL, 0) + ZEND_ME(reflection_class, isUserDefined, NULL, 0) + ZEND_ME(reflection_class, isInstantiable, NULL, 0) + ZEND_ME(reflection_class, getFileName, NULL, 0) + ZEND_ME(reflection_class, getStartLine, NULL, 0) + ZEND_ME(reflection_class, getEndLine, NULL, 0) + ZEND_ME(reflection_class, getDocComment, NULL, 0) + ZEND_ME(reflection_class, getConstructor, NULL, 0) + ZEND_ME(reflection_class, hasMethod, NULL, 0) + ZEND_ME(reflection_class, getMethod, NULL, 0) + ZEND_ME(reflection_class, getMethods, NULL, 0) + ZEND_ME(reflection_class, hasProperty, NULL, 0) + ZEND_ME(reflection_class, getProperty, NULL, 0) + ZEND_ME(reflection_class, getProperties, NULL, 0) + ZEND_ME(reflection_class, hasConstant, NULL, 0) + ZEND_ME(reflection_class, getConstants, NULL, 0) + ZEND_ME(reflection_class, getConstant, NULL, 0) + ZEND_ME(reflection_class, getInterfaces, NULL, 0) + ZEND_ME(reflection_class, isInterface, NULL, 0) + ZEND_ME(reflection_class, isAbstract, NULL, 0) + ZEND_ME(reflection_class, isFinal, NULL, 0) + ZEND_ME(reflection_class, getModifiers, NULL, 0) + ZEND_ME(reflection_class, isInstance, NULL, 0) + ZEND_ME(reflection_class, newInstance, NULL, 0) + ZEND_ME(reflection_class, getParentClass, NULL, 0) + ZEND_ME(reflection_class, isSubclassOf, NULL, 0) + ZEND_ME(reflection_class, getStaticProperties, NULL, 0) + ZEND_ME(reflection_class, getStaticPropertyValue, NULL, 0) + ZEND_ME(reflection_class, setStaticPropertyValue, NULL, 0) + ZEND_ME(reflection_class, getDefaultProperties, NULL, 0) + ZEND_ME(reflection_class, isIterateable, NULL, 0) + ZEND_ME(reflection_class, implementsInterface, NULL, 0) + ZEND_ME(reflection_class, getExtension, NULL, 0) + ZEND_ME(reflection_class, getExtensionName, NULL, 0) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_object_functions[] = { + ZEND_ME(reflection_object, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_object, __construct, NULL, 0) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_property_functions[] = { + ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) + ZEND_ME(reflection_property, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_property, __construct, NULL, 0) + ZEND_ME(reflection_property, __toString, NULL, 0) + ZEND_ME(reflection_property, getName, NULL, 0) + ZEND_ME(reflection_property, getValue, NULL, 0) + ZEND_ME(reflection_property, setValue, NULL, 0) + ZEND_ME(reflection_property, isPublic, NULL, 0) + ZEND_ME(reflection_property, isPrivate, NULL, 0) + ZEND_ME(reflection_property, isProtected, NULL, 0) + ZEND_ME(reflection_property, isStatic, NULL, 0) + ZEND_ME(reflection_property, isDefault, NULL, 0) + ZEND_ME(reflection_property, getModifiers, NULL, 0) + ZEND_ME(reflection_property, getDeclaringClass, NULL, 0) + ZEND_ME(reflection_property, getDocComment, NULL, 0) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_parameter_functions[] = { + ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) + ZEND_ME(reflection_parameter, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_parameter, __construct, NULL, 0) + ZEND_ME(reflection_parameter, __toString, NULL, 0) + ZEND_ME(reflection_parameter, getName, NULL, 0) + ZEND_ME(reflection_parameter, isPassedByReference, NULL, 0) + ZEND_ME(reflection_parameter, getClass, NULL, 0) + ZEND_ME(reflection_parameter, isArray, NULL, 0) + ZEND_ME(reflection_parameter, allowsNull, NULL, 0) + ZEND_ME(reflection_parameter, isOptional, NULL, 0) + ZEND_ME(reflection_parameter, isDefaultValueAvailable, NULL, 0) + ZEND_ME(reflection_parameter, getDefaultValue, NULL, 0) + {NULL, NULL, NULL} +}; + +static zend_function_entry reflection_extension_functions[] = { + ZEND_ME(reflection, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) + ZEND_ME(reflection_extension, export, NULL, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) + ZEND_ME(reflection_extension, __construct, NULL, 0) + ZEND_ME(reflection_extension, __toString, NULL, 0) + ZEND_ME(reflection_extension, getName, NULL, 0) + ZEND_ME(reflection_extension, getVersion, NULL, 0) + ZEND_ME(reflection_extension, getFunctions, NULL, 0) + ZEND_ME(reflection_extension, getConstants, NULL, 0) + ZEND_ME(reflection_extension, getINIEntries, NULL, 0) + ZEND_ME(reflection_extension, getClasses, NULL, 0) + ZEND_ME(reflection_extension, getClassNames, NULL, 0) + {NULL, NULL, NULL} +}; +/* }}} */ + +zend_function_entry reflection_ext_functions[] = { /* {{{ */ + {NULL, NULL, NULL} +}; /* }}} */ + +static zend_object_handlers *zend_std_obj_handlers; + +/* {{{ _reflection_write_property */ +static void _reflection_write_property(zval *object, zval *member, zval *value TSRMLS_DC) +{ + if ((Z_TYPE_P(member) == IS_STRING) + && zend_hash_exists(&Z_OBJCE_P(object)->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1) + && ((Z_STRLEN_P(member) == sizeof("name") - 1 && !memcmp(Z_STRVAL_P(member), "name", sizeof("name"))) || + (Z_STRLEN_P(member) == sizeof("class") - 1 && !memcmp(Z_STRVAL_P(member), "class", sizeof("class"))))) + { + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Cannot set read-only property %s::$%s", Z_OBJCE_P(object)->name, Z_STRVAL_P(member)); + } + else + { + zend_std_obj_handlers->write_property(object, member, value TSRMLS_CC); + } +} +/* }}} */ + +PHP_MINIT_FUNCTION(reflection) /* {{{ */ +{ + zend_class_entry _reflection_entry; + + zend_std_obj_handlers = zend_get_std_object_handlers(); + memcpy(&reflection_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + reflection_object_handlers.clone_obj = NULL; + reflection_object_handlers.write_property = _reflection_write_property; + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions); + reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC); + + INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions); + reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + + INIT_CLASS_ENTRY(_reflection_entry, "Reflector", reflector_functions); + reflector_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflector_ptr->ce_flags = ZEND_ACC_ABSTRACT | ZEND_ACC_INTERFACE; + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", reflection_function_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_function_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflection_register_implement(reflection_function_ptr, reflector_ptr TSRMLS_CC); + zend_declare_property_string(reflection_function_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionParameter", reflection_parameter_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_parameter_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflection_register_implement(reflection_parameter_ptr, reflector_ptr TSRMLS_CC); + zend_declare_property_string(reflection_parameter_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionMethod", reflection_method_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_method_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_function_ptr, NULL TSRMLS_CC); + zend_declare_property_string(reflection_method_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(reflection_method_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "STATIC", ZEND_ACC_STATIC); + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "PUBLIC", ZEND_ACC_PUBLIC); + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "PROTECTED", ZEND_ACC_PROTECTED); + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "PRIVATE", ZEND_ACC_PRIVATE); + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "ABSTRACT", ZEND_ACC_ABSTRACT); + REGISTER_REFLECTION_CLASS_CONST_LONG(method, "FINAL", ZEND_ACC_FINAL); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionClass", reflection_class_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_class_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflection_register_implement(reflection_class_ptr, reflector_ptr TSRMLS_CC); + zend_declare_property_string(reflection_class_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + REGISTER_REFLECTION_CLASS_CONST_LONG(class, "IMPLICIT_ABSTRACT", ZEND_ACC_IMPLICIT_ABSTRACT_CLASS); + REGISTER_REFLECTION_CLASS_CONST_LONG(class, "EXPLICIT_ABSTRACT", ZEND_ACC_EXPLICIT_ABSTRACT_CLASS); + REGISTER_REFLECTION_CLASS_CONST_LONG(class, "FINAL", ZEND_ACC_FINAL_CLASS); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionObject", reflection_object_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_object_ptr = zend_register_internal_class_ex(&_reflection_entry, reflection_class_ptr, NULL TSRMLS_CC); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionProperty", reflection_property_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_property_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflection_register_implement(reflection_property_ptr, reflector_ptr TSRMLS_CC); + zend_declare_property_string(reflection_property_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + zend_declare_property_string(reflection_property_ptr, "class", sizeof("class")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + REGISTER_REFLECTION_CLASS_CONST_LONG(property, "STATIC", ZEND_ACC_STATIC); + REGISTER_REFLECTION_CLASS_CONST_LONG(property, "PUBLIC", ZEND_ACC_PUBLIC); + REGISTER_REFLECTION_CLASS_CONST_LONG(property, "PROTECTED", ZEND_ACC_PROTECTED); + REGISTER_REFLECTION_CLASS_CONST_LONG(property, "PRIVATE", ZEND_ACC_PRIVATE); + + INIT_CLASS_ENTRY(_reflection_entry, "ReflectionExtension", reflection_extension_functions); + _reflection_entry.create_object = reflection_objects_new; + reflection_extension_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflection_register_implement(reflection_extension_ptr, reflector_ptr TSRMLS_CC); + zend_declare_property_string(reflection_extension_ptr, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); + + return SUCCESS; +} /* }}} */ + +PHP_MINFO_FUNCTION(reflection) /* {{{ */ +{ + php_info_print_table_start(); + php_info_print_table_header(2, "Reflection", "enabled"); + + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.17 2006/01/01 12:50:12 sniper Exp $"); + + php_info_print_table_end(); +} /* }}} */ + +zend_module_entry reflection_module_entry = { /* {{{ */ + STANDARD_MODULE_HEADER, + "Reflection", + reflection_ext_functions, + PHP_MINIT(reflection), + NULL, + NULL, + NULL, + PHP_MINFO(reflection), + "0.1", + STANDARD_MODULE_PROPERTIES +}; /* }}} */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + */ diff --git a/ext/reflection/php_reflection.h b/ext/reflection/php_reflection.h new file mode 100644 index 000000000..a5c758964 --- /dev/null +++ b/ext/reflection/php_reflection.h @@ -0,0 +1,55 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: George Schlossnagle | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_reflection.h,v 1.4.2.3 2006/01/01 12:50:12 sniper Exp $ */ + +#ifndef PHP_REFLECTION_H +#define PHP_REFLECTION_H + +#include "php.h" + +extern zend_module_entry reflection_module_entry; +#define phpext_reflection_ptr &reflection_module_entry + +BEGIN_EXTERN_C() + +/* Class entry pointers */ +extern PHPAPI zend_class_entry *reflector_ptr; +extern PHPAPI zend_class_entry *reflection_exception_ptr; +extern PHPAPI zend_class_entry *reflection_ptr; +extern PHPAPI zend_class_entry *reflection_function_ptr; +extern PHPAPI zend_class_entry *reflection_parameter_ptr; +extern PHPAPI zend_class_entry *reflection_class_ptr; +extern PHPAPI zend_class_entry *reflection_object_ptr; +extern PHPAPI zend_class_entry *reflection_method_ptr; +extern PHPAPI zend_class_entry *reflection_property_ptr; +extern PHPAPI zend_class_entry *reflection_extension_ptr; + +PHPAPI void zend_reflection_class_factory(zend_class_entry *ce, zval *object TSRMLS_DC); + +END_EXTERN_C() + +#endif /* PHP_REFLECTION_H */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + */ diff --git a/ext/reflection/tests/001.phpt b/ext/reflection/tests/001.phpt new file mode 100755 index 000000000..6a9d31a30 --- /dev/null +++ b/ext/reflection/tests/001.phpt @@ -0,0 +1,89 @@ +--TEST-- +Reflection inheritance +--FILE-- +getMethods() as $m) + { + $res[] = $m->class . '::' . $m->name; + } + return $res; + } +} + +$r = new ReflectionClassEx('ReflectionClassEx'); + +$exp = array ( + 'UMLClass::__clone', + 'UMLClass::export', + 'UMLClass::__construct', + 'UMLClass::__toString', + 'UMLClass::getName', + 'UMLClass::isInternal', + 'UMLClass::isUserDefined', + 'UMLClass::isInstantiable', + 'UMLClass::getFileName', + 'UMLClass::getStartLine', + 'UMLClass::getEndLine', + 'UMLClass::getDocComment', + 'UMLClass::getConstructor', + 'UMLClass::getMethod', + 'UMLClass::getMethods', + 'UMLClass::getProperty', + 'UMLClass::getProperties', + 'UMLClass::getConstants', + 'UMLClass::getConstant', + 'UMLClass::getInterfaces', + 'UMLClass::isInterface', + 'UMLClass::isAbstract', + 'UMLClass::isFinal', + 'UMLClass::getModifiers', + 'UMLClass::isInstance', + 'UMLClass::newInstance', + 'UMLClass::getParentClass', + 'UMLClass::isSubclassOf', + 'UMLClass::getStaticProperties', + 'UMLClass::getDefaultProperties', + 'UMLClass::isIterateable', + 'UMLClass::implementsInterface', + 'UMLClass::getExtension', + 'UMLClass::getExtensionName'); + +$miss = array(); + +$res = $r->getMethodNames(); + +foreach($exp as $m) +{ + if (!in_array($m, $exp)) + { + $miss[] = $m; + } +} + +var_dump($miss); + +$props = array_keys(get_class_vars('ReflectionClassEx')); +sort($props); +var_dump($props); +var_dump($r->name); +?> +===DONE=== +--EXPECT-- +array(0) { +} +array(2) { + [0]=> + string(3) "bla" + [1]=> + string(4) "name" +} +string(17) "ReflectionClassEx" +===DONE=== diff --git a/ext/reflection/tests/002.phpt b/ext/reflection/tests/002.phpt new file mode 100755 index 000000000..bef4c8166 --- /dev/null +++ b/ext/reflection/tests/002.phpt @@ -0,0 +1,63 @@ +--TEST-- +Reflection properties are read only +--FILE-- +class); +var_dump($r->name); +var_dump($r->foo); +@var_dump($r->bar); + +try +{ + $r->class = 'bullshit'; +} +catch(ReflectionException $e) +{ + echo $e->getMessage() . "\n"; +} +try +{ +$r->name = 'bullshit'; +} +catch(ReflectionException $e) +{ + echo $e->getMessage() . "\n"; +} + +$r->foo = 'bar'; +$r->bar = 'baz'; + +var_dump($r->class); +var_dump($r->name); +var_dump($r->foo); +var_dump($r->bar); + +?> +===DONE=== +--EXPECTF-- +ReflectionMethodEx::__construct +string(18) "ReflectionMethodEx" +string(7) "getName" +string(3) "xyz" +NULL +Cannot set read-only property ReflectionMethodEx::$class +Cannot set read-only property ReflectionMethodEx::$name +string(18) "ReflectionMethodEx" +string(7) "getName" +string(3) "bar" +string(3) "baz" +===DONE=== diff --git a/ext/reflection/tests/003.phpt b/ext/reflection/tests/003.phpt new file mode 100755 index 000000000..660389255 --- /dev/null +++ b/ext/reflection/tests/003.phpt @@ -0,0 +1,31 @@ +--TEST-- +invoke() with base class method +--FILE-- +invoke($o); + +?> +===DONE=== +--EXPECT-- +Foo::Test +===DONE=== diff --git a/ext/reflection/tests/004.phpt b/ext/reflection/tests/004.phpt new file mode 100755 index 000000000..f8a448e6c --- /dev/null +++ b/ext/reflection/tests/004.phpt @@ -0,0 +1,42 @@ +--TEST-- +invoke() with non object or null value +--FILE-- +getMethod("a"); + +try { + $m->invoke(null); +} catch (ReflectionException $E) { + echo $E->getMessage()."\n"; +} + + +try { + $m->invoke($b); +} catch (ReflectionException $E) { + echo $E->getMessage()."\n"; +} + +$b = new a(); +try { + $m->invoke($b); +} catch (ReflectionException $E) { + echo $E->getMessage()."\n"; +} + +echo "===DONE===\n";?> +--EXPECT-- +Non-object passed to Invoke() +Given object is not an instance of the class this method was declared in +===DONE=== diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt new file mode 100755 index 000000000..f337e44ae --- /dev/null +++ b/ext/reflection/tests/005.phpt @@ -0,0 +1,54 @@ +--TEST-- +ReflectionMethod::getDocComment() uses wrong comment block +--FILE-- +getDocComment())); + +foreach($r->getMethods() as $m) +{ + var_dump(strip_doc_comment($m->getDocComment())); +} + +?> +===DONE=== +--EXPECT-- +string(19) "Comment for class A" +string(15) "Method A::bla()" +bool(false) +bool(false) +string(22) "* Comment for A::baz()" +===DONE=== diff --git a/ext/reflection/tests/006.phpt b/ext/reflection/tests/006.phpt new file mode 100755 index 000000000..89c438765 --- /dev/null +++ b/ext/reflection/tests/006.phpt @@ -0,0 +1,103 @@ +--TEST-- +ReflectionClass::[gs]etStaticPropertyValue +--FILE-- +getStaticPropertyValue($name)); + var_dump($ref->getStaticPropertyValue($name)); + $ref->setStaticPropertyValue($name, 'updated'); + var_dump($ref->getStaticPropertyValue($name)); + } + catch(Exception $e) + { + echo "EXCEPTION\n"; + } + } + } +} + +Class TestDerived extends Test +{ +// static public $pub = 'pub'; +// static protected $pro = 'pro'; + static private $pri = 'pri'; + + static function testing() + { + $ref = new ReflectionClass('Test'); + + foreach(array('pub', 'pro', 'pri') as $name) + { + try + { + var_dump($ref->getStaticPropertyValue($name)); + var_dump($ref->getStaticPropertyValue($name)); + $ref->setStaticPropertyValue($name, 'updated'); + var_dump($ref->getStaticPropertyValue($name)); + } + catch(Exception $e) + { + echo "EXCEPTION\n"; + } + } + } +} + +$ref = new ReflectionClass('Test'); + +foreach(array('pub', 'pro', 'pri') as $name) +{ + try + { + var_dump($ref->getStaticPropertyValue($name)); + var_dump($ref->getStaticPropertyValue($name)); + $ref->setStaticPropertyValue($name, 'updated'); + var_dump($ref->getStaticPropertyValue($name)); + } + catch(Exception $e) + { + echo "EXCEPTION\n"; + } +} + +Test::testing(); +TestDerived::testing(); + +?> +===DONE=== + +--EXPECT-- +string(3) "pub" +string(3) "pub" +string(7) "updated" +EXCEPTION +EXCEPTION +string(7) "updated" +string(7) "updated" +string(7) "updated" +EXCEPTION +EXCEPTION +string(7) "updated" +string(7) "updated" +string(7) "updated" +EXCEPTION +EXCEPTION +===DONE=== diff --git a/ext/reflection/tests/bug26640.phpt b/ext/reflection/tests/bug26640.phpt new file mode 100755 index 000000000..2cbd0d23d --- /dev/null +++ b/ext/reflection/tests/bug26640.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #26640 (__autoload() not invoked by Reflection classes) +--FILE-- + +--EXPECT-- +OK diff --git a/ext/reflection/tests/bug26695.phpt b/ext/reflection/tests/bug26695.phpt new file mode 100755 index 000000000..38e6607c3 --- /dev/null +++ b/ext/reflection/tests/bug26695.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #26695 (Reflection API does not recognize mixed-case class hints) +--FILE-- +getMethods(); +$params = $methods[0]->getParameters(); + +$class = $params[0]->getClass(); + +var_dump($class->getName()); +?> +===DONE=== +--EXPECT-- +string(3) "Foo" +===DONE=== \ No newline at end of file diff --git a/ext/reflection/tests/bug29268.phpt b/ext/reflection/tests/bug29268.phpt new file mode 100755 index 000000000..335ee7337 --- /dev/null +++ b/ext/reflection/tests/bug29268.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #29268 (__autoload() not called with reflectionProperty->getClass()) +--FILE-- +getParameters(); +foreach($parameters as $parameter){ + $class = $parameter->getClass(); + echo $class->name."\n"; +} +echo "ok\n"; +?> +--EXPECT-- +__autoload(A) +A +ok diff --git a/ext/reflection/tests/bug29523.phpt b/ext/reflection/tests/bug29523.phpt new file mode 100755 index 000000000..4eb357cc2 --- /dev/null +++ b/ext/reflection/tests/bug29523.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #29523 (ReflectionParameter::isOptional() is incorrect) +--FILE-- +getParameters() as $parameter) +{ + var_dump($parameter->isOptional()); + if ($parameter->isOptional()) + { + ++$numberOfOptionalParameters; + } + else + { + ++$numberOfNotOptionalParameters; + } +} +var_dump($function->getNumberOfRequiredParameters()); +var_dump($numberOfNotOptionalParameters); + +?> +--EXPECT-- +bool(false) +bool(false) +bool(true) +int(2) +int(2) diff --git a/ext/reflection/tests/bug29828.phpt b/ext/reflection/tests/bug29828.phpt new file mode 100755 index 000000000..e1c9bbd36 --- /dev/null +++ b/ext/reflection/tests/bug29828.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #29828 (Interfaces no longer work) +--FILE-- +getMethods())); +var_dump($r->getMethod('bla')->isConstructor()); +var_dump($r->getMethod('bla')->isAbstract()); + +$o=new BlaMore; +$o->bla(); + +?> +===DONE=== +--EXPECT-- +int(1) +bool(false) +bool(false) +Hello +===DONE=== diff --git a/ext/reflection/tests/bug30146.phpt b/ext/reflection/tests/bug30146.phpt new file mode 100755 index 000000000..72c6d2e5f --- /dev/null +++ b/ext/reflection/tests/bug30146.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #30146 (ReflectionProperty->getValue() requires instance for static property) +--FILE-- +getValue(null)); + +$r->setValue(NULL, 2); +var_dump($r->getValue()); + +$r->setValue(3); +var_dump($r->getValue()); +?> +===DONE=== +--EXPECT-- +int(1) +int(2) +int(3) +===DONE=== \ No newline at end of file diff --git a/ext/reflection/tests/bug30148.phpt b/ext/reflection/tests/bug30148.phpt new file mode 100755 index 000000000..bc4415bfd --- /dev/null +++ b/ext/reflection/tests/bug30148.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #30148 (ReflectionMethod->isConstructor() fails for inherited classes) +--FILE-- +isConstructor()); +var_dump($b->isConstructor()); +var_dump($c->isConstructor()); +var_dump($d->isConstructor()); +var_dump($e->isConstructor()); +?> +===DONE=== +--EXPECT-- +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +===DONE=== \ No newline at end of file diff --git a/ext/reflection/tests/bug30209.phpt b/ext/reflection/tests/bug30209.phpt new file mode 100755 index 000000000..6705c6704 --- /dev/null +++ b/ext/reflection/tests/bug30209.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #30209 (ReflectionClass::getMethod() lowercases attribute) +--FILE-- +name); + $method = $class->getMethod($this->name); + var_dump($this->name); + } + + catch (Exception $e) {} + } +} + +$foo = new Foo; +$foo->testBAR(); +?> +===DONE=== +--EXPECTF-- +string(7) "testBAR" +string(7) "testBAR" +===DONE=== diff --git a/ext/reflection/tests/bug30856.phpt b/ext/reflection/tests/bug30856.phpt new file mode 100755 index 000000000..6c6d3171a --- /dev/null +++ b/ext/reflection/tests/bug30856.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #30856 (ReflectionClass::getStaticProperties segfaults) +--FILE-- +getStaticProperties()); +?> +===DONE=== +--EXPECT-- +array(1) { + ["a"]=> + string(4) "test" +} +===DONE=== diff --git a/ext/reflection/tests/bug30961.phpt b/ext/reflection/tests/bug30961.phpt new file mode 100755 index 000000000..67964343e --- /dev/null +++ b/ext/reflection/tests/bug30961.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #30961 (Wrong linenumber in ReflectionClass getStartLine()) +--FILE-- +getStartLine() . "\n"; + echo $ref2->getStartLine() . "\n"; +?> +--EXPECT-- +2 +6 diff --git a/ext/reflection/tests/bug31651.phpt b/ext/reflection/tests/bug31651.phpt new file mode 100755 index 000000000..60bee14e9 --- /dev/null +++ b/ext/reflection/tests/bug31651.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #31651 (ReflectionClass::getDefaultProperties segfaults with arrays.) +--FILE-- + 1); +} + +$ref = new ReflectionClass('Test'); + +print_r($ref->getDefaultProperties()); + +?> +--EXPECT-- +Array +( + [a] => Array + ( + [a] => 1 + ) + +) diff --git a/ext/reflection/tests/bug32981.phpt b/ext/reflection/tests/bug32981.phpt new file mode 100755 index 000000000..1f89ca682 --- /dev/null +++ b/ext/reflection/tests/bug32981.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #32981 (ReflectionMethod::getStaticVariables() causes apache2.0.54 seg fault) +--FILE-- +getMethods() as $method) +{ + var_dump($method->getName()); + $arr_static_vars[] = $method->getStaticVariables(); +} + +var_dump($arr_static_vars); + +?> +===DONE=== +--EXPECT-- +string(4) "test" +array(1) { + [0]=> + array(1) { + ["enabled"]=> + bool(true) + } +} +===DONE=== diff --git a/ext/reflection/tests/bug33312.phpt b/ext/reflection/tests/bug33312.phpt new file mode 100755 index 000000000..3784b56a6 --- /dev/null +++ b/ext/reflection/tests/bug33312.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #33312 (ReflectionParameter methods do not work correctly) +--FILE-- +getMethod('bar'); + +foreach ($method->getParameters() as $parameter) { + if ($parameter->isDefaultValueAvailable()) { + print $parameter->getDefaultValue()."\n"; + } +} +?> +--EXPECT-- +bar diff --git a/ext/reflection/tests/bug33389.phpt b/ext/reflection/tests/bug33389.phpt new file mode 100755 index 000000000..36f7079e2 --- /dev/null +++ b/ext/reflection/tests/bug33389.phpt @@ -0,0 +1,97 @@ +--TEST-- +Bug #33389 (double free() when exporting a ReflectionClass) +--FILE-- + +===DONE=== + +--EXPECTF-- +Class [ class Test ] { + @@ %sbug33389.php 3-18 + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [7] { + Method [ public method foo1 ] { + @@ %sbug33389.php 4 - 5 + + - Parameters [1] { + Parameter #0 [ $arg = 1 ] + } + } + + Method [ public method foo2 ] { + @@ %sbug33389.php 6 - 7 + + - Parameters [1] { + Parameter #0 [ $arg = NULL ] + } + } + + Method [ public method foo3 ] { + @@ %sbug33389.php 8 - 9 + + - Parameters [1] { + Parameter #0 [ $arg = false ] + } + } + + Method [ public method foo4 ] { + @@ %sbug33389.php 10 - 11 + + - Parameters [1] { + Parameter #0 [ $arg = 'foo' ] + } + } + + Method [ public method foo5 ] { + @@ %sbug33389.php 12 - 13 + + - Parameters [1] { + Parameter #0 [ $arg = 1 ] + } + } + + Method [ public method bar ] { + @@ %sbug33389.php 14 - 15 + + - Parameters [1] { + Parameter #0 [ $arg ] + } + } + + Method [ public method foo ] { + @@ %sbug33389.php 16 - 17 + } + } +} + +===DONE=== diff --git a/ext/reflection/tests/exception.inc b/ext/reflection/tests/exception.inc new file mode 100644 index 000000000..e40333996 --- /dev/null +++ b/ext/reflection/tests/exception.inc @@ -0,0 +1,16 @@ +errno = $_errno; + $this->errmsg = $_errmsg; + } + + function getErrno() { + return $this->errno; + } + + function getErrmsg() { + return $this->errmsg; + } +} +?> diff --git a/ext/reflection/tests/parameters_001.phpt b/ext/reflection/tests/parameters_001.phpt new file mode 100755 index 000000000..0879756ea --- /dev/null +++ b/ext/reflection/tests/parameters_001.phpt @@ -0,0 +1,38 @@ +--TEST-- +Check for parameter being optional +--FILE-- +getNumberOfParameters()); +var_dump($f->getNumberOfRequiredParameters()); + +$p = new ReflectionParameter(array('Test', 'func'), 'x'); +var_dump($p->isOptional()); + +$p = new ReflectionParameter(array('Test', 'func'), 'y'); +var_dump($p->isOptional()); + +try { + $p = new ReflectionParameter(array('Test', 'func'), 'z'); + var_dump($p->isOptional()); +} +catch (Exception $e) { + var_dump($e->getMessage()); +} + +?> +===DONE=== +--EXPECT-- +int(2) +int(1) +bool(false) +bool(true) +string(54) "The parameter specified by its name could not be found" +===DONE=== diff --git a/ext/reflection/tests/property_exists.phpt b/ext/reflection/tests/property_exists.phpt new file mode 100755 index 000000000..fa712dfdb --- /dev/null +++ b/ext/reflection/tests/property_exists.phpt @@ -0,0 +1,222 @@ +--TEST-- +ZE2 property_exists() +--FILE-- +e = 6; + +$oC = new C; + +$pc = array($oA, 'A', 'B', 'C', $oC); +$pr = array('a', 'b', 'c', 'd', 'e'); + +foreach($pc as $p1) { + if (is_object($p1)) { + $p1->test($p1, $pr); + } else { + $r = new ReflectionMethod($p1, 'test'); + $r->invoke(NULL, $p1, $pr); + } + echo "===GLOBAL===\n"; + foreach($pr as $p2) { + echo $p1, '::$' , $p2, "\n"; + var_dump(property_exists($p1, $p2)); + } +} + +echo "===PROBLEMS===\n"; +var_dump(property_exists(NULL, 'empty')); +var_dump(property_exists(25,'empty')); +var_dump(property_exists('','')); +var_dump(property_exists('A','')); +var_dump(property_exists('A','123')); +var_dump(property_exists('A','init')); +var_dump(property_exists('A','empty')); +var_dump(property_exists(new A, '')); +var_dump(property_exists(new A, '123')); +var_dump(property_exists(new A, 'init')); +var_dump(property_exists(new A, 'empty')); +?> +===DONE=== + +--EXPECTF-- +===A=== +obj(A)::$a +bool(true) +obj(A)::$b +bool(true) +obj(A)::$c +bool(true) +obj(A)::$d +bool(false) +obj(A)::$e +bool(true) +===GLOBAL=== +obj(A)::$a +bool(true) +obj(A)::$b +bool(false) +obj(A)::$c +bool(false) +obj(A)::$d +bool(false) +obj(A)::$e +bool(true) +===A=== +A::$a +bool(true) +A::$b +bool(true) +A::$c +bool(true) +A::$d +bool(false) +A::$e +bool(false) +===GLOBAL=== +A::$a +bool(true) +A::$b +bool(false) +A::$c +bool(false) +A::$d +bool(false) +A::$e +bool(false) +===B=== +B::$a +bool(true) +B::$b +bool(true) +B::$c +bool(true) +B::$d +bool(false) +B::$e +bool(false) +===GLOBAL=== +B::$a +bool(true) +B::$b +bool(false) +B::$c +bool(false) +B::$d +bool(false) +B::$e +bool(false) +===C=== +C::$a +bool(true) +C::$b +bool(true) +C::$c +bool(false) +C::$d +bool(true) +C::$e +bool(false) +===GLOBAL=== +C::$a +bool(true) +C::$b +bool(false) +C::$c +bool(false) +C::$d +bool(false) +C::$e +bool(false) +===C=== +obj(C)::$a +bool(true) +obj(C)::$b +bool(true) +obj(C)::$c +bool(false) +obj(C)::$d +bool(true) +obj(C)::$e +bool(false) +===GLOBAL=== +obj(C)::$a +bool(true) +obj(C)::$b +bool(false) +obj(C)::$c +bool(false) +obj(C)::$d +bool(false) +obj(C)::$e +bool(false) +===PROBLEMS=== + +Warning: First parameter must either be an object or the name of an existing class in %sproperty_exists.php on line %d +NULL + +Warning: First parameter must either be an object or the name of an existing class in %sproperty_exists.php on line %d +NULL +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(false) +bool(false) +bool(true) +bool(true) +===DONE=== diff --git a/ext/reflection/tests/static_properties_002.phpt b/ext/reflection/tests/static_properties_002.phpt new file mode 100755 index 000000000..29b84a8e6 --- /dev/null +++ b/ext/reflection/tests/static_properties_002.phpt @@ -0,0 +1,62 @@ +--TEST-- +ZE2 Inheriting static properties +--SKIPIF-- + +--FILE-- +getStaticProperties()) . "\n"; + +echo "Done\n"; +?> +--EXPECTF-- +base::show(2) +derived::show(2) +base::inc() +base::show(3) +derived::show(3) +derived::inc() +base::show(4) +derived::show(4) +Number of properties: 1 +Done diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 3131a7219..9943c50ad 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c,v 1.100.2.1 2005/08/18 13:34:40 sniper Exp $ */ +/* $Id: mod_files.c,v 1.100.2.2 2006/01/01 12:50:12 sniper Exp $ */ #include "php.h" diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h index 27aadb498..c5cc3177c 100644 --- a/ext/session/mod_files.h +++ b/ext/session/mod_files.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.h,v 1.11 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: mod_files.h,v 1.11.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef MOD_FILES_H #define MOD_FILES_H diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index 9bdebf60d..0014b81a0 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_mm.c,v 1.46 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: mod_mm.c,v 1.46.2.1 2006/01/01 12:50:12 sniper Exp $ */ #include "php.h" diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h index 7c4755a48..8c3c31bd5 100644 --- a/ext/session/mod_mm.h +++ b/ext/session/mod_mm.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_mm.h,v 1.12 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: mod_mm.h,v 1.12.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef MOD_MM_H #define MOD_MM_H diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 243f6c963..fd0f3a221 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_user.c,v 1.29 2005/08/03 14:07:43 sniper Exp $ */ +/* $Id: mod_user.c,v 1.29.2.1 2006/01/01 12:50:12 sniper Exp $ */ #include "php.h" #include "php_session.h" diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h index 87eb8b7bb..2229ed412 100644 --- a/ext/session/mod_user.h +++ b/ext/session/mod_user.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_user.h,v 1.14 2005/08/03 14:07:44 sniper Exp $ */ +/* $Id: mod_user.h,v 1.14.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef MOD_USER_H #define MOD_USER_H diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 2f48d2a75..6b6dc7bf3 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_session.h,v 1.101 2005/08/03 14:07:44 sniper Exp $ */ +/* $Id: php_session.h,v 1.101.2.1 2006/01/01 12:50:12 sniper Exp $ */ #ifndef PHP_SESSION_H #define PHP_SESSION_H diff --git a/ext/session/session.c b/ext/session/session.c index 1a695298c..f90f25b1a 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session.c,v 1.417.2.3 2005/09/23 08:14:13 sniper Exp $ */ +/* $Id: session.c,v 1.417.2.5 2006/01/01 12:50:12 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -56,7 +56,7 @@ /* {{{ session_functions[] */ -function_entry session_functions[] = { +zend_function_entry session_functions[] = { PHP_FE(session_name, NULL) PHP_FE(session_module_name, NULL) PHP_FE(session_save_path, NULL) diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h index 30db3196f..10fae8185 100644 --- a/ext/shmop/php_shmop.h +++ b/ext/shmop/php_shmop.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index d210411e4..e5b34e71f 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP version 4 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ | Ilia Alshanetsky | +----------------------------------------------------------------------+ */ -/* $Id: shmop.c,v 1.31 2005/08/03 14:07:45 sniper Exp $ */ +/* $Id: shmop.c,v 1.31.2.2 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -47,7 +47,7 @@ int shm_type; /* {{{ shmop_functions[] */ -function_entry shmop_functions[] = { +zend_function_entry shmop_functions[] = { PHP_FE(shmop_open, NULL) PHP_FE(shmop_read, NULL) PHP_FE(shmop_close, NULL) diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index 663eb0794..167937194 100644 --- a/ext/simplexml/php_simplexml.h +++ b/ext/simplexml/php_simplexml.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_simplexml.h,v 1.20 2005/08/03 14:07:45 sniper Exp $ */ +/* $Id: php_simplexml.h,v 1.20.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SIMPLEXML_H #define PHP_SIMPLEXML_H diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h index 51e1999fb..a9cde7061 100755 --- a/ext/simplexml/php_simplexml_exports.h +++ b/ext/simplexml/php_simplexml_exports.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_simplexml_exports.h,v 1.3.2.2 2005/10/31 21:20:44 helly Exp $ */ +/* $Id: php_simplexml_exports.h,v 1.3.2.3 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SIMPLEXML_EXPORTS_H #define PHP_SIMPLEXML_EXPORTS_H diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 720673ae8..e02bf13e5 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.151.2.7 2005/11/20 13:05:13 helly Exp $ */ +/* $Id: simplexml.c,v 1.151.2.10 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -38,6 +38,8 @@ #include "ext/spl/spl_sxe.h" #endif +#define SXE_ELEMENT_BY_NAME 0 + zend_class_entry *sxe_class_entry = NULL; ZEND_API zend_class_entry *sxe_get_element_class_entry() @@ -51,8 +53,8 @@ ZEND_API zend_class_entry *sxe_get_element_class_entry() static php_sxe_object* php_sxe_object_new(zend_class_entry *ce TSRMLS_DC); static zend_object_value php_sxe_register_object(php_sxe_object * TSRMLS_DC); -static void php_sxe_reset_iterator(php_sxe_object *sxe TSRMLS_DC); -static void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC); +static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRMLS_DC); +static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data TSRMLS_DC); /* {{{ _node_as_zval() */ @@ -103,7 +105,7 @@ static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node TS xmlNodePtr retnode = NULL; if (sxe && sxe->iter.type != SXE_ITER_NONE) { - php_sxe_reset_iterator(sxe TSRMLS_CC); + php_sxe_reset_iterator(sxe, 1 TSRMLS_CC); if (sxe->iter.data) { intern = (php_sxe_object *)zend_object_store_get_object(sxe->iter.data TSRMLS_CC); GET_NODE(intern, retnode) @@ -114,10 +116,7 @@ static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node TS } } -/* {{{ match_ns() - */ -static inline int -match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) +static inline int match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) /* {{{ */ { if (name == NULL && (node->ns == NULL || node->ns->prefix == NULL)) { return 1; @@ -131,9 +130,8 @@ match_ns(php_sxe_object *sxe, xmlNodePtr node, xmlChar *name) } /* }}} */ -/* {{{ sxe_get_element_node() - */ -static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, long offset, xmlNodePtr node) { +static xmlNodePtr sxe_get_element_by_offset(php_sxe_object *sxe, long offset, xmlNodePtr node) /* {{{ */ +{ long nodendx = 0; if (sxe->iter.type == SXE_ITER_NONE) { @@ -158,6 +156,71 @@ next_iter: } /* }}} */ +#if SXE_ELEMENT_BY_NAME +static xmlNodePtr sxe_find_element_by_name(php_sxe_object *sxe, xmlNodePtr node, char *name TSRMLS_DC) /* {{{ */ +{ + while (node) { + SKIP_TEXT(node) + if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix)) { + if (!xmlStrcmp(node->name, name)) { + return node; + } + } +next_iter: + node = node->next; + } + return NULL; +} /* }}} */ + +static xmlNodePtr sxe_get_element_by_name(php_sxe_object *sxe, xmlNodePtr node, char **name, int *type TSRMLS_DC) /* {{{ */ +{ + int orgtype; + xmlNodePtr orgnode = node; + xmlNodePtr retnode = NULL; + + if (sxe->iter.type != SXE_ITER_ATTRLIST) + { + orgtype = sxe->iter.type; + if (sxe->iter.type == SXE_ITER_NONE) { + sxe->iter.type = SXE_ITER_CHILD; + } + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + sxe->iter.type = orgtype; + } + + if (sxe->iter.type == SXE_ITER_ELEMENT) { + orgnode = sxe_find_element_by_name(sxe, node, sxe->iter.name TSRMLS_CC); + node = orgnode->children; + } + + while (node) { + SKIP_TEXT(node) + if (node->type == XML_ELEMENT_NODE && match_ns(sxe, node, sxe->iter.nsprefix)) { + if (!xmlStrcmp(node->name, *name)) { + if (1||retnode) + { + *type = SXE_ITER_ELEMENT; + return orgnode; + } + retnode = node; + } + } +next_iter: + node = node->next; + } + + if (retnode) + { + *type = SXE_ITER_NONE; + *name = NULL; + return retnode; + } + + return NULL; +} +/* }}} */ +#endif /* SXE_ELEMENT_BY_NAME */ + /* {{{ sxe_prop_dim_read() */ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, zend_bool attribs, zend_bool silent TSRMLS_DC) @@ -169,6 +232,7 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, xmlAttrPtr attr; zval tmp_zv; int nodendx = 0; + int test; sxe = php_sxe_fetch_object(object TSRMLS_CC); @@ -177,6 +241,7 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, attribs = 0; elements = 1; } + name = NULL; } else { if (Z_TYPE_P(member) != IS_STRING) { tmp_zv = *member; @@ -184,28 +249,32 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, member = &tmp_zv; convert_to_string(member); } + name = Z_STRVAL_P(member); } MAKE_STD_ZVAL(return_value); ZVAL_NULL(return_value); - name = Z_STRVAL_P(member); - GET_NODE(sxe, node); - if (sxe->iter.type != SXE_ITER_CHILD && sxe->iter.type != SXE_ITER_ATTRLIST) { + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + attribs = 1; + elements = 0; + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = (xmlAttrPtr)node; + test = sxe->iter.name != NULL; + } else if (sxe->iter.type != SXE_ITER_CHILD) { node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = node ? node->properties : NULL; + test = 0; } if (node) { if (attribs) { - if (Z_TYPE_P(member) == IS_LONG && sxe->iter.type != SXE_ITER_ATTRLIST) { - attr = NULL; - } else { - attr = node->properties; + if (Z_TYPE_P(member) != IS_LONG || sxe->iter.type == SXE_ITER_ATTRLIST) { if (Z_TYPE_P(member) == IS_LONG) { while (attr && nodendx <= Z_LVAL_P(member)) { - if (match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { if (nodendx == Z_LVAL_P(member)) { _node_as_zval(sxe, (xmlNodePtr) attr, return_value, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); break; @@ -216,7 +285,7 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, } } else { while (attr) { - if (!xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && !xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { _node_as_zval(sxe, (xmlNodePtr) attr, return_value, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); break; } @@ -239,7 +308,17 @@ static zval * sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, _node_as_zval(sxe, node, return_value, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); } } else { +#if SXE_ELEMENT_BY_NAME + int newtype; + + GET_NODE(sxe, node); + node = sxe_get_element_by_name(sxe, node, &name, &newtype TSRMLS_CC); + if (node) { + _node_as_zval(sxe, node, return_value, newtype, name, sxe->iter.nsprefix TSRMLS_CC); + } +#else _node_as_zval(sxe, node, return_value, SXE_ITER_ELEMENT, name, sxe->iter.nsprefix TSRMLS_CC); +#endif } } } @@ -315,6 +394,7 @@ static void sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_boo int counter = 0; int is_attr = 0; int nodendx = 0; + int test; zval tmp_zv, trim_zv; if (!member) { @@ -357,16 +437,23 @@ static void sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_boo GET_NODE(sxe, node); - if (sxe->iter.type != SXE_ITER_ATTRLIST) { + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + attribs = 1; + elements = 0; node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = (xmlAttrPtr)node; + test = sxe->iter.name != NULL; + } else if (sxe->iter.type != SXE_ITER_CHILD) { + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = node ? node->properties : NULL; + test = 0; } if (node) { if (attribs) { - attr = node->properties; if (Z_TYPE_P(member) == IS_LONG) { while (attr && nodendx <= Z_LVAL_P(member)) { - if (match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { if (nodendx == Z_LVAL_P(member)) { is_attr = 1; ++counter; @@ -378,7 +465,7 @@ static void sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_boo } } else { while (attr) { - if (!xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && !xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { is_attr = 1; ++counter; break; @@ -471,6 +558,7 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend xmlNodePtr node; xmlAttrPtr attr = NULL; int exists = 0; + int test; sxe = php_sxe_fetch_object(object TSRMLS_CC); @@ -488,15 +576,22 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend } } - if (sxe->iter.type != SXE_ITER_CHILD && sxe->iter.type != SXE_ITER_ATTRLIST) { + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + attribs = 1; + elements = 0; + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = (xmlAttrPtr)node; + test = sxe->iter.name != NULL; + } else if (sxe->iter.type != SXE_ITER_CHILD) { node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = node ? node->properties : NULL; + test = 0; } if (node) { if (attribs) { - attr = node->properties; while (attr) { - if (!xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && !xmlStrcmp(attr->name, name) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { exists = 1; break; } @@ -513,8 +608,10 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend node = sxe_get_element_by_offset(sxe, Z_LVAL_P(member), node); } else { + zval tmp_zv; + if (Z_TYPE_P(member) != IS_STRING) { - zval tmp_zv = *member; + tmp_zv = *member; zval_copy_ctor(&tmp_zv); member = &tmp_zv; convert_to_string(member); @@ -528,6 +625,9 @@ static int sxe_prop_dim_exists(zval *object, zval *member, int check_empty, zend } node = nnext; } + if (member == &tmp_zv) { + zval_dtor(&tmp_zv); + } } if (node) { exists = 1; @@ -565,6 +665,7 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, xmlAttrPtr attr; xmlAttrPtr anext; zval tmp_zv; + int test; if (Z_TYPE_P(member) != IS_STRING) { tmp_zv = *member; @@ -576,14 +677,23 @@ static void sxe_prop_dim_delete(zval *object, zval *member, zend_bool elements, sxe = php_sxe_fetch_object(object TSRMLS_CC); GET_NODE(sxe, node); + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + attribs = 1; + elements = 0; node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = (xmlAttrPtr)node; + test = sxe->iter.name != NULL; + } else { + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + attr = node ? node->properties : NULL; + test = 0; + } if (node) { if (attribs) { - attr = node->properties; while (attr) { anext = attr->next; - if (!xmlStrcmp(attr->name, Z_STRVAL_P(member)) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && !xmlStrcmp(attr->name, Z_STRVAL_P(member)) && match_ns(sxe, (xmlNodePtr) attr, sxe->iter.nsprefix)) { xmlUnlinkNode((xmlNodePtr) attr); php_libxml_node_free_resource((xmlNodePtr) attr TSRMLS_CC); break; @@ -632,10 +742,19 @@ 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); + + return res; +} + /* {{{ _get_base_node_value() */ -static void -_get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval **value, char *prefix TSRMLS_DC) +static void _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval **value, char *prefix TSRMLS_DC) { php_sxe_object *subnode; xmlChar *contents; @@ -656,6 +775,7 @@ _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval **value, cha subnode->iter.nsprefix = xmlStrdup(prefix); } php_libxml_increment_node_ptr((php_libxml_node_object *)subnode, node, NULL TSRMLS_CC); + (*value)->type = IS_OBJECT; (*value)->value.obj = php_sxe_register_object(subnode TSRMLS_CC); /*zval_add_ref(value);*/ @@ -663,20 +783,43 @@ _get_base_node_value(php_sxe_object *sxe_ref, xmlNodePtr node, zval **value, cha } /* }}} */ +static void sxe_properties_add(HashTable *rv, char *name, int namelen, zval *value TSRMLS_DC) +{ + zval **data_ptr; + zval *newptr; + ulong h = zend_hash_func(name, namelen); + + if (zend_hash_quick_find(rv, name, namelen, h, (void **) &data_ptr) == SUCCESS) { + if (Z_TYPE_PP(data_ptr) == IS_ARRAY) { + zend_hash_next_index_insert(Z_ARRVAL_PP(data_ptr), &value, sizeof(zval *), NULL); + } else { + MAKE_STD_ZVAL(newptr); + array_init(newptr); + + zval_add_ref(data_ptr); + zend_hash_next_index_insert(Z_ARRVAL_P(newptr), data_ptr, sizeof(zval *), NULL); + zend_hash_next_index_insert(Z_ARRVAL_P(newptr), &value, sizeof(zval *), NULL); + + zend_hash_quick_update(rv, name, namelen, h, &newptr, sizeof(zval *), NULL); + } + } else { + zend_hash_quick_update(rv, name, namelen, h, &value, sizeof(zval *), NULL); + } +} + /* {{{ sxe_properties_get() */ -static HashTable * -sxe_properties_get(zval *object TSRMLS_DC) +static HashTable * sxe_properties_get(zval *object TSRMLS_DC) { - zval **data_ptr; zval *value; - zval *newptr; + zval *zattr; HashTable *rv; php_sxe_object *sxe; char *name; xmlNodePtr node; - ulong h; + xmlAttrPtr attr; int namelen; + int test; sxe = php_sxe_fetch_object(object TSRMLS_CC); @@ -689,24 +832,49 @@ sxe_properties_get(zval *object TSRMLS_DC) sxe->properties = rv; } + GET_NODE(sxe, node); + if (1||sxe->iter.type != SXE_ITER_CHILD) { + if (sxe->iter.type == SXE_ITER_ELEMENT) { + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + } + attr = node ? (xmlAttrPtr)node->properties : NULL; + zattr = NULL; + test = sxe->iter.name && sxe->iter.type == SXE_ITER_ATTRLIST; + while (attr) { + if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && match_ns(sxe, (xmlNodePtr)attr, sxe->iter.nsprefix)) { + MAKE_STD_ZVAL(value); + ZVAL_STRING(value, sxe_xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, attr->children, 1), 0); + namelen = xmlStrlen(attr->name) + 1; + if (!zattr) { + MAKE_STD_ZVAL(zattr); + array_init(zattr); + sxe_properties_add(rv, "@attributes", sizeof("@attributes"), zattr TSRMLS_CC); + } + add_assoc_zval_ex(zattr, (char*)attr->name, namelen, value); + } + attr = attr->next; + } + } + GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node TSRMLS_CC); if (node && sxe->iter.type != SXE_ITER_ATTRLIST) { if (node->type == XML_ATTRIBUTE_NODE) { MAKE_STD_ZVAL(value); - ZVAL_STRING(value, xmlNodeListGetString(node->doc, node->children, 1), 1); + ZVAL_STRING(value, sxe_xmlNodeListGetString(node->doc, node->children, 1), 0); zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL); node = NULL; } else { node = node->children; } + while (node) { if (node->children != NULL || node->prev != NULL || node->next != NULL) { SKIP_TEXT(node); } else { if (node->type == XML_TEXT_NODE) { MAKE_STD_ZVAL(value); - ZVAL_STRING(value, xmlNodeListGetString(node->doc, node, 1), 1); + ZVAL_STRING(value, sxe_xmlNodeListGetString(node->doc, node, 1), 0); zend_hash_next_index_insert(rv, &value, sizeof(zval *), NULL); goto next_iter; } @@ -725,24 +893,7 @@ sxe_properties_get(zval *object TSRMLS_DC) _get_base_node_value(sxe, node, &value, sxe->iter.nsprefix TSRMLS_CC); - h = zend_hash_func(name, namelen); - if (zend_hash_quick_find(rv, name, namelen, h, (void **) &data_ptr) == SUCCESS) { - if (Z_TYPE_PP(data_ptr) == IS_ARRAY) { - zend_hash_next_index_insert(Z_ARRVAL_PP(data_ptr), &value, sizeof(zval *), NULL); - } else { - MAKE_STD_ZVAL(newptr); - array_init(newptr); - - zval_add_ref(data_ptr); - zend_hash_next_index_insert(Z_ARRVAL_P(newptr), data_ptr, sizeof(zval *), NULL); - zend_hash_next_index_insert(Z_ARRVAL_P(newptr), &value, sizeof(zval *), NULL); - - zend_hash_quick_update(rv, name, namelen, h, &newptr, sizeof(zval *), NULL); - } - } else { - zend_hash_quick_update(rv, name, namelen, h, &value, sizeof(zval *), NULL); - } - + sxe_properties_add(rv, name, namelen, value TSRMLS_CC); next_iter: node = node->next; } @@ -752,10 +903,7 @@ next_iter: } /* }}} */ -/* {{{ sxe_objects_compare() - */ -static int -sxe_objects_compare(zval *object1, zval *object2 TSRMLS_DC) +static int sxe_objects_compare(zval *object1, zval *object2 TSRMLS_DC) /* {{{ */ { php_sxe_object *sxe1; php_sxe_object *sxe2; @@ -796,6 +944,11 @@ SXE_METHOD(xpath) } sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + return; /* attributes don't have attributes */ + } + if (!sxe->xpath) { sxe->xpath = xmlXPathNewContext((xmlDocPtr) sxe->document->ptr); } @@ -845,6 +998,8 @@ SXE_METHOD(xpath) */ if (nodeptr->type == XML_TEXT_NODE) { _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_NONE, NULL, NULL TSRMLS_CC); + } else if (nodeptr->type == XML_ATTRIBUTE_NODE) { + _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_ATTRLIST, (char*)nodeptr->name, NULL TSRMLS_CC); } else { _node_as_zval(sxe, nodeptr, value, SXE_ITER_NONE, NULL, NULL TSRMLS_CC); } @@ -952,6 +1107,114 @@ SXE_METHOD(asXML) } /* }}} */ +#define SXE_NS_PREFIX(ns) (ns->prefix ? (char*)ns->prefix : "") + +static inline void sxe_add_namespace_name(zval *return_value, xmlNsPtr ns) +{ + char *prefix = SXE_NS_PREFIX(ns); + if (zend_hash_exists(Z_ARRVAL_P(return_value), prefix, strlen(prefix) + 1) == 0) { + add_assoc_string(return_value, prefix, (char*)ns->href, 1); + } +} + +static void sxe_add_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value TSRMLS_DC) /* {{{ */ +{ + xmlAttrPtr attr; + + if (node->ns) { + sxe_add_namespace_name(return_value, node->ns); + } + + attr = node->properties; + while (attr) { + if (attr->ns) { + sxe_add_namespace_name(return_value, attr->ns); + } + attr = attr->next; + } + + if (recursive) { + node = node->children; + while (node) { + if (node->type == XML_ELEMENT_NODE) { + sxe_add_namespaces(sxe, node, recursive, return_value TSRMLS_CC); + } + node = node->next; + } + } +} /* }}} */ + +/* {{{ proto string SimpleXMLElement::getNamespaces([bool recursve]) + Return all namespaces in use */ +SXE_METHOD(getNamespaces) +{ + zend_bool recursive = 0; + php_sxe_object *sxe; + xmlNodePtr node; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &recursive) == FAILURE) { + return; + } + + array_init(return_value); + + sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + GET_NODE(sxe, node); + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); + + while (node) { + SKIP_TEXT(node) + if (node->type == XML_ELEMENT_NODE) { + sxe_add_namespaces(sxe, node, recursive, return_value TSRMLS_CC); + } else if (node->type == XML_ATTRIBUTE_NODE && node->ns) { + sxe_add_namespace_name(return_value, node->ns); + } +next_iter: + node = node->next; + } +} +/* }}} */ + +static void sxe_add_registered_namespaces(php_sxe_object *sxe, xmlNodePtr node, zend_bool recursive, zval *return_value TSRMLS_DC) /* {{{ */ +{ + xmlNsPtr ns; + + if (node->type == XML_ELEMENT_NODE) { + ns = node->nsDef; + while (ns != NULL) { + sxe_add_namespace_name(return_value, ns); + ns = ns->next; + } + if (recursive) { + node = node->children; + while (node) { + sxe_add_registered_namespaces(sxe, node, recursive, return_value TSRMLS_CC); + node = node->next; + } + } + } +} +/* }}} */ + +/* {{{ proto string SimpleXMLElement::getDocNamespaces([bool recursive]) + Return all namespaces registered with document */ +SXE_METHOD(getDocNamespaces) +{ + zend_bool recursive = 0; + php_sxe_object *sxe; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &recursive) == FAILURE) { + return; + } + + array_init(return_value); + + sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + + sxe_add_registered_namespaces(sxe, xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr), recursive, return_value TSRMLS_CC); +} +/* }}} */ + /* {{{ proto object SimpleXMLElement::children() Finds children of given node */ SXE_METHOD(children) @@ -966,6 +1229,11 @@ SXE_METHOD(children) } sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + return; /* attributes don't have attributes */ + } + GET_NODE(sxe, node); node = php_sxe_get_first_node(sxe, node TSRMLS_CC); @@ -989,6 +1257,11 @@ SXE_METHOD(attributes) sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); GET_NODE(sxe, node); + + if (sxe->iter.type == SXE_ITER_ATTRLIST) { + return; /* attributes don't have attributes */ + } + node = php_sxe_get_first_node(sxe, node TSRMLS_CC); _node_as_zval(sxe, node, return_value, SXE_ITER_ATTRLIST, NULL, nsprefix TSRMLS_CC); @@ -997,8 +1270,7 @@ SXE_METHOD(attributes) /* {{{ cast_object() */ -static int -cast_object(zval *object, int type, char *contents TSRMLS_DC) +static int cast_object(zval *object, int type, char *contents TSRMLS_DC) { if (contents) { ZVAL_STRINGL(object, contents, strlen(contents), 1); @@ -1030,19 +1302,24 @@ cast_object(zval *object, int type, char *contents TSRMLS_DC) /* {{{ sxe_object_cast() */ -static int -sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) +static int sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) { php_sxe_object *sxe; char *contents = NULL; xmlNodePtr node; - zval free_obj; - int rv; + int rv, empty; sxe = php_sxe_fetch_object(readobj TSRMLS_CC); - if (should_free) { - free_obj = *writeobj; + if (type == IS_BOOL) { + node = php_sxe_get_first_node(sxe, NULL TSRMLS_CC); + empty = node == NULL && zend_hash_num_elements(sxe_properties_get(readobj TSRMLS_CC)) == 0; + if (should_free) { + zval_dtor(readobj); + } + INIT_PZVAL(writeobj); + ZVAL_BOOL(writeobj, !empty); + return SUCCESS; } if (sxe->iter.type != SXE_ITER_NONE) { @@ -1064,18 +1341,39 @@ sxe_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_ } } + if (should_free) { + zval_dtor(readobj); + } + rv = cast_object(writeobj, type, contents TSRMLS_CC); if (contents) { xmlFree(contents); } - if (should_free) { - zval_dtor(&free_obj); - } return rv; } /* }}} */ +static int sxe_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ +{ + php_sxe_object *sxe; + xmlNodePtr node; + + *count = 0; + sxe = php_sxe_fetch_object(object TSRMLS_CC); + node = php_sxe_reset_iterator(sxe, 0 TSRMLS_CC); + + while (node) + { + (*count)++; + node = php_sxe_iterator_fetch(sxe, node->next, 0 TSRMLS_CC); + } + + + return SUCCESS; +} +/* }}} */ + static zval *sxe_get_value(zval *z TSRMLS_DC) { zval *retval; @@ -1084,6 +1382,7 @@ static zval *sxe_get_value(zval *z TSRMLS_DC) if (sxe_object_cast(z, retval, IS_STRING, 0 TSRMLS_CC)==FAILURE) { zend_error(E_ERROR, "Unable to cast node to string"); + /* FIXME: Should not be fatal */ } retval->refcount = 0; @@ -1112,7 +1411,7 @@ static zend_object_handlers sxe_object_handlers = { NULL, /* zend_get_std_object_handlers()->get_class_name,*/ sxe_objects_compare, sxe_object_cast, - NULL + sxe_count_elements }; static zend_object_handlers sxe_ze1_object_handlers = { @@ -1136,13 +1435,14 @@ static zend_object_handlers sxe_ze1_object_handlers = { NULL, /* zend_get_std_object_handlers()->get_class_name,*/ sxe_objects_compare, sxe_object_cast, - NULL + sxe_count_elements }; static zend_object_value sxe_object_ze1_clone(zval *zobject TSRMLS_DC) { php_error(E_ERROR, "Cannot clone object of class %s due to 'zend.ze1_compatibility_mode'", Z_OBJCE_P(zobject)->name); /* Return zobject->value.obj just to satisfy compiler */ + /* FIXME: Should not be a fatal */ return zobject->value.obj; } @@ -1363,7 +1663,7 @@ PHP_FUNCTION(simplexml_load_string) /* }}} */ -/* {{{ proto SimpleXMLElement::__construct(string data) +/* {{{ proto SimpleXMLElement::__construct(string data [, int options [, bool data_is_url]]) SimpleXMLElement constructor */ SXE_METHOD(__construct) { @@ -1371,15 +1671,21 @@ SXE_METHOD(__construct) char *data; int data_len; xmlDocPtr docp; + long options = 0; + zend_bool is_url = 0; php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &data, &data_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lb", &data, &data_len, &options, &is_url) == FAILURE) { php_std_error_handling(); return; } php_std_error_handling(); - docp = xmlParseMemory(data, data_len); +#if LIBXML_VERSION >= 20600 + docp = is_url ? xmlReadFile(data, NULL, options) : xmlReadMemory(data, data_len, NULL, NULL, options); +#else + docp = is_url ? xmlParseFile(data) : xmlParseMemory(data, data_len); +#endif if (!docp) { ((php_libxml_node_object *)sxe)->document = NULL; zend_throw_exception(zend_exception_get_default(), "String could not be parsed as XML", 0 TSRMLS_CC); @@ -1408,10 +1714,38 @@ zend_object_iterator_funcs php_sxe_iterator_funcs = { php_sxe_iterator_rewind, }; -static void php_sxe_reset_iterator(php_sxe_object *sxe TSRMLS_DC) +static xmlNodePtr php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node, int use_data TSRMLS_DC) +{ + char *prefix = sxe->iter.nsprefix; + int test_elem = sxe->iter.type == SXE_ITER_ELEMENT && sxe->iter.name; + int test_attr = sxe->iter.type == SXE_ITER_ATTRLIST && sxe->iter.name; + + while (node) { + SKIP_TEXT(node); + if (sxe->iter.type != SXE_ITER_ATTRLIST && node->type == XML_ELEMENT_NODE) { + if ((!test_elem || !xmlStrcmp(node->name, sxe->iter.name)) && match_ns(sxe, node, prefix)) { + break; + } + } else if (node->type == XML_ATTRIBUTE_NODE) { + if ((!test_attr || !xmlStrcmp(node->name, sxe->iter.name)) && match_ns(sxe, node, prefix)) { + break; + } + } +next_iter: + node = node->next; + } + + if (node && use_data) { + ALLOC_INIT_ZVAL(sxe->iter.data); + _node_as_zval(sxe, node, sxe->iter.data, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); + } + + return node; +} + +static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRMLS_DC) { xmlNodePtr node; - char *prefix; if (sxe->iter.data) { zval_ptr_dtor(&sxe->iter.data); @@ -1430,37 +1764,9 @@ static void php_sxe_reset_iterator(php_sxe_object *sxe TSRMLS_DC) case SXE_ITER_ATTRLIST: node = (xmlNodePtr) node->properties; } + return php_sxe_iterator_fetch(sxe, node, use_data TSRMLS_CC); } - - prefix = sxe->iter.nsprefix; - - while (node) { - SKIP_TEXT(node); - if (sxe->iter.type != SXE_ITER_ATTRLIST && node->type == XML_ELEMENT_NODE) { - if (sxe->iter.type == SXE_ITER_ELEMENT) { - if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix)) { - break; - } - } else { - if (match_ns(sxe, node, prefix)) { - break; - } - } - } else { - if (node->type == XML_ATTRIBUTE_NODE) { - if (match_ns(sxe, node, sxe->iter.nsprefix)) { - break; - } - } - } -next_iter: - node = node->next; - } - - if (node) { - ALLOC_INIT_ZVAL(sxe->iter.data); - _node_as_zval(sxe, node, sxe->iter.data, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); - } + return NULL; } zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) @@ -1523,11 +1829,10 @@ static int php_sxe_iterator_current_key(zend_object_iterator *iter, char **str_k } -static void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) +ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) { xmlNodePtr node = NULL; php_sxe_object *intern; - char *prefix; if (sxe->iter.data) { intern = (php_sxe_object *)zend_object_store_get_object(sxe->iter.data TSRMLS_CC); @@ -1537,38 +1842,7 @@ static void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) } if (node) { - node = node->next; - } - - prefix = sxe->iter.nsprefix; - - while (node) { - SKIP_TEXT(node); - - if (sxe->iter.type != SXE_ITER_ATTRLIST && node->type == XML_ELEMENT_NODE) { - if (sxe->iter.type == SXE_ITER_ELEMENT) { - if (!xmlStrcmp(node->name, sxe->iter.name) && match_ns(sxe, node, prefix)) { - break; - } - } else { - if (match_ns(sxe, node, prefix)) { - break; - } - } - } else { - if (node->type == XML_ATTRIBUTE_NODE) { - if (match_ns(sxe, node, sxe->iter.nsprefix)) { - break; - } - } - } -next_iter: - node = node->next; - } - - if (node) { - ALLOC_INIT_ZVAL(sxe->iter.data); - _node_as_zval(sxe, node, sxe->iter.data, SXE_ITER_NONE, NULL, sxe->iter.nsprefix TSRMLS_CC); + php_sxe_iterator_fetch(sxe, node->next, 1 TSRMLS_CC); } } @@ -1585,10 +1859,9 @@ static void php_sxe_iterator_rewind(zend_object_iterator *iter TSRMLS_DC) php_sxe_iterator *iterator = (php_sxe_iterator *)iter; sxe = iterator->sxe; - php_sxe_reset_iterator(sxe TSRMLS_CC); + php_sxe_reset_iterator(sxe, 1 TSRMLS_CC); } - void *simplexml_export_node(zval *object TSRMLS_DC) { php_sxe_object *sxe; @@ -1652,7 +1925,7 @@ PHP_FUNCTION(simplexml_import_dom) } /* }}} */ -function_entry simplexml_functions[] = { +zend_function_entry simplexml_functions[] = { PHP_FE(simplexml_load_file, NULL) PHP_FE(simplexml_load_string, NULL) PHP_FE(simplexml_import_dom, NULL) @@ -1691,6 +1964,8 @@ static zend_function_entry sxe_functions[] = { SXE_ME(registerXPathNamespace, NULL, ZEND_ACC_PUBLIC) SXE_ME(attributes, NULL, ZEND_ACC_PUBLIC) SXE_ME(children, NULL, ZEND_ACC_PUBLIC) + SXE_ME(getNamespaces, NULL, ZEND_ACC_PUBLIC) + SXE_ME(getDocNamespaces, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; @@ -1743,7 +2018,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: 1.151.2.7 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.10 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt new file mode 100755 index 000000000..51dbe3b5e --- /dev/null +++ b/ext/simplexml/tests/000.phpt @@ -0,0 +1,254 @@ +--TEST-- +SimpleXML: var_dump() +--SKIPIF-- + +--FILE-- +elem1'); +test('sxe->elem1[0]'); +test('sxe->elem1[0]->elem2'); +test('sxe->elem1[0]->elem2->bla'); +if (!ini_get("unicode_semantics")) test('sxe->elem1[0]["attr1"]'); +test('sxe->elem1[0]->attr1'); +test('sxe->elem1[1]'); +test('sxe->elem1[2]'); +test('sxe->elem11'); +test('sxe->elem11->elem111'); +test('sxe->elem11->elem111->elem1111'); +test('sxe->elem22'); +test('sxe->elem22->elem222'); +test('sxe->elem22->attr22'); +test('sxe->elem22["attr22"]'); + +?> +===DONE=== + +--EXPECTF-- +===sxe +bool(true) +bool(true) +int(3) +object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(3) "123" + } + ["elem1"]=> + array(2) { + [0]=> + string(36) "There is some text.Here is some more" + [1]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(2) { + ["attr1"]=> + string(2) "11" + ["attr2"]=> + string(2) "12" + } + } + } + ["elem11"]=> + object(SimpleXMLElement)#%d (1) { + ["elem111"]=> + object(SimpleXMLElement)#%d (1) { + ["elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } +} +===sxe->elem1 +bool(true) +bool(true) +int(2) +object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(2) { + ["attr1"]=> + string(5) "first" + ["attr2"]=> + string(6) "second" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(2) { + ["att25"]=> + string(2) "25" + ["att42"]=> + string(2) "42" + } + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } +} +===sxe->elem1[0] +bool(true) +bool(true) +int(1) +object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(2) { + ["attr1"]=> + string(5) "first" + ["attr2"]=> + string(6) "second" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(2) { + ["att25"]=> + string(2) "25" + ["att42"]=> + string(2) "42" + } + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } +} +===sxe->elem1[0]->elem2 +bool(true) +bool(true) +int(1) +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(2) { + ["att25"]=> + string(2) "25" + ["att42"]=> + string(2) "42" + } + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } +} +===sxe->elem1[0]->elem2->bla +bool(false) +bool(false) +int(0) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem1[0]["attr1"] +bool(true) +bool(true) +int(0) +object(SimpleXMLElement)#%d (1) { + [0]=> + string(5) "first" +} +===sxe->elem1[0]->attr1 +bool(false) +bool(false) +int(0) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem1[1] +bool(true) +bool(true) +int(0) +object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(2) { + ["attr1"]=> + string(2) "11" + ["attr2"]=> + string(2) "12" + } +} +===sxe->elem1[2] +bool(false) +bool(false) +int(0) +NULL +===sxe->elem11 +bool(true) +bool(true) +int(1) +object(SimpleXMLElement)#%d (1) { + ["elem111"]=> + object(SimpleXMLElement)#%d (1) { + ["elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } + } +} +===sxe->elem11->elem111 +bool(true) +bool(true) +int(1) +object(SimpleXMLElement)#%d (1) { + ["elem1111"]=> + object(SimpleXMLElement)#%d (0) { + } +} +===sxe->elem11->elem111->elem1111 +bool(true) +bool(true) +int(1) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem22 +bool(false) +bool(false) +int(0) +object(SimpleXMLElement)#%d (0) { +} +===sxe->elem22->elem222 +bool(false) +bool(false) +int(0) +NULL +===sxe->elem22->attr22 +bool(false) +bool(false) +int(0) +NULL +===sxe->elem22["attr22"] +bool(false) +bool(false) +int(0) +NULL +===DONE=== diff --git a/ext/simplexml/tests/000.xml b/ext/simplexml/tests/000.xml new file mode 100755 index 000000000..b0f278546 --- /dev/null +++ b/ext/simplexml/tests/000.xml @@ -0,0 +1,16 @@ + + +%incent; +]> + + There is some text. + + + + + + Here is some more + + + \ No newline at end of file diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt index cacc2d306..0be77710e 100644 --- a/ext/simplexml/tests/001.phpt +++ b/ext/simplexml/tests/001.phpt @@ -5,39 +5,39 @@ SimpleXML: Simple document --FILE-- ---EXPECT-- -SimpleXMLElement Object -( - [elem1] => SimpleXMLElement Object - ( - [comment] => SimpleXMLElement Object - ( - ) - - [elem2] => SimpleXMLElement Object - ( - [elem3] => SimpleXMLElement Object - ( - [elem4] => SimpleXMLElement Object - ( - [test] => SimpleXMLElement Object - ( - ) - - ) - - ) - - ) - - ) - -) ----Done--- +===DONE=== +--EXPECTF-- +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (1) { + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/002.phpt b/ext/simplexml/tests/002.phpt index 95d644fe7..4f1f6b622 100644 --- a/ext/simplexml/tests/002.phpt +++ b/ext/simplexml/tests/002.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and clone +SimpleXML: clone --SKIPIF-- --FILE-- @@ -26,37 +26,39 @@ $sxe = simplexml_load_string($xml); $copy = clone $sxe; -print_r($copy); - -echo "---Done---\n"; +var_dump($copy); ?> ---EXPECT-- -SimpleXMLElement Object -( - [elem1] => SimpleXMLElement Object - ( - [comment] => SimpleXMLElement Object - ( - ) - - [elem2] => SimpleXMLElement Object - ( - [elem3] => SimpleXMLElement Object - ( - [elem4] => SimpleXMLElement Object - ( - [test] => SimpleXMLElement Object - ( - ) - - ) - - ) - - ) - - ) - -) ----Done--- +===DONE=== +--EXPECTF-- +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (1) { + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/003.phpt b/ext/simplexml/tests/003.phpt index 96aad372d..105f616d6 100755 --- a/ext/simplexml/tests/003.phpt +++ b/ext/simplexml/tests/003.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and Entities +SimpleXML: Entities --SKIPIF-- --FILE-- @@ -26,44 +26,44 @@ $xml =<< EOF; -$sxe = simplexml_load_string($xml); - -print_r($sxe); - -echo "---Done---\n"; +var_dump(simplexml_load_string($xml)); ?> ---EXPECT-- -SimpleXMLElement Object -( - [elem1] => SimpleXMLElement Object - ( - [comment] => SimpleXMLElement Object - ( - ) - - [elem2] => SimpleXMLElement Object - ( - [elem3] => SimpleXMLElement Object - ( - [included-entity] => SimpleXMLElement Object - ( - [included-entity] => This is text included from an entity - ) - - [elem4] => SimpleXMLElement Object - ( - [test] => SimpleXMLElement Object - ( - ) - - ) - - ) - - ) - - ) - -) ----Done--- +===DONE=== +--EXPECTF-- +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (1) { + ["elem3"]=> + object(SimpleXMLElement)#%d (2) { + ["included-entity"]=> + object(SimpleXMLElement)#%d (1) { + ["included-entity"]=> + string(36) "This is text included from an entity" + } + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/004.phpt b/ext/simplexml/tests/004.phpt index 392b1d498..21cb5469e 100755 --- a/ext/simplexml/tests/004.phpt +++ b/ext/simplexml/tests/004.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and CDATA +SimpleXML: CDATA --SKIPIF-- --FILE-- @@ -25,7 +25,7 @@ $sxe = simplexml_load_string(<<elem1; $elem2 = $elem1->elem2; @@ -33,33 +33,36 @@ var_dump(trim((string)$elem2)); ?> ===DONE=== ---EXPECT-- -SimpleXMLElement Object -( - [elem1] => SimpleXMLElement Object - ( - [comment] => SimpleXMLElement Object - ( - ) - - [elem2] => SimpleXMLElement Object - ( - [elem3] => SimpleXMLElement Object - ( - [elem4] => SimpleXMLElement Object - ( - [test] => SimpleXMLElement Object - ( - ) - - ) - - ) - - ) - - ) - -) +--EXPECTF-- +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLElement)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLElement)#%d (1) { + ["elem3"]=> + object(SimpleXMLElement)#%d (1) { + ["elem4"]=> + object(SimpleXMLElement)#%d (1) { + ["test"]=> + object(SimpleXMLElement)#%d (0) { + } + } + } + } + } +} string(11) "CDATA block" ===DONE=== diff --git a/ext/simplexml/tests/005.phpt b/ext/simplexml/tests/005.phpt index 237a5d261..141106543 100755 --- a/ext/simplexml/tests/005.phpt +++ b/ext/simplexml/tests/005.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and text data +SimpleXML: Text data --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/006.phpt b/ext/simplexml/tests/006.phpt index 9360b2dff..72ad0c808 100755 --- a/ext/simplexml/tests/006.phpt +++ b/ext/simplexml/tests/006.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and foreach +SimpleXML: foreach --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/007.phpt b/ext/simplexml/tests/007.phpt index b55d32496..51d7a847f 100755 --- a/ext/simplexml/tests/007.phpt +++ b/ext/simplexml/tests/007.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and attributes +SimpleXML: Attributes --SKIPIF-- --FILE-- @@ -48,7 +48,12 @@ var_dump($a); ===Done=== --EXPECTF-- ===Property=== -object(SimpleXMLElement)#%d (2) { +object(SimpleXMLElement)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } ["comment"]=> object(SimpleXMLElement)#%d (0) { } diff --git a/ext/simplexml/tests/008.phpt b/ext/simplexml/tests/008.phpt index 3554b3204..4fda204a2 100644 --- a/ext/simplexml/tests/008.phpt +++ b/ext/simplexml/tests/008.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and XPath +SimpleXML: XPath --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/009.phpt b/ext/simplexml/tests/009.phpt index 2115dd314..a76f3d111 100755 --- a/ext/simplexml/tests/009.phpt +++ b/ext/simplexml/tests/009.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and foreach +SimpleXML: foreach --SKIPIF-- --FILE-- @@ -31,7 +31,7 @@ EOF foreach($sxe->children() as $name=>$val) { var_dump($name); var_dump(get_class($val)); - var_dump(trim((string)$val)); + var_dump(trim($val)); } ?> ===DONE=== diff --git a/ext/simplexml/tests/010.phpt b/ext/simplexml/tests/010.phpt index ea6c7fd07..267780905 100644 --- a/ext/simplexml/tests/010.phpt +++ b/ext/simplexml/tests/010.phpt @@ -26,38 +26,39 @@ $xml =<< EOF; -$sxe = simplexml_load_string($xml, 'simplexml_inherited'); - -print_r($sxe); +var_dump(simplexml_load_string($xml, 'simplexml_inherited')); ?> ===DONE=== ---EXPECT-- -simplexml_inherited Object -( - [elem1] => simplexml_inherited Object - ( - [comment] => simplexml_inherited Object - ( - ) - - [elem2] => simplexml_inherited Object - ( - [elem3] => simplexml_inherited Object - ( - [elem4] => simplexml_inherited Object - ( - [test] => simplexml_inherited Object - ( - ) - - ) - - ) - - ) - - ) - -) +--EXPECTF-- +object(simplexml_inherited)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(simplexml_inherited)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(simplexml_inherited)#%d (0) { + } + ["elem2"]=> + object(simplexml_inherited)#%d (1) { + ["elem3"]=> + object(simplexml_inherited)#%d (1) { + ["elem4"]=> + object(simplexml_inherited)#%d (1) { + ["test"]=> + object(simplexml_inherited)#%d (0) { + } + } + } + } + } +} ===DONE=== diff --git a/ext/simplexml/tests/011.phpt b/ext/simplexml/tests/011.phpt index f48c9f1ee..74ea4705c 100755 --- a/ext/simplexml/tests/011.phpt +++ b/ext/simplexml/tests/011.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and echo/print +SimpleXML: echo/print --SKIPIF-- asXML(); $sxe[] = "error"; +__HALT_COMPILER(); ?> ===DONE=== --EXPECTF-- diff --git a/ext/simplexml/tests/013.phpt b/ext/simplexml/tests/013.phpt index fbd80b0c4..56c57dfbc 100755 --- a/ext/simplexml/tests/013.phpt +++ b/ext/simplexml/tests/013.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and Split text content +SimpleXML: Split text content --SKIPIF-- string(1) "5" } -===DONE=== \ No newline at end of file +===DONE=== diff --git a/ext/simplexml/tests/014b.phpt b/ext/simplexml/tests/014b.phpt index 14bd6ce86..034396751 100755 --- a/ext/simplexml/tests/014b.phpt +++ b/ext/simplexml/tests/014b.phpt @@ -52,4 +52,4 @@ object(SimpleXMLElement)#%d (1) { [0]=> string(1) "5" } -===DONE=== \ No newline at end of file +===DONE=== diff --git a/ext/simplexml/tests/019.phpt b/ext/simplexml/tests/019.phpt index a54a1bdd5..aec74ba42 100755 --- a/ext/simplexml/tests/019.phpt +++ b/ext/simplexml/tests/019.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and foreach with children() +SimpleXML: foreach with children() --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/020.phpt b/ext/simplexml/tests/020.phpt index 9433f81dc..b43d0340b 100755 --- a/ext/simplexml/tests/020.phpt +++ b/ext/simplexml/tests/020.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML attribute compared to string +SimpleXML: Attribute compared to string --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/021.phpt b/ext/simplexml/tests/021.phpt index e58e26d6e..d5138685f 100644 --- a/ext/simplexml/tests/021.phpt +++ b/ext/simplexml/tests/021.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML element check +SimpleXML: Element check --SKIPIF-- --FILE-- diff --git a/ext/simplexml/tests/022.phpt b/ext/simplexml/tests/022.phpt index 08cb908c9..2af4a1dd2 100755 --- a/ext/simplexml/tests/022.phpt +++ b/ext/simplexml/tests/022.phpt @@ -1,5 +1,5 @@ --TEST-- -SimpleXML and attributes inside foreach +SimpleXML: Attributes inside foreach --SKIPIF-- --FILE-- @@ -12,6 +12,13 @@ EOF; $sxe = simplexml_load_string($xml); +echo "===CONTENT===\n"; +var_dump($sxe->content); + +echo "===FILE===\n"; +var_dump($sxe->content->file); + +echo "===FOREACH===\n"; foreach($sxe->content->file as $file) { var_dump($file); @@ -21,7 +28,32 @@ foreach($sxe->content->file as $file) ?> ===DONE=== --EXPECTF-- -object(SimpleXMLElement)#%d (0) { +===CONTENT=== +object(SimpleXMLElement)#%d (1) { + ["file"]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["glob"]=> + string(11) "slide_*.xml" + } + } +} +===FILE=== +object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["glob"]=> + string(11) "slide_*.xml" + } +} +===FOREACH=== +object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["glob"]=> + string(11) "slide_*.xml" + } } object(SimpleXMLElement)#%d (1) { [0]=> diff --git a/ext/simplexml/tests/023.phpt b/ext/simplexml/tests/023.phpt index dd6dde59d..515a1460c 100755 --- a/ext/simplexml/tests/023.phpt +++ b/ext/simplexml/tests/023.phpt @@ -22,7 +22,12 @@ var_dump($sxe['attr']); ?> ===DONE=== --EXPECTF-- -object(SimpleXMLElement)#%d (0) { +object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr"]=> + string(%d) "foo%sbar%sbaz" + } } object(SimpleXMLElement)#%d (1) { [0]=> diff --git a/ext/simplexml/tests/024.phpt b/ext/simplexml/tests/024.phpt new file mode 100755 index 000000000..9f31fd5e9 --- /dev/null +++ b/ext/simplexml/tests/024.phpt @@ -0,0 +1,175 @@ +--TEST-- +SimpleXML: XPath and attributes +--SKIPIF-- + +--FILE-- + + + + + + +EOF; + +$sxe = simplexml_load_string($xml); + +function test($xpath) +{ + global $sxe; + + echo "===$xpath===\n"; + var_dump($sxe->xpath($xpath)); +} + +test('elem/@attr2'); +test('//@attr2'); +test('//@*'); +test('elem[2]/@attr2'); + +?> +===DONE=== +--EXPECTF-- +===elem/@attr2=== +array(3) { + [0]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "12" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "22" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "32" + } + } +} +===//@attr2=== +array(3) { + [0]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "12" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "22" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "32" + } + } +} +===//@*=== +array(9) { + [0]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(2) "11" + } + } + [1]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "12" + } + } + [2]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr3"]=> + string(2) "13" + } + } + [3]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(2) "21" + } + } + [4]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "22" + } + } + [5]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr3"]=> + string(2) "23" + } + } + [6]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(2) "31" + } + } + [7]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "32" + } + } + [8]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr3"]=> + string(2) "33" + } + } +} +===elem[2]/@attr2=== +array(1) { + [0]=> + object(SimpleXMLElement)#%d (1) { + ["@attributes"]=> + array(1) { + ["attr2"]=> + string(2) "22" + } + } +} +===DONE=== diff --git a/ext/simplexml/tests/025.phpt b/ext/simplexml/tests/025.phpt new file mode 100755 index 000000000..b9e3bbb0d --- /dev/null +++ b/ext/simplexml/tests/025.phpt @@ -0,0 +1,92 @@ +--TEST-- +SimpleXML: getting namespaces +--SKIPIF-- + +--FILE-- + + +bla + +bla + + + +EOF; + +$sxe = simplexml_load_string($xml); + +var_dump($sxe->getNamespaces()); +var_dump($sxe->getNamespaces(true)); +var_dump($sxe->getDocNamespaces()); +var_dump($sxe->getDocNamespaces(true)); + +$xml =<< + +bla + +EOF; + +$sxe = simplexml_load_string($xml); + +var_dump($sxe->getNamespaces()); +var_dump($sxe->getDocNamespaces()); + +$xml =<< + +EOF; + +$sxe = simplexml_load_string($xml); + +var_dump($sxe->getNamespaces()); +var_dump($sxe->getDocNamespaces()); + +?> +===DONE=== + +--EXPECTF-- +array(1) { + ["xhtml"]=> + string(31) "http://www.w3.org/TR/REC-html40" +} +array(3) { + ["xhtml"]=> + string(31) "http://www.w3.org/TR/REC-html40" + ["html"]=> + string(28) "http://www.w3.org/1999/xhtml" + ["foo"]=> + string(6) "foobar" +} +array(2) { + ["html"]=> + string(28) "http://www.w3.org/1999/xhtml" + ["xhtml"]=> + string(31) "http://www.w3.org/TR/REC-html40" +} +array(4) { + ["html"]=> + string(28) "http://www.w3.org/1999/xhtml" + ["xhtml"]=> + string(31) "http://www.w3.org/TR/REC-html40" + ["foo"]=> + string(6) "foobar" + ["baz"]=> + string(9) "foobarbaz" +} +array(1) { + [""]=> + string(28) "http://www.w3.org/1999/xhtml" +} +array(1) { + [""]=> + string(28) "http://www.w3.org/1999/xhtml" +} +array(0) { +} +array(0) { +} +===DONE=== diff --git a/ext/simplexml/tests/bug27010.phpt b/ext/simplexml/tests/bug27010.phpt index 9ba9f7b6b..364ca4675 100755 --- a/ext/simplexml/tests/bug27010.phpt +++ b/ext/simplexml/tests/bug27010.phpt @@ -1,5 +1,7 @@ --TEST-- -#27010: segfault and node text not displayed when returned from children() +Bug #27010 (segfault and node text not displayed when returned from children()) +--SKIPIF-- + --FILE-- "); +$count = count($xml->posts) + 1; +$xml->bla->posts[$count]->name = $_POST["name"]; +echo $xml->asXML(); +?> +===DONE=== + +--EXPECTF-- + +Notice: Undefined index: name in %sbug35785.php on line %d + +Strict Standards: Creating default object from empty value in %sbug35785.php on line %d + +Warning: Attempt to assign property of non-object in %sbug35785.php on line %d + + +===DONE=== diff --git a/ext/simplexml/tests/profile11.phpt b/ext/simplexml/tests/profile11.phpt index e68e6bd51..54c31bf71 100644 --- a/ext/simplexml/tests/profile11.phpt +++ b/ext/simplexml/tests/profile11.phpt @@ -12,15 +12,24 @@ $root = simplexml_load_string(' '); -echo $root->children('reserved-ns')->child; -echo "\n"; -echo $root->children('special-ns')->child; -foreach ($root->child as $child) { - echo "$child\n"; -} -echo "\n---Done---\n"; +var_dump($root->children('reserved-ns')->child); +var_dump($root->children('special-ns')->child); +var_dump((string)$root->children('reserved-ns')->child); +var_dump((string)$root->children('special-ns')->child); +var_dump($root->child); ?> ---EXPECT-- -Hello -World ----Done--- +===DONE=== +--EXPECTF-- +object(SimpleXMLElement)#%d (1) { + [0]=> + string(5) "Hello" +} +object(SimpleXMLElement)#%d (1) { + [0]=> + string(5) "World" +} +string(5) "Hello" +string(5) "World" +object(SimpleXMLElement)#%d (0) { +} +===DONE=== diff --git a/ext/simplexml/tests/simplexml_import_dom.phpt b/ext/simplexml/tests/simplexml_import_dom.phpt index c66ba8f08..76e7f041d 100755 --- a/ext/simplexml/tests/simplexml_import_dom.phpt +++ b/ext/simplexml/tests/simplexml_import_dom.phpt @@ -1,5 +1,5 @@ --TEST-- -Interop: simplexml_import_dom +SimpleXML [interop]: simplexml_import_dom --SKIPIF-- diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index 021b76e78..a5cf506f6 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -20,7 +20,7 @@ static int le_extname; * * Every user visible function must have an entry in extname_functions[]. */ -function_entry extname_functions[] = { +zend_function_entry extname_functions[] = { PHP_FE(confirm_extname_compiled, NULL) /* For testing, remove later. */ /* __function_entries_here__ */ {NULL, NULL, NULL} /* Must be the last line in extname_functions[] */ diff --git a/ext/snmp/config.m4 b/ext/snmp/config.m4 index 511246b48..f42541d63 100644 --- a/ext/snmp/config.m4 +++ b/ext/snmp/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.32 2005/05/29 23:16:44 sniper Exp $ +dnl $Id: config.m4,v 1.32.2.1 2005/11/29 18:26:00 tony2001 Exp $ dnl PHP_ARG_WITH(snmp,for SNMP support, @@ -46,7 +46,7 @@ if test "$PHP_SNMP" != "no"; then test -f $i/snmp/include/ucd-snmp/snmp.h && SNMP_INCDIR=$i/snmp/include/ucd-snmp done for i in /usr /usr/snmp /usr/local /usr/local/snmp; do - test -f $i/lib/libsnmp.a -o -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib + test -f $i/lib/libsnmp.a || test -f $i/lib/libsnmp.$SHLIB_SUFFIX_NAME && SNMP_LIBDIR=$i/lib done else SNMP_INCDIR=$PHP_SNMP/include diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h index 0013fa91a..f362c2fdb 100644 --- a/ext/snmp/php_snmp.h +++ b/ext/snmp/php_snmp.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_snmp.h,v 1.25 2005/08/03 14:07:46 sniper Exp $ */ +/* $Id: php_snmp.h,v 1.25.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SNMP_H #define PHP_SNMP_H diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index a732c1773..63c32d8ca 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.106 2005/08/03 14:07:46 sniper Exp $ */ +/* $Id: snmp.c,v 1.106.2.2 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -113,7 +113,7 @@ static oid objid_mib[] = {1, 3, 6, 1, 2, 1}; /* {{{ snmp_functions[] */ -function_entry snmp_functions[] = { +zend_function_entry snmp_functions[] = { PHP_FE(snmpget, NULL) PHP_FE(snmpgetnext, NULL) PHP_FE(snmpwalk, NULL) diff --git a/ext/snmp/winsnmp.c b/ext/snmp/winsnmp.c index f4332300a..7aa4866d4 100644 --- a/ext/snmp/winsnmp.c +++ b/ext/snmp/winsnmp.c @@ -21,7 +21,7 @@ Created from the snmputil sample in the Microsoft SDK for NT /* {{{ snmp_functions[] */ -function_entry snmp_functions[] = { +zend_function_entry snmp_functions[] = { {"snmpget", php3_snmpget, NULL}, {"snmpwalk", php3_snmpwalk, NULL}, {NULL,NULL,NULL} @@ -58,7 +58,7 @@ DLEXPORT zend_module_entry *get_module() { return &snmp_module_entry; } /* {{{ _php_snmp */ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) { - pval *a1, *a2, *a3; + zval *a1, *a2, *a3; INT operation; LPSTR agent; LPSTR community; diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php index ee785f67c..3caee080d 100644 --- a/ext/soap/interop/client_round2_interop.php +++ b/ext/soap/interop/client_round2_interop.php @@ -7,7 +7,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -16,7 +16,7 @@ // | Authors: Shane Caraveo | // +----------------------------------------------------------------------+ // -// $Id: client_round2_interop.php,v 1.17 2004/09/13 11:55:24 dmitry Exp $ +// $Id: client_round2_interop.php,v 1.17.2.2 2006/01/01 13:27:13 sniper Exp $ // require_once 'DB.php'; // PEAR/DB require_once 'client_round2_params.php'; diff --git a/ext/soap/interop/client_round2_params.php b/ext/soap/interop/client_round2_params.php index 2fdb61fc4..25d299136 100644 --- a/ext/soap/interop/client_round2_params.php +++ b/ext/soap/interop/client_round2_params.php @@ -7,7 +7,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -16,7 +16,7 @@ // | Authors: Shane Caraveo | // +----------------------------------------------------------------------+ // -// $Id: client_round2_params.php,v 1.11 2004/04/01 14:37:03 dmitry Exp $ +// $Id: client_round2_params.php,v 1.11.4.2 2006/01/01 13:27:13 sniper Exp $ // define('SOAP_TEST_ACTOR_OTHER','http://some/other/actor'); diff --git a/ext/soap/interop/client_round2_results.php b/ext/soap/interop/client_round2_results.php index e1112f840..5b5f1350b 100644 --- a/ext/soap/interop/client_round2_results.php +++ b/ext/soap/interop/client_round2_results.php @@ -10,7 +10,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -19,7 +19,7 @@ // | Authors: Shane Caraveo | // +----------------------------------------------------------------------+ // -// $Id: client_round2_results.php,v 1.4 2004/02/13 10:29:55 dmitry Exp $ +// $Id: client_round2_results.php,v 1.4.4.2 2006/01/01 13:27:13 sniper Exp $ // require_once 'client_round2_interop.php'; ?> diff --git a/ext/soap/interop/client_round2_run.php b/ext/soap/interop/client_round2_run.php index 89431b986..16699c25b 100644 --- a/ext/soap/interop/client_round2_run.php +++ b/ext/soap/interop/client_round2_run.php @@ -6,7 +6,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -15,7 +15,7 @@ // | Authors: Shane Caraveo | // +----------------------------------------------------------------------+ // -// $Id: client_round2_run.php,v 1.4 2004/02/11 16:13:15 dmitry Exp $ +// $Id: client_round2_run.php,v 1.4.4.2 2006/01/01 13:27:13 sniper Exp $ // set_time_limit(0); diff --git a/ext/soap/interop/server_round2_base.php b/ext/soap/interop/server_round2_base.php index ffccebd12..c1f244266 100644 --- a/ext/soap/interop/server_round2_base.php +++ b/ext/soap/interop/server_round2_base.php @@ -7,7 +7,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -17,7 +17,7 @@ // | Authors: Dietrich Ayala Original Author | // +----------------------------------------------------------------------+ // -// $Id: server_round2_base.php,v 1.7 2004/02/05 20:26:03 dmitry Exp $ +// $Id: server_round2_base.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $ // class SOAP_Interop_Base { diff --git a/ext/soap/interop/server_round2_groupB.php b/ext/soap/interop/server_round2_groupB.php index 30e75987c..89ae819cb 100644 --- a/ext/soap/interop/server_round2_groupB.php +++ b/ext/soap/interop/server_round2_groupB.php @@ -7,7 +7,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -17,7 +17,7 @@ // | Authors: Dietrich Ayala Original Author | // +----------------------------------------------------------------------+ // -// $Id: server_round2_groupB.php,v 1.7 2004/02/05 20:26:03 dmitry Exp $ +// $Id: server_round2_groupB.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $ // class SOAP_Interop_GroupB { diff --git a/ext/soap/interop/server_round2_groupC.php b/ext/soap/interop/server_round2_groupC.php index 42f5f8ae2..065b6f33d 100644 --- a/ext/soap/interop/server_round2_groupC.php +++ b/ext/soap/interop/server_round2_groupC.php @@ -7,7 +7,7 @@ // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | +// | available through the world-wide-web at | // | http://www.php.net/license/2_02.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 | @@ -16,7 +16,7 @@ // | Authors: Shane Caraveo | // +----------------------------------------------------------------------+ // -// $Id: server_round2_groupC.php,v 1.7 2004/02/13 10:29:55 dmitry Exp $ +// $Id: server_round2_groupC.php,v 1.7.4.2 2006/01/01 13:27:13 sniper Exp $ // class SOAP_Interop_GroupC { diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index fb544dcd4..a9d5467f5 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.103.2.11 2005/11/08 08:30:16 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.13 2006/01/01 12:50:13 sniper Exp $ */ #include @@ -268,7 +268,7 @@ xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr par if (zend_hash_find(ht, "enc_ns", sizeof("enc_ns"), (void **)&zns) == SUCCESS) { enc = get_encoder(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zns), Z_STRVAL_PP(zstype)); } else { - enc = get_encoder(SOAP_GLOBAL(sdl), NULL, Z_STRVAL_PP(zstype)); + enc = get_encoder_ex(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zstype), Z_STRLEN_PP(zstype)); } } } diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h index 3a7d05ba2..c46c700b9 100644 --- a/ext/soap/php_encoding.h +++ b/ext/soap/php_encoding.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.h,v 1.38 2005/08/03 14:07:47 sniper Exp $ */ +/* $Id: php_encoding.h,v 1.38.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_ENCODING_H #define PHP_ENCODING_H diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index cf16a0615..41aaa309f 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.77.2.3 2005/10/12 14:04:02 tony2001 Exp $ */ +/* $Id: php_http.c,v 1.77.2.6 2006/01/01 12:50:13 sniper Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -32,7 +32,7 @@ static int get_http_headers(php_stream *socketd,char **response, int *out_size T static int stream_alive(php_stream *stream TSRMLS_DC) { - int socket; + long socket; char buf; /* maybe better to use: @@ -179,7 +179,9 @@ static php_stream* http_connect(zval* this_ptr, php_url *phpurl, int use_ssl, in php_stream_close(stream); stream = NULL; } - efree(http_headers); + if (http_headers) { + efree(http_headers); + } } /* enable SSL transport layer */ if (stream) { diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h index 773f64de0..1e855232d 100644 --- a/ext/soap/php_http.h +++ b/ext/soap/php_http.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_http.h,v 1.16 2005/08/03 14:07:47 sniper Exp $ */ +/* $Id: php_http.h,v 1.16.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_HTTP_H #define PHP_HTTP_H diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index af48a6527..847726647 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.c,v 1.42 2005/08/03 14:07:47 sniper Exp $ */ +/* $Id: php_packet_soap.c,v 1.42.2.1 2006/01/01 12:50:13 sniper Exp $ */ #include "php_soap.h" diff --git a/ext/soap/php_packet_soap.h b/ext/soap/php_packet_soap.h index b32736df7..97dff61fc 100644 --- a/ext/soap/php_packet_soap.h +++ b/ext/soap/php_packet_soap.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.h,v 1.10 2005/08/03 14:07:47 sniper Exp $ */ +/* $Id: php_packet_soap.h,v 1.10.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_PACKET_SOAP_H #define PHP_PACKET_SOAP_H diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index fe58a28bb..4e8787d1c 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.c,v 1.58.2.2 2005/11/08 08:30:17 dmitry Exp $ */ +/* $Id: php_schema.c,v 1.58.2.4 2006/01/01 12:50:13 sniper Exp $ */ #include "php_soap.h" #include "libxml/uri.h" @@ -232,7 +232,11 @@ int load_schema(sdlCtx *ctx, xmlNodePtr schema TSRMLS_DC) location = get_attribute(trav->properties, "schemaLocation"); if (ns != NULL && tns != NULL && strcmp(ns->children->content,tns->children->content) == 0) { - soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content); + if (location) { + soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content); + } else { + soap_error0(E_ERROR, "Parsing Schema: can't import schema. Namespace must not match the enclosing schema 'targetNamespace'"); + } } if (location) { xmlChar *base = xmlNodeGetBase(trav->doc, trav); diff --git a/ext/soap/php_schema.h b/ext/soap/php_schema.h index 9707cf9a0..e18391b58 100644 --- a/ext/soap/php_schema.h +++ b/ext/soap/php_schema.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.h,v 1.13 2005/08/03 14:07:48 sniper Exp $ */ +/* $Id: php_schema.h,v 1.13.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SCHEMA_H #define PHP_SCHEMA_H diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index cfa1a6df3..7f24a5081 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c,v 1.88.2.2 2005/11/18 11:00:15 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.88.2.5 2006/01/01 12:50:13 sniper Exp $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -410,10 +410,10 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml if (!h->ns && h->element->namens) { h->ns = estrdup(h->element->namens); } - } - if (h->element->name) { - efree(h->name); - h->name = estrdup(h->element->name); + if (h->element->name) { + efree(h->name); + h->name = estrdup(h->element->name); + } } } } @@ -1289,6 +1289,40 @@ static void sdl_deserialize_encoder(encodePtr enc, sdlTypePtr *types, char **in) enc->details.sdl_type = types[i]; enc->to_xml = sdl_guess_convert_xml; enc->to_zval = sdl_guess_convert_zval; + + if (enc->details.sdl_type == NULL) { + int ns_len = strlen(enc->details.ns); + int type_len = strlen(enc->details.type_str); + + if (((ns_len == sizeof(SOAP_1_1_ENC_NAMESPACE)-1 && + memcmp(enc->details.ns, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)-1) == 0) || + (ns_len == sizeof(SOAP_1_2_ENC_NAMESPACE)-1 && + memcmp(enc->details.ns, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)-1) == 0))) { + char *enc_nscat; + int enc_ns_len; + int enc_len; + encodePtr real_enc; + + enc_ns_len = sizeof(XSD_NAMESPACE)-1; + enc_len = enc_ns_len + type_len + 1; + enc_nscat = emalloc(enc_len + 1); + memcpy(enc_nscat, XSD_NAMESPACE, sizeof(XSD_NAMESPACE)-1); + enc_nscat[enc_ns_len] = ':'; + memcpy(enc_nscat+enc_ns_len+1, enc->details.type_str, type_len); + enc_nscat[enc_len] = '\0'; + + real_enc = get_encoder_ex(NULL, enc_nscat, enc_len); + efree(enc_nscat); + if (real_enc) { + enc->to_zval = real_enc->to_zval; + enc->to_xml = real_enc->to_xml; + enc->to_zval_before = real_enc->to_zval_before; + enc->to_xml_before = real_enc->to_xml_before; + enc->to_zval_after = real_enc->to_zval_after; + enc->to_xml_after = real_enc->to_xml_after; + } + } + } } static void sdl_deserialize_soap_body(sdlSoapBindingFunctionBodyPtr body, encodePtr *encoders, sdlTypePtr *types, char **in) diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h index 7fbce10a9..155f819d6 100644 --- a/ext/soap/php_sdl.h +++ b/ext/soap/php_sdl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.h,v 1.37 2005/08/03 14:07:48 sniper Exp $ */ +/* $Id: php_sdl.h,v 1.37.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SDL_H #define PHP_SDL_H diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h index 5a09ce39c..4a521569f 100644 --- a/ext/soap/php_soap.h +++ b/ext/soap/php_soap.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_soap.h,v 1.38 2005/08/03 14:07:48 sniper Exp $ */ +/* $Id: php_soap.h,v 1.38.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 944610fbe..354c9507e 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_xml.c,v 1.25 2005/08/03 14:07:48 sniper Exp $ */ +/* $Id: php_xml.c,v 1.25.2.1 2006/01/01 12:50:13 sniper Exp $ */ #include "php_soap.h" #include "libxml/parser.h" diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h index 8e234fdc3..c30d3ec02 100644 --- a/ext/soap/php_xml.h +++ b/ext/soap/php_xml.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h,v 1.17 2005/08/03 14:07:48 sniper Exp $ */ +/* $Id: php_xml.h,v 1.17.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_SOAP_XML_H #define PHP_SOAP_XML_H diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 75061d7f5..b812c14e1 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Dmitry Stogov | +----------------------------------------------------------------------+ */ -/* $Id: soap.c,v 1.156.2.8 2005/11/07 10:05:35 dmitry Exp $ */ +/* $Id: soap.c,v 1.156.2.11 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1108,7 +1108,7 @@ PHP_FUNCTION(PHP_SOAP_SERVER_CLASS, map) #endif -/* {{{ proto object SoapServer::SoapServer ( mixed wsdl [, array options]) +/* {{{ proto object SoapServer::setPersistence ( int mode ) Sets persistence mode of SoapServer */ PHP_METHOD(SoapServer, setPersistence) { @@ -1805,8 +1805,8 @@ fail: /* }}} */ -/* {{{ proto SoapServer::fault - SoapServer::fault */ +/* {{{ proto SoapServer::fault ( staring code, string string [, string actor [, mixed details [, string name]]] ) + Issue SoapFault indicating an error */ PHP_METHOD(SoapServer, fault) { char *code, *string, *actor=NULL, *name=NULL; @@ -2781,25 +2781,25 @@ PHP_METHOD(SoapClient, __setSoapHeaders) RETURN_NULL(); } - if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) { + if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) { zend_hash_del(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")); - } else if (Z_TYPE_P(headers) == IS_ARRAY || Z_TYPE_P(headers) == IS_OBJECT) { + } else if (Z_TYPE_P(headers) == IS_ARRAY) { zval *default_headers; verify_soap_headers_array(Z_ARRVAL_P(headers) TSRMLS_CC); if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"), (void **) &default_headers)==FAILURE) { add_property_zval(this_ptr, "__default_headers", headers); } - } else if (Z_TYPE_P(headers) == IS_OBJECT && - Z_OBJCE_P(headers) == soap_header_class_entry) { + } else if (Z_TYPE_P(headers) == IS_OBJECT && + Z_OBJCE_P(headers) == soap_header_class_entry) { zval *default_headers; ALLOC_INIT_ZVAL(default_headers); array_init(default_headers); add_next_index_zval(default_headers, headers); add_property_zval(this_ptr, "__default_headers", default_headers); - } else{ - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid SOAP header"); - } + } else{ + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid SOAP header"); + } RETURN_TRUE; } /* }}} */ @@ -2840,7 +2840,7 @@ PHP_METHOD(SoapClient, __setLocation) #ifndef ZEND_ENGINE_2 static void soap_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference) { - pval *object = property_reference->object; + zval *object = property_reference->object; zend_overloaded_element *function_name = (zend_overloaded_element *)property_reference->elements_list->tail->data; char *function = Z_STRVAL(function_name->element); zend_function *builtin_function; diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 056bc69a7..9cff58242 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36 2005/08/03 14:07:51 sniper Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1 2006/01/01 12:50:13 sniper Exp $ */ #if HAVE_SOCKETS diff --git a/ext/sockets/php_sockets_win.c b/ext/sockets/php_sockets_win.c index 6366437d9..2f21f4ae2 100644 --- a/ext/sockets/php_sockets_win.c +++ b/ext/sockets/php_sockets_win.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sockets_win.c,v 1.12 2005/08/03 14:07:51 sniper Exp $ */ +/* $Id: php_sockets_win.c,v 1.12.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifdef PHP_WIN32 diff --git a/ext/sockets/php_sockets_win.h b/ext/sockets/php_sockets_win.h index 6c0e3c192..af2be5601 100644 --- a/ext/sockets/php_sockets_win.h +++ b/ext/sockets/php_sockets_win.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sockets_win.h,v 1.12 2005/08/03 14:07:52 sniper Exp $ */ +/* $Id: php_sockets_win.h,v 1.12.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifdef PHP_WIN32 diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index fa8a12d48..b601efbd1 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.171.2.2 2005/11/03 15:00:51 mike Exp $ */ +/* $Id: sockets.c,v 1.171.2.7 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -112,7 +112,7 @@ static /* {{{ sockets_functions[] */ -function_entry sockets_functions[] = { +zend_function_entry sockets_functions[] = { PHP_FE(socket_select, first_through_third_args_force_ref) PHP_FE(socket_create, NULL) PHP_FE(socket_create_listen, NULL) @@ -861,7 +861,19 @@ PHP_FUNCTION(socket_read) } if (retval == -1) { - PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno); + /* if the socket is in non-blocking mode and there's no data to read, + don't output any error, as this is a normal situation, and not an error */ + if (errno == EAGAIN +#ifdef EWOULDBLOCK + || errno == EWOULDBLOCK +#endif + ) { + php_sock->error = errno; + SOCKETS_G(last_error) = errno; + } else { + PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno); + } + efree(tmpbuf); RETURN_FALSE; } @@ -1482,7 +1494,7 @@ PHP_FUNCTION(socket_sendto) RETURN_FALSE; } - retval = sendto(php_sock->bsd_socket, buf, (len > buf_len) ? buf_len : len, flags, (struct sockaddr *) &sin, sizeof(sin)); + retval = sendto(php_sock->bsd_socket, buf, (len > buf_len) ? buf_len : len, flags, (struct sockaddr *) &sin6, sizeof(sin6)); break; #endif default: @@ -1506,7 +1518,9 @@ PHP_FUNCTION(socket_get_option) zval *arg1; struct linger linger_val; struct timeval tv; +#ifdef PHP_WIN32 int timeout = 0; +#endif socklen_t optlen; php_socket *php_sock; int other_val; @@ -1581,7 +1595,10 @@ PHP_FUNCTION(socket_set_option) struct linger lv; struct timeval tv; php_socket *php_sock; - int ov, optlen, retval, timeout; + int ov, optlen, retval; +#ifdef PHP_WIN32 + int timeout; +#endif long level, optname; void *opt_ptr; diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index ffb13e6af..86589f744 100644 --- a/ext/sockets/unix_socket_constants.h +++ b/ext/sockets/unix_socket_constants.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unix_socket_constants.h,v 1.5 2005/08/03 14:07:52 sniper Exp $ */ +/* $Id: unix_socket_constants.h,v 1.5.2.1 2006/01/01 12:50:13 sniper Exp $ */ /* This file is to be included by sockets.c */ diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index 533ac292a..c3de6bd48 100644 --- a/ext/sockets/win32_socket_constants.h +++ b/ext/sockets/win32_socket_constants.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: win32_socket_constants.h,v 1.5 2005/08/03 14:07:52 sniper Exp $ */ +/* $Id: win32_socket_constants.h,v 1.5.2.1 2006/01/01 12:50:13 sniper Exp $ */ /* This file is to be included by sockets.c */ diff --git a/ext/spl/config.m4 b/ext/spl/config.m4 index 318ff1694..470b89d8e 100755 --- a/ext/spl/config.m4 +++ b/ext/spl/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.13.2.1 2005/10/01 15:46:31 helly Exp $ +dnl $Id: config.m4,v 1.13.2.4 2006/01/06 14:03:37 sniper Exp $ dnl config.m4 for extension SPL PHP_ARG_ENABLE(spl, enable SPL suppport, @@ -8,6 +8,26 @@ if test "$PHP_SPL" != "no"; then if test "$ext_shared" = "yes"; then AC_MSG_ERROR(Cannot build SPL as a shared module) fi + AC_MSG_CHECKING(whether zend_object_value is packed) + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS" + AC_TRY_RUN([ +#include "Zend/zend_types.h" +int main(int argc, char **argv) { + return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1; +} + ], [ + ac_result=1 + AC_MSG_RESULT(yes) + ],[ + ac_result=0 + AC_MSG_RESULT(no) + ], [ + ac_result=0 + AC_MSG_RESULT(no) + ]) + CPPFLAGS=$old_CPPFLAGS + AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed]) AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support]) PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, $ext_shared) fi diff --git a/ext/spl/examples/directorygraphiterator.inc b/ext/spl/examples/directorygraphiterator.inc index a875352f4..89f3de66b 100644 --- a/ext/spl/examples/directorygraphiterator.inc +++ b/ext/spl/examples/directorygraphiterator.inc @@ -12,13 +12,13 @@ /** @ingroup Examples * @brief A tree iterator that only shows directories. * @author Marcus Boerger - * @version 1.0 + * @version 1.1 */ class DirectoryGraphIterator extends DirectoryTreeIterator { function __construct($path) { - RecursiveIteratorIterator::__construct(new RecursiveCachingIterator(new ParentIterator(new RecursiveDirectoryIterator($path)), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); + RecursiveIteratorIterator::__construct(new RecursiveCachingIterator(new ParentIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME)), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); } } diff --git a/ext/spl/examples/directorytreeiterator.inc b/ext/spl/examples/directorytreeiterator.inc index 654be428f..3036a23a4 100644 --- a/ext/spl/examples/directorytreeiterator.inc +++ b/ext/spl/examples/directorytreeiterator.inc @@ -12,7 +12,7 @@ /** @ingroup Examples * @brief DirectoryIterator to generate ASCII graphic directory trees * @author Marcus Boerger - * @version 1.0 + * @version 1.1 */ class DirectoryTreeIterator extends RecursiveIteratorIterator { @@ -21,7 +21,7 @@ class DirectoryTreeIterator extends RecursiveIteratorIterator */ function __construct($path) { - parent::__construct(new RecursiveCachingIterator(new RecursiveDirectoryIterator($path), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); + parent::__construct(new RecursiveCachingIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); } /** @return the current element prefixed with ASCII graphics diff --git a/ext/spl/examples/nocvsdir.php b/ext/spl/examples/nocvsdir.php index 121731416..e14ad74f4 100755 --- a/ext/spl/examples/nocvsdir.php +++ b/ext/spl/examples/nocvsdir.php @@ -4,7 +4,8 @@ * @brief Program Dir without CVS subdirs * @ingroup Examples * @author Marcus Boerger - * @date 2003 - 2005 + * @date 2003 - 2006 + * @version 1.1 * * Usage: php nocvsdir.php \ * @@ -37,10 +38,10 @@ class NoCvsDirectory extends RecursiveFilterIterator { return $this->getInnerIterator()->getFilename() != 'CVS'; } - + function getChildren() { - return new NoCvsDirectory($this->current()->getPathName()); + return new NoCvsDirectory($this->key()); } } diff --git a/ext/spl/internal/iteratoriterator.inc b/ext/spl/internal/iteratoriterator.inc index c76412ed0..60786927b 100755 --- a/ext/spl/internal/iteratoriterator.inc +++ b/ext/spl/internal/iteratoriterator.inc @@ -56,7 +56,7 @@ class IteratorIterator implements OuterIterator } else { - throw new Exception("Classes that only implement Traversable can be wrapped only after converting class IteratorItaerator into c code"); + throw new Exception("Classes that only implement Traversable can be wrapped only after converting class IteratorIterator into c code"); } } @@ -118,4 +118,4 @@ class IteratorIterator implements OuterIterator private $iterator; } -?> \ No newline at end of file +?> diff --git a/ext/spl/internal/limititerator.inc b/ext/spl/internal/limititerator.inc index b87f3c586..c135e031d 100755 --- a/ext/spl/internal/limititerator.inc +++ b/ext/spl/internal/limititerator.inc @@ -32,7 +32,7 @@ class LimitIterator implements OuterIterator * * @param it Iterator to limit * @param offset Offset to first element - * @param count Maximum number of elements to show or NULL for all + * @param count Maximum number of elements to show or -1 for all */ function __construct(Iterator $it, $offset = 0, $count = -1) { diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 0c6fe462e..ca59dba27 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c,v 1.52.2.15 2005/11/07 13:08:24 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.25 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -45,7 +45,7 @@ ZEND_DECLARE_MODULE_GLOBALS(spl) /* {{{ spl_functions_none */ -function_entry spl_functions_none[] = { +zend_function_entry spl_functions_none[] = { {NULL, NULL, NULL} }; /* }}} */ @@ -83,7 +83,7 @@ static zend_class_entry * spl_find_ce_by_name(char *name, int len, zend_bool aut return *ce; } -/* {{{ array class_parents(object instance) +/* {{{ proto array class_parents(object instance) Return an array containing the names of all parent classes */ PHP_FUNCTION(class_parents) { @@ -183,10 +183,12 @@ PHP_FUNCTION(class_implements) SPL_ADD_CLASS(RuntimeException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SeekableIterator, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SimpleXMLIterator, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplFileInfo, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplFileObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplObjectStorage, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplObserver, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(SplSubject, z_list, sub, allow, ce_flags); \ + SPL_ADD_CLASS(SplTempFileObject, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnderflowException, z_list, sub, allow, ce_flags); \ SPL_ADD_CLASS(UnexpectedValueException, z_list, sub, allow, ce_flags); \ @@ -244,7 +246,7 @@ int spl_autoload(const char *class_name, const char * lc_name, int class_name_le return 0; } /* }}} */ -/* {{{ void spl_autoload(string class_name [, string file_extensions]) +/* {{{ proto void spl_autoload(string class_name [, string file_extensions]) Default implementation for __autoload() */ PHP_FUNCTION(spl_autoload) { @@ -300,7 +302,7 @@ PHP_FUNCTION(spl_autoload) } } /* }}} */ -/* {{{ void string spl_autoload_extensions([string file_extensions]) +/* {{{ proto string spl_autoload_extensions([string file_extensions]) Register and return default file extensions for spl_autoload */ PHP_FUNCTION(spl_autoload_extensions) { @@ -334,11 +336,12 @@ static void autoload_func_info_dtor(autoload_func_info *alfi) } } -/* {{{ void spl_autoload_call(string class_name) +/* {{{ proto void spl_autoload_call(string class_name) Try all registerd autoload function to load the requested class */ PHP_FUNCTION(spl_autoload_call) { zval **class_name, *retval = NULL; + int class_name_len; char *func_name, *lc_name; uint func_name_len; ulong dummy; @@ -350,7 +353,8 @@ PHP_FUNCTION(spl_autoload_call) } if (SPL_G(autoload_functions)) { - lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name)); + class_name_len = Z_STRLEN_PP(class_name); + lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), class_name_len); zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos); while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS && !EG(exception)) { zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos); @@ -359,7 +363,7 @@ PHP_FUNCTION(spl_autoload_call) if (retval) { zval_ptr_dtor(&retval); } - if (zend_hash_exists(EG(class_table), lc_name, Z_STRLEN_PP(class_name)+1)) { + if (zend_hash_exists(EG(class_table), lc_name, class_name_len + 1)) { break; } zend_hash_move_forward_ex(SPL_G(autoload_functions), &function_pos); @@ -371,7 +375,7 @@ PHP_FUNCTION(spl_autoload_call) } } /* }}} */ -/* {{{ void spl_autoload_register([string autoload_function = "spl_autoload" [, throw = true]]) +/* {{{ proto void spl_autoload_register([string autoload_function = "spl_autoload" [, throw = true]]) Register given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_register) { @@ -391,9 +395,7 @@ PHP_FUNCTION(spl_autoload_register) if (ZEND_NUM_ARGS()) { if (Z_TYPE_P(zcallable) == IS_STRING) { if (Z_STRLEN_P(zcallable) == sizeof("spl_autoload_call") - 1) { - char tmp_name[sizeof("spl_autoload_call")]; - zend_str_tolower_copy(tmp_name, Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable)); - if (!strcmp(tmp_name, "spl_autoload_call")) { + if (!zend_binary_strcasecmp(Z_STRVAL_P(zcallable), sizeof("spl_autoload_call"), "spl_autoload_call", sizeof("spl_autoload_call"))) { if (do_throw) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function spl_autoload_call() cannot be registered"); } @@ -402,7 +404,7 @@ PHP_FUNCTION(spl_autoload_register) } } - if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_IS_STATIC, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { + if (!zend_is_callable_ex(zcallable, IS_CALLABLE_STRICT, &func_name, &func_name_len, &alfi.ce, &alfi.func_ptr, &obj_ptr TSRMLS_CC)) { if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { @@ -412,19 +414,19 @@ PHP_FUNCTION(spl_autoload_register) return; } else if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify a callable %smethod", !obj_ptr ? "static " : ""); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } efree(func_name); return; } else if (Z_TYPE_P(zcallable) == IS_STRING) { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not found", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%s' not %s", func_name, alfi.func_ptr ? "callable" : "found"); } efree(func_name); return; } else { if (do_throw) { - zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed", func_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed"); } efree(func_name); return; @@ -469,7 +471,7 @@ PHP_FUNCTION(spl_autoload_register) } } /* }}} */ -/* {{{ bool spl_autoload_unregister(string autoload_function) +/* {{{ proto bool spl_autoload_unregister(string autoload_function) Unregister given function as __autoload() implementation */ PHP_FUNCTION(spl_autoload_unregister) { @@ -511,7 +513,7 @@ PHP_FUNCTION(spl_autoload_unregister) RETURN_BOOL(success == SUCCESS); } /* }}} */ -/* {{{ false|array spl_autoload_functions() +/* {{{ proto false|array spl_autoload_functions() Return all registered __autoload() functionns */ PHP_FUNCTION(spl_autoload_functions) { @@ -598,7 +600,7 @@ PHP_MINFO_FUNCTION(spl) /* {{{ spl_functions */ -function_entry spl_functions[] = { +zend_function_entry spl_functions[] = { PHP_FE(spl_classes, NULL) PHP_FE(spl_autoload, NULL) PHP_FE(spl_autoload_extensions, NULL) diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index e70931e47..4e8c9b3f7 100755 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 7ef1fd1a9..8becf1a1e 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.71.2.6 2005/11/14 22:03:01 tony2001 Exp $ */ +/* $Id: spl_array.c,v 1.71.2.7 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h index f9a8a53b8..554964420 100755 --- a/ext/spl/spl_array.h +++ b/ext/spl/spl_array.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.h,v 1.13.2.1 2005/09/18 17:15:04 helly Exp $ */ +/* $Id: spl_array.h,v 1.13.2.2 2006/01/01 12:50:13 sniper Exp $ */ #ifndef SPL_ARRAY_H #define SPL_ARRAY_H diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 8cef99f10..25396603f 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.3 2005/11/27 12:16:14 helly Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.10 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -45,21 +45,30 @@ #include "ext/standard/php_filestat.h" /* declare the class handlers */ -static zend_object_handlers spl_ce_dir_handlers; +static zend_object_handlers spl_filesystem_object_handlers; /* decalre the class entry */ +PHPAPI zend_class_entry *spl_ce_SplFileInfo; PHPAPI zend_class_entry *spl_ce_DirectoryIterator; PHPAPI zend_class_entry *spl_ce_RecursiveDirectoryIterator; PHPAPI zend_class_entry *spl_ce_SplFileObject; +PHPAPI zend_class_entry *spl_ce_SplTempFileObject; -static zend_object_value spl_file_object_new_ex(zend_class_entry *class_type, spl_file_object **obj TSRMLS_DC); -static int spl_file_object_open(spl_file_object *intern, int use_include_path, int silent TSRMLS_DC); +static void spl_filesystem_file_free_line(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ +{ + if (intern->u.file.current_line) { + efree(intern->u.file.current_line); + intern->u.file.current_line = NULL; + } + if (intern->u.file.current_zval) { + zval_ptr_dtor(&intern->u.file.current_zval); + intern->u.file.current_zval = NULL; + } +} /* }}} */ -/* {{{ spl_ce_dir_object_free_storage */ -/* close all resources and the memory allocated for the object */ -static void spl_ce_dir_object_free_storage(void *object TSRMLS_DC) +static void spl_filesystem_object_free_storage(void *object TSRMLS_DC) /* {{{ */ { - spl_ce_dir_object *intern = (spl_ce_dir_object *)object; + spl_filesystem_object *intern = (spl_filesystem_object*)object; zend_hash_destroy(intern->std.properties); FREE_HASHTABLE(intern->std.properties); @@ -67,19 +76,39 @@ static void spl_ce_dir_object_free_storage(void *object TSRMLS_DC) if (intern->path) { efree(intern->path); } - if (intern->dirp) { - php_stream_close(intern->dirp); - } - if (intern->path_name) { - efree(intern->path_name); + if (intern->file_name) { + efree(intern->file_name); } - if (intern->sub_path) { - efree(intern->sub_path); + switch(intern->type) { + case SPL_FS_INFO: + break; + case SPL_FS_DIR: + if (intern->u.dir.dirp) { + php_stream_close(intern->u.dir.dirp); + } + if (intern->u.dir.sub_path) { + efree(intern->u.dir.sub_path); + } + break; + case SPL_FS_FILE: + if (intern->u.file.stream) { + if (intern->u.file.zcontext) { +/* zend_list_delref(Z_RESVAL_P(intern->zcontext));*/ + } + if (!intern->u.file.stream->is_persistent) { + php_stream_free(intern->u.file.stream, PHP_STREAM_FREE_CLOSE); + } else { + php_stream_free(intern->u.file.stream, PHP_STREAM_FREE_CLOSE_PERSISTENT); + } + if (intern->u.file.open_mode) { + efree(intern->u.file.open_mode); + } + } + spl_filesystem_file_free_line(intern TSRMLS_CC); + break; } efree(object); -} -/* }}} */ - +} /* }}} */ /* {{{ spl_ce_dir_object_new */ /* creates the object by @@ -92,82 +121,149 @@ static void spl_ce_dir_object_free_storage(void *object TSRMLS_DC) - clone - new */ -static zend_object_value spl_ce_dir_object_new_ex(zend_class_entry *class_type, spl_ce_dir_object **obj TSRMLS_DC) +static zend_object_value spl_filesystem_object_new_ex(zend_class_entry *class_type, spl_filesystem_object **obj TSRMLS_DC) { zend_object_value retval; - spl_ce_dir_object *intern; + spl_filesystem_object *intern; zval *tmp; - intern = emalloc(sizeof(spl_ce_dir_object)); - memset(intern, 0, sizeof(spl_ce_dir_object)); + intern = emalloc(sizeof(spl_filesystem_object)); + memset(intern, 0, sizeof(spl_filesystem_object)); intern->std.ce = class_type; + /* intern->type = SPL_FS_INFO; done by set o */ + intern->file_class = spl_ce_SplFileObject; + intern->info_class = spl_ce_SplFileInfo; if (obj) *obj = intern; ALLOC_HASHTABLE(intern->std.properties); zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); 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_ce_dir_object_free_storage, NULL TSRMLS_CC); - retval.handlers = &spl_ce_dir_handlers; + retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_filesystem_object_free_storage, NULL TSRMLS_CC); + retval.handlers = &spl_filesystem_object_handlers; return retval; } /* }}} */ - -/* {{{ spl_ce_dir_object_new */ -/* See spl_ce_dir_object_new_ex */ -static zend_object_value spl_ce_dir_object_new(zend_class_entry *class_type TSRMLS_DC) +/* {{{ spl_filesystem_object_new */ +/* See spl_filesystem_object_new_ex */ +static zend_object_value spl_filesystem_object_new(zend_class_entry *class_type TSRMLS_DC) { - return spl_ce_dir_object_new_ex(class_type, NULL TSRMLS_CC); + return spl_filesystem_object_new_ex(class_type, NULL TSRMLS_CC); } /* }}} */ -/* {{{ spl_ce_dir_open */ +static inline void spl_filesystem_object_get_file_name(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ +{ + if (!intern->file_name) { + switch (intern->type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Object not initialized"); + break; + case SPL_FS_DIR: + intern->file_name_len = spprintf(&intern->file_name, 0, "%s/%s", intern->path, intern->u.dir.entry.d_name); + break; + } + } +} /* }}} */ + +/* {{{ spl_filesystem_dir_open */ /* open a directory resource */ -static void spl_ce_dir_open(spl_ce_dir_object* intern, char *path TSRMLS_DC) +static void spl_filesystem_dir_open(spl_filesystem_object* intern, char *path TSRMLS_DC) { - int path_len = strlen(path); - - intern->dirp = php_stream_opendir(path, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); + intern->type = SPL_FS_DIR; + intern->path_len = strlen(path); + intern->u.dir.dirp = php_stream_opendir(path, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); - if (path_len && (path[path_len-1] == '/' || path[path_len-1] == '\\')) { - intern->path = estrndup(path, --path_len); + if (intern->path_len && (path[intern->path_len-1] == '/' || path[intern->path_len-1] == '\\')) { + intern->path = estrndup(path, --intern->path_len); } else { - intern->path = estrndup(path, path_len); + intern->path = estrndup(path, intern->path_len); } - intern->index = 0; + intern->u.dir.index = 0; - if (intern->dirp == NULL) { + if (intern->u.dir.dirp == NULL) { /* throw exception: should've been already happened */ - intern->entry.d_name[0] = '\0'; + intern->u.dir.entry.d_name[0] = '\0'; } else { - if (!php_stream_readdir(intern->dirp, &intern->entry)) { - intern->entry.d_name[0] = '\0'; + if (!php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) { + intern->u.dir.entry.d_name[0] = '\0'; } } } /* }}} */ -/* {{{ spl_ce_dir_object_clone */ +static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_include_path, int silent TSRMLS_DC) /* {{{ */ +{ + intern->type = SPL_FS_FILE; + intern->u.file.context = php_stream_context_from_zval(intern->u.file.zcontext, 0); + intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, intern->u.file.context); + + if (intern->u.file.stream == NULL) { + if (!EG(exception)) { + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); + } + intern->file_name = NULL; /* until here it is not a copy */ + intern->u.file.open_mode = NULL; + return FAILURE; + } + + if (intern->u.file.zcontext) { + zend_list_addref(Z_RESVAL_P(intern->u.file.zcontext)); + } + + intern->file_name = estrndup(intern->file_name, intern->file_name_len); + intern->u.file.open_mode = estrndup(intern->u.file.open_mode, intern->u.file.open_mode_len); + + /* avoid reference counting in debug mode, thus do it manually */ + ZVAL_RESOURCE(&intern->u.file.zresource, php_stream_get_resource_id(intern->u.file.stream)); + intern->u.file.zresource.refcount = 1; + + zend_hash_find(&intern->std.ce->function_table, "getcurrentline", sizeof("getcurrentline"), (void **) &intern->u.file.func_getCurr); + + return SUCCESS; +} /* }}} */ + +/* {{{ spl_filesystem_object_clone */ /* Local zend_object_value creation (on stack) Load the 'other' object - Create a new empty object (See spl_ce_dir_object_new_ex) + Create a new empty object (See spl_filesystem_object_new_ex) Open the directory Clone other members (properties) */ -static zend_object_value spl_ce_dir_object_clone(zval *zobject TSRMLS_DC) +static zend_object_value spl_filesystem_object_clone(zval *zobject TSRMLS_DC) { zend_object_value new_obj_val; zend_object *old_object; zend_object *new_object; zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); - spl_ce_dir_object *intern; + spl_filesystem_object *intern; + spl_filesystem_object *source; old_object = zend_objects_get_address(zobject TSRMLS_CC); - new_obj_val = spl_ce_dir_object_new_ex(old_object->ce, &intern TSRMLS_CC); + source = (spl_filesystem_object*)old_object; + + new_obj_val = spl_filesystem_object_new_ex(old_object->ce, &intern TSRMLS_CC); new_object = &intern->std; - spl_ce_dir_open(intern, ((spl_ce_dir_object*)old_object)->path TSRMLS_CC); + switch (source->type) { + case SPL_FS_INFO: + source->path_len = source->path_len; + source->path = estrndup(source->path, source->path_len); + intern->file_name_len = source->file_name_len; + intern->file_name = estrndup(source->file_name, intern->file_name_len); + break; + case SPL_FS_DIR: + spl_filesystem_dir_open(intern, source->path TSRMLS_CC); + break; + case SPL_FS_FILE: + php_error_docref(NULL TSRMLS_CC, E_ERROR, "An object of class %s cannot be cloned", old_object->ce->name); + break; + } + + intern->file_class = source->file_class; + intern->info_class = source->info_class; zend_objects_clone_members(new_object, new_obj_val, old_object, handle TSRMLS_CC); @@ -175,19 +271,117 @@ static zend_object_value spl_ce_dir_object_clone(zval *zobject TSRMLS_DC) } /* }}} */ +void spl_filesystem_info_set_filename(spl_filesystem_object *intern, char *path, int len, int use_copy TSRMLS_DC) /* {{{ */ +{ + char *p1, *p2; + + intern->file_name = use_copy ? estrndup(path, len) : path; + intern->file_name_len = len; + + p1 = strrchr(path, '/'); + p2 = strrchr(path, '\\'); + if (p1 || p2) { + intern->path_len = (p1 > p2 ? p1 : p2) - path; + } else { + intern->path_len = 0; + } + intern->path = estrndup(path, intern->path_len); +} /* }}} */ + +static spl_filesystem_object * spl_filesystem_object_create_info(spl_filesystem_object *source, char *file_path, int file_path_len, int use_copy, zend_class_entry *ce, zval *return_value TSRMLS_DC) /* {{{ */ +{ + spl_filesystem_object *intern; + + if (!file_path || !file_path_len) { + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); + if (file_path && !use_copy) + { + efree(file_path); + } + return NULL; + } + + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + + return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce : source->info_class, &intern TSRMLS_CC); + Z_TYPE_P(return_value) = IS_OBJECT; + + spl_filesystem_info_set_filename(intern, file_path, file_path_len, use_copy TSRMLS_CC); + + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + + return intern; +} /* }}} */ + +static spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_filesystem_object *source, int type, zend_class_entry *ce, zval *return_value TSRMLS_DC) /* {{{ */ +{ + spl_filesystem_object *intern; + zend_bool use_include_path = 0; + + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + + switch (source->type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + break; + case SPL_FS_DIR: + if (!source->u.dir.entry.d_name[0]) { + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Could not open file"); + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + return NULL; + } + } + + switch (type) { + case SPL_FS_INFO: + return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce : source->info_class, &intern TSRMLS_CC); + Z_TYPE_P(return_value) = IS_OBJECT; + + spl_filesystem_object_get_file_name(source TSRMLS_CC); + intern->file_name = estrndup(source->file_name, source->file_name_len); + intern->file_name_len = source->file_name_len; + break; + case SPL_FS_FILE: + return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce : source->file_class, &intern TSRMLS_CC); + Z_TYPE_P(return_value) = IS_OBJECT; + + spl_filesystem_object_get_file_name(source TSRMLS_CC); + intern->file_name = source->file_name; + intern->file_name_len = source->file_name_len; + + intern->u.file.open_mode = "r"; + intern->u.file.open_mode_len = 1; + + if (ht && zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sbr", + &intern->u.file.open_mode, &intern->u.file.open_mode_len, + &use_include_path, &intern->u.file.zcontext) == FAILURE) { + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + intern->u.file.open_mode = NULL; + zval_dtor(return_value); + Z_TYPE_P(return_value) = IS_NULL; + return NULL; + } + + if (spl_filesystem_file_open(intern, use_include_path, 0 TSRMLS_CC) == FAILURE) { + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zval_dtor(return_value); + Z_TYPE_P(return_value) = IS_NULL; + return NULL; + } + case SPL_FS_DIR: + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Operation not supported"); + return NULL; + } + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + return NULL; +} /* }}} */ + /* {{{ proto void DirectoryIterator::__construct(string path) Cronstructs a new dir iterator from a path. */ -/* php_set_error_handling() is used to throw exceptions in case - the constructor fails. Here we use this to ensure the object - has a valid directory resource. - - When the constructor gets called the object is already created - by the engine, so we must only call 'additional' initializations. - */ SPL_METHOD(DirectoryIterator, __construct) { - zval *object = getThis(); - spl_ce_dir_object *intern; + spl_filesystem_object *intern; char *path; int len; @@ -198,8 +392,10 @@ SPL_METHOD(DirectoryIterator, __construct) return; } - intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); - spl_ce_dir_open(intern, path TSRMLS_CC); + intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_dir_open(intern, path TSRMLS_CC); + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; + intern->flags = 0; php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } @@ -209,15 +405,14 @@ SPL_METHOD(DirectoryIterator, __construct) Rewind dir back to the start */ SPL_METHOD(DirectoryIterator, rewind) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - intern->index = 0; - if (intern->dirp) { - php_stream_rewinddir(intern->dirp); + intern->u.dir.index = 0; + if (intern->u.dir.dirp) { + php_stream_rewinddir(intern->u.dir.dirp); } - if (!intern->dirp || !php_stream_readdir(intern->dirp, &intern->entry)) { - intern->entry.d_name[0] = '\0'; + if (!intern->u.dir.dirp || !php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) { + intern->u.dir.entry.d_name[0] = '\0'; } } /* }}} */ @@ -226,11 +421,10 @@ SPL_METHOD(DirectoryIterator, rewind) Return current dir entry */ SPL_METHOD(DirectoryIterator, key) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (intern->dirp) { - RETURN_LONG(intern->index); + if (intern->u.dir.dirp) { + RETURN_LONG(intern->u.dir.index); } else { RETURN_FALSE; } @@ -249,16 +443,15 @@ SPL_METHOD(DirectoryIterator, current) Move to next entry */ SPL_METHOD(DirectoryIterator, next) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - intern->index++; - if (!intern->dirp || !php_stream_readdir(intern->dirp, &intern->entry)) { - intern->entry.d_name[0] = '\0'; + intern->u.dir.index++; + if (!intern->u.dir.dirp || !php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) { + intern->u.dir.entry.d_name[0] = '\0'; } - if (intern->path_name) { - efree(intern->path_name); - intern->path_name = NULL; + if (intern->file_name) { + efree(intern->file_name); + intern->file_name = NULL; } } /* }}} */ @@ -267,67 +460,97 @@ SPL_METHOD(DirectoryIterator, next) Check whether dir contains more entries */ SPL_METHOD(DirectoryIterator, valid) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_BOOL(intern->entry.d_name[0] != '\0'); + RETURN_BOOL(intern->u.dir.entry.d_name[0] != '\0'); } /* }}} */ -/* {{{ proto string DirectoryIterator::getPath() - Return directory path */ -SPL_METHOD(DirectoryIterator, getPath) +/* {{{ proto string SplFileInfo::getPath() + Return the path */ +SPL_METHOD(SplFileInfo, getPath) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); RETURN_STRING(intern->path, 1); } /* }}} */ +/* {{{ proto string SplFileInfo::getFilename() + Return filename only */ +SPL_METHOD(SplFileInfo, getFilename) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + + if (intern->path_len) { + RETURN_STRINGL(intern->file_name + intern->path_len + 1, intern->file_name_len - (intern->path_len + 1), 1); + } else { + RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); + } +} +/* }}} */ + /* {{{ proto string DirectoryIterator::getFilename() Return filename of current dir entry */ SPL_METHOD(DirectoryIterator, getFilename) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_STRING(intern->entry.d_name, 1); + RETURN_STRING(intern->u.dir.entry.d_name, 1); } /* }}} */ -static inline void spl_dir_get_path_name(spl_ce_dir_object *intern) +/* {{{ proto string SplFileInfo::getPathname() + Return path and filename */ +SPL_METHOD(SplFileInfo, getPathname) { - if (!intern->path_name) { - intern->path_name_len = spprintf(&intern->path_name, 0, "%s/%s", intern->path, intern->entry.d_name); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + + switch (intern->type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); + case SPL_FS_DIR: + if (intern->u.dir.entry.d_name[0]) { + spl_filesystem_object_get_file_name(intern TSRMLS_CC); + RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); + } } + RETURN_BOOL(0); } +/* }}} */ -/* {{{ proto string DirectoryIterator::getPathname() - Return path and filename of current dir entry */ -SPL_METHOD(DirectoryIterator, getPathname) +/* {{{ proto string RecursiveDirectoryIterator::key() + Return getPathname() or getFilename() depending on flags */ +SPL_METHOD(RecursiveDirectoryIterator, key) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (intern->entry.d_name[0]) { - spl_dir_get_path_name(intern); - RETURN_STRINGL(intern->path_name, intern->path_name_len, 1); + if (intern->flags & SPL_FILE_DIR_KEY_AS_FILENAME) { + RETURN_STRING(intern->u.dir.entry.d_name, 1); } else { - RETURN_BOOL(0); + spl_filesystem_object_get_file_name(intern TSRMLS_CC); + RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); } } /* }}} */ -/* {{{ proto string RecursiveDirectoryIterator::key() - Return path and filename of current dir entry */ -SPL_METHOD(RecursiveDirectoryIterator, key) +/* {{{ proto string RecursiveDirectoryIterator::current() + Return getFilename(), getFileInfo() or $this depending on flags */ +SPL_METHOD(RecursiveDirectoryIterator, current) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - spl_dir_get_path_name(intern); - RETURN_STRINGL(intern->path_name, intern->path_name_len, 1); + if (intern->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) { + spl_filesystem_object_get_file_name(intern TSRMLS_CC); + RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); + } else if (intern->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) { + spl_filesystem_object_get_file_name(intern TSRMLS_CC); + spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, return_value TSRMLS_CC); + } else { + RETURN_ZVAL(getThis(), 1, 0); + /*RETURN_STRING(intern->u.dir.entry.d_name, 1);*/ + } } /* }}} */ @@ -335,159 +558,235 @@ SPL_METHOD(RecursiveDirectoryIterator, key) Returns true if current entry is '.' or '..' */ SPL_METHOD(DirectoryIterator, isDot) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + + RETURN_BOOL(!strcmp(intern->u.dir.entry.d_name, ".") || !strcmp(intern->u.dir.entry.d_name, "..")); +} +/* }}} */ + +/* {{{ proto void SplFileInfo::__construct(string file_name) + Cronstructs a new SplFileInfo from a path. */ +/* php_set_error_handling() is used to throw exceptions in case + the constructor fails. Here we use this to ensure the object + has a valid directory resource. + + When the constructor gets called the object is already created + by the engine, so we must only call 'additional' initializations. + */ +SPL_METHOD(SplFileInfo, __construct) +{ + spl_filesystem_object *intern; + char *path; + int len; + + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + return; + } - RETURN_BOOL(!strcmp(intern->entry.d_name, ".") || !strcmp(intern->entry.d_name, "..")); + intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + + spl_filesystem_info_set_filename(intern, path, len, 1 TSRMLS_CC); + + /* intern->type = SPL_FS_INFO; already set */ + + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ -/* {{{ DirectoryFunction */ -#define DirectoryFunction(func_name, func_num) \ -SPL_METHOD(DirectoryIterator, func_name) \ +/* {{{ FileInfoFunction */ +#define FileInfoFunction(func_name, func_num) \ +SPL_METHOD(SplFileInfo, func_name) \ { \ - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ \ - spl_dir_get_path_name(intern); \ - php_stat(intern->path_name, intern->path_name_len, func_num, return_value TSRMLS_CC); \ + spl_filesystem_object_get_file_name(intern TSRMLS_CC); \ + php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \ } /* }}} */ -/* {{{ proto int DirectoryIterator::getPerms() +/* {{{ proto int SplFileInfo::getPerms() Get file permissions */ -DirectoryFunction(getPerms, FS_PERMS) +FileInfoFunction(getPerms, FS_PERMS) /* }}} */ -/* {{{ proto int DirectoryIterator::getInode() +/* {{{ proto int SplFileInfo::getInode() Get file inode */ -DirectoryFunction(getInode, FS_INODE) +FileInfoFunction(getInode, FS_INODE) /* }}} */ -/* {{{ proto int DirectoryIterator::getSize() +/* {{{ proto int SplFileInfo::getSize() Get file size */ -DirectoryFunction(getSize, FS_SIZE) +FileInfoFunction(getSize, FS_SIZE) /* }}} */ -/* {{{ proto int DirectoryIterator::getOwner() +/* {{{ proto int SplFileInfo::getOwner() Get file owner */ -DirectoryFunction(getOwner, FS_OWNER) +FileInfoFunction(getOwner, FS_OWNER) /* }}} */ -/* {{{ proto int DirectoryIterator::getGroup() +/* {{{ proto int SplFileInfo::getGroup() Get file group */ -DirectoryFunction(getGroup, FS_GROUP) +FileInfoFunction(getGroup, FS_GROUP) /* }}} */ -/* {{{ proto int DirectoryIterator::getATime() +/* {{{ proto int SplFileInfo::getATime() Get last access time of file */ -DirectoryFunction(getATime, FS_ATIME) +FileInfoFunction(getATime, FS_ATIME) /* }}} */ -/* {{{ proto int DirectoryIterator::getMTime() +/* {{{ proto int SplFileInfo::getMTime() Get last modification time of file */ -DirectoryFunction(getMTime, FS_MTIME) +FileInfoFunction(getMTime, FS_MTIME) /* }}} */ -/* {{{ proto int DirectoryIterator::getCTime() +/* {{{ proto int SplFileInfo::getCTime() Get inode modification time of file */ -DirectoryFunction(getCTime, FS_CTIME) +FileInfoFunction(getCTime, FS_CTIME) /* }}} */ -/* {{{ proto string DirectoryIterator::getType() +/* {{{ proto string SplFileInfo::getType() Get file type */ -DirectoryFunction(getType, FS_TYPE) +FileInfoFunction(getType, FS_TYPE) /* }}} */ -/* {{{ proto bool DirectoryIterator::isWritable() +/* {{{ proto bool SplFileInfo::isWritable() Returns true if file can be written */ -DirectoryFunction(isWritable, FS_IS_W) +FileInfoFunction(isWritable, FS_IS_W) /* }}} */ -/* {{{ proto bool DirectoryIterator::isReadable() +/* {{{ proto bool SplFileInfo::isReadable() Returns true if file can be read */ -DirectoryFunction(isReadable, FS_IS_R) +FileInfoFunction(isReadable, FS_IS_R) /* }}} */ -/* {{{ proto bool DirectoryIterator::isExecutable() +/* {{{ proto bool SplFileInfo::isExecutable() Returns true if file is executable */ -DirectoryFunction(isExecutable, FS_IS_X) +FileInfoFunction(isExecutable, FS_IS_X) /* }}} */ -/* {{{ proto bool DirectoryIterator::isFile() +/* {{{ proto bool SplFileInfo::isFile() Returns true if file is a regular file */ -DirectoryFunction(isFile, FS_IS_FILE) +FileInfoFunction(isFile, FS_IS_FILE) /* }}} */ -/* {{{ proto bool DirectoryIterator::isDir() +/* {{{ proto bool SplFileInfo::isDir() Returns true if file is directory */ -DirectoryFunction(isDir, FS_IS_DIR) +FileInfoFunction(isDir, FS_IS_DIR) /* }}} */ -/* {{{ proto bool DirectoryIterator::isLink() +/* {{{ proto bool SplFileInfo::isLink() Returns true if file is symbolic link */ -DirectoryFunction(isLink, FS_IS_LINK) +FileInfoFunction(isLink, FS_IS_LINK) /* }}} */ -/* {{{ proto SplFileObject DirectoryIterator::openFile([string mode = 'r' [, bool use_include_path [, resource context]]]) +/* {{{ proto SplFileObject SplFileInfo::openFile([string mode = 'r' [, bool use_include_path [, resource context]]]) Open the current file */ -SPL_METHOD(DirectoryIterator, openFile) +SPL_METHOD(SplFileInfo, openFile) { - zval *object = getThis(); - spl_ce_dir_object *dir_obj = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); - spl_file_object *intern; - zend_bool use_include_path = 0; + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + spl_filesystem_object_create_type(ht, intern, SPL_FS_FILE, NULL, return_value TSRMLS_CC); +} + +/* {{{ proto SplFileObject SplFileInfo::setFileClass([string class_name]) + Class to use in openFile() */ +SPL_METHOD(SplFileInfo, setFileClass) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + zend_class_entry *ce = spl_ce_SplFileObject; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { + return; + } - if (!dir_obj->entry.d_name[0]) { - zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Could not open file"); - zval_dtor(return_value); + intern->file_class = ce; +} + +/* {{{ proto SplFileObject SplFileInfo::setInfoClass([string class_name]) + Class to use in getFileInfo(), getPathInfo(), getSubPathInfo() */ +SPL_METHOD(SplFileInfo, setInfoClass) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + zend_class_entry *ce = spl_ce_SplFileInfo; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; } - return_value->value.obj = spl_file_object_new_ex(spl_ce_SplFileObject, &intern TSRMLS_CC); + intern->file_class = ce; +} - spl_dir_get_path_name(dir_obj); - intern->file_name = dir_obj->path_name; - intern->file_name_len = dir_obj->path_name_len; +/* {{{ proto SplFileInfo SplFileInfo::getFileInfo([string $class_name]) + Get/copy file info */ +SPL_METHOD(SplFileInfo, getFileInfo) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + zend_class_entry *ce = intern->info_class; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { + return; + } - intern->open_mode = "r"; - intern->open_mode_len = 1; + spl_filesystem_object_create_type(ht, intern, SPL_FS_INFO, ce, return_value TSRMLS_CC); +} - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sbr", - &intern->open_mode, &intern->open_mode_len, - &use_include_path, &intern->zcontext) == FAILURE) { - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zval_dtor(return_value); +/* {{{ proto SplFileInfo SplFileInfo::getPathInfo([string $class_name]) + Get/copy file info */ +SPL_METHOD(SplFileInfo, getPathInfo) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + zend_class_entry *ce = intern->info_class; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; } - if (spl_file_object_open(intern, use_include_path, 0 TSRMLS_CC) == SUCCESS) { - Z_TYPE_P(return_value) = IS_OBJECT; - } else { - zval_dtor(return_value); + spl_filesystem_object_create_info(intern, intern->path, intern->path_len, 1, ce, return_value TSRMLS_CC); +} + +/* {{{ proto void RecursiveDirectoryIterator::__construct(string path [, int flags]) + Cronstructs a new dir iterator from a path. */ +SPL_METHOD(RecursiveDirectoryIterator, __construct) +{ + spl_filesystem_object *intern; + char *path; + int len; + long flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO; + + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &path, &len, &flags) == FAILURE) { + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } + intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_dir_open(intern, path TSRMLS_CC); + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; + intern->flags = flags; + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); -} /* }}} */ +} +/* }}} */ /* {{{ proto void RecursiveDirectoryIterator::rewind() Rewind dir back to the start */ SPL_METHOD(RecursiveDirectoryIterator, rewind) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - intern->index = 0; - if (intern->dirp) { - php_stream_rewinddir(intern->dirp); + intern->u.dir.index = 0; + if (intern->u.dir.dirp) { + php_stream_rewinddir(intern->u.dir.dirp); } do { - if (!intern->dirp || !php_stream_readdir(intern->dirp, &intern->entry)) { - intern->entry.d_name[0] = '\0'; + if (!intern->u.dir.dirp || !php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) { + intern->u.dir.entry.d_name[0] = '\0'; } - } while (!strcmp(intern->entry.d_name, ".") || !strcmp(intern->entry.d_name, "..")); + } while (!strcmp(intern->u.dir.entry.d_name, ".") || !strcmp(intern->u.dir.entry.d_name, "..")); } /* }}} */ @@ -495,18 +794,17 @@ SPL_METHOD(RecursiveDirectoryIterator, rewind) Move to next entry */ SPL_METHOD(RecursiveDirectoryIterator, next) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - intern->index++; + intern->u.dir.index++; do { - if (!intern->dirp || !php_stream_readdir(intern->dirp, &intern->entry)) { - intern->entry.d_name[0] = '\0'; + if (!intern->u.dir.dirp || !php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) { + intern->u.dir.entry.d_name[0] = '\0'; } - } while (!strcmp(intern->entry.d_name, ".") || !strcmp(intern->entry.d_name, "..")); - if (intern->path_name) { - efree(intern->path_name); - intern->path_name = NULL; + } while (!strcmp(intern->u.dir.entry.d_name, ".") || !strcmp(intern->u.dir.entry.d_name, "..")); + if (intern->file_name) { + efree(intern->file_name); + intern->file_name = NULL; } } /* }}} */ @@ -516,23 +814,22 @@ SPL_METHOD(RecursiveDirectoryIterator, next) SPL_METHOD(RecursiveDirectoryIterator, hasChildren) { zend_bool allow_links = 0; - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (!strcmp(intern->entry.d_name, ".") || !strcmp(intern->entry.d_name, "..")) { + if (!strcmp(intern->u.dir.entry.d_name, ".") || !strcmp(intern->u.dir.entry.d_name, "..")) { RETURN_BOOL(0); } else { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &allow_links) == FAILURE) { return; } - spl_dir_get_path_name(intern); + spl_filesystem_object_get_file_name(intern TSRMLS_CC); if (!allow_links) { - php_stat(intern->path_name, intern->path_name_len, FS_IS_LINK, return_value TSRMLS_CC); + php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC); if (zend_is_true(return_value)) { RETURN_BOOL(0); } } - php_stat(intern->path_name, intern->path_name_len, FS_IS_DIR, return_value TSRMLS_CC); + php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value TSRMLS_CC); } } /* }}} */ @@ -541,25 +838,26 @@ SPL_METHOD(RecursiveDirectoryIterator, hasChildren) Returns an iterator for the current entry if it is a directory */ SPL_METHOD(RecursiveDirectoryIterator, getChildren) { - zval *object = getThis(), zpath; - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); - spl_ce_dir_object *subdir; + zval zpath; + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *subdir; - spl_dir_get_path_name(intern); + spl_filesystem_object_get_file_name(intern TSRMLS_CC); INIT_PZVAL(&zpath); - ZVAL_STRINGL(&zpath, intern->path_name, intern->path_name_len, 0); + ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len, 0); spl_instantiate_arg_ex1(spl_ce_RecursiveDirectoryIterator, &return_value, 0, &zpath TSRMLS_CC); - subdir = (spl_ce_dir_object*)zend_object_store_get_object(return_value TSRMLS_CC); + subdir = (spl_filesystem_object*)zend_object_store_get_object(return_value TSRMLS_CC); if (subdir) { - if (intern->sub_path && intern->sub_path[0]) { - subdir->sub_path_len = spprintf(&subdir->sub_path, 0, "%s/%s", intern->sub_path, intern->entry.d_name); + if (intern->u.dir.sub_path && intern->u.dir.sub_path[0]) { + subdir->u.dir.sub_path_len = spprintf(&subdir->u.dir.sub_path, 0, "%s/%s", intern->u.dir.sub_path, intern->u.dir.entry.d_name); } else { - subdir->sub_path_len = strlen(intern->entry.d_name); - subdir->sub_path = estrndup(intern->entry.d_name, subdir->sub_path_len); + subdir->u.dir.sub_path_len = strlen(intern->u.dir.entry.d_name); + subdir->u.dir.sub_path = estrndup(intern->u.dir.entry.d_name, subdir->u.dir.sub_path_len); } + subdir->flags = intern->flags; } } /* }}} */ @@ -568,11 +866,10 @@ SPL_METHOD(RecursiveDirectoryIterator, getChildren) Get sub path */ SPL_METHOD(RecursiveDirectoryIterator, getSubPath) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (intern->sub_path) { - RETURN_STRINGL(intern->sub_path, intern->sub_path_len, 1); + if (intern->u.dir.sub_path) { + RETURN_STRINGL(intern->u.dir.sub_path, intern->u.dir.sub_path_len, 1); } else { RETURN_STRINGL("", 0, 1); } @@ -583,16 +880,37 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPath) Get sub path and file name */ SPL_METHOD(RecursiveDirectoryIterator, getSubPathname) { - zval *object = getThis(); - spl_ce_dir_object *intern = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char *sub_name; int len; - if (intern->sub_path) { - len = spprintf(&sub_name, 0, "%s/%s", intern->sub_path, intern->entry.d_name); + if (intern->u.dir.sub_path) { + len = spprintf(&sub_name, 0, "%s/%s", intern->u.dir.sub_path, intern->u.dir.entry.d_name); RETURN_STRINGL(sub_name, len, 0); } else { - RETURN_STRING(intern->entry.d_name, 1); + RETURN_STRING(intern->u.dir.entry.d_name, 1); + } +} +/* }}} */ + +/* {{{ proto SplFileInfo RecursiveDirectoryIterator::getSubPathInfo([string $class_info]) + Create SplFileInfo for sub path */ +SPL_METHOD(RecursiveDirectoryIterator, getSubPathInfo) +{ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + char *sub_name; + int len; + zend_class_entry *ce = intern->info_class; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { + return; + } + + if (intern->u.dir.sub_path) { + len = spprintf(&sub_name, 0, "%s/%s", intern->u.dir.sub_path, intern->u.dir.entry.d_name); + spl_filesystem_object_create_info(intern, sub_name, len, 0, ce, return_value TSRMLS_CC); + } else { + spl_filesystem_object_create_info(intern, intern->path, intern->path_len, 1, ce, return_value TSRMLS_CC); } } /* }}} */ @@ -601,48 +919,47 @@ SPL_METHOD(RecursiveDirectoryIterator, getSubPathname) typedef struct { zend_object_iterator intern; zval *current; - spl_ce_dir_object *object; -} spl_ce_dir_it; + spl_filesystem_object *object; +} spl_filesystem_dir_it; /* forward declarations to the iterator handlers */ -static void spl_ce_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC); -static int spl_ce_dir_it_valid(zend_object_iterator *iter TSRMLS_DC); -static void spl_ce_dir_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC); -static int spl_ce_dir_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC); -static void spl_ce_dir_it_move_forward(zend_object_iterator *iter TSRMLS_DC); -static void spl_ce_dir_it_rewind(zend_object_iterator *iter TSRMLS_DC); +static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC); +static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC); +static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC); +static int spl_filesystem_dir_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC); +static void spl_filesystem_dir_it_move_forward(zend_object_iterator *iter TSRMLS_DC); +static void spl_filesystem_dir_it_rewind(zend_object_iterator *iter TSRMLS_DC); /* iterator handler table */ -zend_object_iterator_funcs spl_ce_dir_it_funcs = { - spl_ce_dir_it_dtor, - spl_ce_dir_it_valid, - spl_ce_dir_it_current_data, - spl_ce_dir_it_current_key, - spl_ce_dir_it_move_forward, - spl_ce_dir_it_rewind +zend_object_iterator_funcs spl_filesystem_dir_it_funcs = { + spl_filesystem_dir_it_dtor, + spl_filesystem_dir_it_valid, + spl_filesystem_dir_it_current_data, + spl_filesystem_dir_it_current_key, + spl_filesystem_dir_it_move_forward, + spl_filesystem_dir_it_rewind }; /* {{{ spl_ce_dir_get_iterator */ -zend_object_iterator *spl_ce_dir_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) +zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) { - spl_ce_dir_it *iterator = emalloc(sizeof(spl_ce_dir_it)); - spl_ce_dir_object *dir_object = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_dir_it *iterator = emalloc(sizeof(spl_filesystem_dir_it)); + spl_filesystem_object *dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); - object->refcount++; + object->refcount += 2;; iterator->intern.data = (void*)object; - iterator->intern.funcs = &spl_ce_dir_it_funcs; + iterator->intern.funcs = &spl_filesystem_dir_it_funcs; iterator->current = object; - object->refcount++; iterator->object = dir_object; return (zend_object_iterator*)iterator; } /* }}} */ -/* {{{ spl_ce_dir_it_dtor */ -static void spl_ce_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_dtor */ +static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; zval_ptr_dtor(&iterator->current); zval_ptr_dtor((zval**)&iterator->intern.data); @@ -651,162 +968,218 @@ static void spl_ce_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC) } /* }}} */ -/* {{{ spl_ce_dir_it_valid */ -static int spl_ce_dir_it_valid(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_valid */ +static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - return object->entry.d_name[0] != '\0' ? SUCCESS : FAILURE; + return object->u.dir.entry.d_name[0] != '\0' ? SUCCESS : FAILURE; } /* }}} */ -/* {{{ spl_ce_dir_it_current_data */ -static void spl_ce_dir_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_current_data */ +static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; *data = &iterator->current; } /* }}} */ -/* {{{ spl_ce_dir_it_current_key */ -static int spl_ce_dir_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_current_key */ +static int spl_filesystem_dir_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - *int_key = object->index; + *int_key = object->u.dir.index; return HASH_KEY_IS_LONG; } /* }}} */ -/* {{{ spl_ce_dir_it_move_forward */ -static void spl_ce_dir_it_move_forward(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_move_forward */ +static void spl_filesystem_dir_it_move_forward(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - object->index++; - if (!object->dirp || !php_stream_readdir(object->dirp, &object->entry)) { - object->entry.d_name[0] = '\0'; + object->u.dir.index++; + if (!object->u.dir.dirp || !php_stream_readdir(object->u.dir.dirp, &object->u.dir.entry)) { + object->u.dir.entry.d_name[0] = '\0'; } - if (object->path_name) { - efree(object->path_name); - object->path_name = NULL; + if (object->file_name) { + efree(object->file_name); + object->file_name = NULL; } } /* }}} */ -/* {{{ spl_ce_dir_it_rewind */ -static void spl_ce_dir_it_rewind(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_dir_it_rewind */ +static void spl_filesystem_dir_it_rewind(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - object->index = 0; - if (object->dirp) { - php_stream_rewinddir(object->dirp); + object->u.dir.index = 0; + if (object->u.dir.dirp) { + php_stream_rewinddir(object->u.dir.dirp); + } + if (!object->u.dir.dirp || !php_stream_readdir(object->u.dir.dirp, &object->u.dir.entry)) { + object->u.dir.entry.d_name[0] = '\0'; + } +} +/* }}} */ + +/* {{{ spl_filesystem_tree_it_dtor */ +static void spl_filesystem_tree_it_dtor(zend_object_iterator *iter TSRMLS_DC) +{ + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + + if (iterator->current) { + zval_ptr_dtor(&iterator->current); } - if (!object->dirp || !php_stream_readdir(object->dirp, &object->entry)) { - object->entry.d_name[0] = '\0'; + zval_ptr_dtor((zval**)&iterator->intern.data); + + efree(iterator); +} +/* }}} */ + +/* {{{ spl_filesystem_tree_it_current_data */ +static void spl_filesystem_tree_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) +{ + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; + + if (object->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) { + if (!iterator->current) { + ALLOC_INIT_ZVAL(iterator->current); + spl_filesystem_object_get_file_name(object TSRMLS_CC); + ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1); + } + *data = &iterator->current; + } else if (object->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) { + if (!iterator->current) { + ALLOC_INIT_ZVAL(iterator->current); + spl_filesystem_object_get_file_name(object TSRMLS_CC); + spl_filesystem_object_create_type(0, object, SPL_FS_INFO, NULL, iterator->current TSRMLS_CC); + } + *data = &iterator->current; + } else { + *data = (zval**)&iterator->intern.data; } } /* }}} */ -/* {{{ spl_ce_dir_tree_it_current_key */ -static int spl_ce_dir_tree_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) +/* {{{ spl_filesystem_tree_it_current_key */ +static int spl_filesystem_tree_it_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - spl_dir_get_path_name(object); - *str_key_len = object->path_name_len + 1; - *str_key = estrndup(object->path_name, object->path_name_len); + if (object->flags & SPL_FILE_DIR_KEY_AS_FILENAME) { + *str_key_len = strlen(object->u.dir.entry.d_name) + 1; + *str_key = estrndup(object->u.dir.entry.d_name, *str_key_len - 1); + } else { + spl_filesystem_object_get_file_name(object TSRMLS_CC); + *str_key_len = object->file_name_len + 1; + *str_key = estrndup(object->file_name, object->file_name_len); + } return HASH_KEY_IS_STRING; } /* }}} */ -/* {{{ spl_ce_dir_tree_it_move_forward */ -static void spl_ce_dir_tree_it_move_forward(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_tree_it_move_forward */ +static void spl_filesystem_tree_it_move_forward(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - object->index++; + object->u.dir.index++; do { - if (!object->dirp || !php_stream_readdir(object->dirp, &object->entry)) { - object->entry.d_name[0] = '\0'; + if (!object->u.dir.dirp || !php_stream_readdir(object->u.dir.dirp, &object->u.dir.entry)) { + object->u.dir.entry.d_name[0] = '\0'; } - } while (!strcmp(object->entry.d_name, ".") || !strcmp(object->entry.d_name, "..")); - if (object->path_name) { - efree(object->path_name); - object->path_name = NULL; + } while (!strcmp(object->u.dir.entry.d_name, ".") || !strcmp(object->u.dir.entry.d_name, "..")); + if (object->file_name) { + efree(object->file_name); + object->file_name = NULL; + } + if (iterator->current) { + zval_ptr_dtor(&iterator->current); + iterator->current = NULL; } } /* }}} */ -/* {{{ spl_ce_dir_tree_it_rewind */ -static void spl_ce_dir_tree_it_rewind(zend_object_iterator *iter TSRMLS_DC) +/* {{{ spl_filesystem_tree_it_rewind */ +static void spl_filesystem_tree_it_rewind(zend_object_iterator *iter TSRMLS_DC) { - spl_ce_dir_it *iterator = (spl_ce_dir_it *)iter; - spl_ce_dir_object *object = iterator->object; + spl_filesystem_dir_it *iterator = (spl_filesystem_dir_it *)iter; + spl_filesystem_object *object = iterator->object; - object->index = 0; - if (object->dirp) { - php_stream_rewinddir(object->dirp); + object->u.dir.index = 0; + if (object->u.dir.dirp) { + php_stream_rewinddir(object->u.dir.dirp); } do { - if (!object->dirp || !php_stream_readdir(object->dirp, &object->entry)) { - object->entry.d_name[0] = '\0'; + if (!object->u.dir.dirp || !php_stream_readdir(object->u.dir.dirp, &object->u.dir.entry)) { + object->u.dir.entry.d_name[0] = '\0'; } - } while (!strcmp(object->entry.d_name, ".") || !strcmp(object->entry.d_name, "..")); + } while (!strcmp(object->u.dir.entry.d_name, ".") || !strcmp(object->u.dir.entry.d_name, "..")); + if (iterator->current) { + zval_ptr_dtor(&iterator->current); + iterator->current = NULL; + } } /* }}} */ /* iterator handler table */ -zend_object_iterator_funcs spl_ce_dir_tree_it_funcs = { - spl_ce_dir_it_dtor, - spl_ce_dir_it_valid, - spl_ce_dir_it_current_data, - spl_ce_dir_tree_it_current_key, - spl_ce_dir_tree_it_move_forward, - spl_ce_dir_tree_it_rewind +zend_object_iterator_funcs spl_filesystem_tree_it_funcs = { + spl_filesystem_tree_it_dtor, + spl_filesystem_dir_it_valid, + spl_filesystem_tree_it_current_data, + spl_filesystem_tree_it_current_key, + spl_filesystem_tree_it_move_forward, + spl_filesystem_tree_it_rewind }; /* {{{ spl_ce_dir_get_iterator */ -zend_object_iterator *spl_ce_dir_tree_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) +zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, zval *object TSRMLS_DC) { - spl_ce_dir_it *iterator = emalloc(sizeof(spl_ce_dir_it)); - spl_ce_dir_object *dir_object = (spl_ce_dir_object*)zend_object_store_get_object(object TSRMLS_CC); + spl_filesystem_dir_it *iterator = emalloc(sizeof(spl_filesystem_dir_it)); + spl_filesystem_object *dir_object = (spl_filesystem_object*)zend_object_store_get_object(object TSRMLS_CC); object->refcount++; iterator->intern.data = (void*)object; - iterator->intern.funcs = &spl_ce_dir_tree_it_funcs; - iterator->current = object; - object->refcount++; + iterator->intern.funcs = &spl_filesystem_tree_it_funcs; + iterator->current = NULL; iterator->object = dir_object; return (zend_object_iterator*)iterator; } /* }}} */ -/* {{{ spl_ce_dir_cast */ -static int spl_ce_dir_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) +/* {{{ spl_filesystem_object_cast */ +static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type, int should_free TSRMLS_DC) { - zval free_obj; - spl_ce_dir_object *dir_object = (spl_ce_dir_object*)zend_object_store_get_object(readobj TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(readobj TSRMLS_CC); - if (type ==IS_STRING && *dir_object->entry.d_name) { - if (should_free) { - free_obj = *writeobj; - } - ZVAL_STRING(writeobj, dir_object->entry.d_name, 1); - if (should_free) { - zval_dtor(&free_obj); + if (should_free) { + zval_dtor(readobj); + } + + if (type == IS_STRING) { + switch (intern->type) { + case SPL_FS_INFO: + case SPL_FS_FILE: + ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len, 1); + return SUCCESS; + case SPL_FS_DIR: + ZVAL_STRING(writeobj, intern->u.dir.entry.d_name, 1); + return SUCCESS; } - return SUCCESS; } return FAILURE; } @@ -815,146 +1188,114 @@ static int spl_ce_dir_cast(zval *readobj, zval *writeobj, int type, int should_f /* declare method parameters */ /* supply a name and default to call by parameter */ static -ZEND_BEGIN_ARG_INFO(arginfo_dir___construct, 0) - ZEND_ARG_INFO(0, path) /* parameter name */ +ZEND_BEGIN_ARG_INFO(arginfo_info___construct, 0) + ZEND_ARG_INFO(0, file_name) ZEND_END_ARG_INFO(); static -ZEND_BEGIN_ARG_INFO_EX(arginfo_dir_openFile, 0, 0, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_info_openFile, 0, 0, 0) ZEND_ARG_INFO(0, open_mode) ZEND_ARG_INFO(0, use_include_path) ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO(); +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_info_optinalFileClass, 0, 0, 0) + ZEND_ARG_INFO(0, class_name) +ZEND_END_ARG_INFO(); + +/* the method table */ +/* each method can have its own parameters and visibility */ +static zend_function_entry spl_SplFileInfo_functions[] = { + SPL_ME(SplFileInfo, __construct, arginfo_info___construct, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getPath, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getFilename, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getPathname, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getPerms, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getInode, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getSize, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getOwner, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getGroup, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getATime, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getMTime, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getCTime, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getType, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isWritable, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isReadable, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isExecutable, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isFile, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isDir, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, isLink, NULL, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getFileInfo, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, getPathInfo, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, openFile, arginfo_info_openFile, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, setFileClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) + SPL_ME(SplFileInfo, setInfoClass, arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) + SPL_MA(SplFileInfo, __toString, SplFileInfo, getPathname, NULL, ZEND_ACC_PUBLIC) + {NULL, NULL, NULL} +}; + +static +ZEND_BEGIN_ARG_INFO(arginfo_dir___construct, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO(); + /* the method table */ /* each method can have its own parameters and visibility */ -static zend_function_entry spl_ce_dir_class_functions[] = { +static zend_function_entry spl_DirectoryIterator_functions[] = { SPL_ME(DirectoryIterator, __construct, arginfo_dir___construct, ZEND_ACC_PUBLIC) + SPL_ME(DirectoryIterator, getFilename, NULL, ZEND_ACC_PUBLIC) + SPL_ME(DirectoryIterator, isDot, NULL, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, rewind, NULL, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, valid, NULL, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, key, NULL, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, current, NULL, ZEND_ACC_PUBLIC) SPL_ME(DirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getPath, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getFilename, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getPathname, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getPerms, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getInode, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getSize, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getOwner, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getGroup, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getATime, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getMTime, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getCTime, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, getType, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isWritable, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isReadable, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isExecutable, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isFile, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isDir, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isLink, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, isDot, NULL, ZEND_ACC_PUBLIC) - SPL_ME(DirectoryIterator, openFile, arginfo_dir_openFile, ZEND_ACC_PUBLIC) SPL_MA(DirectoryIterator, __toString, DirectoryIterator, getFilename, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; -static zend_function_entry spl_ce_dir_tree_class_functions[] = { +static +ZEND_BEGIN_ARG_INFO(arginfo_r_dir___construct, 0) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO(); + +static zend_function_entry spl_RecursiveDirectoryIterator_functions[] = { + SPL_ME(RecursiveDirectoryIterator, __construct, arginfo_r_dir___construct, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, rewind, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, next, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, key, NULL, ZEND_ACC_PUBLIC) + SPL_ME(RecursiveDirectoryIterator, current, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, hasChildren, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, getChildren, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, getSubPath, NULL, ZEND_ACC_PUBLIC) SPL_ME(RecursiveDirectoryIterator, getSubPathname,NULL, ZEND_ACC_PUBLIC) + SPL_ME(RecursiveDirectoryIterator, getSubPathInfo,arginfo_info_optinalFileClass, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; -static void spl_file_object_free_line(spl_file_object *intern TSRMLS_DC) /* {{{ */ -{ - if (intern->current_line) { - efree(intern->current_line); - intern->current_line = NULL; - } - if (intern->current_zval) { - zval_ptr_dtor(&intern->current_zval); - intern->current_zval = NULL; - } -} /* }}} */ - -static void spl_file_object_free_storage(void *object TSRMLS_DC) /* {{{ */ -{ - spl_file_object *intern = (spl_file_object*)object; - - zend_hash_destroy(intern->std.properties); - FREE_HASHTABLE(intern->std.properties); - - if (intern->stream) { - if (intern->zcontext) { -/* zend_list_delref(Z_RESVAL_P(intern->zcontext));*/ - } - if (!intern->stream->is_persistent) { - php_stream_free(intern->stream, PHP_STREAM_FREE_CLOSE); - } else { - php_stream_free(intern->stream, PHP_STREAM_FREE_CLOSE_PERSISTENT); - } - if (intern->file_name) { - efree(intern->file_name); - } - if (intern->open_mode) { - efree(intern->open_mode); - } - } - spl_file_object_free_line(intern TSRMLS_CC); - efree(object); -} /* }}} */ - -static zend_object_value spl_file_object_new_ex(zend_class_entry *class_type, spl_file_object **obj TSRMLS_DC) /* {{{ */ -{ - zend_object_value retval; - spl_file_object *intern; - zval *tmp; - - intern = emalloc(sizeof(spl_ce_dir_object)); - memset(intern, 0, sizeof(spl_ce_dir_object)); - intern->std.ce = class_type; - if (obj) *obj = intern; - - ALLOC_HASHTABLE(intern->std.properties); - zend_hash_init(intern->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0); - 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_file_object_free_storage, NULL TSRMLS_CC); - retval.handlers = &spl_ce_dir_handlers; - return retval; -} /* }}} */ - -static zend_object_value spl_file_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */ -{ - return spl_file_object_new_ex(class_type, NULL TSRMLS_CC); -} /* }}} */ - -static int spl_file_object_read(spl_file_object *intern, int silent TSRMLS_DC) /* {{{ */ +static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent TSRMLS_DC) /* {{{ */ { char *buf; size_t line_len; int len; - long line_add = (intern->current_line || intern->current_zval) ? 1 : 0; + long line_add = (intern->u.file.current_line || intern->u.file.current_zval) ? 1 : 0; - spl_file_object_free_line(intern TSRMLS_CC); + spl_filesystem_file_free_line(intern TSRMLS_CC); - if (php_stream_eof(intern->stream)) { + if (php_stream_eof(intern->u.file.stream)) { if (!silent) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } - buf = php_stream_get_line(intern->stream, NULL, intern->max_line_len, &line_len); + buf = php_stream_get_line(intern->u.file.stream, NULL, intern->u.file.max_line_len, &line_len); if (!buf) { - intern->current_line = estrdup(""); - intern->current_line_len = 0; + intern->u.file.current_line = estrdup(""); + intern->u.file.current_line_len = 0; } else { if (intern->flags & SPL_FILE_OBJECT_DROP_NEW_LINE) { line_len = strcspn(buf, "\r\n"); @@ -966,38 +1307,38 @@ static int spl_file_object_read(spl_file_object *intern, int silent TSRMLS_DC) / line_len = len; } - intern->current_line = buf; - intern->current_line_len = line_len; + intern->u.file.current_line = buf; + intern->u.file.current_line_len = line_len; } - intern->current_line_num += line_add; + intern->u.file.current_line_num += line_add; return SUCCESS; } /* }}} */ -static int spl_file_object_read_line(zval * this_ptr, spl_file_object *intern, int silent TSRMLS_DC) /* {{{ */ +static int spl_filesystem_file_read_line(zval * this_ptr, spl_filesystem_object *intern, int silent TSRMLS_DC) /* {{{ */ { zval *retval; /* if overloaded call the function, otherwise do it directly */ - if (intern->func_getCurr->common.scope != spl_ce_SplFileObject) { - if (php_stream_eof(intern->stream)) { + if (intern->u.file.func_getCurr->common.scope != spl_ce_SplFileObject) { + if (php_stream_eof(intern->u.file.stream)) { if (!silent) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } - zend_call_method_with_0_params(&getThis(), Z_OBJCE_P(getThis()), &intern->func_getCurr, "getCurrentLine", &retval); + zend_call_method_with_0_params(&getThis(), Z_OBJCE_P(getThis()), &intern->u.file.func_getCurr, "getCurrentLine", &retval); if (retval) { - if (intern->current_line || intern->current_zval) { - intern->current_line_num++; + if (intern->u.file.current_line || intern->u.file.current_zval) { + intern->u.file.current_line_num++; } - spl_file_object_free_line(intern TSRMLS_CC); + spl_filesystem_file_free_line(intern TSRMLS_CC); if (Z_TYPE_P(retval) == IS_STRING) { - intern->current_line = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); - intern->current_line_len = Z_STRLEN_P(retval); + intern->u.file.current_line = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval)); + intern->u.file.current_line_len = Z_STRLEN_P(retval); } else { - MAKE_STD_ZVAL(intern->current_zval); - ZVAL_ZVAL(intern->current_zval, retval, 1, 0); + MAKE_STD_ZVAL(intern->u.file.current_zval); + ZVAL_ZVAL(intern->u.file.current_zval, retval, 1, 0); } zval_ptr_dtor(&retval); return SUCCESS; @@ -1005,69 +1346,88 @@ static int spl_file_object_read_line(zval * this_ptr, spl_file_object *intern, i return FAILURE; } } else { - return spl_file_object_read(intern, silent TSRMLS_CC); + return spl_filesystem_file_read(intern, silent TSRMLS_CC); } } /* }}} */ -static void spl_file_object_rewind(spl_file_object *intern TSRMLS_DC) /* {{{ */ +static void spl_filesystem_file_rewind(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ { - if (-1 == php_stream_rewind(intern->stream)) { + if (-1 == php_stream_rewind(intern->u.file.stream)) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); } else { - spl_file_object_free_line(intern TSRMLS_CC); - intern->current_line_num = 0; + spl_filesystem_file_free_line(intern TSRMLS_CC); + intern->u.file.current_line_num = 0; } } /* }}} */ -static int spl_file_object_open(spl_file_object *intern, int use_include_path, int silent TSRMLS_DC) /* {{{ */ +/* {{{ proto void SplFileObject::__construct(string filename [, string mode = 'r' [, bool use_include_path [, resource context]]]]) + Construct a new file object */ +SPL_METHOD(SplFileObject, __construct) { - intern->context = php_stream_context_from_zval(intern->zcontext, 0); - intern->stream = php_stream_open_wrapper_ex(intern->file_name, intern->open_mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, intern->context); - - if (intern->stream == NULL) { - if (!EG(exception)) { - zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); - } - return FAILURE; - } - - if (intern->zcontext) { - zend_list_addref(Z_RESVAL_P(intern->zcontext)); - } + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + zend_bool use_include_path = 0; + char *p1, *p2; - intern->file_name = estrndup(intern->file_name, intern->file_name_len); - intern->open_mode = estrndup(intern->open_mode, intern->open_mode_len); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); - /* avoid reference counting in debug mode, thus do it manually */ - ZVAL_RESOURCE(&intern->zresource, php_stream_get_resource_id(intern->stream)); - intern->zresource.refcount = 1; + intern->u.file.open_mode = "r"; + intern->u.file.open_mode_len = 1; - zend_hash_find(&intern->std.ce->function_table, "getcurrentline", sizeof("getcurrentline"), (void **) &intern->func_getCurr); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sbr", + &intern->file_name, &intern->file_name_len, + &intern->u.file.open_mode, &intern->u.file.open_mode_len, + &use_include_path, &intern->u.file.zcontext) == FAILURE) { + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + return; + } + + if (spl_filesystem_file_open(intern, use_include_path, 0 TSRMLS_CC) == SUCCESS) { + p1 = strrchr(intern->file_name, '/'); + p2 = strrchr(intern->file_name, '\\'); + if (p1 || p2) { + intern->path_len = (p1 > p2 ? p1 : p2) - intern->file_name; + } else { + intern->path_len = 0; + } + intern->path = estrndup(intern->file_name, intern->path_len); + } - return SUCCESS; + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ -/* {{{ proto void SplFileObject::__construct(string filename [, string mode = 'r' [, bool use_include_path [, resource context]]]]) - Construct a new file reader */ -SPL_METHOD(SplFileObject, __construct) +/* {{{ proto void SplFileObject::__construct([int max_memory]) + Construct a new temp file object */ +SPL_METHOD(SplTempFileObject, __construct) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - zend_bool use_include_path = 0; + long max_memory = PHP_STREAM_MAX_MEM; + char tmp_fname[48]; + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); - intern->open_mode = "r"; - intern->open_mode_len = 1; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sbr", - &intern->file_name, &intern->file_name_len, - &intern->open_mode, &intern->open_mode_len, - &use_include_path, &intern->zcontext) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &max_memory) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } + + if (max_memory < 0) { + intern->file_name = "php://memory"; + intern->file_name_len = 12; + } else if (ZEND_NUM_ARGS()) { + intern->file_name_len = snprintf(tmp_fname, sizeof(tmp_fname), "php://temp/maxmemory:%ld", max_memory); + intern->file_name = tmp_fname; + } else { + intern->file_name = "php://temp"; + intern->file_name_len = 10; + } + intern->u.file.open_mode = "wb"; + intern->u.file.open_mode_len = 1; + intern->u.file.zcontext = NULL; - spl_file_object_open(intern, use_include_path, 0 TSRMLS_CC); + if (spl_filesystem_file_open(intern, 0, 0 TSRMLS_CC) == SUCCESS) { + intern->path_len = 0; + intern->path = estrndup("", 0); + } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -1076,16 +1436,16 @@ SPL_METHOD(SplFileObject, __construct) Rewind the file and read the first line */ SPL_METHOD(SplFileObject, rewind) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - spl_file_object_rewind(intern TSRMLS_CC); + spl_filesystem_file_rewind(intern TSRMLS_CC); } /* }}} */ /* {{{ proto string SplFileObject::getFilename() Return the filename */ SPL_METHOD(SplFileObject, getFilename) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); } /* }}} */ @@ -1094,45 +1454,45 @@ SPL_METHOD(SplFileObject, getFilename) Return whether end of file is reached */ SPL_METHOD(SplFileObject, eof) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_BOOL(php_stream_eof(intern->stream)); + RETURN_BOOL(php_stream_eof(intern->u.file.stream)); } /* }}} */ /* {{{ proto void SplFileObject::valid() Return !eof() */ SPL_METHOD(SplFileObject, valid) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETVAL_BOOL(!php_stream_eof(intern->stream)); + RETVAL_BOOL(!php_stream_eof(intern->u.file.stream)); } /* }}} */ /* {{{ proto string SplFileObject::fgets() Rturn next line from file */ SPL_METHOD(SplFileObject, fgets) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (spl_file_object_read(intern, 0 TSRMLS_CC) == FAILURE) { + if (spl_filesystem_file_read(intern, 0 TSRMLS_CC) == FAILURE) { RETURN_FALSE; } - RETURN_STRINGL(intern->current_line, intern->current_line_len, 1); + RETURN_STRINGL(intern->u.file.current_line, intern->u.file.current_line_len, 1); } /* }}} */ /* {{{ proto string SplFileObject::current() Return current line from file */ SPL_METHOD(SplFileObject, current) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (!intern->current_line) { - spl_file_object_read_line(getThis(), intern, 1 TSRMLS_CC); + if (!intern->u.file.current_line) { + spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC); } - if (intern->current_line) { - RETURN_STRINGL(intern->current_line, intern->current_line_len, 1); - } else if (intern->current_zval) { - RETURN_ZVAL(intern->current_zval, 1, 0); + if (intern->u.file.current_line) { + RETURN_STRINGL(intern->u.file.current_line, intern->u.file.current_line_len, 1); + } else if (intern->u.file.current_zval) { + RETURN_ZVAL(intern->u.file.current_zval, 1, 0); } RETURN_FALSE; } /* }}} */ @@ -1141,30 +1501,30 @@ SPL_METHOD(SplFileObject, current) Return line number */ SPL_METHOD(SplFileObject, key) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); /* Do not read the next line to support correct counting with fgetc() if (!intern->current_line) { - spl_file_object_read_line(getThis(), intern, 1 TSRMLS_CC); + spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC); } */ - RETURN_LONG(intern->current_line_num); + RETURN_LONG(intern->u.file.current_line_num); } /* }}} */ /* {{{ proto void SplFileObject::next() Read next line */ SPL_METHOD(SplFileObject, next) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - spl_file_object_free_line(intern TSRMLS_CC); - intern->current_line_num++; + spl_filesystem_file_free_line(intern TSRMLS_CC); + intern->u.file.current_line_num++; } /* }}} */ /* {{{ proto void SplFileObject::setFlags(int flags) Set file handling flags */ SPL_METHOD(SplFileObject, setFlags) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intern->flags); } /* }}} */ @@ -1173,7 +1533,7 @@ SPL_METHOD(SplFileObject, setFlags) Get file handling flags */ SPL_METHOD(SplFileObject, getFlags) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); RETURN_LONG(intern->flags); } /* }}} */ @@ -1184,7 +1544,7 @@ SPL_METHOD(SplFileObject, setMaxLineLen) { long max_len; - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &max_len) == FAILURE) { return; @@ -1195,20 +1555,20 @@ SPL_METHOD(SplFileObject, setMaxLineLen) return; } - intern->max_line_len = max_len; + intern->u.file.max_line_len = max_len; } /* }}} */ /* {{{ proto int SplFileObject::getMaxLineLen() Get maximum line length */ SPL_METHOD(SplFileObject, getMaxLineLen) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_LONG((long)intern->max_line_len); + RETURN_LONG((long)intern->u.file.max_line_len); } /* }}} */ -/* {{{ proto bool hasChildren() - Rturn false */ +/* {{{ proto bool SplFileObject::hasChildren() + Return false */ SPL_METHOD(SplFileObject, hasChildren) { RETURN_FALSE; @@ -1221,12 +1581,12 @@ SPL_METHOD(SplFileObject, getChildren) /* return NULL */ } /* }}} */ -static int spl_file_object_call(INTERNAL_FUNCTION_PARAMETERS, spl_file_object *intern, zend_function *func_ptr, zval *arg2) /* {{{ */ +static int spl_filesystem_file_call(INTERNAL_FUNCTION_PARAMETERS, spl_filesystem_object *intern, zend_function *func_ptr, zval *arg2) /* {{{ */ { zend_fcall_info fci; zend_fcall_info_cache fcic; zval z_fname; - zval * zresource_ptr = &intern->zresource, *retval; + zval * zresource_ptr = &intern->u.file.zresource, *retval; int result; zval ***params = (zval***)safe_emalloc(ZEND_NUM_ARGS(), sizeof(zval**), (arg2 ? 2 : 1) * sizeof(zval**)); @@ -1268,14 +1628,14 @@ static int spl_file_object_call(INTERNAL_FUNCTION_PARAMETERS, spl_file_object *i { \ zend_function *func_ptr; \ zend_hash_find(EG(function_table), #func_name, sizeof(#func_name), (void **) &func_ptr); \ - spl_file_object_call(INTERNAL_FUNCTION_PARAM_PASSTHRU, intern, func_ptr, arg2); \ + spl_filesystem_file_call(INTERNAL_FUNCTION_PARAM_PASSTHRU, intern, func_ptr, arg2); \ } /* {{{ FileFunction */ #define FileFunction(func_name) \ SPL_METHOD(SplFileObject, func_name) \ { \ - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); \ FileFunctionCall(func_name, NULL); \ } /* }}} */ @@ -1284,13 +1644,13 @@ SPL_METHOD(SplFileObject, func_name) \ Return current line as csv */ SPL_METHOD(SplFileObject, fgetcsv) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zval *arg2 = NULL; MAKE_STD_ZVAL(arg2); - ZVAL_LONG(arg2, intern->max_line_len); + ZVAL_LONG(arg2, intern->u.file.max_line_len); - spl_file_object_free_line(intern TSRMLS_CC); - intern->current_line_num++; + spl_filesystem_file_free_line(intern TSRMLS_CC); + intern->u.file.current_line_num++; FileFunctionCall(fgetcsv, arg2); @@ -1307,9 +1667,9 @@ FileFunction(flock) Flush the file */ SPL_METHOD(SplFileObject, fflush) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_BOOL(!php_stream_flush(intern->stream)); + RETURN_BOOL(!php_stream_flush(intern->u.file.stream)); } /* }}} */ @@ -1317,8 +1677,8 @@ SPL_METHOD(SplFileObject, fflush) Return current file position */ SPL_METHOD(SplFileObject, ftell) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - long ret = php_stream_tell(intern->stream); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + long ret = php_stream_tell(intern->u.file.stream); if (ret == -1) { RETURN_FALSE; @@ -1331,34 +1691,34 @@ SPL_METHOD(SplFileObject, ftell) Return current file position */ SPL_METHOD(SplFileObject, fseek) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); long pos, whence = SEEK_SET; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &pos, &whence) == FAILURE) { return; } - spl_file_object_free_line(intern TSRMLS_CC); - RETURN_LONG(php_stream_seek(intern->stream, pos, whence)); + spl_filesystem_file_free_line(intern TSRMLS_CC); + RETURN_LONG(php_stream_seek(intern->u.file.stream, pos, whence)); } /* }}} */ /* {{{ proto int SplFileObject::fgetc() Get a character form the file */ SPL_METHOD(SplFileObject, fgetc) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char buf[2]; int result; - spl_file_object_free_line(intern TSRMLS_CC); + spl_filesystem_file_free_line(intern TSRMLS_CC); - result = php_stream_getc(intern->stream); + result = php_stream_getc(intern->u.file.stream); if (result == EOF) { RETVAL_FALSE; } else { if (result == '\n') { - intern->current_line_num++; + intern->u.file.current_line_num++; } buf[0] = result; buf[1] = '\0'; @@ -1371,13 +1731,13 @@ SPL_METHOD(SplFileObject, fgetc) Get a line from file pointer and strip HTML tags */ SPL_METHOD(SplFileObject, fgetss) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); zval *arg2 = NULL; MAKE_STD_ZVAL(arg2); - ZVAL_LONG(arg2, intern->max_line_len); + ZVAL_LONG(arg2, intern->u.file.max_line_len); - spl_file_object_free_line(intern TSRMLS_CC); - intern->current_line_num++; + spl_filesystem_file_free_line(intern TSRMLS_CC); + intern->u.file.current_line_num++; FileFunctionCall(fgetss, arg2); @@ -1388,19 +1748,19 @@ SPL_METHOD(SplFileObject, fgetss) Output all remaining data from a file pointer */ SPL_METHOD(SplFileObject, fpassthru) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - RETURN_LONG(php_stream_passthru(intern->stream)); + RETURN_LONG(php_stream_passthru(intern->u.file.stream)); } /* }}} */ /* {{{ proto bool SplFileObject::fscanf(string format [, string ...]) Implements a mostly ANSI compatible fscanf() */ SPL_METHOD(SplFileObject, fscanf) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - spl_file_object_free_line(intern TSRMLS_CC); - intern->current_line_num++; + spl_filesystem_file_free_line(intern TSRMLS_CC); + intern->u.file.current_line_num++; FileFunctionCall(fscanf, NULL); } @@ -1410,7 +1770,7 @@ SPL_METHOD(SplFileObject, fscanf) Binary-safe file write */ SPL_METHOD(SplFileObject, fwrite) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char *str; int str_len; int ret; @@ -1430,12 +1790,12 @@ SPL_METHOD(SplFileObject, fwrite) if (PG(magic_quotes_runtime)) { str = estrndup(str, str_len); php_stripslashes(str, &str_len TSRMLS_CC); - ret = php_stream_write(intern->stream, str, str_len); + ret = php_stream_write(intern->u.file.stream, str, str_len); efree(str); RETURN_LONG(ret); } - RETURN_LONG(php_stream_write(intern->stream, str, str_len)); + RETURN_LONG(php_stream_write(intern->u.file.stream, str, str_len)); } /* }}} */ /* {{{ proto bool SplFileObject::fstat() @@ -1447,26 +1807,26 @@ FileFunction(fstat) Truncate file to 'size' length */ SPL_METHOD(SplFileObject, ftruncate) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); long size; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &size) == FAILURE) { return; } - if (!php_stream_truncate_supported(intern->stream)) { + if (!php_stream_truncate_supported(intern->u.file.stream)) { zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); RETURN_FALSE; } - RETURN_BOOL(0 == php_stream_truncate_set_size(intern->stream, size)); + RETURN_BOOL(0 == php_stream_truncate_set_size(intern->u.file.stream, size)); } /* }}} */ /* {{{ proto void SplFileObject::seek(int line_pos) Seek to specified line */ SPL_METHOD(SplFileObject, seek) { - spl_file_object *intern = (spl_file_object*)zend_object_store_get_object(getThis() TSRMLS_CC); + spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); long line_pos; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &line_pos) == FAILURE) { @@ -1477,13 +1837,12 @@ SPL_METHOD(SplFileObject, seek) RETURN_FALSE; } - spl_file_object_rewind(intern TSRMLS_CC); + spl_filesystem_file_rewind(intern TSRMLS_CC); - while(intern->current_line_num < line_pos) { - spl_file_object_read_line(getThis(), intern, 1 TSRMLS_CC); + while(intern->u.file.current_line_num < line_pos) { + spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC); } -} -/* }}} */ +} /* }}} */ /* {{{ Function/Class/Method definitions */ static @@ -1548,7 +1907,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_seek, 0, 0, 1) ZEND_ARG_INFO(0, line_pos) ZEND_END_ARG_INFO(); -static zend_function_entry spl_file_object_class_functions[] = { +static zend_function_entry spl_SplFileObject_functions[] = { SPL_ME(SplFileObject, __construct, arginfo_file_object___construct, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, getFilename, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, rewind, NULL, ZEND_ACC_PUBLIC) @@ -1577,34 +1936,57 @@ static zend_function_entry spl_file_object_class_functions[] = { SPL_ME(SplFileObject, hasChildren, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, getChildren, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, seek, arginfo_file_object_seek, ZEND_ACC_PUBLIC) - // mappings + /* mappings */ SPL_MA(SplFileObject, getCurrentLine, SplFileObject, fgets, NULL, ZEND_ACC_PUBLIC) SPL_MA(SplFileObject, __toString, SplFileObject, current, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_temp_file_object___construct, 0, 0, 1) + ZEND_ARG_INFO(0, max_memory) +ZEND_END_ARG_INFO(); + +static zend_function_entry spl_SplTempFileObject_functions[] = { + SPL_ME(SplTempFileObject, __construct, arginfo_temp_file_object___construct, ZEND_ACC_PUBLIC) + {NULL, NULL, NULL} +}; /* }}} */ /* {{{ PHP_MINIT_FUNCTION(spl_directory) */ PHP_MINIT_FUNCTION(spl_directory) { - REGISTER_SPL_STD_CLASS_EX(DirectoryIterator, spl_ce_dir_object_new, spl_ce_dir_class_functions); + REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, spl_SplFileInfo_functions); + memcpy(&spl_filesystem_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone; + spl_filesystem_object_handlers.cast_object = spl_filesystem_object_cast; + + REGISTER_SPL_SUB_CLASS_EX(DirectoryIterator, SplFileInfo, spl_filesystem_object_new, spl_DirectoryIterator_functions); zend_class_implements(spl_ce_DirectoryIterator TSRMLS_CC, 1, zend_ce_iterator); - memcpy(&spl_ce_dir_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); - spl_ce_dir_handlers.clone_obj = spl_ce_dir_object_clone; - spl_ce_dir_handlers.cast_object = spl_ce_dir_cast; - spl_ce_DirectoryIterator->get_iterator = spl_ce_dir_get_iterator; + spl_ce_DirectoryIterator->get_iterator = spl_filesystem_dir_get_iterator; - REGISTER_SPL_SUB_CLASS_EX(RecursiveDirectoryIterator, DirectoryIterator, spl_ce_dir_object_new, spl_ce_dir_tree_class_functions); + REGISTER_SPL_SUB_CLASS_EX(RecursiveDirectoryIterator, DirectoryIterator, spl_filesystem_object_new, spl_RecursiveDirectoryIterator_functions); REGISTER_SPL_IMPLEMENTS(RecursiveDirectoryIterator, RecursiveIterator); - spl_ce_RecursiveDirectoryIterator->get_iterator = spl_ce_dir_tree_get_iterator; + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_MODE_MASK", SPL_FILE_DIR_CURRENT_MODE_MASK); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_PATHNAME", SPL_FILE_DIR_CURRENT_AS_PATHNAME); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_FILEINFO", SPL_FILE_DIR_CURRENT_AS_FILEINFO); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "CURRENT_AS_SELF", 0); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_MODE_MASK", SPL_FILE_DIR_KEY_MODE_MASK); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_AS_PATHNAME", 0); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "KEY_AS_FILENAME", SPL_FILE_DIR_KEY_AS_FILENAME); + REGISTER_SPL_CLASS_CONST_LONG(RecursiveDirectoryIterator, "NEW_CURRENT_AND_KEY", SPL_FILE_DIR_KEY_AS_FILENAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO); - REGISTER_SPL_STD_CLASS_EX(SplFileObject, spl_file_object_new, spl_file_object_class_functions); + spl_ce_RecursiveDirectoryIterator->get_iterator = spl_filesystem_tree_get_iterator; + + REGISTER_SPL_SUB_CLASS_EX(SplFileObject, SplFileInfo, spl_filesystem_object_new, spl_SplFileObject_functions); REGISTER_SPL_IMPLEMENTS(SplFileObject, RecursiveIterator); REGISTER_SPL_IMPLEMENTS(SplFileObject, SeekableIterator); + REGISTER_SPL_SUB_CLASS_EX(SplTempFileObject, SplFileObject, spl_filesystem_object_new, spl_SplTempFileObject_functions); + REGISTER_SPL_CLASS_CONST_LONG(SplFileObject, "DROP_NEW_LINE", SPL_FILE_OBJECT_DROP_NEW_LINE); return SUCCESS; diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h index 397a78f23..a2bc9c4c0 100755 --- a/ext/spl/spl_directory.h +++ b/ext/spl/spl_directory.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.h,v 1.12.2.1 2005/09/15 14:08:14 helly Exp $ */ +/* $Id: spl_directory.h,v 1.12.2.3 2006/01/01 12:50:13 sniper Exp $ */ #ifndef SPL_DIRECTORY_H #define SPL_DIRECTORY_H @@ -24,45 +24,65 @@ #include "php.h" #include "php_spl.h" +extern PHPAPI zend_class_entry *spl_ce_SplFileInfo; extern PHPAPI zend_class_entry *spl_ce_DirectoryIterator; extern PHPAPI zend_class_entry *spl_ce_RecursiveDirectoryIterator; extern PHPAPI zend_class_entry *spl_ce_SplFileObject; +extern PHPAPI zend_class_entry *spl_ce_SplTempFileObject; PHP_MINIT_FUNCTION(spl_directory); -typedef struct _spl_ce_dir_object { - zend_object std; - php_stream *dirp; - php_stream_dirent entry; - char *path; - char *path_name; - int path_name_len; - char *sub_path; - int sub_path_len; - int index; -} spl_ce_dir_object; +typedef enum { + SPL_FS_INFO, + SPL_FS_DIR, + SPL_FS_FILE, +} SPL_FS_OBJ_TYPE; -typedef struct _spl_file_object { +typedef struct _spl_filesystem_object { zend_object std; - php_stream *stream; - php_stream_context *context; - zval *zcontext; + char *path; + int path_len; char *file_name; - int file_name_len; - char *open_mode; - int open_mode_len; - zval *current_zval; - char *current_line; - size_t current_line_len; - size_t max_line_len; - long current_line_num; + int file_name_len; + SPL_FS_OBJ_TYPE type; long flags; - zval zresource; - zend_function *func_getCurr; -} spl_file_object; + zend_class_entry *file_class; + zend_class_entry *info_class; + union { + struct { + php_stream *dirp; + php_stream_dirent entry; + char *sub_path; + int sub_path_len; + int index; + int is_recursive; + } dir; + struct { + php_stream *stream; + php_stream_context *context; + zval *zcontext; + char *open_mode; + int open_mode_len; + zval *current_zval; + char *current_line; + size_t current_line_len; + size_t max_line_len; + long current_line_num; + zval zresource; + zend_function *func_getCurr; + } file; + } u; +} spl_filesystem_object; #define SPL_FILE_OBJECT_DROP_NEW_LINE 0x00000001 /* drop new lines */ +#define SPL_FILE_DIR_CURRENT_AS_FILEINFO 0x00000010 /* make RecursiveDirectoryTree::current() return SplFileInfo */ +#define SPL_FILE_DIR_CURRENT_AS_PATHNAME 0x00000020 /* make RecursiveDirectoryTree::current() return getPathname() */ +#define SPL_FILE_DIR_CURRENT_MODE_MASK 0x000000F0 /* make RecursiveDirectoryTree::key() return getFilename() */ + +#define SPL_FILE_DIR_KEY_AS_FILENAME 0x00000100 /* make RecursiveDirectoryTree::key() return getFilename() */ +#define SPL_FILE_DIR_KEY_MODE_MASK 0x00000F00 /* make RecursiveDirectoryTree::key() return getFilename() */ + #endif /* SPL_DIRECTORY_H */ /* diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c index 43d39d17e..2da47f7d3 100755 --- a/ext/spl/spl_engine.c +++ b/ext/spl/spl_engine.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index 3828adbe6..0e953bbf1 100755 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_engine.h,v 1.19 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_engine.h,v 1.19.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef SPL_ENGINE_H #define SPL_ENGINE_H diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c index f3dfc91d6..8a7b70b30 100755 --- a/ext/spl/spl_exceptions.c +++ b/ext/spl/spl_exceptions.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_exceptions.c,v 1.6 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_exceptions.c,v 1.6.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h index 5ab54e745..581aace3c 100755 --- a/ext/spl/spl_exceptions.h +++ b/ext/spl/spl_exceptions.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_exceptions.h,v 1.5 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_exceptions.h,v 1.5.2.1 2006/01/01 12:50:13 sniper Exp $ */ #ifndef SPL_EXCEPTIONS_H #define SPL_EXCEPTIONS_H diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index efa152527..b257982d1 100755 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_functions.c,v 1.28 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_functions.c,v 1.28.2.2 2006/01/01 12:50:13 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,7 +50,7 @@ void spl_register_interface(zend_class_entry ** ppce, char * class_name, zend_fu /* }}} */ /* {{{ spl_register_std_class */ -void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void * obj_ctor, function_entry * function_list TSRMLS_DC) +void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void * obj_ctor, zend_function_entry * function_list TSRMLS_DC) { zend_class_entry ce; @@ -66,7 +66,7 @@ void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void * /* }}} */ /* {{{ spl_register_sub_class */ -void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, function_entry * function_list TSRMLS_DC) +void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, zend_function_entry * function_list TSRMLS_DC) { zend_class_entry ce; @@ -91,7 +91,7 @@ void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * p /* }}} */ /* {{{ spl_register_functions */ -void spl_register_functions(zend_class_entry * class_entry, function_entry * function_list TSRMLS_DC) +void spl_register_functions(zend_class_entry * class_entry, zend_function_entry * function_list TSRMLS_DC) { zend_register_functions(class_entry, function_list, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC); } diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h index 6f2f9a0eb..d175ef64f 100755 --- a/ext/spl/spl_functions.h +++ b/ext/spl/spl_functions.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_functions.h,v 1.19.2.1 2005/09/15 03:33:04 helly Exp $ */ +/* $Id: spl_functions.h,v 1.19.2.3 2006/01/01 12:50:13 sniper Exp $ */ #ifndef PHP_FUNCTIONS_H #define PHP_FUNCTIONS_H @@ -57,13 +57,13 @@ typedef zend_object_value (*create_object_func_t)(zend_class_entry *class_type T void spl_destroy_class(zend_class_entry ** ppce); -void spl_register_std_class(zend_class_entry ** ppce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC); -void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, create_object_func_t ctor, function_entry * function_list TSRMLS_DC); +void spl_register_std_class(zend_class_entry ** ppce, char * class_name, create_object_func_t ctor, zend_function_entry * function_list TSRMLS_DC); +void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, create_object_func_t ctor, zend_function_entry * function_list TSRMLS_DC); void spl_register_interface(zend_class_entry ** ppce, char * class_name, zend_function_entry *functions TSRMLS_DC); void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * parent_class TSRMLS_DC); -void spl_register_functions(zend_class_entry * class_entry, function_entry * function_list TSRMLS_DC); +void spl_register_functions(zend_class_entry * class_entry, zend_function_entry * function_list TSRMLS_DC); void spl_register_property( zend_class_entry * class_entry, char *prop_name, zval *prop_val, int prop_flags TSRMLS_DC); /* sub: whether to allow subclasses/interfaces diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index c711bb65f..df065545f 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.73.2.6 2005/11/14 22:03:01 tony2001 Exp $ */ +/* $Id: spl_iterators.c,v 1.73.2.20 2006/01/01 19:55:27 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -36,8 +36,6 @@ #include "spl_array.h" #include "spl_exceptions.h" -#define INLINE inline - PHPAPI zend_class_entry *spl_ce_RecursiveIterator; PHPAPI zend_class_entry *spl_ce_RecursiveIteratorIterator; PHPAPI zend_class_entry *spl_ce_FilterIterator; @@ -54,7 +52,7 @@ PHPAPI zend_class_entry *spl_ce_InfiniteIterator; PHPAPI zend_class_entry *spl_ce_EmptyIterator; PHPAPI zend_class_entry *spl_ce_AppendIterator; -function_entry spl_funcs_RecursiveIterator[] = { +zend_function_entry spl_funcs_RecursiveIterator[] = { SPL_ABSTRACT_ME(RecursiveIterator, hasChildren, NULL) SPL_ABSTRACT_ME(RecursiveIterator, getChildren, NULL) {NULL, NULL, NULL} @@ -208,15 +206,15 @@ next_step: zval_ptr_dtor(&retval); if (has_children) { if (object->max_depth == -1 || object->max_depth > object->level) { - switch (object->mode) { - case RIT_LEAVES_ONLY: - case RIT_CHILD_FIRST: - object->iterators[object->level].state = RS_CHILD; - goto next_step; - case RIT_SELF_FIRST: - object->iterators[object->level].state = RS_SELF; - goto next_step; - } + switch (object->mode) { + case RIT_LEAVES_ONLY: + case RIT_CHILD_FIRST: + object->iterators[object->level].state = RS_CHILD; + goto next_step; + case RIT_SELF_FIRST: + object->iterators[object->level].state = RS_SELF; + goto next_step; + } } else { /* do not recurse into */ if (object->mode == RIT_LEAVES_ONLY) { @@ -317,7 +315,7 @@ static void spl_recursive_it_rewind_ex(spl_recursive_it_object *object, zval *zt zend_call_method_with_0_params(&zthis, object->ce, &object->endChildren, "endchildren", NULL); } } - erealloc(object->iterators, sizeof(spl_sub_iterator)); + object->iterators = erealloc(object->iterators, sizeof(spl_sub_iterator)); object->iterators[0].state = RS_START; sub_iter = object->iterators[0].iterator; if (sub_iter->funcs->rewind) { @@ -370,6 +368,7 @@ SPL_METHOD(RecursiveIteratorIterator, __construct) zval *iterator; zend_class_entry *ce_iterator; long mode = RIT_LEAVES_ONLY, flags = 0; + int inc_refcount = 1; php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); @@ -377,11 +376,15 @@ SPL_METHOD(RecursiveIteratorIterator, __construct) if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate TSRMLS_CC)) { zval *aggregate = iterator; zend_call_method_with_0_params(&aggregate, Z_OBJCE_P(aggregate), &Z_OBJCE_P(aggregate)->iterator_funcs.zf_new_iterator, "getiterator", &iterator); + inc_refcount = 0; } } else { iterator = NULL; } if (!iterator || !instanceof_function(Z_OBJCE_P(iterator), spl_ce_RecursiveIterator TSRMLS_CC)) { + if (iterator && !inc_refcount) { + zval_ptr_dtor(&iterator); + } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); zend_throw_exception(spl_ce_InvalidArgumentException, "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); return; @@ -426,7 +429,9 @@ SPL_METHOD(RecursiveIteratorIterator, __construct) } ce_iterator = Z_OBJCE_P(iterator); /* respect inheritance, don't use spl_ce_RecursiveIterator */ intern->iterators[0].iterator = ce_iterator->get_iterator(ce_iterator, iterator TSRMLS_CC); - iterator->refcount++; + if (inc_refcount) { + iterator->refcount++; + } intern->iterators[0].zobject = iterator; intern->iterators[0].ce = ce_iterator; intern->iterators[0].state = RS_START; @@ -810,13 +815,14 @@ int spl_dual_it_call_method(char *method, INTERNAL_FUNCTION_PARAMETERS) } #endif -static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC); +static inline int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC); -static INLINE spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_inner, dual_it_type dit_type) +static inline spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_inner, dual_it_type dit_type) { - zval *zobject; + zval *zobject, *retval; spl_dual_it_object *intern; zend_class_entry *ce; + int inc_refcount = 1; php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); @@ -882,9 +888,15 @@ static INLINE spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAME ce = *pce_cast; } if (instanceof_function(ce, zend_ce_aggregate TSRMLS_CC)) { - zval *retval; - zobject = zend_call_method_with_0_params(&zobject, ce, &ce->iterator_funcs.zf_new_iterator, "getiterator", &retval); + zend_call_method_with_0_params(&zobject, ce, &ce->iterator_funcs.zf_new_iterator, "getiterator", &retval); + if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), zend_ce_traversable TSRMLS_CC)) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); + return NULL; + } + zobject = retval; ce = Z_OBJCE_P(zobject); + inc_refcount = 0; } } break; @@ -905,7 +917,9 @@ static INLINE spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAME php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC); - zobject->refcount++; + if (inc_refcount) { + zobject->refcount++; + } intern->inner.zobject = zobject; intern->inner.ce = dit_type == DIT_IteratorIterator ? ce : Z_OBJCE_P(zobject); intern->inner.object = zend_object_store_get_object(zobject TSRMLS_CC); @@ -940,14 +954,14 @@ SPL_METHOD(dual_it, getInnerIterator) } } /* }}} */ -static INLINE void spl_dual_it_require(spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_dual_it_require(spl_dual_it_object *intern TSRMLS_DC) { if (!intern->inner.iterator) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "The inner constructor wasn't initialized with an iterator instance"); } } -static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC) { if (intern->inner.iterator && intern->inner.iterator->funcs->invalidate_current) { intern->inner.iterator->funcs->invalidate_current(intern->inner.iterator TSRMLS_CC); @@ -972,7 +986,7 @@ static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC) } } -static INLINE void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC) { spl_dual_it_free(intern TSRMLS_CC); intern->current.pos = 0; @@ -981,13 +995,13 @@ static INLINE void spl_dual_it_rewind(spl_dual_it_object *intern TSRMLS_DC) } } -static INLINE int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC) +static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC) { /* FAILURE / SUCCESS */ return intern->inner.iterator->funcs->valid(intern->inner.iterator TSRMLS_CC); } -static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC) +static inline int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more TSRMLS_DC) { zval **data; @@ -1007,7 +1021,7 @@ static INLINE int spl_dual_it_fetch(spl_dual_it_object *intern, int check_more T return FAILURE; } -static INLINE void spl_dual_it_next(spl_dual_it_object *intern, int do_free TSRMLS_DC) +static inline void spl_dual_it_next(spl_dual_it_object *intern, int do_free TSRMLS_DC) { if (do_free) { spl_dual_it_free(intern TSRMLS_CC); @@ -1104,7 +1118,7 @@ SPL_METHOD(dual_it, next) spl_dual_it_fetch(intern, 1 TSRMLS_CC); } /* }}} */ -static INLINE void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) { zval *retval; @@ -1123,13 +1137,13 @@ static INLINE void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern T spl_dual_it_free(intern TSRMLS_CC); } -static INLINE void spl_filter_it_rewind(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_filter_it_rewind(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) { spl_dual_it_rewind(intern TSRMLS_CC); spl_filter_it_fetch(zthis, intern TSRMLS_CC); } -static INLINE void spl_filter_it_next(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_filter_it_next(zval *zthis, spl_dual_it_object *intern TSRMLS_DC) { spl_dual_it_next(intern, 1 TSRMLS_CC); spl_filter_it_fetch(zthis, intern TSRMLS_CC); @@ -1224,7 +1238,7 @@ SPL_METHOD(ParentIterator, getChildren) } /* }}} */ /* {{{ spl_dual_it_free_storage */ -static INLINE void spl_dual_it_free_storage(void *_object TSRMLS_DC) +static inline void spl_dual_it_free_storage(void *_object TSRMLS_DC) { spl_dual_it_object *object = (spl_dual_it_object *)_object; @@ -1310,7 +1324,7 @@ static zend_function_entry spl_funcs_ParentIterator[] = { {NULL, NULL, NULL} }; -static INLINE int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC) +static inline int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC) { /* FAILURE / SUCCESS */ if (intern->u.limit.count != -1 && intern->current.pos >= intern->u.limit.offset + intern->u.limit.count) { @@ -1320,7 +1334,7 @@ static INLINE int spl_limit_it_valid(spl_dual_it_object *intern TSRMLS_DC) } } -static INLINE void spl_limit_it_seek(spl_dual_it_object *intern, long pos TSRMLS_DC) +static inline void spl_limit_it_seek(spl_dual_it_object *intern, long pos TSRMLS_DC) { zval *zpos; @@ -1462,17 +1476,17 @@ static zend_function_entry spl_funcs_LimitIterator[] = { {NULL, NULL, NULL} }; -static INLINE int spl_caching_it_valid(spl_dual_it_object *intern TSRMLS_DC) +static inline int spl_caching_it_valid(spl_dual_it_object *intern TSRMLS_DC) { return intern->u.caching.flags & CIT_VALID ? SUCCESS : FAILURE; } -static INLINE int spl_caching_it_has_next(spl_dual_it_object *intern TSRMLS_DC) +static inline int spl_caching_it_has_next(spl_dual_it_object *intern TSRMLS_DC) { return spl_dual_it_valid(intern TSRMLS_CC); } -static INLINE void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC) { if (spl_dual_it_fetch(intern, 1 TSRMLS_CC) == SUCCESS) { intern->u.caching.flags |= CIT_VALID; @@ -1544,7 +1558,7 @@ static INLINE void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC) } } -static INLINE void spl_caching_it_rewind(spl_dual_it_object *intern TSRMLS_DC) +static inline void spl_caching_it_rewind(spl_dual_it_object *intern TSRMLS_DC) { spl_dual_it_rewind(intern TSRMLS_CC); spl_caching_it_next(intern TSRMLS_CC); @@ -1887,7 +1901,10 @@ int spl_append_it_next_iterator(spl_dual_it_object *intern TSRMLS_DC) /* {{{*/ intern->inner.zobject = NULL; intern->inner.ce = NULL; intern->inner.object = NULL; - intern->inner.iterator = NULL; + if (intern->inner.iterator) { + intern->inner.iterator->funcs->dtor(intern->inner.iterator TSRMLS_CC); + intern->inner.iterator = NULL; + } } if (intern->u.append.iterator->funcs->valid(intern->u.append.iterator TSRMLS_CC) == SUCCESS) { zval **it; @@ -2028,19 +2045,25 @@ PHP_FUNCTION(iterator_to_array) iter = Z_OBJCE_P(obj)->get_iterator(Z_OBJCE_P(obj), obj TSRMLS_CC); - iter->funcs->rewind(iter TSRMLS_CC); + if (iter->funcs->rewind) { + iter->funcs->rewind(iter TSRMLS_CC); + } while (iter->funcs->valid(iter TSRMLS_CC) == SUCCESS) { - key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC); iter->funcs->get_current_data(iter, &data TSRMLS_CC); (*data)->refcount++; - switch(key_type) { - case HASH_KEY_IS_STRING: - add_assoc_zval_ex(return_value, str_key, str_key_len, *data); - efree(str_key); - break; - case HASH_KEY_IS_LONG: - add_index_zval(return_value, int_key, *data); - break; + if (iter->funcs->get_current_key) { + key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC); + switch(key_type) { + case HASH_KEY_IS_STRING: + add_assoc_zval_ex(return_value, str_key, str_key_len, *data); + efree(str_key); + break; + case HASH_KEY_IS_LONG: + add_index_zval(return_value, int_key, *data); + break; + } + } else { + add_next_index_zval(return_value, *data); } iter->funcs->move_forward(iter TSRMLS_CC); } @@ -2062,7 +2085,9 @@ PHP_FUNCTION(iterator_count) iter = Z_OBJCE_P(obj)->get_iterator(Z_OBJCE_P(obj), obj TSRMLS_CC); - iter->funcs->rewind(iter TSRMLS_CC); + if (iter->funcs->rewind) { + iter->funcs->rewind(iter TSRMLS_CC); + } while (iter->funcs->valid(iter TSRMLS_CC) == SUCCESS) { count++; iter->funcs->move_forward(iter TSRMLS_CC); diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h index 7c951791c..faad41da9 100755 --- a/ext/spl/spl_iterators.h +++ b/ext/spl/spl_iterators.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.h,v 1.18.2.5 2005/10/08 19:09:58 helly Exp $ */ +/* $Id: spl_iterators.h,v 1.18.2.6 2006/01/01 12:50:14 sniper Exp $ */ #ifndef SPL_ITERATORS_H #define SPL_ITERATORS_H diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index fae0d58ab..5f3d271cf 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is SplSubject to version 3.0 of the PHP license, | + | This source file is SplSubject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.c,v 1.2.2.2 2005/11/14 22:03:02 tony2001 Exp $ */ +/* $Id: spl_observer.c,v 1.2.2.5 2006/01/01 12:50:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -129,13 +129,25 @@ static zend_object_value spl_SplObjectStorage_new(zend_class_entry *class_type T SPL_METHOD(SplObjectStorage, attach) { zval *obj; + spl_SplObjectStorage *intern = (spl_SplObjectStorage*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { return; } - - zend_hash_update(&intern->storage, (char*)&obj->value.obj, sizeof(obj->value.obj), &obj, sizeof(zval**), NULL); + +#if HAVE_PACKED_OBJECT_VALUE + zend_hash_update(&intern->storage, (char*)&Z_OBJVAL_P(obj), sizeof(zend_object_value), &obj, sizeof(zval*), NULL); +#else + { + zend_object_value zvalue; + memset(&zvalue, 0, sizeof(zend_object_value)); + zvalue.handle = Z_OBJ_HANDLE_P(obj); + zvalue.handlers = Z_OBJ_HT_P(obj); + zend_hash_update(&intern->storage, (char*)&zvalue, sizeof(zend_object_value), &obj, sizeof(zval*), NULL); + } +#endif + obj->refcount++; } /* }}} */ @@ -149,8 +161,19 @@ SPL_METHOD(SplObjectStorage, detach) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { return; } - - zend_hash_del(&intern->storage, (char*)&obj->value.obj, sizeof(obj->value.obj)); + +#if HAVE_PACKED_OBJECT_VALUE + zend_hash_del(&intern->storage, (char*)&Z_OBJVAL_P(obj), sizeof(zend_object_value)); +#else + { + zend_object_value zvalue; + memset(&zvalue, 0, sizeof(zend_object_value)); + zvalue.handle = Z_OBJ_HANDLE_P(obj); + zvalue.handlers = Z_OBJ_HT_P(obj); + zend_hash_del(&intern->storage, (char*)&zvalue, sizeof(zend_object_value)); + } +#endif + zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); intern->index = 0; } /* }}} */ @@ -165,8 +188,18 @@ SPL_METHOD(SplObjectStorage, contains) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) { return; } - - RETURN_BOOL(zend_hash_exists(&intern->storage, (char*)&obj->value.obj, sizeof(obj->value.obj))); + +#if HAVE_PACKED_OBJECT_VALUE + RETURN_BOOL(zend_hash_exists(&intern->storage, (char*)&Z_OBJVAL_P(obj), sizeof(zend_object_value))); +#else + { + zend_object_value zvalue; + memset(&zvalue, 0, sizeof(zend_object_value)); + zvalue.handle = Z_OBJ_HANDLE_P(obj); + zvalue.handlers = Z_OBJ_HT_P(obj); + RETURN_BOOL(zend_hash_exists(&intern->storage, (char*)&zvalue, sizeof(zend_object_value))); + } +#endif } /* }}} */ /* {{{ proto int SplObjectStorage::count() diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h index c0dc17d0f..798d0fc91 100755 --- a/ext/spl/spl_observer.h +++ b/ext/spl/spl_observer.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.h,v 1.2.2.1 2005/09/15 03:33:04 helly Exp $ */ +/* $Id: spl_observer.h,v 1.2.2.2 2006/01/01 12:50:14 sniper Exp $ */ #ifndef SPL_OBSERVER_H #define SPL_OBSERVER_H diff --git a/ext/spl/spl_sxe.c b/ext/spl/spl_sxe.c index ab554a694..f2568371c 100755 --- a/ext/spl/spl_sxe.c +++ b/ext/spl/spl_sxe.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_sxe.c,v 1.8.2.2 2005/10/03 16:05:08 helly Exp $ */ +/* $Id: spl_sxe.c,v 1.8.2.3 2006/01/01 12:50:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_sxe.h b/ext/spl/spl_sxe.h index f034d20e0..12b2bb4e7 100755 --- a/ext/spl/spl_sxe.h +++ b/ext/spl/spl_sxe.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_sxe.h,v 1.4 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: spl_sxe.h,v 1.4.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef SPL_SXE_H #define SPL_SXE_H diff --git a/ext/spl/tests/array_015.phpt b/ext/spl/tests/array_015.phpt index 6f8c88c29..769f0b200 100755 --- a/ext/spl/tests/array_015.phpt +++ b/ext/spl/tests/array_015.phpt @@ -1,5 +1,7 @@ --TEST-- SPL: ArrayIterator::next() with internal arrays +--SKIPIF-- + --FILE-- --FILE-- diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt index b4f315b0b..421eb89ec 100755 --- a/ext/spl/tests/bug31185.phpt +++ b/ext/spl/tests/bug31185.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #31185 (Crash when exceptions thrown from ArrayAccess::offsetUnset()) +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- = -1" int(4) ===DONE=== ---UEXPECT-- -===?=== -bool(false) -0: 1 -0: 2 -1: 31 -1: 32 -2: 331 -3: 3321 -4: 33221 -0: 4 -===2=== -int(2) -0: 1 -0: 2 -1: 31 -1: 32 -2: 331 -0: 4 -===X=== -bool(false) -0: 1 -0: 2 -1: 31 -1: 32 -2: 331 -3: 3321 -4: 33221 -0: 4 -===3=== -int(3) -0: 1 -0: 2 -1: 31 -1: 32 -2: 331 -3: 3321 -0: 4 -===5=== -int(5) -0: 1 -0: 2 -1: 31 -1: 32 -2: 331 -3: 3321 -4: 33221 -0: 4 -===0=== -int(0) -0: 1 -0: 2 -0: 4 -===-1=== -bool(false) -unicode(33) "Parameter max_depth must be >= -1" -int(4) -===DONE=== diff --git a/ext/spl/tests/observer_001.phpt b/ext/spl/tests/observer_001.phpt index e7d72b9e2..d161a4776 100755 --- a/ext/spl/tests/observer_001.phpt +++ b/ext/spl/tests/observer_001.phpt @@ -1,5 +1,7 @@ --TEST-- SPL: SplObserver and SplSubject (empty notify) +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --INI-- include_path=. --FILE-- diff --git a/ext/spl/tests/spl_autoload_002.phpt b/ext/spl/tests/spl_autoload_002.phpt index 21caa43bf..e7fda9c44 100755 --- a/ext/spl/tests/spl_autoload_002.phpt +++ b/ext/spl/tests/spl_autoload_002.phpt @@ -1,7 +1,10 @@ --TEST-- SPL: spl_autoloadfunctions() --SKIPIF-- - + --FILE-- --INI-- include_path=. --FILE-- diff --git a/ext/spl/tests/spl_autoload_004.phpt b/ext/spl/tests/spl_autoload_004.phpt index 627d39d13..9a91dd7f6 100755 --- a/ext/spl/tests/spl_autoload_004.phpt +++ b/ext/spl/tests/spl_autoload_004.phpt @@ -1,5 +1,7 @@ --TEST-- SPL: spl_autoload() with static methods +--SKIPIF-- + --INI-- include_path=. --FILE-- @@ -41,16 +43,3 @@ array(1) { MyAutoLoader::autoLoad(TestClass) bool(false) ===DONE=== ---UEXPECTF-- -array(1) { - [0]=> - array(2) { - [0]=> - unicode(12) "MyAutoLoader" - [1]=> - unicode(8) "autoLoad" - } -} -MyAutoLoader::autoLoad(TestClass) -bool(false) -===DONE=== diff --git a/ext/spl/tests/spl_autoload_005.phpt b/ext/spl/tests/spl_autoload_005.phpt index 51af204c5..27991547b 100755 --- a/ext/spl/tests/spl_autoload_005.phpt +++ b/ext/spl/tests/spl_autoload_005.phpt @@ -1,5 +1,7 @@ --TEST-- SPL: spl_autoload() with methods +--SKIPIF-- + --INI-- include_path=. --FILE-- diff --git a/ext/spl/tests/spl_autoload_006.phpt b/ext/spl/tests/spl_autoload_006.phpt index 36cf5ca19..f704c4c75 100755 --- a/ext/spl/tests/spl_autoload_006.phpt +++ b/ext/spl/tests/spl_autoload_006.phpt @@ -1,5 +1,7 @@ --TEST-- SPL: spl_autoload() with static methods +--SKIPIF-- + --INI-- include_path=. --FILE-- diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt new file mode 100755 index 000000000..ad5df1a41 --- /dev/null +++ b/ext/spl/tests/spl_autoload_007.phpt @@ -0,0 +1,140 @@ +--TEST-- +SPL: spl_autoload() with inaccessible methods +--SKIPIF-- + +--INI-- +include_path=. +--FILE-- + $func) +{ + if ($idx) echo "\n"; + try + { + var_dump($func); + spl_autoload_register($func); + echo "ok\n"; + } + catch (Exception $e) + { + echo $e->getMessage() . "\n"; + } +} + +?> +===DONE=== + +--EXPECTF-- +string(22) "MyAutoLoader::notExist" +Function 'MyAutoLoader::notExist' not found + +string(22) "MyAutoLoader::noAccess" +Function 'MyAutoLoader::noAccess' not callable + +string(22) "MyAutoLoader::autoLoad" +ok + +string(22) "MyAutoLoader::dynaLoad" +Function 'MyAutoLoader::dynaLoad' not callable + +array(2) { + [0]=> + string(12) "MyAutoLoader" + [1]=> + string(8) "notExist" +} +Passed array does not specify an existing static method + +array(2) { + [0]=> + string(12) "MyAutoLoader" + [1]=> + string(8) "noAccess" +} +Passed array does not specify a callable static method + +array(2) { + [0]=> + string(12) "MyAutoLoader" + [1]=> + string(8) "autoLoad" +} +ok + +array(2) { + [0]=> + string(12) "MyAutoLoader" + [1]=> + string(8) "dynaLoad" +} +Passed array specifies a non static method but no object + +array(2) { + [0]=> + object(MyAutoLoader)#%d (0) { + } + [1]=> + string(8) "notExist" +} +Passed array does not specify an existing method + +array(2) { + [0]=> + object(MyAutoLoader)#%d (0) { + } + [1]=> + string(8) "noAccess" +} +Passed array does not specify a callable method + +array(2) { + [0]=> + object(MyAutoLoader)#%d (0) { + } + [1]=> + string(8) "autoLoad" +} +ok + +array(2) { + [0]=> + object(MyAutoLoader)#%d (0) { + } + [1]=> + string(8) "dynaLoad" +} +ok +===DONE=== diff --git a/ext/spl/tests/sxe_001.phpt b/ext/spl/tests/sxe_001.phpt index 72180d6a1..c6e6b41d0 100755 --- a/ext/spl/tests/sxe_001.phpt +++ b/ext/spl/tests/sxe_001.phpt @@ -26,38 +26,39 @@ $xml =<< EOF; -$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); - -print_r($sxe); +var_dump(simplexml_load_string($xml, 'SimpleXMLIterator')); ?> ===DONE=== ---EXPECT-- -SimpleXMLIterator Object -( - [elem1] => SimpleXMLIterator Object - ( - [comment] => SimpleXMLIterator Object - ( - ) - - [elem2] => SimpleXMLIterator Object - ( - [elem3] => SimpleXMLIterator Object - ( - [elem4] => SimpleXMLIterator Object - ( - [test] => SimpleXMLIterator Object - ( - ) - - ) - - ) - - ) - - ) - -) +--EXPECTF-- +object(SimpleXMLIterator)#%d (2) { + ["@attributes"]=> + array(1) { + ["id"]=> + string(5) "elem1" + } + ["elem1"]=> + object(SimpleXMLIterator)#%d (3) { + ["@attributes"]=> + array(1) { + ["attr1"]=> + string(5) "first" + } + ["comment"]=> + object(SimpleXMLIterator)#%d (0) { + } + ["elem2"]=> + object(SimpleXMLIterator)#%d (1) { + ["elem3"]=> + object(SimpleXMLIterator)#%d (1) { + ["elem4"]=> + object(SimpleXMLIterator)#%d (1) { + ["test"]=> + object(SimpleXMLIterator)#%d (0) { + } + } + } + } + } +} ===DONE=== diff --git a/ext/spl/tests/sxe_004.phpt b/ext/spl/tests/sxe_004.phpt index 487de4507..718a626b6 100755 --- a/ext/spl/tests/sxe_004.phpt +++ b/ext/spl/tests/sxe_004.phpt @@ -145,62 +145,3 @@ SXETest::next SXETest::valid SXETest::valid ===DONE=== ---UEXPECTF-- -SXETest::rewind -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(10) "Bla bla 1." -SXETest::getChildren -SXETest::rewind -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(28) "Here we have some text data." -SXETest::getChildren -SXETest::rewind -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(19) "And here some more." -SXETest::getChildren -SXETest::rewind -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(15) "Wow once again." -SXETest::next -SXETest::valid -SXETest::next -SXETest::valid -SXETest::next -SXETest::valid -SXETest::next -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(10) "Bla bla 2." -SXETest::getChildren -SXETest::rewind -SXETest::valid -SXETest::hasChildren -SXETest::valid -SXETest::current -unicode(7) "SXETest" -unicode(7) "Foo Bar" -SXETest::next -SXETest::valid -SXETest::next -SXETest::valid -SXETest::valid -===DONE=== diff --git a/ext/sqlite/config.m4 b/ext/sqlite/config.m4 index f1cddc345..e296c954c 100644 --- a/ext/sqlite/config.m4 +++ b/ext/sqlite/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.41 2005/06/14 01:44:16 sniper Exp $ +dnl $Id: config.m4,v 1.41.2.1 2005/11/30 04:50:03 wez Exp $ dnl config.m4 for extension sqlite dnl vim:et:ts=2:sw=2 @@ -105,16 +105,15 @@ if test "$PHP_SQLITE" != "no"; then libsqlite/src/vacuum.c libsqlite/src/copy.c \ libsqlite/src/vdbeaux.c libsqlite/src/date.c \ libsqlite/src/where.c libsqlite/src/trigger.c" - - PHP_ADD_EXTENSION_DEP(sqlite, spl) - PHP_ADD_EXTENSION_DEP(sqlite, pdo) fi - dnl dnl Common for both bundled/external dnl sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" PHP_NEW_EXTENSION(sqlite, $sqlite_sources, $ext_shared,,$PHP_SQLITE_CFLAGS) + PHP_ADD_EXTENSION_DEP(sqlite, spl, true) + PHP_ADD_EXTENSION_DEP(sqlite, pdo, true) + PHP_ADD_MAKEFILE_FRAGMENT PHP_SUBST(SQLITE_SHARED_LIBADD) PHP_INSTALL_HEADERS([$ext_builddir/libsqlite/src/sqlite.h]) diff --git a/ext/sqlite/libsqlite/VERSION b/ext/sqlite/libsqlite/VERSION index 85c0a6a96..6ece8e7d5 100644 --- a/ext/sqlite/libsqlite/VERSION +++ b/ext/sqlite/libsqlite/VERSION @@ -1 +1 @@ -2.8.16 +2.8.17 diff --git a/ext/sqlite/libsqlite/src/os.c b/ext/sqlite/libsqlite/src/os.c index 930d62440..dccd65f1d 100644 --- a/ext/sqlite/libsqlite/src/os.c +++ b/ext/sqlite/libsqlite/src/os.c @@ -1778,6 +1778,7 @@ char *sqliteOsFullPathname(const char *zRelative){ sqliteSetString(&zFull, zRelative, (char*)0); }else{ char zBuf[5000]; + zBuf[0] = 0; sqliteSetString(&zFull, getcwd(zBuf, sizeof(zBuf)), "/", zRelative, (char*)0); } diff --git a/ext/sqlite/libsqlite/src/pager.c b/ext/sqlite/libsqlite/src/pager.c index e8ba27fa6..64c3e4d7b 100644 --- a/ext/sqlite/libsqlite/src/pager.c +++ b/ext/sqlite/libsqlite/src/pager.c @@ -18,7 +18,7 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.6.4.1 2005/09/07 15:11:32 iliaa Exp $ +** @(#) $Id: pager.c,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $ */ #include "os.h" /* Must be first to enable large file support */ #include "sqliteInt.h" @@ -1929,7 +1929,7 @@ void sqlitepager_dont_write(Pager *pPager, Pgno pgno){ pPg = pager_lookup(pPager, pgno); pPg->alwaysRollback = 1; - if( pPg && pPg->dirty ){ + if( pPg && pPg->dirty && !pPager->ckptInUse ){ if( pPager->dbSize==(int)pPg->pgno && pPager->origDbSizedbSize ){ /* If this pages is the last page in the file and the file has grown ** during the current transaction, then do NOT mark the page as clean. diff --git a/ext/sqlite/libsqlite/src/parse.c b/ext/sqlite/libsqlite/src/parse.c index 1c5264ca6..64ec3457d 100644 --- a/ext/sqlite/libsqlite/src/parse.c +++ b/ext/sqlite/libsqlite/src/parse.c @@ -1,10 +1,10 @@ /* Driver template for the LEMON parser generator. -** The author disclaims copyright to this source code. +** The author disclaims copyright to this source code. */ /* First off, code is include which follows the "include" declaration ** in the input file. */ #include -#line 33 "parse.y" +#line 33 "ext/sqlite/libsqlite/src/parse.y" #include "sqliteInt.h" #include "parse.h" @@ -29,8 +29,7 @@ struct LimitVal { */ struct TrigEvent { int a; IdList * b; }; - -#line 34 "parse.c" +#line 34 "ext/sqlite/libsqlite/src/parse.c" /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ @@ -79,7 +78,6 @@ struct TrigEvent { int a; IdList * b; }; ** YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ -/*  */ #define YYCODETYPE unsigned char #define YYNOCODE 221 #define YYACTIONTYPE unsigned short int @@ -161,7 +159,7 @@ typedef union { ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. */ -static YYACTIONTYPE yy_action[] = { +static const YYACTIONTYPE yy_action[] = { /* 0 */ 264, 5, 262, 119, 123, 117, 121, 129, 131, 133, /* 10 */ 135, 144, 146, 148, 150, 152, 154, 568, 106, 106, /* 20 */ 143, 857, 1, 562, 3, 142, 129, 131, 133, 135, @@ -292,7 +290,7 @@ static YYACTIONTYPE yy_action[] = { /* 1270 */ 556, 550, 850, 547, 549, 851, 555, 558, 551, 855, /* 1280 */ 553, 559, }; -static YYCODETYPE yy_lookahead[] = { +static const YYCODETYPE yy_lookahead[] = { /* 0 */ 21, 9, 23, 70, 71, 72, 73, 74, 75, 76, /* 10 */ 77, 78, 79, 80, 81, 82, 83, 9, 140, 140, /* 20 */ 41, 132, 133, 134, 135, 46, 74, 75, 76, 77, @@ -424,7 +422,7 @@ static YYCODETYPE yy_lookahead[] = { /* 1280 */ 219, 140, }; #define YY_SHIFT_USE_DFLT (-68) -static short yy_shift_ofst[] = { +static const short yy_shift_ofst[] = { /* 0 */ 170, 113, -68, 746, -8, -68, 8, 127, 288, 239, /* 10 */ 348, 167, -68, -68, -68, -68, -68, -68, 547, -68, /* 20 */ -68, -68, -68, 115, 613, 115, 723, 115, 761, 44, @@ -484,7 +482,7 @@ static short yy_shift_ofst[] = { /* 560 */ -68, -68, -68, }; #define YY_REDUCE_USE_DFLT (-123) -static short yy_reduce_ofst[] = { +static const short yy_reduce_ofst[] = { /* 0 */ -111, 55, -123, 643, -123, -123, -123, -100, 82, -123, /* 10 */ -123, 233, -123, -123, -123, -123, -123, -123, 310, -123, /* 20 */ -123, -123, -123, 442, -123, 448, -123, 542, -123, 540, @@ -543,7 +541,7 @@ static short yy_reduce_ofst[] = { /* 550 */ -123, 1129, 1061, -123, 1124, -123, -123, 1059, 1141, -123, /* 560 */ -123, -123, -123, }; -static YYACTIONTYPE yy_default[] = { +static const YYACTIONTYPE yy_default[] = { /* 0 */ 570, 570, 564, 856, 856, 566, 856, 572, 856, 856, /* 10 */ 856, 856, 652, 655, 656, 657, 658, 659, 573, 574, /* 20 */ 591, 592, 593, 856, 856, 856, 856, 856, 856, 856, @@ -816,7 +814,7 @@ void sqliteParserTrace(FILE *TraceFILE, char *zTracePrompt){ #ifndef NDEBUG /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ -static const char *yyTokenName[] = { +static const char *const yyTokenName[] = { "$", "END_OF_FILE", "ILLEGAL", "SPACE", "UNCLOSED_STRING", "COMMENT", "FUNCTION", "COLUMN", "AGG_FUNCTION", "SEMI", "EXPLAIN", "BEGIN", @@ -878,7 +876,7 @@ static const char *yyTokenName[] = { #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. */ -static const char *yyRuleName[] = { +static const char *const yyRuleName[] = { /* 0 */ "input ::= cmdlist", /* 1 */ "cmdlist ::= cmdlist ecmd", /* 2 */ "cmdlist ::= ecmd", @@ -1230,149 +1228,61 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ ** inside the C code. */ case 146: -#line 286 "parse.y" + case 171: + case 189: +#line 286 "ext/sqlite/libsqlite/src/parse.y" {sqliteSelectDelete((yypminor->yy179));} -#line 1235 "parse.c" +#line 1237 "ext/sqlite/libsqlite/src/parse.c" break; case 158: -#line 533 "parse.y" + case 176: + case 178: + case 187: + case 192: + case 204: +#line 533 "ext/sqlite/libsqlite/src/parse.y" {sqliteExprDelete((yypminor->yy242));} -#line 1240 "parse.c" +#line 1247 "ext/sqlite/libsqlite/src/parse.c" break; case 159: -#line 746 "parse.y" -{sqliteIdListDelete((yypminor->yy320));} -#line 1245 "parse.c" - break; case 167: -#line 744 "parse.y" + case 188: + case 197: + case 199: +#line 746 "ext/sqlite/libsqlite/src/parse.y" {sqliteIdListDelete((yypminor->yy320));} -#line 1250 "parse.c" - break; - case 171: -#line 288 "parse.y" -{sqliteSelectDelete((yypminor->yy179));} -#line 1255 "parse.c" +#line 1256 "ext/sqlite/libsqlite/src/parse.c" break; case 174: -#line 322 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1260 "parse.c" - break; - case 175: -#line 353 "parse.y" -{sqliteSrcListDelete((yypminor->yy307));} -#line 1265 "parse.c" - break; - case 176: -#line 483 "parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1270 "parse.c" - break; case 177: -#line 459 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1275 "parse.c" - break; - case 178: -#line 464 "parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1280 "parse.c" - break; case 179: -#line 431 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1285 "parse.c" - break; case 181: -#line 324 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1290 "parse.c" - break; - case 183: -#line 349 "parse.y" -{sqliteSrcListDelete((yypminor->yy307));} -#line 1295 "parse.c" - break; - case 184: -#line 351 "parse.y" -{sqliteSrcListDelete((yypminor->yy307));} -#line 1300 "parse.c" - break; - case 187: -#line 420 "parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1305 "parse.c" - break; - case 188: -#line 425 "parse.y" -{sqliteIdListDelete((yypminor->yy320));} -#line 1310 "parse.c" - break; - case 189: -#line 400 "parse.y" -{sqliteSelectDelete((yypminor->yy179));} -#line 1315 "parse.c" - break; case 191: -#line 433 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1320 "parse.c" - break; - case 192: -#line 435 "parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1325 "parse.c" - break; case 194: -#line 719 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1330 "parse.c" - break; case 195: -#line 489 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1335 "parse.c" - break; - case 197: -#line 520 "parse.y" -{sqliteIdListDelete((yypminor->yy320));} -#line 1340 "parse.c" - break; case 198: -#line 514 "parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1345 "parse.c" - break; - case 199: -#line 522 "parse.y" -{sqliteIdListDelete((yypminor->yy320));} -#line 1350 "parse.c" - break; case 202: -#line 702 "parse.y" +#line 322 "ext/sqlite/libsqlite/src/parse.y" {sqliteExprListDelete((yypminor->yy322));} -#line 1355 "parse.c" +#line 1269 "ext/sqlite/libsqlite/src/parse.c" break; - case 204: -#line 721 "parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1360 "parse.c" + case 175: + case 183: + case 184: +#line 353 "ext/sqlite/libsqlite/src/parse.y" +{sqliteSrcListDelete((yypminor->yy307));} +#line 1276 "ext/sqlite/libsqlite/src/parse.c" break; case 212: -#line 828 "parse.y" + case 217: +#line 828 "ext/sqlite/libsqlite/src/parse.y" {sqliteDeleteTriggerStep((yypminor->yy19));} -#line 1365 "parse.c" +#line 1282 "ext/sqlite/libsqlite/src/parse.c" break; case 214: -#line 812 "parse.y" +#line 812 "ext/sqlite/libsqlite/src/parse.y" {sqliteIdListDelete((yypminor->yy290).b);} -#line 1370 "parse.c" - break; - case 217: -#line 836 "parse.y" -{sqliteDeleteTriggerStep((yypminor->yy19));} -#line 1375 "parse.c" +#line 1287 "ext/sqlite/libsqlite/src/parse.c" break; default: break; /* If no destructor action specified: do nothing */ } @@ -1479,11 +1389,11 @@ static int yy_find_shift_action( ** return YY_NO_ACTION. */ static int yy_find_reduce_action( - yyParser *pParser, /* The parser */ + int stateno, /* Current state number */ int iLookAhead /* The look-ahead token */ ){ int i; - int stateno = pParser->yystack[pParser->yyidx].stateno; + /* int stateno = pParser->yystack[pParser->yyidx].stateno; */ i = yy_reduce_ofst[stateno]; if( i==YY_REDUCE_USE_DFLT ){ @@ -1544,7 +1454,7 @@ static void yy_shift( /* The following table contains information about every rule that ** is used during the reduce. */ -static struct { +static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ unsigned char nrhs; /* Number of right-hand side symbols in the rule */ } yyRuleInfo[] = { @@ -1868,6 +1778,18 @@ static void yy_reduce( } #endif /* NDEBUG */ +#ifndef NDEBUG + /* Silence complaints from purify about yygotominor being uninitialized + ** in some cases when it is copied into the stack after the following + ** switch. yygotominor is uninitialized when a rule reduces that does + ** not set the value of its left-hand side nonterminal. Leaving the + ** value of the nonterminal uninitialized is utterly harmless as long + ** as the value is never used. So really the only thing this code + ** accomplishes is to quieten purify. + */ + memset(&yygotominor, 0, sizeof(yygotominor)); +#endif + switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example ** follows: @@ -1877,596 +1799,330 @@ static void yy_reduce( ** #line ** break; */ - case 0: - /* No destructor defined for cmdlist */ - break; - case 1: - /* No destructor defined for cmdlist */ - /* No destructor defined for ecmd */ - break; - case 2: - /* No destructor defined for ecmd */ - break; - case 3: - /* No destructor defined for explain */ - /* No destructor defined for cmdx */ - /* No destructor defined for SEMI */ - break; - case 4: - /* No destructor defined for SEMI */ - break; case 5: -#line 72 "parse.y" +#line 72 "ext/sqlite/libsqlite/src/parse.y" { sqliteExec(pParse); } -#line 1901 "parse.c" - /* No destructor defined for cmd */ +#line 1807 "ext/sqlite/libsqlite/src/parse.c" break; case 6: -#line 73 "parse.y" +#line 73 "ext/sqlite/libsqlite/src/parse.y" { sqliteBeginParse(pParse, 1); } -#line 1907 "parse.c" - /* No destructor defined for EXPLAIN */ +#line 1812 "ext/sqlite/libsqlite/src/parse.c" break; case 7: -#line 74 "parse.y" +#line 74 "ext/sqlite/libsqlite/src/parse.y" { sqliteBeginParse(pParse, 0); } -#line 1913 "parse.c" +#line 1817 "ext/sqlite/libsqlite/src/parse.c" break; case 8: -#line 79 "parse.y" +#line 79 "ext/sqlite/libsqlite/src/parse.y" {sqliteBeginTransaction(pParse,yymsp[0].minor.yy372);} -#line 1918 "parse.c" - /* No destructor defined for BEGIN */ - /* No destructor defined for trans_opt */ - break; - case 9: - break; - case 10: - /* No destructor defined for TRANSACTION */ - break; - case 11: - /* No destructor defined for TRANSACTION */ - /* No destructor defined for nm */ +#line 1822 "ext/sqlite/libsqlite/src/parse.c" break; case 12: -#line 83 "parse.y" -{sqliteCommitTransaction(pParse);} -#line 1934 "parse.c" - /* No destructor defined for COMMIT */ - /* No destructor defined for trans_opt */ - break; case 13: -#line 84 "parse.y" +#line 83 "ext/sqlite/libsqlite/src/parse.y" {sqliteCommitTransaction(pParse);} -#line 1941 "parse.c" - /* No destructor defined for END */ - /* No destructor defined for trans_opt */ +#line 1828 "ext/sqlite/libsqlite/src/parse.c" break; case 14: -#line 85 "parse.y" +#line 85 "ext/sqlite/libsqlite/src/parse.y" {sqliteRollbackTransaction(pParse);} -#line 1948 "parse.c" - /* No destructor defined for ROLLBACK */ - /* No destructor defined for trans_opt */ - break; - case 15: - /* No destructor defined for create_table */ - /* No destructor defined for create_table_args */ +#line 1833 "ext/sqlite/libsqlite/src/parse.c" break; case 16: -#line 90 "parse.y" +#line 90 "ext/sqlite/libsqlite/src/parse.y" { sqliteStartTable(pParse,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy298,yymsp[-2].minor.yy372,0); } -#line 1961 "parse.c" - /* No destructor defined for TABLE */ +#line 1840 "ext/sqlite/libsqlite/src/parse.c" break; case 17: -#line 94 "parse.y" + case 74: + case 108: +#line 94 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = 1;} -#line 1967 "parse.c" - /* No destructor defined for TEMP */ +#line 1847 "ext/sqlite/libsqlite/src/parse.c" break; case 18: -#line 95 "parse.y" + case 73: + case 75: + case 86: + case 109: + case 110: +#line 95 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = 0;} -#line 1973 "parse.c" +#line 1857 "ext/sqlite/libsqlite/src/parse.c" break; case 19: -#line 96 "parse.y" +#line 96 "ext/sqlite/libsqlite/src/parse.y" { sqliteEndTable(pParse,&yymsp[0].minor.yy0,0); } -#line 1980 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for columnlist */ - /* No destructor defined for conslist_opt */ +#line 1864 "ext/sqlite/libsqlite/src/parse.c" break; case 20: -#line 99 "parse.y" +#line 99 "ext/sqlite/libsqlite/src/parse.y" { sqliteEndTable(pParse,0,yymsp[0].minor.yy179); sqliteSelectDelete(yymsp[0].minor.yy179); } -#line 1991 "parse.c" - /* No destructor defined for AS */ - break; - case 21: - /* No destructor defined for columnlist */ - /* No destructor defined for COMMA */ - /* No destructor defined for column */ - break; - case 22: - /* No destructor defined for column */ - break; - case 23: - /* No destructor defined for columnid */ - /* No destructor defined for type */ - /* No destructor defined for carglist */ +#line 1872 "ext/sqlite/libsqlite/src/parse.c" break; case 24: -#line 111 "parse.y" +#line 111 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddColumn(pParse,&yymsp[0].minor.yy298);} -#line 2010 "parse.c" +#line 1877 "ext/sqlite/libsqlite/src/parse.c" break; case 25: -#line 117 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2015 "parse.c" - break; case 26: -#line 149 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2020 "parse.c" - break; case 27: -#line 150 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2025 "parse.c" - break; case 28: -#line 155 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2030 "parse.c" - break; case 29: -#line 156 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2035 "parse.c" - break; case 30: -#line 157 "parse.y" + case 256: + case 257: +#line 117 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 2040 "parse.c" - break; - case 31: +#line 1889 "ext/sqlite/libsqlite/src/parse.c" break; case 32: -#line 160 "parse.y" +#line 160 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddColumnType(pParse,&yymsp[0].minor.yy298,&yymsp[0].minor.yy298);} -#line 2047 "parse.c" +#line 1894 "ext/sqlite/libsqlite/src/parse.c" break; case 33: -#line 161 "parse.y" +#line 161 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddColumnType(pParse,&yymsp[-3].minor.yy298,&yymsp[0].minor.yy0);} -#line 2052 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for signed */ +#line 1899 "ext/sqlite/libsqlite/src/parse.c" break; case 34: -#line 163 "parse.y" +#line 163 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddColumnType(pParse,&yymsp[-5].minor.yy298,&yymsp[0].minor.yy0);} -#line 2059 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for signed */ - /* No destructor defined for COMMA */ - /* No destructor defined for signed */ +#line 1904 "ext/sqlite/libsqlite/src/parse.c" break; case 35: -#line 165 "parse.y" + case 128: + case 254: + case 255: +#line 165 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy298 = yymsp[0].minor.yy298;} -#line 2068 "parse.c" +#line 1912 "ext/sqlite/libsqlite/src/parse.c" break; case 36: -#line 166 "parse.y" + case 242: +#line 166 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy298 = yymsp[-1].minor.yy298;} -#line 2073 "parse.c" - /* No destructor defined for ids */ +#line 1918 "ext/sqlite/libsqlite/src/parse.c" break; case 37: -#line 168 "parse.y" -{ yygotominor.yy372 = atoi(yymsp[0].minor.yy0.z); } -#line 2079 "parse.c" - break; case 38: -#line 169 "parse.y" +#line 168 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = atoi(yymsp[0].minor.yy0.z); } -#line 2084 "parse.c" - /* No destructor defined for PLUS */ +#line 1924 "ext/sqlite/libsqlite/src/parse.c" break; case 39: -#line 170 "parse.y" +#line 170 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = -atoi(yymsp[0].minor.yy0.z); } -#line 2090 "parse.c" - /* No destructor defined for MINUS */ - break; - case 40: - /* No destructor defined for carglist */ - /* No destructor defined for carg */ - break; - case 41: - break; - case 42: - /* No destructor defined for CONSTRAINT */ - /* No destructor defined for nm */ - /* No destructor defined for ccons */ - break; - case 43: - /* No destructor defined for ccons */ +#line 1929 "ext/sqlite/libsqlite/src/parse.c" break; case 44: -#line 175 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2110 "parse.c" - /* No destructor defined for DEFAULT */ - break; case 45: -#line 176 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2116 "parse.c" - /* No destructor defined for DEFAULT */ - break; case 46: -#line 177 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2122 "parse.c" - /* No destructor defined for DEFAULT */ - break; case 47: -#line 178 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2128 "parse.c" - /* No destructor defined for DEFAULT */ - /* No destructor defined for PLUS */ - break; - case 48: -#line 179 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,1);} -#line 2135 "parse.c" - /* No destructor defined for DEFAULT */ - /* No destructor defined for MINUS */ - break; case 49: -#line 180 "parse.y" -{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2142 "parse.c" - /* No destructor defined for DEFAULT */ - break; case 50: -#line 181 "parse.y" +#line 175 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 2148 "parse.c" - /* No destructor defined for DEFAULT */ - /* No destructor defined for PLUS */ +#line 1939 "ext/sqlite/libsqlite/src/parse.c" break; + case 48: case 51: -#line 182 "parse.y" +#line 179 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,1);} -#line 2155 "parse.c" - /* No destructor defined for DEFAULT */ - /* No destructor defined for MINUS */ - break; - case 52: - /* No destructor defined for DEFAULT */ - /* No destructor defined for NULL */ - break; - case 53: - /* No destructor defined for NULL */ - /* No destructor defined for onconf */ +#line 1945 "ext/sqlite/libsqlite/src/parse.c" break; case 54: -#line 189 "parse.y" +#line 189 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddNotNull(pParse, yymsp[0].minor.yy372);} -#line 2170 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for NULL */ +#line 1950 "ext/sqlite/libsqlite/src/parse.c" break; case 55: -#line 190 "parse.y" +#line 190 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddPrimaryKey(pParse,0,yymsp[0].minor.yy372);} -#line 2177 "parse.c" - /* No destructor defined for PRIMARY */ - /* No destructor defined for KEY */ - /* No destructor defined for sortorder */ +#line 1955 "ext/sqlite/libsqlite/src/parse.c" break; case 56: -#line 191 "parse.y" +#line 191 "ext/sqlite/libsqlite/src/parse.y" {sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);} -#line 2185 "parse.c" - /* No destructor defined for UNIQUE */ - break; - case 57: - /* No destructor defined for CHECK */ - /* No destructor defined for LP */ - yy_destructor(158,&yymsp[-2].minor); - /* No destructor defined for RP */ - /* No destructor defined for onconf */ +#line 1960 "ext/sqlite/libsqlite/src/parse.c" break; case 58: -#line 194 "parse.y" +#line 194 "ext/sqlite/libsqlite/src/parse.y" {sqliteCreateForeignKey(pParse,0,&yymsp[-2].minor.yy298,yymsp[-1].minor.yy320,yymsp[0].minor.yy372);} -#line 2198 "parse.c" - /* No destructor defined for REFERENCES */ +#line 1965 "ext/sqlite/libsqlite/src/parse.c" break; case 59: -#line 195 "parse.y" +#line 195 "ext/sqlite/libsqlite/src/parse.y" {sqliteDeferForeignKey(pParse,yymsp[0].minor.yy372);} -#line 2204 "parse.c" +#line 1970 "ext/sqlite/libsqlite/src/parse.c" break; case 60: -#line 196 "parse.y" +#line 196 "ext/sqlite/libsqlite/src/parse.y" { sqliteAddCollateType(pParse, sqliteCollateType(yymsp[0].minor.yy298.z, yymsp[0].minor.yy298.n)); } -#line 2211 "parse.c" - /* No destructor defined for COLLATE */ +#line 1977 "ext/sqlite/libsqlite/src/parse.c" break; case 61: -#line 206 "parse.y" +#line 206 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Restrict * 0x010101; } -#line 2217 "parse.c" +#line 1982 "ext/sqlite/libsqlite/src/parse.c" break; case 62: -#line 207 "parse.y" +#line 207 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.mask) | yymsp[0].minor.yy407.value; } -#line 2222 "parse.c" +#line 1987 "ext/sqlite/libsqlite/src/parse.c" break; case 63: -#line 209 "parse.y" +#line 209 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = 0; yygotominor.yy407.mask = 0x000000; } -#line 2227 "parse.c" - /* No destructor defined for MATCH */ - /* No destructor defined for nm */ +#line 1992 "ext/sqlite/libsqlite/src/parse.c" break; case 64: -#line 210 "parse.y" +#line 210 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.mask = 0x0000ff; } -#line 2234 "parse.c" - /* No destructor defined for ON */ - /* No destructor defined for DELETE */ +#line 1997 "ext/sqlite/libsqlite/src/parse.c" break; case 65: -#line 211 "parse.y" +#line 211 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.mask = 0x00ff00; } -#line 2241 "parse.c" - /* No destructor defined for ON */ - /* No destructor defined for UPDATE */ +#line 2002 "ext/sqlite/libsqlite/src/parse.c" break; case 66: -#line 212 "parse.y" +#line 212 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.mask = 0xff0000; } -#line 2248 "parse.c" - /* No destructor defined for ON */ - /* No destructor defined for INSERT */ +#line 2007 "ext/sqlite/libsqlite/src/parse.c" break; case 67: -#line 214 "parse.y" +#line 214 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_SetNull; } -#line 2255 "parse.c" - /* No destructor defined for SET */ - /* No destructor defined for NULL */ +#line 2012 "ext/sqlite/libsqlite/src/parse.c" break; case 68: -#line 215 "parse.y" +#line 215 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_SetDflt; } -#line 2262 "parse.c" - /* No destructor defined for SET */ - /* No destructor defined for DEFAULT */ +#line 2017 "ext/sqlite/libsqlite/src/parse.c" break; case 69: -#line 216 "parse.y" +#line 216 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Cascade; } -#line 2269 "parse.c" - /* No destructor defined for CASCADE */ +#line 2022 "ext/sqlite/libsqlite/src/parse.c" break; case 70: -#line 217 "parse.y" +#line 217 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Restrict; } -#line 2275 "parse.c" - /* No destructor defined for RESTRICT */ +#line 2027 "ext/sqlite/libsqlite/src/parse.c" break; case 71: -#line 219 "parse.y" -{yygotominor.yy372 = yymsp[0].minor.yy372;} -#line 2281 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for DEFERRABLE */ - break; case 72: -#line 220 "parse.y" + case 87: + case 164: +#line 219 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = yymsp[0].minor.yy372;} -#line 2288 "parse.c" - /* No destructor defined for DEFERRABLE */ - break; - case 73: -#line 222 "parse.y" -{yygotominor.yy372 = 0;} -#line 2294 "parse.c" - break; - case 74: -#line 223 "parse.y" -{yygotominor.yy372 = 1;} -#line 2299 "parse.c" - /* No destructor defined for INITIALLY */ - /* No destructor defined for DEFERRED */ - break; - case 75: -#line 224 "parse.y" -{yygotominor.yy372 = 0;} -#line 2306 "parse.c" - /* No destructor defined for INITIALLY */ - /* No destructor defined for IMMEDIATE */ - break; - case 76: - break; - case 77: - /* No destructor defined for COMMA */ - /* No destructor defined for conslist */ - break; - case 78: - /* No destructor defined for conslist */ - /* No destructor defined for COMMA */ - /* No destructor defined for tcons */ - break; - case 79: - /* No destructor defined for conslist */ - /* No destructor defined for tcons */ - break; - case 80: - /* No destructor defined for tcons */ - break; - case 81: - /* No destructor defined for CONSTRAINT */ - /* No destructor defined for nm */ +#line 2035 "ext/sqlite/libsqlite/src/parse.c" break; case 82: -#line 236 "parse.y" +#line 236 "ext/sqlite/libsqlite/src/parse.y" {sqliteAddPrimaryKey(pParse,yymsp[-2].minor.yy320,yymsp[0].minor.yy372);} -#line 2335 "parse.c" - /* No destructor defined for PRIMARY */ - /* No destructor defined for KEY */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 2040 "ext/sqlite/libsqlite/src/parse.c" break; case 83: -#line 238 "parse.y" +#line 238 "ext/sqlite/libsqlite/src/parse.y" {sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);} -#line 2344 "parse.c" - /* No destructor defined for UNIQUE */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ - break; - case 84: - /* No destructor defined for CHECK */ - yy_destructor(158,&yymsp[-1].minor); - /* No destructor defined for onconf */ +#line 2045 "ext/sqlite/libsqlite/src/parse.c" break; case 85: -#line 241 "parse.y" +#line 241 "ext/sqlite/libsqlite/src/parse.y" { sqliteCreateForeignKey(pParse, yymsp[-6].minor.yy320, &yymsp[-3].minor.yy298, yymsp[-2].minor.yy320, yymsp[-1].minor.yy372); sqliteDeferForeignKey(pParse, yymsp[0].minor.yy372); } -#line 2360 "parse.c" - /* No destructor defined for FOREIGN */ - /* No destructor defined for KEY */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ - /* No destructor defined for REFERENCES */ - break; - case 86: -#line 246 "parse.y" -{yygotominor.yy372 = 0;} -#line 2370 "parse.c" - break; - case 87: -#line 247 "parse.y" -{yygotominor.yy372 = yymsp[0].minor.yy372;} -#line 2375 "parse.c" +#line 2053 "ext/sqlite/libsqlite/src/parse.c" break; case 88: -#line 255 "parse.y" -{ yygotominor.yy372 = OE_Default; } -#line 2380 "parse.c" - break; - case 89: -#line 256 "parse.y" -{ yygotominor.yy372 = yymsp[0].minor.yy372; } -#line 2385 "parse.c" - /* No destructor defined for ON */ - /* No destructor defined for CONFLICT */ - break; case 90: -#line 257 "parse.y" +#line 255 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Default; } -#line 2392 "parse.c" +#line 2059 "ext/sqlite/libsqlite/src/parse.c" break; + case 89: case 91: -#line 258 "parse.y" +#line 256 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = yymsp[0].minor.yy372; } -#line 2397 "parse.c" - /* No destructor defined for OR */ +#line 2065 "ext/sqlite/libsqlite/src/parse.c" break; case 92: -#line 259 "parse.y" +#line 259 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Rollback; } -#line 2403 "parse.c" - /* No destructor defined for ROLLBACK */ +#line 2070 "ext/sqlite/libsqlite/src/parse.c" break; case 93: -#line 260 "parse.y" + case 236: +#line 260 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Abort; } -#line 2409 "parse.c" - /* No destructor defined for ABORT */ +#line 2076 "ext/sqlite/libsqlite/src/parse.c" break; case 94: -#line 261 "parse.y" +#line 261 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Fail; } -#line 2415 "parse.c" - /* No destructor defined for FAIL */ +#line 2081 "ext/sqlite/libsqlite/src/parse.c" break; case 95: -#line 262 "parse.y" +#line 262 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Ignore; } -#line 2421 "parse.c" - /* No destructor defined for IGNORE */ +#line 2086 "ext/sqlite/libsqlite/src/parse.c" break; case 96: -#line 263 "parse.y" +#line 263 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Replace; } -#line 2427 "parse.c" - /* No destructor defined for REPLACE */ +#line 2091 "ext/sqlite/libsqlite/src/parse.c" break; case 97: -#line 267 "parse.y" +#line 267 "ext/sqlite/libsqlite/src/parse.y" {sqliteDropTable(pParse,&yymsp[0].minor.yy298,0);} -#line 2433 "parse.c" - /* No destructor defined for DROP */ - /* No destructor defined for TABLE */ +#line 2096 "ext/sqlite/libsqlite/src/parse.c" break; case 98: -#line 271 "parse.y" +#line 271 "ext/sqlite/libsqlite/src/parse.y" { sqliteCreateView(pParse, &yymsp[-5].minor.yy0, &yymsp[-2].minor.yy298, yymsp[0].minor.yy179, yymsp[-4].minor.yy372); } -#line 2442 "parse.c" - /* No destructor defined for VIEW */ - /* No destructor defined for AS */ +#line 2103 "ext/sqlite/libsqlite/src/parse.c" break; case 99: -#line 274 "parse.y" +#line 274 "ext/sqlite/libsqlite/src/parse.y" { sqliteDropTable(pParse, &yymsp[0].minor.yy298, 1); } -#line 2451 "parse.c" - /* No destructor defined for DROP */ - /* No destructor defined for VIEW */ +#line 2110 "ext/sqlite/libsqlite/src/parse.c" break; case 100: -#line 280 "parse.y" +#line 280 "ext/sqlite/libsqlite/src/parse.y" { sqliteSelect(pParse, yymsp[0].minor.yy179, SRT_Callback, 0, 0, 0, 0); sqliteSelectDelete(yymsp[0].minor.yy179); } -#line 2461 "parse.c" +#line 2118 "ext/sqlite/libsqlite/src/parse.c" break; case 101: -#line 290 "parse.y" + case 125: +#line 290 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy179 = yymsp[0].minor.yy179;} -#line 2466 "parse.c" +#line 2124 "ext/sqlite/libsqlite/src/parse.c" break; case 102: -#line 291 "parse.y" +#line 291 "ext/sqlite/libsqlite/src/parse.y" { if( yymsp[0].minor.yy179 ){ yymsp[0].minor.yy179->op = yymsp[-1].minor.yy372; @@ -2474,137 +2130,107 @@ static void yy_reduce( } yygotominor.yy179 = yymsp[0].minor.yy179; } -#line 2477 "parse.c" +#line 2135 "ext/sqlite/libsqlite/src/parse.c" break; case 103: -#line 299 "parse.y" +#line 299 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_UNION;} -#line 2482 "parse.c" - /* No destructor defined for UNION */ +#line 2140 "ext/sqlite/libsqlite/src/parse.c" break; case 104: -#line 300 "parse.y" +#line 300 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_ALL;} -#line 2488 "parse.c" - /* No destructor defined for UNION */ - /* No destructor defined for ALL */ +#line 2145 "ext/sqlite/libsqlite/src/parse.c" break; case 105: -#line 301 "parse.y" +#line 301 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_INTERSECT;} -#line 2495 "parse.c" - /* No destructor defined for INTERSECT */ +#line 2150 "ext/sqlite/libsqlite/src/parse.c" break; case 106: -#line 302 "parse.y" +#line 302 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_EXCEPT;} -#line 2501 "parse.c" - /* No destructor defined for EXCEPT */ +#line 2155 "ext/sqlite/libsqlite/src/parse.c" break; case 107: -#line 304 "parse.y" +#line 304 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy179 = sqliteSelectNew(yymsp[-6].minor.yy322,yymsp[-5].minor.yy307,yymsp[-4].minor.yy242,yymsp[-3].minor.yy322,yymsp[-2].minor.yy242,yymsp[-1].minor.yy322,yymsp[-7].minor.yy372,yymsp[0].minor.yy124.limit,yymsp[0].minor.yy124.offset); } -#line 2509 "parse.c" - /* No destructor defined for SELECT */ - break; - case 108: -#line 312 "parse.y" -{yygotominor.yy372 = 1;} -#line 2515 "parse.c" - /* No destructor defined for DISTINCT */ - break; - case 109: -#line 313 "parse.y" -{yygotominor.yy372 = 0;} -#line 2521 "parse.c" - /* No destructor defined for ALL */ - break; - case 110: -#line 314 "parse.y" -{yygotominor.yy372 = 0;} -#line 2527 "parse.c" +#line 2162 "ext/sqlite/libsqlite/src/parse.c" break; case 111: -#line 325 "parse.y" +#line 325 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = yymsp[-1].minor.yy322;} -#line 2532 "parse.c" - /* No destructor defined for COMMA */ +#line 2167 "ext/sqlite/libsqlite/src/parse.c" break; case 112: -#line 326 "parse.y" + case 138: + case 148: +#line 326 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = 0;} -#line 2538 "parse.c" +#line 2174 "ext/sqlite/libsqlite/src/parse.c" break; case 113: -#line 327 "parse.y" +#line 327 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[-1].minor.yy242,yymsp[0].minor.yy298.n?&yymsp[0].minor.yy298:0); } -#line 2545 "parse.c" +#line 2181 "ext/sqlite/libsqlite/src/parse.c" break; case 114: -#line 330 "parse.y" +#line 330 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-1].minor.yy322, sqliteExpr(TK_ALL, 0, 0, 0), 0); } -#line 2552 "parse.c" - /* No destructor defined for STAR */ +#line 2188 "ext/sqlite/libsqlite/src/parse.c" break; case 115: -#line 333 "parse.y" +#line 333 "ext/sqlite/libsqlite/src/parse.y" { Expr *pRight = sqliteExpr(TK_ALL, 0, 0, 0); Expr *pLeft = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); yygotominor.yy322 = sqliteExprListAppend(yymsp[-3].minor.yy322, sqliteExpr(TK_DOT, pLeft, pRight, 0), 0); } -#line 2562 "parse.c" - /* No destructor defined for DOT */ - /* No destructor defined for STAR */ +#line 2197 "ext/sqlite/libsqlite/src/parse.c" break; case 116: -#line 343 "parse.y" -{ yygotominor.yy298 = yymsp[0].minor.yy298; } -#line 2569 "parse.c" - /* No destructor defined for AS */ - break; case 117: -#line 344 "parse.y" + case 288: +#line 343 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy298 = yymsp[0].minor.yy298; } -#line 2575 "parse.c" +#line 2204 "ext/sqlite/libsqlite/src/parse.c" break; case 118: -#line 345 "parse.y" +#line 345 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy298.n = 0; } -#line 2580 "parse.c" +#line 2209 "ext/sqlite/libsqlite/src/parse.c" break; case 119: -#line 357 "parse.y" +#line 357 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = sqliteMalloc(sizeof(*yygotominor.yy307));} -#line 2585 "parse.c" +#line 2214 "ext/sqlite/libsqlite/src/parse.c" break; case 120: -#line 358 "parse.y" +#line 358 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = yymsp[0].minor.yy307;} -#line 2590 "parse.c" - /* No destructor defined for FROM */ +#line 2219 "ext/sqlite/libsqlite/src/parse.c" break; case 121: -#line 363 "parse.y" +#line 363 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy307 = yymsp[-1].minor.yy307; if( yygotominor.yy307 && yygotominor.yy307->nSrc>0 ) yygotominor.yy307->a[yygotominor.yy307->nSrc-1].jointype = yymsp[0].minor.yy372; } -#line 2599 "parse.c" +#line 2227 "ext/sqlite/libsqlite/src/parse.c" break; case 122: -#line 367 "parse.y" +#line 367 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = 0;} -#line 2604 "parse.c" +#line 2232 "ext/sqlite/libsqlite/src/parse.c" break; case 123: -#line 368 "parse.y" +#line 368 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy307 = sqliteSrcListAppend(yymsp[-5].minor.yy307,&yymsp[-4].minor.yy298,&yymsp[-3].minor.yy298); if( yymsp[-2].minor.yy298.n ) sqliteSrcListAddAlias(yygotominor.yy307,&yymsp[-2].minor.yy298); @@ -2617,10 +2243,10 @@ static void yy_reduce( else { sqliteIdListDelete(yymsp[0].minor.yy320); } } } -#line 2620 "parse.c" +#line 2248 "ext/sqlite/libsqlite/src/parse.c" break; case 124: -#line 381 "parse.y" +#line 381 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy307 = sqliteSrcListAppend(yymsp[-6].minor.yy307,0,0); yygotominor.yy307->a[yygotominor.yy307->nSrc-1].pSelect = yymsp[-4].minor.yy179; @@ -2634,330 +2260,227 @@ static void yy_reduce( else { sqliteIdListDelete(yymsp[0].minor.yy320); } } } -#line 2637 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for RP */ - break; - case 125: -#line 401 "parse.y" -{yygotominor.yy179 = yymsp[0].minor.yy179;} -#line 2644 "parse.c" +#line 2265 "ext/sqlite/libsqlite/src/parse.c" break; case 126: -#line 402 "parse.y" +#line 402 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy179 = sqliteSelectNew(0,yymsp[0].minor.yy307,0,0,0,0,0,-1,0); } -#line 2651 "parse.c" +#line 2272 "ext/sqlite/libsqlite/src/parse.c" break; case 127: -#line 407 "parse.y" +#line 407 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy298.z=0; yygotominor.yy298.n=0;} -#line 2656 "parse.c" - break; - case 128: -#line 408 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy298;} -#line 2661 "parse.c" - /* No destructor defined for DOT */ +#line 2277 "ext/sqlite/libsqlite/src/parse.c" break; case 129: -#line 412 "parse.y" -{ yygotominor.yy372 = JT_INNER; } -#line 2667 "parse.c" - /* No destructor defined for COMMA */ - break; case 130: -#line 413 "parse.y" +#line 412 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = JT_INNER; } -#line 2673 "parse.c" - /* No destructor defined for JOIN */ +#line 2283 "ext/sqlite/libsqlite/src/parse.c" break; case 131: -#line 414 "parse.y" +#line 414 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-1].minor.yy0,0,0); } -#line 2679 "parse.c" - /* No destructor defined for JOIN */ +#line 2288 "ext/sqlite/libsqlite/src/parse.c" break; case 132: -#line 415 "parse.y" +#line 415 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy298,0); } -#line 2685 "parse.c" - /* No destructor defined for JOIN */ +#line 2293 "ext/sqlite/libsqlite/src/parse.c" break; case 133: -#line 417 "parse.y" +#line 417 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy298,&yymsp[-1].minor.yy298); } -#line 2691 "parse.c" - /* No destructor defined for JOIN */ +#line 2298 "ext/sqlite/libsqlite/src/parse.c" break; case 134: -#line 421 "parse.y" + case 142: + case 151: + case 158: + case 227: + case 229: + case 233: +#line 421 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 2697 "parse.c" - /* No destructor defined for ON */ +#line 2309 "ext/sqlite/libsqlite/src/parse.c" break; case 135: -#line 422 "parse.y" + case 150: + case 157: + case 228: + case 230: + case 234: +#line 422 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = 0;} -#line 2703 "parse.c" +#line 2319 "ext/sqlite/libsqlite/src/parse.c" break; case 136: -#line 426 "parse.y" + case 169: + case 239: +#line 426 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = yymsp[-1].minor.yy320;} -#line 2708 "parse.c" - /* No destructor defined for USING */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 2326 "ext/sqlite/libsqlite/src/parse.c" break; case 137: -#line 427 "parse.y" + case 168: + case 238: +#line 427 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = 0;} -#line 2716 "parse.c" - break; - case 138: -#line 437 "parse.y" -{yygotominor.yy322 = 0;} -#line 2721 "parse.c" +#line 2333 "ext/sqlite/libsqlite/src/parse.c" break; case 139: -#line 438 "parse.y" + case 149: +#line 438 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = yymsp[0].minor.yy322;} -#line 2726 "parse.c" - /* No destructor defined for ORDER */ - /* No destructor defined for BY */ +#line 2339 "ext/sqlite/libsqlite/src/parse.c" break; case 140: -#line 439 "parse.y" +#line 439 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322,yymsp[-2].minor.yy242,0); if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = yymsp[-1].minor.yy372+yymsp[0].minor.yy372; } -#line 2736 "parse.c" - /* No destructor defined for COMMA */ +#line 2347 "ext/sqlite/libsqlite/src/parse.c" break; case 141: -#line 443 "parse.y" +#line 443 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(0,yymsp[-2].minor.yy242,0); if( yygotominor.yy322 ) yygotominor.yy322->a[0].sortOrder = yymsp[-1].minor.yy372+yymsp[0].minor.yy372; } -#line 2745 "parse.c" - break; - case 142: -#line 447 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 2750 "parse.c" +#line 2355 "ext/sqlite/libsqlite/src/parse.c" break; case 143: -#line 452 "parse.y" + case 145: +#line 452 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_ASC;} -#line 2755 "parse.c" - /* No destructor defined for ASC */ +#line 2361 "ext/sqlite/libsqlite/src/parse.c" break; case 144: -#line 453 "parse.y" +#line 453 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_DESC;} -#line 2761 "parse.c" - /* No destructor defined for DESC */ - break; - case 145: -#line 454 "parse.y" -{yygotominor.yy372 = SQLITE_SO_ASC;} -#line 2767 "parse.c" +#line 2366 "ext/sqlite/libsqlite/src/parse.c" break; case 146: -#line 455 "parse.y" +#line 455 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_UNK;} -#line 2772 "parse.c" +#line 2371 "ext/sqlite/libsqlite/src/parse.c" break; case 147: -#line 456 "parse.y" +#line 456 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = sqliteCollateType(yymsp[0].minor.yy298.z, yymsp[0].minor.yy298.n);} -#line 2777 "parse.c" - /* No destructor defined for COLLATE */ - break; - case 148: -#line 460 "parse.y" -{yygotominor.yy322 = 0;} -#line 2783 "parse.c" - break; - case 149: -#line 461 "parse.y" -{yygotominor.yy322 = yymsp[0].minor.yy322;} -#line 2788 "parse.c" - /* No destructor defined for GROUP */ - /* No destructor defined for BY */ - break; - case 150: -#line 465 "parse.y" -{yygotominor.yy242 = 0;} -#line 2795 "parse.c" - break; - case 151: -#line 466 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 2800 "parse.c" - /* No destructor defined for HAVING */ +#line 2376 "ext/sqlite/libsqlite/src/parse.c" break; case 152: -#line 469 "parse.y" +#line 469 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = -1; yygotominor.yy124.offset = 0;} -#line 2806 "parse.c" +#line 2381 "ext/sqlite/libsqlite/src/parse.c" break; case 153: -#line 470 "parse.y" +#line 470 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[0].minor.yy372; yygotominor.yy124.offset = 0;} -#line 2811 "parse.c" - /* No destructor defined for LIMIT */ +#line 2386 "ext/sqlite/libsqlite/src/parse.c" break; case 154: -#line 472 "parse.y" +#line 472 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[-2].minor.yy372; yygotominor.yy124.offset = yymsp[0].minor.yy372;} -#line 2817 "parse.c" - /* No destructor defined for LIMIT */ - /* No destructor defined for OFFSET */ +#line 2391 "ext/sqlite/libsqlite/src/parse.c" break; case 155: -#line 474 "parse.y" +#line 474 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[0].minor.yy372; yygotominor.yy124.offset = yymsp[-2].minor.yy372;} -#line 2824 "parse.c" - /* No destructor defined for LIMIT */ - /* No destructor defined for COMMA */ +#line 2396 "ext/sqlite/libsqlite/src/parse.c" break; case 156: -#line 478 "parse.y" +#line 478 "ext/sqlite/libsqlite/src/parse.y" { sqliteDeleteFrom(pParse, sqliteSrcListAppend(0,&yymsp[-2].minor.yy298,&yymsp[-1].minor.yy298), yymsp[0].minor.yy242); } -#line 2833 "parse.c" - /* No destructor defined for DELETE */ - /* No destructor defined for FROM */ - break; - case 157: -#line 485 "parse.y" -{yygotominor.yy242 = 0;} -#line 2840 "parse.c" - break; - case 158: -#line 486 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 2845 "parse.c" - /* No destructor defined for WHERE */ +#line 2403 "ext/sqlite/libsqlite/src/parse.c" break; case 159: -#line 494 "parse.y" +#line 494 "ext/sqlite/libsqlite/src/parse.y" {sqliteUpdate(pParse,sqliteSrcListAppend(0,&yymsp[-4].minor.yy298,&yymsp[-3].minor.yy298),yymsp[-1].minor.yy322,yymsp[0].minor.yy242,yymsp[-5].minor.yy372);} -#line 2851 "parse.c" - /* No destructor defined for UPDATE */ - /* No destructor defined for SET */ +#line 2408 "ext/sqlite/libsqlite/src/parse.c" break; case 160: -#line 497 "parse.y" +#line 497 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322,yymsp[0].minor.yy242,&yymsp[-2].minor.yy298);} -#line 2858 "parse.c" - /* No destructor defined for COMMA */ - /* No destructor defined for EQ */ +#line 2413 "ext/sqlite/libsqlite/src/parse.c" break; case 161: -#line 498 "parse.y" +#line 498 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,&yymsp[-2].minor.yy298);} -#line 2865 "parse.c" - /* No destructor defined for EQ */ +#line 2418 "ext/sqlite/libsqlite/src/parse.c" break; case 162: -#line 504 "parse.y" +#line 504 "ext/sqlite/libsqlite/src/parse.y" {sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-6].minor.yy298,&yymsp[-5].minor.yy298), yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy320, yymsp[-8].minor.yy372);} -#line 2871 "parse.c" - /* No destructor defined for INTO */ - /* No destructor defined for VALUES */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 2423 "ext/sqlite/libsqlite/src/parse.c" break; case 163: -#line 506 "parse.y" +#line 506 "ext/sqlite/libsqlite/src/parse.y" {sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-3].minor.yy298,&yymsp[-2].minor.yy298), 0, yymsp[0].minor.yy179, yymsp[-1].minor.yy320, yymsp[-5].minor.yy372);} -#line 2880 "parse.c" - /* No destructor defined for INTO */ - break; - case 164: -#line 509 "parse.y" -{yygotominor.yy372 = yymsp[0].minor.yy372;} -#line 2886 "parse.c" - /* No destructor defined for INSERT */ +#line 2428 "ext/sqlite/libsqlite/src/parse.c" break; case 165: -#line 510 "parse.y" +#line 510 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = OE_Replace;} -#line 2892 "parse.c" - /* No destructor defined for REPLACE */ +#line 2433 "ext/sqlite/libsqlite/src/parse.c" break; case 166: -#line 516 "parse.y" + case 231: +#line 516 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[0].minor.yy242,0);} -#line 2898 "parse.c" - /* No destructor defined for COMMA */ +#line 2439 "ext/sqlite/libsqlite/src/parse.c" break; case 167: -#line 517 "parse.y" + case 232: +#line 517 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,0);} -#line 2904 "parse.c" - break; - case 168: -#line 524 "parse.y" -{yygotominor.yy320 = 0;} -#line 2909 "parse.c" - break; - case 169: -#line 525 "parse.y" -{yygotominor.yy320 = yymsp[-1].minor.yy320;} -#line 2914 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 2445 "ext/sqlite/libsqlite/src/parse.c" break; case 170: -#line 526 "parse.y" + case 240: +#line 526 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = sqliteIdListAppend(yymsp[-2].minor.yy320,&yymsp[0].minor.yy298);} -#line 2921 "parse.c" - /* No destructor defined for COMMA */ +#line 2451 "ext/sqlite/libsqlite/src/parse.c" break; case 171: -#line 527 "parse.y" + case 241: +#line 527 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = sqliteIdListAppend(0,&yymsp[0].minor.yy298);} -#line 2927 "parse.c" +#line 2457 "ext/sqlite/libsqlite/src/parse.c" break; case 172: -#line 535 "parse.y" +#line 535 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = yymsp[-1].minor.yy242; sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 2932 "parse.c" +#line 2462 "ext/sqlite/libsqlite/src/parse.c" break; case 173: -#line 536 "parse.y" +#line 536 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_NULL, 0, 0, &yymsp[0].minor.yy0);} -#line 2937 "parse.c" +#line 2467 "ext/sqlite/libsqlite/src/parse.c" break; case 174: -#line 537 "parse.y" -{yygotominor.yy242 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0);} -#line 2942 "parse.c" - break; case 175: -#line 538 "parse.y" +#line 537 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0);} -#line 2947 "parse.c" +#line 2473 "ext/sqlite/libsqlite/src/parse.c" break; case 176: -#line 539 "parse.y" +#line 539 "ext/sqlite/libsqlite/src/parse.y" { Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy298); yygotominor.yy242 = sqliteExpr(TK_DOT, temp1, temp2, 0); } -#line 2956 "parse.c" - /* No destructor defined for DOT */ +#line 2482 "ext/sqlite/libsqlite/src/parse.c" break; case 177: -#line 544 "parse.y" +#line 544 "ext/sqlite/libsqlite/src/parse.y" { Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-4].minor.yy298); Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); @@ -2965,126 +2488,109 @@ static void yy_reduce( Expr *temp4 = sqliteExpr(TK_DOT, temp2, temp3, 0); yygotominor.yy242 = sqliteExpr(TK_DOT, temp1, temp4, 0); } -#line 2968 "parse.c" - /* No destructor defined for DOT */ - /* No destructor defined for DOT */ +#line 2493 "ext/sqlite/libsqlite/src/parse.c" break; case 178: -#line 551 "parse.y" +#line 551 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_INTEGER, 0, 0, &yymsp[0].minor.yy0);} -#line 2975 "parse.c" +#line 2498 "ext/sqlite/libsqlite/src/parse.c" break; case 179: -#line 552 "parse.y" +#line 552 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_FLOAT, 0, 0, &yymsp[0].minor.yy0);} -#line 2980 "parse.c" +#line 2503 "ext/sqlite/libsqlite/src/parse.c" break; case 180: -#line 553 "parse.y" +#line 553 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_STRING, 0, 0, &yymsp[0].minor.yy0);} -#line 2985 "parse.c" +#line 2508 "ext/sqlite/libsqlite/src/parse.c" break; case 181: -#line 554 "parse.y" +#line 554 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_VARIABLE, 0, 0, &yymsp[0].minor.yy0); if( yygotominor.yy242 ) yygotominor.yy242->iTable = ++pParse->nVar; } -#line 2993 "parse.c" +#line 2516 "ext/sqlite/libsqlite/src/parse.c" break; case 182: -#line 558 "parse.y" +#line 558 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExprFunction(yymsp[-1].minor.yy322, &yymsp[-3].minor.yy0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 3001 "parse.c" - /* No destructor defined for LP */ +#line 2524 "ext/sqlite/libsqlite/src/parse.c" break; case 183: -#line 562 "parse.y" +#line 562 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExprFunction(0, &yymsp[-3].minor.yy0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 3010 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for STAR */ +#line 2532 "ext/sqlite/libsqlite/src/parse.c" break; case 184: -#line 566 "parse.y" +#line 566 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_AND, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3017 "parse.c" - /* No destructor defined for AND */ +#line 2537 "ext/sqlite/libsqlite/src/parse.c" break; case 185: -#line 567 "parse.y" +#line 567 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_OR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3023 "parse.c" - /* No destructor defined for OR */ +#line 2542 "ext/sqlite/libsqlite/src/parse.c" break; case 186: -#line 568 "parse.y" +#line 568 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3029 "parse.c" - /* No destructor defined for LT */ +#line 2547 "ext/sqlite/libsqlite/src/parse.c" break; case 187: -#line 569 "parse.y" +#line 569 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_GT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3035 "parse.c" - /* No destructor defined for GT */ +#line 2552 "ext/sqlite/libsqlite/src/parse.c" break; case 188: -#line 570 "parse.y" +#line 570 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3041 "parse.c" - /* No destructor defined for LE */ +#line 2557 "ext/sqlite/libsqlite/src/parse.c" break; case 189: -#line 571 "parse.y" +#line 571 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_GE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3047 "parse.c" - /* No destructor defined for GE */ +#line 2562 "ext/sqlite/libsqlite/src/parse.c" break; case 190: -#line 572 "parse.y" +#line 572 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_NE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3053 "parse.c" - /* No destructor defined for NE */ +#line 2567 "ext/sqlite/libsqlite/src/parse.c" break; case 191: -#line 573 "parse.y" +#line 573 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_EQ, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3059 "parse.c" - /* No destructor defined for EQ */ +#line 2572 "ext/sqlite/libsqlite/src/parse.c" break; case 192: -#line 574 "parse.y" +#line 574 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_BITAND, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3065 "parse.c" - /* No destructor defined for BITAND */ +#line 2577 "ext/sqlite/libsqlite/src/parse.c" break; case 193: -#line 575 "parse.y" +#line 575 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_BITOR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3071 "parse.c" - /* No destructor defined for BITOR */ +#line 2582 "ext/sqlite/libsqlite/src/parse.c" break; case 194: -#line 576 "parse.y" +#line 576 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LSHIFT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3077 "parse.c" - /* No destructor defined for LSHIFT */ +#line 2587 "ext/sqlite/libsqlite/src/parse.c" break; case 195: -#line 577 "parse.y" +#line 577 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_RSHIFT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3083 "parse.c" - /* No destructor defined for RSHIFT */ +#line 2592 "ext/sqlite/libsqlite/src/parse.c" break; case 196: -#line 578 "parse.y" +#line 578 "ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[-2].minor.yy242, 0); @@ -3092,10 +2598,10 @@ static void yy_reduce( if( yygotominor.yy242 ) yygotominor.yy242->op = yymsp[-1].minor.yy372; sqliteExprSpan(yygotominor.yy242, &yymsp[-2].minor.yy242->span, &yymsp[0].minor.yy242->span); } -#line 3095 "parse.c" +#line 2603 "ext/sqlite/libsqlite/src/parse.c" break; case 197: -#line 585 "parse.y" +#line 585 "ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[-3].minor.yy242, 0); @@ -3104,144 +2610,131 @@ static void yy_reduce( yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 3107 "parse.c" - /* No destructor defined for NOT */ +#line 2615 "ext/sqlite/libsqlite/src/parse.c" break; case 198: -#line 594 "parse.y" +#line 594 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_LIKE;} -#line 3113 "parse.c" - /* No destructor defined for LIKE */ +#line 2620 "ext/sqlite/libsqlite/src/parse.c" break; case 199: -#line 595 "parse.y" +#line 595 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_GLOB;} -#line 3119 "parse.c" - /* No destructor defined for GLOB */ +#line 2625 "ext/sqlite/libsqlite/src/parse.c" break; case 200: -#line 596 "parse.y" +#line 596 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_PLUS, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3125 "parse.c" - /* No destructor defined for PLUS */ +#line 2630 "ext/sqlite/libsqlite/src/parse.c" break; case 201: -#line 597 "parse.y" +#line 597 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_MINUS, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3131 "parse.c" - /* No destructor defined for MINUS */ +#line 2635 "ext/sqlite/libsqlite/src/parse.c" break; case 202: -#line 598 "parse.y" +#line 598 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_STAR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3137 "parse.c" - /* No destructor defined for STAR */ +#line 2640 "ext/sqlite/libsqlite/src/parse.c" break; case 203: -#line 599 "parse.y" +#line 599 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_SLASH, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3143 "parse.c" - /* No destructor defined for SLASH */ +#line 2645 "ext/sqlite/libsqlite/src/parse.c" break; case 204: -#line 600 "parse.y" +#line 600 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_REM, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3149 "parse.c" - /* No destructor defined for REM */ +#line 2650 "ext/sqlite/libsqlite/src/parse.c" break; case 205: -#line 601 "parse.y" +#line 601 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_CONCAT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 3155 "parse.c" - /* No destructor defined for CONCAT */ +#line 2655 "ext/sqlite/libsqlite/src/parse.c" break; case 206: -#line 602 "parse.y" +#line 602 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_ISNULL, yymsp[-1].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3164 "parse.c" +#line 2663 "ext/sqlite/libsqlite/src/parse.c" break; case 207: -#line 606 "parse.y" +#line 606 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_ISNULL, yymsp[-2].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3172 "parse.c" - /* No destructor defined for IS */ +#line 2671 "ext/sqlite/libsqlite/src/parse.c" break; case 208: -#line 610 "parse.y" +#line 610 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-1].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3181 "parse.c" +#line 2679 "ext/sqlite/libsqlite/src/parse.c" break; case 209: -#line 614 "parse.y" +#line 614 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-2].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3189 "parse.c" - /* No destructor defined for NOT */ +#line 2687 "ext/sqlite/libsqlite/src/parse.c" break; case 210: -#line 618 "parse.y" +#line 618 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-3].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3198 "parse.c" - /* No destructor defined for IS */ - /* No destructor defined for NOT */ +#line 2695 "ext/sqlite/libsqlite/src/parse.c" break; case 211: -#line 622 "parse.y" +#line 622 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOT, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 3208 "parse.c" +#line 2703 "ext/sqlite/libsqlite/src/parse.c" break; case 212: -#line 626 "parse.y" +#line 626 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_BITNOT, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 3216 "parse.c" +#line 2711 "ext/sqlite/libsqlite/src/parse.c" break; case 213: -#line 630 "parse.y" +#line 630 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_UMINUS, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 3224 "parse.c" +#line 2719 "ext/sqlite/libsqlite/src/parse.c" break; case 214: -#line 634 "parse.y" +#line 634 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_UPLUS, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 3232 "parse.c" +#line 2727 "ext/sqlite/libsqlite/src/parse.c" break; case 215: -#line 638 "parse.y" +#line 638 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_SELECT, 0, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 3241 "parse.c" +#line 2736 "ext/sqlite/libsqlite/src/parse.c" break; case 216: -#line 643 "parse.y" +#line 643 "ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[0].minor.yy242, 0); @@ -3249,12 +2742,10 @@ static void yy_reduce( if( yygotominor.yy242 ) yygotominor.yy242->pList = pList; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 3252 "parse.c" - /* No destructor defined for BETWEEN */ - /* No destructor defined for AND */ +#line 2747 "ext/sqlite/libsqlite/src/parse.c" break; case 217: -#line 650 "parse.y" +#line 650 "ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[0].minor.yy242, 0); @@ -3263,72 +2754,58 @@ static void yy_reduce( yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 3266 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for BETWEEN */ - /* No destructor defined for AND */ +#line 2759 "ext/sqlite/libsqlite/src/parse.c" break; case 218: -#line 658 "parse.y" +#line 658 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-1].minor.yy322; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3278 "parse.c" - /* No destructor defined for IN */ - /* No destructor defined for LP */ +#line 2768 "ext/sqlite/libsqlite/src/parse.c" break; case 219: -#line 663 "parse.y" +#line 663 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3289 "parse.c" - /* No destructor defined for IN */ - /* No destructor defined for LP */ +#line 2777 "ext/sqlite/libsqlite/src/parse.c" break; case 220: -#line 668 "parse.y" +#line 668 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-5].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-1].minor.yy322; yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3301 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for IN */ - /* No destructor defined for LP */ +#line 2787 "ext/sqlite/libsqlite/src/parse.c" break; case 221: -#line 674 "parse.y" +#line 674 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-5].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 3314 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for IN */ - /* No destructor defined for LP */ +#line 2797 "ext/sqlite/libsqlite/src/parse.c" break; case 222: -#line 680 "parse.y" +#line 680 "ext/sqlite/libsqlite/src/parse.y" { SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-3].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = sqliteSelectNew(0,pSrc,0,0,0,0,0,-1,0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,yymsp[0].minor.yy298.z?&yymsp[0].minor.yy298:&yymsp[-1].minor.yy298); } -#line 3327 "parse.c" - /* No destructor defined for IN */ +#line 2807 "ext/sqlite/libsqlite/src/parse.c" break; case 223: -#line 686 "parse.y" +#line 686 "ext/sqlite/libsqlite/src/parse.y" { SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); @@ -3336,489 +2813,298 @@ static void yy_reduce( yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,yymsp[0].minor.yy298.z?&yymsp[0].minor.yy298:&yymsp[-1].minor.yy298); } -#line 3339 "parse.c" - /* No destructor defined for NOT */ - /* No destructor defined for IN */ +#line 2818 "ext/sqlite/libsqlite/src/parse.c" break; case 224: -#line 696 "parse.y" +#line 696 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_CASE, yymsp[-3].minor.yy242, yymsp[-1].minor.yy242, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-2].minor.yy322; sqliteExprSpan(yygotominor.yy242, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0); } -#line 3350 "parse.c" +#line 2827 "ext/sqlite/libsqlite/src/parse.c" break; case 225: -#line 703 "parse.y" +#line 703 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322, yymsp[-2].minor.yy242, 0); yygotominor.yy322 = sqliteExprListAppend(yygotominor.yy322, yymsp[0].minor.yy242, 0); } -#line 3358 "parse.c" - /* No destructor defined for WHEN */ - /* No destructor defined for THEN */ +#line 2835 "ext/sqlite/libsqlite/src/parse.c" break; case 226: -#line 707 "parse.y" +#line 707 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); yygotominor.yy322 = sqliteExprListAppend(yygotominor.yy322, yymsp[0].minor.yy242, 0); } -#line 3368 "parse.c" - /* No destructor defined for WHEN */ - /* No destructor defined for THEN */ - break; - case 227: -#line 712 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 3375 "parse.c" - /* No destructor defined for ELSE */ - break; - case 228: -#line 713 "parse.y" -{yygotominor.yy242 = 0;} -#line 3381 "parse.c" - break; - case 229: -#line 715 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 3386 "parse.c" - break; - case 230: -#line 716 "parse.y" -{yygotominor.yy242 = 0;} -#line 3391 "parse.c" - break; - case 231: -#line 724 "parse.y" -{yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[0].minor.yy242,0);} -#line 3396 "parse.c" - /* No destructor defined for COMMA */ - break; - case 232: -#line 725 "parse.y" -{yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,0);} -#line 3402 "parse.c" - break; - case 233: -#line 726 "parse.y" -{yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 3407 "parse.c" - break; - case 234: -#line 727 "parse.y" -{yygotominor.yy242 = 0;} -#line 3412 "parse.c" +#line 2843 "ext/sqlite/libsqlite/src/parse.c" break; case 235: -#line 732 "parse.y" +#line 732 "ext/sqlite/libsqlite/src/parse.y" { SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-5].minor.yy298, &yymsp[-4].minor.yy298); if( yymsp[-9].minor.yy372!=OE_None ) yymsp[-9].minor.yy372 = yymsp[0].minor.yy372; if( yymsp[-9].minor.yy372==OE_Default) yymsp[-9].minor.yy372 = OE_Abort; sqliteCreateIndex(pParse, &yymsp[-7].minor.yy298, pSrc, yymsp[-2].minor.yy320, yymsp[-9].minor.yy372, &yymsp[-10].minor.yy0, &yymsp[-1].minor.yy0); } -#line 3422 "parse.c" - /* No destructor defined for INDEX */ - /* No destructor defined for ON */ - /* No destructor defined for LP */ - break; - case 236: -#line 740 "parse.y" -{ yygotominor.yy372 = OE_Abort; } -#line 3430 "parse.c" - /* No destructor defined for UNIQUE */ +#line 2853 "ext/sqlite/libsqlite/src/parse.c" break; case 237: -#line 741 "parse.y" +#line 741 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_None; } -#line 3436 "parse.c" - break; - case 238: -#line 749 "parse.y" -{yygotominor.yy320 = 0;} -#line 3441 "parse.c" - break; - case 239: -#line 750 "parse.y" -{yygotominor.yy320 = yymsp[-1].minor.yy320;} -#line 3446 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for RP */ - break; - case 240: -#line 751 "parse.y" -{yygotominor.yy320 = sqliteIdListAppend(yymsp[-2].minor.yy320,&yymsp[0].minor.yy298);} -#line 3453 "parse.c" - /* No destructor defined for COMMA */ - break; - case 241: -#line 752 "parse.y" -{yygotominor.yy320 = sqliteIdListAppend(0,&yymsp[0].minor.yy298);} -#line 3459 "parse.c" - break; - case 242: -#line 753 "parse.y" -{yygotominor.yy298 = yymsp[-1].minor.yy298;} -#line 3464 "parse.c" - /* No destructor defined for sortorder */ +#line 2858 "ext/sqlite/libsqlite/src/parse.c" break; case 243: -#line 758 "parse.y" +#line 758 "ext/sqlite/libsqlite/src/parse.y" { sqliteDropIndex(pParse, sqliteSrcListAppend(0,&yymsp[-1].minor.yy298,&yymsp[0].minor.yy298)); } -#line 3472 "parse.c" - /* No destructor defined for DROP */ - /* No destructor defined for INDEX */ +#line 2865 "ext/sqlite/libsqlite/src/parse.c" break; case 244: -#line 766 "parse.y" +#line 766 "ext/sqlite/libsqlite/src/parse.y" {sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-6].minor.yy298,&yymsp[-5].minor.yy298),&yymsp[-3].minor.yy298,&yymsp[0].minor.yy0,yymsp[-7].minor.yy372);} -#line 3479 "parse.c" - /* No destructor defined for COPY */ - /* No destructor defined for FROM */ - /* No destructor defined for USING */ - /* No destructor defined for DELIMITERS */ +#line 2870 "ext/sqlite/libsqlite/src/parse.c" break; case 245: -#line 768 "parse.y" +#line 768 "ext/sqlite/libsqlite/src/parse.y" {sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-3].minor.yy298,&yymsp[-2].minor.yy298),&yymsp[0].minor.yy298,0,yymsp[-4].minor.yy372);} -#line 3488 "parse.c" - /* No destructor defined for COPY */ - /* No destructor defined for FROM */ +#line 2875 "ext/sqlite/libsqlite/src/parse.c" break; case 246: -#line 772 "parse.y" +#line 772 "ext/sqlite/libsqlite/src/parse.y" {sqliteVacuum(pParse,0);} -#line 3495 "parse.c" - /* No destructor defined for VACUUM */ +#line 2880 "ext/sqlite/libsqlite/src/parse.c" break; case 247: -#line 773 "parse.y" +#line 773 "ext/sqlite/libsqlite/src/parse.y" {sqliteVacuum(pParse,&yymsp[0].minor.yy298);} -#line 3501 "parse.c" - /* No destructor defined for VACUUM */ +#line 2885 "ext/sqlite/libsqlite/src/parse.c" break; case 248: -#line 777 "parse.y" + case 250: +#line 777 "ext/sqlite/libsqlite/src/parse.y" {sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy298,0);} -#line 3507 "parse.c" - /* No destructor defined for PRAGMA */ - /* No destructor defined for EQ */ +#line 2891 "ext/sqlite/libsqlite/src/parse.c" break; case 249: -#line 778 "parse.y" +#line 778 "ext/sqlite/libsqlite/src/parse.y" {sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy0,0);} -#line 3514 "parse.c" - /* No destructor defined for PRAGMA */ - /* No destructor defined for EQ */ - break; - case 250: -#line 779 "parse.y" -{sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy298,0);} -#line 3521 "parse.c" - /* No destructor defined for PRAGMA */ - /* No destructor defined for EQ */ +#line 2896 "ext/sqlite/libsqlite/src/parse.c" break; case 251: -#line 780 "parse.y" +#line 780 "ext/sqlite/libsqlite/src/parse.y" {sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy298,1);} -#line 3528 "parse.c" - /* No destructor defined for PRAGMA */ - /* No destructor defined for EQ */ +#line 2901 "ext/sqlite/libsqlite/src/parse.c" break; case 252: -#line 781 "parse.y" +#line 781 "ext/sqlite/libsqlite/src/parse.y" {sqlitePragma(pParse,&yymsp[-3].minor.yy298,&yymsp[-1].minor.yy298,0);} -#line 3535 "parse.c" - /* No destructor defined for PRAGMA */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 2906 "ext/sqlite/libsqlite/src/parse.c" break; case 253: -#line 782 "parse.y" +#line 782 "ext/sqlite/libsqlite/src/parse.y" {sqlitePragma(pParse,&yymsp[0].minor.yy298,&yymsp[0].minor.yy298,0);} -#line 3543 "parse.c" - /* No destructor defined for PRAGMA */ - break; - case 254: -#line 783 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy298;} -#line 3549 "parse.c" - /* No destructor defined for plus_opt */ - break; - case 255: -#line 784 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy298;} -#line 3555 "parse.c" - /* No destructor defined for MINUS */ - break; - case 256: -#line 785 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 3561 "parse.c" - break; - case 257: -#line 786 "parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 3566 "parse.c" - break; - case 258: - /* No destructor defined for PLUS */ - break; - case 259: +#line 2911 "ext/sqlite/libsqlite/src/parse.c" break; case 260: -#line 792 "parse.y" +#line 792 "ext/sqlite/libsqlite/src/parse.y" { Token all; all.z = yymsp[-4].minor.yy0.z; all.n = (yymsp[0].minor.yy0.z - yymsp[-4].minor.yy0.z) + yymsp[0].minor.yy0.n; sqliteFinishTrigger(pParse, yymsp[-1].minor.yy19, &all); } -#line 3581 "parse.c" - /* No destructor defined for trigger_decl */ - /* No destructor defined for BEGIN */ +#line 2921 "ext/sqlite/libsqlite/src/parse.c" break; case 261: -#line 800 "parse.y" +#line 800 "ext/sqlite/libsqlite/src/parse.y" { SrcList *pTab = sqliteSrcListAppend(0, &yymsp[-3].minor.yy298, &yymsp[-2].minor.yy298); sqliteBeginTrigger(pParse, &yymsp[-7].minor.yy298, yymsp[-6].minor.yy372, yymsp[-5].minor.yy290.a, yymsp[-5].minor.yy290.b, pTab, yymsp[-1].minor.yy372, yymsp[0].minor.yy182, yymsp[-9].minor.yy372); } -#line 3591 "parse.c" - /* No destructor defined for TRIGGER */ - /* No destructor defined for ON */ +#line 2929 "ext/sqlite/libsqlite/src/parse.c" break; case 262: -#line 806 "parse.y" + case 265: +#line 806 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_BEFORE; } -#line 3598 "parse.c" - /* No destructor defined for BEFORE */ +#line 2935 "ext/sqlite/libsqlite/src/parse.c" break; case 263: -#line 807 "parse.y" +#line 807 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_AFTER; } -#line 3604 "parse.c" - /* No destructor defined for AFTER */ +#line 2940 "ext/sqlite/libsqlite/src/parse.c" break; case 264: -#line 808 "parse.y" +#line 808 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_INSTEAD;} -#line 3610 "parse.c" - /* No destructor defined for INSTEAD */ - /* No destructor defined for OF */ - break; - case 265: -#line 809 "parse.y" -{ yygotominor.yy372 = TK_BEFORE; } -#line 3617 "parse.c" +#line 2945 "ext/sqlite/libsqlite/src/parse.c" break; case 266: -#line 813 "parse.y" +#line 813 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_DELETE; yygotominor.yy290.b = 0; } -#line 3622 "parse.c" - /* No destructor defined for DELETE */ +#line 2950 "ext/sqlite/libsqlite/src/parse.c" break; case 267: -#line 814 "parse.y" +#line 814 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_INSERT; yygotominor.yy290.b = 0; } -#line 3628 "parse.c" - /* No destructor defined for INSERT */ +#line 2955 "ext/sqlite/libsqlite/src/parse.c" break; case 268: -#line 815 "parse.y" +#line 815 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_UPDATE; yygotominor.yy290.b = 0;} -#line 3634 "parse.c" - /* No destructor defined for UPDATE */ +#line 2960 "ext/sqlite/libsqlite/src/parse.c" break; case 269: -#line 816 "parse.y" +#line 816 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy290.a = TK_UPDATE; yygotominor.yy290.b = yymsp[0].minor.yy320; } -#line 3640 "parse.c" - /* No destructor defined for UPDATE */ - /* No destructor defined for OF */ +#line 2965 "ext/sqlite/libsqlite/src/parse.c" break; case 270: -#line 819 "parse.y" -{ yygotominor.yy372 = TK_ROW; } -#line 3647 "parse.c" - break; case 271: -#line 820 "parse.y" +#line 819 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_ROW; } -#line 3652 "parse.c" - /* No destructor defined for FOR */ - /* No destructor defined for EACH */ - /* No destructor defined for ROW */ +#line 2971 "ext/sqlite/libsqlite/src/parse.c" break; case 272: -#line 821 "parse.y" +#line 821 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_STATEMENT; } -#line 3660 "parse.c" - /* No destructor defined for FOR */ - /* No destructor defined for EACH */ - /* No destructor defined for STATEMENT */ +#line 2976 "ext/sqlite/libsqlite/src/parse.c" break; case 273: -#line 824 "parse.y" +#line 824 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy182 = 0; } -#line 3668 "parse.c" +#line 2981 "ext/sqlite/libsqlite/src/parse.c" break; case 274: -#line 825 "parse.y" +#line 825 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy182 = yymsp[0].minor.yy242; } -#line 3673 "parse.c" - /* No destructor defined for WHEN */ +#line 2986 "ext/sqlite/libsqlite/src/parse.c" break; case 275: -#line 829 "parse.y" +#line 829 "ext/sqlite/libsqlite/src/parse.y" { yymsp[-2].minor.yy19->pNext = yymsp[0].minor.yy19; yygotominor.yy19 = yymsp[-2].minor.yy19; } -#line 3682 "parse.c" - /* No destructor defined for SEMI */ +#line 2994 "ext/sqlite/libsqlite/src/parse.c" break; case 276: -#line 833 "parse.y" +#line 833 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy19 = 0; } -#line 3688 "parse.c" +#line 2999 "ext/sqlite/libsqlite/src/parse.c" break; case 277: -#line 839 "parse.y" +#line 839 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy19 = sqliteTriggerUpdateStep(&yymsp[-3].minor.yy298, yymsp[-1].minor.yy322, yymsp[0].minor.yy242, yymsp[-4].minor.yy372); } -#line 3693 "parse.c" - /* No destructor defined for UPDATE */ - /* No destructor defined for SET */ +#line 3004 "ext/sqlite/libsqlite/src/parse.c" break; case 278: -#line 844 "parse.y" +#line 844 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-5].minor.yy298, yymsp[-4].minor.yy320, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy372);} -#line 3700 "parse.c" - /* No destructor defined for INTO */ - /* No destructor defined for VALUES */ - /* No destructor defined for LP */ - /* No destructor defined for RP */ +#line 3009 "ext/sqlite/libsqlite/src/parse.c" break; case 279: -#line 847 "parse.y" +#line 847 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-2].minor.yy298, yymsp[-1].minor.yy320, 0, yymsp[0].minor.yy179, yymsp[-4].minor.yy372);} -#line 3709 "parse.c" - /* No destructor defined for INTO */ +#line 3014 "ext/sqlite/libsqlite/src/parse.c" break; case 280: -#line 851 "parse.y" +#line 851 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy19 = sqliteTriggerDeleteStep(&yymsp[-1].minor.yy298, yymsp[0].minor.yy242);} -#line 3715 "parse.c" - /* No destructor defined for DELETE */ - /* No destructor defined for FROM */ +#line 3019 "ext/sqlite/libsqlite/src/parse.c" break; case 281: -#line 854 "parse.y" +#line 854 "ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy19 = sqliteTriggerSelectStep(yymsp[0].minor.yy179); } -#line 3722 "parse.c" +#line 3024 "ext/sqlite/libsqlite/src/parse.c" break; case 282: -#line 857 "parse.y" +#line 857 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, 0); yygotominor.yy242->iColumn = OE_Ignore; sqliteExprSpan(yygotominor.yy242, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 3731 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for IGNORE */ +#line 3033 "ext/sqlite/libsqlite/src/parse.c" break; case 283: -#line 862 "parse.y" +#line 862 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); yygotominor.yy242->iColumn = OE_Rollback; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3742 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for ROLLBACK */ - /* No destructor defined for COMMA */ +#line 3042 "ext/sqlite/libsqlite/src/parse.c" break; case 284: -#line 867 "parse.y" +#line 867 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); yygotominor.yy242->iColumn = OE_Abort; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3754 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for ABORT */ - /* No destructor defined for COMMA */ +#line 3051 "ext/sqlite/libsqlite/src/parse.c" break; case 285: -#line 872 "parse.y" +#line 872 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); yygotominor.yy242->iColumn = OE_Fail; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3766 "parse.c" - /* No destructor defined for LP */ - /* No destructor defined for FAIL */ - /* No destructor defined for COMMA */ +#line 3060 "ext/sqlite/libsqlite/src/parse.c" break; case 286: -#line 879 "parse.y" +#line 879 "ext/sqlite/libsqlite/src/parse.y" { sqliteDropTrigger(pParse,sqliteSrcListAppend(0,&yymsp[-1].minor.yy298,&yymsp[0].minor.yy298)); } -#line 3776 "parse.c" - /* No destructor defined for DROP */ - /* No destructor defined for TRIGGER */ +#line 3067 "ext/sqlite/libsqlite/src/parse.c" break; case 287: -#line 884 "parse.y" +#line 884 "ext/sqlite/libsqlite/src/parse.y" { sqliteAttach(pParse, &yymsp[-3].minor.yy298, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); } -#line 3785 "parse.c" - /* No destructor defined for ATTACH */ - /* No destructor defined for database_kw_opt */ - /* No destructor defined for AS */ - break; - case 288: -#line 888 "parse.y" -{ yygotominor.yy298 = yymsp[0].minor.yy298; } -#line 3793 "parse.c" - /* No destructor defined for USING */ +#line 3074 "ext/sqlite/libsqlite/src/parse.c" break; case 289: -#line 889 "parse.y" +#line 889 "ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy298.z = 0; yygotominor.yy298.n = 0; } -#line 3799 "parse.c" - break; - case 290: - /* No destructor defined for DATABASE */ - break; - case 291: +#line 3079 "ext/sqlite/libsqlite/src/parse.c" break; case 292: -#line 895 "parse.y" +#line 895 "ext/sqlite/libsqlite/src/parse.y" { sqliteDetach(pParse, &yymsp[0].minor.yy298); } -#line 3811 "parse.c" - /* No destructor defined for DETACH */ - /* No destructor defined for database_kw_opt */ +#line 3086 "ext/sqlite/libsqlite/src/parse.c" break; }; yygoto = yyRuleInfo[yyruleno].lhs; yysize = yyRuleInfo[yyruleno].nrhs; yypParser->yyidx -= yysize; - yyact = yy_find_reduce_action(yypParser,yygoto); + yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto); if( yyact < YYNSTATE ){ - yy_shift(yypParser,yyact,yygoto,&yygotominor); +#ifdef NDEBUG + /* If we are not debugging and the reduce action popped at least + ** one element off the stack, then we can push the new element back + ** onto the stack here, and skip the stack overflow test in yy_shift(). + ** That gives a significant speed improvement. */ + if( yysize ){ + yypParser->yyidx++; + yymsp -= yysize-1; + yymsp->stateno = yyact; + yymsp->major = yygoto; + yymsp->minor = yygotominor; + }else +#endif + { + yy_shift(yypParser,yyact,yygoto,&yygotominor); + } }else if( yyact == YYNSTATE + YYNRULE + 1 ){ yy_accept(yypParser); } @@ -3852,7 +3138,7 @@ static void yy_syntax_error( ){ sqliteParserARG_FETCH; #define TOKEN (yyminor.yy0) -#line 23 "parse.y" +#line 23 "ext/sqlite/libsqlite/src/parse.y" if( pParse->zErrMsg==0 ){ if( TOKEN.z[0] ){ @@ -3861,8 +3147,7 @@ static void yy_syntax_error( sqliteErrorMsg(pParse, "incomplete SQL statement"); } } - -#line 3865 "parse.c" +#line 3153 "ext/sqlite/libsqlite/src/parse.c" sqliteParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } @@ -3918,7 +3203,7 @@ void sqliteParser( /* (re)initialize the parser, if necessary */ yypParser = (yyParser*)yyp; if( yypParser->yyidx<0 ){ - if( yymajor==0 ) return; + /* if( yymajor==0 ) return; // not sure why this was here... */ yypParser->yyidx = 0; yypParser->yyerrcnt = -1; yypParser->yystack[0].stateno = 0; diff --git a/ext/sqlite/libsqlite/src/sqlite.w32.h b/ext/sqlite/libsqlite/src/sqlite.w32.h index b234551f6..b85216f16 100644 --- a/ext/sqlite/libsqlite/src/sqlite.w32.h +++ b/ext/sqlite/libsqlite/src/sqlite.w32.h @@ -12,7 +12,7 @@ ** This header file defines the interface that the SQLite library ** presents to client programs. ** -** @(#) $Id: sqlite.w32.h,v 1.6.2.1 2005/09/07 15:11:33 iliaa Exp $ +** @(#) $Id: sqlite.w32.h,v 1.6.2.2 2005/12/20 15:26:26 iliaa Exp $ */ #ifndef _SQLITE_H_ #define _SQLITE_H_ @@ -28,7 +28,7 @@ extern "C" { /* ** The version of the SQLite library. */ -#define SQLITE_VERSION "2.8.16" +#define SQLITE_VERSION "2.8.17" /* ** The version string is also compiled into the library so that a program diff --git a/ext/sqlite/libsqlite/src/sqliteInt.h b/ext/sqlite/libsqlite/src/sqliteInt.h index f745971d3..7ab879cd3 100644 --- a/ext/sqlite/libsqlite/src/sqliteInt.h +++ b/ext/sqlite/libsqlite/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.6.4.1 2005/09/07 15:11:33 iliaa Exp $ +** @(#) $Id: sqliteInt.h,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $ */ #include "config.h" #include "sqlite.h" @@ -1120,7 +1120,7 @@ void sqliteRealToSortable(double r, char *); #endif char *sqliteMPrintf(const char*, ...); char *sqliteVMPrintf(const char*, va_list); -void sqliteSetString(char **, const char *, ...); +void sqliteSetString(char **, ...); void sqliteSetNString(char **, ...); void sqliteErrorMsg(Parse*, const char*, ...); void sqliteDequote(char*); diff --git a/ext/sqlite/libsqlite/src/util.c b/ext/sqlite/libsqlite/src/util.c index be4e10828..dc63d4dc8 100644 --- a/ext/sqlite/libsqlite/src/util.c +++ b/ext/sqlite/libsqlite/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.6.4.1 2005/09/07 15:11:33 iliaa Exp $ +** $Id: util.c,v 1.6.4.2 2005/12/20 15:26:26 iliaa Exp $ */ #include "sqliteInt.h" #include @@ -330,15 +330,15 @@ char *sqliteStrNDup(const char *z, int n){ ** point to that string. The 1st argument must either be NULL or ** point to memory obtained from sqliteMalloc(). */ -void sqliteSetString(char **pz, const char *zFirst, ...){ +void sqliteSetString(char **pz, ...){ va_list ap; int nByte; const char *z; char *zResult; if( pz==0 ) return; - nByte = strlen(zFirst) + 1; - va_start(ap, zFirst); + nByte = 1; + va_start(ap, pz); while( (z = va_arg(ap, const char*))!=0 ){ nByte += strlen(z); } @@ -348,9 +348,8 @@ void sqliteSetString(char **pz, const char *zFirst, ...){ if( zResult==0 ){ return; } - strcpy(zResult, zFirst); - zResult += strlen(zResult); - va_start(ap, zFirst); + *zResult = 0; + va_start(ap, pz); while( (z = va_arg(ap, const char*))!=0 ){ strcpy(zResult, z); zResult += strlen(zResult); diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 027fb4407..07a8e1d3f 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite2.c,v 1.6 2005/06/17 13:12:31 sniper Exp $ */ +/* $Id: pdo_sqlite2.c,v 1.6.2.3 2006/01/01 12:50:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -326,6 +326,10 @@ static int sqlite2_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ sqlite_close(H->db); H->db = NULL; } + if (H->einfo.errmsg) { + pefree(H->einfo.errmsg, dbh->is_persistent); + H->einfo.errmsg = NULL; + } pefree(H, dbh->is_persistent); dbh->driver_data = NULL; } @@ -357,7 +361,7 @@ static long sqlite2_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TS pdo_sqlite2_db_handle *H = (pdo_sqlite2_db_handle *)dbh->driver_data; char *errmsg = NULL; - if (sqlite_exec(H->db, sql, NULL, NULL, &errmsg) != SQLITE_OK) { + if ((H->einfo.errcode = sqlite_exec(H->db, sql, NULL, NULL, &errmsg)) != SQLITE_OK) { pdo_sqlite2_error(errmsg, dbh); return -1; } else { @@ -477,12 +481,12 @@ static PHP_FUNCTION(sqlite2_create_function) /* TODO: implement this stuff */ } -static function_entry dbh_methods[] = { +static zend_function_entry dbh_methods[] = { PHP_FE(sqlite2_create_function, NULL) {NULL, NULL, NULL} }; -static function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) +static zend_function_entry *get_driver_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) { switch (kind) { case PDO_DBH_DRIVER_METHOD_KIND_DBH: diff --git a/ext/sqlite/php_sqlite.h b/ext/sqlite/php_sqlite.h index 4160a6cf5..0d27dc38e 100644 --- a/ext/sqlite/php_sqlite.h +++ b/ext/sqlite/php_sqlite.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Marcus Boerger | +----------------------------------------------------------------------+ - $Id: php_sqlite.h,v 1.32 2005/08/03 14:07:53 sniper Exp $ + $Id: php_sqlite.h,v 1.32.2.2 2006/01/01 12:50:14 sniper Exp $ */ #ifndef PHP_SQLITE_H @@ -93,7 +93,7 @@ PHP_FUNCTION(sqlite_factory); PHP_FUNCTION(sqlite_fetch_column_types); ZEND_BEGIN_MODULE_GLOBALS(sqlite) - int assoc_case; + long assoc_case; ZEND_END_MODULE_GLOBALS(sqlite) #ifdef ZTS diff --git a/ext/sqlite/sess_sqlite.c b/ext/sqlite/sess_sqlite.c index 79c8c33f1..95c462d48 100644 --- a/ext/sqlite/sess_sqlite.c +++ b/ext/sqlite/sess_sqlite.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sess_sqlite.c,v 1.18 2005/08/03 14:07:53 sniper Exp $ */ +/* $Id: sess_sqlite.c,v 1.18.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index f6e4ec5b7..3c0f3bdc4 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Marcus Boerger | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.166.2.7 2005/11/25 16:01:41 sniper Exp $ + $Id: sqlite.c,v 1.166.2.11 2006/01/01 12:50:14 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -29,7 +29,9 @@ #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" +#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) #include "ext/session/php_session.h" +#endif #include "php_sqlite.h" #if HAVE_TIME_H @@ -161,7 +163,7 @@ static int php_sqlite_fetch(struct php_sqlite_result *rres TSRMLS_DC); enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM }; -function_entry sqlite_functions[] = { +zend_function_entry sqlite_functions[] = { PHP_FE(sqlite_open, third_arg_force_ref) PHP_FE(sqlite_popen, third_arg_force_ref) PHP_FE(sqlite_close, NULL) @@ -204,7 +206,7 @@ function_entry sqlite_functions[] = { {NULL, NULL, NULL} }; -function_entry sqlite_funcs_db[] = { +zend_function_entry sqlite_funcs_db[] = { PHP_ME_MAPPING(__construct, sqlite_open, third_arg_force_ref) /* PHP_ME_MAPPING(close, sqlite_close, NULL)*/ PHP_ME_MAPPING(query, sqlite_query, third_arg_force_ref) @@ -224,7 +226,7 @@ function_entry sqlite_funcs_db[] = { {NULL, NULL, NULL} }; -function_entry sqlite_funcs_query[] = { +zend_function_entry sqlite_funcs_query[] = { PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL) PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL) PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL) @@ -248,7 +250,7 @@ function_entry sqlite_funcs_query[] = { {NULL, NULL, NULL} }; -function_entry sqlite_funcs_ub_query[] = { +zend_function_entry sqlite_funcs_ub_query[] = { PHP_ME_MAPPING(fetch, sqlite_fetch_array, NULL) PHP_ME_MAPPING(fetchObject, sqlite_fetch_object, NULL) PHP_ME_MAPPING(fetchSingle, sqlite_fetch_single, NULL) @@ -263,7 +265,7 @@ function_entry sqlite_funcs_ub_query[] = { {NULL, NULL, NULL} }; -function_entry sqlite_funcs_exception[] = { +zend_function_entry sqlite_funcs_exception[] = { {NULL, NULL, NULL} }; @@ -346,11 +348,11 @@ static ZEND_RSRC_DTOR_FUNC(php_sqlite_db_dtor) { if (rsrc->ptr) { struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc->ptr; - + sqlite_close(db->db); zend_hash_destroy(&db->callbacks); - + pefree(db, db->is_persistent); rsrc->ptr = NULL; @@ -413,7 +415,7 @@ static int php_sqlite_forget_persistent_id_numbers(zend_rsrc_list_entry *rsrc TS /* don't leave pending commits hanging around */ sqlite_exec(db->db, "ROLLBACK", NULL, NULL, NULL); - + return 0; } @@ -438,7 +440,7 @@ static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, co sqlite_set_result_error(func, "not enough parameters", -1); return; } - + ZVAL_STRING(&funcname, (char*)argv[0], 1); if (!zend_make_callable(&funcname, &callable TSRMLS_CC)) { @@ -449,10 +451,10 @@ static void php_sqlite_generic_function_callback(sqlite_func *func, int argc, co zval_dtor(&funcname); return; } - + if (argc > 1) { zargs = (zval ***)safe_emalloc((argc - 1), sizeof(zval **), 0); - + for (i = 0; i < argc-1; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -529,7 +531,7 @@ static void php_sqlite_function_callback(sqlite_func *func, int argc, const char if (argc > 0) { zargs = (zval ***)safe_emalloc(argc, sizeof(zval **), 0); - + for (i = 0; i < argc; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -608,10 +610,10 @@ static void php_sqlite_agg_step_function_callback(sqlite_func *func, int argc, c if (argc < 1) { return; } - + zargc = argc + 1; zargs = (zval ***)safe_emalloc(zargc, sizeof(zval **), 0); - + /* first arg is always the context zval */ context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); @@ -673,9 +675,9 @@ static void php_sqlite_agg_fini_function_callback(sqlite_func *func) sqlite_set_result_error(func, "this function has not been correctly defined for this request", -1); return; } - + context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); - + res = call_user_function_ex(EG(function_table), NULL, funcs->fini, @@ -791,7 +793,7 @@ typedef struct _sqlite_object { } u; } sqlite_object; -static int sqlite_free_persistent(list_entry *le, void *ptr TSRMLS_DC) +static int sqlite_free_persistent(zend_rsrc_list_entry *le, void *ptr TSRMLS_DC) { return le->ptr == ptr ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_KEEP; } @@ -837,7 +839,7 @@ static void sqlite_object_new(zend_class_entry *class_type, zend_object_handlers static zend_object_value sqlite_object_new_db(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, &sqlite_object_handlers_db, &retval TSRMLS_CC); return retval; } @@ -845,7 +847,7 @@ static zend_object_value sqlite_object_new_db(zend_class_entry *class_type TSRML static zend_object_value sqlite_object_new_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, &sqlite_object_handlers_query, &retval TSRMLS_CC); return retval; } @@ -853,7 +855,7 @@ static zend_object_value sqlite_object_new_query(zend_class_entry *class_type TS static zend_object_value sqlite_object_new_ub_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, &sqlite_object_handlers_ub_query, &retval TSRMLS_CC); return retval; } @@ -861,7 +863,7 @@ static zend_object_value sqlite_object_new_ub_query(zend_class_entry *class_type static zend_object_value sqlite_object_new_exception(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, &sqlite_object_handlers_exception, &retval TSRMLS_CC); return retval; } @@ -947,7 +949,7 @@ void sqlite_iterator_get_current_data(zend_object_iterator *iter, zval ***data T MAKE_STD_ZVAL(**data); php_sqlite_fetch_array(res, res->mode, 1, 0, **data TSRMLS_CC); } - + } int sqlite_iterator_get_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) @@ -976,7 +978,7 @@ void sqlite_iterator_move_forward(zend_object_iterator *iter TSRMLS_DC) /* php_error_docref(NULL TSRMLS_CC, E_WARNING, "no more rows available"); */ return; } - + res->curr_row++; } } @@ -1029,7 +1031,7 @@ PHP_MINIT_FUNCTION(sqlite) REGISTER_SQLITE_CLASS(Exception, exception, spl_ce_RuntimeException); #else REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default()); -#endif +#endif sqlite_ce_db->ce_flags &= ~ZEND_ACC_FINAL_CLASS; sqlite_ce_db->constructor->common.fn_flags |= ZEND_ACC_FINAL; @@ -1044,7 +1046,7 @@ PHP_MINIT_FUNCTION(sqlite) #if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) zend_class_implements(sqlite_ce_query TSRMLS_CC, 2, zend_ce_iterator, spl_ce_Countable); #else - zend_class_implements(sqlite_ce_query TSRMLS_CC, 1, zend_ce_iterator); + zend_class_implements(sqlite_ce_query TSRMLS_CC, 1, zend_ce_iterator); #endif sqlite_ce_query->get_iterator = sqlite_get_iterator; sqlite_ce_query->iterator_funcs.funcs = &sqlite_query_iterator_funcs; @@ -1056,7 +1058,7 @@ PHP_MINIT_FUNCTION(sqlite) #if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) php_session_register_module(ps_sqlite_ptr); #endif - + le_sqlite_db = zend_register_list_destructors_ex(php_sqlite_db_dtor, NULL, "sqlite database", module_number); le_sqlite_pdb = zend_register_list_destructors_ex(NULL, php_sqlite_db_dtor, "sqlite database (persistent)", module_number); le_sqlite_result = zend_register_list_destructors_ex(php_sqlite_result_dtor, NULL, "sqlite result", module_number); @@ -1064,7 +1066,7 @@ PHP_MINIT_FUNCTION(sqlite) REGISTER_LONG_CONSTANT("SQLITE_BOTH", PHPSQLITE_BOTH, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_NUM", PHPSQLITE_NUM, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_ASSOC", PHPSQLITE_ASSOC, CONST_CS|CONST_PERSISTENT); - + REGISTER_LONG_CONSTANT("SQLITE_OK", SQLITE_OK, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_ERROR", SQLITE_ERROR, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE_INTERNAL", SQLITE_INTERNAL, CONST_CS|CONST_PERSISTENT); @@ -1098,7 +1100,7 @@ PHP_MINIT_FUNCTION(sqlite) #ifdef PHP_SQLITE2_HAVE_PDO if (FAILURE == php_pdo_register_driver(&pdo_sqlite2_driver)) { - return FAILURE; + return FAILURE; } #endif @@ -1125,7 +1127,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,v 1.166.2.7 2005/11/25 16:01:41 sniper Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.11 2006/01/01 12:50:14 sniper Exp $"); 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(); @@ -1166,7 +1168,7 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per db->db = sdb; zend_hash_init(&db->callbacks, 0, NULL, php_sqlite_callback_dtor, db->is_persistent); - + /* register the PHP functions */ sqlite_create_function(sdb, "php", -1, php_sqlite_generic_function_callback, 0); @@ -1180,7 +1182,7 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { sqlite_set_authorizer(sdb, php_sqlite_authorizer, NULL); } - + db->rsrc_id = ZEND_REGISTER_RESOURCE(object ? NULL : return_value, db, persistent_id ? le_sqlite_pdb : le_sqlite_db); if (object) { /* if object is not an object then we're called from the factory() function */ @@ -1192,7 +1194,7 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per } if (persistent_id) { - list_entry le; + zend_rsrc_list_entry le; Z_TYPE(le) = le_sqlite_pdb; le.ptr = db; @@ -1203,7 +1205,7 @@ static struct php_sqlite_db *php_sqlite_open(char *filename, int mode, char *per php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to register persistent resource"); } } - + return db; } @@ -1216,8 +1218,8 @@ PHP_FUNCTION(sqlite_popen) int filename_len, hashkeylen; zval *errmsg = NULL; struct php_sqlite_db *db = NULL; - list_entry *le; - + zend_rsrc_list_entry *le; + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { return; @@ -1230,7 +1232,7 @@ PHP_FUNCTION(sqlite_popen) if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { /* resolve the fully-qualified path name to use as the hash key */ fullpath = expand_filepath(filename, NULL TSRMLS_CC); - + if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE; } @@ -1243,12 +1245,12 @@ PHP_FUNCTION(sqlite_popen) } hashkeylen = spprintf(&hashkey, 0, "sqlite_pdb_%s:%ld", fullpath, mode); - + /* do we have an existing persistent connection ? */ if (SUCCESS == zend_hash_find(&EG(persistent_list), hashkey, hashkeylen+1, (void*)&le)) { if (Z_TYPE_P(le) == le_sqlite_pdb) { db = (struct php_sqlite_db*)le->ptr; - + if (db->rsrc_id == FAILURE) { /* give it a valid resource id for this request */ db->rsrc_id = ZEND_REGISTER_RESOURCE(return_value, db, le_sqlite_pdb); @@ -1306,7 +1308,7 @@ PHP_FUNCTION(sqlite_open) if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { /* resolve the fully-qualified path name to use as the hash key */ fullpath = expand_filepath(filename, NULL TSRMLS_CC); - + if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { php_std_error_handling(); efree(fullpath); @@ -1361,13 +1363,13 @@ PHP_FUNCTION(sqlite_factory) if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { /* resolve the fully-qualified path name to use as the hash key */ fullpath = expand_filepath(filename, NULL TSRMLS_CC); - + if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { efree(fullpath); php_std_error_handling(); RETURN_NULL(); } - + if (php_check_open_basedir(fullpath TSRMLS_CC)) { efree(fullpath); php_std_error_handling(); @@ -1556,7 +1558,7 @@ terminate: memcpy(*prres, &res, sizeof(**prres)); (*prres)->db = db; zend_list_addref(db->rsrc_id); - + /* now the result set is ready for stepping: get first row */ if (php_sqlite_fetch((*prres) TSRMLS_CC) != SQLITE_OK) { @@ -1565,10 +1567,10 @@ terminate: if (return_value) { RETURN_FALSE; } else { - return; + return; } } - + (*prres)->curr_row = 0; if (object) { @@ -1607,7 +1609,7 @@ PHP_FUNCTION(sqlite_unbuffered_query) DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr|lz/", &sql, &sql_len, &zdb, &mode, &errmsg) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr|lz/", &sql, &sql_len, &zdb, &mode, &errmsg) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|lz/", &zdb, &sql, &sql_len, &mode, &errmsg)) { return; } @@ -1661,7 +1663,7 @@ PHP_FUNCTION(sqlite_fetch_column_types) DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &tbl, &tbl_len, &zdb, &result_type) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &tbl, &tbl_len, &zdb, &result_type) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &tbl, &tbl_len, &result_type)) { return; } @@ -1732,7 +1734,7 @@ PHP_FUNCTION(sqlite_query) DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr|lz/", &sql, &sql_len, &zdb, &mode, &errmsg) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr|lz/", &sql, &sql_len, &zdb, &mode, &errmsg) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|lz/", &zdb, &sql, &sql_len, &mode, &errmsg)) { return; } @@ -1783,7 +1785,7 @@ PHP_FUNCTION(sqlite_exec) DB_FROM_OBJECT(db, object); } else { if(FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr", &sql, &sql_len, &zdb) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr", &sql, &sql_len, &zdb) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|z/", &zdb, &sql, &sql_len, &errmsg)) { return; } @@ -1924,12 +1926,12 @@ static void php_sqlite_fetch_column(struct php_sqlite_result *res, zval *which, if (!res->buffered) { efree((char*)rowdata[j]); rowdata[j] = NULL; - } + } } else { RETVAL_STRING((char*)rowdata[j], res->buffered); if (!res->buffered) { rowdata[j] = NULL; - } + } } } /* }}} */ @@ -2027,7 +2029,7 @@ PHP_FUNCTION(sqlite_fetch_object) zval dataset; zend_fcall_info fci; zend_fcall_info_cache fcc; - zval *retval_ptr; + zval *retval_ptr; zval *ctor_params = NULL; php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); @@ -2095,7 +2097,7 @@ PHP_FUNCTION(sqlite_fetch_object) } else { /* Two problems why we throw exceptions here: PHP is typeless * and hence passing one argument that's not an array could be - * by mistake and the other way round is possible, too. The + * by mistake and the other way round is possible, too. The * single value is an array. Also we'd have to make that one * argument passed by reference. */ @@ -2150,7 +2152,7 @@ PHP_FUNCTION(sqlite_array_query) DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr|lb", &sql, &sql_len, &zdb, &mode, &decode_binary) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr|lb", &sql, &sql_len, &zdb, &mode, &decode_binary) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|lb", &zdb, &sql, &sql_len, &mode, &decode_binary)) { return; } @@ -2169,15 +2171,15 @@ PHP_FUNCTION(sqlite_array_query) } return; } - + rres = (struct php_sqlite_result *)emalloc(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) { - efree(rres); - } - RETURN_FALSE; - } + if (db->last_err_code != SQLITE_OK) { + if (rres) { + efree(rres); + } + RETURN_FALSE; + } array_init(return_value); @@ -2196,13 +2198,13 @@ static void php_sqlite_fetch_single(struct php_sqlite_result *res, zend_bool dec const char **rowdata; char *decoded; int decoded_len; - + /* check range of the row */ if (res->curr_row >= res->nrows) { /* no more */ RETURN_FALSE; } - + if (res->buffered) { rowdata = (const char**)&res->table[res->curr_row * res->ncolumns]; } else { @@ -2266,7 +2268,7 @@ PHP_FUNCTION(sqlite_single_query) RES_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr|bb", &sql, &sql_len, &zdb, &srow, &decode_binary) && + ZEND_NUM_ARGS() TSRMLS_CC, "sr|bb", &sql, &sql_len, &zdb, &srow, &decode_binary) && FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|bb", &zdb, &sql, &sql_len, &srow, &decode_binary)) { return; } @@ -2568,7 +2570,7 @@ PHP_FUNCTION(sqlite_has_prev) RETURN_FALSE; } - RETURN_BOOL(res->curr_row); + RETURN_BOOL(res->curr_row); } /* }}} */ @@ -2651,7 +2653,7 @@ PHP_FUNCTION(sqlite_seek) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot seek an unbuffered result set"); RETURN_FALSE; } - + if (row < 0 || row >= res->nrows) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "row %ld out of range", row); RETURN_FALSE; @@ -2686,7 +2688,7 @@ PHP_FUNCTION(sqlite_rewind) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot rewind an unbuffered result set"); RETURN_FALSE; } - + if (!res->nrows) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "no rows received"); RETURN_FALSE; @@ -2807,12 +2809,12 @@ PHP_FUNCTION(sqlite_escape_string) if (stringlen && (string[0] == '\x01' || memchr(string, '\0', stringlen) != NULL)) { /* binary string */ int enclen; - + ret = safe_emalloc(1 + stringlen / 254, 257, 3); ret[0] = '\x01'; enclen = php_sqlite_encode_binary(string, stringlen, ret+1); RETVAL_STRINGL(ret, enclen+1, 0); - + } else if (stringlen) { ret = sqlite_mprintf("%q", string); if (ret) { @@ -2859,7 +2861,7 @@ PHP_FUNCTION(sqlite_error_string) if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &code)) { return; } - + msg = sqlite_error_string(code); if (msg) { @@ -2927,7 +2929,7 @@ static enum callback_prep_t prep_callback_struct(struct php_sqlite_db *db, int i } alloc_funcs->is_valid = 1; *funcs = alloc_funcs; - + return ret; } @@ -2963,7 +2965,7 @@ PHP_FUNCTION(sqlite_create_aggregate) return; } efree(callable); - + if (!zend_is_callable(zfinal, 0, &callable)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "finalize function `%s' is not callable", callable); efree(callable); @@ -2971,13 +2973,13 @@ PHP_FUNCTION(sqlite_create_aggregate) } efree(callable); - + if (prep_callback_struct(db, 1, funcname, zstep, zfinal, &funcs) == DO_REG) { sqlite_create_aggregate(db->db, funcname, num_args, php_sqlite_agg_step_function_callback, php_sqlite_agg_fini_function_callback, funcs); } - + } /* }}} */ @@ -2993,7 +2995,7 @@ PHP_FUNCTION(sqlite_create_function) struct php_sqlite_agg_functions *funcs; char *callable = NULL; long num_args = -1; - + zval *object = getThis(); if (object) { @@ -3014,7 +3016,7 @@ PHP_FUNCTION(sqlite_create_function) return; } efree(callable); - + if (prep_callback_struct(db, 0, funcname, zcall, NULL, &funcs) == DO_REG) { sqlite_create_function(db->db, funcname, num_args, php_sqlite_function_callback, funcs); } @@ -3039,7 +3041,7 @@ PHP_FUNCTION(sqlite_udf_encode_binary) /* binary string */ int enclen; char *ret; - + ret = safe_emalloc(1 + datalen / 254, 257, 3); ret[0] = '\x01'; enclen = php_sqlite_encode_binary(data, datalen, ret+1); @@ -3068,7 +3070,7 @@ PHP_FUNCTION(sqlite_udf_decode_binary) /* encoded string */ int enclen; char *ret; - + ret = emalloc(datalen); enclen = php_sqlite_decode_binary(data+1, ret); ret[enclen] = '\0'; diff --git a/ext/sqlite/tests/blankdb.inc b/ext/sqlite/tests/blankdb.inc index 43c6ff358..5ca484117 100644 --- a/ext/sqlite/tests/blankdb.inc +++ b/ext/sqlite/tests/blankdb.inc @@ -1,17 +1,3 @@ diff --git a/ext/sqlite/tests/blankdb_oo.inc b/ext/sqlite/tests/blankdb_oo.inc index 3bbf4fd0b..1139d17c8 100755 --- a/ext/sqlite/tests/blankdb_oo.inc +++ b/ext/sqlite/tests/blankdb_oo.inc @@ -1,11 +1,3 @@ diff --git a/ext/sqlite/tests/bug28112.phpt b/ext/sqlite/tests/bug28112.phpt index 62f4799d6..398180e79 100755 --- a/ext/sqlite/tests/bug28112.phpt +++ b/ext/sqlite/tests/bug28112.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #28112 (sqlite_query() crashing apache on malformed query) +--SKIPIF-- + --FILE-- $@ + @(cd $(top_srcdir); $(RE2C) -b -o ext/standard/var_unserializer.c ext/standard/var_unserializer.re) $(srcdir)/url_scanner_ex.c: $(srcdir)/url_scanner_ex.re - @$(RE2C) -b $(srcdir)/url_scanner_ex.re > $@ + @(cd $(top_srcdir); $(RE2C) -b -o ext/standard/url_scanner_ex.c ext/standard/url_scanner_ex.re) $(builddir)/info.lo: $(builddir)/../../main/build-defs.h diff --git a/ext/standard/array.c b/ext/standard/array.c index 5e5062868..426af5dc6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.12 2005/10/30 13:48:30 iliaa Exp $ */ +/* $Id: array.c,v 1.308.2.16 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_ini.h" @@ -355,15 +355,15 @@ static int array_data_compare(const void *a, const void *b TSRMLS_DC) { Bucket *f; Bucket *s; - pval result; - pval *first; - pval *second; + zval result; + zval *first; + zval *second; f = *((Bucket **) a); s = *((Bucket **) b); - first = *((pval **) f->pData); - second = *((pval **) s->pData); + first = *((zval **) f->pData); + second = *((zval **) s->pData); if (ARRAYG(compare_func)(&result, first, second TSRMLS_CC) == FAILURE) { return 0; @@ -405,8 +405,8 @@ static int array_natural_general_compare(const void *a, const void *b, int fold_ f = *((Bucket **) a); s = *((Bucket **) b); - fval = *((pval **) f->pData); - sval = *((pval **) s->pData); + fval = *((zval **) f->pData); + sval = *((zval **) s->pData); first = *fval; second = *sval; if (Z_TYPE_P(fval) != IS_STRING) { @@ -711,9 +711,9 @@ static int array_user_key_compare(const void *a, const void *b TSRMLS_DC) { Bucket *f; Bucket *s; - pval key1, key2; - pval *args[2]; - pval retval; + zval key1, key2; + zval *args[2]; + zval retval; int status; args[0] = &key1; @@ -794,7 +794,7 @@ PHP_FUNCTION(uksort) Advances array argument's internal pointer to the last element and return it */ PHP_FUNCTION(end) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -821,7 +821,7 @@ PHP_FUNCTION(end) Move array argument's internal pointer to the previous element and return it */ PHP_FUNCTION(prev) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -848,7 +848,7 @@ PHP_FUNCTION(prev) Move array argument's internal pointer to the next element and return it */ PHP_FUNCTION(next) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -875,7 +875,7 @@ PHP_FUNCTION(next) Set array argument's internal pointer to the first element and return it */ PHP_FUNCTION(reset) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -902,7 +902,7 @@ PHP_FUNCTION(reset) Return the element currently pointed to by the internal array pointer */ PHP_FUNCTION(current) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -924,7 +924,7 @@ PHP_FUNCTION(current) Return the key of the element currently pointed to by the internal array pointer */ PHP_FUNCTION(key) { - pval **array; + zval **array; char *string_key; uint string_length; ulong num_key; @@ -956,7 +956,7 @@ PHP_FUNCTION(key) PHP_FUNCTION(min) { int argc=ZEND_NUM_ARGS(); - pval **result; + zval **result; if (argc<=0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed"); @@ -964,7 +964,7 @@ PHP_FUNCTION(min) } set_compare_func(SORT_REGULAR TSRMLS_CC); if (argc == 1) { - pval **arr; + zval **arr; if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) { WRONG_PARAM_COUNT; @@ -976,8 +976,8 @@ PHP_FUNCTION(min) RETURN_FALSE; } } else { - pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0); - pval **min, result; + zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); + zval **min, result; int i; if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) { @@ -1006,7 +1006,7 @@ PHP_FUNCTION(min) PHP_FUNCTION(max) { int argc=ZEND_NUM_ARGS(); - pval **result; + zval **result; if (argc<=0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed"); @@ -1014,7 +1014,7 @@ PHP_FUNCTION(max) } set_compare_func(SORT_REGULAR TSRMLS_CC); if (argc == 1) { - pval **arr; + zval **arr; if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) { WRONG_PARAM_COUNT; @@ -1026,8 +1026,8 @@ PHP_FUNCTION(max) RETURN_FALSE; } } else { - pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0); - pval **max, result; + zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); + zval **max, result; int i; if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) { @@ -4347,7 +4347,7 @@ PHP_FUNCTION(array_map) fci.params = ¶ms[1]; fci.no_separation = 0; - if (!zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && result) { + if (zend_call_function(&fci, &fci_cache TSRMLS_CC) != SUCCESS || !result) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the map callback"); efree(array_len); efree(args); diff --git a/ext/standard/assert.c b/ext/standard/assert.c index bf23b9080..2ac7e7595 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: assert.c,v 1.60.2.1 2005/08/18 13:34:41 sniper Exp $ */ +/* $Id: assert.c,v 1.60.2.3 2006/01/01 12:50:14 sniper Exp $ */ /* {{{ includes/startup/misc */ @@ -217,7 +217,7 @@ PHP_FUNCTION(assert) PHP_FUNCTION(assert_options) { - pval **what, **value; + zval **what, **value; int oldint; int ac = ZEND_NUM_ARGS(); diff --git a/ext/standard/base64.c b/ext/standard/base64.c index ac8538712..7f8f2fbaa 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Jim Winstead | +----------------------------------------------------------------------+ */ -/* $Id: base64.c,v 1.43.2.1 2005/08/26 03:32:31 iliaa Exp $ */ +/* $Id: base64.c,v 1.43.2.2 2006/01/01 12:50:14 sniper Exp $ */ #include diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 0838d822b..6e1762593 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: base64.h,v 1.14 2005/08/03 14:07:56 sniper Exp $ */ +/* $Id: base64.h,v 1.14.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef BASE64_H #define BASE64_H diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 4be8f951c..ed718ae7a 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.7 2005/11/20 18:07:27 sniper Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.17 2006/01/04 21:31:29 derick Exp $ */ #include "php.h" #include "php_streams.h" @@ -107,6 +107,8 @@ php_basic_globals basic_globals; #include "php_fopen_wrappers.h" #include "streamsfuncs.h" +static zend_class_entry *incomplete_class_entry = NULL; + static ZEND_BEGIN_ARG_INFO(first_and_second__args_force_ref, 0) ZEND_ARG_PASS_INFO(1) @@ -163,7 +165,7 @@ static void user_tick_function_dtor(user_tick_function_entry *tick_function_entr #undef sprintf -function_entry basic_functions[] = { +zend_function_entry basic_functions[] = { PHP_FE(constant, NULL) PHP_FE(bin2hex, NULL) PHP_FE(sleep, NULL) @@ -177,8 +179,6 @@ function_entry basic_functions[] = { PHP_FE(strptime, NULL) #endif - PHP_FE(idate, NULL) - PHP_FE(flush, NULL) PHP_FE(wordwrap, NULL) PHP_FE(htmlspecialchars, NULL) @@ -691,6 +691,12 @@ function_entry basic_functions[] = { #ifndef NETWARE PHP_FE(chown, NULL) PHP_FE(chgrp, NULL) +#endif +#if HAVE_LCHOWN + PHP_FE(lchown, NULL) +#endif +#if HAVE_LCHOWN + PHP_FE(lchgrp, NULL) #endif PHP_FE(chmod, NULL) #if HAVE_UTIME @@ -836,8 +842,6 @@ function_entry basic_functions[] = { PHP_FE(output_add_rewrite_var, NULL) PHP_FE(output_reset_rewrite_vars, NULL) - PHP_FE(date_sunrise, NULL) - PHP_FE(date_sunset, NULL) {NULL, NULL, NULL} }; @@ -875,10 +879,6 @@ static PHP_INI_MH(OnUpdateSafeModeAllowedEnvVars) PHP_INI_BEGIN() PHP_INI_ENTRY_EX("safe_mode_protected_env_vars", SAFE_MODE_PROTECTED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeProtectedEnvVars, NULL) PHP_INI_ENTRY_EX("safe_mode_allowed_env_vars", SAFE_MODE_ALLOWED_ENV_VARS, PHP_INI_SYSTEM, OnUpdateSafeModeAllowedEnvVars, NULL) - PHP_INI_ENTRY("date.default_latitude", DATE_DEFAULT_LATITUDE, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.default_longitude", DATE_DEFAULT_LONGITUDE, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.sunset_zenith", DATE_SUNSET_ZENITH, PHP_INI_ALL, NULL) - PHP_INI_ENTRY("date.sunrise_zenith", DATE_SUNRISE_ZENITH, PHP_INI_ALL, NULL) PHP_INI_END() @@ -957,8 +957,7 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) memset(&BG(mblen_state), 0, sizeof(BG(mblen_state))); #endif - - BG(incomplete_class) = php_create_incomplete_class(TSRMLS_C); + BG(incomplete_class) = incomplete_class_entry; } @@ -1024,6 +1023,8 @@ PHP_MINIT_FUNCTION(basic) #endif #endif + BG(incomplete_class) = incomplete_class_entry = php_create_incomplete_class(TSRMLS_C); + REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CONNECTION_NORMAL", PHP_CONNECTION_NORMAL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CONNECTION_TIMEOUT", PHP_CONNECTION_TIMEOUT, CONST_CS | CONST_PERSISTENT); @@ -1033,9 +1034,14 @@ PHP_MINIT_FUNCTION(basic) REGISTER_LONG_CONSTANT("INI_SYSTEM", ZEND_INI_SYSTEM, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("INI_ALL", ZEND_INI_ALL, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("SUNFUNCS_RET_TIMESTAMP", SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("SUNFUNCS_RET_STRING", SUNFUNCS_RET_STRING, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("SUNFUNCS_RET_DOUBLE", SUNFUNCS_RET_DOUBLE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_SCHEME", PHP_URL_SCHEME, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_HOST", PHP_URL_HOST, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PORT", PHP_URL_PORT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_USER", PHP_URL_USER, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PASS", PHP_URL_PASS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_PATH", PHP_URL_PATH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_QUERY", PHP_URL_QUERY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PHP_URL_FRAGMENT", PHP_URL_FRAGMENT, CONST_CS | CONST_PERSISTENT); #define REGISTER_MATH_CONSTANT(x) REGISTER_DOUBLE_CONSTANT(#x, x, CONST_CS | CONST_PERSISTENT) REGISTER_MATH_CONSTANT(M_E); @@ -1423,7 +1429,7 @@ PHP_FUNCTION(getenv) Set the value of an environment variable */ PHP_FUNCTION(putenv) { - pval **str; + zval **str; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; @@ -1558,6 +1564,7 @@ PHP_FUNCTION(getopt) char *optname; int argc = 0, options_len = 0, o; zval *val, **args = NULL, *p_longopts = NULL; + int optname_len = 0; #ifdef HARTMUT_0 struct option *longopts = NULL; int longindex = 0; @@ -1655,6 +1662,9 @@ PHP_FUNCTION(getopt) /* Disable getopt()'s error messages. */ opterr = 0; + /* Force reinitialization of getopt() (via optind reset) on every call. */ + optind = 0; + /* Invoke getopt(3) on the argument array. */ #ifdef HARTMUT_0 while ((o = getopt_long(argc, argv, options, longopts, &longindex)) != -1) { @@ -1688,14 +1698,28 @@ PHP_FUNCTION(getopt) } /* Add this option / argument pair to the result hash. */ - if(zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) { - if(Z_TYPE_PP(args) != IS_ARRAY) { - convert_to_array_ex(args); - } - zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL); + optname_len = strlen(optname); + if (!(optname_len > 1 && optname[0] == '0') && is_numeric_string(optname, optname_len, NULL, NULL, 0) == IS_LONG) { + /* numeric string */ + int optname_int = atoi(optname); + if(zend_hash_index_find(HASH_OF(return_value), optname_int, (void **)&args) != FAILURE) { + if(Z_TYPE_PP(args) != IS_ARRAY) { + convert_to_array_ex(args); + } + zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL); + } else { + zend_hash_index_update(HASH_OF(return_value), optname_int, &val, sizeof(zval *), NULL); + } } else { - zend_hash_add(HASH_OF(return_value), optname, strlen(optname)+1, (void *)&val, - sizeof(zval *), NULL); + /* other strings */ + if(zend_hash_find(HASH_OF(return_value), optname, strlen(optname)+1, (void **)&args) != FAILURE) { + if(Z_TYPE_PP(args) != IS_ARRAY) { + convert_to_array_ex(args); + } + zend_hash_next_index_insert(HASH_OF(*args), (void *)&val, sizeof(zval *), NULL); + } else { + zend_hash_add(HASH_OF(return_value), optname, strlen(optname)+1, (void *)&val, sizeof(zval *), NULL); + } } } @@ -1719,7 +1743,7 @@ PHP_FUNCTION(flush) Delay for a given number of seconds */ PHP_FUNCTION(sleep) { - pval **num; + zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { WRONG_PARAM_COUNT; @@ -1740,7 +1764,7 @@ PHP_FUNCTION(sleep) PHP_FUNCTION(usleep) { #if HAVE_USLEEP - pval **num; + zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { WRONG_PARAM_COUNT; @@ -1839,7 +1863,7 @@ PHP_FUNCTION(get_current_user) Get the value of a PHP configuration option */ PHP_FUNCTION(get_cfg_var) { - pval **varname; + zval **varname; char *value; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { @@ -1859,7 +1883,7 @@ PHP_FUNCTION(get_cfg_var) Set the current active configuration setting of magic_quotes_runtime and return previous */ PHP_FUNCTION(set_magic_quotes_runtime) { - pval **new_setting; + zval **new_setting; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_setting) == FAILURE) { RETURN_FALSE; @@ -1905,7 +1929,7 @@ error options: Send an error message somewhere */ PHP_FUNCTION(error_log) { - pval **string, **erropt = NULL, **option = NULL, **emailhead = NULL; + zval **string, **erropt = NULL, **option = NULL, **emailhead = NULL; int opt_err = 0; char *message, *opt = NULL, *headers = NULL; @@ -2039,7 +2063,7 @@ PHP_FUNCTION(call_user_func) convert_to_string_ex(params[0]); } - if (!zend_is_callable(*params[0], IS_CALLABLE_CHECK_NO_ACCESS, &name)) { + if (!zend_is_callable(*params[0], 0, &name)) { php_error_docref1(NULL TSRMLS_CC, name, E_WARNING, "First argument is expected to be a valid callback"); efree(name); efree(params); @@ -2099,7 +2123,7 @@ PHP_FUNCTION(call_user_func_array) convert_to_string_ex(func); } - if (!zend_is_callable(*func, IS_CALLABLE_CHECK_NO_ACCESS, &name)) { + if (!zend_is_callable(*func, 0, &name)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback, '%s' was given", name); efree(name); RETURN_NULL(); @@ -2367,7 +2391,7 @@ PHP_FUNCTION(register_shutdown_function) } /* Prevent entering of anything but valid callback (syntax check only!) */ - if (!zend_is_callable(shutdown_function_entry.arguments[0], 1, &function_name)) { + if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%s' passed", function_name); efree(shutdown_function_entry.arguments); RETVAL_FALSE; @@ -2520,7 +2544,7 @@ PHP_FUNCTION(highlight_string) Get a configuration option */ PHP_FUNCTION(ini_get) { - pval **varname; + zval **varname; char *str; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { @@ -2616,7 +2640,7 @@ static int php_ini_check_path(char *option_name, int option_len, char *new_optio Set a configuration option, returns false on error and the old value of the configuration option on success */ PHP_FUNCTION(ini_set) { - pval **varname, **new_value; + zval **varname, **new_value; char *old_value; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &varname, &new_value) == FAILURE) { @@ -2679,7 +2703,7 @@ PHP_FUNCTION(ini_set) Restore the value of a configuration option specified by varname */ PHP_FUNCTION(ini_restore) { - pval **varname; + zval **varname; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &varname) == FAILURE) { WRONG_PARAM_COUNT; @@ -2696,7 +2720,7 @@ PHP_FUNCTION(ini_restore) PHP_FUNCTION(set_include_path) { - pval **new_value; + zval **new_value; char *old_value; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &new_value) == FAILURE) { @@ -2801,7 +2825,7 @@ PHP_FUNCTION(connection_status) Set whether we want to ignore a user abort event or not */ PHP_FUNCTION(ignore_user_abort) { - pval **arg; + zval **arg; int old_setting; old_setting = PG(ignore_user_abort); @@ -2831,7 +2855,7 @@ PHP_FUNCTION(ignore_user_abort) Returns port associated with service. Protocol must be "tcp" or "udp" */ PHP_FUNCTION(getservbyname) { - pval **name, **proto; + zval **name, **proto; struct servent *serv; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &proto) == FAILURE) { @@ -2856,7 +2880,7 @@ PHP_FUNCTION(getservbyname) Returns service name associated with port. Protocol must be "tcp" or "udp" */ PHP_FUNCTION(getservbyport) { - pval **port, **proto; + zval **port, **proto; struct servent *serv; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &port, &proto) == FAILURE) { @@ -2881,7 +2905,7 @@ PHP_FUNCTION(getservbyport) Returns protocol number associated with name as per /etc/protocols */ PHP_FUNCTION(getprotobyname) { - pval **name; + zval **name; struct protoent *ent; if (ZEND_NUM_ARGS() != 1 @@ -2909,7 +2933,7 @@ PHP_FUNCTION(getprotobyname) Returns protocol name associated with protocol number proto */ PHP_FUNCTION(getprotobynumber) { - pval **proto; + zval **proto; struct protoent *ent; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &proto) == FAILURE) { diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 0c22d294b..d47fe01c1 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.h,v 1.139 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: basic_functions.h,v 1.139.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 8f7138320..c185a888d 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: browscap.c,v 1.85 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: browscap.c,v 1.85.2.2 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_regex.h" @@ -33,17 +33,17 @@ static zval *current_section; /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */ -static void browscap_entry_dtor(zval **pvalue) +static void browscap_entry_dtor(zval **zvalue) { - if (Z_TYPE_PP(pvalue) == IS_ARRAY) { - zend_hash_destroy(Z_ARRVAL_PP(pvalue)); - free(Z_ARRVAL_PP(pvalue)); - } else if (Z_TYPE_PP(pvalue) == IS_STRING) { - if (Z_STRVAL_PP(pvalue)) { - free(Z_STRVAL_PP(pvalue)); + if (Z_TYPE_PP(zvalue) == IS_ARRAY) { + zend_hash_destroy(Z_ARRVAL_PP(zvalue)); + free(Z_ARRVAL_PP(zvalue)); + } else if (Z_TYPE_PP(zvalue) == IS_STRING) { + if (Z_STRVAL_PP(zvalue)) { + free(Z_STRVAL_PP(zvalue)); } } - free(*pvalue); + free(*zvalue); } /* {{{ convert_browscap_pattern diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index ce27f4abb..28b079d0b 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.80.2.1 2005/11/21 23:08:02 sniper Exp $ -*- autoconf -*- +dnl $Id: config.m4,v 1.80.2.3 2006/01/04 21:31:29 derick Exp $ -*- autoconf -*- divert(3)dnl @@ -304,7 +304,7 @@ dnl AC_CHECK_FUNCS(getopt_long getopt_long_only) AC_CHECK_FUNCS(glob strfmon nice) -if test "$PHP_SAPI" = "cgi" -o "$PHP_SAPI" = "cli" -o "$PHP_SAPI" = "embed"; then +if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function]) fi @@ -489,7 +489,7 @@ PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32. incomplete_class.c url_scanner_ex.c ftp_fopen_wrapper.c \ http_fopen_wrapper.c php_fopen_wrapper.c credits.c css.c \ var_unserializer.c ftok.c sha1.c user_filters.c uuencode.c \ - filters.c proc_open.c sunfuncs.c streamsfuncs.c http.c) + filters.c proc_open.c streamsfuncs.c http.c) PHP_ADD_MAKEFILE_FRAGMENT diff --git a/ext/standard/config.w32 b/ext/standard/config.w32 index 2d598906e..969af0dad 100644 --- a/ext/standard/config.w32 +++ b/ext/standard/config.w32 @@ -1,5 +1,5 @@ // vim:ft=javascript -// $Id: config.w32,v 1.4.2.1 2005/10/06 13:03:43 derick Exp $ +// $Id: config.w32,v 1.4.2.2 2006/01/04 21:31:29 derick Exp $ ARG_WITH("config-file-scan-dir", "Dir to check for additional php ini files", ""); AC_DEFINE("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR); @@ -15,6 +15,6 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \ versioning.c assert.c strnatcmp.c levenshtein.c incomplete_class.c \ url_scanner_ex.c ftp_fopen_wrapper.c http_fopen_wrapper.c \ php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \ - user_filters.c uuencode.c filters.c proc_open.c sunfuncs.c \ + user_filters.c uuencode.c filters.c proc_open.c \ streamsfuncs.c http.c", false /* never shared */); diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 55749d1fa..96419a705 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crc32.c,v 1.16 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: crc32.c,v 1.16.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "basic_functions.h" diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h index 4d72aa5cf..8323f9f33 100644 --- a/ext/standard/crc32.h +++ b/ext/standard/crc32.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crc32.h,v 1.6 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: crc32.h,v 1.6.2.1 2006/01/01 12:50:14 sniper Exp $ */ /* * This code implements the AUTODIN II polynomial diff --git a/ext/standard/credits.c b/ext/standard/credits.c index 2a20a5a6a..f64e5049e 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.c,v 1.36.2.2 2005/09/20 22:19:01 johannes Exp $ */ +/* $Id: credits.c,v 1.36.2.3 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "info.h" diff --git a/ext/standard/credits.h b/ext/standard/credits.h index f759e7063..f43756748 100644 --- a/ext/standard/credits.h +++ b/ext/standard/credits.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.h,v 1.11 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: credits.h,v 1.11.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef CREDITS_H #define CREDITS_H diff --git a/ext/standard/credits_ext.h b/ext/standard/credits_ext.h index cf6b3b47e..5b8bface0 100644 --- a/ext/standard/credits_ext.h +++ b/ext/standard/credits_ext.h @@ -39,7 +39,6 @@ CREDIT_LINE("InterBase", "Jouni Ahto, Andrew Avdeev, Ard Biesheuvel"); CREDIT_LINE("LDAP", "Amitay Isaacs, Eric Warnke, Rasmus Lerdorf, Gerrit Thomson, Stig Venaas"); CREDIT_LINE("LIBXML", "Christian Stocker, Rob Richards, Marcus Boerger, Wez Furlong, Shane Caraveo"); CREDIT_LINE("mcrypt", "Sascha Schumann, Derick Rethans"); -CREDIT_LINE("MCVE", "Brad House, Chris Faulhaber, Steven Schoch"); CREDIT_LINE("mhash", "Sascha Schumann"); CREDIT_LINE("mime_magic", "Hartmut Holzgraefe"); CREDIT_LINE("MING", "Dave Hayden, Frank M. Kromann"); @@ -51,21 +50,22 @@ CREDIT_LINE("mySQL 3.x driver for PDO", "George Schlossnagle"); CREDIT_LINE("MySQL", "Zeev Suraski, Zak Greant, Georg Richter"); CREDIT_LINE("MySQLi", "Zak Greant, Georg Richter"); CREDIT_LINE("ncurses", "Ilia Alshanetsky, Wez Furlong, Hartmut Holzgraefe, Georg Richter"); -CREDIT_LINE("OCI8", "Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal"); +CREDIT_LINE("OCI8", "Stig Bakken, Thies C. Arntzen, Andy Sautins, David Benson, Maxim Maletsky, Harald Radi, Antony Dovgal, Andi Gutmans, Wez Furlong"); CREDIT_LINE("ODBC driver for PDO", "Wez Furlong"); CREDIT_LINE("ODBC", "Stig Bakken, Andreas Karajannis, Frank M. Kromann, Daniel R. Kalowsky"); CREDIT_LINE("OpenSSL", "Stig Venaas, Wez Furlong, Sascha Kettler"); CREDIT_LINE("Oracle (OCI) driver for PDO", "Wez Furlong"); -CREDIT_LINE("Ovrimos", "Nikos Mavroyanopoulos"); CREDIT_LINE("pcntl", "Jason Greene"); CREDIT_LINE("Perl Compatible Regexps", "Andrei Zmievski"); CREDIT_LINE("PHP Data Objects", "Wez Furlong, Marcus Boerger, Sterling Hughes, George Schlossnagle"); +CREDIT_LINE("PHP hash", "Sara Golemon, Rasmus Lerdorf, Stefan Esser, Michael Wallner"); CREDIT_LINE("Posix", "Kristian Köhntopp"); CREDIT_LINE("PostgreSQL driver for PDO", "Edin Kadribasic, Ilia Alshanetsky"); CREDIT_LINE("PostgreSQL", "Jouni Ahto, Zeev Suraski, Yasuo Ohgaki, Chris Kings-Lynne"); CREDIT_LINE("Pspell", "Vlad Krupin"); CREDIT_LINE("Readline", "Thies C. Arntzen"); CREDIT_LINE("Recode", "Kristian Köhntopp"); +CREDIT_LINE("Reflection", "Marcus Boerger, Timm Friebe, George Schlossnagle, Andrei Zmievski, Johannes Schlueter"); CREDIT_LINE("Sessions", "Sascha Schumann, Andrei Zmievski"); CREDIT_LINE("Shared Memory Operations", "Slava Poliakov, Ilia Alshanetsky"); CREDIT_LINE("SimpleXML", "Sterling Hughes, Marcus Boerger, Rob Richards"); @@ -82,10 +82,10 @@ CREDIT_LINE("System V Semaphores", "Tom May"); CREDIT_LINE("System V Shared Memory", "Christian Cartus"); CREDIT_LINE("tidy", "John Coggeshall, Ilia Alshanetsky"); CREDIT_LINE("tokenizer", "Andrei Zmievski"); -CREDIT_LINE("Verisign Payflow Pro", "John Donagher, David Croft"); CREDIT_LINE("WDDX", "Andrei Zmievski"); CREDIT_LINE("XML", "Stig Bakken, Thies C. Arntzen, Sterling Hughes"); CREDIT_LINE("XMLReader", "Rob Richards"); CREDIT_LINE("xmlrpc", "Dan Libby"); +CREDIT_LINE("XMLWriter", "Rob Richards"); CREDIT_LINE("XSL", "Christian Stocker, Rob Richards"); CREDIT_LINE("Zlib", "Rasmus Lerdorf, Stefan Roehrich, Zeev Suraski, Jade Nicoletti"); diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index 60bda687e..629a54487 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: crypt.c,v 1.62 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: crypt.c,v 1.62.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include #include "php.h" diff --git a/ext/standard/css.c b/ext/standard/css.c index 0751747f9..e6fdb2569 100644 --- a/ext/standard/css.c +++ b/ext/standard/css.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: css.c,v 1.13 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: css.c,v 1.13.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "info.h" diff --git a/ext/standard/css.h b/ext/standard/css.h index e7db50f43..fc38da8ad 100644 --- a/ext/standard/css.h +++ b/ext/standard/css.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: css.h,v 1.6 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: css.h,v 1.6.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef CSS_H #define CSS_H diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index ea50ea639..d48aa5715 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cyr_convert.c,v 1.27 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: cyr_convert.c,v 1.27.2.2 2006/01/01 12:50:14 sniper Exp $ */ #include @@ -271,7 +271,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from, Convert from one Cyrillic character set to another */ PHP_FUNCTION(convert_cyr_string) { - pval **str_arg, **fr_cs, **to_cs; + zval **str_arg, **fr_cs, **to_cs; unsigned char *str; if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,&str_arg,&fr_cs, &to_cs)==FAILURE) diff --git a/ext/standard/cyr_convert.h b/ext/standard/cyr_convert.h index 143bf8132..1c320c56d 100644 --- a/ext/standard/cyr_convert.h +++ b/ext/standard/cyr_convert.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cyr_convert.h,v 1.11 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: cyr_convert.h,v 1.11.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef CYR_CONVERT_H #define CYR_CONVERT_H diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index bfd1aaa16..eaf5ae7f9 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.c,v 1.134 2005/08/03 14:07:57 sniper Exp $ */ +/* $Id: datetime.c,v 1.134.2.2 2006/01/01 12:50:14 sniper Exp $ */ #if HAVE_STRPTIME #define _XOPEN_SOURCE @@ -53,163 +53,6 @@ char *day_short_names[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; -#if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) && !defined(HAVE_DECLARED_TIMEZONE) -#ifdef NETWARE -#define timezone _timezone /* timezone is called '_timezone' in new version of LibC */ -#endif -extern time_t timezone; -extern int daylight; -#endif - -static int phpday_tab[2][12] = { - {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, - {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} -}; - -#define isleap(year) ((((year) % 4) == 0 && ((year) % 100) != 0) || ((year) % 400)==0) -#define YEAR_BASE 1900 - -/* {{{ php_idate - */ -PHPAPI int php_idate(char format, int timestamp, int gm) -{ - time_t the_time; - struct tm *ta, tmbuf; - int h, beat, fd, wd, yd, wk; -#if !HAVE_TM_GMTOFF - long tzone; - char *tname[2]= {"GMT Standard Time", "BST"}; -#endif - - the_time = timestamp; - - if (gm) { - ta = php_gmtime_r(&the_time, &tmbuf); -#if !HAVE_TM_GMTOFF - tzone = 0; -#endif - } else { - ta = php_localtime_r(&the_time, &tmbuf); -#if !HAVE_TM_GMTOFF -#ifdef __CYGWIN__ - tzone = _timezone; -#else - tzone = timezone; -#endif - tname[0] = tzname[0]; -#endif - } - - switch (format) { - case 'U': /* seconds since the epoch */ - return (long)the_time; - case 'Y': /* year, numeric, 4 digits */ - return ta->tm_year + YEAR_BASE; - case 'z': /* day (of the year) */ - return ta->tm_yday; - case 'y': /* year, numeric, 2 digits */ - return (ta->tm_year) % 100; - case 'm': /* month, numeric */ - case 'n': - return ta->tm_mon + 1; - case 'd': /* day of the month, numeric */ - case 'j': - return ta->tm_mday; - case 'H': /* hour, numeric, 24 hour format */ - case 'G': - return ta->tm_hour; - case 'h': /* hour, numeric, 12 hour format */ - case 'g': - h = ta->tm_hour % 12; - if (h == 0) { - h = 12; - } - return h; - case 'i': /* minutes, numeric */ - return ta->tm_min; - case 's': /* seconds, numeric */ - return ta->tm_sec; - case 't': /* days in current month */ - return phpday_tab[isleap((ta->tm_year + YEAR_BASE))][ta->tm_mon]; - case 'w': /* day of the week, numeric EXTENSION */ - return ta->tm_wday; - case 'Z': /* timezone offset in seconds */ -#if HAVE_TM_GMTOFF - return ta->tm_gmtoff; -#else - return ta->tm_isdst ? -(tzone - 3600) : -tzone; -#endif - case 'L': /* boolean for leapyear */ - return isleap(ta->tm_year + YEAR_BASE) ? 1 : 0; - case 'B': /* Swatch Beat a.k.a. Internet Time */ - beat = (((((long)the_time) - (((long)the_time) - ((((long)the_time) % 86400) + 3600))) * 10) / 864); - while (beat < 0) { - beat += 1000; - } - beat = beat % 1000; - return beat; - case 'I': - return ta->tm_isdst; - case 'W': /* ISO-8601 week number of year, weeks starting on Monday */ - wd = (ta->tm_wday == 0) ? 6 : ta->tm_wday - 1; /* weekday */ - yd = ta->tm_yday + 1; /* days since January 1st */ - fd = (7 + wd - yd % 7+ 1) % 7; /* weekday (1st January) */ - if ((yd <= 7 - fd) && fd > 3) { /* week is a last year week (52 or 53) */ - wk = (fd == 4 || (fd == 5 && isleap((ta->tm_year + YEAR_BASE - 1)))) ? 53 : 52; - } - /* week is a next year week (1) */ - else if (isleap((ta->tm_year + YEAR_BASE)) + 365 - yd < 3 - wd) { - wk = 1; - } - /* normal week */ - else { - wk = (yd + 6 - wd + fd) / 7 - (fd > 3); - } - return wk; - break; - default: - return 0; - } -} -/* }}} */ - -/* {{{ proto int idate(string format [, int timestamp]) - Format a local time/date as integer */ -PHP_FUNCTION(idate) -{ - zval **format, **timestamp; - int t, ret; - - switch (ZEND_NUM_ARGS()) { - case 1: - if (zend_get_parameters_ex(1, &format) == FAILURE) { - WRONG_PARAM_COUNT; - } - t = time(NULL); - break; - case 2: - if (zend_get_parameters_ex(2, &format, ×tamp) == FAILURE) { - WRONG_PARAM_COUNT; - } - convert_to_long_ex(timestamp); - t = Z_LVAL_PP(timestamp); - break; - default: - WRONG_PARAM_COUNT; - } - - convert_to_string_ex(format); - - if (Z_STRLEN_PP(format) != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "idate format is one char"); - RETURN_FALSE; - } - - ret = php_idate(Z_STRVAL_PP(format)[0], t, 0); - RETURN_LONG(ret); -} -/* }}} */ - /* {{{ php_std_date Return date string in standard format for http headers */ PHPAPI char *php_std_date(time_t t TSRMLS_DC) diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h index 81a69eec7..26a1b2b43 100644 --- a/ext/standard/datetime.h +++ b/ext/standard/datetime.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,21 +17,15 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.h,v 1.23 2005/08/03 14:07:58 sniper Exp $ */ +/* $Id: datetime.h,v 1.23.2.2 2006/01/01 12:50:14 sniper Exp $ */ #ifndef DATETIME_H #define DATETIME_H -PHP_FUNCTION(time); -PHP_FUNCTION(idate); -PHP_FUNCTION(localtime); -PHP_FUNCTION(getdate); -PHP_FUNCTION(checkdate); #if HAVE_STRPTIME PHP_FUNCTION(strptime); #endif -PHPAPI int php_idate(char format, int timestamp, int gm); PHPAPI char *php_std_date(time_t t TSRMLS_DC); #endif /* DATETIME_H */ diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 1fec2afc2..cc3e727f2 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.147 2005/08/03 14:07:58 sniper Exp $ */ +/* $Id: dir.c,v 1.147.2.2 2006/01/01 12:50:14 sniper Exp $ */ /* {{{ includes/startup/misc */ @@ -231,7 +231,7 @@ PHP_FUNCTION(getdir) Close directory connection identified by the dir_handle */ PHP_FUNCTION(closedir) { - pval **id, **tmp, *myself; + zval **id, **tmp, *myself; php_stream *dirp; FETCH_DIRP(); @@ -329,7 +329,7 @@ PHP_FUNCTION(getcwd) Rewind dir_handle back to the start */ PHP_FUNCTION(rewinddir) { - pval **id, **tmp, *myself; + zval **id, **tmp, *myself; php_stream *dirp; FETCH_DIRP(); @@ -342,7 +342,7 @@ PHP_FUNCTION(rewinddir) Read directory entry from dir_handle */ PHP_NAMED_FUNCTION(php_if_readdir) { - pval **id, **tmp, *myself; + zval **id, **tmp, *myself; php_stream *dirp; php_stream_dirent entry; diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 3c5f59ca6..543086be3 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dl.c,v 1.106 2005/08/08 16:49:43 sniper Exp $ */ +/* $Id: dl.c,v 1.106.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "dl.h" diff --git a/ext/standard/dl.h b/ext/standard/dl.h index a69d44e5c..ad0ff0ae9 100644 --- a/ext/standard/dl.h +++ b/ext/standard/dl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dl.h,v 1.23 2005/08/08 16:49:43 sniper Exp $ */ +/* $Id: dl.h,v 1.23.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef DL_H #define DL_H diff --git a/ext/standard/dns.c b/ext/standard/dns.c index bb10b509f..946803a56 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c,v 1.70.2.5 2005/10/25 14:57:14 tony2001 Exp $ */ +/* $Id: dns.c,v 1.70.2.7 2006/01/01 12:50:14 sniper Exp $ */ /* {{{ includes */ #include "php.h" @@ -655,7 +655,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int Get any Resource Record corresponding to a given Internet host name */ PHP_FUNCTION(dns_get_record) { - pval *addtl, *host, *authns, *fetch_type; + zval *addtl, *host, *authns, *fetch_type; int addtl_recs = 0; int type_to_fetch, type_param = PHP_DNS_ANY; struct __res_state res; @@ -684,10 +684,10 @@ PHP_FUNCTION(dns_get_record) } convert_to_long(fetch_type); type_param = Z_LVAL_P(fetch_type); - pval_destructor(authns); + zval_dtor(authns); addtl_recs = 1; /* We want the additional Records */ array_init(authns); - pval_destructor(addtl); + zval_dtor(addtl); array_init(addtl); break; default: @@ -845,7 +845,7 @@ PHP_FUNCTION(dns_get_record) Get MX records corresponding to a given Internet host name */ PHP_FUNCTION(dns_get_mx) { - pval *host, *mx_list, *weight_list; + zval *host, *mx_list, *weight_list; int need_weight = 0; int count, qdc; u_short type, weight; @@ -867,7 +867,7 @@ PHP_FUNCTION(dns_get_mx) WRONG_PARAM_COUNT; } need_weight = 1; - pval_destructor(weight_list); /* start with clean array */ + zval_dtor(weight_list); /* start with clean array */ array_init(weight_list); break; @@ -876,7 +876,7 @@ PHP_FUNCTION(dns_get_mx) } convert_to_string(host); - pval_destructor(mx_list); /* start with clean array */ + zval_dtor(mx_list); /* start with clean array */ array_init(mx_list); /* Go! */ diff --git a/ext/standard/dns.h b/ext/standard/dns.h index a686604d6..4f130a882 100644 --- a/ext/standard/dns.h +++ b/ext/standard/dns.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.h,v 1.19 2005/08/03 14:07:58 sniper Exp $ */ +/* $Id: dns.h,v 1.19.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef DNS_H #define DNS_H diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 620826903..451026ba9 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ | Ilia Alshanetsky | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.113 2005/08/03 14:07:58 sniper Exp $ */ +/* $Id: exec.c,v 1.113.2.2 2006/01/01 12:50:14 sniper Exp $ */ #include #include "php.h" @@ -57,7 +57,7 @@ * If type==3, output will be printed binary, no lines will be saved or returned (passthru) * */ -int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC) +int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC) { FILE *fp; char *buf, *tmp=NULL; @@ -372,7 +372,7 @@ char *php_escape_shell_arg(char *str) { Escape shell metacharacters */ PHP_FUNCTION(escapeshellcmd) { - pval **arg1; + zval **arg1; char *cmd = NULL; if (zend_get_parameters_ex(1, &arg1) == FAILURE) { @@ -392,7 +392,7 @@ PHP_FUNCTION(escapeshellcmd) Quote and escape an argument for use in a shell command */ PHP_FUNCTION(escapeshellarg) { - pval **arg1; + zval **arg1; char *cmd = NULL; if (zend_get_parameters_ex(1, &arg1) == FAILURE) { @@ -414,7 +414,7 @@ PHP_FUNCTION(shell_exec) { FILE *in; size_t total_readbytes; - pval **cmd; + zval **cmd; char *ret; php_stream *stream; diff --git a/ext/standard/exec.h b/ext/standard/exec.h index 74f741c6c..ed4206055 100644 --- a/ext/standard/exec.h +++ b/ext/standard/exec.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exec.h,v 1.24.2.1 2005/09/24 15:22:32 edink Exp $ */ +/* $Id: exec.h,v 1.24.2.3 2006/01/01 12:50:14 sniper Exp $ */ #ifndef EXEC_H #define EXEC_H @@ -36,6 +36,6 @@ PHP_MINIT_FUNCTION(proc_open); PHPAPI char *php_escape_shell_cmd(char *); PHPAPI char *php_escape_shell_arg(char *); -int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC); +int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC); #endif /* EXEC_H */ diff --git a/ext/standard/file.c b/ext/standard/file.c index 71f0e77b4..ed4d1a72b 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.1 2005/10/21 12:13:37 dmitry Exp $ */ +/* $Id: file.c,v 1.409.2.3 2006/01/01 12:50:14 sniper Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -770,7 +770,7 @@ parse_eol: Create a unique filename in a directory */ PHP_FUNCTION(tempnam) { - pval **arg1, **arg2; + zval **arg1, **arg2; char *d; char *opened_path; char p[64]; @@ -1447,7 +1447,7 @@ PHP_FUNCTION(readfile) Return or change the umask */ PHP_FUNCTION(umask) { - pval **arg1; + zval **arg1; int oldumask; int arg_count = ZEND_NUM_ARGS(); diff --git a/ext/standard/file.h b/ext/standard/file.h index 01ac2e601..9cbb1166f 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.h,v 1.94 2005/08/03 14:07:59 sniper Exp $ */ +/* $Id: file.h,v 1.94.2.1 2006/01/01 12:50:14 sniper Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 178ad5f12..f0746be46 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.136.2.1 2005/10/22 17:02:06 wez Exp $ */ +/* $Id: filestat.c,v 1.136.2.3 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "safe_mode.h" @@ -118,7 +118,7 @@ PHP_RSHUTDOWN_FUNCTION(filestat) Get total disk space for filesystem that path is on */ PHP_FUNCTION(disk_total_space) { - pval **path; + zval **path; #ifdef WINDOWS double bytestotal; @@ -221,7 +221,7 @@ PHP_FUNCTION(disk_total_space) Get free disk space for filesystem that path is on */ PHP_FUNCTION(disk_free_space) { - pval **path; + zval **path; #ifdef WINDOWS double bytesfree; @@ -329,7 +329,7 @@ PHP_FUNCTION(disk_free_space) PHP_FUNCTION(chgrp) { #if !defined(WINDOWS) - pval **filename, **group; + zval **filename, **group; gid_t gid; struct group *gr=NULL; int ret; @@ -379,7 +379,7 @@ PHP_FUNCTION(chgrp) PHP_FUNCTION(chown) { #if !defined(WINDOWS) - pval **filename, **user; + zval **filename, **user; int ret; uid_t uid; struct passwd *pw = NULL; @@ -425,7 +425,7 @@ PHP_FUNCTION(chown) Change file mode */ PHP_FUNCTION(chmod) { - pval **filename, **mode; + zval **filename, **mode; int ret; mode_t imode; @@ -466,7 +466,7 @@ PHP_FUNCTION(chmod) Set modification time of file */ PHP_FUNCTION(touch) { - pval **filename, **filetime, **fileatime; + zval **filename, **filetime, **fileatime; int ret; struct stat sb; FILE *file; @@ -547,7 +547,7 @@ PHP_FUNCTION(clearstatcache) /* {{{ php_stat */ -PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value TSRMLS_DC) +PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC) { zval *stat_dev, *stat_ino, *stat_mode, *stat_nlink, *stat_uid, *stat_gid, *stat_rdev, *stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks; @@ -793,7 +793,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ /* another quickie macro to make defining similar functions easier */ #define FileFunction(name, funcnum) \ void name(INTERNAL_FUNCTION_PARAMETERS) { \ - pval **filename; \ + zval **filename; \ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) { \ WRONG_PARAM_COUNT; \ } \ diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 6d8862532..930663236 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filters.c,v 1.44.2.2 2005/10/20 16:54:48 tony2001 Exp $ */ +/* $Id: filters.c,v 1.44.2.3 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 61432e65f..c709c9b36 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flock_compat.c,v 1.29 2005/08/03 14:08:00 sniper Exp $ */ +/* $Id: flock_compat.c,v 1.29.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index 186a5e84a..011264ad3 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flock_compat.h,v 1.20 2005/08/03 14:08:00 sniper Exp $ */ +/* $Id: flock_compat.h,v 1.20.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index a3ca441be..0f84ec215 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.82 2005/08/03 14:08:00 sniper Exp $ */ +/* $Id: formatted_print.c,v 1.82.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include /* modf() */ #include "php.h" diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index 088c9aed1..25e102f28 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c,v 1.121 2005/08/03 14:08:00 sniper Exp $ */ +/* $Id: fsock.c,v 1.121.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index 8e1d5ac3d..02404200a 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.h,v 1.50 2005/08/03 14:08:01 sniper Exp $ */ +/* $Id: fsock.h,v 1.50.2.1 2006/01/01 12:50:14 sniper Exp $ */ /* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */ diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index b32071dd8..839511ed3 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftok.c,v 1.16 2005/08/03 14:08:01 sniper Exp $ */ +/* $Id: ftok.c,v 1.16.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 9018299a8..926cdaaaa 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ | Sara Golemon | +----------------------------------------------------------------------+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.85.2.2 2005/11/22 03:01:39 iliaa Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.85.2.3 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/head.c b/ext/standard/head.c index a23f7c051..fa43319e9 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf | +----------------------------------------------------------------------+ */ -/* $Id: head.c,v 1.84 2005/08/03 14:08:01 sniper Exp $ */ +/* $Id: head.c,v 1.84.2.1 2006/01/01 12:50:14 sniper Exp $ */ #include #include "php.h" diff --git a/ext/standard/head.h b/ext/standard/head.h index 52b9c5889..bc4785857 100644 --- a/ext/standard/head.h +++ b/ext/standard/head.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: head.h,v 1.28 2005/08/03 14:08:01 sniper Exp $ */ +/* $Id: head.h,v 1.28.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef HEAD_H #define HEAD_H diff --git a/ext/standard/html.c b/ext/standard/html.c index 34884d014..31962c7d3 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.c,v 1.111 2005/08/03 14:08:01 sniper Exp $ */ +/* $Id: html.c,v 1.111.2.1 2006/01/01 12:50:14 sniper Exp $ */ /* * HTML entity resources: diff --git a/ext/standard/html.h b/ext/standard/html.h index 19f71a876..724082ade 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.h,v 1.20 2005/08/03 14:08:04 sniper Exp $ */ +/* $Id: html.h,v 1.20.2.1 2006/01/01 12:50:14 sniper Exp $ */ #ifndef HTML_H #define HTML_H diff --git a/ext/standard/http.c b/ext/standard/http.c index 46de0c0b8..c4bef796e 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c,v 1.14.2.1 2005/09/16 17:10:58 tony2001 Exp $ */ +/* $Id: http.c,v 1.14.2.3 2006/01/01 12:50:14 sniper Exp $ */ #include "php_http.h" #include "php_ini.h" @@ -29,9 +29,9 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, int num_prefix_len, const char *key_prefix, int key_prefix_len, const char *key_suffix, int key_suffix_len, - zval *type TSRMLS_DC) + zval *type, char *arg_sep TSRMLS_DC) { - char *arg_sep = NULL, *key = NULL, *ekey, *newprefix, *p; + char *key = NULL, *ekey, *newprefix, *p; int arg_sep_len, key_len, ekey_len, key_type, newprefix_len; ulong idx; zval **zdata = NULL, *copyzval; @@ -45,9 +45,11 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, return SUCCESS; } - arg_sep = INI_STR("arg_separator.output"); - if (!arg_sep || !strlen(arg_sep)) { - arg_sep = URL_DEFAULT_ARG_SEP; + if (!arg_sep) { + arg_sep = INI_STR("arg_separator.output"); + if (!arg_sep || !strlen(arg_sep)) { + arg_sep = URL_DEFAULT_ARG_SEP; + } } arg_sep_len = strlen(arg_sep); @@ -127,7 +129,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, *p = '\0'; } ht->nApplyCount++; - php_url_encode_hash_ex(HASH_OF(*zdata), formstr, NULL, 0, newprefix, newprefix_len, "]", 1, (Z_TYPE_PP(zdata) == IS_OBJECT ? *zdata : NULL) TSRMLS_CC); + php_url_encode_hash_ex(HASH_OF(*zdata), formstr, NULL, 0, newprefix, newprefix_len, "]", 1, (Z_TYPE_PP(zdata) == IS_OBJECT ? *zdata : NULL), arg_sep TSRMLS_CC); ht->nApplyCount--; efree(newprefix); } else if (Z_TYPE_PP(zdata) == IS_NULL || Z_TYPE_PP(zdata) == IS_RESOURCE) { @@ -183,16 +185,17 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, } /* }}} */ -/* {{{ proto string http_build_query(mixed formdata [, string prefix]) +/* {{{ proto string http_build_query(mixed formdata [, string prefix [, string arg_separator]]) Generates a form-encoded query string from an associative array or object. */ PHP_FUNCTION(http_build_query) { zval *formdata; - char *prefix = NULL; - int prefix_len = 0; + char *prefix = NULL, *arg_sep=NULL; + int arg_sep_len, prefix_len = 0; smart_str formstr = {0}; + - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|s", &formdata, &prefix, &prefix_len) != SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ss", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len) != SUCCESS) { RETURN_FALSE; } @@ -201,7 +204,7 @@ PHP_FUNCTION(http_build_query) RETURN_FALSE; } - if (php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL) TSRMLS_CC) == FAILURE) { + if (php_url_encode_hash_ex(HASH_OF(formdata), &formstr, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL), arg_sep TSRMLS_CC) == FAILURE) { if (formstr.c) { efree(formstr.c); } diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 49c2df18c..1254afcf3 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ | Sara Golemon | +----------------------------------------------------------------------+ */ -/* $Id: http_fopen_wrapper.c,v 1.99.2.3 2005/11/15 14:46:34 iliaa Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.99.2.8 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_globals.h" @@ -94,7 +94,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, int scratch_len = 0; int body = 0; char location[HTTP_HEADER_BLOCK_SIZE]; - zval **response_header = NULL; + zval *response_header = NULL; int reqok = 0; char *http_header_line = NULL; char tmp_line[128]; @@ -305,7 +305,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, if (context && php_stream_context_get_option(context, "http", "header", &tmpzval) == SUCCESS && - Z_STRLEN_PP(tmpzval)) { + Z_TYPE_PP(tmpzval) == IS_STRING && Z_STRLEN_PP(tmpzval)) { /* Remove newlines and spaces from start and end, php_trim will estrndup() */ tmp = php_trim(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval), NULL, 0, NULL, 3 TSRMLS_CC); @@ -409,7 +409,8 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, } if (context && - php_stream_context_get_option(context, "http", "user_agent", &ua_zval) == SUCCESS) { + php_stream_context_get_option(context, "http", "user_agent", &ua_zval) == SUCCESS && + Z_TYPE_PP(ua_zval) == IS_STRING) { ua_str = Z_STRVAL_PP(ua_zval); } else if (FG(user_agent)) { ua_str = FG(user_agent); @@ -441,7 +442,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, /* Request content, such as for POST requests */ if (header_init && context && php_stream_context_get_option(context, "http", "content", &tmpzval) == SUCCESS && - Z_STRLEN_PP(tmpzval) > 0) { + Z_TYPE_PP(tmpzval) == IS_STRING && Z_STRLEN_PP(tmpzval) > 0) { if (!(have_header & HTTP_HEADER_CONTENT_LENGTH)) { scratch_len = snprintf(scratch, scratch_len, "Content-Length: %d\r\n", Z_STRLEN_PP(tmpzval)); php_stream_write(stream, scratch, scratch_len); @@ -460,25 +461,24 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, location[0] = '\0'; - if (!header_init) { - MAKE_STD_ZVAL(stream->wrapperdata); - array_init(stream->wrapperdata); - response_header = &stream->wrapperdata; - } else { + if (header_init) { zval *tmp; MAKE_STD_ZVAL(tmp); array_init(tmp); ZEND_SET_SYMBOL(EG(active_symbol_table), "http_response_header", tmp); - - zend_hash_find(EG(active_symbol_table), - "http_response_header", sizeof("http_response_header"), (void **) &response_header); + } + + { + zval **rh; + zend_hash_find(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) &rh); + response_header = *rh; } if (!php_stream_eof(stream)) { size_t tmp_line_len; /* get response header */ - if (_php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len TSRMLS_CC) != NULL) { + if (php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len) != NULL) { zval *http_response; int response_code; @@ -514,7 +514,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, } MAKE_STD_ZVAL(http_response); ZVAL_STRINGL(http_response, tmp_line, tmp_line_len, 1); - zend_hash_next_index_insert(Z_ARRVAL_PP(response_header), &http_response, sizeof(zval *), NULL); + zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_response, sizeof(zval *), NULL); } } else { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "HTTP request failed, unexpected end of socket!"); @@ -525,28 +525,16 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, http_header_line = emalloc(HTTP_HEADER_BLOCK_SIZE); - while (!body && !php_stream_eof(stream)) { - - if (php_stream_gets(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE-1) != NULL) { - char *p; - int found_eol = 0; - int http_header_line_length; - - http_header_line[HTTP_HEADER_BLOCK_SIZE-1] = '\0'; - - p = http_header_line; - while(*p) { - while(*p == '\n' || *p == '\r') { - *p = '\0'; - p--; - found_eol = 1; - } - if (found_eol) - break; - p++; + while (!body && !php_stream_eof(stream)) { + size_t http_header_line_length; + if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length) && *http_header_line != '\n' && *http_header_line != '\r') { + char *e = http_header_line + http_header_line_length - 1; + while (*e == '\n' || *e == '\r') { + e--; } - http_header_line_length = p-http_header_line+1; - + http_header_line_length = e - http_header_line + 1; + http_header_line[http_header_line_length] = '\0'; + if (!strncasecmp(http_header_line, "Location: ", 10)) { strlcpy(location, http_header_line + 10, sizeof(location)); } else if (!strncasecmp(http_header_line, "Content-Type: ", 14)) { @@ -565,7 +553,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, ZVAL_STRINGL(http_header, http_header_line, http_header_line_length, 1); - zend_hash_next_index_insert(Z_ARRVAL_PP(response_header), &http_header, sizeof(zval *), NULL); + zend_hash_next_index_insert(Z_ARRVAL_P(response_header), &http_header, sizeof(zval *), NULL); } } else { break; @@ -581,7 +569,6 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, if (location[0] != '\0') { - zval *entry, **entryp; char new_path[HTTP_HEADER_BLOCK_SIZE]; char loc_path[HTTP_HEADER_BLOCK_SIZE]; @@ -652,20 +639,6 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, CHECK_FOR_CNTRL_CHARS(resource->path) stream = php_stream_url_wrap_http_ex(wrapper, new_path, mode, options, opened_path, context, --redirect_max, 0 STREAMS_CC TSRMLS_CC); - if (stream && stream->wrapperdata && *response_header != stream->wrapperdata) { - entryp = &entry; - MAKE_STD_ZVAL(entry); - ZVAL_EMPTY_STRING(entry); - zend_hash_next_index_insert(Z_ARRVAL_PP(response_header), entryp, sizeof(zval *), NULL); - zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream->wrapperdata)); - while (zend_hash_get_current_data(Z_ARRVAL_P(stream->wrapperdata), (void **)&entryp) == SUCCESS) { - zval_add_ref(entryp); - zend_hash_next_index_insert(Z_ARRVAL_PP(response_header), entryp, sizeof(zval *), NULL); - zend_hash_move_forward(Z_ARRVAL_P(stream->wrapperdata)); - } - zval_dtor(stream->wrapperdata); - FREE_ZVAL(stream->wrapperdata); - } } else { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "HTTP request failed! %s", tmp_line); } @@ -689,8 +662,8 @@ out: if (stream) { if (header_init) { - stream->wrapperdata = *response_header; - zval_add_ref(response_header); + zval_add_ref(&response_header); + stream->wrapperdata = response_header; } php_stream_notify_progress_init(context, 0, file_size); /* Restore original chunk size now that we're done with headers */ diff --git a/ext/standard/image.c b/ext/standard/image.c index 661b02b22..390680b0a 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: image.c,v 1.114 2005/08/03 14:08:05 sniper Exp $ */ +/* $Id: image.c,v 1.114.2.2 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include @@ -468,7 +468,7 @@ static int php_read_APP(php_stream * stream, unsigned int marker, zval *info TSR /* {{{ php_handle_jpeg main loop to parse JPEG structure */ -static struct gfxinfo *php_handle_jpeg (php_stream * stream, pval *info TSRMLS_DC) +static struct gfxinfo *php_handle_jpeg (php_stream * stream, zval *info TSRMLS_DC) { struct gfxinfo *result = NULL; unsigned int marker = M_PSEUDO; @@ -796,7 +796,7 @@ static unsigned php_ifd_get32u(void *Long, int motorola_intel) /* {{{ php_handle_tiff main loop to parse TIFF structure */ -static struct gfxinfo *php_handle_tiff (php_stream * stream, pval *info, int motorola_intel TSRMLS_DC) +static struct gfxinfo *php_handle_tiff (php_stream * stream, zval *info, int motorola_intel TSRMLS_DC) { struct gfxinfo *result = NULL; int i, num_entries; diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 0c897c9c1..c55b05c67 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ */ -/* $Id: incomplete_class.c,v 1.28 2005/08/03 14:08:05 sniper Exp $ */ +/* $Id: incomplete_class.c,v 1.28.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "basic_functions.h" diff --git a/ext/standard/info.c b/ext/standard/info.c index 56d235e18..b3c5fc415 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c,v 1.249.2.5 2005/11/23 00:15:08 iliaa Exp $ */ +/* $Id: info.c,v 1.249.2.7 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_ini.h" @@ -701,7 +701,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC) } if (flag & PHP_INFO_VARIABLES) { - pval **data; + zval **data; SECTION("PHP Variables"); diff --git a/ext/standard/info.h b/ext/standard/info.h index 3756e7bc6..7d417247b 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.h,v 1.38 2005/08/03 14:08:07 sniper Exp $ */ +/* $Id: info.h,v 1.38.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef INFO_H #define INFO_H diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 01262607e..b4957fc61 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iptc.c,v 1.50 2005/08/03 14:08:07 sniper Exp $ */ +/* $Id: iptc.c,v 1.50.2.2 2006/01/01 12:50:15 sniper Exp $ */ /* * Functions to parse & compse IPTC data. @@ -360,7 +360,7 @@ PHP_FUNCTION(iptcparse) INIT_PZVAL(values); array_init(values); - zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, (void *) &values, sizeof(pval*), (void **) &element); + zend_hash_update(Z_ARRVAL_P(return_value), key, strlen(key)+1, (void *) &values, sizeof(zval*), (void **) &element); } add_next_index_stringl(*element, buffer+inx, len, 1); diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index 5dcf84bf1..717626dc6 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: lcg.c,v 1.41 2005/08/03 14:08:07 sniper Exp $ */ +/* $Id: lcg.c,v 1.41.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_lcg.h" diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index 877392c00..a6c48239a 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe | +----------------------------------------------------------------------+ */ -/* $Id: levenshtein.c,v 1.34 2005/08/03 14:08:08 sniper Exp $ */ +/* $Id: levenshtein.c,v 1.34.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include diff --git a/ext/standard/link.c b/ext/standard/link.c index 328efd45c..832494932 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link.c,v 1.52 2005/08/03 14:08:08 sniper Exp $ */ +/* $Id: link.c,v 1.52.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_filestat.h" diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 752798391..76ae6dfa8 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.87 2005/08/07 22:06:28 sniper Exp $ */ +/* $Id: mail.c,v 1.87.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include #include diff --git a/ext/standard/math.c b/ext/standard/math.c index 3fce99832..0aad86c06 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.131 2005/08/03 14:08:08 sniper Exp $ */ +/* $Id: math.c,v 1.131.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_math.h" diff --git a/ext/standard/md5.c b/ext/standard/md5.c index 810e8aba1..1b8347c17 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.c,v 1.39 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: md5.c,v 1.39.2.1 2006/01/01 12:50:15 sniper Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche diff --git a/ext/standard/md5.h b/ext/standard/md5.h index e35ca1655..aebe4d1fd 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.h,v 1.17 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: md5.h,v 1.17.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef MD5_H #define MD5_H diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index eaba31031..de9fff83a 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: metaphone.c,v 1.28 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: metaphone.c,v 1.28.2.1 2006/01/01 12:50:15 sniper Exp $ */ /* Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 7d08c2747..4eb23369f 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c,v 1.53.2.1 2005/11/20 20:14:23 derick Exp $ */ +/* $Id: microtime.c,v 1.53.2.2 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h index 8bf445d18..6784c819a 100644 --- a/ext/standard/microtime.h +++ b/ext/standard/microtime.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.h,v 1.14 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: microtime.h,v 1.14.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef MICROTIME_H #define MICROTIME_H diff --git a/ext/standard/pack.c b/ext/standard/pack.c index a014eed5d..1badfaed5 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Chris Schneider | +----------------------------------------------------------------------+ */ -/* $Id: pack.c,v 1.57 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: pack.c,v 1.57.2.3 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" @@ -184,6 +184,7 @@ PHP_FUNCTION(pack) } if (arg < 0) { + convert_to_string_ex(argv[currentarg]); arg = Z_STRLEN_PP(argv[currentarg]); } @@ -244,7 +245,7 @@ PHP_FUNCTION(pack) switch ((int) code) { case 'h': case 'H': - INC_OUTPUTPOS((arg + 1) / 2,1) /* 4 bit per arg */ + INC_OUTPUTPOS((arg + (arg % 2)) / 2,1) /* 4 bit per arg */ break; case 'a': @@ -537,7 +538,7 @@ PHP_FUNCTION(unpack) while (formatlen-- > 0) { char type = *(format++); char c; - int arg = 1; + int arg = 1, argb; char *name; int namelen; int size=0; @@ -562,6 +563,7 @@ PHP_FUNCTION(unpack) /* Get of new value in array */ name = format; + argb = arg; while (formatlen > 0 && *format != '/') { formatlen--; @@ -591,7 +593,7 @@ PHP_FUNCTION(unpack) case 'h': case 'H': - size = (arg > 0) ? arg / 2 : arg; + size = (arg > 0) ? (arg + (arg % 2)) / 2 : arg; arg = 1; break; @@ -690,6 +692,8 @@ PHP_FUNCTION(unpack) len = size * 2; } + len -= argb % 2; + buf = emalloc(len + 1); for (ipos = opos = 0; opos < len; opos++) { diff --git a/ext/standard/pack.h b/ext/standard/pack.h index 3091cf545..1cb2494c5 100644 --- a/ext/standard/pack.h +++ b/ext/standard/pack.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pack.h,v 1.16 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: pack.h,v 1.16.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PACK_H #define PACK_H diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index bac1596f6..ae112a0d3 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.c,v 1.40 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: pageinfo.c,v 1.40.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "pageinfo.h" diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h index 59f648e0f..b2bac5051 100644 --- a/ext/standard/pageinfo.h +++ b/ext/standard/pageinfo.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.h,v 1.14 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: pageinfo.h,v 1.14.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PAGEINFO_H #define PAGEINFO_H diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index dcb767107..1ed616a38 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_array.h,v 1.50 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_array.h,v 1.50.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_ARRAY_H #define PHP_ARRAY_H diff --git a/ext/standard/php_assert.h b/ext/standard/php_assert.h index a8130eba1..60be866f0 100644 --- a/ext/standard/php_assert.h +++ b/ext/standard/php_assert.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_assert.h,v 1.15 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_assert.h,v 1.15.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_ASSERT_H #define PHP_ASSERT_H diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h index 0506a950d..680e64513 100644 --- a/ext/standard/php_browscap.h +++ b/ext/standard/php_browscap.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_browscap.h,v 1.13 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_browscap.h,v 1.13.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_BROWSCAP_H #define PHP_BROWSCAP_H diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index 8694b25d5..737474467 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_crypt.h,v 1.18 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_crypt.h,v 1.18.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h index 2444b3ac6..aaa99c695 100644 --- a/ext/standard/php_dir.h +++ b/ext/standard/php_dir.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dir.h,v 1.24 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_dir.h,v 1.24.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_DIR_H #define PHP_DIR_H diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h index a025a4652..8652fc88c 100644 --- a/ext/standard/php_ext_syslog.h +++ b/ext/standard/php_ext_syslog.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ext_syslog.h,v 1.12 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_ext_syslog.h,v 1.12.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_EXT_SYSLOG_H #define PHP_EXT_SYSLOG_H diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 8a924678a..c29a81747 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filestat.h,v 1.24 2005/08/03 14:08:09 sniper Exp $ */ +/* $Id: php_filestat.h,v 1.24.2.2 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_FILESTAT_H #define PHP_FILESTAT_H @@ -81,7 +81,7 @@ typedef unsigned int php_stat_len; typedef int php_stat_len; #endif -PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value TSRMLS_DC); +PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int type, zval *return_value TSRMLS_DC); /* Switches for various filestat functions: */ #define FS_PERMS 0 diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index c8087e0c9..f440c75fe 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Hartmut Holzgraefe | +----------------------------------------------------------------------+ */ -/* $Id: php_fopen_wrapper.c,v 1.45.2.2 2005/11/17 19:40:38 pollita Exp $ */ +/* $Id: php_fopen_wrapper.c,v 1.45.2.3 2006/01/01 12:50:15 sniper Exp $ */ #include #include diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h index 7cd5a3cd7..00ab55b84 100644 --- a/ext/standard/php_fopen_wrappers.h +++ b/ext/standard/php_fopen_wrappers.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fopen_wrappers.h,v 1.21 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_fopen_wrappers.h,v 1.21.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_FOPEN_WRAPPERS_H #define PHP_FOPEN_WRAPPERS_H diff --git a/ext/standard/php_ftok.h b/ext/standard/php_ftok.h index badd39579..ec9a0b507 100644 --- a/ext/standard/php_ftok.h +++ b/ext/standard/php_ftok.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftok.h,v 1.9 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_ftok.h,v 1.9.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_FTOK_H #define PHP_FTOK_H diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index f71e7fd3a..285748f3c 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_http.h,v 1.5 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_http.h,v 1.5.2.2 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_HTTP_H #define PHP_HTTP_H @@ -28,7 +28,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr, const char *num_prefix, int num_prefix_len, const char *key_prefix, int key_prefix_len, const char *key_suffix, int key_suffix_len, - zval *type TSRMLS_DC); + zval *type, char *arg_sep TSRMLS_DC); #define php_url_encode_hash(ht, formstr) php_url_encode_hash_ex((ht), (formstr), NULL, 0, NULL, 0, NULL, 0, NULL TSRMLS_CC) PHP_FUNCTION(http_build_query); diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h index cb6437446..151070c7e 100644 --- a/ext/standard/php_image.h +++ b/ext/standard/php_image.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_image.h,v 1.29 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_image.h,v 1.29.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_IMAGE_H #define PHP_IMAGE_H diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h index 3e36be0de..be6aba1a1 100644 --- a/ext/standard/php_incomplete_class.h +++ b/ext/standard/php_incomplete_class.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_incomplete_class.h,v 1.17 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_incomplete_class.h,v 1.17.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_INCOMPLETE_CLASS_H #define PHP_INCOMPLETE_CLASS_H diff --git a/ext/standard/php_iptc.h b/ext/standard/php_iptc.h index 8737b85eb..bc8be839a 100644 --- a/ext/standard/php_iptc.h +++ b/ext/standard/php_iptc.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_iptc.h,v 1.11 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_iptc.h,v 1.11.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_IPTC_H #define PHP_IPTC_H diff --git a/ext/standard/php_lcg.h b/ext/standard/php_lcg.h index c973d590e..fcc08b78a 100644 --- a/ext/standard/php_lcg.h +++ b/ext/standard/php_lcg.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_lcg.h,v 1.21 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_lcg.h,v 1.21.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_LCG_H #define PHP_LCG_H diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h index 9eee8a16e..f9be666a4 100644 --- a/ext/standard/php_link.h +++ b/ext/standard/php_link.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_link.h,v 1.12 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_link.h,v 1.12.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_LINK_H #define PHP_LINK_H diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h index 1eadf0959..0961f5fe1 100644 --- a/ext/standard/php_mail.h +++ b/ext/standard/php_mail.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mail.h,v 1.18 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_mail.h,v 1.18.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_MAIL_H #define PHP_MAIL_H diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h index 22079eb57..805114f9c 100644 --- a/ext/standard/php_math.h +++ b/ext/standard/php_math.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_math.h,v 1.28 2005/08/03 14:08:10 sniper Exp $ */ +/* $Id: php_math.h,v 1.28.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_MATH_H #define PHP_MATH_H diff --git a/ext/standard/php_metaphone.h b/ext/standard/php_metaphone.h index e7a593dfd..efce8cc2b 100644 --- a/ext/standard/php_metaphone.h +++ b/ext/standard/php_metaphone.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_metaphone.h,v 1.16 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_metaphone.h,v 1.16.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_METAPHONE_H #define PHP_METAPHONE_H diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index baebecda8..4438af8a6 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ | Based on code from: Shawn Cokus | +----------------------------------------------------------------------+ */ -/* $Id: php_rand.h,v 1.28 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_rand.h,v 1.28.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_RAND_H #define PHP_RAND_H diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index 10cbdb1f6..6d28cb4d7 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_smart_str.h,v 1.30 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_smart_str.h,v 1.30.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_SMART_STR_H #define PHP_SMART_STR_H diff --git a/ext/standard/php_smart_str_public.h b/ext/standard/php_smart_str_public.h index 7934ba04f..869ad5ff4 100644 --- a/ext/standard/php_smart_str_public.h +++ b/ext/standard/php_smart_str_public.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_smart_str_public.h,v 1.10 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_smart_str_public.h,v 1.10.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_SMART_STR_PUBLIC_H #define PHP_SMART_STR_PUBLIC_H diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h index 83673e8c7..b76c284ca 100644 --- a/ext/standard/php_standard.h +++ b/ext/standard/php_standard.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_standard.h,v 1.24 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_standard.h,v 1.24.2.2 2006/01/04 21:31:29 derick Exp $ */ #include "basic_functions.h" #include "php_math.h" @@ -59,7 +59,6 @@ #include "php_versioning.h" #include "php_ftok.h" #include "php_type.h" -#include "php_sunfuncs.h" #define phpext_standard_ptr basic_functions_module_ptr PHP_MINIT_FUNCTION(standard_filters); diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 4eb9d367e..4c1403c29 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_string.h,v 1.87 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_string.h,v 1.87.2.2 2006/01/01 12:50:15 sniper Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -132,8 +132,8 @@ PHPAPI char *php_str_to_str(char *haystack, int length, char *needle, int needle_len, char *str, int str_len, int *_new_length); PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC); PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len); -PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, pval *result, int case_sensitivity, int *replace_count); -PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result); +PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count); +PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result); PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value); PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit); diff --git a/ext/standard/php_sunfuncs.h b/ext/standard/php_sunfuncs.h deleted file mode 100644 index 2f6209bbc..000000000 --- a/ext/standard/php_sunfuncs.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.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: Moshe Doron | - +----------------------------------------------------------------------+ -*/ - -/* $Id: php_sunfuncs.h,v 1.4 2005/08/03 14:08:11 sniper Exp $ */ - -#ifndef PHP_SUNFUNCS_H -#define PHP_SUNFUNCS_H - -/* default ini entries: */ -/* Jerusalem one. */ -#define DATE_DEFAULT_LATITUDE "31.7667" -#define DATE_DEFAULT_LONGITUDE "35.2333" - -/* on 90'50; common jewish sunset declaration (start of sun body appear) */ -#define DATE_SUNSET_ZENITH "90.83" - -/* on 90'50; common jewish sunrise declaration (sun body disappeared) */ -#define DATE_SUNRISE_ZENITH "90.83" - -#define SUNFUNCS_RET_TIMESTAMP 0 -#define SUNFUNCS_RET_STRING 1 -#define SUNFUNCS_RET_DOUBLE 2 - -PHP_FUNCTION(date_sunrise); -PHP_FUNCTION(date_sunset); - -#endif /* PHP_SUNFUNCS_H */ diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h index 30564cd89..b3b865d53 100644 --- a/ext/standard/php_type.h +++ b/ext/standard/php_type.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_type.h,v 1.6 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_type.h,v 1.6.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_TYPE_H #define PHP_TYPE_H diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h index 33618aad9..c735d2a26 100644 --- a/ext/standard/php_uuencode.h +++ b/ext/standard/php_uuencode.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_uuencode.h,v 1.4 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_uuencode.h,v 1.4.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_UUENCODE_H #define PHP_UUENCODE_H diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index 55a00551c..827685ec8 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h,v 1.30 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_var.h,v 1.30.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H diff --git a/ext/standard/php_versioning.h b/ext/standard/php_versioning.h index 9df0a588a..629ac61e1 100644 --- a/ext/standard/php_versioning.h +++ b/ext/standard/php_versioning.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_versioning.h,v 1.10 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: php_versioning.h,v 1.10.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef PHP_VERSIONING_H #define PHP_VERSIONING_H diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 6e4691749..6ce2323e0 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c,v 1.36 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: proc_open.c,v 1.36.2.1 2006/01/01 12:50:15 sniper Exp $ */ #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__)) # define _BSD_SOURCE /* linux wants this when XOPEN mode is on */ diff --git a/ext/standard/proc_open.h b/ext/standard/proc_open.h index 7e039ef02..490b92f6b 100644 --- a/ext/standard/proc_open.h +++ b/ext/standard/proc_open.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.h,v 1.5 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: proc_open.h,v 1.5.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifdef PHP_WIN32 typedef HANDLE php_file_descriptor_t; diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index f3e0f5e0a..589144c93 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: quot_print.c,v 1.29 2005/08/03 14:08:11 sniper Exp $ */ +/* $Id: quot_print.c,v 1.29.2.2 2006/01/01 12:50:15 sniper Exp $ */ #include @@ -151,7 +151,7 @@ PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t len Convert a quoted-printable string to an 8 bit string */ PHP_FUNCTION(quoted_printable_decode) { - pval **arg1; + zval **arg1; char *str_in, *str_out; int i = 0, j = 0, k; diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h index 6c96e62d0..98bb75ce0 100644 --- a/ext/standard/quot_print.h +++ b/ext/standard/quot_print.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: quot_print.h,v 1.13 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: quot_print.h,v 1.13.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef QUOT_PRINT_H #define QUOT_PRINT_H diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 42528772b..d7a99a02d 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ | Based on code from: Shawn Cokus | +----------------------------------------------------------------------+ */ -/* $Id: rand.c,v 1.70 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: rand.c,v 1.70.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include diff --git a/ext/standard/reg.c b/ext/standard/reg.c index d11a93d97..a50733672 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ | Jaakko Hyvätti | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.82 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: reg.c,v 1.82.2.2 2006/01/01 12:50:15 sniper Exp $ */ #include #include @@ -184,7 +184,7 @@ static void php_reg_eprint(int err, regex_t *re) { */ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) { - pval **regex, /* Regular expression */ + zval **regex, /* Regular expression */ **findin, /* String to apply expression to */ **array = NULL; /* Optional register array */ regex_t re; @@ -442,7 +442,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha */ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) { - pval **arg_pattern, + zval **arg_pattern, **arg_replace, **arg_string; char *pattern; diff --git a/ext/standard/reg.h b/ext/standard/reg.h index e7f7cc89f..7df88a669 100644 --- a/ext/standard/reg.h +++ b/ext/standard/reg.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ */ -/* $Id: reg.h,v 1.21 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: reg.h,v 1.21.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef REG_H #define REG_H diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index ef4f8866d..ed0ef42eb 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.c,v 1.31 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: scanf.c,v 1.31.2.2 2006/01/01 12:50:15 sniper Exp $ */ /* scanf.c -- @@ -126,7 +126,7 @@ typedef struct CharSet { static char *BuildCharSet(CharSet *cset, char *format); static int CharInSet(CharSet *cset, int ch); static void ReleaseCharSet(CharSet *cset); -static inline void scan_set_error_return(int numVars, pval **return_value); +static inline void scan_set_error_return(int numVars, zval **return_value); /* {{{ BuildCharSet @@ -594,7 +594,7 @@ error: PHPAPI int php_sscanf_internal( char *string, char *format, int argCount, zval ***args, - int varStart, pval **return_value TSRMLS_DC) + int varStart, zval **return_value TSRMLS_DC) { int numVars, nconversions, totalVars = -1; int i, value, result; @@ -1238,13 +1238,13 @@ done: /* }}} */ /* the compiler choked when i tried to make this a macro */ -static inline void scan_set_error_return(int numVars, pval **return_value) +static inline void scan_set_error_return(int numVars, zval **return_value) { if (numVars) { Z_TYPE_PP(return_value) = IS_LONG; Z_LVAL_PP(return_value) = SCAN_ERROR_EOF; /* EOF marker */ } else { - /* pval_destructor( *return_value ); */ + /* zval_dtor( *return_value ); */ /* convert_to_null calls destructor */ convert_to_null( *return_value ); } diff --git a/ext/standard/scanf.h b/ext/standard/scanf.h index a7b4b7fa0..fdd9a90dc 100644 --- a/ext/standard/scanf.h +++ b/ext/standard/scanf.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.h,v 1.14 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: scanf.h,v 1.14.2.2 2006/01/01 12:50:15 sniper Exp $ */ #ifndef SCANF_H #define SCANF_H @@ -43,7 +43,7 @@ */ PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars); PHPAPI int php_sscanf_internal(char *string,char *format,int argCount,zval ***args, - int varStart, pval **return_value TSRMLS_DC); + int varStart, zval **return_value TSRMLS_DC); #endif /* SCANF_H */ diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index bf02fbbcc..824fe230e 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.c,v 1.13 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: sha1.c,v 1.13.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/sha1.h b/ext/standard/sha1.h index fc68885d1..2ddb2a364 100644 --- a/ext/standard/sha1.h +++ b/ext/standard/sha1.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.h,v 1.5 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: sha1.h,v 1.5.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef SHA1_H #define SHA1_H diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index 188d933da..6af503b5e 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Bjørn Borud - Guardian Networks AS | +----------------------------------------------------------------------+ */ -/* $Id: soundex.c,v 1.25 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: soundex.c,v 1.25.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 9881e12f8..fe57f511d 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.58 2005/08/03 14:08:12 sniper Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h index bdcf8cbea..c72575b78 100644 --- a/ext/standard/streamsfuncs.h +++ b/ext/standard/streamsfuncs.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.h,v 1.13 2005/08/03 14:08:13 sniper Exp $ */ +/* $Id: streamsfuncs.h,v 1.13.2.1 2006/01/01 12:50:15 sniper Exp $ */ /* Flags for stream_socket_client */ #define PHP_STREAM_CLIENT_PERSISTENT 1 diff --git a/ext/standard/string.c b/ext/standard/string.c index cf3fcb191..a830a6d87 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.445.2.1 2005/09/28 22:39:52 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.6 2006/01/05 20:49:37 tony2001 Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -485,7 +485,7 @@ PHP_FUNCTION(strcoll) /* {{{ php_charmask * Fills a 256-byte bytemask with input. You can specify a range like 'a..z', * it needs to be incrementing. - * Returns: FAILURE/SUCCESS wether the input was correct (i.e. no range errors) + * Returns: FAILURE/SUCCESS whether the input was correct (i.e. no range errors) */ static inline int php_charmask(unsigned char *input, int len, char *mask TSRMLS_DC) { @@ -3753,7 +3753,7 @@ PHP_FUNCTION(strip_tags) Set locale information */ PHP_FUNCTION(setlocale) { - pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0); + zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); zval **pcategory, **plocale; int i, cat, n_args=ZEND_NUM_ARGS(); char *loc, *retval; @@ -4219,7 +4219,7 @@ PHP_FUNCTION(str_repeat) /* Initialize the result string */ result_len = Z_STRLEN_PP(input_str) * Z_LVAL_PP(mult); if (result_len < 1 || result_len > 2147483647) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may not create strings longer then 2147483647 bytes"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "You may not create strings longer than 2147483647 bytes"); RETURN_FALSE; } result = (char *)emalloc(result_len + 1); @@ -4735,33 +4735,38 @@ PHP_FUNCTION(str_word_count) if (type == 1 || type == 2) { array_init(return_value); } - + + /* first character cannot be ' or -, unless explicitly allowed by the user */ + if ((*p == '\'' && (!char_list || !ch['\''])) || (*p == '-' && (!char_list || !ch['-']))) { + p++; + } + /* last character cannot be -, unless explicitly allowed by the user */ + if (*(e - 1) == '-' && (!char_list || !ch['-'])) { + e--; + } + while (p < e) { - if (isalpha(*p) || (char_list && ch[(unsigned char)*p])) { - s = ++p - 1; - while (isalpha(*p) || *p == '\'' || (*p == '-' && isalpha(*(p+1))) || (char_list && ch[(unsigned char)*p])) { - p++; - } - + s = p; + while (p < e && (isalpha(*p) || (char_list && ch[(unsigned char)*p]) || *p == '\'' || *p == '-')) { + p++; + } + if (p > s) { switch (type) { case 1: buf = estrndup(s, (p-s)); - add_next_index_stringl(return_value, buf, (p-s), 1); - efree(buf); + add_next_index_stringl(return_value, buf, (p-s), 0); break; case 2: buf = estrndup(s, (p-s)); - add_index_stringl(return_value, (s - str), buf, p-s, 1); - efree(buf); + add_index_stringl(return_value, (s - str), buf, p-s, 0); break; default: word_count++; break; } - } else { - p++; } + p++; } if (!type) { diff --git a/ext/standard/sunfuncs.c b/ext/standard/sunfuncs.c deleted file mode 100644 index b4fb8150b..000000000 --- a/ext/standard/sunfuncs.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.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: Moshe Doron | - +----------------------------------------------------------------------+ -*/ - -/* $Id: sunfuncs.c,v 1.11 2005/08/03 14:08:14 sniper Exp $ */ - -/* - The sun position algorithm taken from the 'US Naval Observatory's - Almanac for Computers', implemented by Ken Bloom - for the zmanim project - and finally converted to C by Moshe Doron . -*/ - -#include "php.h" -#include "php_sunfuncs.h" -#include "datetime.h" -#include "php_ini.h" - -#include -#include -#include - -/* {{{ macros and constants - */ -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#define to_rad(degrees) (degrees * M_PI / 180) -#define to_rad_with_min(degrees) (degrees + minutes / 60) -#define to_deg(rad) (rad * 180 / M_PI) -/* }}} */ - -/* {{{ php_sunrise_sunset - returns time in UTC */ -static double php_sunrise_sunset(long N, double latitude, double longitude, double zenith, int calc_sunset) -{ - double lngHour, t, M, L, Lx, RA, RAx, Lquadrant, RAquadrant, sinDec, cosDec, cosH, H, T, UT, UTx; - - /* step 1: First calculate the day of the year - int N = theday - date(1, 1, theday.year()) + 1; - */ - - /* step 2: convert the longitude to hour value and calculate an approximate time */ - lngHour = longitude / 15; - - /* use 18 for sunset instead of 6 */ - if (calc_sunset) { - t = (double) N + ((18 - lngHour) / 24); /* Sunset */ - } else { - t = (double) N + ((6 - lngHour) / 24); /* Sunrise */ - } - - /* step 3: calculate the sun's mean anomaly */ - M = (0.9856 * t) - 3.289; - - /* step 4: calculate the sun's true longitude */ - L = M + (1.916 * sin(to_rad(M))) + (0.020 * sin (to_rad(2 * M))) + 282.634; - - while (L < 0) { - Lx = L + 360; - assert (Lx != L); /* askingtheguru: realy needed? */ - L = Lx; - } - - while (L >= 360) { - Lx = L - 360; - assert (Lx != L); /* askingtheguru: realy needed? */ - L = Lx; - } - - /* step 5a: calculate the sun's right ascension */ - RA = to_deg(atan(0.91764 * tan(to_rad(L)))); - - while (RA < 0) { - RAx = RA + 360; - assert (RAx != RA); /* askingtheguru: realy needed? */ - RA = RAx; - } - - while (RA >= 360) { - RAx = RA - 360; - assert (RAx != RA); /* askingtheguru: realy needed? */ - RA = RAx; - } - - /* step 5b: right ascension value needs to be in the same quadrant as L */ - Lquadrant = floor(L / 90) * 90; - RAquadrant = floor(RA / 90) * 90; - RA = RA + (Lquadrant - RAquadrant); - - /* step 5c: right ascension value needs to be converted into hours */ - RA /= 15; - - /* step 6: calculate the sun's declination */ - sinDec = 0.39782 * sin(to_rad(L)); - cosDec = cos(asin(sinDec)); - - /* step 7a: calculate the sun's local hour angle */ - cosH = (cos(to_rad(zenith)) - (sinDec * sin(to_rad(latitude)))) / (cosDec * cos(to_rad(latitude))); - - /* XXX: What's the use of this block.. ? - * if (!calc_sunset && cosH > 1 || calc_sunset && cosH < -1) { - * throw doesnthappen(); - * } - */ - - /* step 7b: finish calculating H and convert into hours */ - if (calc_sunset) { - H = to_deg(acos(cosH)); /* Sunset */ - } else { - H = 360 - to_deg(acos(cosH)); /* Sunrise */ - } - H = H / 15; - - /* step 8: calculate local mean time */ - T = H + RA - (0.06571 * t) - 6.622; - - /* step 9: convert to UTC */ - UT = T - lngHour; - - while (UT < 0) { - UTx = UT + 24; - assert (UTx != UT); /* askingtheguru: realy needed? */ - UT = UTx; - } - - while (UT >= 24) { - UTx = UT - 24; - assert (UTx != UT); /* askingtheguru: realy needed? */ - UT = UTx; - } - - return UT; -} -/* }}} */ - -/* {{{ php_do_date_sunrise_sunset - * Common for date_sunrise() and date_sunset() functions - */ -static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_sunset) -{ - zval *date; - double latitude, longitude, zenith, gmt_offset, ret; - int time, N; - long retformat; - char retstr[6]; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ldddd", &date, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) { - RETURN_FALSE; - } - - switch (Z_TYPE_P(date)) { - case IS_LONG: - time = Z_LVAL_P(date); - break; - case IS_STRING: - /* todo: more user friendly format */ - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "date must be timestamp for now"); - RETURN_FALSE; - } - - N = php_idate('z', time, 0) + 1; - - switch (ZEND_NUM_ARGS()) { - case 1: - retformat = SUNFUNCS_RET_STRING; - case 2: - latitude = INI_FLT("date.default_latitude"); - case 3: - longitude = INI_FLT("date.default_longitude"); - case 4: - if (calc_sunset) { - zenith = INI_FLT("date.sunset_zenith"); - } else { - zenith = INI_FLT("date.sunrise_zenith"); - } - case 5: - gmt_offset = php_idate('Z', time, 0) / 3600; - case 6: - break; - default: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid format"); - RETURN_FALSE; - break; - } - - ret = php_sunrise_sunset(N, latitude, longitude, zenith, calc_sunset) + gmt_offset; - - switch (retformat) { - case SUNFUNCS_RET_TIMESTAMP: - RETURN_LONG((int) (time - (time % (24 * 3600))) + (int) (3600 * ret)); - break; - case SUNFUNCS_RET_STRING: - N = (int) ret; - sprintf(retstr, "%02d:%02d", N, (int) (60 * (ret - (double) N))); - RETVAL_STRINGL(retstr, 5, 1); - break; - case SUNFUNCS_RET_DOUBLE: - RETURN_DOUBLE(ret); - break; - } -} -/* }}} */ - -/* {{{ proto mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) - Returns time of sunrise for a given day and location */ -PHP_FUNCTION(date_sunrise) -{ - php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); -} -/* }}} */ - -/* {{{ proto mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]]) - Returns time of sunset for a given day and location */ -PHP_FUNCTION(date_sunset) -{ - php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); -} -/* }}} */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 - */ diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index eb0155507..da310ee81 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: syslog.c,v 1.49 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: syslog.c,v 1.49.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/tests/array/bug35014.phpt b/ext/standard/tests/array/bug35014.phpt index 213bacae3..99ef0f7eb 100644 --- a/ext/standard/tests/array/bug35014.phpt +++ b/ext/standard/tests/array/bug35014.phpt @@ -1,5 +1,7 @@ --TEST-- -Bug #35014 (array_product() always returns 0) +Bug #35014 (array_product() always returns 0) (32bit) +--SKIPIF-- + --INI-- precision=14 --FILE-- @@ -22,7 +24,7 @@ foreach ($tests as $v) { ?> --EXPECTF-- -Warning: array_product(): The argument should be an array in %s/bug35014.php on line 15 +Warning: array_product(): The argument should be an array in %s on line %d NULL int(0) int(0) diff --git a/ext/standard/tests/array/bug35014_64bit.phpt b/ext/standard/tests/array/bug35014_64bit.phpt new file mode 100644 index 000000000..a5b8da8a3 --- /dev/null +++ b/ext/standard/tests/array/bug35014_64bit.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #35014 (array_product() always returns 0) (64bit) +--SKIPIF-- + +--INI-- +precision=14 +--FILE-- + +--EXPECTF-- + +Warning: array_product(): The argument should be an array in %s on line %d +NULL +int(0) +int(0) +int(3) +int(9) +float(1) +int(9999999800000001) +float(2.8404260053903E+20) +int(8589934590) diff --git a/ext/standard/tests/array/bug35821.phpt b/ext/standard/tests/array/bug35821.phpt new file mode 100644 index 000000000..095323ebc --- /dev/null +++ b/ext/standard/tests/array/bug35821.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #35821 (array_map() segfaults when exception is throwed from the callback) +--FILE-- +ThrowException(); + } +} + +$arr = array(new Element(), new Element(), new Element()); +array_map(array('Element', 'CallBack'), $arr); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: array_map(): An error occurred while invoking the map callback in %s on line %d + +Fatal error: Uncaught exception 'Exception' in %s:%d +Stack trace: +#0 %s(%d): Element->ThrowException() +#1 [internal function]: Element::CallBack(Object(Element)) +#2 %s(%d): array_map(Array, Array) +#3 {main} + thrown in %s on line %d diff --git a/ext/standard/tests/file/bug35740.phpt b/ext/standard/tests/file/bug35740.phpt new file mode 100644 index 000000000..78df1843c --- /dev/null +++ b/ext/standard/tests/file/bug35740.phpt @@ -0,0 +1,14 @@ +--TEST-- +bug #35740 (memory leak when including a directory) +--FILE-- + +--EXPECTF-- +Warning: include(%s): failed to open stream: %s in %s on line %d + +Warning: include(): Failed opening '%s' for inclusion (include_path='%s') in %s on line %d +Done diff --git a/ext/standard/tests/file/bug35781.phpt b/ext/standard/tests/file/bug35781.phpt new file mode 100644 index 000000000..5dc684a65 --- /dev/null +++ b/ext/standard/tests/file/bug35781.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #35781 (stream_filter_append() causes segfault) +--FILE-- + +--EXPECTF-- +string(15) "Guvf vf n grfg +" +Done diff --git a/ext/standard/tests/file/proc_open01.phpt b/ext/standard/tests/file/proc_open01.phpt index 39fc4e4cf..c5b0ed971 100644 --- a/ext/standard/tests/file/proc_open01.phpt +++ b/ext/standard/tests/file/proc_open01.phpt @@ -30,7 +30,9 @@ for ($left = strlen($test_string); $left > 0;) { break; } $read_fds = array($pipes[1]); - $retval = stream_select($read_fds, $write_fds = NULL, $exp_fds = NULL, 1); + $write_fds = NULL; + $exp_fds = NULL; + $retval = stream_select($read_fds, $write_fds, $exp_fds, 1); if ($retval === false) { print "select() failed\n"; break; diff --git a/ext/standard/tests/filters/bug35916.phpt b/ext/standard/tests/filters/bug35916.phpt new file mode 100644 index 000000000..4d2027d24 --- /dev/null +++ b/ext/standard/tests/filters/bug35916.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #35916 (Duplicate calls to stream_bucket_append() lead to a crash) +--FILE-- +data = strtoupper($bucket->data); + $consumed += $bucket->datalen; + stream_bucket_append($out, $bucket); + stream_bucket_append($out, $bucket); + } + return PSFS_PASS_ON; + } + function onCreate() + { + echo "fffffffffff\n"; + } + function onClose() + { + echo "hello\n"; + } +} + +stream_filter_register("strtoupper", "strtoupper_filter"); +$fp=fopen($file, "w"); +stream_filter_append($fp, "strtoupper"); +fread($fp, 1024); +fwrite($fp, "Thank you\n"); +fclose($fp); +readfile($file); +unlink($file); +?> +--EXPECT-- +fffffffffff +hello +THANK YOU diff --git a/ext/standard/tests/general_functions/bug27678.phpt b/ext/standard/tests/general_functions/bug27678.phpt new file mode 100644 index 000000000..ec9cf93cf --- /dev/null +++ b/ext/standard/tests/general_functions/bug27678.phpt @@ -0,0 +1,14 @@ +--TEST-- +bug #27678 (number_format() crashes with large numbers) +--FILE-- + +--EXPECT-- +Done diff --git a/ext/standard/tests/general_functions/bug32647.phpt b/ext/standard/tests/general_functions/bug32647.phpt index ca98f429a..2e8201207 100644 --- a/ext/standard/tests/general_functions/bug32647.phpt +++ b/ext/standard/tests/general_functions/bug32647.phpt @@ -1,14 +1,14 @@ --TEST-- Bug #32647 (Using register_shutdown_function() with invalid callback can crash PHP) --INI-- -error_reporting=2047 +error_reporting=4095 display_errors=1 --FILE-- --EXPECT-- -1041316748 06:39 6.652455761896 -1041353169 16:46 16.76937486746 -1043994763 06:32 6.54537029266 -1044033183 17:13 17.21752470874 -1046412416 06:06 6.115652675685 -1046453799 17:36 17.6108549623 -1049088501 05:28 5.472742029069 -1049133501 17:58 17.97255258437 -1051678444 04:54 4.901229982859 -1051726729 18:18 18.31368876948 -1054355667 04:34 4.57442928945 -1054406363 18:39 18.65640094324 -1056947818 04:36 4.616120450519 -1056998911 18:48 18.80887165777 -1059627264 04:54 4.906882509836 -1059676557 18:35 18.59928600203 -1062306852 05:14 5.236889557074 -1062353017 18:03 18.06054178788 -1064899952 05:32 5.542366581139 -1064942681 17:24 17.41150561492 -1067579698 05:54 5.916208842058 -1067619001 16:50 16.83369857063 -1070173246 06:20 6.34622155207 -1070210100 16:35 16.58358905554 +1041395864 06:37 6.629013145891 +1041432452 16:47 16.79245111439 +1044073855 06:30 6.515408927982 +1044112463 17:14 17.23987028904 +1046491495 06:04 6.082214503336 +1046533075 17:37 17.63201103534 +1049167581 05:26 5.439443811173 +1049212774 17:59 17.99303572948 +1051757532 04:52 4.870193412616 +1051806007 18:20 18.33539050867 +1054434776 04:32 4.548982718277 +1054485647 18:40 18.67981294906 +1057026949 04:35 4.597195637274 +1057078197 18:49 18.83256339675 +1059706409 04:53 4.891657508917 +1059755837 18:37 18.62144070428 +1062385999 05:13 5.222095112101 +1062432291 18:04 18.08095716848 +1064979098 05:31 5.527319921542 +1065021952 17:25 17.43133913592 +1067658845 05:54 5.901629287095 +1067698274 16:51 16.85390245352 +1070252387 06:19 6.329924268936 +1070289382 16:36 16.60631260094 diff --git a/ext/standard/tests/strings/bug35817.phpt b/ext/standard/tests/strings/bug35817.phpt new file mode 100644 index 000000000..e2a752c4a --- /dev/null +++ b/ext/standard/tests/strings/bug35817.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #35817 (unpack() does not decode odd number of hexadecimal values) +--FILE-- + +--EXPECT-- +array(1) { + [1]=> + string(3) "181" +} +array(1) { + [1]=> + string(2) "18" +} +array(1) { + [1]=> + string(1) "1" +} diff --git a/ext/standard/tests/strings/http_build_query.phpt b/ext/standard/tests/strings/http_build_query.phpt new file mode 100644 index 000000000..4ed7fda43 --- /dev/null +++ b/ext/standard/tests/strings/http_build_query.phpt @@ -0,0 +1,15 @@ +--TEST-- +http_build_query() function +--FILE-- +"bar","baz"=>1,"test"=>"a ' \" ", "abc"); +var_dump(http_build_query($array)); +var_dump(http_build_query($array, 'foo')); +var_dump(http_build_query($array, 'foo', ';')); + +?> +--EXPECT-- +string(35) "foo=bar&baz=1&test=a+%27+%22+&0=abc" +string(38) "foo=bar&baz=1&test=a+%27+%22+&foo0=abc" +string(38) "foo=bar;baz=1;test=a+%27+%22+;foo0=abc" diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt index 0c6c5ae56..9d41fc147 100644 --- a/ext/standard/tests/strings/str_word_count.phpt +++ b/ext/standard/tests/strings/str_word_count.phpt @@ -36,7 +36,11 @@ var_dump(str_word_count($str2, 2, "014")); var_dump(str_word_count($str2, 2, array())); var_dump(str_word_count($str2, 2, new stdClass)); var_dump(str_word_count($str2, 2, "")); - +var_dump(str_word_count("foo'0 bar-0var", 2, "0")); +var_dump(str_word_count("'foo'", 2)); +var_dump(str_word_count("'foo'", 2, "'")); +var_dump(str_word_count("-foo-", 2)); +var_dump(str_word_count("-foo-", 2, "-")); ?> --EXPECTF-- array(6) { @@ -225,4 +229,26 @@ array(7) { string(3) "bar" [15]=> string(3) "foo" -} \ No newline at end of file +} +array(2) { + [0]=> + string(5) "foo'0" + [6]=> + string(8) "bar-0var" +} +array(1) { + [1]=> + string(4) "foo'" +} +array(1) { + [0]=> + string(5) "'foo'" +} +array(1) { + [1]=> + string(3) "foo" +} +array(1) { + [0]=> + string(5) "-foo-" +} diff --git a/ext/standard/tests/strings/url_t.phpt b/ext/standard/tests/strings/url_t.phpt index f6fec50de..be95e0294 100644 --- a/ext/standard/tests/strings/url_t.phpt +++ b/ext/standard/tests/strings/url_t.phpt @@ -75,6 +75,11 @@ $sample_urls = array ( foreach ($sample_urls as $url) { var_dump(@parse_url($url)); } + + $url = 'http://secret:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123'; + foreach (array(PHP_URL_SCHEME,PHP_URL_HOST,PHP_URL_PORT,PHP_URL_USER,PHP_URL_PASS,PHP_URL_PATH,PHP_URL_QUERY,PHP_URL_FRAGMENT) as $v) { + var_dump(parse_url($url, $v)); + } ?> --EXPECT-- array(1) { @@ -673,3 +678,11 @@ array(4) { ["path"]=> string(4) "/bla" } +string(4) "http" +string(11) "www.php.net" +int(80) +string(6) "secret" +string(7) "hideout" +string(10) "/index.php" +string(31) "test=1&test2=char&test3=mixesCI" +string(16) "some_page_ref123" diff --git a/ext/standard/type.c b/ext/standard/type.c index f91e3c07d..aa11dd9b5 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: type.c,v 1.30 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: type.c,v 1.30.2.2 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_incomplete_class.h" @@ -25,7 +25,7 @@ Returns the type of the variable */ PHP_FUNCTION(gettype) { - pval **arg; + zval **arg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { WRONG_PARAM_COUNT; @@ -91,7 +91,7 @@ PHP_FUNCTION(gettype) Set the type of the variable */ PHP_FUNCTION(settype) { - pval **var, **type; + zval **var, **type; char *new_type; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &var, &type) == FAILURE) { @@ -136,7 +136,7 @@ PHP_FUNCTION(settype) Get the integer value of a variable using the optional base for the conversion */ PHP_FUNCTION(intval) { - pval **num, **arg_base; + zval **num, **arg_base; int base; switch (ZEND_NUM_ARGS()) { @@ -168,7 +168,7 @@ PHP_FUNCTION(intval) Get the float value of a variable */ PHP_FUNCTION(floatval) { - pval **num; + zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { WRONG_PARAM_COUNT; @@ -203,7 +203,7 @@ PHP_FUNCTION(strval) static void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type) { - pval **arg; + zval **arg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only one argument expected"); diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index e89f280b8..d7a45f3a9 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uniqid.c,v 1.41.2.1 2005/10/19 13:41:44 iliaa Exp $ */ +/* $Id: uniqid.c,v 1.41.2.2 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h index 151258b0f..0f0e83b57 100644 --- a/ext/standard/uniqid.h +++ b/ext/standard/uniqid.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uniqid.h,v 1.13 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: uniqid.h,v 1.13.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef UNIQID_H #define UNIQID_H diff --git a/ext/standard/url.c b/ext/standard/url.c index c683ae0ec..6231f28a4 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Jim Winstead | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.86.2.1 2005/08/16 14:20:41 iliaa Exp $ */ +/* $Id: url.c,v 1.86.2.3 2006/01/01 12:50:15 sniper Exp $ */ #include #include @@ -328,15 +328,16 @@ end: } /* }}} */ -/* {{{ proto array parse_url(string url) +/* {{{ proto mixed parse_url(string url, [int url_component]) Parse a URL and return its components */ PHP_FUNCTION(parse_url) { char *str; int str_len; php_url *resource; + long key = -1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len, &key) == FAILURE) { return; } @@ -346,6 +347,39 @@ PHP_FUNCTION(parse_url) RETURN_FALSE; } + if (key > -1) { + switch (key) { + case PHP_URL_SCHEME: + if (resource->scheme != NULL) RETVAL_STRING(resource->scheme, 1); + break; + case PHP_URL_HOST: + if (resource->host != NULL) RETVAL_STRING(resource->host, 1); + break; + case PHP_URL_PORT: + if (resource->port != 0) RETVAL_LONG(resource->port); + break; + case PHP_URL_USER: + if (resource->user != NULL) RETVAL_STRING(resource->user, 1); + break; + case PHP_URL_PASS: + if (resource->pass != NULL) RETVAL_STRING(resource->pass, 1); + break; + case PHP_URL_PATH: + if (resource->path != NULL) RETVAL_STRING(resource->path, 1); + break; + case PHP_URL_QUERY: + if (resource->query != NULL) RETVAL_STRING(resource->query, 1); + break; + case PHP_URL_FRAGMENT: + if (resource->fragment != NULL) RETVAL_STRING(resource->fragment, 1); + break; + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid url component identifier %ld.", key); + RETVAL_FALSE; + } + goto done; + } + /* allocate an array for return */ array_init(return_value); @@ -366,8 +400,8 @@ PHP_FUNCTION(parse_url) add_assoc_string(return_value, "query", resource->query, 1); if (resource->fragment != NULL) add_assoc_string(return_value, "fragment", resource->fragment, 1); - - php_url_free(resource); +done: + php_url_free(resource); } /* }}} */ diff --git a/ext/standard/url.h b/ext/standard/url.h index b2b3b0c73..7dd48cad8 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Jim Winstead | +----------------------------------------------------------------------+ */ -/* $Id: url.h,v 1.20 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: url.h,v 1.20.2.2 2006/01/01 12:50:15 sniper Exp $ */ #ifndef URL_H #define URL_H @@ -46,6 +46,15 @@ PHP_FUNCTION(rawurlencode); PHP_FUNCTION(rawurldecode); PHP_FUNCTION(get_headers); +#define PHP_URL_SCHEME 0 +#define PHP_URL_HOST 1 +#define PHP_URL_PORT 2 +#define PHP_URL_USER 3 +#define PHP_URL_PASS 4 +#define PHP_URL_PATH 5 +#define PHP_URL_QUERY 6 +#define PHP_URL_FRAGMENT 7 + #endif /* URL_H */ /* diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c index d21de76be..b1a8dded1 100644 --- a/ext/standard/url_scanner.c +++ b/ext/standard/url_scanner.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe | +----------------------------------------------------------------------+ */ -/* $Id: url_scanner.c,v 1.44 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: url_scanner.c,v 1.44.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/url_scanner.h b/ext/standard/url_scanner.h index a2af7f65f..d061ade6a 100644 --- a/ext/standard/url_scanner.h +++ b/ext/standard/url_scanner.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -15,7 +15,7 @@ | Author: Sascha Schumann | +----------------------------------------------------------------------+ */ -/* $Id: url_scanner.h,v 1.16 2005/08/03 14:08:14 sniper Exp $ */ +/* $Id: url_scanner.h,v 1.16.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef URI_SCANNER_H #define URI_SCANNER_H diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index ad03646f4..5a9116b53 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -1,14 +1,14 @@ -/* Generated by re2c 0.9.8 on Wed Jun 29 02:16:53 2005 */ +/* Generated by re2c 0.9.11 on Sun Jan 1 14:39:52 2006 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.c,v 1.95 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: url_scanner_ex.c,v 1.95.2.3 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" @@ -690,7 +690,7 @@ state_before_val: { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy46; ++YYCURSOR; yy46: @@ -777,7 +777,7 @@ state_val: { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy58; ++YYCURSOR; yy58: diff --git a/ext/standard/url_scanner_ex.c.orig b/ext/standard/url_scanner_ex.c.orig index 5678119de..2e7e3fed6 100644 --- a/ext/standard/url_scanner_ex.c.orig +++ b/ext/standard/url_scanner_ex.c.orig @@ -1,15 +1,15 @@ -/* Generated by re2c 0.9.8 on Wed Jun 29 02:16:53 2005 */ -#line 1 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +/* Generated by re2c 0.9.11 on Sun Jan 1 14:39:52 2006 */ +#line 1 "ext/standard/url_scanner_ex.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.c,v 1.95 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: url_scanner_ex.c,v 1.95.2.3 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" @@ -91,7 +91,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals) PHP_INI_END() -#line 97 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 97 "ext/standard/url_scanner_ex.re" #define YYFILL(n) goto done @@ -145,7 +145,7 @@ scan: 128, 128, 128, 128, 128, 128, 128, 128, }; -#line 149 "" +#line 149 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; goto yy0; @@ -162,21 +162,21 @@ yy0: yy2: ++YYCURSOR; goto yy3; yy3: -#line 115 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 115 "ext/standard/url_scanner_ex.re" { smart_str_append(dest, url); return; } -#line 168 "" +#line 168 "ext/standard/url_scanner_ex.c" yy4: ++YYCURSOR; goto yy5; yy5: -#line 116 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 116 "ext/standard/url_scanner_ex.re" { sep = separator; goto scan; } -#line 174 "" +#line 174 "ext/standard/url_scanner_ex.c" yy6: ++YYCURSOR; goto yy7; yy7: -#line 117 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 117 "ext/standard/url_scanner_ex.re" { bash = p - 1; goto done; } -#line 180 "" +#line 180 "ext/standard/url_scanner_ex.c" yy8: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -186,12 +186,12 @@ yy9: if(yybm[0+yych] & 128) { } goto yy10; yy10: -#line 118 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 118 "ext/standard/url_scanner_ex.re" { goto scan; } -#line 192 "" +#line 192 "ext/standard/url_scanner_ex.c" } } -#line 119 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 119 "ext/standard/url_scanner_ex.re" done: @@ -395,7 +395,7 @@ state_plain: 128, 128, 128, 128, 128, 128, 128, 128, }; -#line 399 "" +#line 399 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; goto yy11; @@ -410,9 +410,9 @@ yy11: yy13: ++YYCURSOR; goto yy14; yy14: -#line 287 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 287 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; } -#line 416 "" +#line 416 "ext/standard/url_scanner_ex.c" yy15: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -422,12 +422,12 @@ yy16: if(yybm[0+yych] & 128) { } goto yy17; yy17: -#line 288 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 288 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); goto state_plain; } -#line 428 "" +#line 428 "ext/standard/url_scanner_ex.c" } } -#line 289 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 289 "ext/standard/url_scanner_ex.re" state_tag: @@ -468,7 +468,7 @@ state_tag: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 472 "" +#line 472 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; goto yy18; @@ -485,15 +485,15 @@ yy20: ++YYCURSOR; yych = *YYCURSOR; goto yy25; yy21: -#line 294 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 294 "ext/standard/url_scanner_ex.re" { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; } -#line 491 "" +#line 491 "ext/standard/url_scanner_ex.c" yy22: ++YYCURSOR; goto yy23; yy23: -#line 295 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 295 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); goto state_plain_begin; } -#line 497 "" +#line 497 "ext/standard/url_scanner_ex.c" yy24: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -504,7 +504,7 @@ yy25: if(yybm[0+yych] & 128) { goto yy21; } } -#line 296 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 296 "ext/standard/url_scanner_ex.re" state_next_arg_begin: @@ -548,7 +548,7 @@ state_next_arg: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 552 "" +#line 552 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; goto yy26; @@ -578,28 +578,28 @@ yy26: yy28: ++YYCURSOR; goto yy29; yy29: -#line 304 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 304 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; } -#line 584 "" +#line 584 "ext/standard/url_scanner_ex.c" yy30: ++YYCURSOR; yych = *YYCURSOR; goto yy37; yy31: -#line 305 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 305 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); goto state_next_arg; } -#line 591 "" +#line 591 "ext/standard/url_scanner_ex.c" yy32: ++YYCURSOR; goto yy33; yy33: -#line 306 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 306 "ext/standard/url_scanner_ex.re" { --YYCURSOR; STATE = STATE_ARG; goto state_arg; } -#line 597 "" +#line 597 "ext/standard/url_scanner_ex.c" yy34: ++YYCURSOR; goto yy35; yy35: -#line 307 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 307 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); goto state_plain_begin; } -#line 603 "" +#line 603 "ext/standard/url_scanner_ex.c" yy36: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -610,7 +610,7 @@ yy37: if(yybm[0+yych] & 128) { goto yy31; } } -#line 308 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 308 "ext/standard/url_scanner_ex.re" state_arg: @@ -651,7 +651,7 @@ state_arg: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 655 "" +#line 655 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; goto yy38; @@ -668,15 +668,15 @@ yy40: ++YYCURSOR; yych = *YYCURSOR; goto yy45; yy41: -#line 313 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 313 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; } -#line 674 "" +#line 674 "ext/standard/url_scanner_ex.c" yy42: ++YYCURSOR; goto yy43; yy43: -#line 314 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 314 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; } -#line 680 "" +#line 680 "ext/standard/url_scanner_ex.c" yy44: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -687,7 +687,7 @@ yy45: if(yybm[0+yych] & 128) { goto yy41; } } -#line 315 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 315 "ext/standard/url_scanner_ex.re" state_before_val: @@ -728,10 +728,10 @@ state_before_val: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 732 "" +#line 732 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy46; ++YYCURSOR; yy46: @@ -746,16 +746,16 @@ yy48: yyaccept = 0; if(yych == '=') goto yy53; goto yy49; yy49: -#line 321 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 321 "ext/standard/url_scanner_ex.re" { --YYCURSOR; goto state_next_arg_begin; } -#line 752 "" +#line 752 "ext/standard/url_scanner_ex.c" yy50: ++YYCURSOR; yych = *YYCURSOR; goto yy54; yy51: -#line 320 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 320 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; } -#line 759 "" +#line 759 "ext/standard/url_scanner_ex.c" yy52: yych = *++YYCURSOR; goto yy49; yy53: ++YYCURSOR; @@ -779,7 +779,7 @@ yy57: YYCURSOR = YYMARKER; } } } -#line 322 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 322 "ext/standard/url_scanner_ex.re" @@ -821,10 +821,10 @@ state_val: 248, 248, 248, 248, 248, 248, 248, 248, }; -#line 825 "" +#line 825 "ext/standard/url_scanner_ex.c" { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy58; ++YYCURSOR; yy58: @@ -852,9 +852,9 @@ yy60: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); goto yy77; yy61: -#line 330 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 330 "ext/standard/url_scanner_ex.re" { handle_val(STD_ARGS, 0, '\0'); goto state_next_arg_begin; } -#line 858 "" +#line 858 "ext/standard/url_scanner_ex.c" yy62: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); goto yy69; @@ -863,9 +863,9 @@ yy63: yych = *++YYCURSOR; yy64: ++YYCURSOR; goto yy65; yy65: -#line 331 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 331 "ext/standard/url_scanner_ex.re" { passthru(STD_ARGS); goto state_next_arg_begin; } -#line 869 "" +#line 869 "ext/standard/url_scanner_ex.c" yy66: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -892,9 +892,9 @@ yy70: ++YYCURSOR; } goto yy71; yy71: -#line 329 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 329 "ext/standard/url_scanner_ex.re" { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; } -#line 898 "" +#line 898 "ext/standard/url_scanner_ex.c" yy72: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -928,9 +928,9 @@ yy78: ++YYCURSOR; } goto yy79; yy79: -#line 328 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 328 "ext/standard/url_scanner_ex.re" { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; } -#line 934 "" +#line 934 "ext/standard/url_scanner_ex.c" yy80: ++YYCURSOR; if(YYLIMIT == YYCURSOR) YYFILL(1); yych = *YYCURSOR; @@ -945,7 +945,7 @@ yy82: ++YYCURSOR; goto yy79; } } -#line 332 "/usr/src/php/php5/ext/standard/url_scanner_ex.re" +#line 332 "ext/standard/url_scanner_ex.re" stop: diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h index df5430714..54405ca28 100644 --- a/ext/standard/url_scanner_ex.h +++ b/ext/standard/url_scanner_ex.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.h,v 1.26 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: url_scanner_ex.h,v 1.26.2.1 2006/01/01 12:50:15 sniper Exp $ */ #ifndef URL_SCANNER_EX_H #define URL_SCANNER_EX_H diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index d1f02e321..c5d60a888 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.re,v 1.76 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: url_scanner_ex.re,v 1.76.2.1 2006/01/01 12:26:08 sniper Exp $ */ #include "php.h" diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 6ea4a1ea9..d275f55e4 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: user_filters.c,v 1.31 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: user_filters.c,v 1.31.2.1 2006/01/01 12:50:15 sniper Exp $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c index 481a2da48..ac56d0bf5 100644 --- a/ext/standard/uuencode.c +++ b/ext/standard/uuencode.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uuencode.c,v 1.5 2005/08/03 14:08:15 sniper Exp $ */ +/* $Id: uuencode.c,v 1.5.2.1 2006/01/01 12:50:15 sniper Exp $ */ /* * Portions of this code are based on Berkeley's uuencode/uudecode diff --git a/ext/standard/var.c b/ext/standard/var.c index 1e3297526..233f318c1 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.203.2.4 2005/10/17 14:38:09 derick Exp $ */ +/* $Id: var.c,v 1.203.2.5 2006/01/01 12:50:16 sniper Exp $ */ diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 11f650f7e..b0f0303ad 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1,14 +1,14 @@ -/* Generated by re2c 0.9.10 on Mon Sep 5 19:22:38 2005 */ +/* Generated by re2c 0.9.11 on Sun Jan 1 14:39:32 2006 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c,v 1.70.2.1 2005/09/05 16:22:58 sniper Exp $ */ +/* $Id: var_unserializer.c,v 1.70.2.4 2006/01/01 12:50:16 sniper Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -390,7 +390,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; ++YYCURSOR; yy0: diff --git a/ext/standard/var_unserializer.c.orig b/ext/standard/var_unserializer.c.orig index 97c5648ef..266b31dc5 100644 --- a/ext/standard/var_unserializer.c.orig +++ b/ext/standard/var_unserializer.c.orig @@ -1,15 +1,15 @@ -/* Generated by re2c 0.9.10 on Mon Sep 5 19:22:38 2005 */ -#line 1 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +/* Generated by re2c 0.9.11 on Sun Jan 1 14:39:32 2006 */ +#line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c,v 1.70.2.1 2005/09/05 16:22:58 sniper Exp $ */ +/* $Id: var_unserializer.c,v 1.70.2.4 2006/01/01 12:50:16 sniper Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -147,7 +147,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) #define YYMARKER marker -#line 155 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 155 "ext/standard/var_unserializer.re" @@ -390,10 +390,10 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 394 "" +#line 394 "ext/standard/var_unserializer.c" { YYCTYPE yych; - unsigned int yyaccept; + unsigned int yyaccept = 0; goto yy0; ++YYCURSOR; yy0: @@ -418,9 +418,9 @@ yy2: yyaccept = 0; if(yych == ':') goto yy87; goto yy3; yy3: -#line 626 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 626 "ext/standard/var_unserializer.re" { return 0; } -#line 424 "" +#line 424 "ext/standard/var_unserializer.c" yy4: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if(yych == ':') goto yy81; @@ -459,13 +459,13 @@ yy12: yyaccept = 0; yy13: ++YYCURSOR; goto yy14; yy14: -#line 620 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 620 "ext/standard/var_unserializer.re" { /* this is the case where we have less data than planned */ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data"); return 0; /* not sure if it should be 0 or 1 here? */ } -#line 469 "" +#line 469 "ext/standard/var_unserializer.c" yy15: yych = *++YYCURSOR; goto yy3; yy16: yych = *++YYCURSOR; @@ -498,7 +498,7 @@ yy21: yych = *++YYCURSOR; yy22: ++YYCURSOR; goto yy23; yy23: -#line 508 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 508 "ext/standard/var_unserializer.re" { size_t len, len2, len3, maxlen; long elements; @@ -610,7 +610,7 @@ yy23: return object_common2(UNSERIALIZE_PASSTHRU, elements); } -#line 614 "" +#line 614 "ext/standard/var_unserializer.c" yy24: yych = *++YYCURSOR; if(yych <= ','){ if(yych != '+') goto yy17; @@ -639,7 +639,7 @@ yy28: yych = *++YYCURSOR; yy29: ++YYCURSOR; goto yy30; yy30: -#line 500 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 500 "ext/standard/var_unserializer.re" { INIT_PZVAL(*rval); @@ -647,7 +647,7 @@ yy30: return object_common2(UNSERIALIZE_PASSTHRU, object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR)); } -#line 651 "" +#line 651 "ext/standard/var_unserializer.c" yy31: yych = *++YYCURSOR; if(yych == '+') goto yy32; if(yych <= '/') goto yy17; @@ -671,7 +671,7 @@ yy35: yych = *++YYCURSOR; yy36: ++YYCURSOR; goto yy37; yy37: -#line 478 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 478 "ext/standard/var_unserializer.re" { long elements = parse_iv(start + 2); /* use iv() not uiv() in order to check data range */ @@ -693,7 +693,7 @@ yy37: return finish_nested_data(UNSERIALIZE_PASSTHRU); } -#line 697 "" +#line 697 "ext/standard/var_unserializer.c" yy38: yych = *++YYCURSOR; if(yych == '+') goto yy39; if(yych <= '/') goto yy17; @@ -717,7 +717,7 @@ yy42: yych = *++YYCURSOR; yy43: ++YYCURSOR; goto yy44; yy44: -#line 450 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 450 "ext/standard/var_unserializer.re" { size_t len, maxlen; char *str; @@ -745,7 +745,7 @@ yy44: ZVAL_STRINGL(*rval, str, len, 1); return 1; } -#line 749 "" +#line 749 "ext/standard/var_unserializer.c" yy45: yych = *++YYCURSOR; if(yych <= '/'){ if(yych <= ','){ @@ -834,14 +834,14 @@ yy54: if(yych <= ';'){ yy55: ++YYCURSOR; goto yy56; yy56: -#line 443 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 443 "ext/standard/var_unserializer.re" { *p = YYCURSOR; INIT_PZVAL(*rval); ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL)); return 1; } -#line 845 "" +#line 845 "ext/standard/var_unserializer.c" yy57: yych = *++YYCURSOR; if(yych <= ','){ if(yych != '+') goto yy17; @@ -901,7 +901,7 @@ yy65: yych = *++YYCURSOR; yy66: ++YYCURSOR; goto yy67; yy67: -#line 428 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 428 "ext/standard/var_unserializer.re" { *p = YYCURSOR; INIT_PZVAL(*rval); @@ -916,7 +916,7 @@ yy67: return 1; } -#line 920 "" +#line 920 "ext/standard/var_unserializer.c" yy68: yych = *++YYCURSOR; if(yych == 'N') goto yy65; goto yy17; @@ -945,14 +945,14 @@ yy72: if(yych <= '/') goto yy17; yy73: ++YYCURSOR; goto yy74; yy74: -#line 421 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 421 "ext/standard/var_unserializer.re" { *p = YYCURSOR; INIT_PZVAL(*rval); ZVAL_LONG(*rval, parse_iv(start + 2)); return 1; } -#line 956 "" +#line 956 "ext/standard/var_unserializer.c" yy75: yych = *++YYCURSOR; if(yych <= '/') goto yy17; if(yych >= '2') goto yy17; @@ -963,25 +963,25 @@ yy76: yych = *++YYCURSOR; yy77: ++YYCURSOR; goto yy78; yy78: -#line 414 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 414 "ext/standard/var_unserializer.re" { *p = YYCURSOR; INIT_PZVAL(*rval); ZVAL_BOOL(*rval, parse_iv(start + 2)); return 1; } -#line 974 "" +#line 974 "ext/standard/var_unserializer.c" yy79: ++YYCURSOR; goto yy80; yy80: -#line 407 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 407 "ext/standard/var_unserializer.re" { *p = YYCURSOR; INIT_PZVAL(*rval); ZVAL_NULL(*rval); return 1; } -#line 985 "" +#line 985 "ext/standard/var_unserializer.c" yy81: yych = *++YYCURSOR; if(yych <= ','){ if(yych != '+') goto yy17; @@ -1007,7 +1007,7 @@ yy84: if(yych <= '/') goto yy17; yy85: ++YYCURSOR; goto yy86; yy86: -#line 384 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 384 "ext/standard/var_unserializer.re" { long id; @@ -1030,7 +1030,7 @@ yy86: return 1; } -#line 1034 "" +#line 1034 "ext/standard/var_unserializer.c" yy87: yych = *++YYCURSOR; if(yych <= ','){ if(yych != '+') goto yy17; @@ -1056,7 +1056,7 @@ yy90: if(yych <= '/') goto yy17; yy91: ++YYCURSOR; goto yy92; yy92: -#line 363 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 363 "ext/standard/var_unserializer.re" { long id; @@ -1077,10 +1077,10 @@ yy92: return 1; } -#line 1081 "" +#line 1081 "ext/standard/var_unserializer.c" } } -#line 628 "/usr/src/php/php_5_1/ext/standard/var_unserializer.re" +#line 628 "ext/standard/var_unserializer.re" return 0; diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index e6a90af7d..25be4a4f8 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.re,v 1.52.2.1 2005/09/05 16:22:19 sniper Exp $ */ +/* $Id: var_unserializer.re,v 1.52.2.2 2006/01/01 12:26:08 sniper Exp $ */ #include "php.h" #include "ext/standard/php_var.h" diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index a322db10f..8ab7cf393 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: versioning.c,v 1.19 2005/08/03 14:08:16 sniper Exp $ */ +/* $Id: versioning.c,v 1.19.2.1 2006/01/01 12:50:16 sniper Exp $ */ #include #include diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 731d99e0f..0a262e430 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_db.c,v 1.66 2005/08/06 05:42:42 fmk Exp $ */ +/* $Id: php_sybase_db.c,v 1.66.2.5 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -72,7 +72,7 @@ typedef struct { } sybase_field; typedef struct { - pval ***data; + zval ***data; sybase_field *fields; sybase_link *sybase_ptr; int cur_row,cur_field; @@ -80,7 +80,7 @@ typedef struct { } sybase_result; -function_entry sybase_functions[] = { +zend_function_entry sybase_functions[] = { PHP_FE(sybase_connect, NULL) PHP_FE(sybase_pconnect, NULL) PHP_FE(sybase_close, NULL) @@ -140,7 +140,7 @@ THREAD_LS sybase_module php_sybase_module; #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: A link to the server could not be established"); RETURN_FALSE; } } -static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pval **result_ptr, int column_type); +static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,zval **result_ptr, int column_type); /* error handler */ static int php_sybase_error_handler(DBPROCESS *dbproc,int severity,int dberr, @@ -168,7 +168,7 @@ static int php_sybase_message_handler(DBPROCESS *dbproc,DBINT msgno,int msgstate } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == php_sybase_module.le_result) { sybase_link *sybase_ptr = ((sybase_result *) le->ptr)->sybase_ptr; @@ -437,11 +437,11 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (php_sybase_module.max_links!=-1 && php_sybase_module.num_links>=php_sybase_module.max_links) { php_error_docref(NULL TSRMLS_CC, E_WARNING,"Sybase: Too many open links (%d)",php_sybase_module.num_links); @@ -466,7 +466,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) memcpy(sybase_ptr,&sybase,sizeof(sybase_link)); Z_TYPE(new_le) = php_sybase_module.le_plink; new_le.ptr = sybase_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { free(sybase_ptr); goto err_link; } @@ -495,7 +495,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) Z_LVAL_P(return_value) = zend_list_insert(sybase_ptr,php_sybase_module.le_plink); Z_TYPE_P(return_value) = IS_LONG; } else { /* non persistent */ - list_entry *index_ptr,new_index_ptr; + zend_rsrc_list_entry *index_ptr,new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual sybase link sits. @@ -544,7 +544,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry),NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list),hashed_details,hashed_details_length+1,(void *) &new_index_ptr, sizeof(zend_rsrc_list_entry),NULL)==FAILURE) { goto err_link; } php_sybase_module.num_links++; @@ -671,7 +671,7 @@ PHP_FUNCTION(sybase_select_db) /* }}} */ -static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,pval **result_ptr, int column_type) +static void php_sybase_get_column_content(sybase_link *sybase_ptr,int offset,zval **result_ptr, int column_type) { zval *result; @@ -840,7 +840,7 @@ PHP_FUNCTION(sybase_query) } result = (sybase_result *) emalloc(sizeof(sybase_result)); - result->data = (pval ***) safe_emalloc(sizeof(pval **), SYBASE_ROWS_BLOCK, 0); + result->data = (zval ***) safe_emalloc(sizeof(zval **), SYBASE_ROWS_BLOCK, 0); result->sybase_ptr = sybase_ptr; result->cur_field=result->cur_row=result->num_rows=0; result->num_fields = num_fields; @@ -849,9 +849,9 @@ PHP_FUNCTION(sybase_query) while (retvalue!=FAIL && retvalue!=NO_MORE_ROWS) { result->num_rows++; if (result->num_rows > blocks_initialized*SYBASE_ROWS_BLOCK) { - result->data = (pval ***) erealloc(result->data,sizeof(pval **)*SYBASE_ROWS_BLOCK*(++blocks_initialized)); + result->data = (zval ***) erealloc(result->data,sizeof(zval **)*SYBASE_ROWS_BLOCK*(++blocks_initialized)); } - result->data[i] = (pval **) safe_emalloc(sizeof(pval *), num_fields, 0); + result->data[i] = (zval **) safe_emalloc(sizeof(zval *), num_fields, 0); for (j=1; j<=num_fields; j++) { php_sybase_get_column_content(sybase_ptr, j, &result->data[i][j-1], column_types[j-1]); if (!php_sybase_module.compatability_mode) { @@ -1041,7 +1041,7 @@ PHP_FUNCTION(sybase_fetch_row) zval **sybase_result_index; int type,i,id; sybase_result *result; - pval *field_content; + zval *field_content; if (ZEND_NUM_ARGS() !=1 || zend_get_parameters_ex(1, &sybase_result_index)==FAILURE) { WRONG_PARAM_COUNT; @@ -1063,7 +1063,7 @@ PHP_FUNCTION(sybase_fetch_row) array_init(return_value); for (i=0; inum_fields; i++) { ZVAL_ADDREF(result->data[result->cur_row][i]); - zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL); + zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(zval *), NULL); } result->cur_row++; } @@ -1097,9 +1097,9 @@ static void php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAMETERS) for (i=0; inum_fields; i++) { ZVAL_ADDREF(result->data[result->cur_row][i]); - zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL); + zend_hash_index_update(Z_ARRVAL_P(return_value), i, (void *) &result->data[result->cur_row][i], sizeof(zval *), NULL); ZVAL_ADDREF(result->data[result->cur_row][i]); - zend_hash_update(Z_ARRVAL_P(return_value), result->fields[i].name, strlen(result->fields[i].name)+1, (void *) &result->data[result->cur_row][i], sizeof(pval *), NULL); + zend_hash_update(Z_ARRVAL_P(return_value), result->fields[i].name, strlen(result->fields[i].name)+1, (void *) &result->data[result->cur_row][i], sizeof(zval *), NULL); } result->cur_row++; } @@ -1354,7 +1354,7 @@ PHP_FUNCTION(sybase_result) } *return_value = *result->data[Z_LVAL_PP(row)][field_offset]; - pval_copy_constructor(return_value); + zval_copy_ctor(return_value); } /* }}} */ diff --git a/ext/sybase/php_sybase_db.h b/ext/sybase/php_sybase_db.h index bfe6ebd36..ef47b6721 100644 --- a/ext/sybase/php_sybase_db.h +++ b/ext/sybase/php_sybase_db.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_db.h,v 1.12 2005/08/03 14:08:17 sniper Exp $ */ +/* $Id: php_sybase_db.h,v 1.12.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_SYBASE_DB_H #define PHP_SYBASE_DB_H diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 3e30cbf19..c6d260c5e 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c,v 1.103.2.1 2005/08/18 13:34:41 sniper Exp $ */ +/* $Id: php_sybase_ct.c,v 1.103.2.5 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -37,7 +37,7 @@ static int le_link, le_plink, le_result; #if HAVE_SYBASE_CT -function_entry sybase_functions[] = { +zend_function_entry sybase_functions[] = { PHP_FE(sybase_connect, NULL) PHP_FE(sybase_pconnect, NULL) PHP_FE(sybase_close, NULL) @@ -108,7 +108,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sybase) #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: A link to the server could not be established"); RETURN_FALSE; } } -static int _clean_invalid_results(list_entry *le TSRMLS_DC) +static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC) { if (Z_TYPE_P(le) == le_result) { sybase_link *sybase_ptr = ((sybase_result *) le->ptr)->sybase_ptr; @@ -467,8 +467,8 @@ PHP_RSHUTDOWN_FUNCTION(sybase) static int php_sybase_do_connect_internal(sybase_link *sybase, char *host, char *user, char *passwd, char *charset, char *appname) { CS_LOCALE *tmp_locale; - TSRMLS_FETCH(); long packetsize; + TSRMLS_FETCH(); /* set a CS_CONNECTION record */ if (ct_con_alloc(SybCtG(context), &sybase->connection)!=CS_SUCCEED) { @@ -677,11 +677,11 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) persistent=0; } if (persistent) { - list_entry *le; + zend_rsrc_list_entry *le; /* try to find if we already have this link in our persistent list */ if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_length+1, (void **) &le)==FAILURE) { /* we don't */ - list_entry new_le; + zend_rsrc_list_entry new_le; if (SybCtG(max_links)!=-1 && SybCtG(num_links)>=SybCtG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Sybase: Too many open links (%ld)", SybCtG(num_links)); @@ -704,7 +704,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = sybase_ptr; - if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { ct_close(sybase_ptr->connection, CS_UNUSED); ct_con_drop(sybase_ptr->connection); free(sybase_ptr); @@ -759,7 +759,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } ZEND_REGISTER_RESOURCE(return_value, sybase_ptr, le_plink); } else { /* non persistent */ - list_entry *index_ptr, new_index_ptr; + zend_rsrc_list_entry *index_ptr, new_index_ptr; /* first we check the hash for the hashed_details key. if it exists, * it should point us to the right offset where the actual sybase link sits. @@ -805,7 +805,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* add it to the hash */ new_index_ptr.ptr = (void *) Z_LVAL_P(return_value); Z_TYPE(new_index_ptr) = le_index_ptr; - if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) { + if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(zend_rsrc_list_entry), NULL)==FAILURE) { ct_close(sybase_ptr->connection, CS_UNUSED); ct_con_drop(sybase_ptr->connection); efree(sybase_ptr); diff --git a/ext/sybase_ct/php_sybase_ct.h b/ext/sybase_ct/php_sybase_ct.h index 51c7b132e..c4749c65d 100644 --- a/ext/sybase_ct/php_sybase_ct.h +++ b/ext/sybase_ct/php_sybase_ct.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.h,v 1.19 2005/08/03 14:08:17 sniper Exp $ */ +/* $Id: php_sybase_ct.h,v 1.19.2.2 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_SYBASE_CT_H #define PHP_SYBASE_CT_H @@ -96,7 +96,7 @@ typedef struct { } sybase_field; typedef struct { - pval **data; + zval **data; sybase_field *fields; sybase_link *sybase_ptr; int cur_row,cur_field; diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h index a0fdc90b7..c38c5ccc2 100644 --- a/ext/sysvmsg/php_sysvmsg.h +++ b/ext/sysvmsg/php_sysvmsg.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvmsg.h,v 1.6 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: php_sysvmsg.h,v 1.6.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_SYSVMSG_H #define PHP_SYSVMSG_H diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index a0723ca20..7f7a5de34 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvmsg.c,v 1.20 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: sysvmsg.c,v 1.20.2.3 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -66,7 +66,7 @@ static * * Every user visible function must have an entry in sysvmsg_functions[]. */ -function_entry sysvmsg_functions[] = { +zend_function_entry sysvmsg_functions[] = { PHP_FE(msg_get_queue, NULL) PHP_FE(msg_send, sixth_arg_force_ref) PHP_FE(msg_receive, msg_receive_args_force_ref) @@ -142,7 +142,7 @@ PHP_MINFO_FUNCTION(sysvmsg) { php_info_print_table_start(); php_info_print_table_row(2, "sysvmsg support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.20 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.20.2.3 $"); php_info_print_table_end(); } /* }}} */ @@ -341,8 +341,9 @@ PHP_FUNCTION(msg_receive) if (!php_var_unserialize(&tmp, &p, p + result, &var_hash TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "message corrupted"); RETVAL_FALSE; + } else { + REPLACE_ZVAL_VALUE(&out_message, tmp, 0); } - REPLACE_ZVAL_VALUE(&out_message, tmp, 0); FREE_ZVAL(tmp); PHP_VAR_UNSERIALIZE_DESTROY(var_hash); } else { diff --git a/ext/sysvsem/php_sysvsem.h b/ext/sysvsem/php_sysvsem.h index 87a448cc1..cf5a177ea 100644 --- a/ext/sysvsem/php_sysvsem.h +++ b/ext/sysvsem/php_sysvsem.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvsem.h,v 1.16 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: php_sysvsem.h,v 1.16.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_SYSVSEM_H #define PHP_SYSVSEM_H diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index 736184509..6d39685b6 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvsem.c,v 1.51 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: sysvsem.c,v 1.51.2.3 2006/01/01 12:50:16 sniper Exp $ */ /* Latest update build anc tested on Linux 2.2.14 * @@ -58,7 +58,7 @@ union semun { /* {{{ sysvsem_functions[] */ -function_entry sysvsem_functions[] = { +zend_function_entry sysvsem_functions[] = { PHP_FE(sem_get, NULL) PHP_FE(sem_acquire, NULL) PHP_FE(sem_release, NULL) @@ -169,17 +169,11 @@ PHP_MINIT_FUNCTION(sysvsem) Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously */ PHP_FUNCTION(sem_get) { - long key, max_acquire, perm, auto_release = 1; + long key, max_acquire = 1, perm = 0666, auto_release = 1; int semid; struct sembuf sop[3]; int count; sysvsem_sem *sem_ptr; -#if HAVE_SEMUN - union semun un; -#endif - - max_acquire = 1; - perm = 0666; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|lll", &key, &max_acquire, &perm, &auto_release)) { RETURN_FALSE; @@ -231,11 +225,7 @@ PHP_FUNCTION(sem_get) } /* Get the usage count. */ -#if HAVE_SEMUN - count = semctl(semid, SYSVSEM_USAGE, GETVAL, un); -#else count = semctl(semid, SYSVSEM_USAGE, GETVAL, NULL); -#endif if (count == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed for key 0x%lx: %s", key, strerror(errno)); } diff --git a/ext/sysvshm/php_sysvshm.h b/ext/sysvshm/php_sysvshm.h index 19e880f2d..5e6757636 100644 --- a/ext/sysvshm/php_sysvshm.h +++ b/ext/sysvshm/php_sysvshm.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvshm.h,v 1.17 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: php_sysvshm.h,v 1.17.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_SYSVSHM_H #define PHP_SYSVSHM_H diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 47ccda141..1581b7640 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvshm.c,v 1.70 2005/08/03 14:08:18 sniper Exp $ */ +/* $Id: sysvshm.c,v 1.70.2.2 2006/01/01 12:50:16 sniper Exp $ */ /* This has been built and tested on Linux 2.2.14 * @@ -40,7 +40,7 @@ /* {{{ sysvshm_functions[] */ -function_entry sysvshm_functions[] = { +zend_function_entry sysvshm_functions[] = { PHP_FE(shm_attach, NULL) PHP_FE(shm_remove, NULL) PHP_FE(shm_detach, NULL) diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index 3ec290f3a..6e3728984 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tidy.h,v 1.26 2005/08/03 14:08:19 sniper Exp $ */ +/* $Id: php_tidy.h,v 1.26.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index d7f761937..1545688a2 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.66.2.3 2005/11/14 22:03:02 tony2001 Exp $ */ +/* $Id: tidy.c,v 1.66.2.5 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -237,7 +237,7 @@ STD_PHP_INI_ENTRY("tidy.default_config", "", PHP_INI_SYSTEM, OnUpdateString, d PHP_INI_ENTRY("tidy.clean_output", "0", PHP_INI_PERDIR, NULL) PHP_INI_END() -function_entry tidy_functions[] = { +zend_function_entry tidy_functions[] = { PHP_FE(tidy_getopt, NULL) PHP_FE(tidy_parse_string, NULL) PHP_FE(tidy_parse_file, NULL) @@ -268,7 +268,7 @@ function_entry tidy_functions[] = { {NULL, NULL, NULL} }; -function_entry tidy_funcs_doc[] = { +zend_function_entry tidy_funcs_doc[] = { TIDY_METHOD_MAP(getOpt, tidy_getopt, NULL) TIDY_METHOD_MAP(cleanRepair, tidy_clean_repair, NULL) TIDY_DOC_ME(parseFile, NULL) @@ -293,7 +293,7 @@ function_entry tidy_funcs_doc[] = { {NULL, NULL, NULL} }; -function_entry tidy_funcs_node[] = { +zend_function_entry tidy_funcs_node[] = { TIDY_NODE_ME(__construct, NULL) TIDY_NODE_ME(hasChildren, NULL) TIDY_NODE_ME(hasSiblings, NULL) @@ -306,7 +306,7 @@ function_entry tidy_funcs_node[] = { {NULL, NULL, NULL} }; -function_entry tidy_funcs_exception[] = { +zend_function_entry tidy_funcs_exception[] = { {NULL, NULL, NULL} }; @@ -983,7 +983,7 @@ 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,v 1.66.2.3 2005/11/14 22:03:02 tony2001 Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.5 2006/01/01 12:50:16 sniper Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); diff --git a/ext/tokenizer/php_tokenizer.h b/ext/tokenizer/php_tokenizer.h index 4f069c3e2..3964c91b9 100644 --- a/ext/tokenizer/php_tokenizer.h +++ b/ext/tokenizer/php_tokenizer.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tokenizer.h,v 1.9 2005/08/03 14:08:19 sniper Exp $ */ +/* $Id: php_tokenizer.h,v 1.9.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_TOKENIZER_H #define PHP_TOKENIZER_H diff --git a/ext/tokenizer/tests/001.phpt b/ext/tokenizer/tests/001.phpt new file mode 100644 index 000000000..36ed2696f --- /dev/null +++ b/ext/tokenizer/tests/001.phpt @@ -0,0 +1,263 @@ +--TEST-- +token_name() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +T_INCLUDE +T_INCLUDE_ONCE +T_EVAL +T_REQUIRE +T_REQUIRE_ONCE +T_LOGICAL_OR +T_LOGICAL_XOR +T_LOGICAL_AND +T_PRINT +T_PLUS_EQUAL +T_MINUS_EQUAL +T_MUL_EQUAL +T_DIV_EQUAL +T_CONCAT_EQUAL +T_MOD_EQUAL +T_AND_EQUAL +T_OR_EQUAL +T_XOR_EQUAL +T_SL_EQUAL +T_SR_EQUAL +T_BOOLEAN_OR +T_BOOLEAN_AND +T_IS_EQUAL +T_IS_NOT_EQUAL +T_IS_IDENTICAL +T_IS_NOT_IDENTICAL +T_IS_SMALLER_OR_EQUAL +T_IS_GREATER_OR_EQUAL +T_SL +T_SR +T_INC +T_DEC +T_INT_CAST +T_DOUBLE_CAST +T_STRING_CAST +T_ARRAY_CAST +T_OBJECT_CAST +T_BOOL_CAST +T_UNSET_CAST +T_NEW +T_EXIT +T_IF +T_ELSEIF +T_ELSE +T_ENDIF +T_LNUMBER +T_DNUMBER +T_STRING +T_STRING_VARNAME +T_VARIABLE +T_NUM_STRING +T_INLINE_HTML +T_CHARACTER +T_BAD_CHARACTER +T_ENCAPSED_AND_WHITESPACE +T_CONSTANT_ENCAPSED_STRING +T_ECHO +T_DO +T_WHILE +T_ENDWHILE +T_FOR +T_ENDFOR +T_FOREACH +T_ENDFOREACH +T_DECLARE +T_ENDDECLARE +T_AS +T_SWITCH +T_ENDSWITCH +T_CASE +T_DEFAULT +T_BREAK +T_CONTINUE +T_FUNCTION +T_CONST +T_RETURN +T_USE +T_GLOBAL +T_STATIC +T_VAR +T_UNSET +T_ISSET +T_EMPTY +T_CLASS +T_EXTENDS +T_INTERFACE +T_IMPLEMENTS +T_OBJECT_OPERATOR +T_DOUBLE_ARROW +T_LIST +T_ARRAY +T_CLASS_C +T_FUNC_C +T_METHOD_C +T_LINE +T_FILE +T_COMMENT +T_DOC_COMMENT +T_OPEN_TAG +T_OPEN_TAG_WITH_ECHO +T_CLOSE_TAG +T_WHITESPACE +T_START_HEREDOC +T_END_HEREDOC +T_DOLLAR_OPEN_CURLY_BRACES +T_CURLY_OPEN +T_DOUBLE_COLON +T_DOUBLE_COLON +T_ABSTRACT +T_CATCH +T_FINAL +T_INSTANCEOF +T_PRIVATE +T_PROTECTED +T_PUBLIC +T_THROW +T_TRY +T_CLONE +T_HALT_COMPILER +UNKNOWN +UNKNOWN + +Warning: token_name() expects parameter 1 to be long, string given in %s on line %d + + +Warning: token_name() expects parameter 1 to be long, array given in %s on line %d + +Done diff --git a/ext/tokenizer/tests/002.phpt b/ext/tokenizer/tests/002.phpt new file mode 100644 index 000000000..c9a822b74 --- /dev/null +++ b/ext/tokenizer/tests/002.phpt @@ -0,0 +1,788 @@ +--TEST-- +token_get_all() +--SKIPIF-- + +--INI-- +short_open_tag=1 +--FILE-- +', + '', + '', + /* feel free to add more yourself */ + 'wrong syntax here' +); + +foreach ($strings as $s) { + var_dump(token_get_all($s)); +} + +echo "Done\n"; +?> +--EXPECT-- +array(49) { + [0]=> + array(2) { + [0]=> + int(367) + [1]=> + string(2) " + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [2]=> + array(2) { + [0]=> + int(316) + [1]=> + string(4) "echo" + } + [3]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [4]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "1" + } + [5]=> + string(1) ";" + [6]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [7]=> + array(2) { + [0]=> + int(301) + [1]=> + string(2) "if" + } + [8]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [9]=> + string(1) "(" + [10]=> + array(2) { + [0]=> + int(349) + [1]=> + string(5) "isset" + } + [11]=> + string(1) "(" + [12]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [13]=> + string(1) ")" + [14]=> + string(1) ")" + [15]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [16]=> + array(2) { + [0]=> + int(266) + [1]=> + string(5) "print" + } + [17]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [18]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [19]=> + string(1) "+" + [20]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "1" + } + [21]=> + string(1) ";" + [22]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [23]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [24]=> + array(2) { + [0]=> + int(297) + [1]=> + string(2) "++" + } + [25]=> + string(1) ";" + [26]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [27]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [28]=> + array(2) { + [0]=> + int(296) + [1]=> + string(2) "--" + } + [29]=> + string(1) ";" + [30]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [31]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [32]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [33]=> + array(2) { + [0]=> + int(283) + [1]=> + string(2) "==" + } + [34]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [35]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [36]=> + string(1) ";" + [37]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [38]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [39]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [40]=> + array(2) { + [0]=> + int(281) + [1]=> + string(3) "===" + } + [41]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [42]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [43]=> + string(1) ";" + [44]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [45]=> + array(2) { + [0]=> + int(304) + [1]=> + string(5) "endif" + } + [46]=> + string(1) ";" + [47]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [48]=> + array(2) { + [0]=> + int(369) + [1]=> + string(2) "?>" + } +} +array(37) { + [0]=> + array(2) { + [0]=> + int(367) + [1]=> + string(6) " + array(2) { + [0]=> + int(327) + [1]=> + string(6) "switch" + } + [2]=> + string(1) "(" + [3]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [4]=> + string(1) ")" + [5]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [6]=> + string(1) "{" + [7]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [8]=> + array(2) { + [0]=> + int(329) + [1]=> + string(4) "case" + } + [9]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [10]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "1" + } + [11]=> + string(1) ":" + [12]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [13]=> + array(2) { + [0]=> + int(331) + [1]=> + string(5) "break" + } + [14]=> + string(1) ";" + [15]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [16]=> + array(2) { + [0]=> + int(330) + [1]=> + string(7) "default" + } + [17]=> + string(1) ":" + [18]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [19]=> + array(2) { + [0]=> + int(331) + [1]=> + string(5) "break" + } + [20]=> + string(1) ";" + [21]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [22]=> + string(1) "}" + [23]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [24]=> + array(2) { + [0]=> + int(318) + [1]=> + string(5) "while" + } + [25]=> + string(1) "(" + [26]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [27]=> + string(1) ")" + [28]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [29]=> + string(1) "{" + [30]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [31]=> + array(2) { + [0]=> + int(300) + [1]=> + string(4) "exit" + } + [32]=> + string(1) ";" + [33]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [34]=> + string(1) "}" + [35]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [36]=> + array(2) { + [0]=> + int(369) + [1]=> + string(2) "?>" + } +} +array(48) { + [0]=> + array(2) { + [0]=> + int(367) + [1]=> + string(2) " + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [2]=> + array(2) { + [0]=> + int(365) + [1]=> + string(13) "/* comment */" + } + [3]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [4]=> + array(2) { + [0]=> + int(301) + [1]=> + string(2) "if" + } + [5]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [6]=> + string(1) "(" + [7]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "1" + } + [8]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [9]=> + array(2) { + [0]=> + int(278) + [1]=> + string(2) "||" + } + [10]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [11]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [12]=> + string(1) ")" + [13]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [14]=> + string(1) "{" + [15]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [16]=> + string(1) "}" + [17]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [18]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$a" + } + [19]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [20]=> + string(1) "=" + [21]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [22]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [23]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [24]=> + string(1) "|" + [25]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [26]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "1" + } + [27]=> + string(1) ";" + [28]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [29]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$b" + } + [30]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [31]=> + string(1) "=" + [32]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [33]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "3" + } + [34]=> + string(1) "^" + [35]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [36]=> + string(1) ";" + [37]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [38]=> + array(2) { + [0]=> + int(309) + [1]=> + string(2) "$c" + } + [39]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [40]=> + string(1) "=" + [41]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [42]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "4" + } + [43]=> + string(1) "&" + [44]=> + array(2) { + [0]=> + int(305) + [1]=> + string(1) "2" + } + [45]=> + string(1) ";" + [46]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " " + } + [47]=> + array(2) { + [0]=> + int(369) + [1]=> + string(2) "?>" + } +} +array(1) { + [0]=> + array(2) { + [0]=> + int(311) + [1]=> + string(17) "wrong syntax here" + } +} +Done diff --git a/ext/tokenizer/tests/003.phpt b/ext/tokenizer/tests/003.phpt new file mode 100644 index 000000000..802728b97 --- /dev/null +++ b/ext/tokenizer/tests/003.phpt @@ -0,0 +1,42 @@ +--TEST-- +token_get_all() and wrong parameters +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d +NULL + +Warning: token_get_all() expects parameter 1 to be string, object given in %s on line %d +NULL +array(0) { +} +array(1) { + [0]=> + array(2) { + [0]=> + int(311) + [1]=> + string(1) "0" + } +} +array(1) { + [0]=> + array(2) { + [0]=> + int(311) + [1]=> + string(2) "-1" + } +} +Done diff --git a/ext/tokenizer/tests/bug26463.phpt b/ext/tokenizer/tests/bug26463.phpt index 7480aa2f5..8739c2a2b 100644 --- a/ext/tokenizer/tests/bug26463.phpt +++ b/ext/tokenizer/tests/bug26463.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #26463 (token_get_all() does not correctly handle semicolons after T_END_HEREDOC) +--SKIPIF-- + --FILE-- --EXPECTF-- -array(17) { +array(19) { [0]=> array(2) { [0]=> - int(%d) + int(367) [1]=> string(6) " array(2) { [0]=> - int(%d) + int(309) [1]=> string(2) "$x" } @@ -35,7 +37,7 @@ array(17) { [3]=> array(2) { [0]=> - int(%d) + int(371) [1]=> string(6) "<<
array(2) { [0]=> - int(%d) + int(307) [1]=> string(13) "jhdsjkfhjdsh " @@ -51,67 +53,83 @@ array(17) { [5]=> array(2) { [0]=> - int(%d) + int(372) [1]=> string(2) "DD" } [6]=> - string(1) "." + array(2) { + [0]=> + int(370) + [1]=> + string(1) " +" + } [7]=> + string(1) "." + [8]=> array(2) { [0]=> - int(%d) + int(315) [1]=> string(2) """" } - [8]=> - string(1) ";" [9]=> + string(1) ";" + [10]=> array(2) { [0]=> - int(%d) + int(370) [1]=> string(1) " " } - [10]=> + [11]=> array(2) { [0]=> - int(%d) + int(309) [1]=> string(2) "$a" } - [11]=> - string(1) "=" [12]=> + string(1) "=" + [13]=> array(2) { [0]=> - int(%d) + int(371) [1]=> string(8) "<< + [14]=> array(2) { [0]=> - int(%d) + int(307) [1]=> string(13) "jhdsjkfhjdsh " } - [14]=> + [15]=> array(2) { [0]=> - int(%d) + int(372) [1]=> string(4) "DDDD" } - [15]=> - string(1) ";" [16]=> + string(1) ";" + [17]=> + array(2) { + [0]=> + int(370) + [1]=> + string(1) " +" + } + [18]=> array(2) { [0]=> - int(%d) + int(369) [1]=> string(2) "?>" } diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index e05bef24a..67b8c1a52 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tokenizer.c,v 1.31.2.3 2005/11/27 06:41:31 iliaa Exp $ */ +/* $Id: tokenizer.c,v 1.31.2.5 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -103,7 +103,7 @@ ZEND_DECLARE_MODULE_GLOBALS(tokenizer) * * Every user visible function must have an entry in tokenizer_functions[]. */ -function_entry tokenizer_functions[] = { +zend_function_entry tokenizer_functions[] = { PHP_FE(token_get_all, NULL) PHP_FE(token_name, NULL) {NULL, NULL, NULL} /* Must be the last line in tokenizer_functions[] */ diff --git a/ext/wddx/config.m4 b/ext/wddx/config.m4 index 0c5228b0a..2d0e4eff2 100644 --- a/ext/wddx/config.m4 +++ b/ext/wddx/config.m4 @@ -1,12 +1,12 @@ dnl -dnl $Id: config.m4,v 1.11 2005/05/29 23:16:45 sniper Exp $ +dnl $Id: config.m4,v 1.11.2.1 2005/12/21 14:22:26 sniper Exp $ dnl PHP_ARG_ENABLE(wddx,whether to enable WDDX support, [ --enable-wddx Enable WDDX support]) if test "$PHP_WDDX" != "no"; then - if test "$ext_shared" != "yes" && test "$enable_xml" = "no"; then + if test "$ext_shared" != "yes" && (test "$enable_xml" = "no" || test "${enable_xml+set}" != "set"); then AC_MSG_WARN(Activating XML) enable_xml=yes fi diff --git a/ext/wddx/php_wddx.h b/ext/wddx/php_wddx.h index c774654fa..e05384023 100644 --- a/ext/wddx/php_wddx.h +++ b/ext/wddx/php_wddx.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_wddx.h,v 1.18 2005/08/03 14:08:20 sniper Exp $ */ +/* $Id: php_wddx.h,v 1.18.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_WDDX_H #define PHP_WDDX_H diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h index 3a5ebda2f..496b3a77a 100644 --- a/ext/wddx/php_wddx_api.h +++ b/ext/wddx/php_wddx_api.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_wddx_api.h,v 1.23.2.2 2005/10/06 18:48:19 rrichards Exp $ */ +/* $Id: php_wddx_api.h,v 1.23.2.3 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_WDDX_API_H #define PHP_WDDX_API_H diff --git a/ext/wddx/tests/001.phpt b/ext/wddx/tests/001.phpt index 3aae14853..ffca63cd9 100644 --- a/ext/wddx/tests/001.phpt +++ b/ext/wddx/tests/001.phpt @@ -1,5 +1,7 @@ --TEST-- wddx deserialization test +--SKIPIF-- + --FILE-- --FILE-- --FILE-- +--FILE-- + +
+Content Configuration File +
+ + + + + + + + + +10 + + +4 + + + + + + +desc + + + + + + + + + + + + + + +WDX; + +var_dump(wddx_deserialize($wddx)); +?> +--EXPECT-- +array(1) { + ["content_queries"]=> + array(1) { + ["content_113300831086270200"]=> + array(1) { + ["113301888545229100"]=> + array(3) { + ["max"]=> + int(10) + ["cache"]=> + int(4) + ["order"]=> + array(1) { + ["content_113300831086270200"]=> + array(1) { + ["CMS_BUILD"]=> + string(4) "desc" + } + } + } + } + } +} diff --git a/ext/wddx/tests/bug35410_64bit.phpt b/ext/wddx/tests/bug35410_64bit.phpt new file mode 100755 index 000000000..15377b175 --- /dev/null +++ b/ext/wddx/tests/bug35410_64bit.phpt @@ -0,0 +1,76 @@ +--TEST-- +#35410 (wddx_deserialize() doesn't handle large ints as keys properly) +--SKIPIF-- + +--FILE-- + +
+Content Configuration File +
+ + + + + + + + + +10 + + +4 + + + + + + +desc + + + + + + + + + + + + + + +WDX; + +var_dump(wddx_deserialize($wddx)); +?> +--EXPECT-- +array(1) { + ["content_queries"]=> + array(1) { + ["content_113300831086270200"]=> + array(1) { + [113301888545229100]=> + array(3) { + ["max"]=> + int(10) + ["cache"]=> + int(4) + ["order"]=> + array(1) { + ["content_113300831086270200"]=> + array(1) { + ["CMS_BUILD"]=> + string(4) "desc" + } + } + } + } + } +} diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index e801d60a6..d274f8519 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.119.2.5 2005/10/06 18:48:19 rrichards Exp $ */ +/* $Id: wddx.c,v 1.119.2.8 2006/01/01 12:50:16 sniper Exp $ */ #include "php.h" @@ -99,7 +99,7 @@ static void php_wddx_process_data(void *user_data, const XML_Char *s, int len); /* {{{ wddx_functions[] */ -function_entry wddx_functions[] = { +zend_function_entry wddx_functions[] = { PHP_FE(wddx_serialize_value, NULL) PHP_FE(wddx_serialize_vars, NULL) PHP_FE(wddx_packet_start, NULL) @@ -1005,11 +1005,15 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) switch (is_numeric_string(ent1->varname, strlen(ent1->varname), &l, &d, 0)) { case IS_DOUBLE: + if (d > INT_MAX) { + goto bigint; + } l = (long) d; case IS_LONG: zend_hash_index_update(target_hash, l, &ent1->data, sizeof(zval *), NULL); break; default: +bigint: zend_hash_update(target_hash,ent1->varname, strlen(ent1->varname)+1, &ent1->data, sizeof(zval *), NULL); } } diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 43e116b86..cfa56e1b5 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -405,15 +405,12 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m efree(parser); return NULL; } - if (encoding != NULL) { - parser->parser->encoding = xmlStrdup(encoding); #if LIBXML_VERSION <= 20617 /* for older versions of libxml2, allow correct detection of * charset in documents with a BOM: */ - } else { - parser->parser->charset = XML_CHAR_ENCODING_NONE; + parser->parser->charset = XML_CHAR_ENCODING_NONE; #endif - } + parser->parser->replaceEntities = 1; parser->parser->wellFormed = 0; if (sep != NULL) { diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index 2afcd7dc9..e5fa565ab 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.54 2005/06/20 00:52:59 sniper Exp $ +dnl $Id: config.m4,v 1.54.2.1 2005/12/22 08:57:38 helly Exp $ dnl PHP_ARG_ENABLE(xml,whether to enable XML support, @@ -36,7 +36,7 @@ if test "$PHP_XML" != "no"; then dnl Check for expat only if --with-libexpat-dir is used. dnl if test "$PHP_LIBEXPAT_DIR" != "no"; then - for i in $PHP_XML $PHP_LIBEXPAT_DIR; do + for i in $PHP_XML $PHP_LIBEXPAT_DIR /usr /usr/local; do if test -f "$i/$PHP_LIBDIR/libexpat.a" || test -f "$i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME"; then EXPAT_DIR=$i break diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h index 2c1ec1e87..3663e3fdf 100644 --- a/ext/xml/expat_compat.h +++ b/ext/xml/expat_compat.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: expat_compat.h,v 1.19 2005/08/03 14:08:21 sniper Exp $ */ +/* $Id: expat_compat.h,v 1.19.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_EXPAT_COMPAT_H #define PHP_EXPAT_COMPAT_H diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h index 773b8698b..cb6dc0735 100644 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h,v 1.28 2005/08/03 14:08:21 sniper Exp $ */ +/* $Id: php_xml.h,v 1.28.2.2 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_XML_H #define PHP_XML_H @@ -86,7 +86,7 @@ typedef struct { int level; int toffset; int curtag; - pval **ctag; + zval **ctag; char **ltags; int lastwasopen; int skipwhite; diff --git a/ext/xml/tests/bug25666.phpt b/ext/xml/tests/bug25666.phpt index ce67ea8ed..e162d5a2b 100644 --- a/ext/xml/tests/bug25666.phpt +++ b/ext/xml/tests/bug25666.phpt @@ -2,7 +2,8 @@ Bug #25666 (XML namespaces broken in libxml-based SAX interface) --SKIPIF-- --FILE-- --FILE-- "; diff --git a/ext/xml/tests/bug26614.phpt b/ext/xml/tests/bug26614.phpt index a8a91ae87..e1df1bbfd 100644 --- a/ext/xml/tests/bug26614.phpt +++ b/ext/xml/tests/bug26614.phpt @@ -1,7 +1,10 @@ --TEST-- Bug #26614 (CDATA sections skipped on line count) --SKIPIF-- - + --FILE-- + --FILE-- --FILE-- --FILE-- --FILE-- string(42) "e38386e382b9e383883ae38386e382b9e3838833: " } -Encoding: EUC-JP -XML Prologue: present -Chunk size: all data at once -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} -Encoding: EUC-JP -XML Prologue: present -Chunk size: 1 byte(s) -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} -Encoding: Shift_JIS -XML Prologue: present -Chunk size: all data at once -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} -Encoding: Shift_JIS -XML Prologue: present -Chunk size: 1 byte(s) -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} -Encoding: GB2312 -XML Prologue: present -Chunk size: all data at once -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} -Encoding: GB2312 -XML Prologue: present -Chunk size: 1 byte(s) -BOM: not prepended -array(3) { - [0]=> - string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" - [1]=> - string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" - [2]=> - string(42) "e38386e382b9e383883ae38386e382b9e3838833: " -} diff --git a/ext/xml/tests/bug32001b.phpt b/ext/xml/tests/bug32001b.phpt new file mode 100755 index 000000000..f4aea08e5 --- /dev/null +++ b/ext/xml/tests/bug32001b.phpt @@ -0,0 +1,184 @@ +--TEST-- +Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using EUC-JP, Shift_JIS, GB2312 +--SKIPIF-- + +--FILE-- +encoding = $enc; + $this->chunk_size = $chunk_size; + $this->bom = $bom; + $this->prologue = !$omit_prologue; + $this->tags = array(); + } + + function start_element($parser, $name, $attrs) { + $attrs = array_map('bin2hex', $attrs); + $this->tags[] = bin2hex($name).": ".implode(', ', $attrs); + } + + function end_element($parser, $name) { + } + + function run() { + $data = ''; + + if ($this->prologue) { + $canonical_name = preg_replace('/BE|LE/i', '', $this->encoding); + $data .= "\n"; + } + + $data .= << + <テスト:テスト2 テスト="テスト"> + <テスト:テスト3> + test! + + + +HERE; + + $data = iconv("UTF-8", $this->encoding, $data); + + $parser = xml_parser_create(NULL); + xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); + xml_set_element_handler($parser, "start_element", "end_element"); + xml_set_object($parser, $this); + + if ($this->chunk_size == 0) { + $success = @xml_parse($parser, $data, true); + } else { + for ($offset = 0; $offset < strlen($data); + $offset += $this->chunk_size) { + $success = @xml_parse($parser, substr($data, $offset, $this->chunk_size), false); + if (!$success) { + break; + } + } + if ($success) { + $success = @xml_parse($parser, "", true); + } + } + + echo "Encoding: $this->encoding\n"; + echo "XML Prologue: ".($this->prologue ? 'present': 'not present'), "\n"; + echo "Chunk size: ".($this->chunk_size ? "$this->chunk_size byte(s)\n": "all data at once\n"); + echo "BOM: ".($this->bom ? 'prepended': 'not prepended'), "\n"; + + if ($success) { + var_dump($this->tags); + } else { + echo "[Error] ", xml_error_string(xml_get_error_code($parser)), "\n"; + } + } +} +$suite = array( + new testcase("EUC-JP" , 0), + new testcase("EUC-JP" , 1), + new testcase("Shift_JIS", 0), + new testcase("Shift_JIS", 1), + new testcase("GB2312", 0), + new testcase("GB2312", 1), +); + +if (XML_SAX_IMPL == 'libxml') { + $php = getenv('TEST_PHP_EXECUTABLE'); + preg_match("/^libxml2 Version.*\$/im", `$php -i`, $match); + echo $match[0], "\n"; +} else { + echo "libxml2 Version => NONE\n"; +} + +foreach ($suite as $testcase) { + $testcase->run(); +} + +// vim600: sts=4 sw=4 ts=4 encoding=UTF-8 +?> +--EXPECTF-- +libxml2 Version => %s +Encoding: EUC-JP +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: EUC-JP +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: Shift_JIS +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: Shift_JIS +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: GB2312 +XML Prologue: present +Chunk size: all data at once +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} +Encoding: GB2312 +XML Prologue: present +Chunk size: 1 byte(s) +BOM: not prepended +array(3) { + [0]=> + string(128) "e38386e382b9e383883ae38386e382b9e3838831: 687474703a2f2f7777772e6578616d706c652e636f6d2fe38386e382b9e383882f, e38386e382b9e38388" + [1]=> + string(60) "e38386e382b9e383883ae38386e382b9e3838832: e38386e382b9e38388" + [2]=> + string(42) "e38386e382b9e383883ae38386e382b9e3838833: " +} diff --git a/ext/xml/tests/bug35447.phpt b/ext/xml/tests/bug35447.phpt new file mode 100644 index 000000000..8cbb5e519 --- /dev/null +++ b/ext/xml/tests/bug35447.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #35447 (xml_parse_into_struct() chokes on the UTF-8 BOM) +--SKIPIF-- + +--FILE-- + + + +]> +A bient&244;t +END_OF_XML; + +$parser = xml_parser_create_ns('UTF-8'); +xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); +$result = xml_parse_into_struct($parser, $data, $vals, $index); +xml_parser_free($parser); +var_dump($vals); +?> +--EXPECT-- +array(1) { + [0]=> + array(5) { + ["tag"]=> + string(8) "resource" + ["type"]=> + string(8) "complete" + ["level"]=> + int(1) + ["attributes"]=> + array(2) { + ["key"]=> + string(7) "rSeeYou" + ["type"]=> + string(7) "literal" + } + ["value"]=> + string(13) "A bient&244;t" + } +} diff --git a/ext/xml/tests/xml001.phpt b/ext/xml/tests/xml001.phpt index 6ee908e46..62d597c5f 100644 --- a/ext/xml/tests/xml001.phpt +++ b/ext/xml/tests/xml001.phpt @@ -35,42 +35,42 @@ xml_parser_free($xml_parser); function startElement($parser, $name, $attribs) { - print "\{$name"; + print '{'.$name; if (sizeof($attribs)) { while (list($k, $v) = each($attribs)) { print " $k=\"$v\""; } } - print "}"; + print '}'; } function endElement($parser, $name) { - print "\{/$name}"; + print '{/'.$name.'}'; } function characterData($parser, $data) { - print "\{CDATA[$data]}"; + print '{CDATA['.$data.']}'; } function PIHandler($parser, $target, $data) { - print "\{PI[$target,$data]}"; + print '{PI['.$target.','.$data.']}'; } function defaultHandler($parser, $data) { if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") { - print "\{ENTREF[$data]}"; + print '{ENTREF['.$data.']}'; } else { - print "\{?[$data]}"; + print '{?['.$data.']}'; } } function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId, $publicId) { - print "\{EXTENTREF[$openEntityNames,$base,$systemId,$publicId]}\n"; + print '{EXTENTREF['.$openEntityNames.','.$base.','.$systemId.','.$publicId."]}\n"; return true; } diff --git a/ext/xml/tests/xml002.phpt b/ext/xml/tests/xml002.phpt index 978500292..8ae8dfbe6 100644 --- a/ext/xml/tests/xml002.phpt +++ b/ext/xml/tests/xml002.phpt @@ -15,37 +15,37 @@ class myclass { function startElement($parser, $name, $attribs) { - print "\{$name"; + print '{'.$name; if (sizeof($attribs)) { while (list($k, $v) = each($attribs)) { print " $k=\"$v\""; } } - print "}"; + print '}'; } function endElement($parser, $name) { - print "\{/$name}"; + print '{/'.$name.'}'; } function characterData($parser, $data) { - print "\{CDATA[$data]}"; + print '{CDATA['.$data.']}'; } function PIHandler($parser, $target, $data) { - print "\{PI[$target,$data]}"; + print '{PI['.$target.','.$data.']}'; } function defaultHandler($parser, $data) { if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") { - print "\{ENTREF[$data]}"; + print '{ENTREF['.$data.']}'; } else { - print "\{?[$data]}"; + print '{?['.$data.']}'; } } function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId, $publicId) { - print "\{EXTENTREF[$openEntityNames,$base,$systemId,$publicId]}\n"; + print '{EXTENTREF['.$openEntityNames.','.$base.','.$systemId.','.$publicId."]}\n"; return true; } } diff --git a/ext/xml/tests/xml003.phpt b/ext/xml/tests/xml003.phpt index fa0984e89..311c81acf 100644 --- a/ext/xml/tests/xml003.phpt +++ b/ext/xml/tests/xml003.phpt @@ -15,37 +15,37 @@ class myclass { function startElement($parser, $name, $attribs) { - print "\{$name"; + print '{'.$name; if (sizeof($attribs)) { while (list($k, $v) = each($attribs)) { print " $k=\"$v\""; } } - print "}"; + print '}'; } function endElement($parser, $name) { - print "\{/$name}"; + print '{/'.$name.'}'; } function characterData($parser, $data) { - print "\{CDATA[$data]}"; + print '{CDATA['.$data.']}'; } function PIHandler($parser, $target, $data) { - print "\{PI[$target,$data]}"; + print '{PI['.$target.','.$data.']}'; } function defaultHandler($parser, $data) { if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") { - print "\{ENTREF[$data]}"; + print '{ENTREF['.$data.']}'; } else { - print "\{?[$data]}"; + print '{?['.$data.']}'; } } function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId, $publicId) { - print "\{EXTENTREF[$openEntityNames,$base,$systemId,$publicId]}\n"; + print '{EXTENTREF['.$openEntityNames.','.$base.','.$systemId.','.$publicId."]}\n"; return true; } } diff --git a/ext/xml/tests/xml009.phpt b/ext/xml/tests/xml009.phpt index 3b64e7b8b..84b89bb48 100644 --- a/ext/xml/tests/xml009.phpt +++ b/ext/xml/tests/xml009.phpt @@ -2,6 +2,7 @@ XML parser test, default namespaces --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml010.phpt b/ext/xml/tests/xml010.phpt index 125e9c7b0..e96844212 100644 --- a/ext/xml/tests/xml010.phpt +++ b/ext/xml/tests/xml010.phpt @@ -2,6 +2,7 @@ XML parser test, attributes --SKIPIF-- --FILE-- diff --git a/ext/xml/xml.c b/ext/xml/xml.c index d40b2810b..e96daf640 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c,v 1.157.2.1 2005/10/12 03:21:05 rrichards Exp $ */ +/* $Id: xml.c,v 1.157.2.3 2006/01/01 12:50:16 sniper Exp $ */ #define IS_EXT_MODULE @@ -111,7 +111,7 @@ static ZEND_ARG_PASS_INFO(1) ZEND_END_ARG_INFO(); -function_entry xml_functions[] = { +zend_function_entry xml_functions[] = { PHP_FE(xml_parser_create, NULL) PHP_FE(xml_parser_create_ns, NULL) PHP_FE(xml_set_object, second_arg_force_ref) diff --git a/ext/xmlreader/config.m4 b/ext/xmlreader/config.m4 index 64e617bf9..3c3e8b76e 100644 --- a/ext/xmlreader/config.m4 +++ b/ext/xmlreader/config.m4 @@ -1,9 +1,9 @@ dnl -dnl $Id: config.m4,v 1.3 2005/05/29 23:16:45 sniper Exp $ +dnl $Id: config.m4,v 1.3.2.2 2005/12/17 15:40:37 helly Exp $ dnl -PHP_ARG_WITH(xmlreader, for XMLReader support, -[ --with-xmlreader Include XMLReader support]) +PHP_ARG_ENABLE(xmlreader, whether to enable XMLReader support, +[ --disable-xmlreader Disable XMLReader support], yes) if test -z "$PHP_LIBXML_DIR"; then PHP_ARG_WITH(libxml-dir, libxml2 install dir, @@ -19,6 +19,7 @@ if test "$PHP_XMLREADER" != "no"; then PHP_SETUP_LIBXML(XMLREADER_SHARED_LIBADD, [ AC_DEFINE(HAVE_XMLREADER,1,[ ]) PHP_NEW_EXTENSION(xmlreader, php_xmlreader.c, $ext_shared) + PHP_ADD_EXTENSION_DEP(xmlreader, dom, true) PHP_SUBST(XMLREADER_SHARED_LIBADD) ], [ AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.]) diff --git a/ext/xmlreader/config.w32 b/ext/xmlreader/config.w32 index e33536643..a84725d5c 100644 --- a/ext/xmlreader/config.w32 +++ b/ext/xmlreader/config.w32 @@ -1,7 +1,7 @@ -// $Id: config.w32,v 1.2 2004/07/29 20:42:49 edink Exp $ +// $Id: config.w32,v 1.2.2.1 2005/12/01 08:54:22 sniper Exp $ // vim:ft=javascript -ARG_WITH("xmlreader", "XMLReader support", "no"); +ARG_ENABLE("xmlreader", "XMLReader support", "yes"); if (PHP_XMLREADER == "yes" && PHP_LIBXML == "yes") { EXTENSION("xmlreader", "php_xmlreader.c"); diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 23bf828eb..d70fb9d93 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlreader.c,v 1.13.2.3 2005/11/15 14:28:40 dmitry Exp $ */ +/* $Id: php_xmlreader.c,v 1.13.2.8 2006/01/01 12:50:16 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -53,7 +53,7 @@ typedef struct _xmlreader_prop_handler { #define XMLREADER_LOAD_STRING 0 #define XMLREADER_LOAD_FILE 1 - +/* {{{ xmlreader_register_prop_handler */ static void xmlreader_register_prop_handler(HashTable *prop_handler, char *name, xmlreader_read_int_t read_int_func, xmlreader_read_char_t read_char_func, int rettype TSRMLS_DC) { xmlreader_prop_handler hnd; @@ -63,7 +63,9 @@ static void xmlreader_register_prop_handler(HashTable *prop_handler, char *name, hnd.type = rettype; zend_hash_add(prop_handler, name, strlen(name)+1, &hnd, sizeof(xmlreader_prop_handler), NULL); } +/* }}} */ +/* {{{ xmlreader_property_reader */ static int xmlreader_property_reader(xmlreader_object *obj, xmlreader_prop_handler *hnd, zval **retval TSRMLS_DC) { char *retchar = NULL; @@ -106,6 +108,7 @@ static int xmlreader_property_reader(xmlreader_object *obj, xmlreader_prop_handl return SUCCESS; } +/* }}} */ /* {{{ xmlreader_read_property */ zval *xmlreader_read_property(zval *object, zval *member, int type TSRMLS_DC) @@ -185,6 +188,7 @@ void xmlreader_write_property(zval *object, zval *member, zval *value TSRMLS_DC) } /* }}} */ +/* {{{ _xmlreader_get_valid_file_path */ /* _xmlreader_get_valid_file_path and _xmlreader_get_relaxNG should be made a common function in libxml extension as code is common to a few xml extensions */ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) { @@ -231,8 +235,10 @@ char *_xmlreader_get_valid_file_path(char *source, char *resolved_path, int reso return file_dest; } +/* }}} */ #ifdef LIBXML_SCHEMAS_ENABLED +/* {{{ _xmlreader_get_relaxNG */ static xmlRelaxNGPtr _xmlreader_get_relaxNG(char *source, int source_len, int type, xmlRelaxNGValidityErrorFunc error_func, xmlRelaxNGValidityWarningFunc warn_func TSRMLS_DC) @@ -274,6 +280,7 @@ static xmlRelaxNGPtr _xmlreader_get_relaxNG(char *source, int source_len, int ty return sptr; } +/* }}} */ #endif static zend_module_dep xmlreader_deps[] = { @@ -309,6 +316,7 @@ void xmlreader_objects_clone(void *object, void **object_clone TSRMLS_DC) } /* }}} */ +/* {{{ xmlreader_free_resources */ static void xmlreader_free_resources(xmlreader_object *intern) { if (intern) { if (intern->input) { @@ -328,6 +336,7 @@ static void xmlreader_free_resources(xmlreader_object *intern) { #endif } } +/* }}} */ /* {{{ xmlreader_objects_free_storage */ void xmlreader_objects_free_storage(void *object TSRMLS_DC) @@ -368,6 +377,7 @@ zend_object_value xmlreader_objects_new(zend_class_entry *class_type TSRMLS_DC) } /* }}} */ +/* {{{ php_xmlreader_string_arg */ static void php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_one_char_t internal_function) { zval *id; int name_len = 0; @@ -398,7 +408,9 @@ static void php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_rea RETVAL_EMPTY_STRING(); } } +/* }}} */ +/* {{{ php_xmlreader_no_arg */ static void php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_int_t internal_function) { zval *id; int retval; @@ -416,6 +428,7 @@ static void php_xmlreader_no_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_in RETURN_FALSE; } +/* }}} */ /* This function not yet needed until some additional functions are implemented in libxml static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_read_char_t internal_function) { @@ -439,6 +452,7 @@ static void php_xmlreader_no_arg_string(INTERNAL_FUNCTION_PARAMETERS, xmlreader_ } */ +/* {{{ php_xmlreader_set_relaxng_schema */ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int type) { #ifdef LIBXML_SCHEMAS_ENABLED zval *id; @@ -452,7 +466,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t } if (source != NULL && !source_len) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Schema data source is requried"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Schema data source is required"); RETURN_FALSE; } @@ -490,8 +504,9 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t RETURN_FALSE; #endif } +/* }}} */ -/* {{{ proto boolean close() +/* {{{ proto boolean XMLReader::close() Closes xmlreader - current frees resources until xmlTextReaderClose is fixed in libxml */ PHP_METHOD(xmlreader, close) { @@ -507,8 +522,9 @@ PHP_METHOD(xmlreader, close) RETURN_TRUE; } +/* }}} */ -/* {{{ proto string getAttribute(string name) +/* {{{ proto string XMLReader::getAttribute(string name) Get value of an attribute from current element */ PHP_METHOD(xmlreader, getAttribute) { @@ -516,7 +532,7 @@ PHP_METHOD(xmlreader, getAttribute) } /* }}} */ -/* {{{ proto string getAttributeNo(int index) +/* {{{ proto string XMLReader::getAttributeNo(int index) Get value of an attribute at index from current element */ PHP_METHOD(xmlreader, getAttributeNo) { @@ -545,7 +561,7 @@ PHP_METHOD(xmlreader, getAttributeNo) } /* }}} */ -/* {{{ proto string getAttributeNs(string name, string namespaceURI) +/* {{{ proto string XMLReader::getAttributeNs(string name, string namespaceURI) Get value of a attribute via name and namespace from current element */ PHP_METHOD(xmlreader, getAttributeNs) { @@ -579,8 +595,8 @@ PHP_METHOD(xmlreader, getAttributeNs) } /* }}} */ -/* {{{ proto boolean getParserProperty(int property) -Indicates wether given property (one of the parser option constants) is set or not on parser */ +/* {{{ proto boolean XMLReader::getParserProperty(int property) +Indicates whether given property (one of the parser option constants) is set or not on parser */ PHP_METHOD(xmlreader, getParserProperty) { zval *id; @@ -606,7 +622,7 @@ PHP_METHOD(xmlreader, getParserProperty) } /* }}} */ -/* {{{ proto boolean isValid() +/* {{{ proto boolean XMLReader::isValid() Returns boolean indicating if parsed document is valid or not. Must set XMLREADER_LOADDTD or XMLREADER_VALIDATE parser option prior to the first call to read or this method will always return FALSE */ @@ -616,7 +632,7 @@ PHP_METHOD(xmlreader, isValid) } /* }}} */ -/* {{{ proto string lookupNamespace(string prefix) +/* {{{ proto string XMLReader::lookupNamespace(string prefix) Return namespaceURI for associated prefix on current node */ PHP_METHOD(xmlreader, lookupNamespace) { @@ -624,7 +640,7 @@ PHP_METHOD(xmlreader, lookupNamespace) } /* }}} */ -/* {{{ proto boolean moveToAttribute(string name) +/* {{{ proto boolean XMLReader::moveToAttribute(string name) Positions reader at specified attribute - Returns TRUE on success and FALSE on failure */ PHP_METHOD(xmlreader, moveToAttribute) { @@ -656,7 +672,7 @@ PHP_METHOD(xmlreader, moveToAttribute) } /* }}} */ -/* {{{ proto boolean moveToAttributeNo(int index) +/* {{{ proto boolean XMLReader::moveToAttributeNo(int index) Positions reader at attribute at spcecified index. Returns TRUE on success and FALSE on failure */ PHP_METHOD(xmlreader, moveToAttributeNo) @@ -683,7 +699,7 @@ PHP_METHOD(xmlreader, moveToAttributeNo) } /* }}} */ -/* {{{ proto boolean moveToAttributeNs(string name, string namespaceURI) +/* {{{ proto boolean XMLReader::moveToAttributeNs(string name, string namespaceURI) Positions reader at attribute spcified by name and namespaceURI. Returns TRUE on success and FALSE on failure */ PHP_METHOD(xmlreader, moveToAttributeNs) @@ -716,7 +732,7 @@ PHP_METHOD(xmlreader, moveToAttributeNs) } /* }}} */ -/* {{{ proto boolean moveToElement() +/* {{{ proto boolean XMLReader::moveToElement() Moves the position of the current instance to the node that contains the current Attribute node. */ PHP_METHOD(xmlreader, moveToElement) { @@ -724,7 +740,7 @@ PHP_METHOD(xmlreader, moveToElement) } /* }}} */ -/* {{{ proto boolean moveToFirstAttribute() +/* {{{ proto boolean XMLReader::moveToFirstAttribute() Moves the position of the current instance to the first attribute associated with the current node. */ PHP_METHOD(xmlreader, moveToFirstAttribute) { @@ -732,7 +748,7 @@ PHP_METHOD(xmlreader, moveToFirstAttribute) } /* }}} */ -/* {{{ proto boolean moveToNextAttribute() +/* {{{ proto boolean XMLReader::moveToNextAttribute() Moves the position of the current instance to the next attribute associated with the current node. */ PHP_METHOD(xmlreader, moveToNextAttribute) { @@ -740,7 +756,7 @@ PHP_METHOD(xmlreader, moveToNextAttribute) } /* }}} */ -/* {{{ proto boolean read() +/* {{{ proto boolean XMLReader::read() Moves the position of the current instance to the next node in the stream. */ PHP_METHOD(xmlreader, read) { @@ -765,7 +781,7 @@ PHP_METHOD(xmlreader, read) } /* }}} */ -/* {{{ proto boolean next([string localname]) +/* {{{ proto boolean XMLReader::next([string localname]) Moves the position of the current instance to the next node in the stream. */ PHP_METHOD(xmlreader, next) { @@ -807,7 +823,7 @@ PHP_METHOD(xmlreader, next) } /* }}} */ -/* {{{ proto boolean open(string URI) +/* {{{ proto boolean XMLReader::open(string URI) Sets the URI that the the XMLReader will parse. */ PHP_METHOD(xmlreader, open) { @@ -884,7 +900,7 @@ PHP_METHOD(xmlreader, resetState) } */ -/* {{{ proto boolean setParserProperty(int property, boolean value) +/* {{{ proto boolean XMLReader::setParserProperty(int property, boolean value) Sets parser property (one of the parser option constants). Properties must be set after open() or XML() and before the first read() is called */ PHP_METHOD(xmlreader, setParserProperty) @@ -913,7 +929,7 @@ PHP_METHOD(xmlreader, setParserProperty) } /* }}} */ -/* {{{ proto boolean setRelaxNGSchemaSource(string filename) +/* {{{ proto boolean XMLReader::setRelaxNGSchemaSource(string filename) Sets the string that the the XMLReader will parse. */ PHP_METHOD(xmlreader, setRelaxNGSchema) { @@ -921,7 +937,7 @@ PHP_METHOD(xmlreader, setRelaxNGSchema) } /* }}} */ -/* {{{ proto boolean setRelaxNGSchemaSource(string source) +/* {{{ proto boolean XMLReader::setRelaxNGSchemaSource(string source) Sets the string that the the XMLReader will parse. */ PHP_METHOD(xmlreader, setRelaxNGSchemaSource) { @@ -929,7 +945,7 @@ PHP_METHOD(xmlreader, setRelaxNGSchemaSource) } /* }}} */ -/* {{{ proto boolean XML(string source) +/* {{{ proto boolean XMLReader::XML(string source) Sets the string that the the XMLReader will parse. */ PHP_METHOD(xmlreader, XML) { @@ -1005,7 +1021,7 @@ PHP_METHOD(xmlreader, XML) } /* }}} */ -/* {{{ proto boolean expand() +/* {{{ proto boolean XMLReader::expand() Moves the position of the current instance to the next node in the stream. */ PHP_METHOD(xmlreader, expand) { diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h index 32c7d40e4..bf406e1b8 100644 --- a/ext/xmlreader/php_xmlreader.h +++ b/ext/xmlreader/php_xmlreader.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlreader.h,v 1.3.2.1 2005/10/13 21:20:11 rrichards Exp $ */ +/* $Id: php_xmlreader.h,v 1.3.2.2 2006/01/01 12:50:16 sniper Exp $ */ #ifndef PHP_XMLREADER_H #define PHP_XMLREADER_H diff --git a/ext/xmlreader/tests/001.phpt b/ext/xmlreader/tests/001.phpt new file mode 100644 index 000000000..cf3d312b9 --- /dev/null +++ b/ext/xmlreader/tests/001.phpt @@ -0,0 +1,29 @@ +--TEST-- +XMLReader: libxml2 XML Reader, string data +--SKIPIF-- + +--FILE-- + +'; + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +// Only go through +while ($reader->read()) { + echo $reader->name."\n"; +} +$xmlstring = ''; +$reader = new XMLReader(); +$reader->XML($xmlstring); +?> +===DONE=== +--EXPECTF-- +books +books + +Warning: XMLReader::XML(): Empty string supplied as input in %s on line %d +===DONE=== diff --git a/ext/xmlreader/tests/002.phpt b/ext/xmlreader/tests/002.phpt new file mode 100644 index 000000000..c9bf68ba1 --- /dev/null +++ b/ext/xmlreader/tests/002.phpt @@ -0,0 +1,41 @@ +--TEST-- +XMLReader: libxml2 XML Reader, file data +--SKIPIF-- + +--FILE-- + +'; +file_put_contents($filename, $xmlstring); + +$reader = new XMLReader(); +if ($reader->open('')) exit(); + +$reader = new XMLReader(); +if (!$reader->open($filename)) { + $reader->close(); + exit(); +} + +// Only go through +while ($reader->read()) { + echo $reader->name."\n"; +} +$reader->close(); +unlink($filename); +touch($filename); +$reader = new XMLReader(); +$reader->open($filename); +$reader->close(); +unlink($filename); + +?> +===DONE=== +--EXPECTF-- + +Warning: XMLReader::open(): Empty string supplied as input in %s on line %d +books +books +===DONE=== diff --git a/ext/xmlreader/tests/003.phpt b/ext/xmlreader/tests/003.phpt new file mode 100644 index 000000000..bddb58dea --- /dev/null +++ b/ext/xmlreader/tests/003.phpt @@ -0,0 +1,84 @@ +--TEST-- +XMLReader: libxml2 XML Reader, attributes test +--SKIPIF-- + +--FILE-- + +book1'; +file_put_contents($filename, $xmlstring); + +$reader = new XMLReader(); +if (!$reader->open($filename)) { + exit(); +} + +// Only go through +while ($reader->read()) { + if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + $attr = $reader->moveToFirstAttribute(); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + if ($reader->getAttribute($reader->name) == $reader->value) { + echo "1st attr (num) failed\n"; + } + + + $attr = $reader->moveToNextAttribute(); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + if ($reader->getAttribute($reader->name) == $reader->value) { + echo "2nd attr (idx) failed\n"; + } + + // Named attribute + $attr = $reader->moveToAttribute('num'); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + if ($reader->getAttribute('num') == $reader->value) { + echo "attr num failed\n"; + } + + $attr = $reader->moveToAttribute('idx'); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + if ($reader->getAttribute('idx') == $reader->value) { + echo "attr idx failed\n"; + } + + // Numeric positions of attributes + $attr = $reader->moveToAttributeNo(0); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + if ($reader->getAttributeNo(0) == $reader->value) { + echo "attr 0 failed\n"; + } + + $attr = $reader->moveToAttributeNo(1); + echo $reader->name . ": "; + echo $reader->value . "\n"; + + } + } +} +$reader->close(); +unlink($filename); +?> +===DONE=== +--EXPECT-- +num: 1 +idx: 2 +num: 1 +idx: 2 +num: 1 +idx: 2 +===DONE=== diff --git a/ext/xmlreader/tests/004.phpt b/ext/xmlreader/tests/004.phpt new file mode 100644 index 000000000..ff22cce8e --- /dev/null +++ b/ext/xmlreader/tests/004.phpt @@ -0,0 +1,44 @@ +--TEST-- +XMLReader: libxml2 XML Reader, attributes test +--SKIPIF-- + +--FILE-- + +book1'; +file_put_contents($filename, $xmlstring); + +$reader = new XMLReader(); +if (!$reader->open($filename)) { + exit(); +} + +while ($reader->read()) { + if ($reader->nodeType != XMLREADER::END_ELEMENT) { + echo $reader->name."\n"; + if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + $attr = $reader->moveToFirstAttribute(); + while ($attr) { + echo " Attribute Name: ".$reader->name."\n"; + echo " Attribute Value: ".$reader->value."\n"; + $attr = $reader->moveToNextAttribute(); + } + } + } +} +$reader->close(); +unlink($filename); +?> +===DONE=== +--EXPECT-- +books +book + Attribute Name: num + Attribute Value: 1 + Attribute Name: idx + Attribute Value: 2 +#text +===DONE=== diff --git a/ext/xmlreader/tests/005.phpt b/ext/xmlreader/tests/005.phpt new file mode 100644 index 000000000..ce2a5361d --- /dev/null +++ b/ext/xmlreader/tests/005.phpt @@ -0,0 +1,37 @@ +--TEST-- +XMLReader: libxml2 XML Reader, parser property set/get +--SKIPIF-- + +--FILE-- + +'; + +$reader = new XMLReader(); + +$reader->XML($xmlstring); + + +$a = $reader->setParserProperty(XMLReader::LOADDTD, false); +$b = $reader->getParserProperty(XMLReader::LOADDTD); + +if (!$a && !$b) { + echo "ok\n"; +} + +$a = $reader->setParserProperty(XMLReader::SUBST_ENTITIES, true); +$b = $reader->getParserProperty(XMLReader::SUBST_ENTITIES); + +if ($a && $b) { + echo "ok\n"; +} +// Only go through +while ($reader->read()); +$reader->close(); +?> +===DONE=== +--EXPECT-- +ok +===DONE=== diff --git a/ext/xmlreader/tests/006.phpt b/ext/xmlreader/tests/006.phpt new file mode 100644 index 000000000..d482d020b --- /dev/null +++ b/ext/xmlreader/tests/006.phpt @@ -0,0 +1,36 @@ +--TEST-- +XMLReader: libxml2 XML Reader, moveToElement +--SKIPIF-- + +--FILE-- + +'; + +$reader = new XMLReader(); + +$reader->XML($xmlstring); + +// 2 read to get on the 2nd node +$reader->read(); +$reader->read(); + +if ($reader->nodeType != XMLREADER::END_ELEMENT) { + if ($reader->nodeType == XMLREADER::ELEMENT && $reader->hasAttributes) { + $attr = $reader->moveToFirstAttribute(); + if ($reader->moveToElement()) { + if ($reader->name == 'book') { + echo "ok\n"; + } + } + } +} + +$reader->close(); +?> +===DONE=== +--EXPECT-- +ok +===DONE=== diff --git a/ext/xmlreader/tests/007.phpt b/ext/xmlreader/tests/007.phpt new file mode 100644 index 000000000..a94bc3859 --- /dev/null +++ b/ext/xmlreader/tests/007.phpt @@ -0,0 +1,57 @@ +--TEST-- +XMLReader: libxml2 XML Reader, setRelaxNGSchema +--SKIPIF-- + +--FILE-- +hello'; +$relaxngfile = dirname(__FILE__) . '/relaxNG.rng'; +$file = dirname(__FILE__) . '/__007.xml'; +file_put_contents($file, $xmlstring); + +$reader = new XMLReader(); +$reader->open($file); + +if ($reader->setRelaxNGSchema($relaxngfile)) { + while ($reader->read()); +} +if ($reader->isValid()) { + print "file relaxNG: ok\n"; +} else { + print "file relaxNG: failed\n"; +} +$reader->close(); +unlink($file); + + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +if ($reader->setRelaxNGSchema($relaxngfile)) { + while ($reader->read()); +} +if ($reader->isValid()) { + print "string relaxNG: ok\n"; +} else { + print "string relaxNG: failed\n"; +} + +$reader->close(); + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +if ($reader->setRelaxNGSchema('')) { + echo 'failed'; +} +$reader->close(); +?> +===DONE=== +--EXPECTF-- +file relaxNG: ok +string relaxNG: ok + +Warning: XMLReader::setRelaxNGSchema(): Schema data source is required in %s on line %d +===DONE=== diff --git a/ext/xmlreader/tests/008.phpt b/ext/xmlreader/tests/008.phpt new file mode 100644 index 000000000..8f3354726 --- /dev/null +++ b/ext/xmlreader/tests/008.phpt @@ -0,0 +1,71 @@ +--TEST-- +XMLReader: libxml2 XML Reader, DTD +--SKIPIF-- + +--FILE-- + + + + +Move Title 1 +Location 1 + + + +Move Title 2 + +Location 2 + + +'; + +$dtdfile = rawurlencode(dirname(__FILE__)) . '/dtdexample.dtd'; +$file = dirname(__FILE__) . '/__008.xml'; +file_put_contents($file, $xmlstring); + + +$reader = new XMLReader(); +$reader->open($file); +$reader->setParserProperty(XMLREADER::LOADDTD, TRUE); +$reader->setParserProperty(XMLREADER::VALIDATE, TRUE); +while($reader->read()); +if ($reader->isValid()) { + echo "file DTD: ok\n"; +} +$reader->close(); +unlink($file); + +$xmlstring = ' + + + +Move Title 1 +Location 1 + + + +Move Title 2 + +Location 2 + + +'; + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +$reader->setParserProperty(XMLREADER::LOADDTD, TRUE); +$reader->setParserProperty(XMLREADER::VALIDATE, TRUE); +while($reader->read()); +if ($reader->isValid()) { + echo "string DTD: ok\n"; +} +?> +===DONE=== +--EXPECTF-- +file DTD: ok +string DTD: ok +===DONE=== diff --git a/ext/xmlreader/tests/009.phpt b/ext/xmlreader/tests/009.phpt new file mode 100644 index 000000000..3e9957d3e --- /dev/null +++ b/ext/xmlreader/tests/009.phpt @@ -0,0 +1,28 @@ +--TEST-- +XMLReader: libxml2 XML Reader, next +--SKIPIF-- + +--FILE-- + +'; + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +// Only go through +$reader->read(); +$reader->read(); + +$reader->next(); +echo $reader->name; +echo " "; +echo $reader->getAttribute('num'); +echo "\n"; +?> +===DONE=== +--EXPECTF-- +book 2 +===DONE=== diff --git a/ext/xmlreader/tests/010.phpt b/ext/xmlreader/tests/010.phpt new file mode 100644 index 000000000..37d2a8ede --- /dev/null +++ b/ext/xmlreader/tests/010.phpt @@ -0,0 +1,27 @@ +--TEST-- +XMLReader: libxml2 XML Reader, next +--SKIPIF-- + +--FILE-- + +book1'; + +$reader = new XMLReader(); +$reader->XML($xmlstring); + +// Only go through +$reader->read(); +$reader->read(); + +$reader->next(); +echo $reader->name; +echo " "; +echo $reader->getAttributeNs('isbn', 'uri'); +echo "\n"; +?> +===DONE=== +--EXPECTF-- +prefix:books 12isbn +===DONE=== diff --git a/ext/xmlreader/tests/dtdexample.dtd b/ext/xmlreader/tests/dtdexample.dtd new file mode 100644 index 000000000..ce53f0bc1 --- /dev/null +++ b/ext/xmlreader/tests/dtdexample.dtd @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ext/xmlreader/tests/relaxNG.rng b/ext/xmlreader/tests/relaxNG.rng new file mode 100644 index 000000000..f4357e04e --- /dev/null +++ b/ext/xmlreader/tests/relaxNG.rng @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/ext/xmlreader/tests/relaxNG2.rng b/ext/xmlreader/tests/relaxNG2.rng new file mode 100644 index 000000000..4adae7b15 --- /dev/null +++ b/ext/xmlreader/tests/relaxNG2.rng @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ext/xmlreader/tests/relaxNG3.rng b/ext/xmlreader/tests/relaxNG3.rng new file mode 100644 index 000000000..73e1eb616 --- /dev/null +++ b/ext/xmlreader/tests/relaxNG3.rng @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ext/xmlrpc/config.m4 b/ext/xmlrpc/config.m4 index 661305442..4df321926 100644 --- a/ext/xmlrpc/config.m4 +++ b/ext/xmlrpc/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.25.2.2 2005/09/12 17:14:35 sniper Exp $ +dnl $Id: config.m4,v 1.25.2.3 2005/11/29 18:26:02 tony2001 Exp $ dnl sinclude(ext/xmlrpc/libxmlrpc/acinclude.m4) @@ -47,7 +47,7 @@ if test "$PHP_XMLRPC" != "no"; then else testval=no for i in $PHP_LIBEXPAT_DIR $XMLRPC_DIR /usr/local /usr; do - if test -f $i/$PHP_LIBDIR/libexpat.a -o -f $i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME; then + if test -f $i/$PHP_LIBDIR/libexpat.a || test -f $i/$PHP_LIBDIR/libexpat.$SHLIB_SUFFIX_NAME; then AC_DEFINE(HAVE_LIBEXPAT,1,[ ]) PHP_ADD_LIBRARY_WITH_PATH(expat, $i/$PHP_LIBDIR, XMLRPC_SHARED_LIBADD) PHP_ADD_INCLUDE($i/include) diff --git a/ext/xmlrpc/libxmlrpc/xml_to_soap.c b/ext/xmlrpc/libxmlrpc/xml_to_soap.c index 8390f06e8..a30b3c11f 100644 --- a/ext/xmlrpc/libxmlrpc/xml_to_soap.c +++ b/ext/xmlrpc/libxmlrpc/xml_to_soap.c @@ -165,7 +165,7 @@ static const char* get_array_soap_type(XMLRPC_VALUE node) { return soapType; } -/* determines wether a node is a fault or not, and of which type: +/* determines whether a node is a fault or not, and of which type: * 0 = not a fault, * 1 = xmlrpc style fault * 2 = soap style fault. diff --git a/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c b/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c index 589ff8ebb..aa8fcd842 100644 --- a/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c +++ b/ext/xmlrpc/libxmlrpc/xmlrpc_introspection.c @@ -36,6 +36,9 @@ * Dan Libby, aka danda (dan@libby.com) * HISTORY * $Log: xmlrpc_introspection.c,v $ + * Revision 1.4.4.1 2005/12/18 22:59:57 sniper + * MFH: - Fixed bug #35723 (xmlrpc_introspection.c fails compile per C99 std) + * * Revision 1.4 2003/12/16 21:00:21 sniper * Fix some compile warnings (patch by Joe Orton) * @@ -77,7 +80,7 @@ static XMLRPC_VALUE xi_system_method_help_cb(XMLRPC_SERVER server, XMLRPC_REQUES /* iterates through a list of structs and finds the one with key "name" matching * needle. slow, would benefit from a struct key hash. */ -inline XMLRPC_VALUE find_named_value(XMLRPC_VALUE list, const char* needle) { +static inline XMLRPC_VALUE find_named_value(XMLRPC_VALUE list, const char* needle) { XMLRPC_VALUE xIter = XMLRPC_VectorRewind(list); while(xIter) { const char* name = XMLRPC_VectorGetStringWithID(xIter, xi_token_name); @@ -107,7 +110,7 @@ static void check_docs_loaded(XMLRPC_SERVER server, void* userData) { /* utility function for xi_system_describe_methods_cb */ -inline void describe_method(XMLRPC_SERVER server, XMLRPC_VALUE vector, const char* method) { +static inline void describe_method(XMLRPC_SERVER server, XMLRPC_VALUE vector, const char* method) { if(method) { server_method* sm = find_method(server, method); if(sm) { diff --git a/ext/xmlrpc/php_xmlrpc.h b/ext/xmlrpc/php_xmlrpc.h index e3c6971b5..26c5c2fe3 100644 --- a/ext/xmlrpc/php_xmlrpc.h +++ b/ext/xmlrpc/php_xmlrpc.h @@ -37,12 +37,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlrpc.h,v 1.11 2005/08/03 14:08:22 sniper Exp $ */ +/* $Id: php_xmlrpc.h,v 1.11.2.1 2006/01/01 12:50:16 sniper Exp $ */ #ifndef _PHP_XMLRPC_H #define _PHP_XMLRPC_H diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index 1665cfd67..6af8009de 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -37,12 +37,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xmlrpc-epi-php.c,v 1.39.2.2 2005/10/05 16:40:21 rrichards Exp $ */ +/* $Id: xmlrpc-epi-php.c,v 1.39.2.4 2006/01/01 12:50:16 sniper Exp $ */ /********************************************************************** * BUGS: * @@ -80,7 +80,7 @@ ZEND_DECLARE_MODULE_GLOBALS(xmlrpc) static int le_xmlrpc_server; -function_entry xmlrpc_functions[] = { +zend_function_entry xmlrpc_functions[] = { PHP_FE(xmlrpc_encode, NULL) PHP_FE(xmlrpc_decode, NULL) PHP_FE(xmlrpc_decode_request, second_arg_force_ref) @@ -1330,7 +1330,7 @@ int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) if(v) { time_t timestamp = XMLRPC_GetValueDateTime(v); if(timestamp) { - pval* ztimestamp; + zval* ztimestamp; MAKE_STD_ZVAL(ztimestamp); diff --git a/ext/xmlwriter/CREDITS b/ext/xmlwriter/CREDITS new file mode 100644 index 000000000..d3a9ebe1b --- /dev/null +++ b/ext/xmlwriter/CREDITS @@ -0,0 +1,3 @@ +XMLWriter +Rob Richards +Pierre-Alain Joye diff --git a/ext/xmlwriter/TODO b/ext/xmlwriter/TODO new file mode 100644 index 000000000..bfc895d76 --- /dev/null +++ b/ext/xmlwriter/TODO @@ -0,0 +1,5 @@ +- Fix up config file for PHP 5 to use libxml extension configuration +- Add tests for Namespace functions/methods +- Sync with xmlwriter (new dtd func?) +- Write documentations in docbook + diff --git a/ext/xmlwriter/config.m4 b/ext/xmlwriter/config.m4 new file mode 100644 index 000000000..92bfef1ea --- /dev/null +++ b/ext/xmlwriter/config.m4 @@ -0,0 +1,26 @@ +dnl +dnl $Id: config.m4,v 1.4.2.6 2005/12/04 00:21:39 tony2001 Exp $ +dnl + +PHP_ARG_ENABLE(xmlwriter, whether to enable XMLWriter support, +[ --disable-xmlwriter Disable XMLWriter support], yes) + +if test -z "$PHP_LIBXML_DIR"; then + PHP_ARG_WITH(libxml-dir, libxml2 install dir, + [ --with-libxml-dir=DIR XMLWriter: libxml2 install prefix], no, no) +fi + +if test "$PHP_XMLWRITER" != "no"; then + + if test "$PHP_LIBXML" = "no"; then + AC_MSG_ERROR([XMLWriter extension requires LIBXML extension, add --enable-libxml]) + fi + + PHP_SETUP_LIBXML(XMLWRITER_SHARED_LIBADD, [ + AC_DEFINE(HAVE_XMLWRITER,1,[ ]) + PHP_NEW_EXTENSION(xmlwriter, php_xmlwriter.c, $ext_shared) + PHP_SUBST(XMLWRITER_SHARED_LIBADD) + ], [ + AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.]) + ]) +fi diff --git a/ext/xmlwriter/config.w32 b/ext/xmlwriter/config.w32 new file mode 100644 index 000000000..11ea39edd --- /dev/null +++ b/ext/xmlwriter/config.w32 @@ -0,0 +1,18 @@ +// $Id: config.w32,v 1.3.2.3 2005/12/02 10:55:33 mike Exp $ +// vim:ft=javascript + +ARG_ENABLE("xmlwriter", "XMLWriter support", "yes"); + +if (PHP_XMLWRITER == "yes" && PHP_LIBXML == "yes") { + if (CHECK_HEADER_ADD_INCLUDE('libxml/xmlwriter.h', 'CFLAGS_XMLWRITER', PHP_XMLWRITER)) { + EXTENSION("xmlwriter", "php_xmlwriter.c"); + AC_DEFINE("HAVE_XMLWRITER", 1, "XMLWriter support"); + if (!PHP_XMLWRITER_SHARED) { + ADD_FLAG("CFLAGS_XMLWRITER", "/D LIBXML_STATIC"); + } + ADD_EXTENSION_DEP('xmlwriter', 'libxml'); + } else { + WARNING('Could not find xmlwriter.h'); + } +} + diff --git a/ext/xmlwriter/examples/xmlwriter_file.php b/ext/xmlwriter/examples/xmlwriter_file.php new file mode 100644 index 000000000..13bb26233 --- /dev/null +++ b/ext/xmlwriter/examples/xmlwriter_file.php @@ -0,0 +1,44 @@ +openUri('test.xml'); +$xw->startDocument("1.0"); +$xw->startElement("book"); +$xw->text("example"); +$xw->endElement(); +$xw->endDocument(); +$xw->flush(0); diff --git a/ext/xmlwriter/package.xml b/ext/xmlwriter/package.xml new file mode 100644 index 000000000..01f7ad442 --- /dev/null +++ b/ext/xmlwriter/package.xml @@ -0,0 +1,107 @@ + + + + xmlwriter + Provides fast, non-cached, forward-only means to write XML data. + This extension wraps the libxml xmlWriter API. Represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data. + + PHP + + + rrichards + Rob Richards + rrichards@php.net + lead + + + + pajoye + Pierre-Alain Joye + pajoye@php.net + developer + + + 2.0.2 + 2005-12-01 + stable + - fix build under 5.0 +- fix crash when XMLWriter is instantiated but not used +- Switch from BSD-like license to PHP License 3.01 + + + + + 2.0.0 + 2005-08-07 + stable + + fix tests using UTF-8 + move to stable state + + + + + 1.1.0 + 2005-05-24 + beta + + Add OO interface (php5 only) + Add test cases + + + + + 2.0.1 + 2005-11-15 + stable + - Switch from PHP License to BSD-like license +- Allow recursive calls to __get/__set for different properties (ilia) + + + 1.0 + 2005-05-02 + stable + + Many Bug Fixes + Use PHP streams under PHP 4 + Add xmlwriter_flush function to flush buffer + Add support for xmlTextWriterStart/EndComment + + + + 0.1 + 2004-07-20 + alpha + Initial Release + + + 0.2 + 2004-10-08 + alpha + Fix bug 2482 and other function parameters + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ext/xmlwriter/package2.xml b/ext/xmlwriter/package2.xml new file mode 100644 index 000000000..ec6ef313b --- /dev/null +++ b/ext/xmlwriter/package2.xml @@ -0,0 +1,94 @@ + + + xmlwriter + pecl.php.net + Provides fast, non-cached, forward-only means to write XML data. + This extension wraps the libxml xmlWriter API. Represents a writer that provides a non-cached, forward-only means of generating streams or files containing XML data. + + + Rob Richards + rrichards + rrichards@php.net + yes + + + Pierre-Alain Joye + pajoye + pajoye@php.net + yes + + 2005-12-01 + + 2.0.2 + 2.0.0 + + + stable + stable + + PHP + - fix build under 5.0 +- fix crash when XMLWriter is instantiated but not used +- Switch from BSD-like license to PHP License 3.01 + + + + + + + + + + + + + + + + + + + + + + + 4.3.0 + + + 1.4.0a2 + + + + xmlwriter + + + + + 2.0.1 + 2.0.0 + + + stable + stable + + BSD + - Switch from PHP License to BSD-like license +- Allow recursive calls to __get/__set for different properties (ilia) + + + + 2005-08-07 + + + 2.0.0 + 2.0.0 + + + stable + stable + + PHP License + Promote to stable + + + diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c new file mode 100644 index 000000000..d80afa148 --- /dev/null +++ b/ext/xmlwriter/php_xmlwriter.c @@ -0,0 +1,1852 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Rob Richards | + | Pierre-A. Joye | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_xmlwriter.c,v 1.20.2.9 2006/01/01 12:50:16 sniper Exp $ */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +#include "php.h" +#include "php_ini.h" +#include "ext/standard/info.h" +#include "php_xmlwriter.h" + +zend_class_entry *xmlwriter_class_entry; + +static void xmlwriter_free_resource_ptr(xmlwriter_object *intern TSRMLS_DC); +static void xmlwriter_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC); + +/* {{{ xmlwriter_object_free_storage */ +static void xmlwriter_free_resource_ptr(xmlwriter_object *intern TSRMLS_DC) +{ + if (intern) { + if (intern->ptr) { + xmlFreeTextWriter(intern->ptr); + intern->ptr = NULL; + } + if (intern->output) { + xmlBufferFree(intern->output); + intern->output = NULL; + } + efree(intern); + } +} +/* }}} */ + +#ifdef ZEND_ENGINE_2 +/* {{{ XMLWRITER_FROM_OBJECT */ +#define XMLWRITER_FROM_OBJECT(intern, object) \ + { \ + ze_xmlwriter_object *obj = (ze_xmlwriter_object*) zend_object_store_get_object(object TSRMLS_CC); \ + intern = obj->xmlwriter_ptr; \ + if (!intern) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid or unitialized XMLWriter object"); \ + RETURN_FALSE; \ + } \ + } +/* }}} */ + +static zend_object_handlers xmlwriter_object_handlers; + +/* {{{ xmlwriter_object_free_storage */ +static void xmlwriter_object_free_storage(void *object TSRMLS_DC) +{ + ze_xmlwriter_object * intern = (ze_xmlwriter_object *) object; + if (!intern) { + return; + } + if (intern->xmlwriter_ptr) { + xmlwriter_free_resource_ptr(intern->xmlwriter_ptr TSRMLS_CC); + } + intern->xmlwriter_ptr = NULL; + if (intern->zo.properties) { + zend_hash_destroy(intern->zo.properties); + FREE_HASHTABLE(intern->zo.properties); + } + + efree(intern); +} +/* }}} */ + + +/* {{{ xmlwriter_object_new */ +PHP_XMLWRITER_API zend_object_value xmlwriter_object_new(zend_class_entry *class_type TSRMLS_DC) +{ + ze_xmlwriter_object *intern; + zval *tmp; + zend_object_value retval; + + intern = emalloc(sizeof(ze_xmlwriter_object)); + memset(&intern->zo, 0, sizeof(zend_object)); + intern->zo.ce = class_type; + intern->xmlwriter_ptr = NULL; + + ALLOC_HASHTABLE(intern->zo.properties); + zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_copy(intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, + (void *) &tmp, sizeof(zval *)); + + retval.handle = zend_objects_store_put(intern, + NULL, + (zend_objects_free_object_storage_t) xmlwriter_object_free_storage, + NULL TSRMLS_CC); + + retval.handlers = (zend_object_handlers *) & xmlwriter_object_handlers; + + return retval; +} +/* }}} */ +#endif + +#define XMLW_NAME_CHK(__err) \ + if (xmlValidateName((xmlChar *) name, 0) != 0) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, #__err); \ + RETURN_FALSE; \ + } \ + +/* {{{ xmlwriter_functions */ +static zend_function_entry xmlwriter_functions[] = { + PHP_FE(xmlwriter_open_uri, NULL) + PHP_FE(xmlwriter_open_memory, NULL) +#if LIBXML_VERSION >= 20605 + PHP_FE(xmlwriter_set_indent, NULL) + PHP_FE(xmlwriter_set_indent_string, NULL) +#endif +#if LIBXML_VERSION >= 20607 + PHP_FE(xmlwriter_start_comment, NULL) + PHP_FE(xmlwriter_end_comment, NULL) +#endif + PHP_FE(xmlwriter_start_attribute, NULL) + PHP_FE(xmlwriter_end_attribute, NULL) + PHP_FE(xmlwriter_write_attribute, NULL) +#if LIBXML_VERSION > 20617 + PHP_FE(xmlwriter_start_attribute_ns,NULL) + PHP_FE(xmlwriter_write_attribute_ns,NULL) +#endif + PHP_FE(xmlwriter_start_element, NULL) + PHP_FE(xmlwriter_end_element, NULL) + PHP_FE(xmlwriter_start_element_ns, NULL) + PHP_FE(xmlwriter_write_element, NULL) + PHP_FE(xmlwriter_write_element_ns, NULL) + PHP_FE(xmlwriter_start_pi, NULL) + PHP_FE(xmlwriter_end_pi, NULL) + PHP_FE(xmlwriter_write_pi, NULL) + PHP_FE(xmlwriter_start_cdata, NULL) + PHP_FE(xmlwriter_end_cdata, NULL) + PHP_FE(xmlwriter_write_cdata, NULL) + PHP_FE(xmlwriter_text, NULL) + PHP_FE(xmlwriter_start_document, NULL) + PHP_FE(xmlwriter_end_document, NULL) + PHP_FE(xmlwriter_write_comment, NULL) + PHP_FE(xmlwriter_start_dtd, NULL) + PHP_FE(xmlwriter_end_dtd, NULL) + PHP_FE(xmlwriter_write_dtd, NULL) + PHP_FE(xmlwriter_start_dtd_element, NULL) + PHP_FE(xmlwriter_end_dtd_element, NULL) + PHP_FE(xmlwriter_write_dtd_element, NULL) +#if LIBXML_VERSION > 20608 + PHP_FE(xmlwriter_start_dtd_attlist, NULL) + PHP_FE(xmlwriter_end_dtd_attlist, NULL) + PHP_FE(xmlwriter_write_dtd_attlist, NULL) +#endif + PHP_FE(xmlwriter_output_memory, NULL) + PHP_FE(xmlwriter_flush, NULL) + {NULL, NULL, NULL} +}; +/* }}} */ + +#ifdef ZEND_ENGINE_2 +/* {{{ xmlwriter_class_functions */ +static zend_function_entry xmlwriter_class_functions[] = { + PHP_ME_MAPPING(openUri, xmlwriter_open_uri, NULL) + PHP_ME_MAPPING(openMemory, xmlwriter_open_memory, NULL) +#if LIBXML_VERSION >= 20605 + PHP_ME_MAPPING(setIndent, xmlwriter_set_indent, NULL) + PHP_ME_MAPPING(setIndentString, xmlwriter_set_indent_string, NULL) +#endif +#if LIBXML_VERSION >= 20607 + PHP_ME_MAPPING(startComment, xmlwriter_start_comment, NULL) + PHP_ME_MAPPING(endComment, xmlwriter_end_comment, NULL) +#endif + PHP_ME_MAPPING(startAttribute, xmlwriter_start_attribute, NULL) + PHP_ME_MAPPING(endAttribute, xmlwriter_end_attribute, NULL) + PHP_ME_MAPPING(writeAttribute, xmlwriter_write_attribute, NULL) +#if LIBXML_VERSION > 20617 + PHP_ME_MAPPING(startAttributeNs, xmlwriter_start_attribute_ns,NULL) + PHP_ME_MAPPING(writeAttributeNs, xmlwriter_write_attribute_ns,NULL) +#endif + PHP_ME_MAPPING(startElement, xmlwriter_start_element, NULL) + PHP_ME_MAPPING(endElement, xmlwriter_end_element, NULL) + PHP_ME_MAPPING(startElementNs, xmlwriter_start_element_ns, NULL) + PHP_ME_MAPPING(writeElement, xmlwriter_write_element, NULL) + PHP_ME_MAPPING(writeElementNs, xmlwriter_write_element_ns, NULL) + PHP_ME_MAPPING(startPi, xmlwriter_start_pi, NULL) + PHP_ME_MAPPING(endPi, xmlwriter_end_pi, NULL) + PHP_ME_MAPPING(writePi, xmlwriter_write_pi, NULL) + PHP_ME_MAPPING(startCdata, xmlwriter_start_cdata, NULL) + PHP_ME_MAPPING(endCdata, xmlwriter_end_cdata, NULL) + PHP_ME_MAPPING(writeCdata, xmlwriter_write_cdata, NULL) + PHP_ME_MAPPING(text, xmlwriter_text, NULL) + PHP_ME_MAPPING(startDocument, xmlwriter_start_document, NULL) + PHP_ME_MAPPING(endDocument, xmlwriter_end_document, NULL) + PHP_ME_MAPPING(writeComment, xmlwriter_write_comment, NULL) + PHP_ME_MAPPING(startDtd, xmlwriter_start_dtd, NULL) + PHP_ME_MAPPING(endDtd, xmlwriter_end_dtd, NULL) + PHP_ME_MAPPING(writeDtd, xmlwriter_write_dtd, NULL) + PHP_ME_MAPPING(startDtdElement, xmlwriter_start_dtd_element, NULL) + PHP_ME_MAPPING(endDtdElement, xmlwriter_end_dtd_element, NULL) + PHP_ME_MAPPING(writeDtdElement, xmlwriter_write_dtd_element, NULL) +#if LIBXML_VERSION > 20608 + PHP_ME_MAPPING(startDtdAttlist, xmlwriter_start_dtd_attlist, NULL) + PHP_ME_MAPPING(endDtdAttlist, xmlwriter_end_dtd_attlist, NULL) + PHP_ME_MAPPING(writeDtdAttlist, xmlwriter_write_dtd_attlist, NULL) +#endif + PHP_ME_MAPPING(outputMemory, xmlwriter_output_memory, NULL) + PHP_ME_MAPPING(flush, xmlwriter_flush, NULL) + {NULL, NULL, NULL} +}; +/* }}} */ +#endif + +/* {{{ function prototypes */ +PHP_MINIT_FUNCTION(xmlwriter); +PHP_MSHUTDOWN_FUNCTION(xmlwriter); +PHP_MINFO_FUNCTION(xmlwriter); + +static int le_xmlwriter; +/* }}} */ + +/* _xmlwriter_get_valid_file_path should be made a + common function in libxml extension as code is common to a few xml extensions */ +/* {{{ _xmlwriter_get_valid_file_path */ +char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) { + xmlURI *uri; + xmlChar *escsource; + char *file_dest; + int isFileUri = 0; + + uri = xmlCreateURI(); + escsource = xmlURIEscapeStr(source, ":"); + xmlParseURIReference(uri, escsource); + xmlFree(escsource); + + if (uri->scheme != NULL) { + /* absolute file uris - libxml only supports localhost or empty host */ + if (strncasecmp(source, "file:///",8) == 0) { + isFileUri = 1; +#ifdef PHP_WIN32 + source += 8; +#else + source += 7; +#endif + } else if (strncasecmp(source, "file://localhost/",17) == 0) { + isFileUri = 1; +#ifdef PHP_WIN32 + source += 17; +#else + source += 16; +#endif + } + } + + file_dest = source; + + if ((uri->scheme == NULL || isFileUri)) { + /* XXX possible buffer overflow if VCWD_REALPATH does not know size of resolved_path */ + if (! VCWD_REALPATH(source, resolved_path)) { + expand_filepath(source, resolved_path TSRMLS_CC); + } + file_dest = resolved_path; + } + + xmlFreeURI(uri); + + return file_dest; +} +/* }}} */ + +#ifndef ZEND_ENGINE_2 +/* Channel libxml file io layer through the PHP streams subsystem. + * This allows use of ftps:// and https:// urls */ + +/* {{{ php_xmlwriter_streams_IO_open_write_wrapper */ +static void *php_xmlwriter_streams_IO_open_write_wrapper(const char *filename TSRMLS_DC) +{ + php_stream_wrapper *wrapper = NULL; + void *ret_val = NULL; + + ret_val = php_stream_open_wrapper_ex((char *)filename, "wb", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL, NULL); + return ret_val; +} +/* }}} */ + +/* {{{ php_xmlwriter_streams_IO_write */ +int php_xmlwriter_streams_IO_write(void *context, const char *buffer, int len) +{ + TSRMLS_FETCH(); + return php_stream_write((php_stream*)context, buffer, len); +} +/* }}} */ + +/* {{{ xmlwriter_objects_clone */ +int php_xmlwriter_streams_IO_close(void *context) +{ + TSRMLS_FETCH(); + return php_stream_close((php_stream*)context); +} +/* }}} */ +#endif + +/* {{{ xmlwriter_module_entry + */ +zend_module_entry xmlwriter_module_entry = { + STANDARD_MODULE_HEADER, + "xmlwriter", + xmlwriter_functions, + PHP_MINIT(xmlwriter), + PHP_MSHUTDOWN(xmlwriter), + NULL, + NULL, + PHP_MINFO(xmlwriter), + "0.1", + STANDARD_MODULE_PROPERTIES +}; +/* }}} */ + +#ifdef COMPILE_DL_XMLWRITER +ZEND_GET_MODULE(xmlwriter) +#endif + +/* {{{ xmlwriter_objects_clone */ +void xmlwriter_objects_clone(void *object, void **object_clone TSRMLS_DC) +{ + /* TODO */ +} +/* }}} */ + +/* {{{ xmlwriter_dtor */ +static void xmlwriter_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { + xmlwriter_object *intern; + + intern = (xmlwriter_object *) rsrc->ptr; + xmlwriter_free_resource_ptr(intern TSRMLS_CC); +} +/* }}} */ + +#if LIBXML_VERSION >= 20605 +/* {{{ proto bool xmlwriter_set_indent(resource xmlwriter, bool indent) +Toggle indentation on/off - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_set_indent) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + int retval; + zend_bool indent; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &indent) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &pind, &indent) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + + ptr = intern->ptr; + if (ptr) { + retval = xmlTextWriterSetIndent(ptr, indent); + if (retval == 0) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_set_indent_string(resource xmlwriter, string indentString) +Set string used for indenting - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_set_indent_string) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *indent; + int indent_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &indent, &indent_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &indent, &indent_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterSetIndentString(ptr, indent); + if (retval == 0) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +#endif + +/* {{{ proto bool xmlwriter_start_attribute(resource xmlwriter, string name) +Create start attribute - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_attribute) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartAttribute(ptr, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +static void php_xmlwriter_end(INTERNAL_FUNCTION_PARAMETERS, int type) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + int retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &pind) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + switch (type) { + case 0: + retval = xmlTextWriterEndAttribute(ptr); + break; + case 1: + retval = xmlTextWriterEndElement(ptr); + break; + case 2: + retval = xmlTextWriterEndPI(ptr); + break; + case 3: + retval = xmlTextWriterEndCDATA(ptr); + break; + case 4: + retval = xmlTextWriterEndComment(ptr); + break; + case 5: + retval = xmlTextWriterEndDocument(ptr); + break; + case 6: + retval = xmlTextWriterEndDTD(ptr); + break; + case 7: + retval = xmlTextWriterEndDTDElement(ptr); + break; + case 8: + retval = xmlTextWriterEndDTDAttlist(ptr); + break; + case 9: + retval = xmlTextWriterEndDTDEntity(ptr); + break; + default: + retval = -1; + break; + } + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} + + +/* {{{ proto bool xmlwriter_end_attribute(resource xmlwriter) +End attribute - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_attribute) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +#if LIBXML_VERSION > 20617 +/* {{{ proto bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri) +Create start namespaced attribute - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_attribute_ns) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *prefix, *uri; + int name_len, prefix_len, uri_len, retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsss", &pind, + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartAttributeNS(ptr, prefix, name, uri); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ +#endif + +/* {{{ proto bool xmlwriter_write_attribute(resource xmlwriter, string name, string content) +Write full attribute - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_attribute) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteAttribute(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +#if LIBXML_VERSION > 20617 +/* {{{ proto bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content) +Write full namespaced attribute - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_attribute_ns) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *prefix, *uri, *content; + int name_len, prefix_len, uri_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss", + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssss", &pind, + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteAttributeNS(ptr, prefix, name, uri, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ +#endif + +/* {{{ proto bool xmlwriter_start_element(resource xmlwriter, string name) +Create start element tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_element) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartElement(ptr, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + + +/* {{{ proto bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri) +Create start namespaced element tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_element_ns) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *prefix, *uri; + int name_len, prefix_len, uri_len, retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!ss", + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!ss", &pind, + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartElementNS(ptr, prefix, name, uri); + if (retval != -1) { + RETURN_TRUE; + } + + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_element(resource xmlwriter) +End current element - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_element) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_element(resource xmlwriter, string name, string content) +Write full element tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_element) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteElement(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri, string content) +Write full namesapced element tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_element_ns) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *prefix, *uri, *content; + int name_len, prefix_len, uri_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!sss", + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs!sss", &pind, + &prefix, &prefix_len, &name, &name_len, &uri, &uri_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteElementNS(ptr, prefix, name, uri, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_pi(resource xmlwriter, string target) +Create start PI tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_pi) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid PI Target"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartPI(ptr, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_pi(resource xmlwriter) +End current PI - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_pi) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_pi(resource xmlwriter, string target, string content) +Write full PI tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_pi) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid PI Target"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWritePI(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_cdata(resource xmlwriter) +Create start CDATA tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_cdata) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + int retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &pind) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartCDATA(ptr); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_cdata(resource xmlwriter) +End current CDATA - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_cdata) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 3); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_cdata(resource xmlwriter, string content) +Write full CDATA tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_cdata) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *content; + int content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, + &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteCDATA(ptr, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_text(resource xmlwriter, string content) +Write text - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_text) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *content; + int content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &content, &content_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteString(ptr, content); + if (retval) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +#if LIBXML_VERSION >= 20607 +/* {{{ proto bool xmlwriter_start_comment(resource xmlwriter) +Create start comment - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_comment) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + int retval; +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &pind) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartComment(ptr); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_comment(resource xmlwriter) +Create end comment - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_comment) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 4); +} +/* }}} */ +#endif /* LIBXML_VERSION >= 20607 */ + + +/* {{{ proto bool xmlwriter_write_comment(resource xmlwriter, string content) +Write full comment tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_comment) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *content; + int content_len, retval; + + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, + &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteComment(ptr, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone) +Create document tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_document) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *version = NULL, *enc = NULL, *alone = NULL; + int version_len, enc_len, alone_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!s!s!", &version, &version_len, &enc, &enc_len, &alone, &alone_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!s!s!", &pind, &version, &version_len, &enc, &enc_len, &alone, &alone_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartDocument(ptr, version, enc, alone); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_document(resource xmlwriter) +End current document - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_document) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 5); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid) +Create start DTD tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_dtd) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *pubid = NULL, *sysid = NULL; + int name_len, pubid_len, sysid_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!s!", &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len) == FAILURE) { + return; + } + + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s!s!", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartDTD(ptr, name, pubid, sysid); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_dtd(resource xmlwriter) +End current DTD - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_dtd) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 6); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset) +Write full DTD tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_dtd) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *pubid = NULL, *sysid = NULL, *subset = NULL; + int name_len, pubid_len, sysid_len, subset_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!s!s!", &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len, &subset, &subset_len) == FAILURE) { + return; + } + + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|s!s!s!", &pind, &name, &name_len, &pubid, &pubid_len, &sysid, &sysid_len, &subset, &subset_len) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteDTD(ptr, name, pubid, sysid, subset); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_dtd_element(resource xmlwriter, string name) +Create start DTD element - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_dtd_element) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartDTDElement(ptr, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_dtd_element(resource xmlwriter) +End current DTD element - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_dtd_element) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 7); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content) +Write full DTD element tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_dtd_element) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteDTDElement(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +#if LIBXML_VERSION > 20608 +/* {{{ proto bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name) +Create start DTD AttList - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_dtd_attlist) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &name_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &pind, &name, &name_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartDTDAttlist(ptr, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_dtd_attlist(resource xmlwriter) +End current DTD AttList - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_dtd_attlist) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 8); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content) +Write full DTD AttList tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_dtd_attlist) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; + + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteDTDAttlist(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam) +Create start DTD Entity - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_start_dtd_entity) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name; + int name_len, retval; + zend_bool isparm; + + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sb", &name, &name_len, &isparm) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsb", &pind, &name, &name_len, &isparm) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Attribute Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterStartDTDEntity(ptr, isparm, name); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ + +/* {{{ proto bool xmlwriter_end_dtd_entity(resource xmlwriter) +End current DTD Entity - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_end_dtd_entity) +{ + php_xmlwriter_end(INTERNAL_FUNCTION_PARAM_PASSTHRU, 9); +} +/* }}} */ + +/* {{{ proto bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content) +Write full DTD Entity tag - returns FALSE on error */ +PHP_FUNCTION(xmlwriter_write_dtd_entity) +{ + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *name, *content; + int name_len, content_len, retval; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss", &pind, + &name, &name_len, &content, &content_len) == FAILURE) { + return; + } + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + + XMLW_NAME_CHK("Invalid Element Name"); + + ptr = intern->ptr; + + if (ptr) { + retval = xmlTextWriterWriteDTDAttlist(ptr, name, content); + if (retval != -1) { + RETURN_TRUE; + } + } + + RETURN_FALSE; +} +/* }}} */ +#endif + +/* {{{ proto resource xmlwriter_open_uri(resource xmlwriter, string source) +Create new xmlwriter using source uri for output */ +PHP_FUNCTION(xmlwriter_open_uri) +{ + char *valid_file = NULL; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + char *source; + char resolved_path[MAXPATHLEN + 1]; + int source_len; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + ze_xmlwriter_object *ze_obj; +#endif + +#ifndef ZEND_ENGINE_2 + xmlOutputBufferPtr out_buffer; + void *ioctx; +#endif + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &source, &source_len) == FAILURE) { + WRONG_PARAM_COUNT; + return; + } + +#ifdef ZEND_ENGINE_2 + if (this) { + /* We do not use XMLWRITER_FROM_OBJECT, xmlwriter init function here */ + ze_obj = (ze_xmlwriter_object*) zend_object_store_get_object(this TSRMLS_CC); + } +#endif + + if (source_len == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty string as source"); + RETURN_FALSE; + } + + valid_file = _xmlwriter_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC); + if (!valid_file) { + RETURN_FALSE; + } + +#ifndef ZEND_ENGINE_2 + ioctx = php_xmlwriter_streams_IO_open_write_wrapper(valid_file TSRMLS_CC); + if (ioctx == NULL) { + RETURN_FALSE; + } + + out_buffer = xmlOutputBufferCreateIO(php_xmlwriter_streams_IO_write, + php_xmlwriter_streams_IO_close, ioctx, NULL); + + if (out_buffer == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create output buffer"); + RETURN_FALSE; + } + ptr = xmlNewTextWriter(out_buffer); +#else + ptr = xmlNewTextWriterFilename(valid_file, 0); +#endif + + if (!ptr) { + RETURN_FALSE; + } + + intern = emalloc(sizeof(xmlwriter_object)); + intern->ptr = ptr; + intern->output = NULL; +#ifndef ZEND_ENGINE_2 + intern->uri_output = out_buffer; +#else + if (this) { + ze_obj->xmlwriter_ptr = intern; + RETURN_TRUE; + } else +#endif + { + ZEND_REGISTER_RESOURCE(return_value,intern,le_xmlwriter); + } +} +/* }}} */ + +/* {{{ proto resource xmlwriter_open_memory() +Create new xmlwriter using memory for string output */ +PHP_FUNCTION(xmlwriter_open_memory) +{ + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + xmlBufferPtr buffer; + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + ze_xmlwriter_object *ze_obj; +#endif + +#ifdef ZEND_ENGINE_2 + if (this) { + /* We do not use XMLWRITER_FROM_OBJECT, xmlwriter init function here */ + ze_obj = (ze_xmlwriter_object*) zend_object_store_get_object(this TSRMLS_CC); + } +#endif + + buffer = xmlBufferCreate(); + + if (buffer == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create output buffer"); + RETURN_FALSE; + } + + ptr = xmlNewTextWriterMemory(buffer, 0); + if (! ptr) { + xmlBufferFree(buffer); + RETURN_FALSE; + } + + intern = emalloc(sizeof(xmlwriter_object)); + intern->ptr = ptr; + intern->output = buffer; +#ifndef ZEND_ENGINE_2 + intern->uri_output = NULL; +#else + if (this) { + ze_obj->xmlwriter_ptr = intern; + RETURN_TRUE; + } else +#endif + { + ZEND_REGISTER_RESOURCE(return_value,intern,le_xmlwriter); + } + +} +/* }}} */ + +/* {{{ php_xmlwriter_flush */ +static void php_xmlwriter_flush(INTERNAL_FUNCTION_PARAMETERS, int force_string) { + zval *pind; + xmlwriter_object *intern; + xmlTextWriterPtr ptr; + xmlBufferPtr buffer; + zend_bool empty = 1; + int output_bytes; + + +#ifdef ZEND_ENGINE_2 + zval *this = getThis(); + + if (this) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &empty) == FAILURE) { + return; + } + XMLWRITER_FROM_OBJECT(intern, this); + } else +#endif + { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|b", &pind, &empty) == FAILURE) { + return; + } + + ZEND_FETCH_RESOURCE(intern,xmlwriter_object *, &pind, -1, "XMLWriter", le_xmlwriter); + } + ptr = intern->ptr; + + if (ptr) { + buffer = intern->output; + if (force_string == 1 && buffer == NULL) { + RETURN_EMPTY_STRING(); + } + output_bytes = xmlTextWriterFlush(ptr); + if (buffer) { + RETVAL_STRING(buffer->content, 1); + if (empty) { + xmlBufferEmpty(buffer); + } + } else { + RETVAL_LONG(output_bytes); + } + return; + } + + RETURN_EMPTY_STRING(); +} +/* }}} */ + +/* {{{ proto string xmlwriter_output_memory(resource xmlwriter [,bool flush]) +Output current buffer as string */ +PHP_FUNCTION(xmlwriter_output_memory) +{ + php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); +} +/* }}} */ + +/* {{{ proto mixed xmlwriter_flush(resource xmlwriter [,bool empty]) +Output current buffer */ +PHP_FUNCTION(xmlwriter_flush) +{ + php_xmlwriter_flush(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); +} +/* }}} */ + +/* {{{ PHP_MINIT_FUNCTION + */ +PHP_MINIT_FUNCTION(xmlwriter) +{ +#ifdef ZEND_ENGINE_2 + zend_class_entry ce; +#endif + + le_xmlwriter = zend_register_list_destructors_ex(xmlwriter_dtor, NULL, "xmlwriter", module_number); + +#ifdef ZEND_ENGINE_2 + memcpy(&xmlwriter_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + xmlwriter_object_handlers.clone_obj = NULL; + INIT_CLASS_ENTRY(ce, "XMLWriter", xmlwriter_class_functions); + ce.create_object = xmlwriter_object_new; + xmlwriter_class_entry_ce = zend_register_internal_class(&ce TSRMLS_CC); +#endif + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_MSHUTDOWN_FUNCTION + */ +PHP_MSHUTDOWN_FUNCTION(xmlwriter) +{ + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_MINFO_FUNCTION + */ +PHP_MINFO_FUNCTION(xmlwriter) +{ + php_info_print_table_start(); + { + php_info_print_table_row(2, "XMLWriter", "enabled"); + } + php_info_print_table_end(); +} +/* }}} */ + +/* + * 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/xmlwriter/php_xmlwriter.h b/ext/xmlwriter/php_xmlwriter.h new file mode 100644 index 000000000..5fe173268 --- /dev/null +++ b/ext/xmlwriter/php_xmlwriter.h @@ -0,0 +1,115 @@ +/* + +----------------------------------------------------------------------+ + | PHP Version 5 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997-2006 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Author: Rob Richards | + | Pierre-A. Joye | + +----------------------------------------------------------------------+ +*/ + +/* $Id: php_xmlwriter.h,v 1.10.2.5 2006/01/01 12:50:16 sniper Exp $ */ + +#ifndef PHP_XMLWRITER_H +#define PHP_XMLWRITER_H + +extern zend_module_entry xmlwriter_module_entry; +#define phpext_xmlwriter_ptr &xmlwriter_module_entry + +#ifdef PHP_WIN32 +#define PHP_XMLWRITER_API __declspec(dllexport) +#else +#define PHP_XMLWRITER_API +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + +#include +#include +#include + +/* Resource struct, not the object :) */ +typedef struct _xmlwriter_object { + xmlTextWriterPtr ptr; + xmlBufferPtr output; +#ifndef ZEND_ENGINE_2 + xmlOutputBufferPtr uri_output; +#endif +} xmlwriter_object; + + +/* Extends zend object */ +typedef struct _ze_xmlwriter_object { + zend_object zo; + xmlwriter_object *xmlwriter_ptr; +} ze_xmlwriter_object; + +zend_class_entry *xmlwriter_class_entry_ce; + +#if LIBXML_VERSION >= 20605 +PHP_FUNCTION(xmlwriter_set_indent); +PHP_FUNCTION(xmlwriter_set_indent_string); +#endif +PHP_FUNCTION(xmlwriter_start_attribute); +PHP_FUNCTION(xmlwriter_end_attribute); +PHP_FUNCTION(xmlwriter_write_attribute); +#if LIBXML_VERSION > 20617 +PHP_FUNCTION(xmlwriter_start_attribute_ns); +PHP_FUNCTION(xmlwriter_write_attribute_ns); +#endif +PHP_FUNCTION(xmlwriter_start_element); +PHP_FUNCTION(xmlwriter_end_element); +PHP_FUNCTION(xmlwriter_start_element_ns); +PHP_FUNCTION(xmlwriter_write_element); +PHP_FUNCTION(xmlwriter_write_element_ns); +PHP_FUNCTION(xmlwriter_start_pi); +PHP_FUNCTION(xmlwriter_end_pi); +PHP_FUNCTION(xmlwriter_write_pi); +PHP_FUNCTION(xmlwriter_start_cdata); +PHP_FUNCTION(xmlwriter_end_cdata); +PHP_FUNCTION(xmlwriter_write_cdata); +PHP_FUNCTION(xmlwriter_text); +PHP_FUNCTION(xmlwriter_start_document); +PHP_FUNCTION(xmlwriter_end_document); +#if LIBXML_VERSION >= 20607 +PHP_FUNCTION(xmlwriter_start_comment); +PHP_FUNCTION(xmlwriter_end_comment); +#endif +PHP_FUNCTION(xmlwriter_write_comment); +PHP_FUNCTION(xmlwriter_start_dtd); +PHP_FUNCTION(xmlwriter_end_dtd); +PHP_FUNCTION(xmlwriter_write_dtd); +PHP_FUNCTION(xmlwriter_start_dtd_element); +PHP_FUNCTION(xmlwriter_end_dtd_element); +PHP_FUNCTION(xmlwriter_write_dtd_element); +#if LIBXML_VERSION > 20608 +PHP_FUNCTION(xmlwriter_start_dtd_attlist); +PHP_FUNCTION(xmlwriter_end_dtd_attlist); +PHP_FUNCTION(xmlwriter_write_dtd_attlist); +#endif +PHP_FUNCTION(xmlwriter_open_uri); +PHP_FUNCTION(xmlwriter_open_memory); +PHP_FUNCTION(xmlwriter_output_memory); +PHP_FUNCTION(xmlwriter_flush); + +#endif /* PHP_XMLWRITER_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/xmlwriter/tests/001.phpt b/ext/xmlwriter/tests/001.phpt new file mode 100644 index 000000000..b21fd148c --- /dev/null +++ b/ext/xmlwriter/tests/001.phpt @@ -0,0 +1,25 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, file buffer, flush +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/002.phpt b/ext/xmlwriter/tests/002.phpt new file mode 100644 index 000000000..c8e6c324a --- /dev/null +++ b/ext/xmlwriter/tests/002.phpt @@ -0,0 +1,22 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, membuffer, flush +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/003.phpt b/ext/xmlwriter/tests/003.phpt new file mode 100644 index 000000000..53f1b4d3b --- /dev/null +++ b/ext/xmlwriter/tests/003.phpt @@ -0,0 +1,35 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, membuffer, flush, attribute +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- + +Test text for tag1 +===DONE=== diff --git a/ext/xmlwriter/tests/004.phpt b/ext/xmlwriter/tests/004.phpt new file mode 100644 index 000000000..ef436cb52 --- /dev/null +++ b/ext/xmlwriter/tests/004.phpt @@ -0,0 +1,36 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, file buffer, flush +--SKIPIF-- + +--FILE-- + + +'); +unset($xw); +unlink('001.xml'); +if ($md5_out != $md5_res) { + echo "failed: $md5_res != $md5_out\n"; +} else { + echo "ok.\n"; +} +?> +===DONE=== +--EXPECT-- +ok. +===DONE=== diff --git a/ext/xmlwriter/tests/005.phpt b/ext/xmlwriter/tests/005.phpt new file mode 100644 index 000000000..259e5dd39 --- /dev/null +++ b/ext/xmlwriter/tests/005.phpt @@ -0,0 +1,33 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, comments +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/006.phpt b/ext/xmlwriter/tests/006.phpt new file mode 100644 index 000000000..21945d62e --- /dev/null +++ b/ext/xmlwriter/tests/006.phpt @@ -0,0 +1,26 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, startDTD/writeElementNS +--SKIPIF-- + +--FILE-- + +--EXPECT-- +dummy content diff --git a/ext/xmlwriter/tests/007.phpt b/ext/xmlwriter/tests/007.phpt new file mode 100644 index 000000000..a9f6265ec --- /dev/null +++ b/ext/xmlwriter/tests/007.phpt @@ -0,0 +1,38 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, Elements & Attributes +--SKIPIF-- + +--FILE-- +\"'&"); +xmlwriter_end_attribute($xw); +xmlwriter_write_element($xw, 'chars', "special characters: <>\"'&"); +xmlwriter_end_element($xw); +xmlwriter_end_document($xw); +// Force to write and empty the buffer +$output = xmlwriter_flush($xw, true); +print $output; +?> +--EXPECT-- + + + + special characters: <>"'& + + diff --git a/ext/xmlwriter/tests/008.phpt b/ext/xmlwriter/tests/008.phpt new file mode 100644 index 000000000..4583c931a --- /dev/null +++ b/ext/xmlwriter/tests/008.phpt @@ -0,0 +1,34 @@ +--TEST-- +XMLWriter: libxml2 XML Writer DTD Element & Attlist +--SKIPIF-- + +--FILE-- + +--EXPECT-- + + + + + diff --git a/ext/xmlwriter/tests/009.phpt b/ext/xmlwriter/tests/009.phpt new file mode 100644 index 000000000..f9b6600ca --- /dev/null +++ b/ext/xmlwriter/tests/009.phpt @@ -0,0 +1,43 @@ +--TEST-- +XMLWriter: PI, Comment, CDATA +--SKIPIF-- + +--FILE-- +&"'); +xmlwriter_end_cdata($xw); +xmlwriter_end_element($xw); +xmlwriter_end_element($xw); +xmlwriter_end_element($xw); +xmlwriter_end_document($xw); +// Force to write and empty the buffer +$output = xmlwriter_flush($xw, true); +print $output; +?> +--EXPECT-- + + + + + + &"]]> + + diff --git a/ext/xmlwriter/tests/OO_001.phpt b/ext/xmlwriter/tests/OO_001.phpt new file mode 100644 index 000000000..b3f26cbeb --- /dev/null +++ b/ext/xmlwriter/tests/OO_001.phpt @@ -0,0 +1,26 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, file buffer, flush +--SKIPIF-- + +--FILE-- +openUri($doc_dest); +$xw->startDocument('1.0', 'UTF-8', 'standalonearg'); +$xw->startElement("tag1"); +$xw->endDocument(); + +// Force to write and empty the buffer +$output_bytes = $xw->flush(true); +echo file_get_contents($doc_dest); +unset($xw); +unlink('001.xml'); +?> +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/OO_002.phpt b/ext/xmlwriter/tests/OO_002.phpt new file mode 100644 index 000000000..488cb7307 --- /dev/null +++ b/ext/xmlwriter/tests/OO_002.phpt @@ -0,0 +1,22 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, membuffer, flush +--SKIPIF-- + +--FILE-- +openMemory(); +$xw->startDocument('1.0', 'UTF-8', 'standalone'); +$xw->startElement("tag1"); +$xw->endDocument(); + +// Force to write and empty the buffer +echo $xw->flush(true); +?> +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/OO_003.phpt b/ext/xmlwriter/tests/OO_003.phpt new file mode 100644 index 000000000..1e50a31a8 --- /dev/null +++ b/ext/xmlwriter/tests/OO_003.phpt @@ -0,0 +1,37 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, membuffer, flush, text, attribute +--SKIPIF-- + +--FILE-- +openMemory(); +$xw->startDocument('1.0', 'UTF-8'); +$xw->startElement("tag1"); + +$res = $xw->startAttribute('attr1'); +$xw->text("attr1_value"); +$xw->endAttribute(); + +$res = $xw->startAttribute('attr2'); +$xw->text("attr2_value"); +$xw->endAttribute(); + +$xw->text("Test text for tag1"); +$res = $xw->startElement('tag2'); +if ($res < 1) { + echo "StartElement context validation failed\n"; + exit(); +} +$xw->endDocument(); + +// Force to write and empty the buffer +echo $xw->flush(true); +?> +===DONE=== +--EXPECT-- + +Test text for tag1 +===DONE=== diff --git a/ext/xmlwriter/tests/OO_004.phpt b/ext/xmlwriter/tests/OO_004.phpt new file mode 100644 index 000000000..b3e3b2af1 --- /dev/null +++ b/ext/xmlwriter/tests/OO_004.phpt @@ -0,0 +1,37 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, file buffer, flush +--SKIPIF-- + +--FILE-- +openUri($doc_dest); +$xw->startDocument('1.0', 'UTF-8'); +$xw->startElement("tag1"); + +$xw->startPi("PHP"); +$xw->text('echo $a;'); +$xw->endPi(); +$xw->endDocument(); + +// Force to write and empty the buffer +$xw->flush(true); +$md5_out = md5_file($doc_dest); +$md5_res = md5(' + +'); +unset($xw); +unlink('001.xml'); +if ($md5_out != $md5_res) { + echo "failed: $md5_res != $md5_out\n"; +} else { + echo "ok.\n"; +} +?> +===DONE=== +--EXPECT-- +ok. +===DONE=== diff --git a/ext/xmlwriter/tests/OO_005.phpt b/ext/xmlwriter/tests/OO_005.phpt new file mode 100644 index 000000000..dd7a4e455 --- /dev/null +++ b/ext/xmlwriter/tests/OO_005.phpt @@ -0,0 +1,33 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, comments +--SKIPIF-- + +--FILE-- +openUri($doc_dest); +$xw->startDocument('1.0', 'UTF-8'); +$xw->startElement("tag1"); +$xw->startComment(); +$xw->text('comment'); +$xw->endComment(); +$xw->writeComment("comment #2"); +$xw->endDocument(); + +// Force to write and empty the buffer +$output_bytes = $xw->flush(true); +echo file_get_contents($doc_dest); +unset($xw); +unlink('001.xml'); +?> +===DONE=== +--EXPECT-- + + +===DONE=== diff --git a/ext/xmlwriter/tests/OO_006.phpt b/ext/xmlwriter/tests/OO_006.phpt new file mode 100644 index 000000000..395992b6f --- /dev/null +++ b/ext/xmlwriter/tests/OO_006.phpt @@ -0,0 +1,27 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, startDTD/writeElementNS +--SKIPIF-- + +--FILE-- +openUri($doc_dest); +$xw->startDtd('foo', NULL, 'urn:bar'); +$xw->endDtd(); +$xw->startElement('foo'); +$xw->writeElementNS('foo', 'bar', 'urn:foo', 'dummy content'); +$xw->endElement(); + +// Force to write and empty the buffer +$output_bytes = $xw->flush(true); +echo file_get_contents($doc_dest); +unset($xw); +unlink('001.xml'); +?> +--EXPECT-- +dummy content diff --git a/ext/xmlwriter/tests/OO_007.phpt b/ext/xmlwriter/tests/OO_007.phpt new file mode 100644 index 000000000..8e0f7c8df --- /dev/null +++ b/ext/xmlwriter/tests/OO_007.phpt @@ -0,0 +1,39 @@ +--TEST-- +XMLWriter: libxml2 XML Writer, Elements & Attributes +--SKIPIF-- + +--FILE-- +openMemory(); +$xw->setIndent(TRUE); +$xw->setIndentString(' '); +$xw->startDocument('1.0', "UTF-8"); +$xw->startElement('root'); +$xw->startElementNS('ns1', 'child1', 'urn:ns1'); +$xw->startAttributeNS('ns1', 'att1', 'urn:ns1'); +$xw->text('a&b'); +$xw->endAttribute(); +$xw->writeAttribute('att2', "double\" single'"); +$xw->startAttributeNS('ns1', 'att2', 'urn:ns1'); +$xw->text("<>\"'&"); +$xw->endAttribute(); +$xw->writeElement('chars', "special characters: <>\"'&"); +$xw->endElement(); +$xw->endDocument(); +// Force to write and empty the buffer +$output = $xw->flush(true); +print $output; +?> +--EXPECT-- + + + + special characters: <>"'& + + diff --git a/ext/xmlwriter/tests/OO_008.phpt b/ext/xmlwriter/tests/OO_008.phpt new file mode 100644 index 000000000..5541ba1dc --- /dev/null +++ b/ext/xmlwriter/tests/OO_008.phpt @@ -0,0 +1,35 @@ +--TEST-- +XMLWriter: libxml2 XML Writer DTD Element & Attlist +--SKIPIF-- + +--FILE-- +openMemory(); +$xw->setIndent(TRUE); +$xw->startDocument(NULL, "UTF-8"); +$xw->writeDtdElement('sxe', '(elem1+, elem11, elem22*)'); +$xw->writeDtdAttlist('sxe', 'id CDATA #implied'); +$xw->startDtdElement('elem1'); +$xw->text('elem2*'); +$xw->endDtdElement(); +$xw->startDtdAttlist('elem1'); +$xw->text("attr1 CDATA #required\n"); +$xw->text('attr2 CDATA #implied'); +$xw->endDtdAttlist(); +$xw->endDocument(); +// Force to write and empty the buffer +$output = $xw->flush(true); +print $output; +?> +--EXPECT-- + + + + + diff --git a/ext/xmlwriter/tests/OO_009.phpt b/ext/xmlwriter/tests/OO_009.phpt new file mode 100644 index 000000000..5324dc7a4 --- /dev/null +++ b/ext/xmlwriter/tests/OO_009.phpt @@ -0,0 +1,43 @@ +--TEST-- +XMLWriter: PI, Comment, CDATA +--SKIPIF-- + +--FILE-- +openMemory(); +$xw->setIndent(TRUE); +$xw->startDocument("1.0", "UTF-8"); +$xw->startElement('root'); +$xw->writeAttribute('id', 'elem1'); +$xw->startElement('elem1'); +$xw->writeAttribute('attr1', 'first'); +$xw->writeComment('start PI'); +$xw->startElement('pi'); +$xw->writePi('php', 'echo "hello world"; '); +$xw->endElement(); +$xw->startElement('cdata'); +$xw->startCdata(); +$xw->text('<>&"'); +$xw->endCdata(); +$xw->endElement(); +$xw->endElement(); +$xw->endElement(); +$xw->endDocument(); +// Force to write and empty the buffer +$output = $xw->flush(true); +print $output; +?> +--EXPECT-- + + + + + + &"]]> + + diff --git a/ext/xmlwriter/xmlwriter.dsp b/ext/xmlwriter/xmlwriter.dsp new file mode 100644 index 000000000..e5eca77be --- /dev/null +++ b/ext/xmlwriter/xmlwriter.dsp @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="xmlwriter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=xmlwriter - Win32 Release_TS +!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 "xmlwriter.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 "xmlwriter.mak" CFG="xmlwriter - Win32 Release_TS" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "xmlwriter - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "xmlwriter - Win32 Debug_TS" (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)" == "xmlwriter - Win32 Release_TS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_TS" +# PROP BASE Intermediate_Dir "Release_TS" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_TS" +# PROP Intermediate_Dir "Release_TS" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XMLWRITER_EXPORTS" /D "COMPILE_DL_XMLWRITER" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D "LIBXML_THREAD_ENABLED" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XMLWRITER_EXPORTS" /D "COMPILE_DL_XMLWRITER" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_XMLWRITER=1 /D "LIBXML_STATIC" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# 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 /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\Debug_TS/php_xmlwriter.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" +# ADD LINK32 wsock32.lib php4ts.lib libxml2_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_xmlwriter.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\..\bindlib_w32\Release" +# SUBTRACT LINK32 /debug + +!ELSEIF "$(CFG)" == "xmlwriter - Win32 Debug_TS" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "xmlwriter___Win32_Debug_TS" +# PROP BASE Intermediate_Dir "xmlwriter___Win32_Debug_TS" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Debug_TS" +# PROP Intermediate_Dir "Debug_TS" +# 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 "XMLWRITER_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XMLWRITER_EXPORTS" /D "COMPILE_DL_XMLWRITER" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D "LIBXML_STATIC" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# 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 /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wsock32.lib php4ts_debug.lib libxml2_a.lib iconv.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\Debug_TS/php_xmlwriter.dll" /libpath:"..\..\Debug_TS" /libpath:"..\..\..\bindlib_w32\Release" + +!ENDIF + +# Begin Target + +# Name "xmlwriter - Win32 Release_TS" +# Name "xmlwriter - Win32 Debug_TS" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\php_xmlwriter.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\php_xmlwriter.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" +# End Group +# End Target +# End Project diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index 9d633727d..91e392844 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.c,v 1.32.2.2 2005/11/15 14:28:38 dmitry Exp $ */ +/* $Id: php_xsl.c,v 1.32.2.5 2006/01/01 12:50:17 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -38,7 +38,7 @@ static zend_object_handlers xsl_object_handlers; * * Every user visible function must have an entry in xsl_functions[]. */ -function_entry xsl_functions[] = { +zend_function_entry xsl_functions[] = { {NULL, NULL, NULL} /* Must be the last line in xsl_functions[] */ }; /* }}} */ @@ -170,6 +170,14 @@ PHP_MINIT_FUNCTION(xsl) REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER", -1, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XSL_CLONE_ALWAYS", 1, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXSLT_VERSION", LIBXSLT_VERSION, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION", LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); + +#if HAVE_XSL_EXSLT + REGISTER_LONG_CONSTANT("LIBEXSLT_VERSION", LIBEXSLT_VERSION, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("LIBEXSLT_DOTTED_VERSION", LIBEXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); +#endif + return SUCCESS; } /* }}} */ diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index c6026db55..3b9af6062 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.h,v 1.15 2005/08/03 14:08:23 sniper Exp $ */ +/* $Id: php_xsl.h,v 1.15.2.1 2006/01/01 12:50:17 sniper Exp $ */ #ifndef PHP_XSL_H #define PHP_XSL_H diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h index d856bb354..d8c3c66ba 100644 --- a/ext/xsl/xsl_fe.h +++ b/ext/xsl/xsl_fe.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xsl_fe.h,v 1.8 2005/08/03 14:08:23 sniper Exp $ */ +/* $Id: xsl_fe.h,v 1.8.2.1 2006/01/01 12:50:17 sniper Exp $ */ #ifndef XSL_FE_H #define XSL_FE_H diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 474b5aba6..7fad460d9 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xsltprocessor.c,v 1.39.2.1 2005/09/02 06:38:02 rrichards Exp $ */ +/* $Id: xsltprocessor.c,v 1.39.2.2 2006/01/01 12:50:17 sniper Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4 index ce602e553..0e9f4cd80 100644 --- a/ext/zlib/config0.m4 +++ b/ext/zlib/config0.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config0.m4,v 1.17 2005/05/29 23:16:45 sniper Exp $ +dnl $Id: config0.m4,v 1.17.2.1 2005/11/29 18:35:26 tony2001 Exp $ dnl PHP_ARG_WITH(zlib,for ZLIB support, @@ -8,7 +8,7 @@ PHP_ARG_WITH(zlib,for ZLIB support, PHP_ARG_WITH(zlib-dir,if the location of ZLIB install directory is defined, [ --with-zlib-dir= Define the location of zlib install directory], no, no) -if test "$PHP_ZLIB" != "no" -o "$PHP_ZLIB_DIR" != "no"; then +if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then PHP_NEW_EXTENSION(zlib, zlib.c zlib_fopen_wrapper.c zlib_filter.c, $ext_shared) PHP_SUBST(ZLIB_SHARED_LIBADD) diff --git a/ext/zlib/php_zlib.def b/ext/zlib/php_zlib.def index b166331fa..c0ff0dae5 100644 --- a/ext/zlib/php_zlib.def +++ b/ext/zlib/php_zlib.def @@ -13,3 +13,6 @@ EXPORTS crc32 inflateReset deflateReset + zlibVersion + zError + \ No newline at end of file diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index f4b1f93db..2cd11fc1e 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This 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_0.txt. | + | 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. | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zlib.h,v 1.42 2005/08/03 14:08:23 sniper Exp $ */ +/* $Id: php_zlib.h,v 1.42.2.1 2006/01/01 12:50:17 sniper Exp $ */ #ifndef PHP_ZLIB_H #define PHP_ZLIB_H diff --git a/ext/zlib/tests/compress_zlib_wrapper.phpt b/ext/zlib/tests/compress_zlib_wrapper.phpt index de6b3d80b..fe8774f3a 100644 --- a/ext/zlib/tests/compress_zlib_wrapper.phpt +++ b/ext/zlib/tests/compress_zlib_wrapper.phpt @@ -1,5 +1,7 @@ --TEST-- compress.zlib:// wrapper +--SKIPIF-- + --FILE--