[PHP-CVS] cvs: TSRM / TSRM.c

2002-10-05 Thread Derick Rethans

derick  Sat Oct  5 07:34:03 2002 EDT

  Modified files:  
/TSRM   TSRM.c 
  Log:
  - Whitspace
  
  
Index: TSRM/TSRM.c
diff -u TSRM/TSRM.c:1.45 TSRM/TSRM.c:1.46
--- TSRM/TSRM.c:1.45Sat Oct  5 07:26:17 2002
+++ TSRM/TSRM.c Sat Oct  5 07:34:02 2002
 -112,7 +112,7 
 #elif defined(TSRM_WIN32)
tls_key = TlsAlloc();
 #elif defined(BETHREADS)
-tls_key = tls_allocate();
+   tls_key = tls_allocate();
 #endif
 
tsrm_error_file = stderr;
 -262,7 +262,7 
 #elif defined(TSRM_WIN32)
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
 #elif defined(BETHREADS)
-tls_set(tls_key, (void*) *thread_resources_ptr);
+   tls_set(tls_key, (void*) *thread_resources_ptr);
 #endif
 
if (tsrm_new_thread_begin_handler) {
 -303,7 +303,7 
 #elif defined(TSRM_WIN32)
thread_resources = TlsGetValue(tls_key);
 #elif defined(BETHREADS)
-thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
+   thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
 #else
thread_resources = NULL;
 #endif
 -439,18 +439,18 
 /* Allocate a mutex */
 TSRM_API MUTEX_T tsrm_mutex_alloc(void)
 {
-MUTEX_T mutexp;
+   MUTEX_T mutexp;
 #ifdef NETWARE
-long flags = 0;  /* Don't require NX_MUTEX_RECURSIVE, I guess */
-NXHierarchy_t order = 0;
-NX_LOCK_INFO_ALLOC (lockInfo, PHP-TSRM, 0);
+   long flags = 0;  /* Don't require NX_MUTEX_RECURSIVE, I guess */
+   NXHierarchy_t order = 0;
+   NX_LOCK_INFO_ALLOC (lockInfo, PHP-TSRM, 0);
 #endif
 
 #ifdef TSRM_WIN32
-mutexp = malloc(sizeof(CRITICAL_SECTION));
+   mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
 #elif defined(NETWARE)
-mutexp = NXMutexAlloc(flags, order, lockInfo); /* return value ignored for now */
+   mutexp = NXMutexAlloc(flags, order, lockInfo); /* return value ignored for 
+now */
 #elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
 -469,16 +469,16 
mutexp-sem = create_sem(1, PHP sempahore); 
 #endif
 #ifdef THR_DEBUG
-   printf(Mutex created thread: %d\n,mythreadid());
+   printf(Mutex created thread: %d\n,mythreadid());
 #endif
-return( mutexp );
+   return( mutexp );
 }
 
 
 /* Free a mutex */
 TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
 {
-if (mutexp) {
+   if (mutexp) {
 #ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
 #elif defined(NETWARE)
 -498,9 +498,9 
delete_sem(mutexp-sem);
free(mutexp);  
 #endif
-}
+   }
 #ifdef THR_DEBUG
-   printf(Mutex freed thread: %d\n,mythreadid());
+   printf(Mutex freed thread: %d\n,mythreadid());
 #endif
 }
 
 -513,7 +513,7 
EnterCriticalSection(mutexp);
return 1;
 #elif defined(NETWARE)
-   return NXLock(mutexp);  
+   return NXLock(mutexp);
 #elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
 #elif defined(PTHREADS)
 -526,8 +526,8 
return st_mutex_lock(mutexp);
 #elif defined(BETHREADS)
if (atomic_add(mutexp-ben, 1) != 0)  
-   return acquire_sem(mutexp-sem);   
-return 0;
+   return acquire_sem(mutexp-sem);   
+   return 0;
 #endif
 }
 
 -552,8 +552,8 
 #elif defined(TSRM_ST)
return st_mutex_unlock(mutexp);
 #elif defined(BETHREADS)
-if (atomic_add(mutexp-ben, -1) != 1) 
-   return release_sem(mutexp-sem);
+   if (atomic_add(mutexp-ben, -1) != 1) 
+   return release_sem(mutexp-sem);
return 0;   
 #endif
 }



-- 
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-05 Thread Melvyn Sopacua

msopacuaSat Oct  5 10:04:18 2002 EDT

  Modified files:  
/php4/ext/xslt  sablot.c 
  Log:
  (xslt: error_print) Fixes a leak when multiple error messages are issued
  during a transformation.
  # It's probably better to wrap this in an internal function, since it's
  # easily forgotten.
  
  
Index: php4/ext/xslt/sablot.c
diff -u php4/ext/xslt/sablot.c:1.55 php4/ext/xslt/sablot.c:1.56
--- php4/ext/xslt/sablot.c:1.55 Fri Oct  4 19:06:09 2002
+++ php4/ext/xslt/sablot.c  Sat Oct  5 10:04:18 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: sablot.c,v 1.55 2002/10/04 23:06:09 dviner Exp $ */
+/* $Id: sablot.c,v 1.56 2002/10/05 14:04:18 msopacua Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -1632,6 +1632,10 
/* Allocate the message buffer and copy the data onto it */
msgbuf = emalloc((sizeof(msgformat) - 4) + strlen(errmsg) + 
strlen(errline) + 1);
sprintf(msgbuf, msgformat, errline, errmsg);
+
+   /* If an old message exists, remove it - leak */
+   if (XSLT_ERRSTR(handle))
+   efree(XSLT_ERRSTR(handle));
 
/* Copy the error message onto the handle for use when 
   the xslt_error function is called */



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




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

2002-10-05 Thread Wez Furlong

wez Sat Oct  5 12:26:58 2002 EDT

  Modified files:  
/php4/ext/bz2   bz2.c 
  Log:
  This got omitted from an earlier commit.
  EOF related checks for bzip2 streams.
  
  
Index: php4/ext/bz2/bz2.c
diff -u php4/ext/bz2/bz2.c:1.60 php4/ext/bz2/bz2.c:1.61
--- php4/ext/bz2/bz2.c:1.60 Thu Sep 26 06:14:41 2002
+++ php4/ext/bz2/bz2.c  Sat Oct  5 12:26:57 2002
 -16,7 +16,7 
+--+
  */
  
-/* $Id: bz2.c,v 1.60 2002/09/26 10:14:41 wez Exp $ */
+/* $Id: bz2.c,v 1.61 2002/10/05 16:26:57 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -84,15 +84,14 
 static size_t php_bz2iop_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
 {
struct php_bz2_stream_data_t *self = (struct php_bz2_stream_data_t *) 
stream-abstract;
-
-   if (buf == NULL  count == 0) {
-   /* we have no way of knowing, so let them try to read some more;
-* then they will get an error and can stop 
-*/
-   return 0;
-   }
+   size_t ret;

-   return BZ2_bzread(self-bz_file, buf, count); 
+   ret = BZ2_bzread(self-bz_file, buf, count);
+
+   if (ret == 0)
+   stream-eof = 1;
+
+   return ret;
 }
 
 static size_t php_bz2iop_write(php_stream *stream, const char *buf, size_t count 
TSRMLS_DC)



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




[PHP-CVS] cvs: php4 /ext/xslt/tests 005.phpt 006.phpt 007.phpt args.xsl param.xsl qa.dtd test.xml

2002-10-05 Thread Melvyn Sopacua

msopacuaSat Oct  5 15:44:25 2002 EDT

  Added files: 
/php4/ext/xslt/tests005.phpt 006.phpt 007.phpt args.xsl param.xsl 
test.xml qa.dtd 
  Log:
  (xslt tests) Add test for new backend API (005.phpt), new function
   (006.phpt) and a crash test (007.phpt)
   006.phpt also tests handling of public entities, which is in
   essence new to the extension, since there was no way to turn
   it on.
  # These new functions and backend will be added shortly.
  # TODO: test for xslt_set_object
  
  

Index: php4/ext/xslt/tests/005.phpt
+++ php4/ext/xslt/tests/005.phpt
--TEST--
Various ways to provide xml and xslt arguments and params
--SKIPIF--
?php
include(skipif.inc);
if(!function_exists('utf8_encode')) {
die(skip\n);
}
?
--FILE--
?php
error_reporting(E_ALL);
$xmlfile = 'ext/xslt/tests/test.xml';
$xslfile = 'ext/xslt/tests/args.xsl';
$xmldata = implode('', file($xmlfile));
$xslsheet = implode('', file($xslfile));

$xh = xslt_create();
$result = xslt_process($xh, $xmlfile, $xslfile);
print $result\n;
$result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = $xmldata));
print $result\n;
$result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = $xslsheet));
print $result\n;
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = $xmldata, 
'/_xsl' = $xslsheet));
print $result\n;

// The same, with params
$xslfile = 'ext/xslt/tests/param.xsl';
$xslsheet = implode('', file($xslfile));
$params = array(Test has passed, PHP QA®);

foreach($params AS $val)
{
$val = utf8_encode($val);
$result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' 
= $val));
print $result\n;
$result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' = 
$xmldata), array('insertion' = $val));
print $result\n;
$result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' = 
$xslsheet), array('insertion' = $val));
print $result\n;
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' = 
$xmldata, '/_xsl' = $xslsheet), array('insertion' = $val));
print $result\n;
}

xslt_free($xh);
?
--EXPECT--
Test has passed
Test has passed
Test has passed
Test has passed
Test has passed
Test has passed
Test has passed
Test has passed
PHP QA®
PHP QA®
PHP QA®
PHP QA®

Index: php4/ext/xslt/tests/006.phpt
+++ php4/ext/xslt/tests/006.phpt
--TEST--
Crash xslt_process with reused handler (this test may take a while)
--SKIPIF--
?php
include(skipif.inc);
if(!function_exists('utf8_encode')) {
die(skip\n);
}
?
--FILE--
?php
error_reporting(E_ALL);
$xmlfile = 'ext/xslt/tests/test.xml';
$xslfile = 'ext/xslt/tests/param.xsl';
$xmldata = implode('', file($xmlfile));
$xslsheet = implode('', file($xslfile));

/*
 * Tested on a Cyrix 200MMX/128MB took 2 secs. Should be a reasonable margin.
 *
 * It's not meant as an actual speed test, but if it's slower than this,
 * there must be something significantly off in the php/sablot/expat trio.
 * Emulation OS's come to mind...
 */
$want_time = 6;

function make_param()
{
$ret_val = '';
$numchars = mt_rand(2,16);
$illegal = array(0,256,512);
for($i=0;$i$numchars;$i++)
{
$char=0;
while(in_array($char, $illegal))
{
$char .= mt_rand(32, 512);
}
$ret_val .= chr($char);
}

return utf8_encode($ret_val);
}

function decode($string)
{
$ret_val = '';
for($i=0; $istrlen($string);$i++)
{
$ret_val .= ord(substr($string,$i,1)) .  ;
}
return $ret_val;
}


$xh = xslt_create();

$t1 = time();
for ($i=0; $i50; $i++)
{
$val = make_param();
$result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' 
= $val));
if(!$result or $result != utf8_decode($val))
print Failed $i / .utf8_decode($val).: $result\n\tDecode:  . 
decode(utf8_decode($val)) . \n ;
}
print OK\n;
xslt_free($xh);
$t2 = time();
$op_time = $t2 - $t1;
if($op_time  $want_time)
print This test took more than $want_time seconds. Either you have a very 
slow / busy machine, or there's something very wrong with the speed. Your time: 
$op_time;
?
--EXPECT--
OK

Index: php4/ext/xslt/tests/007.phpt
+++ php4/ext/xslt/tests/007.phpt
--TEST--
xslt_set_opt function and public entities
--SKIPIF--
?php
include(skipif.inc);
if(!function_exists('xslt_setopt')) {
die(skip\n);
}
?
--FILE--
?php
error_reporting(E_ALL);
$xmlfile = 'ext/xslt/tests/public.xml';
$xslfile = 'ext/xslt/tests/args.xsl';

$xh = xslt_create();
// Tell Sablotron to process public entities
xslt_setopt($xh, XSLT_SAB_PARSE_PUBLIC_ENTITIES);

$result = xslt_process($xh, $xmlfile, $xslfile);
print $result\n;

$xslstring = implode('', 

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

2002-10-05 Thread Derick Rethans

derick  Sat Oct  5 16:28:35 2002 EDT

  Added files: 
/php4/ext/standard/tests/stringsurl_t.phpt 
  Log:
  - Add parse_url() tests (expect will follow later)url_t.phpt
  
  

Index: php4/ext/standard/tests/strings/url_t.phpt
+++ php4/ext/standard/tests/strings/url_t.phpt
--TEST--
parse_url() function
--POST--
--GET--
--FILE--
?php
$sample_urls = array (
'',
'64.246.30.37',
'http://64.246.30.37',
'http://64.246.30.37/',
'64.246.30.37/',
'64.246.30.37:80/',
'php.net',
'php.net/',
'http://php.net',
'http://php.net/',
'www.php.net',
'www.php.net/',
'http://www.php.net',
'http://www.php.net/',
'www.php.net:80',
'http://www.php.net:80',
'http://www.php.net:80/',
'http://www.php.net/index.php',
'www.php.net/?',
'www.php.net:80/?',
'http://www.php.net/?',
'http://www.php.net:80/?',
'http://www.php.net:80/index.php',
'http://www.php.net:80/foo/bar/index.php',
'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1of=2parameters=3too=4here=5',
'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/',
'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
'http://www.php.net:80/this/../a/../deep/directory',
'http://www.php.net:80/this/../a/../deep/directory/',
'http://www.php.net:80/this/is/a/very/deep/directory/../file.php',
'http://www.php.net:80/index.php',
'http://www.php.net:80/index.php?',
'http://www.php.net:80/#foo',
'http://www.php.net:80/?#',
'http://www.php.net:80/?test=1',
'http://www.php.net/?test=1;',
'http://www.php.net:80/?;',
'http://www.php.net:80/index.php?test=1;',
'http://www.php.net/index.php?;',
'http://www.php.net:80/index.php?foo;',
'http://www.php.net/index.php?foo',
'http://www.php.net:80/index.php?test=1test2=chartest3=mixesCI',
'www.php.net:80/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http:[EMAIL PROTECTED]:80/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http://secret:@www.php.net/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http://:[EMAIL PROTECTED]:80/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http://secret:[EMAIL PROTECTED]/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http://secret@[EMAIL PROTECTED]:80/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'http://secret:hid:[EMAIL PROTECTED]:80/index.php?test=1test2=chartest3=mixesCI#some_page_ref123',
'nntp://news.php.net',
'ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz'
);

foreach ($sample_urls as $url) {
var_dump(@parse_url($url));
}
?
--EXPECT--



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




[PHP-CVS] cvs: php4 / configure.in /main php_version.h

2002-10-05 Thread Andrei Zmievski

andrei  Sat Oct  5 16:37:12 2002 EDT

  Modified files:  
/php4   configure.in 
/php4/main  php_version.h 
  Log:
  Change HEAD version to 4.4.0-dev.
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.378 php4/configure.in:1.379
--- php4/configure.in:1.378 Fri Oct  4 00:47:33 2002
+++ php4/configure.in   Sat Oct  5 16:37:11 2002
 -1,4 +1,4 
-dnl ## $Id: configure.in,v 1.378 2002/10/04 04:47:33 rasmus Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.379 2002/10/05 20:37:11 andrei Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
 -38,7 +38,7 
 AC_CONFIG_HEADER(main/php_config.h)
 
 MAJOR_VERSION=4
-MINOR_VERSION=3
+MINOR_VERSION=4
 RELEASE_VERSION=0
 EXTRA_VERSION=-dev
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
Index: php4/main/php_version.h
diff -u php4/main/php_version.h:1.60 php4/main/php_version.h:1.61
--- php4/main/php_version.h:1.60Thu Apr 11 11:50:32 2002
+++ php4/main/php_version.h Sat Oct  5 16:37:12 2002
 -1,7 +1,7 
 /* automatically generated by configure */
 /* edit configure.in to change version number */
 #define PHP_MAJOR_VERSION 4
-#define PHP_MINOR_VERSION 3
+#define PHP_MINOR_VERSION 4
 #define PHP_RELEASE_VERSION 0
 #define PHP_EXTRA_VERSION -dev
-#define PHP_VERSION 4.3.0-dev
+#define PHP_VERSION 4.4.0-dev



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




[PHP-CVS] cvs: CVSROOT / avail

2002-10-05 Thread Rasmus Lerdorf

rasmus  Sat Oct  5 19:01:17 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Karma for Lenar Lõhmus
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.509 CVSROOT/avail:1.510
--- CVSROOT/avail:1.509 Fri Oct  4 05:00:46 2002
+++ CVSROOT/avail   Sat Oct  5 19:01:16 2002
 -18,7 +18,7 
 # The PHP Developers have full access to the full source trees for
 # PHP and PEAR, as well as the documentation.
 
-avail|mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,svbegg,raphael,danda,rbb,mboeren,dougm,mlwmohawk,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jedi,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance|phpfi,php3,php4,phpdoc,pear,peardoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh
+avail|mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,svbegg,raphael,danda,rbb,mboeren,dougm,mlwmohawk,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jedi,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex|phpfi,php3,php4,phpdoc,pear,peardoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh
 
 
 # People who work on the Engine



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




[PHP-CVS] cvs: php4(PHP_4_3) /ext/xslt php_sablot.h sablot.c xslt.c

2002-10-05 Thread Melvyn Sopacua

msopacuaSat Oct  5 19:51:00 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/xslt  php_sablot.h sablot.c xslt.c 
  Log:
  (xslt) Introduce revised interaction with Sablotron backend.
 ATTENTION: interaction with Sablotron backend, now uses the
API prefered by the Ginger Alliance. Test it for BC
issues.
It also changes internals of the abstraction, to resolve
issues that would arrise with invalid argument or
parameter arrays.
  
 New functions:
   * xslt_set_object, similar to xml_set_object
   * xslt_setopt, set global options for a processor instance.
  
 Introduces new constants, related to the xslt_setopt function.
 Removes a warning, when skipping argument array with NULL.
  
  

Index: php4/ext/xslt/php_sablot.h
diff -u php4/ext/xslt/php_sablot.h:1.12 php4/ext/xslt/php_sablot.h:1.12.2.1
--- php4/ext/xslt/php_sablot.h:1.12 Fri Oct  4 19:06:09 2002
+++ php4/ext/xslt/php_sablot.h  Sat Oct  5 19:50:59 2002
 -41,6 +41,7 
 #define XSLT_ERROR(handle) ((handle)-handlers-error)
 
 #define XSLT_PROCESSOR(handle) ((handle)-processor.ptr)
+#define XSLT_SITUATION(handle)  ((handle)-processor.sit)
 
 #define XSLT_ERRNO(handle) ((handle)-err-no)
 #define XSLT_ERRSTR(handle)((handle)-err-str)
 -63,6 +64,7 
 PHP_FUNCTION(xslt_errno);
 PHP_FUNCTION(xslt_free);
 PHP_FUNCTION(xslt_set_object);
+PHP_FUNCTION(xslt_setopt);
 PHP_FUNCTION(xslt_backend_version);
 PHP_FUNCTION(xslt_backend_name);
 
 -95,6 +97,7 
 
 struct xslt_processor {
SablotHandle ptr;
+   SablotSituation sit;
long idx;
 };
 
Index: php4/ext/xslt/sablot.c
diff -u php4/ext/xslt/sablot.c:1.56 php4/ext/xslt/sablot.c:1.56.2.1
--- php4/ext/xslt/sablot.c:1.56 Sat Oct  5 10:04:18 2002
+++ php4/ext/xslt/sablot.c  Sat Oct  5 19:50:59 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: sablot.c,v 1.56 2002/10/05 14:04:18 msopacua Exp $ */
+/* $Id: sablot.c,v 1.56.2.1 2002/10/05 23:50:59 msopacua Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -90,6 +90,7 
PHP_FE(xslt_errno,   NULL)
PHP_FE(xslt_free,NULL)
PHP_FE(xslt_set_object,  second_args_force_ref)
+   PHP_FE(xslt_setopt,  NULL)
PHP_FE(xslt_backend_version, NULL)
PHP_FE(xslt_backend_name,NULL)
{NULL, NULL, NULL}
 -155,6 +156,16 
 PHP_MINIT_FUNCTION(xslt)
 {
le_xslt = zend_register_list_destructors_ex(free_processor, NULL, 
le_xslt_name, module_number);
+
+   /* Generic options, which can apply to 'all' xslt processors */
+   REGISTER_LONG_CONSTANT(XSLT_SILENT, SAB_NO_ERROR_REPORTING, CONST_CS | 
+CONST_PERSISTENT);
+
+   /* Sablotron specific options */
+   REGISTER_LONG_CONSTANT(XSLT_SAB_PARSE_PUBLIC_ENTITIES, 
+SAB_PARSE_PUBLIC_ENTITIES, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_ADDING_META, 
+SAB_DISABLE_ADDING_META, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(XSLT_SAB_DISABLE_STRIPPING, SAB_DISABLE_STRIPPING, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(XSLT_SAB_IGNORE_DOC_NOT_FOUND, 
+SAB_IGNORE_DOC_NOT_FOUND, CONST_CS | CONST_PERSISTENT);
+
return SUCCESS;
 }
 /* }}} */
 -179,6 +190,7 
 {
php_xslt *handle;  /* The php - sablotron handle */
SablotHandle  processor;   /* The sablotron processor */
+   SablotSituation  sit;/* The sablotron Situation handle */
int   error;   /* The error container */
 
/* Allocate the php-sablotron handle */
 -190,7 +202,8 
XSLT_LOG(handle).path = NULL;
 
/* Allocate the actual processor itself, via sablotron */
-   error = SablotCreateProcessor(processor);
+   SablotCreateSituation(sit);
+   error = SablotCreateProcessorForSituation(sit, processor);
if (error) {
XSLT_ERRNO(handle) = error;
RETURN_FALSE;
 -198,6 +211,7 
 
/* Save the processor and set the default handlers */
XSLT_PROCESSOR(handle) = processor;
+   XSLT_SITUATION(handle) = sit;
SablotRegHandler(XSLT_PROCESSOR(handle), HLR_SAX, (void *) sax_handlers,  
  (void *) handle);
SablotRegHandler(XSLT_PROCESSOR(handle), HLR_MESSAGE, (void *) 
message_handler, (void *) handle);
SablotRegHandler(XSLT_PROCESSOR(handle), HLR_SCHEME,  (void *) 
scheme_handler,  (void *) handle);
 -483,6 +497,7 
char*result;  /* The result file or argument buffer */
int  argc = ZEND_NUM_ARGS();  /* The number of arguments given */
int  error;   /* Our error container */
+   int  i;   /* iterator for Situation */
 
if (argc  3 || argc  6 

Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-05 Thread Rasmus Lerdorf

Sure it is.  It's in the config.w32.h.in file.  You probably just forgot
to generate config.w32.h.

-Rasmus

On Sat, 5 Oct 2002, Wez Furlong wrote:

 wez   Sat Oct  5 06:55:54 2002 EDT

   Modified files:
 /php4/ext/standardinfo.c
   Log:
   Fix Win32 build as PHP_CONFIG_FILE_SCAN_DIR is not #defined.


 Index: php4/ext/standard/info.c
 diff -u php4/ext/standard/info.c:1.211 php4/ext/standard/info.c:1.212
 --- php4/ext/standard/info.c:1.211Fri Oct  4 00:47:34 2002
 +++ php4/ext/standard/info.c  Sat Oct  5 06:55:54 2002
  -18,7 +18,7 
 +--+
  */

 -/* $Id: info.c,v 1.211 2002/10/04 04:47:34 rasmus Exp $ */
 +/* $Id: info.c,v 1.212 2002/10/05 10:55:54 wez Exp $ */

  #include php.h
  #include php_ini.h
  -380,12 +380,14 

   php_info_print_table_row(2, Configuration File (php.ini) Path, 
php_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH);

 +#ifdef PHP_CONFIG_FILE_SCAN_DIR
   if(strlen(PHP_CONFIG_FILE_SCAN_DIR)) {
   php_info_print_table_row(2, Scan this dir for additional .ini 
files, PHP_CONFIG_FILE_SCAN_DIR);
   if(php_ini_scanned_files) {
   php_info_print_table_row(2, additional .ini files 
parsed, php_ini_scanned_files);
   }
   }
 +#endif

   snprintf(temp_api, sizeof(temp_api), %d, PHP_API_VERSION);
   php_info_print_table_row(2, PHP API, temp_api);



 --
 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




Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-05 Thread Rasmus Lerdorf

Sorry, didn't realize I was that far behind in email.

On Sat, 5 Oct 2002, Rasmus Lerdorf wrote:

 Sure it is.  It's in the config.w32.h.in file.  You probably just forgot
 to generate config.w32.h.

 -Rasmus

 On Sat, 5 Oct 2002, Wez Furlong wrote:

  wez Sat Oct  5 06:55:54 2002 EDT
 
Modified files:
  /php4/ext/standard  info.c
Log:
Fix Win32 build as PHP_CONFIG_FILE_SCAN_DIR is not #defined.
 
 
  Index: php4/ext/standard/info.c
  diff -u php4/ext/standard/info.c:1.211 php4/ext/standard/info.c:1.212
  --- php4/ext/standard/info.c:1.211  Fri Oct  4 00:47:34 2002
  +++ php4/ext/standard/info.cSat Oct  5 06:55:54 2002
   -18,7 +18,7 
  +--+
   */
 
  -/* $Id: info.c,v 1.211 2002/10/04 04:47:34 rasmus Exp $ */
  +/* $Id: info.c,v 1.212 2002/10/05 10:55:54 wez Exp $ */
 
   #include php.h
   #include php_ini.h
   -380,12 +380,14 
 
  php_info_print_table_row(2, Configuration File (php.ini) Path, 
php_ini_opened_path?php_ini_opened_path:PHP_CONFIG_FILE_PATH);
 
  +#ifdef PHP_CONFIG_FILE_SCAN_DIR
  if(strlen(PHP_CONFIG_FILE_SCAN_DIR)) {
  php_info_print_table_row(2, Scan this dir for additional .ini 
files, PHP_CONFIG_FILE_SCAN_DIR);
  if(php_ini_scanned_files) {
  php_info_print_table_row(2, additional .ini files 
parsed, php_ini_scanned_files);
  }
  }
  +#endif
 
  snprintf(temp_api, sizeof(temp_api), %d, PHP_API_VERSION);
  php_info_print_table_row(2, PHP API, temp_api);
 
 
 
  --
  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 Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-05 Thread Wez Furlong

And that's the same reason why I didn't notice the win32 commit
and didn't think to make clean in MSVC :-)

--Wez.

On 06/10/02, Rasmus Lerdorf [EMAIL PROTECTED] wrote:
 Sorry, didn't realize I was that far behind in email.
 
 On Sat, 5 Oct 2002, Rasmus Lerdorf wrote:
 
  Sure it is.  It's in the config.w32.h.in file.  You probably just forgot
  to generate config.w32.h.




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




[PHP-CVS] cvs: php4 /ext/fbsql fbsql.dsp

2002-10-05 Thread Frank M. Kromann

fmk Sat Oct  5 22:14:22 2002 EDT

  Modified files:  
/php4/ext/fbsql fbsql.dsp 
  Log:
  Adding missing include path's to non TS projects
  
  
Index: php4/ext/fbsql/fbsql.dsp
diff -u php4/ext/fbsql/fbsql.dsp:1.4 php4/ext/fbsql/fbsql.dsp:1.5
--- php4/ext/fbsql/fbsql.dsp:1.4Tue Dec 18 12:40:17 2001
+++ php4/ext/fbsql/fbsql.dspSat Oct  5 22:14:22 2002
 -45,7 +45,7 
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir 
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D WIN32 /D NDEBUG /D _WINDOWS /D 
_MBCS /D _USRDLL /D FBSQL_EXPORTS /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\Zend /I 
..\..\..\bindlib_w32 /I ..\..\TSRM /D NDEBUG /D FBSQL_EXPORTS /D 
COMPILE_DL_FBSQL_FBSQL /D HAVE_FBSQL=1 /D WIN32 /D _WINDOWS /D _MBCS /D 
_USRDLL /D ZEND_WIN32 /D PHP_WIN32 /D WinNT /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I ..\.. /I ..\..\main /I ..\..\Zend /I 
+..\..\..\bindlib_w32 /I ..\..\TSRM /I \usr\FrontBase\Include /D NDEBUG /D 
+FBSQL_EXPORTS /D COMPILE_DL_FBSQL_FBSQL /D HAVE_FBSQL=1 /D WIN32 /D _WINDOWS 
+/D _MBCS /D _USRDLL /D ZEND_WIN32 /D PHP_WIN32 /D WinNT /D ZEND_DEBUG=0 /YX 
+/FD /c
 # ADD BASE MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D NDEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x40d /d NDEBUG
 -71,7 +71,7 
 # 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 FBSQL_EXPORTS /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\Zend /I 
..\..\..\bindlib_w32 /I ..\..\TSRM /D _DEBUG /D ZEND_DEBUG=1 /D FBSQL_EXPORTS 
/D COMPILE_DL_FBSQL_FBSQL /D HAVE_FBSQL=1 /D WIN32 /D _WINDOWS /D _MBCS /D 
_USRDLL /D ZEND_WIN32 /D PHP_WIN32 /D WinNT /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ..\.. /I ..\..\main /I ..\..\Zend 
+/I ..\..\..\bindlib_w32 /I ..\..\TSRM /I \usr\FrontBase\Include /D _DEBUG /D 
+ZEND_DEBUG=1 /D FBSQL_EXPORTS /D COMPILE_DL_FBSQL_FBSQL /D HAVE_FBSQL=1 /D 
+WIN32 /D _WINDOWS /D _MBCS /D _USRDLL /D ZEND_WIN32 /D PHP_WIN32 /D 
+WinNT /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D _DEBUG /mktyplib203 /win32
 # ADD MTL /nologo /D _DEBUG /mktyplib203 /win32
 # ADD BASE RSC /l 0x40d /d _DEBUG



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




[PHP-CVS] cvs: php4(PHP_4_3) / NEWS /ext/gd config.m4 /ext/gd/libgd gd.h gd_gif_in.c

2002-10-05 Thread Rasmus Lerdorf

rasmus  Sun Oct  6 02:07:30 2002 EDT

  Added files: (Branch: PHP_4_3)
/php4/ext/gd/libgd  gd_gif_in.c 

  Modified files:  
/php4   NEWS 
/php4/ext/gdconfig.m4 
/php4/ext/gd/libgd  gd.h 
  Log:
  MFH the read-only GIF support
  
  

Index: php4/NEWS
diff -u php4/NEWS:1.1185 php4/NEWS:1.1185.2.1
--- php4/NEWS:1.1185Sat Oct  5 16:07:44 2002
+++ php4/NEWS   Sun Oct  6 02:07:29 2002
 -1,6 +1,7 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
+- Read-only GIF support for bundled GD2 library (Rasmus)
 - Make the glue argument to implode() optional, if it is not specified
   default to using . (Sterling)
 - Fixed fields argument to contain correct info for xslt_set_error_handler.
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.114 php4/ext/gd/config.m4:1.114.2.1
--- php4/ext/gd/config.m4:1.114 Wed Sep 11 12:40:35 2002
+++ php4/ext/gd/config.m4   Sun Oct  6 02:07:30 2002
 -1,5 +1,5 
 dnl
-dnl $Id: config.m4,v 1.114 2002/09/11 16:40:35 sniper Exp $
+dnl $Id: config.m4,v 1.114.2.1 2002/10/06 06:07:30 rasmus Exp $
 dnl
 
 dnl
 -243,7 +243,7 
 libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_png.c 
libgd/gd_jpeg.c \
libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c 
libgd/gdfontl.c \
libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c 
libgd/gdkanji.c \
-   libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c
+   libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c 
+libgd/gd_gif_in.c
 
 dnl check for fabsf and floorf which are available since C99
   AC_CHECK_FUNCS(fabsf floorf)
 -273,6 +273,7 
   AC_DEFINE(HAVE_GD_GD2,  1, [ ])
   AC_DEFINE(HAVE_GD_PNG,  1, [ ])
   AC_DEFINE(HAVE_GD_BUNDLED,  1, [ ])
+  AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
 
 dnl Make sure the libgd/ is first in the include path
   GDLIB_CFLAGS=-DHAVE_LIBPNG
Index: php4/ext/gd/libgd/gd.h
diff -u php4/ext/gd/libgd/gd.h:1.4 php4/ext/gd/libgd/gd.h:1.4.4.1
--- php4/ext/gd/libgd/gd.h:1.4  Thu Aug 22 03:28:26 2002
+++ php4/ext/gd/libgd/gd.h  Sun Oct  6 02:07:30 2002
 -376,6 +376,10 
 /* Best to free this memory with gdFree(), not free() */
 void *gdImageJpegPtr(gdImagePtr im, int *size, int quality);
 
+gdImagePtr gdImageCreateFromGif(FILE *fd);
+gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr in);
+gdImagePtr gdImageCreateFromGifSource(gdSourcePtr in);
+
 /* A custom data sink. For backwards compatibility. Use
gdIOCtx instead. */
 /* The sink function must return -1 on error, otherwise the number

Index: php4/ext/gd/libgd/gd_gif_in.c
+++ php4/ext/gd/libgd/gd_gif_in.c
#include stdio.h
#include math.h
#include string.h
#include stdlib.h
#include gd.h

/* Used only when debugging GIF compression code */
/* #define DEBUGGING_ENVARS */

#ifdef DEBUGGING_ENVARS

static int verbose_set = 0;
static int verbose;
#define VERBOSE (verbose_set?verbose:set_verbose())

static int set_verbose(void)
{
 verbose = !!getenv(GIF_VERBOSE);
 verbose_set = 1;
 return(verbose);
}

#else

#define VERBOSE 0

#endif


#defineMAXCOLORMAPSIZE 256

#defineTRUE1
#defineFALSE   0

#define CM_RED 0
#define CM_GREEN   1
#define CM_BLUE2

#defineMAX_LWZ_BITS12

#define INTERLACE  0x40
#define LOCALCOLORMAP  0x80
#define BitSet(byte, bit)  (((byte)  (bit)) == (bit))

#defineReadOK(file,buffer,len) (gdGetBuf(buffer, len, file) != 0)

#define LM_to_uint(a,b)(((b)8)|(a))

/* We may eventually want to use this information, but def it out for now */
#if 0
static struct {
   unsigned intWidth;
   unsigned intHeight;
   unsigned char   ColorMap[3][MAXCOLORMAPSIZE];
   unsigned intBitPixel;
   unsigned intColorResolution;
   unsigned intBackground;
   unsigned intAspectRatio;
} GifScreen;
#endif

static struct {
   int transparent;
   int delayTime;
   int inputFlag;
   int disposal;
} Gif89 = { -1, -1, -1, 0 };

static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
static int DoExtension (gdIOCtx *fd, int label, int *Transparent);
static int GetDataBlock (gdIOCtx *fd, unsigned char *buf);
static int GetCode (gdIOCtx *fd, int code_size, int flag);
static int LWZReadByte (gdIOCtx *fd, int flag, int input_code_size);

static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char 
(*cmap)[256], int interlace); /*1.4//, int ignore); */

int ZeroDataBlock;

gdImagePtr gdImageCreateFromGifSource(gdSourcePtr inSource)
{
gdIOCtx *in = gdNewSSCtx(inSource, NULL);
gdImagePtr  im;

im = gdImageCreateFromGifCtx(in);