[PHP-CVS] cvs: php4 /ext/com COM.c

2002-10-31 Thread Wez Furlong
wez Thu Oct 31 03:23:56 2002 EDT

  Modified files:  
/php4/ext/com   COM.c 
  Log:
  Correct a copy-n-paste bug.  Spotted by Michael Sisolak [EMAIL PROTECTED]
  
  
Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.88 php4/ext/com/COM.c:1.89
--- php4/ext/com/COM.c:1.88 Thu Oct 17 12:21:00 2002
+++ php4/ext/com/COM.c  Thu Oct 31 03:23:55 2002
@@ -18,7 +18,7 @@
| Wez Furlong [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: COM.c,v 1.88 2002/10/17 16:21:00 phanto Exp $ */
+/* $Id: COM.c,v 1.89 2002/10/31 08:23:55 wez Exp $ */
 /*
  * This module implements support for COM components that support the IDispatch
  * interface.  Both local (COM) and remote (DCOM) components can be accessed.
@@ -1710,7 +1710,7 @@
int arg_count = ZEND_NUM_ARGS();
VARIANT *var_result;
 
-   if (arg_count3) {
+   if (arg_count  2) {
ZEND_WRONG_PARAM_COUNT();
}
arguments = (zval **) emalloc(sizeof(pval *)*arg_count);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/calendar calendar.c jewish.c sdncal.h

2002-10-31 Thread Derick Rethans
derick  Thu Oct 31 04:16:23 2002 EDT

  Modified files:  
/php4/ext/calendar  calendar.c jewish.c sdncal.h 
  Log:
  - Added an aditional parameter to the jdtojewish() function which makes
the function return the symbolic hebrew name. (Patch by Moshe Doron
[EMAIL PROTECTED])
  @- Added an aditional parameter to the jdtojewish() function which makes
  @  the function return the symbolic hebrew name. (Moshe Doron, Derick)
  
  
Index: php4/ext/calendar/calendar.c
diff -u php4/ext/calendar/calendar.c:1.26 php4/ext/calendar/calendar.c:1.27
--- php4/ext/calendar/calendar.c:1.26   Thu Sep 19 17:51:34 2002
+++ php4/ext/calendar/calendar.cThu Oct 31 04:16:23 2002
@@ -18,7 +18,7 @@
|  Wez Furlong   [EMAIL PROTECTED]|
+--+
  */
-/* $Id: calendar.c,v 1.26 2002/09/19 21:51:34 cmv Exp $ */
+/* $Id: calendar.c,v 1.27 2002/10/31 09:16:23 derick Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -33,6 +33,8 @@
 #include php_calendar.h
 #include sdncal.h
 
+#include stdio.h
+ 
 function_entry calendar_functions[] = {
PHP_FE(jdtogregorian, NULL)
PHP_FE(gregoriantojd, NULL)
@@ -108,6 +110,9 @@
 enum   { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG,
CAL_MONTH_JULIAN_SHORT, CAL_MONTH_JULIAN_LONG, CAL_MONTH_JEWISH,
CAL_MONTH_FRENCH };
+
+/* for heb_number_to_chars */
+char alef_bet[25] = 0àáâãäåæçèéëìîðñòôö÷øùú;

 PHP_MINIT_FUNCTION(calendar)
 {
@@ -371,24 +376,111 @@
 }
 /* }}} */
 
+/* 
+   caution: the hebrew format product non unique result.
+   for example both: year '5' and year '5000' product 'ä'.
+   use the numeric one for calculations. 
+ */
+char* heb_number_to_chars(int n) {
+   char *p, *old, *ret;
+   
+   p = emalloc(10);
+   old = p;
+
+   /* 
+  prevents the option breaking the jewish beliefs, and some other 
+  critical resources ;)
+   */
+   if (n   || n  1) return NULL;
+
+   /* alafim case */
+   if (n / 1000) {
+   *p = alef_bet[n / 1000];
+   p++;
+   n = n % 1000;
+   }
+
+   /* taf-taf case */
+   while (n = 400) {
+   *p = alef_bet[22];
+   p++;
+   n-=400;
+   }
+   
+   /* meot case */
+   if (n = 100) { 
+   *p = alef_bet[18+n/100];
+   p++;
+   n = n % 100;
+   }
+   
+   /* tet-vav tet-zain case */
+   if (n == 15 || n == 16) {
+   *p = alef_bet[9];
+   p++;
+   *p = alef_bet[n-9];
+   p++;
+   } else {
+   /* asarot case */
+   if (n = 10) {   
+   *p = alef_bet[9+n/10];
+   p++;
+   n = n % 10;
+   }
+   
+   /* yeihot case */
+   if (n  0) {
+   *p = alef_bet[n];
+   p++;
+   }
+   }
+
+   *p = '\0';
+   ret = emalloc((int) (p - old) + 1);
+   strncpy(ret, old, (int) (p - old) + 1);
+   return ret;
+}
+
 /* {{{ proto string jdtojewish(int juliandaycount)
Converts a julian day count to a jewish calendar date */
  PHP_FUNCTION(jdtojewish) 
 {
-   pval **julday;
+   long julday, fl;
int year, month, day;
-   char date[10];
-
-   if (zend_get_parameters_ex(1, julday) != SUCCESS) {
+   char date[10], hebdate[25];
+   
+   if (ZEND_NUM_ARGS() == 1) {
+   if (zend_parse_parameters(1 TSRMLS_CC,l, julday) != SUCCESS) {
+   RETURN_FALSE;
+   }
+   fl=0;
+   } else if (ZEND_NUM_ARGS() == 2) {
+   if (zend_parse_parameters(2 TSRMLS_CC,ll, julday, fl) != SUCCESS) {
+   RETURN_FALSE;
+   }
+   } else {
WRONG_PARAM_COUNT;
}

-   convert_to_long_ex(julday);

-   SdnToJewish(Z_LVAL_PP(julday), year, month, day);
-   sprintf(date, %i/%i/%i, month, day, year);
-
-   RETURN_STRING(date, 1);
+   SdnToJewish(julday, year, month, day);
+   if(!fl) {
+   sprintf(date, %i/%i/%i, month, day, year);
+   RETURN_STRING(date, 1);
+   } else {
+   if (year = 0 || year  ) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Out of range 
+year.);
+

[PHP-CVS] cvs: php4 / Makefile.global run-tests.php

2002-10-31 Thread Yasuo Ohgaki
yohgaki Thu Oct 31 08:52:58 2002 EDT

  Modified files:  
/php4   Makefile.global run-tests.php 
  Log:
  Fixed more ini settings.
  # Derick. Be responsible to your change and opinion.
  # These are settings I know that should be set. 
  # There may be other settingis must be set to make 
  # run-tests.php work as expected.
  
  
Index: php4/Makefile.global
diff -u php4/Makefile.global:1.37 php4/Makefile.global:1.38
--- php4/Makefile.global:1.37   Tue Oct 29 10:22:41 2002
+++ php4/Makefile.globalThu Oct 31 08:52:58 2002
 -50,7 +50,7 
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
 TEST_PHP_SRCDIR=$(top_srcdir) \
 CC=$(CC) \
-   $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 
'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS)
+   $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 
+'safe_mode=0' -d 'safe_mode=0' -d 'output_buffering=Off' -d 'auto_prepend_file=' -d 
+'auto_append_file=' -d 'output_handler=' -d 'register_argv=1' -d 'disable_functions=' 
+$(top_srcdir)/run-tests.php $(TESTS)
 
 clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.102 php4/run-tests.php:1.103
--- php4/run-tests.php:1.102Wed Oct 30 13:36:39 2002
+++ php4/run-tests.php  Thu Oct 31 08:52:58 2002
 -44,8 +44,9 
 
 $cwd = getcwd();
 set_time_limit(0);
-ob_implicit_flush();
 error_reporting(E_ALL);
+ini_set('magic_quotes_runtime', 0);
+ini_set('memory_limit', '8M');
 
 if (ini_get('safe_mode')) {
echo  SAFE_MODE_WARNING



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / Makefile.global run-tests.php

2002-10-31 Thread Derick Rethans
derick  Thu Oct 31 09:02:00 2002 EDT

  Modified files:  
/php4   Makefile.global run-tests.php 
  Log:
  Discuss first!
  
  
Index: php4/Makefile.global
diff -u php4/Makefile.global:1.38 php4/Makefile.global:1.39
--- php4/Makefile.global:1.38   Thu Oct 31 08:52:58 2002
+++ php4/Makefile.globalThu Oct 31 09:01:58 2002
 -50,7 +50,7 
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
 TEST_PHP_SRCDIR=$(top_srcdir) \
 CC=$(CC) \
-   $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 
'safe_mode=0' -d 'safe_mode=0' -d 'output_buffering=Off' -d 'auto_prepend_file=' -d 
'auto_append_file=' -d 'output_handler=' -d 'register_argv=1' -d 'disable_functions=' 
$(top_srcdir)/run-tests.php $(TESTS)
+   $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 
+'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS)
 
 clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.103 php4/run-tests.php:1.104
--- php4/run-tests.php:1.103Thu Oct 31 08:52:58 2002
+++ php4/run-tests.php  Thu Oct 31 09:01:58 2002
 -44,9 +44,8 
 
 $cwd = getcwd();
 set_time_limit(0);
+ob_implicit_flush();
 error_reporting(E_ALL);
-ini_set('magic_quotes_runtime', 0);
-ini_set('memory_limit', '8M');
 
 if (ini_get('safe_mode')) {
echo  SAFE_MODE_WARNING



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 / Makefile.global run-tests.php

2002-10-31 Thread Yasuo Ohgaki
Marcus Boerger wrote:

You forgot -d 'zlib.output_compression='
and have doubled -d 'safe_mode=0'


Thanks. Copy  paste mistake :)

I think
-d 'zlib.output_compression='
isn't needed since it's not a web client.

--
Yasuo Ohgaki



and thanks i will add the missing valued to run-test.php
when fetching the version from the test executable.

marcus

At 14:52 31.10.2002, Yasuo Ohgaki wrote:


yohgaki Thu Oct 31 08:52:58 2002 EDT

  Modified files:
/php4   Makefile.global run-tests.php
  Log:
  Fixed more ini settings.
  # Derick. Be responsible to your change and opinion.
  # These are settings I know that should be set.
  # There may be other settingis must be set to make
  # run-tests.php work as expected.


Index: php4/Makefile.global
diff -u php4/Makefile.global:1.37 php4/Makefile.global:1.38
--- php4/Makefile.global:1.37   Tue Oct 29 10:22:41 2002
+++ php4/Makefile.globalThu Oct 31 08:52:58 2002
 -50,7 +50,7 
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC=$(CC) \
-   $(top_builddir)/$(SAPI_CLI_PATH) -d 
'open_basedir=' -d 'safe_mode=0' $(top_srcdir)/run-tests.php $(TESTS)
+   $(top_builddir)/$(SAPI_CLI_PATH) -d 
'open_basedir=' -d 'safe_mode=0' -d 'safe_mode=0' -d 
'output_buffering=Off' -d 'auto_prepend_file=' -d 'auto_append_file=' 
-d 'output_handler=' -d 'register_argv=1' -d 'disable_functions=' 
$(top_srcdir)/run-tests.php $(TESTS)

 clean:
find . -name \*.lo -o -name \*.o | xargs rm -f
Index: php4/run-tests.php
diff -u php4/run-tests.php:1.102 php4/run-tests.php:1.103
--- php4/run-tests.php:1.102Wed Oct 30 13:36:39 2002
+++ php4/run-tests.php  Thu Oct 31 08:52:58 2002
 -44,8 +44,9 

 $cwd = getcwd();
 set_time_limit(0);
-ob_implicit_flush();
 error_reporting(E_ALL);
+ini_set('magic_quotes_runtime', 0);
+ini_set('memory_limit', '8M');

 if (ini_get('safe_mode')) {
echo  SAFE_MODE_WARNING



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / README.CVS-RULES

2002-10-31 Thread Derick Rethans
derick  Thu Oct 31 09:55:54 2002 EDT

  Modified files:  
/php4   README.CVS-RULES 
  Log:
  - Make Jani happy
  
  
Index: php4/README.CVS-RULES
diff -u php4/README.CVS-RULES:1.14 php4/README.CVS-RULES:1.15
--- php4/README.CVS-RULES:1.14  Sun Jul 28 09:44:37 2002
+++ php4/README.CVS-RULES   Thu Oct 31 09:55:51 2002
 -58,15 +58,14 
 
 The format of the commit messages is pretty simple.
 
-If a line begins with #, it is taken to be a comment and will not appear
-in the ChangeLog.  If the line begins with , it will be redirected to the
-NEWS file. Everything else goes into the ChangeLog.
-
-It is important to note that if your comment or news logline spans multiple
-lines, you have to put # or  at the beginning of _every_ such line. Every 
-entry in NEWS has to have a name after it, so if you did it with someone's 
-help, put both your names there. Your name WILL NOT be automatically put
-at the end of the NEWS entry - so, please provide it yourself.
+If a line begins with #, it is taken to be a comment and will not appear in
+the ChangeLog. Everything else goes into the ChangeLog.
+
+It is important to note that if your comment spans multiple lines, you have
+to put # at the beginning of _every_ such line. Every entry in NEWS has to
+have a name after it, so if you did it with someone's help, put both your
+names there.  Your name WILL NOT be automatically put at the end of the NEWS
+entry - so, please provide it yourself.
 
 Example. Say you modified two files, datetime.c and string.c. In datetime.c
 you added a new format option for date() function, and in string.c you fixed
 -78,17 +77,13 
 
 (PHP date) Added new 'K' format modifier for printing out number of
days until New Year's Eve.
-- Added new 'K' format modifier that will output the number of days
-  until New Year's Eve. (Bob)
 
 For string.c:
 (php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
 # Man, that thing was leaking all over the place!
-- Fixed memory leak in trim(). (Bob)
 
-The lines above marked with  will go into NEWS file automagically, and the
-# lines will be omitted from the ChangeLog. Alternatively, you might want
-to modify NEWS file directly and not use the  lines.
+The lines above marked with # will be omitted from the ChangeLog.
+Alternatively, you might want to add lines to the NEWS file directly.
 
 If you fix some bugs, you should note the bug ID numbers in your
 commit message. Bug ID should be prefixed by # for easier access to
 -97,12 +92,10 
 Example:
 
 Fixed pgsql notice handler double free crash bug. Bug #14016
- Fixed pgsql notice handler double free crash bug. Bug #14016
 
-If you don't see your messages in ChangeLog and NEWS right away, don't worry!
-These files are updated once a day, so your stuff will not show up until
-somewhat later. Don't go adding stuff to NEWS by hand if you already put 
-lines in the commit message.
+If you don't see your messages in ChangeLog right away, don't worry!  These
+files are updated once a day, so your stuff will not show up until somewhat
+later. Please add an appropriate line in the NEWS file yourself.
 
 You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
 to look at PHP CVS repository in various ways.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/standard/tests/strings htmlentities.phpt /tests/strings 003.phpt

2002-10-31 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 31 10:28:21 2002 EDT

  Added files: 
/php4/ext/standard/tests/stringshtmlentities.phpt 

  Removed files:   
/php4/tests/strings 003.phpt 
  Log:
  Moved the test into the suitable place
  
  

Index: php4/ext/standard/tests/strings/htmlentities.phpt
+++ php4/ext/standard/tests/strings/htmlentities.phpt
--TEST--
HTML entities
--POST--
--GET--
--FILE--
?php 
setlocale (LC_CTYPE, C);
$sc_encoded = htmlspecialchars (\åÄ\n);
echo $sc_encoded;
$ent_encoded = htmlentities (\åÄ\n);
echo $ent_encoded;
echo html_entity_decode($sc_encoded);
echo html_entity_decode($ent_encoded);
?
--EXPECT--
lt;gt;quot;amp;åÄ
lt;gt;quot;amp;aring;Auml;
åÄ
åÄ



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/cli php_cli.c

2002-10-31 Thread Jani Taskinen
sniper  Thu Oct 31 12:34:10 2002 EDT

  Modified files:  
/php4/sapi/cli  php_cli.c 
  Log:
  Added built date and time to -v output.
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.45 php4/sapi/cli/php_cli.c:1.46
--- php4/sapi/cli/php_cli.c:1.45Sat Oct 26 15:33:15 2002
+++ php4/sapi/cli/php_cli.c Thu Oct 31 12:34:10 2002
 -594,7 +594,7 
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
}
-   php_printf(PHP %s (%s), Copyright (c) 1997-2002 The 
PHP Group\n%s, PHP_VERSION, sapi_module.name, get_zend_version());
+   php_printf(PHP %s (%s) (built: %s %s), Copyright (c) 
+1997-2002 The PHP Group\n%s, PHP_VERSION, sapi_module.name, __DATE__, __TIME__, 
+get_zend_version());
php_end_ob_buffers(1 TSRMLS_CC);
exit(1);
break;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/domxml php_domxml.c

2002-10-31 Thread Christian Stocker
chregu  Thu Oct 31 14:52:46 2002 EDT

  Modified files:  
/php4/ext/domxmlphp_domxml.c 
  Log:
  fix proto for clone_node
  
  
Index: php4/ext/domxml/php_domxml.c
diff -u php4/ext/domxml/php_domxml.c:1.216 php4/ext/domxml/php_domxml.c:1.217
--- php4/ext/domxml/php_domxml.c:1.216  Tue Oct 29 11:57:52 2002
+++ php4/ext/domxml/php_domxml.cThu Oct 31 14:52:45 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: php_domxml.c,v 1.216 2002/10/29 16:57:52 helly Exp $ */
+/* $Id: php_domxml.c,v 1.217 2002/10/31 19:52:45 chregu Exp $ */
 
 /* TODO
  * - Support Notation Nodes
 -2035,7 +2035,7 
 }
 /* }}} */
 
-/* {{{ proto bool domxml_clone_node(void)
+/* {{{ proto object domxml_clone_node([bool deep])
Clones a node */
 PHP_FUNCTION(domxml_clone_node)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/iconv config.m4

2002-10-31 Thread Moriyoshi Koizumi
moriyoshi   Thu Oct 31 15:23:53 2002 EDT

  Modified files:  
/php4/ext/iconv config.m4 
  Log:
  Fixed library capability detection behaviour.
  # Whew! I've fixed all the known problems.
  # And should I become a maintainer of this module? 
  
  
  
Index: php4/ext/iconv/config.m4
diff -u php4/ext/iconv/config.m4:1.18 php4/ext/iconv/config.m4:1.19
--- php4/ext/iconv/config.m4:1.18   Tue Oct 29 11:18:12 2002
+++ php4/ext/iconv/config.m4Thu Oct 31 15:23:53 2002
 -1,5 +1,5 
 dnl
-dnl $Id: config.m4,v 1.18 2002/10/29 16:18:12 moriyoshi Exp $
+dnl $Id: config.m4,v 1.19 2002/10/31 20:23:53 moriyoshi Exp $
 dnl
 
 PHP_ARG_WITH(iconv, for iconv support,
 -14,7 +14,8 
   ])
 
   if test $iconv_avail != no; then
-
+iconv_cflags_save=$CFLAGS
+CFLAGS=$CFLAGS $INCLUDES
 AC_MSG_CHECKING([if iconv supports errno])
 AC_TRY_RUN([
 #define LIBICONV_PLUG
 -106,6 +107,8 
 AC_DEFINE([PHP_ICONV_IMPL],[glibc],[Which iconv implementation to use])
 ;;
 esac
+
+CFLAGS=$iconv_cflags_save
 
 PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared)
 PHP_SUBST(ICONV_SHARED_LIBADD)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_getopt.phpt

2002-10-31 Thread Melvyn Sopacua
msopacuaThu Oct 31 16:09:04 2002 EDT

  Added files: 
/php4/ext/xslt/testsxslt_getopt.phpt 
  Log:
  Add test for xslt_getopt
  
  # see next commit
  
  

Index: php4/ext/xslt/tests/xslt_getopt.phpt
+++ php4/ext/xslt/tests/xslt_getopt.phpt
--TEST--
xslt_getopt function and public entities
--SKIPIF--
?php
include(skipif.inc);
if(!function_exists('xslt_getopt')) {
die(skip\n);
}
?
--FILE--
?php
error_reporting(E_ALL);

$xh = xslt_create();
xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES);
if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES)
print(OK\n);
else
var_dump(xslt_getopt($xh));

xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | XSLT_SABOPT_DISABLE_ADDING_META);
if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | 
XSLT_SABOPT_DISABLE_ADDING_META)
print(OK\n);
else
var_dump(xslt_getopt($xh));

xslt_setopt($xh, xslt_getopt($xh) | XSLT_OPT_SILENT);
if(xslt_getopt($xh) == XSLT_SABOPT_PARSE_PUBLIC_ENTITIES | 
XSLT_SABOPT_DISABLE_ADDING_META | XSLT_OPT_SILENT)
print(OK\n);
else
var_dump(xslt_getopt($xh));
xslt_free($xh);
?
--EXPECT--
OK
OK
OK



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_setopt.phpt

2002-10-31 Thread Melvyn Sopacua
msopacuaThu Oct 31 16:11:56 2002 EDT

  Modified files:  
/php4/ext/xslt/testsxslt_setopt.phpt 
  Log:
  Fix typo
  
  
Index: php4/ext/xslt/tests/xslt_setopt.phpt
diff -u php4/ext/xslt/tests/xslt_setopt.phpt:1.2 
php4/ext/xslt/tests/xslt_setopt.phpt:1.3
--- php4/ext/xslt/tests/xslt_setopt.phpt:1.2Tue Oct 29 16:57:50 2002
+++ php4/ext/xslt/tests/xslt_setopt.phptThu Oct 31 16:11:56 2002
 -1,5 +1,5 
 --TEST--
-xslt_set_opt function and public entities
+xslt_setopt function and public entities
 --SKIPIF--
 ?php
 include(skipif.inc);
 -57,4 +57,4 
 pPHP QA®/p
   /body
 /html
-
\ No newline at end of file
+



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main config.w32.h.in

2002-10-31 Thread Ilia Alshanetsky
iliaa   Thu Oct 31 19:57:54 2002 EDT

  Modified files:  
/php4/main  config.w32.h.in 
  Log:
  Possible fix for #20014. Suggested by [EMAIL PROTECTED]
  
  
Index: php4/main/config.w32.h.in
diff -u php4/main/config.w32.h.in:1.19 php4/main/config.w32.h.in:1.20
--- php4/main/config.w32.h.in:1.19  Wed Oct 16 10:53:34 2002
+++ php4/main/config.w32.h.in   Thu Oct 31 19:57:54 2002
@@ -2,7 +2,7 @@
Build Configuration for Win32.
This has only been tested with MS VisualC++ 6 (and later).
 
-   $Id: config.w32.h.in,v 1.19 2002/10/16 14:53:34 sebastian Exp $
+   $Id: config.w32.h.in,v 1.20 2002/11/01 00:57:54 iliaa Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -40,6 +40,9 @@
 
 /* Enable / Disable FTP extension (default: enabled) */
 #define HAVE_FTP 1
+
+/* Enable / Disable OpenSSL extension (default: enabled) */
+#define HAVE_OPENSSL_EXT 1
 
 /* Enable / Disable MBSTRING extension (default: enabled) */
 #define HAVE_MBSTRING 1



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xslt sablot.c

2002-10-31 Thread Melvyn Sopacua
msopacuaThu Oct 31 21:05:36 2002 EDT

  Modified files:  
/php4/ext/xslt  sablot.c 
  Log:
  - Fix registration of XSLT_SABOPT_FILES_TO_HANDLER
  
  
Index: php4/ext/xslt/sablot.c
diff -u php4/ext/xslt/sablot.c:1.61 php4/ext/xslt/sablot.c:1.62
--- php4/ext/xslt/sablot.c:1.61 Thu Oct 31 16:21:00 2002
+++ php4/ext/xslt/sablot.c  Thu Oct 31 21:05:35 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: sablot.c,v 1.61 2002/10/31 21:21:00 msopacua Exp $ */
+/* $Id: sablot.c,v 1.62 2002/11/01 02:05:35 msopacua Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -170,7 +170,9 
REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_ADDING_META, 
SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSLT_SABOPT_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSLT_SABOPT_IGNORE_DOC_NOT_FOUND, 
SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT);
-#ifdef SAB_FILES_TO_HANDLER
+/* hack: implemented at the same time, so should work.
+   Otherwise we need to check the enum type of SablotFlag in sablot.h */
+#ifdef HAVE_SABLOT_GET_OPTIONS
REGISTER_LONG_CONSTANT(XSLT_SABOPT_FILES_TO_HANDLER, SAB_FILES_TO_HANDLER, 
CONST_CS | CONST_PERSISTENT);
 #endif
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/xslt/tests xslt_set_scheme_handlers-002.phpt

2002-10-31 Thread Melvyn Sopacua
msopacuaThu Oct 31 21:21:57 2002 EDT

  Added files: 
/php4/ext/xslt/testsxslt_set_scheme_handlers-002.phpt 
  Log:
  Testcase for new Sablotron option
  
  

Index: php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt
+++ php4/ext/xslt/tests/xslt_set_scheme_handlers-002.phpt
--TEST--
Override Sablotron file handler
--SKIPIF--
?php include(skipif.inc); ?
--INI--
magic_quotes_runtime=0
--FILE--
?php
function handle_files_all($xh, $proto, $rest_uri)
{
$error = Cannot resolve $proto:$rest_uri on handle $xh;

if($proto != 'file')
return $error;

$rest_uri = substr($rest_uri, 2); // strip protocol separators //
if(substr($rest_uri, 0, 1) == '/')
{
return (file_exists($rest_uri)) ? implode('', file($rest_uri)) : 
$error;
}
else
{
$f = dirname(__FILE__) . '/' . $rest_uri;
return (file_exists($f)) ? implode('', file($f)) : $error;
}
}

$xh = xslt_create();
xslt_setopt($xh, XSLT_SABOPT_FILES_TO_HANDLER);
$xmlstring='?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE qa SYSTEM file://qa.dtd
qa
test type=simplePHP QA/test
/qa';
$xslstring='?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:output method=text omit-xml-declaration=yes encoding=ISO-8859-1 /
xsl:param name=insertionTest failed/xsl:param
xsl:template match=/qa
xsl:apply-templates select=test /
/xsl:template
xsl:template match=test
xsl:value-of select=concat(type, \': \', .) /
/xsl:template
/xsl:stylesheet';
xslt_set_scheme_handlers($xh, array('get_all' = 'handle_files_all'));
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = 
$xmlstring, '/_xsl' = $xslstring));
echo $result;
xslt_free($xh);
?
--EXPECT--
simple: PHP QA



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main config.w32.h.in

2002-10-31 Thread Ilia Alshanetsky
iliaa   Thu Oct 31 22:25:21 2002 EDT

  Modified files:  
/php4/main  config.w32.h.in 
  Log:
  Reverting previous OpenSSL patch.
  
  
Index: php4/main/config.w32.h.in
diff -u php4/main/config.w32.h.in:1.20 php4/main/config.w32.h.in:1.21
--- php4/main/config.w32.h.in:1.20  Thu Oct 31 19:57:54 2002
+++ php4/main/config.w32.h.in   Thu Oct 31 22:25:21 2002
 -2,7 +2,7 
Build Configuration for Win32.
This has only been tested with MS VisualC++ 6 (and later).
 
-   $Id: config.w32.h.in,v 1.20 2002/11/01 00:57:54 iliaa Exp $
+   $Id: config.w32.h.in,v 1.21 2002/11/01 03:25:21 iliaa Exp $
 */
 
 /* Default PHP / PEAR directories */
 -40,9 +40,6 
 
 /* Enable / Disable FTP extension (default: enabled) */
 #define HAVE_FTP 1
-
-/* Enable / Disable OpenSSL extension (default: enabled) */
-#define HAVE_OPENSSL_EXT 1
 
 /* Enable / Disable MBSTRING extension (default: enabled) */
 #define HAVE_MBSTRING 1



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main streams.c

2002-10-31 Thread Wez Furlong
wez Thu Oct 31 23:58:23 2002 EDT

  Modified files:  
/php4/main  streams.c 
  Log:
  Probable fix for #20180.
  
  
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.122 php4/main/streams.c:1.123
--- php4/main/streams.c:1.122   Mon Oct 28 07:37:31 2002
+++ php4/main/streams.c Thu Oct 31 23:58:23 2002
 -20,7 +20,7 
+--+
  */
 
-/* $Id: streams.c,v 1.122 2002/10/28 12:37:31 iliaa Exp $ */
+/* $Id: streams.c,v 1.123 2002/11/01 04:58:23 wez Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
 -1286,7 +1286,7 
if (data-fd = 0) {
ret = read(data-fd, buf, count);

-   if (ret == 0 || (ret  count  errno != EWOULDBLOCK))
+   if (ret == 0 || (ret == -1  errno != EWOULDBLOCK))
stream-eof = 1;

} else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php