[PHP-CVS] cvs: php-src /ext/xsl config.m4 php_xsl.c php_xsl.h
chregu Wed Nov 19 07:08:04 2003 EDT
Modified files:
/php-src/ext/xslconfig.m4 php_xsl.c php_xsl.h
Log:
added exslt support
Index: php-src/ext/xsl/config.m4
diff -u php-src/ext/xsl/config.m4:1.6 php-src/ext/xsl/config.m4:1.7
--- php-src/ext/xsl/config.m4:1.6 Mon Jun 30 13:23:52 2003
+++ php-src/ext/xsl/config.m4 Wed Nov 19 07:07:59 2003
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.6 2003/06/30 17:23:52 sniper Exp $
+dnl $Id: config.m4,v 1.7 2003/11/19 12:07:59 chregu Exp $
dnl
PHP_ARG_WITH(xsl, for XSL support,
@@ -33,9 +33,27 @@
XSL_INCS=`$XSLT_CONFIG --cflags`
PHP_EVAL_LIBLINE($XSL_LIBS, XSL_SHARED_LIBADD)
PHP_EVAL_INCLINE($XSL_INCS)
+
+ AC_MSG_CHECKING([for EXSLT support])
+ for i in $PHP_XSL /usr/local /usr; do
+if test -r "$i/include/libexslt/exslt.h"; then
+ PHP_XSL_EXSL_DIR=$i
+ break
+fi
+ done
+ if test -z "$PHP_XSL_EXSL_DIR"; then
+AC_MSG_RESULT(not found)
+ else
+AC_MSG_RESULT(found)
+PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/lib, XSL_SHARED_LIBADD)
+PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include)
+AC_DEFINE(HAVE_XSL_EXSLT,1,[ ])
+ fi
else
AC_MSG_ERROR([libxslt version 1.0.18 or greater required.])
fi
+
+
fi
AC_DEFINE(HAVE_XSL,1,[ ])
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.8 php-src/ext/xsl/php_xsl.c:1.9
--- php-src/ext/xsl/php_xsl.c:1.8 Sun Aug 24 06:18:08 2003
+++ php-src/ext/xsl/php_xsl.c Wed Nov 19 07:07:59 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: php_xsl.c,v 1.8 2003/08/24 10:18:08 rrichards Exp $ */
+/* $Id: php_xsl.c,v 1.9 2003/11/19 12:07:59 chregu Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -133,6 +133,10 @@
memcpy(&xsl_object_handlers, zend_get_std_object_handlers(),
sizeof(zend_object_handlers));
REGISTER_XSL_CLASS(ce, "xsltprocessor", NULL,
php_xsl_xsltprocessor_class_functions, xsl_xsltprocessor_class_entry);
+#if HAVE_XSL_EXSLT
+ exsltRegisterAll();
+#endif
+
return SUCCESS;
}
/* }}} */
@@ -244,12 +248,11 @@
PHP_MINFO_FUNCTION(xsl)
{
php_info_print_table_start();
- php_info_print_table_row(2, "XML/XSLT", "enabled");
{
char buffer[128];
int major, minor, subminor;
- php_info_print_table_row(2, "DOM/XSLT", "enabled");
+ php_info_print_table_row(2, "XSL", "enabled");
major = xsltLibxsltVersion/1;
minor = (xsltLibxsltVersion - major * 1) / 100;
subminor = (xsltLibxsltVersion - major * 1 - minor * 100);
@@ -261,6 +264,10 @@
snprintf(buffer, 128, "%d.%d.%d", major, minor, subminor);
php_info_print_table_row(2, "libxslt compiled against libxml Version",
buffer);
}
+#if HAVE_XSL_EXSLT
+ php_info_print_table_row(2, "EXSLT", "enabled");
+ php_info_print_table_row(2, "libexslt Version",
LIBEXSLT_DOTTED_VERSION);
+#endif
php_info_print_table_end();
/* Remove comments if you have entries in php.ini
Index: php-src/ext/xsl/php_xsl.h
diff -u php-src/ext/xsl/php_xsl.h:1.4 php-src/ext/xsl/php_xsl.h:1.5
--- php-src/ext/xsl/php_xsl.h:1.4 Sun Aug 24 06:18:08 2003
+++ php-src/ext/xsl/php_xsl.h Wed Nov 19 07:07:59 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: php_xsl.h,v 1.4 2003/08/24 10:18:08 rrichards Exp $ */
+/* $Id: php_xsl.h,v 1.5 2003/11/19 12:07:59 chregu Exp $ */
#ifndef PHP_XSL_H
#define PHP_XSL_H
@@ -38,6 +38,10 @@
#include
#include
#include
+#if HAVE_XSL_EXSLT
+#include
+#include
+#endif
#include "../dom/xml_common.h"
#include "xsl_fe.h"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard exec.c
iliaa Wed Nov 19 10:34:31 2003 EDT
Modified files:
/php-src/ext/standard exec.c
Log:
Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows).
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.105 php-src/ext/standard/exec.c:1.106
--- php-src/ext/standard/exec.c:1.105 Fri Sep 26 04:09:55 2003
+++ php-src/ext/standard/exec.c Wed Nov 19 10:34:30 2003
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <[EMAIL PROTECTED]> |
+--+
*/
-/* $Id: exec.c,v 1.105 2003/09/26 08:09:55 hholzgra Exp $ */
+/* $Id: exec.c,v 1.106 2003/11/19 15:34:30 iliaa Exp $ */
#include
#include "php.h"
@@ -322,20 +322,33 @@
cmd = safe_emalloc(4, l, 3); /* worst case */
+#ifdef PHP_WIN32
+ cmd[y++] = '"';
+#else
cmd[y++] = '\'';
-
+#endif
+
for (x = 0; x < l; x++) {
switch (str[x]) {
+#ifdef PHP_WIN32
+ case '"':
+ cmd[y++] = '\\';
+#else
case '\'':
cmd[y++] = '\'';
cmd[y++] = '\\';
cmd[y++] = '\'';
+#endif
/* fall-through */
default:
cmd[y++] = str[x];
}
}
+#ifdef PHP_WIN32
+ cmd[y++] = '"';
+#else
cmd[y++] = '\'';
+#endif
cmd[y] = '\0';
return cmd;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/standard exec.c
iliaa Wed Nov 19 10:34:38 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-srcNEWS
/php-src/ext/standard exec.c
Log:
MFH: Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows).
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.472 php-src/NEWS:1.1247.2.473
--- php-src/NEWS:1.1247.2.472 Tue Nov 18 23:44:23 2003
+++ php-src/NEWSWed Nov 19 10:34:35 2003
@@ -3,6 +3,7 @@
?? ??? 2003, Version 4.3.5
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). (Ilia)
- Fixed bug #26267 (gmp_random() leaks memory and does not produce random
numbers). (Jani)
- Fixed bug #26253 (ext/tokenizer: build as shared extension fails). (Jani)
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.84.2.12 php-src/ext/standard/exec.c:1.84.2.13
--- php-src/ext/standard/exec.c:1.84.2.12 Thu Aug 28 11:54:35 2003
+++ php-src/ext/standard/exec.c Wed Nov 19 10:34:36 2003
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf |
+--+
*/
-/* $Id: exec.c,v 1.84.2.12 2003/08/28 15:54:35 sas Exp $ */
+/* $Id: exec.c,v 1.84.2.13 2003/11/19 15:34:36 iliaa Exp $ */
#include
#include "php.h"
@@ -462,21 +462,33 @@
l = strlen(str);
cmd = emalloc(4 * l + 3); /* worst case */
-
+#ifdef PHP_WIN32
+ cmd[y++] = '"';
+#else
cmd[y++] = '\'';
+#endif
for (x = 0; x < l; x++) {
switch (str[x]) {
+#ifdef PHP_WIN32
+ case '"':
+ cmd[y++] = '\\';
+#else
case '\'':
cmd[y++] = '\'';
cmd[y++] = '\\';
cmd[y++] = '\'';
+#endif
/* fall-through */
default:
cmd[y++] = str[x];
}
}
+#ifdef PHP_WIN32
+ cmd[y++] = '"';
+#else
cmd[y++] = '\'';
+#endif
cmd[y] = '\0';
return cmd;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c
iliaa Wed Nov 19 10:49:56 2003 EDT
Modified files:
/php-src/ext/gd gd.c
Log:
Fixed bug #26309 (Fixed argument parsing for imageftbbox()).
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.279 php-src/ext/gd/gd.c:1.280
--- php-src/ext/gd/gd.c:1.279 Mon Sep 15 03:27:18 2003
+++ php-src/ext/gd/gd.c Wed Nov 19 10:49:55 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: gd.c,v 1.279 2003/09/15 07:27:18 moriyoshi Exp $ */
+/* $Id: gd.c,v 1.280 2003/11/19 15:49:55 iliaa Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -3086,13 +3086,11 @@
argc = ZEND_NUM_ARGS();
if (mode == TTFTEXT_BBOX) {
- if ((extended && argc != 5) || (!extended && argc != 4) ||
- zend_get_parameters_ex(argc, &PTSIZE, &ANGLE,
&FONTNAME, &C, &EXT) == FAILURE) {
+ if (argc < 4 || argc > 5 || zend_get_parameters_ex(argc, &PTSIZE,
&ANGLE, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
} else {
- if ((extended && argc != 9) || (!extended && argc != 8) ||
- zend_get_parameters_ex(argc, &IM, &PTSIZE, &ANGLE, &X,
&Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
+ if (argc < 8 || argc > 9 || zend_get_parameters_ex(argc, &IM, &PTSIZE,
&ANGLE, &X, &Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/gd gd.c
iliaa Wed Nov 19 10:50:06 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-srcNEWS
/php-src/ext/gd gd.c
Log:
MFH: Fixed bug #26309 (Fixed argument parsing for imageftbbox()).
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.473 php-src/NEWS:1.1247.2.474
--- php-src/NEWS:1.1247.2.473 Wed Nov 19 10:34:35 2003
+++ php-src/NEWSWed Nov 19 10:50:03 2003
@@ -3,6 +3,7 @@
?? ??? 2003, Version 4.3.5
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26309 (Fixed argument parsing for imageftbbox()). (Ilia)
- Fixed bug #26285 (escapeshellarg() uses wrong quotes on windows). (Ilia)
- Fixed bug #26267 (gmp_random() leaks memory and does not produce random
numbers). (Jani)
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.221.2.31 php-src/ext/gd/gd.c:1.221.2.32
--- php-src/ext/gd/gd.c:1.221.2.31 Thu Aug 28 16:25:31 2003
+++ php-src/ext/gd/gd.c Wed Nov 19 10:50:05 2003
@@ -18,7 +18,7 @@
+--+
*/
-/* $Id: gd.c,v 1.221.2.31 2003/08/28 20:25:31 andrey Exp $ */
+/* $Id: gd.c,v 1.221.2.32 2003/11/19 15:50:05 iliaa Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -2970,13 +2970,11 @@
argc = ZEND_NUM_ARGS();
if (mode == TTFTEXT_BBOX) {
- if ((extended && argc != 5) || (!extended && argc != 4) ||
- zend_get_parameters_ex(argc, &PTSIZE, &ANGLE,
&FONTNAME, &C, &EXT) == FAILURE) {
+ if (argc < 4 || argc > 5 || zend_get_parameters_ex(argc, &PTSIZE,
&ANGLE, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
} else {
- if ((extended && argc != 9) || (!extended && argc != 8) ||
- zend_get_parameters_ex(argc, &IM, &PTSIZE, &ANGLE, &X,
&Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
+ if (argc < 8 || argc > 9 || zend_get_parameters_ex(argc, &IM, &PTSIZE,
&ANGLE, &X, &Y, &COL, &FONTNAME, &C, &EXT) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26317.phpt
hholzgraWed Nov 19 11:01:26 2003 EDT
Added files:
/php-src/ext/standard/tests/timebug26317.phpt
Log:
regression test for http://bugs.php.net/bug.php?id=26317
"military timezones and strtotime()"
Index: php-src/ext/standard/tests/time/bug26317.phpt
+++ php-src/ext/standard/tests/time/bug26317.phpt
--TEST--
Bug #x (military timezone offset signedness)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
}
--FILE--
--EXPECT--
2003-11-19 12:30:42
2003-11-19 05:30:42
2003-11-19 22:30:42
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26317.phpt
hholzgraWed Nov 19 11:19:28 2003 EDT
Modified files:
/php-src/ext/standard/tests/timebug26317.phpt
Log:
Testcase done right ...
Index: php-src/ext/standard/tests/time/bug26317.phpt
diff -u php-src/ext/standard/tests/time/bug26317.phpt:1.1
php-src/ext/standard/tests/time/bug26317.phpt:1.2
--- php-src/ext/standard/tests/time/bug26317.phpt:1.1 Wed Nov 19 11:01:25 2003
+++ php-src/ext/standard/tests/time/bug26317.phpt Wed Nov 19 11:19:28 2003
@@ -1,5 +1,5 @@
--TEST--
-Bug #x (military timezone offset signedness)
+Bug #26317 (military timezone offset signedness)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
@@ -7,11 +7,11 @@
--FILE--
--EXPECT--
-2003-11-19 12:30:42
-2003-11-19 05:30:42
-2003-11-19 22:30:42
\ No newline at end of file
+2003-11-19 16:20:42
+2003-11-19 16:20:42
+2003-11-19 16:20:42
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard parsedate.y /ext/standard/tests/time bug26317.phpt
hholzgraWed Nov 19 11:22:11 2003 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/timebug26317.phpt
Modified files:
/php-src/ext/standard parsedate.y
Log:
MFH
Index: php-src/ext/standard/parsedate.y
diff -u php-src/ext/standard/parsedate.y:1.34.2.3
php-src/ext/standard/parsedate.y:1.34.2.4
--- php-src/ext/standard/parsedate.y:1.34.2.3 Tue Nov 11 21:58:37 2003
+++ php-src/ext/standard/parsedate.yWed Nov 19 11:22:10 2003
@@ -8,7 +8,7 @@
** This code is in the public domain and has no copyright.
*/
-/* $Id: parsedate.y,v 1.34.2.3 2003/11/12 02:58:37 iliaa Exp $ */
+/* $Id: parsedate.y,v 1.34.2.4 2003/11/19 16:22:10 hholzgra Exp $ */
#include "php.h"
@@ -620,30 +620,30 @@
/* Military timezone table. */
static TABLE const MilitaryTable[] = {
-{ "a", tZONE, HOUR ( 1) },
-{ "b", tZONE, HOUR ( 2) },
-{ "c", tZONE, HOUR ( 3) },
-{ "d", tZONE, HOUR ( 4) },
-{ "e", tZONE, HOUR ( 5) },
-{ "f", tZONE, HOUR ( 6) },
-{ "g", tZONE, HOUR ( 7) },
-{ "h", tZONE, HOUR ( 8) },
-{ "i", tZONE, HOUR ( 9) },
-{ "k", tZONE, HOUR ( 10) },
-{ "l", tZONE, HOUR ( 11) },
-{ "m", tZONE, HOUR ( 12) },
-{ "n", tZONE, HOUR (- 1) },
-{ "o", tZONE, HOUR (- 2) },
-{ "p", tZONE, HOUR (- 3) },
-{ "q", tZONE, HOUR (- 4) },
-{ "r", tZONE, HOUR (- 5) },
-{ "s", tZONE, HOUR (- 6) },
-{ "t", tZONE, HOUR (- 7) },
-{ "u", tZONE, HOUR (- 8) },
-{ "v", tZONE, HOUR (- 9) },
-{ "w", tZONE, HOUR (-10) },
-{ "x", tZONE, HOUR (-11) },
-{ "y", tZONE, HOUR (-12) },
+{ "a", tZONE, HOUR (- 1) },
+{ "b", tZONE, HOUR (- 2) },
+{ "c", tZONE, HOUR (- 3) },
+{ "d", tZONE, HOUR (- 4) },
+{ "e", tZONE, HOUR (- 5) },
+{ "f", tZONE, HOUR (- 6) },
+{ "g", tZONE, HOUR (- 7) },
+{ "h", tZONE, HOUR (- 8) },
+{ "i", tZONE, HOUR (- 9) },
+{ "k", tZONE, HOUR (-10) },
+{ "l", tZONE, HOUR (-11) },
+{ "m", tZONE, HOUR (-12) },
+{ "n", tZONE, HOUR ( 1) },
+{ "o", tZONE, HOUR ( 2) },
+{ "p", tZONE, HOUR ( 3) },
+{ "q", tZONE, HOUR ( 4) },
+{ "r", tZONE, HOUR ( 5) },
+{ "s", tZONE, HOUR ( 6) },
+{ "t", tZONE, HOUR ( 7) },
+{ "u", tZONE, HOUR ( 8) },
+{ "v", tZONE, HOUR ( 9) },
+{ "w", tZONE, HOUR ( 10) },
+{ "x", tZONE, HOUR ( 11) },
+{ "y", tZONE, HOUR ( 12) },
{ "z", tZONE, HOUR ( 0) },
{ NULL, 0, 0 }
};
Index: php-src/ext/standard/tests/time/bug26317.phpt
+++ php-src/ext/standard/tests/time/bug26317.phpt
--TEST--
Bug #x (military timezone offset signedness)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
}
--FILE--
--EXPECT--
2003-11-19 12:30:42
2003-11-19 05:30:42
2003-11-19 22:30:42
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:37:51 2003 EDT
Added files:
/php-src/ext/standard/tests/timebug26320.phpt
Log:
regression test for bug # 26320
"strtotime() does not understand ISO6801 datetime format as used in XMLSchema"
Index: php-src/ext/standard/tests/time/bug26320.phpt
+++ php-src/ext/standard/tests/time/bug26320.phpt
--TEST--
Bug #26320 (strtotime handling of XML Schema/ISO 6801 format)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
}
--FILE--
--EXPECT--
2003-11-19 12:30:42
2003-11-19 12:30:42
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:40:01 2003 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/timebug26320.phpt
Log:
MFH
Index: php-src/ext/standard/tests/time/bug26320.phpt
+++ php-src/ext/standard/tests/time/bug26320.phpt
--TEST--
Bug #26320 (strtotime handling of XML Schema/ISO 6801 format)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
}
--FILE--
--EXPECT--
2003-11-19 12:30:42
2003-11-19 12:30:42
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 11:44:51 2003 EDT Removed files: (Branch: PHP_4_3) /php-src/ext/standard/tests/timebug26320.phpt Log: removed ext/standard/tests/time/bug26320.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time bug26320.phpt
hholzgraWed Nov 19 12:38:43 2003 EDT
Modified files:
/php-src/ext/standard/tests/timebug26320.phpt
Log:
typo fix
Index: php-src/ext/standard/tests/time/bug26320.phpt
diff -u php-src/ext/standard/tests/time/bug26320.phpt:1.1
php-src/ext/standard/tests/time/bug26320.phpt:1.2
--- php-src/ext/standard/tests/time/bug26320.phpt:1.1 Wed Nov 19 11:37:50 2003
+++ php-src/ext/standard/tests/time/bug26320.phpt Wed Nov 19 12:38:42 2003
@@ -1,5 +1,5 @@
--TEST--
-Bug #26320 (strtotime handling of XML Schema/ISO 6801 format)
+Bug #26320 (strtotime handling of XML Schema/ISO 8601 format)
--SKIP--
if ([EMAIL PROTECTED]("TZ=GMT0") || getenv("TZ") != 'GMT0') {
die("skip unable to change TZ enviroment variable\n");
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard parsedate.y
hholzgraWed Nov 19 14:55:13 2003 EDT
Modified files:
/php-src/ext/standard parsedate.y
Log:
XSchema stuff finally done right ... (at least i hope so ...)
Index: php-src/ext/standard/parsedate.y
diff -u php-src/ext/standard/parsedate.y:1.45 php-src/ext/standard/parsedate.y:1.46
--- php-src/ext/standard/parsedate.y:1.45 Tue Nov 18 01:46:07 2003
+++ php-src/ext/standard/parsedate.yWed Nov 19 14:55:13 2003
@@ -8,7 +8,7 @@
** This code is in the public domain and has no copyright.
*/
-/* $Id: parsedate.y,v 1.45 2003/11/18 06:46:07 hholzgra Exp $ */
+/* $Id: parsedate.y,v 1.46 2003/11/19 19:55:13 hholzgra Exp $ */
#include "php.h"
@@ -136,7 +136,6 @@
int yyRelMonth;
int yyRelSeconds;
int yyRelYear;
- int yyFlag;
};
typedef union _date_ll {
@@ -151,10 +150,12 @@
%}
-/* This grammar has 19 shift/reduce conflicts. */
-%expect 19
+/* This grammar has 21 shift/reduce conflicts. */
+%expect 21
%pure_parser
+%debug
+
%token tAGO tDAY tDAY_UNIT tDAYZONE tDST tHOUR_UNIT tID tTZONE tZZONE
%token tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT
%token tSEC_UNIT tSNUMBER tUNUMBER tYEAR_UNIT tZONE
@@ -228,15 +229,25 @@
} else {
((struct date_yy *)parm)->yyTimezone = -$6 * 60;
}
- }
- | tUNUMBER ':' tUNUMBER ':' tUNUMBER '.' tUNUMBER pgsqlzonepart {
+}
+| tUNUMBER ':' tUNUMBER ':' tUNUMBER '.' tUNUMBER pgsqlzonepart {
((struct date_yy *)parm)->yyHour = $1;
((struct date_yy *)parm)->yyMinutes = $3;
((struct date_yy *)parm)->yySeconds = $5;
((struct date_yy *)parm)->yyMeridian = MER24;
}
+ | iso8601time
;
+iso8601time: tUNUMBER ':' tUNUMBER ':' tUNUMBER {
+ ((struct date_yy *)parm)->yyHour = $1;
+ ((struct date_yy *)parm)->yyMinutes = $3;
+ ((struct date_yy *)parm)->yySeconds = $5;
+ ((struct date_yy *)parm)->yyMeridian = MER24;
+ }
+;
+
+
pgsqlzonepart : tSNUMBER {
((struct date_yy *)parm)->yyHaveZone++;
if ($1 <= -100 || $1 >= 100) {
@@ -261,14 +272,9 @@
*/
zone : tTZONE {
- ((struct date_yy *)parm)->yyFlag = 1;
((struct date_yy *)parm)->yyTimezone = $1;
}
| tZZONE {
- if (((struct date_yy *)parm)->yyFlag) {
- ((struct date_yy *)parm)->yyHaveZone--;
- ((struct date_yy *)parm)->yyFlag = 0;
- }
((struct date_yy *)parm)->yyTimezone = $1;
}
| tZONE {
@@ -330,12 +336,17 @@
((struct date_yy *)parm)->yyYear = $5;
}
}
- | tUNUMBER tSNUMBER tSNUMBER {
- /* ISO 8601 format. -mm-dd. */
- ((struct date_yy *)parm)->yyYear = $1;
- ((struct date_yy *)parm)->yyMonth = -$2;
- ((struct date_yy *)parm)->yyDay = -$3;
- }
+ | iso8601date
+| iso8601date tTZONE iso8601time {
+ ((struct date_yy *)parm)->yyTimezone = 0;
+ ((struct date_yy *)parm)->yyHaveZone++;
+ ((struct date_yy *)parm)->yyHaveTime++;
+}
+| iso8601date tTZONE iso8601time tZZONE {
+ ((struct date_yy *)parm)->yyTimezone = 0;
+ ((struct date_yy *)parm)->yyHaveZone++;
+ ((struct date_yy *)parm)->yyHaveTime++;
+}
| tUNUMBER tMONTH tSNUMBER {
/* e.g. 17-JUN-1992. */
((struct date_yy *)parm)->yyDay = $1;
@@ -375,6 +386,14 @@
}
;
+iso8601date: tUNUMBER tSNUMBER tSNUMBER {
+ /* ISO 8601 format. -mm-dd. */
+ ((struct date_yy *)parm)->yyYear = $1;
+ ((struct date_yy *)parm)->yyMonth = -$2;
+ ((struct date_yy *)parm)->yyDay = -$3;
+ }
+;
+
rel: relunit tAGO {
((struct date_yy *)parm)->yyRelSeconds =
-((struct date_yy *)parm)->yyRelSeconds;
@@ -989,13 +1008,12 @@
date.yyHaveRel = 0;
date.yyHaveTime = 0;
date.yyHaveZone = 0;
- date.yyFlag = 0;
if (yyparse ((void *)&date)
|| date.yyHaveTime > 1 || date.yyHaveZone > 1
- || date.yyHaveDate > 1 || date.yyHaveDay > 1)
+ || date.yyHaveDate > 1 || date.yyHaveDay > 1) {
return -1;
-
+ }
tm.tm_year = ToYear (date.yyYear) - TM_YEAR_ORIGIN + date.yyRelYear;
tm.tm_mon = date.yyMonth - 1 + date.yyRelMonth;
tm.tm_mday = date.yyDay + date.yyRelDay;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c
hholzgraWed Nov 19 15:11:30 2003 EDT
Modified files:
/php-src/ext/mysqli mysqli_api.c
Log:
proto fix
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.48 php-src/ext/mysqli/mysqli_api.c:1.49
--- php-src/ext/mysqli/mysqli_api.c:1.48Thu Oct 30 07:35:16 2003
+++ php-src/ext/mysqli/mysqli_api.c Wed Nov 19 15:11:29 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]>|
+--+
- $Id: mysqli_api.c,v 1.48 2003/10/30 12:35:16 georg Exp $
+ $Id: mysqli_api.c,v 1.49 2003/11/19 20:11:29 hholzgra Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1014,7 +1014,7 @@
}
/* }}} */
-/* {{{ proto int mysqli_get_proto_info
+/* {{{ proto int mysqli_get_proto_info(object link)
Get MySQL protocol information */
PHP_FUNCTION(mysqli_get_proto_info)
{
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache_hooks php_apache.c
hholzgraWed Nov 19 15:13:50 2003 EDT
Modified files:
/php-src/sapi/apache_hooks php_apache.c
Log:
proto fix
Index: php-src/sapi/apache_hooks/php_apache.c
diff -u php-src/sapi/apache_hooks/php_apache.c:1.14
php-src/sapi/apache_hooks/php_apache.c:1.15
--- php-src/sapi/apache_hooks/php_apache.c:1.14 Tue Jun 10 16:03:44 2003
+++ php-src/sapi/apache_hooks/php_apache.c Wed Nov 19 15:13:49 2003
@@ -17,7 +17,7 @@
| David Sklar <[EMAIL PROTECTED]> |
+--+
*/
-/* $Id: php_apache.c,v 1.14 2003/06/10 20:03:44 imajes Exp $ */
+/* $Id: php_apache.c,v 1.15 2003/11/19 20:13:49 hholzgra Exp $ */
#include "php_apache_http.h"
@@ -1228,7 +1228,7 @@
}
/* }}} */
-/* {{{ proto long apache_request_run
+/* {{{ proto long apache_request_run()
This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes
sub_request, runs it, destroys it, and returns it's status.
*/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c head.c head.h
pollita Wed Nov 19 16:10:34 2003 EDT
Modified files:
/php-src/ext/standard head.c head.h basic_functions.c
/php-srcNEWS
Log:
New function: headers_list(). Ennumerate headers sent to SAPI engine
Index: php-src/ext/standard/head.c
diff -u php-src/ext/standard/head.c:1.71 php-src/ext/standard/head.c:1.72
--- php-src/ext/standard/head.c:1.71Wed Aug 20 16:51:10 2003
+++ php-src/ext/standard/head.c Wed Nov 19 16:10:29 2003
@@ -15,7 +15,7 @@
| Author: Rasmus Lerdorf <[EMAIL PROTECTED]>|
+--+
*/
-/* $Id: head.c,v 1.71 2003/08/20 20:51:10 bfrance Exp $ */
+/* $Id: head.c,v 1.72 2003/11/19 21:10:29 pollita Exp $ */
#include
@@ -223,6 +223,33 @@
}
/* }}} */
+/* {{{ php_head_apply_header_list_to_hash
+ Turn an llist of sapi_header_struct headers into a numerically indexed zval hash */
+static void php_head_apply_header_list_to_hash(void *data, void *arg TSRMLS_DC)
+{
+ sapi_header_struct *sapi_header = (sapi_header_struct *)data;
+
+ if (arg && sapi_header) {
+ add_next_index_string((zval *)arg, (char *)(sapi_header->header), 1);
+ }
+}
+
+/* {{{ proto string headers_list(void)
+ Return list of headers to be sent / already sent */
+PHP_FUNCTION(headers_list)
+{
+ if (ZEND_NUM_ARGS() > 0) {
+ WRONG_PARAM_COUNT;
+ }
+
+ if (!&SG(sapi_headers).headers) {
+ RETURN_FALSE;
+ }
+ array_init(return_value);
+ zend_llist_apply_with_argument(&SG(sapi_headers).headers,
php_head_apply_header_list_to_hash, return_value);
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
Index: php-src/ext/standard/head.h
diff -u php-src/ext/standard/head.h:1.25 php-src/ext/standard/head.h:1.26
--- php-src/ext/standard/head.h:1.25Wed Aug 20 16:51:10 2003
+++ php-src/ext/standard/head.h Wed Nov 19 16:10:29 2003
@@ -16,7 +16,7 @@
+--+
*/
-/* $Id: head.h,v 1.25 2003/08/20 20:51:10 bfrance Exp $ */
+/* $Id: head.h,v 1.26 2003/11/19 21:10:29 pollita Exp $ */
#ifndef HEAD_H
#define HEAD_H
@@ -26,6 +26,7 @@
PHP_FUNCTION(setcookie);
PHP_FUNCTION(setrawcookie);
PHP_FUNCTION(headers_sent);
+PHP_FUNCTION(headers_list);
PHPAPI int php_header(TSRMLS_D);
PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t
expires, char *path, int path_len, char *domain, int domain_len, int secure, int
url_encode TSRMLS_DC);
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.641
php-src/ext/standard/basic_functions.c:1.642
--- php-src/ext/standard/basic_functions.c:1.641Fri Nov 14 17:55:54 2003
+++ php-src/ext/standard/basic_functions.c Wed Nov 19 16:10:29 2003
@@ -17,7 +17,7 @@
+--+
*/
-/* $Id: basic_functions.c,v 1.641 2003/11/14 22:55:54 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.642 2003/11/19 21:10:29 pollita Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -620,6 +620,7 @@
PHP_FE(setrawcookie,
NULL)
PHP_FE(header,
NULL)
PHP_FE(headers_sent, first_and_second__args_force_ref)
+ PHP_FE(headers_list,
NULL)
PHP_FE(connection_aborted,
NULL)
PHP_FE(connection_status,
NULL)
Index: php-src/NEWS
diff -u php-src/NEWS:1.1499 php-src/NEWS:1.1500
--- php-src/NEWS:1.1499 Fri Nov 14 17:55:53 2003
+++ php-src/NEWSWed Nov 19 16:10:33 2003
@@ -4,6 +4,7 @@
- Added new functions:
. dba_key_split() to split inifile keys in an array. (Marcus)
. time_nanosleep() signal safe sleep (Magnus, Ilia)
+ . headers_list(). (Sara)
- Fixed bug #26072 (--disable-libxml does not work). (Jani)
- Fixed bug #26083 (Non-working write support in ext/dom). (Ilia)
- Fixed bug #24394 (Serializing cross-referenced objects causes segfault).
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c head.c head.h
As Andi might say: "Why not call this http_headers()?" :)
(and also rename 'headers_sent' -> http_headers_sent() :)
--Jani
On Wed, 19 Nov 2003, Sara Golemon wrote:
>pollitaWed Nov 19 16:10:34 2003 EDT
>
> Modified files:
>/php-src/ext/standard head.c head.h basic_functions.c
>/php-src NEWS
> Log:
> New function: headers_list(). Ennumerate headers sent to SAPI engine
>
>Index: php-src/ext/standard/head.c
>diff -u php-src/ext/standard/head.c:1.71 php-src/ext/standard/head.c:1.72
>--- php-src/ext/standard/head.c:1.71 Wed Aug 20 16:51:10 2003
>+++ php-src/ext/standard/head.cWed Nov 19 16:10:29 2003
>@@ -15,7 +15,7 @@
>| Author: Rasmus Lerdorf <[EMAIL PROTECTED]>|
>+--+
> */
>-/* $Id: head.c,v 1.71 2003/08/20 20:51:10 bfrance Exp $ */
>+/* $Id: head.c,v 1.72 2003/11/19 21:10:29 pollita Exp $ */
>
> #include
>
>@@ -223,6 +223,33 @@
> }
> /* }}} */
>
>+/* {{{ php_head_apply_header_list_to_hash
>+ Turn an llist of sapi_header_struct headers into a numerically indexed zval hash
>*/
>+static void php_head_apply_header_list_to_hash(void *data, void *arg TSRMLS_DC)
>+{
>+ sapi_header_struct *sapi_header = (sapi_header_struct *)data;
>+
>+ if (arg && sapi_header) {
>+ add_next_index_string((zval *)arg, (char *)(sapi_header->header), 1);
>+ }
>+}
>+
>+/* {{{ proto string headers_list(void)
>+ Return list of headers to be sent / already sent */
>+PHP_FUNCTION(headers_list)
>+{
>+ if (ZEND_NUM_ARGS() > 0) {
>+ WRONG_PARAM_COUNT;
>+ }
>+
>+ if (!&SG(sapi_headers).headers) {
>+ RETURN_FALSE;
>+ }
>+ array_init(return_value);
>+ zend_llist_apply_with_argument(&SG(sapi_headers).headers,
>php_head_apply_header_list_to_hash, return_value);
>+}
>+/* }}} */
>+
> /*
> * Local variables:
> * tab-width: 4
>Index: php-src/ext/standard/head.h
>diff -u php-src/ext/standard/head.h:1.25 php-src/ext/standard/head.h:1.26
>--- php-src/ext/standard/head.h:1.25 Wed Aug 20 16:51:10 2003
>+++ php-src/ext/standard/head.hWed Nov 19 16:10:29 2003
>@@ -16,7 +16,7 @@
>+--+
> */
>
>-/* $Id: head.h,v 1.25 2003/08/20 20:51:10 bfrance Exp $ */
>+/* $Id: head.h,v 1.26 2003/11/19 21:10:29 pollita Exp $ */
>
> #ifndef HEAD_H
> #define HEAD_H
>@@ -26,6 +26,7 @@
> PHP_FUNCTION(setcookie);
> PHP_FUNCTION(setrawcookie);
> PHP_FUNCTION(headers_sent);
>+PHP_FUNCTION(headers_list);
>
> PHPAPI int php_header(TSRMLS_D);
> PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len,
> time_t expires, char *path, int path_len, char *domain, int domain_len, int secure,
> int url_encode TSRMLS_DC);
>Index: php-src/ext/standard/basic_functions.c
>diff -u php-src/ext/standard/basic_functions.c:1.641
>php-src/ext/standard/basic_functions.c:1.642
>--- php-src/ext/standard/basic_functions.c:1.641 Fri Nov 14 17:55:54 2003
>+++ php-src/ext/standard/basic_functions.c Wed Nov 19 16:10:29 2003
>@@ -17,7 +17,7 @@
>+--+
> */
>
>-/* $Id: basic_functions.c,v 1.641 2003/11/14 22:55:54 iliaa Exp $ */
>+/* $Id: basic_functions.c,v 1.642 2003/11/19 21:10:29 pollita Exp $ */
>
> #include "php.h"
> #include "php_streams.h"
>@@ -620,6 +620,7 @@
> PHP_FE(setrawcookie,
> NULL)
> PHP_FE(header,
> NULL)
> PHP_FE(headers_sent, first_and_second__args_force_ref)
>+ PHP_FE(headers_list,
> NULL)
>
> PHP_FE(connection_aborted,
> NULL)
> PHP_FE(connection_status,
> NULL)
>Index: php-src/NEWS
>diff -u php-src/NEWS:1.1499 php-src/NEWS:1.1500
>--- php-src/NEWS:1.1499Fri Nov 14 17:55:53 2003
>+++ php-src/NEWS Wed Nov 19 16:10:33 2003
>@@ -4,6 +4,7 @@
> - Added new functions:
> . dba_key_split() to split inifile keys in an array. (Marcus)
> . time_nanosleep() signal safe sleep (Magnus, Ilia)
>+ . headers_list(). (Sara)
> - Fixed bug #26072 (--disable-libxml does not work). (Jani)
> - Fixed bug #26083 (Non-working write support in ext/dom). (Ilia)
> - Fixed bug #24394 (Serializing cross-referenced objects causes segfault).
>
>
--
https://www.paypal.com/xclick/[EMAIL PROTECTED]&no_note=1&tax=0¤cy_code=EUR
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
