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

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 03:13:36 2002 EDT

  Modified files:  
/php4/ext/mbstring  mbstring.c 
  Log:
  Fixed mb_encode_mimeheader() to work with languages other than Japanese and
  English
  
  
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.140 php4/ext/mbstring/mbstring.c:1.141
--- php4/ext/mbstring/mbstring.c:1.140  Wed Nov 13 02:40:11 2002
+++ php4/ext/mbstring/mbstring.cWed Nov 13 03:13:34 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.140 2002/11/13 07:40:11 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.141 2002/11/13 08:13:34 moriyoshi Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -2784,17 +2784,10 @@
RETURN_FALSE;
}
} else {
-   switch (MBSTRG(current_language)) {
-   case mbfl_no_language_japanese:
-   charset = mbfl_no_encoding_2022jp;
-   break;
-   case mbfl_no_language_english:
-   charset = mbfl_no_encoding_8859_1;
-   transenc = mbfl_no_encoding_qprint;
-   break;
-   default:
-   charset = mbfl_no_encoding_utf8;
-   break;
+   const mbfl_language *lang = mbfl_no2language(MBSTRG(current_language));
+   if (lang != NULL) {
+   charset = lang->mail_charset;
+   transenc = lang->mail_header_encoding;
}
}
 



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




[PHP-CVS] cvs: php4 / NEWS

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 03:20:02 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Update for a recent change on mbstring
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1246 php4/NEWS:1.1247
--- php4/NEWS:1.1246Tue Nov 12 11:08:39 2002
+++ php4/NEWS   Wed Nov 13 03:20:01 2002
@@ -11,6 +11,7 @@
   . ext/icap
   . sapi/fhttpd
 - Moved ext/vpopmail to PECL. (James)
+- Added "neutral" language entry to mbstring spec. (Moriyoshi) 
 - Modified log() to accept multiple bases. (Jason)
 - Added gd_info() which returns an array of gd support information. (Marcus)
 - Implemented features/changes requested in Bug #16960 (Timm):



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




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

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 03:26:05 2002 EDT

  Modified files:  
/php4/ext/mbstring  mbstring.c 
  Log:
  Prevented unwanted encoding detections in mb_send_mail()
  # This patch shouldn't break BC
  
  
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.141 php4/ext/mbstring/mbstring.c:1.142
--- php4/ext/mbstring/mbstring.c:1.141  Wed Nov 13 03:13:34 2002
+++ php4/ext/mbstring/mbstring.cWed Nov 13 03:26:04 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.141 2002/11/13 08:13:34 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.142 2002/11/13 08:26:04 moriyoshi Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -3344,9 +3344,10 @@
orig_str.no_language = MBSTRG(current_language);
orig_str.val = (unsigned char *)Z_STRVAL_PP(argv[1]);
orig_str.len = Z_STRLEN_PP(argv[1]);
-   orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, 
MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size) TSRMLS_CC);
-   if (orig_str.no_encoding == mbfl_no_encoding_invalid) {
-   orig_str.no_encoding = MBSTRG(current_internal_encoding);
+   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) TSRMLS_CC);
}
pstr = mbfl_mime_header_encode(&orig_str, &conv_str, tran_cs, 
head_enc, "\n", sizeof("Subject: [PHP-jp ]") TSRMLS_CC);
if (pstr != NULL) {
@@ -3365,9 +3366,11 @@
orig_str.no_language = MBSTRG(current_language);
orig_str.val = Z_STRVAL_PP(argv[2]);
orig_str.len = Z_STRLEN_PP(argv[2]);
-   orig_str.no_encoding = mbfl_identify_encoding_no(&orig_str, 
MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size) TSRMLS_CC);
-   if (orig_str.no_encoding == mbfl_no_encoding_invalid) {
-   orig_str.no_encoding = MBSTRG(current_internal_encoding);
+   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) TSRMLS_CC);
}
pstr = mbfl_convert_encoding(&orig_str, &conv_str, tran_cs TSRMLS_CC);
if (pstr != NULL) {



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




[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail02.phpt

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 03:27:18 2002 EDT

  Modified files:  
/php4/ext/mbstring/testsmb_send_mail02.phpt 
  Log:
  Updated the test
  
  
Index: php4/ext/mbstring/tests/mb_send_mail02.phpt
diff -u php4/ext/mbstring/tests/mb_send_mail02.phpt:1.1 
php4/ext/mbstring/tests/mb_send_mail02.phpt:1.2
--- php4/ext/mbstring/tests/mb_send_mail02.phpt:1.1 Tue Nov 12 15:04:58 2002
+++ php4/ext/mbstring/tests/mb_send_mail02.phpt Wed Nov 13 03:27:17 2002
@@ -17,6 +17,7 @@
 
 /* Japanese (EUC-JP) */
 if (mb_language("japanese")) {
+   mb_internal_encoding('EUC-JP');
mb_send_mail($to, "¥Æ¥¹¥È ".mb_language(), "¥Æ¥¹¥È");
 }
 ?>



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




[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail05.phpt

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 03:45:38 2002 EDT

  Added files: 
/php4/ext/mbstring/testsmb_send_mail05.phpt 
  Log:
  Added a test for mb_send_mail() to check if the simplified Chinese support
  works
  
  

Index: php4/ext/mbstring/tests/mb_send_mail05.phpt
+++ php4/ext/mbstring/tests/mb_send_mail05.phpt
--TEST--
mb_send_mail() test 5 (lang=Simplified Chinese)
--SKIPIF--

--INI--
sendmail_path=cat
--FILE--

--EXPECTF--
To: [EMAIL PROTECTED]
Subject: %s
Mime-Version: 1.0
Content-Type: text/plain; charset=%s
Content-Transfer-Encoding: %s

test
To: [EMAIL PROTECTED]
Subject: =?HZ-GB-2312?B?fnsyYlFpfn0gU2ltcGxpZmllZCBD?=
 =?HZ-GB-2312?B?aGluZXNl?=
Mime-Version: 1.0
Content-Type: text/plain; charset=HZ-GB-2312
Content-Transfer-Encoding: 7bit

~{2bQi~}



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




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

2002-11-13 Thread Derick Rethans
derick  Wed Nov 13 03:54:35 2002 EDT

  Modified files:  
/php4/ext/mysql php_mysql.c 
  Log:
  - Reset globals for each request
  
  
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.173 php4/ext/mysql/php_mysql.c:1.174
--- php4/ext/mysql/php_mysql.c:1.173Tue Nov 12 03:11:23 2002
+++ php4/ext/mysql/php_mysql.c  Wed Nov 13 03:54:34 2002
@@ -18,7 +18,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.173 2002/11/12 08:11:23 derick Exp $ */
+/* $Id: php_mysql.c,v 1.174 2002/11/13 08:54:34 derick Exp $ */
 
 /* TODO:
  *
@@ -435,7 +435,9 @@
MySG(num_links) = MySG(num_persistent);
/* Reset connect error/errno on every request */
MySG(connect_error) = NULL;
-   MySG(connect_errno)=0;
+   MySG(connect_errno) =0;
+   MySG(trace_mode) = 0;
+   MySG(result_allocated) = 0;
return SUCCESS;
 }
 /* }}} */



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




[PHP-CVS] cvs: php4 / TODO

2002-11-13 Thread Andrey Hristov
andrey  Wed Nov 13 04:11:19 2002 EDT

  Modified files:  
/php4   TODO 
  Log:
  Already binary safe.
  
  
Index: php4/TODO
diff -u php4/TODO:1.135 php4/TODO:1.136
--- php4/TODO:1.135 Thu Sep 19 08:49:23 2002
+++ php4/TODO   Wed Nov 13 04:11:19 2002
@@ -158,7 +158,6 @@
 basename()
 dirname()
 strrpos()
-strrchr()
 strip_tags()
 
 ext/wddx



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




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

2002-11-13 Thread Marcus Börger
Normally we discuss this and come to a conclusion before we do such
things here. I did such a thing once myself and wow that was NOT good!

The votings so far:

enabled: Wez, Marcus, Maxim, Rui, Moriyoshi, Yasuo
not enabled Jani, Derick, Ilia, Mike, James
The following didn't make their meaning clear: Dan, Andrei, Thies

marcus

At 05:36 13.11.2002, Andrei Zmievski wrote:

andrei  Tue Nov 12 23:36:04 2002 EDT

  Modified files:
/php4/ext/mbstring  config.m4
  Log:
  Disable mbstring by default.


Index: php4/ext/mbstring/config.m4
diff -u php4/ext/mbstring/config.m4:1.27 php4/ext/mbstring/config.m4:1.28
--- php4/ext/mbstring/config.m4:1.27Thu Oct 10 12:57:52 2002
+++ php4/ext/mbstring/config.m4 Tue Nov 12 23:36:04 2002
@@ -1,9 +1,9 @@
 dnl
-dnl $Id: config.m4,v 1.27 2002/10/10 16:57:52 moriyoshi Exp $
+dnl $Id: config.m4,v 1.28 2002/11/13 04:36:04 andrei Exp $
 dnl

 PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support,
-[  --disable-mbstring  Disable multibyte string support], yes)
+[  --enable-mbstring   Enable multibyte string support])

 if test "$PHP_MBSTRING" != "no"; then
   AC_DEFINE(HAVE_MBSTRING,1,[whether to have multibyte string support])
@@ -36,7 +36,7 @@


 PHP_ARG_ENABLE(mbregex, whether to enable multibyte regex support,
-[  --disable-mbregex   Disable multibyte regex support], yes, no)
+[  --enable-mbregexEnable multibyte regex support], no, no)

 if test "$PHP_MBREGEX" != "no" ; then
   AC_DEFINE(HAVE_MBREGEX, 1, [whether to have multibyte regex support])



--
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/mbstring config.m4

2002-11-13 Thread Derick Rethans
On Wed, 13 Nov 2002, Marcus Börger wrote:

> Normally we discuss this and come to a conclusion before we do such
> things here. I did such a thing once myself and wow that was NOT good!

Then can you please also count the votes for enabling it in the first 
place when it was enabled by default in this[1] patch? I couldn't find 
any discussion on this.

[1] http://cvs.php.net/diff.php/php4/ext/mbstring/config.m4?login=2&r1=1.5&r2=1.6&ty=h

Derick

-- 

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




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

2002-11-13 Thread Marcus Boerger
helly   Wed Nov 13 05:17:19 2002 EDT

  Modified files:  
/php4/ext/dbdb.c 
  Log:
  avoid fileno()
  
  
Index: php4/ext/db/db.c
diff -u php4/ext/db/db.c:1.80 php4/ext/db/db.c:1.81
--- php4/ext/db/db.c:1.80   Tue Nov 12 07:01:57 2002
+++ php4/ext/db/db.cWed Nov 13 05:17:19 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: db.c,v 1.80 2002/11/12 12:01:57 helly Exp $ */
+/* $Id: db.c,v 1.81 2002/11/13 10:17:19 helly Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -916,17 +916,17 @@
fseek(dbf, 0L, SEEK_END);
fprintf(dbf, "%d\n", key_datum.dsize);
fflush(dbf);
-   ret = write(fileno(dbf), key_datum.dptr, key_datum.dsize);
+   ret = fwrite(key_datum.dptr, sizeof(char), key_datum.dsize, dbf);
fprintf(dbf, "%d\n", value_datum.dsize);
fflush(dbf);
-   ret = write(fileno(dbf), value_datum.dptr, value_datum.dsize);
+   ret = fwrite(value_datum.dptr, sizeof(char), value_datum.dsize, dbf);
} else { /* DBM_REPLACE */
flatfile_delete(dbf, key_datum);
fprintf(dbf, "%d\n", key_datum.dsize);
fflush(dbf);
-   ret = write(fileno(dbf), key_datum.dptr, key_datum.dsize);
+   ret = fwrite(key_datum.dptr, sizeof(char), key_datum.dsize, dbf);
fprintf(dbf, "%d\n", value_datum.dsize);
-   ret = write(fileno(dbf), value_datum.dptr, value_datum.dsize);
+   ret = fwrite(value_datum.dptr, sizeof(char), value_datum.dsize, dbf);
}
 
if (ret>0)
@@ -950,7 +950,7 @@
buf_size+=num;
buf = erealloc(buf, (buf_size+1)*sizeof(char));
}
-   read(fileno(dbf), buf, num);
+   fread(buf, sizeof(char), num, dbf);
value_datum.dptr = buf;
value_datum.dsize = num;
}
@@ -1079,7 +1079,7 @@
if (buf.dptr) efree(buf.dptr);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
}
-   num=read(fileno(dbf), buf.dptr, num);
+   num = fread(buf.dptr, sizeof(char), num, dbf);
if (num<0) break;
buf.dsize = num;
if (*(buf.dptr)!=0) {
@@ -1093,7 +1093,7 @@
if (buf.dptr) efree(buf.dptr);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
}
-   num=read(fileno(dbf), buf.dptr, num);
+   num = fread(buf.dptr, sizeof(char), num, dbf);
if (num<0) break;
}
if (buf.dptr) efree(buf.dptr);
@@ -1119,7 +1119,7 @@
if (buf.dptr) efree(buf.dptr);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
}
-   num=read(fileno(dbf), buf.dptr, num);
+   num = fread(buf.dptr, sizeof(char), num, dbf);
if (num<0) break;
if (!fgets(buf.dptr, 15, dbf)) break;
num = atoi(buf.dptr);
@@ -1128,7 +1128,7 @@
if (buf.dptr) efree(buf.dptr);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
}
-   num=read(fileno(dbf), buf.dptr, num);
+   num = fread(buf.dptr, sizeof(char), num, dbf);
if (num<0) break;
buf.dsize = num;
if (*(buf.dptr)!=0) {



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




Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c

2002-11-13 Thread Marcus Börger
At 18:59 06.11.2002, Sascha Schumann wrote:

sas Wed Nov  6 12:59:04 2002 EDT

  Modified files:
/php4/ext/dba   dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c
dba_flatfile.c dba_gdbm.c dba_ndbm.c
  Log:
  emalloc never returns 0, so we can simplify the code paths.
  also replace ecalloc with emalloc+memset, so that the latter can be 
inlined.

Could you explain what you meant with the second part?
ecmalloc is a call that uses memset. If memset can be inlined it would
be inlined in ecalloc as well as in the other place. In other words i do not
see the difference.


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




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

2002-11-13 Thread Moriyoshi Koizumi
> Then can you please also count the votes for enabling it in the first 
> place when it was enabled by default in this[1] patch? I couldn't find 
> any discussion on this.
> 
> [1] 
>http://cvs.php.net/diff.php/php4/ext/mbstring/config.m4?login=2&r1=1.5&r2=1.6&ty=h

Actually he did.
Please see http://marc.theaimsgroup.com/?l=php-dev&m=101805486809856&w=2

Moriyoshi

> 
> Derick
> 
> -- 
> 
> ---
>  Derick Rethans   http://derickrethans.nl/ 
>  JDI Media Solutions
> --[ if you hold a unix shell to your ear, do you hear the c? ]-
> 
> 
> -- 
> 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/mbstring config.m4

2002-11-13 Thread Derick Rethans
On Wed, 13 Nov 2002, Moriyoshi Koizumi wrote:

> > Then can you please also count the votes for enabling it in the first 
> > place when it was enabled by default in this[1] patch? I couldn't find 
> > any discussion on this.
> > 
> > [1] 
>http://cvs.php.net/diff.php/php4/ext/mbstring/config.m4?login=2&r1=1.5&r2=1.6&ty=h
> 
> Actually he did.
> Please see http://marc.theaimsgroup.com/?l=php-dev&m=101805486809856&w=2

But I don't see any voting there, and I see the same concerns that are 
raised now. 

Derick

-- 

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




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

2002-11-13 Thread Thies C. Arntzen
n Wed, Nov 13, 2002 at 10:48:25AM +0100, Marcus Börger wrote:
> Normally we discuss this and come to a conclusion before we do such
> things here. I did such a thing once myself and wow that was NOT good!
> 
> The votings so far:
> 
> enabled: Wez, Marcus, Maxim, Rui, Moriyoshi, Yasuo
> not enabled Jani, Derick, Ilia, Mike, James
> The following didn't make their meaning clear: Dan, Andrei, Thies

though i think mbstring is a very usefull thing (for non
8bit system) i *personally* won't need it in the near future.
so im +1 on disabling it by default.

also i'd like to add a new sidenode:
as mbstring changes the size of executor_globals it *might*
make binary modules incompatibe between php binaries with
mbstring to php compiled without mbstring. i might be wrong,
but would it hurt if mbstring:
- had it's own globals 
and zend/php:
- had all the hooks to make mbstring loadable as a "normal"
  php-extension?

re,
tc

> 
> marcus
> 
> At 05:36 13.11.2002, Andrei Zmievski wrote:
> >andrei  Tue Nov 12 23:36:04 2002 EDT
> >
> >  Modified files:
> >/php4/ext/mbstring  config.m4
> >  Log:
> >  Disable mbstring by default.
> >
> >
> >Index: php4/ext/mbstring/config.m4
> >diff -u php4/ext/mbstring/config.m4:1.27 
> >php4/ext/mbstring/config.m4:1.28
> >--- php4/ext/mbstring/config.m4:1.27Thu Oct 10 12:57:52 2002
> >+++ php4/ext/mbstring/config.m4 Tue Nov 12 23:36:04 2002
> >@@ -1,9 +1,9 @@
> > dnl
> >-dnl $Id: config.m4,v 1.27 2002/10/10 16:57:52 moriyoshi Exp $
> >+dnl $Id: config.m4,v 1.28 2002/11/13 04:36:04 andrei Exp $
> > dnl
> >
> > PHP_ARG_ENABLE(mbstring, whether to enable multibyte string support,
> >-[  --disable-mbstring  Disable multibyte string support], yes)
> >+[  --enable-mbstring   Enable multibyte string support])
> >
> > if test "$PHP_MBSTRING" != "no"; then
> >   AC_DEFINE(HAVE_MBSTRING,1,[whether to have multibyte string 
> >   support])
> >@@ -36,7 +36,7 @@
> >
> >
> > PHP_ARG_ENABLE(mbregex, whether to enable multibyte regex support,
> >-[  --disable-mbregex   Disable multibyte regex support], yes, no)
> >+[  --enable-mbregexEnable multibyte regex support], no, no)
> >
> > if test "$PHP_MBREGEX" != "no" ; then
> >   AC_DEFINE(HAVE_MBREGEX, 1, [whether to have multibyte regex 
> >   support])
> >
> >
> >
> >--
> >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

-- 
Thies C. Arntzen   -   Looking for all sorts of freelance work  -   just ask..
  http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ

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




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

2002-11-13 Thread Moriyoshi Koizumi

Derick Rethans <[EMAIL PROTECTED]> wrote:

> On Wed, 13 Nov 2002, Moriyoshi Koizumi wrote:
> 
> > > Then can you please also count the votes for enabling it in the first 
> > > place when it was enabled by default in this[1] patch? I couldn't find 
> > > any discussion on this.
> > > 
> > > [1] 
>http://cvs.php.net/diff.php/php4/ext/mbstring/config.m4?login=2&r1=1.5&r2=1.6&ty=h
> > 
> > Actually he did.
> > Please see http://marc.theaimsgroup.com/?l=php-dev&m=101805486809856&w=2
> 
> But I don't see any voting there, and I see the same concerns that are 
> raised now. 

You said you haven't found any discussion about that, so I simply gave you 
a pointer, where most of the developers in the list have little concern 
about mbstring. I think that's why votes didn't take place there.

And what is the same concern you are referring to?

Moriyoshi


> Derick
> 
> -- 
> 
> ---
>  Derick Rethans   http://derickrethans.nl/ 
>  JDI Media Solutions
> --[ if you hold a unix shell to your ear, do you hear the c? ]-
> 


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




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

2002-11-13 Thread Marcus Börger
As far as i can see - there was only a question if anybody was against
enabling it. And none really objected.

Initiated the request: Yasuo
No objection: Stig, Derick
Liked the idea: Wez, Rui

Hatmud and Dan mentioned some comparison to other comparable changes.
Which had negative side effects and generally Dan is known to be against
enabling any module by default.

For me the concern was that it may be enabled by default if it is stable.
As Derick wrote this seems the same as the result we now have.
The only difference is that for some reason some people now think mbstring
isn't stable. I guess that came from the start of the discussion where some
talk of the conference was reported, something like "function overloading 
could
harm php". But function overloading was disabled by default i thought.

marcus

At 12:06 13.11.2002, Derick Rethans wrote:
On Wed, 13 Nov 2002, Moriyoshi Koizumi wrote:

> > Then can you please also count the votes for enabling it in the first
> > place when it was enabled by default in this[1] patch? I couldn't find
> > any discussion on this.
> >
> > [1] 
http://cvs.php.net/diff.php/php4/ext/mbstring/config.m4?login=2&r1=1.5&r2=1.6&ty=h
>
> Actually he did.
> Please see http://marc.theaimsgroup.com/?l=php-dev&m=101805486809856&w=2

But I don't see any voting there, and I see the same concerns that are
raised now.

Derick

--

---
 Derick Rethans   http://derickrethans.nl/
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


--
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 /ext/mbstring mbfilter.c

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 06:57:59 2002 EDT

  Modified files:  
/php4/ext/mbstring  mbfilter.c 
  Log:
  Corrected Traditional Chinese language spec and the preferred MIME name
   of which the encoding is used in that locale.
  
  
Index: php4/ext/mbstring/mbfilter.c
diff -u php4/ext/mbstring/mbfilter.c:1.51 php4/ext/mbstring/mbfilter.c:1.52
--- php4/ext/mbstring/mbfilter.c:1.51   Tue Nov 12 14:44:56 2002
+++ php4/ext/mbstring/mbfilter.cWed Nov 13 06:57:59 2002
@@ -80,7 +80,7 @@
  *
  */
 
-/* $Id: mbfilter.c,v 1.51 2002/11/12 19:44:56 moriyoshi Exp $ */
+/* $Id: mbfilter.c,v 1.52 2002/11/13 11:57:59 moriyoshi Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -208,9 +208,9 @@
"Traditional Chinese",
"zh-tw",
NULL,
-   mbfl_no_encoding_hz,
+   mbfl_no_encoding_big5,
mbfl_no_encoding_base64,
-   mbfl_no_encoding_7bit
+   mbfl_no_encoding_8bit
 };
 
 static mbfl_language mbfl_language_russian = {
@@ -826,12 +826,12 @@
MBFL_ENCTYPE_MBCS
 };
 
-static const char *mbfl_encoding_big5_aliases[] = {"CN-BIG5", "BIG5", "BIG-FIVE", 
"BIGFIVE", "CP950", NULL};
+static const char *mbfl_encoding_big5_aliases[] = {"CN-BIG5", "BIG-FIVE", "BIGFIVE", 
+"CP950", NULL};
 
 static mbfl_encoding mbfl_encoding_big5 = {
mbfl_no_encoding_big5,
"BIG-5",
-   "CN-BIG5",
+   "BIG5",
(const char *(*)[])&mbfl_encoding_big5_aliases,
mblen_table_big5,
MBFL_ENCTYPE_MBCS



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




[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail06.phpt

2002-11-13 Thread Moriyoshi Koizumi
moriyoshi   Wed Nov 13 07:00:48 2002 EDT

  Added files: 
/php4/ext/mbstring/testsmb_send_mail06.phpt 
  Log:
  Added a test for mb_send_mail() to check if the function properly handles
  Traditional Chinese characters.
  
  

Index: php4/ext/mbstring/tests/mb_send_mail06.phpt
+++ php4/ext/mbstring/tests/mb_send_mail06.phpt
--TEST--
mb_send_mail() test 6 (lang=Traditional Chinese)
--SKIPIF--

--INI--
sendmail_path=cat
--FILE--

--EXPECTF--
To: [EMAIL PROTECTED]
Subject: %s
Mime-Version: 1.0
Content-Type: text/plain; charset=%s
Content-Transfer-Encoding: %s

test
To: [EMAIL PROTECTED]
Subject: =?BIG5?B?tPrF5yBUcmFkaXRpb25hbCBDaGluZXNl?=
Mime-Version: 1.0
Content-Type: text/plain; charset=BIG5
Content-Transfer-Encoding: 8bit

´úÅç



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




[PHP-CVS] cvs: php4 /ext/dba dba.dsp dba_cdb.c dba_flatfile.c /ext/dba/libcdb cdb.c cdb_make.c

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 07:12:45 2002 EDT

  Modified files:  
/php4/ext/dba   dba.dsp dba_cdb.c dba_flatfile.c 
/php4/ext/dba/libcdbcdb.c cdb_make.c 
  Log:
  Added support for bundled flatfile, cdb and cdb_make handlers
  to win32 build of the dba extension.
  
  
Index: php4/ext/dba/dba.dsp
diff -u php4/ext/dba/dba.dsp:1.2 php4/ext/dba/dba.dsp:1.3
--- php4/ext/dba/dba.dsp:1.2Thu Oct 26 14:51:12 2000
+++ php4/ext/dba/dba.dspWed Nov 13 07:12:44 2002
@@ -44,7 +44,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I 
"..\..\main" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D 
"COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_DB3=1 /D 
DB3_INCLUDE_FILE="db.h" /YX /FD /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 "PHP_EXPORTS" /D 
"COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D DBA_DB3=1 
/YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I 
+"..\..\main" /D ZEND_DEBUG=0 /D DBA_DB3=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
+"PHP_EXPORTS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D 
+HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX 
+/FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x407 /d "NDEBUG"
@@ -71,7 +71,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I 
"..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
"PHP_EXPORTS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D 
HAVE_DBA=1 /D "DBA_DB3" /D DB3_INCLUDE_FILE="db.h" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" 
/I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" 
/D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_DBA=1 /D "DBA_DB3" 
/YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" 
+/I "..\..\main" /D ZEND_DEBUG=1 /D "DBA_DB3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D 
+"PHP_EXPORTS" /D "COMPILE_DL_DBA" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D 
+HAVE_DBA=1 /D DBA_FLATFILE=1 /D DBA_CDB=1 /D DBA_CDB_MAKE=1 /D DBA_CDB_BUILTIN=1 /YX 
+/FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x407 /d "_DEBUG"
@@ -94,6 +94,14 @@
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 # Begin Source File
 
+SOURCE=.\libcdb\cdb.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\libcdb\cdb_make.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\dba.c
 # End Source File
 # Begin Source File
@@ -114,18 +122,42 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\dba_flatfile.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\dba_gdbm.c
 # End Source File
 # Begin Source File
 
 SOURCE=.\dba_ndbm.c
 # End Source File
+# Begin Source File
+
+SOURCE=.\libflatfile\flatfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\libcdb\uint32.c
+# End Source File
 # End Group
 # Begin Group "Header Files"
 
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
 # Begin Source File
 
+SOURCE=.\libcdb\cdb.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\libcdb\cdb_make.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\libflatfile\flatfile.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\php_cdb.h
 # End Source File
 # Begin Source File
@@ -146,11 +178,19 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\php_flatfile.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\php_gdbm.h
 # End Source File
 # Begin Source File
 
 SOURCE=.\php_ndbm.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\libcdb\uint32.h
 # End Source File
 # End Group
 # End Target
Index: php4/ext/dba/dba_cdb.c
diff -u php4/ext/dba/dba_cdb.c:1.22 php4/ext/dba/dba_cdb.c:1.23
--- php4/ext/dba/dba_cdb.c:1.22 Sun Nov 10 12:58:46 2002
+++ php4/ext/dba/dba_cdb.c  Wed Nov 13 07:12:44 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: dba_cdb.c,v 1.22 2002/11/10 17:58:46 helly Exp $ */
+/* $Id: dba_cdb.c,v 1.23 2002/11/13 12:12:44 edink Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -29,7 +29,9 @@
 #include "php_cdb.h"
 
 #include 
+#ifdef HAVE_UNISTD_H
 #include 
+#endif
 #include 
 
 #if DBA_CDB_BUILTIN
Index: php4/ext/dba/dba_flatfile.c
diff -u php4/ext/dba/dba_flatfile.c:1.7 php4/ext/dba/dba_flatfile.c:1.8
--- php4/ext/dba/dba_flatfile.c:1.7 Sun Nov 10 12:58:46 2002
+++ php4/ext/dba/dba_flatfile.c Wed Nov 13 07:12:44 2002
@@ -16,7 +16,7 @@

Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.cdba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c

2002-11-13 Thread Sascha Schumann
On Wed, 13 Nov 2002, Marcus Börger wrote:

> At 18:59 06.11.2002, Sascha Schumann wrote:
> >sas Wed Nov  6 12:59:04 2002 EDT
> >
> >   Modified files:
> > /php4/ext/dba   dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c
> > dba_flatfile.c dba_gdbm.c dba_ndbm.c
> >   Log:
> >   emalloc never returns 0, so we can simplify the code paths.
> >   also replace ecalloc with emalloc+memset, so that the latter can be
> > inlined.
>
> Could you explain what you meant with the second part?
> ecmalloc is a call that uses memset. If memset can be inlined it would
> be inlined in ecalloc as well as in the other place. In other words i do not
> see the difference.

The difference is the placement of the memset call.  After
the changes, a compiler which does not optimize across
function borders can inline the memset call (e.g. GCC).
memset() is a lot faster, if the compiler knows the size of
the data field.

Have a look at the assembler code here
http://www.mail-archive.com/dev@;httpd.apache.org/msg02492.html

- Sascha


--
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-11-13 Thread Jan Lehnardt
jan Wed Nov 13 07:41:05 2002 EDT

  Modified files:  
/php4/sapi/cli  php_cli.c 
  Log:
   - be more verbose
  
  
Index: php4/sapi/cli/php_cli.c
diff -u php4/sapi/cli/php_cli.c:1.50 php4/sapi/cli/php_cli.c:1.51
--- php4/sapi/cli/php_cli.c:1.50Tue Nov 12 15:56:46 2002
+++ php4/sapi/cli/php_cli.c Wed Nov 13 07:41:05 2002
@@ -651,7 +651,7 @@
if (!(file_handle.handle.fp = VCWD_FOPEN(script_file, "rb"))) {
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
-   PUTS("Could not open input file.\n");
+   php_printf("Could not open input file: %s.\n", 
+script_file);
goto err;
}
file_handle.filename = script_file;



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




Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c

2002-11-13 Thread Marcus Börger
At 13:37 13.11.2002, Sascha Schumann wrote:

On Wed, 13 Nov 2002, Marcus Börger wrote:

> At 18:59 06.11.2002, Sascha Schumann wrote:
> >sas Wed Nov  6 12:59:04 2002 EDT
> >
> >   Modified files:
> > /php4/ext/dba   dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c
> > dba_flatfile.c dba_gdbm.c dba_ndbm.c
> >   Log:
> >   emalloc never returns 0, so we can simplify the code paths.
> >   also replace ecalloc with emalloc+memset, so that the latter can be
> > inlined.
>
> Could you explain what you meant with the second part?
> ecmalloc is a call that uses memset. If memset can be inlined it would
> be inlined in ecalloc as well as in the other place. In other words i 
do not
> see the difference.

The difference is the placement of the memset call.  After
the changes, a compiler which does not optimize across
function borders can inline the memset call (e.g. GCC).
memset() is a lot faster, if the compiler knows the size of
the data field.

You're right the compiler knows the size in the caller function but not
in ecalloc of cause. Shouldn't then ecalloc be a compiler define?

#define ecalloc(num, size) \
  memset( emalloc(num*size), 0, num*size)

marcus


   Have a look at the assembler code here
http://www.mail-archive.com/dev@;httpd.apache.org/msg02492.html

- Sascha


--
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 /ext/dba config.m4

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 08:12:26 2002 EDT

  Modified files:  
/php4/ext/dba   config.m4 
  Log:
  Allow use of Berkeley db version 3.1 as found on many RedHat systems.
  
  
Index: php4/ext/dba/config.m4
diff -u php4/ext/dba/config.m4:1.28 php4/ext/dba/config.m4:1.29
--- php4/ext/dba/config.m4:1.28 Wed Nov  6 05:08:38 2002
+++ php4/ext/dba/config.m4  Wed Nov 13 08:12:26 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.28 2002/11/06 10:08:38 helly Exp $
+dnl $Id: config.m4,v 1.29 2002/11/13 13:12:26 edink Exp $
 dnl
 
 AC_DEFUN(PHP_TEMP_LDFLAGS,[
@@ -174,7 +174,7 @@
   AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ])
 fi
 
-for LIB in db-3 db3 db; do
+for LIB in db-3.1 db-3 db3 db; do
   PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
   AC_CHECK_LIB($LIB, db_create, [AC_DEFINE(DBA_DB3,1,[ ]) THIS_LIBS=$LIB])
   ])



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




Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.cdba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c

2002-11-13 Thread Sascha Schumann
> You're right the compiler knows the size in the caller function but not
> in ecalloc of cause. Shouldn't then ecalloc be a compiler define?
>
> #define ecalloc(num, size) \
>memset( emalloc(num*size), 0, num*size)

It was like that until Aug 18th.  A commit back then turned
the fast macro back into a slow function again and added a
division.  With that kind of setup, the compiler has no
chance to reduce and optimize the target code.

By using emalloc+memset, we get compile-time reduction (no
multiplication at run-time) and inlining for free.

- Sascha


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




[PHP-CVS] cvs: php4 / run-tests2.php /ext/standard array.c dir.c

2002-11-13 Thread John Coggeshall
johnWed Nov 13 08:31:33 2002 EDT

  Modified files:  
/php4   run-tests2.php 
/php4/ext/standard  array.c dir.c 
  Log:
  
  Added GLOB_ONLYDIR and GLOB_BRACE for compatiable systems for the glob()
  function.
  
  Modified the layout and some minor logic in the experimental webHarness()
  test class
  
  Added Whitespace accidently to array.c :)
  
  
Index: php4/run-tests2.php
diff -u php4/run-tests2.php:1.2 php4/run-tests2.php:1.3
--- php4/run-tests2.php:1.2 Thu Oct 31 19:22:02 2002
+++ php4/run-tests2.php Wed Nov 13 08:31:32 2002
@@ -18,7 +18,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
|  Derick Rethans <[EMAIL PROTECTED]> |
|  Sander Roobol <[EMAIL PROTECTED]>  |
-   |  John Coggeshall <[EMAIL PROTECTED]   |
+   |  John Coggeshall <[EMAIL PROTECTED]>  |
| (based on version by: Stig Bakken <[EMAIL PROTECTED]>) |
| (based on the PHP 3 test framework by Rasmus Lerdorf)|
+--+
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.198 php4/ext/standard/array.c:1.199
--- php4/ext/standard/array.c:1.198 Tue Nov  5 11:19:19 2002
+++ php4/ext/standard/array.c   Wed Nov 13 08:31:32 2002
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.198 2002/11/05 16:19:19 iliaa Exp $ */
+/* $Id: array.c,v 1.199 2002/11/13 13:31:32 john Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -3250,7 +3250,7 @@
}
 
if (Z_TYPE_PP(input) != IS_ARRAY) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument 
shouldbe an array");
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should 
+be an array");
return;
}
 
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.108 php4/ext/standard/dir.c:1.109
--- php4/ext/standard/dir.c:1.108   Mon Oct  7 12:46:38 2002
+++ php4/ext/standard/dir.c Wed Nov 13 08:31:33 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dir.c,v 1.108 2002/10/07 16:46:38 rasmus Exp $ */
+/* $Id: dir.c,v 1.109 2002/11/13 13:31:33 john Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -133,6 +133,12 @@
REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 
CONST_CS|CONST_PERSISTENT);
 
 #ifdef HAVE_GLOB
+#ifdef GLOB_BRACE
+   REGISTER_LONG_CONSTANT("GLOB_BRACE", GLOB_BRACE, CONST_CS | CONST_PERSISTENT);
+#endif
+#ifdef GLOB_ONLYDIR
+   REGISTER_LONG_CONSTANT("GLOB_ONLYDIR", GLOB_ONLYDIR, CONST_CS | 
+CONST_PERSISTENT);
+#endif
 #ifdef GLOB_MARK
REGISTER_LONG_CONSTANT("GLOB_MARK", GLOB_MARK, CONST_CS | CONST_PERSISTENT);
 #endif



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




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

2002-11-13 Thread Moriyoshi Koizumi
Andrei Zmievski <[EMAIL PROTECTED]> wrote:

> On Wed, 13 Nov 2002, Marcus Börger wrote:
> > Hatmud and Dan mentioned some comparison to other comparable changes.
> > Which had negative side effects and generally Dan is known to be against
> > enabling any module by default.
> > 
> > For me the concern was that it may be enabled by default if it is stable.
> > As Derick wrote this seems the same as the result we now have.
> > The only difference is that for some reason some people now think mbstring
> > isn't stable. I guess that came from the start of the discussion where some
> > talk of the conference was reported, something like "function overloading 
> > could
> > harm php". But function overloading was disabled by default i thought.
> 
> As Derick (or someone else) mentioned, mbstring is a very volatile
> extension, it seems. It receives several commits a day and we do not
> know what kind of things it may break, on Linux, Windows, or other
> platforms. Having multibyte functionality (and other stuff) is great,
> but not at the cost of stability of the whole package.

Sorry for my repetitive change since the day I declared it had been done. 
But I've ever tried to clarify why the patch was needed, and how the patch 
works. Then I don't understand the reason you say *we* dunno what it may 
break, though it doesn't hurt anything else now as the unit tests goes, 
besides it's actually required by several extensions. If my effort isn't 
making any sense, I apologize. However, if you simply haven't tried to 
understand how this module works in relevance to the rest of the source 
codes, please reconsider it.

Regards,
Moriyoshi


> -Andrei   http://www.gravitonic.com/
> 
> Some people sell razors. Other people sell razor blades. Microsoft
> sells shaving cream containing 5% hair growth hormone.
>-- sigwinch, posting to Kuro5hin
> 
> -- 
> 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 /ext/dba/libflatfile flatfile.c flatfile.h

2002-11-13 Thread Marcus Boerger
helly   Wed Nov 13 11:28:45 2002 EDT

  Modified files:  
/php4/ext/dba/libflatfile   flatfile.c flatfile.h 
  Log:
  -use size_t
  -recheckin header as unix file
  
  
Index: php4/ext/dba/libflatfile/flatfile.c
diff -u php4/ext/dba/libflatfile/flatfile.c:1.4 php4/ext/dba/libflatfile/flatfile.c:1.5
--- php4/ext/dba/libflatfile/flatfile.c:1.4 Mon Nov 11 06:57:25 2002
+++ php4/ext/dba/libflatfile/flatfile.c Wed Nov 13 11:28:43 2002
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: flatfile.c,v 1.4 2002/11/11 11:57:25 helly Exp $ */
+/* $Id: flatfile.c,v 1.5 2002/11/13 16:28:43 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -80,7 +80,8 @@
  */
 PHPAPI datum flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC) {
datum value_datum = {NULL, 0};
-   int num=0, buf_size=1024;
+   size_t num=0;
+   size_t buf_size = 1024;
char *buf;  
 
if (flatfile_findkey(dba, key_datum TSRMLS_CC)) {
@@ -108,11 +109,12 @@
  */
 PHPAPI int flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC) {
char *key = key_datum.dptr;
-   int size = key_datum.dsize;
+   size_t size = key_datum.dsize;
 
char *buf;
-   int num, buf_size = 1024;
-   long pos;
+   size_t num;
+   size_t buf_size = 1024;
+   size_t pos;
 
php_stream_rewind(dba->fp);
 
@@ -167,11 +169,11 @@
  */
 PHPAPI int flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC) {
char *buf = NULL;
-   int num;
-   int buf_size=1024;
+   size_t num;
+   size_t buf_size = 1024;
int ret=0;
void *key = key_datum.dptr;
-   int size = key_datum.dsize;
+   size_t size = key_datum.dsize;
 
php_stream_rewind(dba->fp);
buf = emalloc((buf_size+1)*sizeof(char));
@@ -214,8 +216,8 @@
  */
 PHPAPI datum flatfile_firstkey(flatfile *dba TSRMLS_DC) {
datum buf;
-   int num;
-   int buf_size=1024;
+   size_t num;
+   size_t buf_size = 1024;
 
php_stream_rewind(dba->fp);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
@@ -255,8 +257,8 @@
  */
 PHPAPI datum flatfile_nextkey(flatfile *dba TSRMLS_DC) {
datum buf;
-   int num;
-   int buf_size=1024;
+   size_t num;
+   size_t buf_size = 1024;
 
php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET);
buf.dptr = emalloc((buf_size+1)*sizeof(char));
Index: php4/ext/dba/libflatfile/flatfile.h
diff -u php4/ext/dba/libflatfile/flatfile.h:1.3 php4/ext/dba/libflatfile/flatfile.h:1.4
--- php4/ext/dba/libflatfile/flatfile.h:1.3 Thu Nov  7 18:03:16 2002
+++ php4/ext/dba/libflatfile/flatfile.h Wed Nov 13 11:28:44 2002
@@ -1,47 +1,47 @@
-/*
-   +--+
-   | PHP Version 4|
-   +--+
-   | Copyright (c) 1997-2002 The PHP Group|
-   +--+
-   | 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   |
-   | 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  |
-   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
-   +--+
-   | Author: Marcus Boerger <[EMAIL PROTECTED]>   |
-   +--+
- */
-
-/* $Id: flatfile.h,v 1.3 2002/11/07 23:03:16 helly Exp $ */
-
-#ifndef PHP_LIBDBM_H
-#define PHP_LIBDBM_H
-
-typedef struct {
-   char *dptr;
-   int dsize;
-} datum;
-
-typedef struct {
-   char *lockfn;
-   int lockfd;
-   php_stream *fp;
-   long CurrentFlatFilePos;
-   datum nextkey;
-} flatfile;
-
-#define FLATFILE_INSERT 1
-#define FLATFILE_REPLACE 0
-
-PHPAPI int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode 
TSRMLS_DC);
-PHPAPI datum flatfile_fetch(flatfile *dba, datum key_datum TSRMLS_DC);
-PHPAPI int flatfile_delete(flatfile *dba, datum key_datum TSRMLS_DC);
-PHPAPI int flatfile_findkey(flatfile *dba, datum key_datum TSRMLS_DC);
-PHPAPI datum flatfile_firstkey(flatfile *dba TSRMLS_DC);
-PHPAPI datum flatfile_nextkey(flatfile *dba TSRMLS_DC);
-
-#endif
+/*
+   +--+
+   | PHP Version 4|
+   +-

[PHP-CVS] cvs: php4 /ext/dba/libcdb cdb.c

2002-11-13 Thread Marcus Boerger
helly   Wed Nov 13 11:30:51 2002 EDT

  Modified files:  
/php4/ext/dba/libcdbcdb.c 
  Log:
  must be unsigned
  # maybe i will change this to size_t for 64bit systems but i do not have the
  # time now and i have problems building php on a sun.
  
  
Index: php4/ext/dba/libcdb/cdb.c
diff -u php4/ext/dba/libcdb/cdb.c:1.2 php4/ext/dba/libcdb/cdb.c:1.3
--- php4/ext/dba/libcdb/cdb.c:1.2   Wed Nov 13 07:12:44 2002
+++ php4/ext/dba/libcdb/cdb.c   Wed Nov 13 11:30:50 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: cdb.c,v 1.2 2002/11/13 12:12:44 edink Exp $ */
+/* $Id: cdb.c,v 1.3 2002/11/13 16:30:50 helly Exp $ */
 
 /* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
 
@@ -46,7 +46,7 @@
 static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos TSRMLS_DC)
 {
char buf[32];
-   int n;
+   unsigned int n;
 
while (len > 0) {
n = sizeof(buf);



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




[PHP-CVS] cvs: php4 /ext/mbstring/tests mb_send_mail05.phpt mb_send_mail06.phpt

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 11:52:49 2002 EDT

  Modified files:  
/php4/ext/mbstring/testsmb_send_mail05.phpt mb_send_mail06.phpt 
  Log:
  Added a skip condition for when the encoding needed for the test is not
  available or supported.
  
  
Index: php4/ext/mbstring/tests/mb_send_mail05.phpt
diff -u php4/ext/mbstring/tests/mb_send_mail05.phpt:1.1 
php4/ext/mbstring/tests/mb_send_mail05.phpt:1.2
--- php4/ext/mbstring/tests/mb_send_mail05.phpt:1.1 Wed Nov 13 03:45:37 2002
+++ php4/ext/mbstring/tests/mb_send_mail05.phpt Wed Nov 13 11:52:48 2002
@@ -5,6 +5,9 @@
 if (@mb_send_mail() === false || !mb_language("Simplified Chinese")) {
die("skip mb_send_mail() not available");
 }
+if (!@mb_internal_encoding('GB2312')) {
+   die("skip GB2312 encoding is not avaliable on this platform");
+}
 ?>
 --INI--
 sendmail_path=cat
Index: php4/ext/mbstring/tests/mb_send_mail06.phpt
diff -u php4/ext/mbstring/tests/mb_send_mail06.phpt:1.1 
php4/ext/mbstring/tests/mb_send_mail06.phpt:1.2
--- php4/ext/mbstring/tests/mb_send_mail06.phpt:1.1 Wed Nov 13 07:00:47 2002
+++ php4/ext/mbstring/tests/mb_send_mail06.phpt Wed Nov 13 11:52:48 2002
@@ -5,6 +5,9 @@
 if (@mb_send_mail() === false || !mb_language("Traditional Chinese")) {
die("skip mb_send_mail() not available");
 }
+if (!@mb_internal_encoding('BIG5')) {
+   die("skip BIG5 encoding is not avaliable on this platform");
+}
 ?>
 --INI--
 sendmail_path=cat



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




Re: [PHP-CVS] cvs: php4 /ext/dba dba.c dba_cdb.c dba_db2.c dba_db3.c dba_dbm.c dba_flatfile.c dba_gdbm.c dba_ndbm.c

2002-11-13 Thread Marcus Börger
At 14:14 13.11.2002, Sascha Schumann wrote:

> You're right the compiler knows the size in the caller function but not
> in ecalloc of cause. Shouldn't then ecalloc be a compiler define?
>
> #define ecalloc(num, size) \
>memset( emalloc(num*size), 0, num*size)

It was like that until Aug 18th.  A commit back then turned
the fast macro back into a slow function again and added a
division.  With that kind of setup, the compiler has no
chance to reduce and optimize the target code.

By using emalloc+memset, we get compile-time reduction (no
multiplication at run-time) and inlining for free.

- Sascha



Agree but with one single addition if num and size are both constants
then the compiler does the multiplication at compiletime. So the above
define shouldn't have a run-time multiplication where not necessary.



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




[PHP-CVS] cvs: php4 /ext/mbstring/tests overload.phpt

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 12:16:33 2002 EDT

  Modified files:  
/php4/ext/mbstring/testsoverload.phpt 
  Log:
  Added a skip condition for when mail() function is not avaliable.
  
  
Index: php4/ext/mbstring/tests/overload.phpt
diff -u php4/ext/mbstring/tests/overload.phpt:1.1 
php4/ext/mbstring/tests/overload.phpt:1.2
--- php4/ext/mbstring/tests/overload.phpt:1.1   Fri Nov  8 02:22:10 2002
+++ php4/ext/mbstring/tests/overload.phpt   Wed Nov 13 12:16:33 2002
@@ -1,7 +1,12 @@
 --TEST--
 Function overloading test (said to be harmful)
 --SKIPIF--
-
+
 --INI--
 output_handler=
 mbstring.func_overload=7



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




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

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 12:17:31 2002 EDT

  Modified files:  
/php4/ext/yaz   php_yaz.c 
  Log:
  Compile warning fix.
  
  
Index: php4/ext/yaz/php_yaz.c
diff -u php4/ext/yaz/php_yaz.c:1.57 php4/ext/yaz/php_yaz.c:1.58
--- php4/ext/yaz/php_yaz.c:1.57 Tue Nov  5 14:57:02 2002
+++ php4/ext/yaz/php_yaz.c  Wed Nov 13 12:17:31 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_yaz.c,v 1.57 2002/11/05 19:57:02 iliaa Exp $ */
+/* $Id: php_yaz.c,v 1.58 2002/11/13 17:17:31 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -214,9 +214,11 @@
return 0;
 }
 
+#if iliaa_0 /* compile warning fix */
 static int send_present (Yaz_Association t);
 static int send_sort_present (Yaz_Association t);
 static int send_sort (Yaz_Association t);
+#endif
 
 const char *option_get (Yaz_Association as, const char *name)
 {



-- 
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-11-13 Thread Andrei Zmievski
andrei  Wed Nov 13 14:19:07 2002 EDT

  Modified files:  
/php4   configure.in 
/php4/main  php_version.h 
  Log:
  Change version to 4.4.0-dev.
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.396 php4/configure.in:1.397
--- php4/configure.in:1.396 Mon Nov 11 11:12:56 2002
+++ php4/configure.in   Wed Nov 13 14:19:04 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.396 2002/11/11 16:12:56 iliaa Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.397 2002/11/13 19:19:04 andrei Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,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.66 php4/main/php_version.h:1.67
--- php4/main/php_version.h:1.66Sun Oct 27 14:51:17 2002
+++ php4/main/php_version.h Wed Nov 13 14:19:05 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: php4 / NEWS

2002-11-13 Thread Derick Rethans
derick  Wed Nov 13 14:40:11 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - Moved cybermut to PECL
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1248 php4/NEWS:1.1249
--- php4/NEWS:1.1248Wed Nov 13 13:28:50 2002
+++ php4/NEWS   Wed Nov 13 14:40:10 2002
@@ -10,7 +10,9 @@
   . ext/cybercash
   . ext/icap
   . sapi/fhttpd
-- Moved ext/vpopmail to PECL. (James)
+- To PECL moved extensions: (James, Derick)
+  . ext/vpopmail
+  . ext/cybermut
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 
 - Modified log() to accept multiple bases. (Jason)
 - Added gd_info() which returns an array of gd support information. (Marcus)



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

2002-11-13 Thread Derick Rethans
derick  Wed Nov 13 14:41:55 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  - MFH: moved ext/cybermut to PECL
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247 php4/NEWS:1.1247.2.1
--- php4/NEWS:1.1247Wed Nov 13 03:20:01 2002
+++ php4/NEWS   Wed Nov 13 14:41:54 2002
@@ -10,7 +10,9 @@
   . ext/cybercash
   . ext/icap
   . sapi/fhttpd
-- Moved ext/vpopmail to PECL. (James)
+- To PECL moved extensions: (James, Derick)
+  . ext/vpopmail
+  . ext/cybermut
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 
 - Modified log() to accept multiple bases. (Jason)
 - Added gd_info() which returns an array of gd support information. (Marcus)



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




[PHP-CVS] cvs: php4 /ext/gd gd.c php_gd.h /ext/gd/libgd gd.c gd.h

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 15:02:59 2002 EDT

  Modified files:  
/php4/ext/gdgd.c php_gd.h 
/php4/ext/gd/libgd  gd.c gd.h 
  Log:
  Added imagefilter() function by Pierre-Alain Joye ([EMAIL PROTECTED]). This 
  function allows negate, grayscale, brightness, contrast, colorize, selective blur,
  Gaussian blur, edge detect, smooth, sharpen and emboss filters to be applied
  on an image.
  
  
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.221 php4/ext/gd/gd.c:1.222
--- php4/ext/gd/gd.c:1.221  Tue Nov 12 06:49:11 2002
+++ php4/ext/gd/gd.cWed Nov 13 15:02:58 2002
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221 2002/11/12 11:49:11 helly Exp $ */
+/* $Id: gd.c,v 1.222 2002/11/13 20:02:58 iliaa Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -107,6 +107,40 @@
 int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b);
 #endif
 
+/* Section Filters Declarations */
+/* IMPORTANT NOTE FOR NEW FILTER
+ * Do not forget to update:
+ * IMAGE_FILTER_MAX: define the last filter index
+ * IMAGE_FILTER_MAX_ARGS: define the biggest amout of arguments
+ * image_filter array in PHP_FUNCTION(imagefilter)
+ * */
+#if HAVE_GD_BUNDLED
+#define IMAGE_FILTER_NEGATE 0
+#define IMAGE_FILTER_GRAYSCALE  1
+#define IMAGE_FILTER_BRIGHTNESS 2
+#define IMAGE_FILTER_CONTRAST   3
+#define IMAGE_FILTER_COLORIZE   4
+#define IMAGE_FILTER_EDGEDETECT 5
+#define IMAGE_FILTER_EMBOSS 6
+#define IMAGE_FILTER_GAUSSIAN_BLUR  7
+#define IMAGE_FILTER_SELECTIVE_BLUR 8
+#define IMAGE_FILTER_MEAN_REMOVAL   9
+#define IMAGE_FILTER_SMOOTH 10
+#define IMAGE_FILTER_MAX10
+#define IMAGE_FILTER_MAX_ARGS   5
+static void php_image_filter_negate(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_grayscale(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_contrast(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_colorize(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_edgedetect(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_emboss(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_gaussian_blur(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_selective_blur(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_mean_removal(INTERNAL_FUNCTION_PARAMETERS);
+static void php_image_filter_smooth(INTERNAL_FUNCTION_PARAMETERS);
+#endif
+/* End Section filters declarations */
 static gdImagePtr _php_image_create_from_string (zval **Data, char *tn, gdImagePtr 
(*ioctx_func_p)() TSRMLS_DC);
 static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char 
*tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)());
 static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, 
void (*func_p)());
@@ -269,6 +303,12 @@
PHP_FE(imagelayereffect,NULL)
PHP_FE(imagecolormatch, NULL)
 #endif
+/* gd filters */
+#ifdef HAVE_GD_BUNDLED
+   PHP_FE(imagefilter, NULL)
+#endif
+
+
{NULL, NULL, NULL}
 };
 /* }}} */
@@ -352,6 +392,19 @@
REGISTER_LONG_CONSTANT("IMG_EFFECT_NORMAL", gdEffectNormal, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_EFFECT_OVERLAY", gdEffectOverlay, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("GD_BUNDLED", 1, CONST_CS | CONST_PERSISTENT);
+/* Section Filters */
+   REGISTER_LONG_CONSTANT("IMG_FILTER_NEGATE", IMAGE_FILTER_NEGATE, CONST_CS | 
+CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_GRAYSCALE", IMAGE_FILTER_GRAYSCALE, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_BRIGHTNESS", IMAGE_FILTER_BRIGHTNESS, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_CONTRAST", IMAGE_FILTER_CONTRAST, CONST_CS 
+| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_COLORIZE", IMAGE_FILTER_COLORIZE, CONST_CS 
+| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_EDGEDETECT", IMAGE_FILTER_EDGEDETECT, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_GAUSSIAN_BLUR", IMAGE_FILTER_GAUSSIAN_BLUR, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_SELECTIVE_BLUR", 
+IMAGE_FILTER_SELECTIVE_BLUR, CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_EMBOSS", IMAGE_FILTER_EMBOSS, CONST_CS | 
+CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_MEAN_REMOVAL", IMAGE_FILTER_MEAN_REMOVAL, 
+CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT("IMG_FILTER_SMOOTH", IMAGE_FILTER_SMOOTH, CONST_CS | 
+CONST_PERSISTENT);
+/* End Section Filters */
 #els

[PHP-CVS] cvs: php4 /ext/gd/tests imagefilter.phpt test.png

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 15:04:00 2002 EDT

  Added files: 
/php4/ext/gd/tests  test.png imagefilter.phpt 
  Log:
  Added tests for imagefilter() function.
  
  

Index: php4/ext/gd/tests/imagefilter.phpt
+++ php4/ext/gd/tests/imagefilter.phpt
--TEST--
imagefilter() function test
--SKIPIF--

--FILE--
unlink($SAVE_DIR. $filt. ".png");
} else {
echo "$filt failed\n";
}
} 

$im = imagecreatefrompng($SOURCE_IMG);

if (imagefilter($im, IMG_FILTER_SMOOTH, -1924.124)) {
imagepng($im, $SAVE_DIR . "IMG_FILTER_SMOOTH.png");
echo "IMG_FILTER_SMOOTH success\n";
echo md5_file($SAVE_DIR . "IMG_FILTER_SMOOTH.png") . "\n";
@unlink($SAVE_DIR . "IMG_FILTER_SMOOTH.png");
} else {
echo "IMG_FILTER_SMOOTH failed\n";
}

$im = imagecreatefrompng($SOURCE_IMG);

if (imagefilter($im, IMG_FILTER_COLORIZE, -127.12, -127.98, 127)) {
imagepng($im, $SAVE_DIR . "IMG_FILTER_COLORIZE.png");
echo "IMG_FILTER_COLORIZE success\n";
echo md5_file($SAVE_DIR . "IMG_FILTER_COLORIZE.png") . "\n";
unlink($SAVE_DIR . "IMG_FILTER_COLORIZE.png");
} else {
echo "IMG_FILTER_COLORIZE failed\n";
}

$im = imagecreatefrompng($SOURCE_IMG);

if (imagefilter($im, IMG_FILTER_CONTRAST, -90)) {
imagepng($im, $SAVE_DIR . "IMG_FILTER_CONTRAST.png");
echo "IMG_FILTER_CONTRAST success\n";
echo md5_file($SAVE_DIR . "IMG_FILTER_CONTRAST.png") . "\n";
unlink($SAVE_DIR . "IMG_FILTER_CONTRAST.png");
} else {
echo "IMG_FILTER_CONTRAST failed\n";
}

$im = imagecreatefrompng($SOURCE_IMG);

if (imagefilter($im, IMG_FILTER_BRIGHTNESS, 98)) {
imagepng($im, $SAVE_DIR . "IMG_FILTER_BRIGHTNESS.png");
echo "IMG_FILTER_BRIGHTNESS success\n";
echo md5_file($SAVE_DIR . "IMG_FILTER_BRIGHTNESS.png") . "\n";
unlink($SAVE_DIR . "IMG_FILTER_BRIGHTNESS.png");
} else {
echo "IMG_FILTER_BRIGHTNESS failed\n";
}
?>
--EXPECT--
IMG_FILTER_NEGATE success
791b480b940ca777c541a6541a9a21ee
IMG_FILTER_GRAYSCALE success
b6c77efe4f07916b889671a6d58a7646
IMG_FILTER_EDGEDETECT success
4a93e345325edb6e168fc3b603461a42
IMG_FILTER_GAUSSIAN_BLUR success
731a19e0f796ce853879761228f25a06
IMG_FILTER_SELECTIVE_BLUR success
740e8618e131d1e9e61fa4f891e2e4bd
IMG_FILTER_EMBOSS success
8e43cfced8d795bbce048a0402091b24
IMG_FILTER_MEAN_REMOVAL success
e8ae73918566861d1c707df35c171317
IMG_FILTER_SMOOTH success
4bda59ccda7b531f19be13fdda7570c3
IMG_FILTER_COLORIZE success
b7d1b39c3e7d98759da4437ee125
IMG_FILTER_CONTRAST success
837db2a6295b64b0ce3b27621e256b26
IMG_FILTER_BRIGHTNESS success
15d795db86637150f6cfc5f98d074dea



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




[PHP-CVS] cvs: php4 / NEWS

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 15:07:13 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  New gd function.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1249 php4/NEWS:1.1250
--- php4/NEWS:1.1249Wed Nov 13 14:40:10 2002
+++ php4/NEWS   Wed Nov 13 15:07:12 2002
@@ -13,6 +13,8 @@
 - To PECL moved extensions: (James, Derick)
   . ext/vpopmail
   . ext/cybermut
+- Added imagefilter() function which allows application of various filters.
+  This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 
 - Modified log() to accept multiple bases. (Jason)
 - Added gd_info() which returns an array of gd support information. (Marcus)



-- 
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-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 16:28:16 2002 EDT

  Modified files:  
/php4/main  config.w32.h.in 
  Log:
  Allow mbstring defines to be somewhere else without warnings.
  
  
Index: php4/main/config.w32.h.in
diff -u php4/main/config.w32.h.in:1.22 php4/main/config.w32.h.in:1.23
--- php4/main/config.w32.h.in:1.22  Wed Nov 13 01:47:43 2002
+++ php4/main/config.w32.h.in   Wed Nov 13 16:28:16 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.22 2002/11/13 06:47:43 sebastian Exp $
+   $Id: config.w32.h.in,v 1.23 2002/11/13 21:28:16 edink Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -42,13 +42,13 @@
 #define HAVE_FTP 1
 
 /* Enable / Disable MBSTRING extension (default: disabled) */
-#define HAVE_MBSTRING 0
-#define HAVE_MBREGEX 0
-#define HAVE_MBSTR_CN 0
-#define HAVE_MBSTR_JA 0
-#define HAVE_MBSTR_KR 0
-#define HAVE_MBSTR_RU 0
-#define HAVE_MBSTR_TW 0
+/* #define HAVE_MBSTRING 0 */
+/* #define HAVE_MBREGEX  0 */
+/* #define HAVE_MBSTR_CN 0 */
+/* #define HAVE_MBSTR_JA 0 */
+/* #define HAVE_MBSTR_KR 0 */
+/* #define HAVE_MBSTR_RU 0 */
+/* #define HAVE_MBSTR_TW 0 */
 
 /* Enable / Disable MySQL extension (default: enabled) */
 #define HAVE_MYSQL 1



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




[PHP-CVS] cvs: php4 /win32 php4dll.dsp php4dllts.dsp

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 16:29:56 2002 EDT

  Modified files:  
/php4/win32 php4dll.dsp php4dllts.dsp 
  Log:
  Really remove mbstring from the build.
  # mbstring is gone completely as it does not build currently on win32
  # as a separate module
  
  
Index: php4/win32/php4dll.dsp
diff -u php4/win32/php4dll.dsp:1.37 php4/win32/php4dll.dsp:1.38
--- php4/win32/php4dll.dsp:1.37 Thu Sep 26 02:10:22 2002
+++ php4/win32/php4dll.dsp  Wed Nov 13 16:29:55 2002
@@ -205,27 +205,27 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\streams.c
+SOURCE=..\main\snprintf.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\user_streams.c
+SOURCE=..\main\spprintf.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\strlcat.c
+SOURCE=..\main\streams.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\strlcpy.c
+SOURCE=..\main\strlcat.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\snprintf.c
+SOURCE=..\main\strlcpy.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\spprintf.c
+SOURCE=..\main\user_streams.c
 # End Source File
 # End Group
 # Begin Group "Header Files"
@@ -239,40 +239,20 @@
 
 SOURCE=..\main\config.w32.h.in
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# Begin Custom Build - Generating main/config.w32.h
-InputPath=..\main\config.w32.h.in
-
-"config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# Begin Custom Build - Generating main/config.w32.h
-InputPath=..\main\config.w32.h.in
-
-"config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
+!IF  "$(CFG)" == "php4dll - Win32 Debug"
 
-# End Custom Build
+!ELSEIF  "$(CFG)" == "php4dll - Win32 Release"
 
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
+!ELSEIF  "$(CFG)" == "php4dll - Win32 Release_inline"
 
 # Begin Custom Build - Generating main/config.w32.h
 InputPath=..\main\config.w32.h.in
 
 "config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
-
+   if not exist ..\main\config.w32.h ( 
+   copy ..\main\config.w32.h.in ..\main\config.w32.h > nul 
+   ) 
+   
 # End Custom Build
 
 !ENDIF 
@@ -348,27 +328,27 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\snprintf.h
+SOURCE=..\ext\standard\quot_print.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\spprintf.h
+SOURCE=..\main\rfc1867.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\ext\standard\quot_print.h
+SOURCE=..\main\safe_mode.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\rfc1867.h
+SOURCE=..\main\SAPI.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\safe_mode.h
+SOURCE=..\main\snprintf.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\SAPI.h
+SOURCE=..\main\spprintf.h
 # End Source File
 # Begin Source File
 
@@ -908,50 +888,6 @@
 # Begin Source File
 
 SOURCE=..\ext\ctype\ctype.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_cn.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_ja.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_kr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_ru.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_tw.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbregex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbstring.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\php_mbregex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\php_unicode.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\html_entities.c
 # End Source File
 # Begin Source File
 
Index: php4/win32/php4dllts.dsp
diff -u php4/win32/php4dllts.dsp:1.87 php4/win32/php4dllts.dsp:1.88
--- php4/win32/php4dllts.dsp:1.87   Tue Oct 15 12:56:00 2002
+++ php4/win32/php4dllts.dspWed Nov 13 16:29:55 2002
@@ -450,22 +450,22 @@
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\get.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\maketables.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\pcre.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE

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

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 16:37:27 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/main  config.w32.h.in 
  Log:
  MFH (mbstring defines commented out to allow defining them elsewhere).
  
  
Index: php4/main/config.w32.h.in
diff -u php4/main/config.w32.h.in:1.22 php4/main/config.w32.h.in:1.22.2.1
--- php4/main/config.w32.h.in:1.22  Wed Nov 13 01:47:43 2002
+++ php4/main/config.w32.h.in   Wed Nov 13 16:37:27 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.22 2002/11/13 06:47:43 sebastian Exp $
+   $Id: config.w32.h.in,v 1.22.2.1 2002/11/13 21:37:27 edink Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -42,13 +42,13 @@
 #define HAVE_FTP 1
 
 /* Enable / Disable MBSTRING extension (default: disabled) */
-#define HAVE_MBSTRING 0
-#define HAVE_MBREGEX 0
-#define HAVE_MBSTR_CN 0
-#define HAVE_MBSTR_JA 0
-#define HAVE_MBSTR_KR 0
-#define HAVE_MBSTR_RU 0
-#define HAVE_MBSTR_TW 0
+/* #define HAVE_MBSTRING 0 */
+/* #define HAVE_MBREGEX  0 */
+/* #define HAVE_MBSTR_CN 0 */
+/* #define HAVE_MBSTR_JA 0 */
+/* #define HAVE_MBSTR_KR 0 */
+/* #define HAVE_MBSTR_RU 0 */
+/* #define HAVE_MBSTR_TW 0 */
 
 /* Enable / Disable MySQL extension (default: enabled) */
 #define HAVE_MYSQL 1



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




[PHP-CVS] cvs: php4(PHP_4_3) /win32 php4dll.dsp php4dllts.dsp

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 16:38:58 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/win32 php4dll.dsp php4dllts.dsp 
  Log:
  MFH (relly disable compilation of mbstring)
  
  
Index: php4/win32/php4dll.dsp
diff -u php4/win32/php4dll.dsp:1.37 php4/win32/php4dll.dsp:1.37.2.1
--- php4/win32/php4dll.dsp:1.37 Thu Sep 26 02:10:22 2002
+++ php4/win32/php4dll.dsp  Wed Nov 13 16:38:57 2002
@@ -205,27 +205,27 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\streams.c
+SOURCE=..\main\snprintf.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\user_streams.c
+SOURCE=..\main\spprintf.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\strlcat.c
+SOURCE=..\main\streams.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\strlcpy.c
+SOURCE=..\main\strlcat.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\snprintf.c
+SOURCE=..\main\strlcpy.c
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\spprintf.c
+SOURCE=..\main\user_streams.c
 # End Source File
 # End Group
 # Begin Group "Header Files"
@@ -239,40 +239,20 @@
 
 SOURCE=..\main\config.w32.h.in
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# Begin Custom Build - Generating main/config.w32.h
-InputPath=..\main\config.w32.h.in
-
-"config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
-
-# End Custom Build
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# Begin Custom Build - Generating main/config.w32.h
-InputPath=..\main\config.w32.h.in
-
-"config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
+!IF  "$(CFG)" == "php4dll - Win32 Debug"
 
-# End Custom Build
+!ELSEIF  "$(CFG)" == "php4dll - Win32 Release"
 
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
+!ELSEIF  "$(CFG)" == "php4dll - Win32 Release_inline"
 
 # Begin Custom Build - Generating main/config.w32.h
 InputPath=..\main\config.w32.h.in
 
 "config.w32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   if not exist ..\main\config.w32.h (
- copy ..\main\config.w32.h.in ..\main\config.w32.h > nul
-   )
-
+   if not exist ..\main\config.w32.h ( 
+   copy ..\main\config.w32.h.in ..\main\config.w32.h > nul 
+   ) 
+   
 # End Custom Build
 
 !ENDIF 
@@ -348,27 +328,27 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\snprintf.h
+SOURCE=..\ext\standard\quot_print.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\spprintf.h
+SOURCE=..\main\rfc1867.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\ext\standard\quot_print.h
+SOURCE=..\main\safe_mode.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\rfc1867.h
+SOURCE=..\main\SAPI.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\safe_mode.h
+SOURCE=..\main\snprintf.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\main\SAPI.h
+SOURCE=..\main\spprintf.h
 # End Source File
 # Begin Source File
 
@@ -908,50 +888,6 @@
 # Begin Source File
 
 SOURCE=..\ext\ctype\ctype.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_cn.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_ja.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_kr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_ru.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbfilter_tw.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbregex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\mbstring.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\php_mbregex.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\php_unicode.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\mbstring\html_entities.c
 # End Source File
 # Begin Source File
 
Index: php4/win32/php4dllts.dsp
diff -u php4/win32/php4dllts.dsp:1.87 php4/win32/php4dllts.dsp:1.87.2.1
--- php4/win32/php4dllts.dsp:1.87   Tue Oct 15 12:56:00 2002
+++ php4/win32/php4dllts.dspWed Nov 13 16:38:57 2002
@@ -450,22 +450,22 @@
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\get.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\maketables.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\pcre.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D "LINK_SIZE=2"
+# ADD CPP /D "STATIC" /D "SUPPORT_UTF8" /D LINK_SIZE=2
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\study.c
-# ADD CPP /D "STATIC" /D "SUPPORT_UTF

[PHP-CVS] cvs: php4 / NEWS

2002-11-13 Thread Jani Taskinen
sniper  Wed Nov 13 17:24:49 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Welcome 4.4.0
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1250 php4/NEWS:1.1251
--- php4/NEWS:1.1250Wed Nov 13 15:07:12 2002
+++ php4/NEWS   Wed Nov 13 17:24:49 2002
@@ -1,5 +1,8 @@
 PHP 4  NEWS
 |||
+? ? ??? 200?, Version 4.4.0
+- dummy
+
 ? ? ??? 2002, Version 4.3.0
 - ATTENTION! "make install" will *by default* install the CLI SAPI binary in 
   {PREFIX}/bin/php. If you don't disable the CGI binary, it will be



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




[PHP-CVS] cvs: php4 /ext/curl CREDITS config.m4 curl.c curl.dsp curlstreams.c interface.c multi.c php_curl.h streams.c

2002-11-13 Thread Sterling Hughes
sterlingWed Nov 13 17:25:33 2002 EDT

  Added files: 
/php4/ext/curl  interface.c multi.c streams.c 

  Removed files:   
/php4/ext/curl  curl.c curlstreams.c 

  Modified files:  
/php4/ext/curl  CREDITS config.m4 curl.dsp php_curl.h 
  Log:
  add multi support and reorganize things a bit...
  
  
Index: php4/ext/curl/CREDITS
diff -u php4/ext/curl/CREDITS:1.1 php4/ext/curl/CREDITS:1.2
--- php4/ext/curl/CREDITS:1.1   Mon Nov 20 05:31:14 2000
+++ php4/ext/curl/CREDITS   Wed Nov 13 17:25:33 2002
@@ -1,2 +1,2 @@
-CURL
+cURL
 Sterling Hughes
Index: php4/ext/curl/config.m4
diff -u php4/ext/curl/config.m4:1.20 php4/ext/curl/config.m4:1.21
--- php4/ext/curl/config.m4:1.20Sun Nov 10 16:26:13 2002
+++ php4/ext/curl/config.m4 Wed Nov 13 17:25:33 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.20 2002/11/10 21:26:13 derick Exp $
+dnl $Id: config.m4,v 1.21 2002/11/13 22:25:33 sterling Exp $ 
 dnl
 
 PHP_ARG_WITH(curl, for CURL support,
@@ -29,7 +29,7 @@
   fi
 
   CURL_CONFIG="curl-config"
-  AC_MSG_CHECKING(for cURL 7.9.8 or greater)
+  AC_MSG_CHECKING(for cURL 7.10.2 or greater)
 
   if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
 CURL_CONFIG=${CURL_DIR}/bin/curl-config
@@ -41,11 +41,11 @@
 
   curl_version_full=`$CURL_CONFIG --version`
   curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = 
"."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-  if test "$curl_version" -ge 7009008; then
+  if test "$curl_version" -ge 7010002; then
 AC_MSG_RESULT($curl_version_full)
 CURL_LIBS=`$CURL_CONFIG --libs`
   else
-AC_MSG_ERROR(cURL version 7.9.8 or later is required to compile php with cURL 
support)
+AC_MSG_ERROR(cURL version 7.10.2 or later is required to compile php with cURL 
+support)
   fi
 
   PHP_ADD_INCLUDE($CURL_DIR/include)
@@ -72,6 +72,6 @@
 dnlAC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ])
 dnl  fi
 
-  PHP_NEW_EXTENSION(curl, curl.c curlstreams.c, $ext_shared)
+  PHP_NEW_EXTENSION(curl, interface.c multi.c streams.c, $ext_shared)
   PHP_SUBST(CURL_SHARED_LIBADD)
 fi
Index: php4/ext/curl/curl.dsp
diff -u php4/ext/curl/curl.dsp:1.4 php4/ext/curl/curl.dsp:1.5
--- php4/ext/curl/curl.dsp:1.4  Thu Oct 18 13:47:35 2001
+++ php4/ext/curl/curl.dsp  Wed Nov 13 17:25:33 2002
@@ -158,8 +158,17 @@
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 # Begin Source File
 
-SOURCE=.\curl.c
+SOURCE=.\interface.c
 # End Source File
+
+# Begin Source File
+SOURCE=.\multi.c
+# End Source File
+
+# Begin Source File
+SOURCE=.\streams.c
+# End Source File
+
 # End Group
 # Begin Group "Header Files"
 
Index: php4/ext/curl/php_curl.h
diff -u php4/ext/curl/php_curl.h:1.29 php4/ext/curl/php_curl.h:1.30
--- php4/ext/curl/php_curl.h:1.29   Fri Nov  8 12:58:43 2002
+++ php4/ext/curl/php_curl.hWed Nov 13 17:25:33 2002
@@ -13,11 +13,11 @@
| [EMAIL PROTECTED] so we can mail you a copy immediately.   |
+--+
| Author: Sterling Hughes <[EMAIL PROTECTED]>   |
-   | Wez Furlong <[EMAIL PROTECTED]>   |
+   | Wez Furlong <[EMAIL PROTECTED]>   |
+--+
 */
 
-/* $Id: php_curl.h,v 1.29 2002/11/08 17:58:43 sterling Exp $ */
+/* $Id: php_curl.h,v 1.30 2002/11/13 22:25:33 sterling Exp $ */
 
 #ifndef _PHP_CURL_H
 #define _PHP_CURL_H
@@ -32,14 +32,29 @@
 
 #if HAVE_CURL
 
-#include 
+#define PHP_CURL_DEBUG 0
 
+#include 
+#include 
 
 extern zend_module_entry curl_module_entry;
 #define curl_module_ptr &curl_module_entry
 
 #define CURLOPT_RETURNTRANSFER 19913
 #define CURLOPT_BINARYTRANSFER 19914
+#define PHP_CURL_STDOUT 0
+#define PHP_CURL_FILE   1
+#define PHP_CURL_USER   2
+#define PHP_CURL_DIRECT 3
+#define PHP_CURL_RETURN 4
+#define PHP_CURL_ASCII  5
+#define PHP_CURL_BINARY 6
+#define PHP_CURL_IGNORE 7
+
+int  le_curl;
+#define le_curl_name "cURL handle"
+int  le_curl_multi_handle;
+#define le_curl_multi_handle_name "cURL Multi Handle"
 
 PHP_MINIT_FUNCTION(curl);
 PHP_MSHUTDOWN_FUNCTION(curl);
@@ -52,6 +67,15 @@
 PHP_FUNCTION(curl_error);
 PHP_FUNCTION(curl_errno);
 PHP_FUNCTION(curl_close);
+PHP_FUNCTION(curl_multi_init);
+PHP_FUNCTION(curl_multi_add_handle);
+PHP_FUNCTION(curl_multi_remove_handle);
+PHP_FUNCTION(curl_multi_select);
+PHP_FUNCTION(curl_multi_exec);
+PHP_FUNCTION(curl_multi_getcontent);
+PHP_FUNCTION(curl_multi_info_read);
+PHP_FUNCTION(curl_multi_close);
+void _php_curl_multi_close(zend_rsrc_list_entry *);
 
 typedef struct {
zval *func;
@@ -87,13 +111,20 @@
 };
 
 typedef struct {
-   CURL*cp;
-   php_curl_handlers   *handlers;
struct _php_curl_error   err;
struct _php_curl_freeto_free;
+   CURL*cp;
+ 

[PHP-CVS] cvs: php4 / NEWS

2002-11-13 Thread Ilia Alshanetsky
iliaa   Wed Nov 13 17:35:17 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Moved news entry about imagefilter() to proper location.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1251 php4/NEWS:1.1252
--- php4/NEWS:1.1251Wed Nov 13 17:24:49 2002
+++ php4/NEWS   Wed Nov 13 17:35:16 2002
@@ -1,7 +1,8 @@
 PHP 4  NEWS
 |||
 ? ? ??? 200?, Version 4.4.0
-- dummy
+- Added imagefilter() function which allows application of various filters.
+  This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)
 
 ? ? ??? 2002, Version 4.3.0
 - ATTENTION! "make install" will *by default* install the CLI SAPI binary in 
@@ -16,8 +17,6 @@
 - To PECL moved extensions: (James, Derick)
   . ext/vpopmail
   . ext/cybermut
-- Added imagefilter() function which allows application of various filters.
-  This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 
 - Modified log() to accept multiple bases. (Jason)
 - Added gd_info() which returns an array of gd support information. (Marcus)



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




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

2002-11-13 Thread Sterling Hughes
sterlingWed Nov 13 17:43:31 2002 EDT

  Modified files:  
/php4/ext/curl  multi.c 
  Log:
  curl_multi_info_read is unimplemented...
  
  
Index: php4/ext/curl/multi.c
diff -u php4/ext/curl/multi.c:1.1 php4/ext/curl/multi.c:1.2
--- php4/ext/curl/multi.c:1.1   Wed Nov 13 17:25:33 2002
+++ php4/ext/curl/multi.c   Wed Nov 13 17:43:31 2002
@@ -195,6 +195,9 @@
CURLMsg   *tmp_msg;
intqueued_msgs;
 
+   // XXX: Not Implemented
+   return;
+   
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_mh) == FAILURE) {
return;
}



-- 
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/mbstring mbstring.c mbstring.dsp mbstring.h php_mbregex.c php_mbregex.h php_unicode.c php_unicode.h

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 18:01:18 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/mbstring  mbstring.c mbstring.dsp mbstring.h php_mbregex.c 
php_mbregex.h php_unicode.c php_unicode.h 
  Log:
  Made mbstring compile on windows again.
  
  
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.142 php4/ext/mbstring/mbstring.c:1.142.2.1
--- php4/ext/mbstring/mbstring.c:1.142  Wed Nov 13 03:26:04 2002
+++ php4/ext/mbstring/mbstring.cWed Nov 13 18:01:16 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.142 2002/11/13 08:26:04 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.142.2.1 2002/11/13 23:01:16 edink Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -415,8 +415,8 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI php_mb_check_encoding_list */
-PHPAPI int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) {
+/* {{{ MBSTRING_API php_mb_check_encoding_list */
+MBSTRING_API int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) {
return php_mb_parse_encoding_list(encoding_list, strlen(encoding_list), NULL, 
NULL, 0); 
 }
 /* }}} */
@@ -1525,9 +1525,9 @@
 #define IS_SJIS1(c) c)>=0x81 && (c)<=0x9f) || ((c)>=0xe0 && (c)<=0xf5)) ? 1 : 0)
 #define IS_SJIS2(c) c)>=0x40 && (c)<=0x7e) || ((c)>=0x80 && (c)<=0xfc)) ? 1 : 0)
 
-/* {{{ SAPI_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
+/* {{{ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
  * http input processing */
-SAPI_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
+MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
 {
char *res = NULL, *separator=NULL;
const char *c_var;
@@ -2458,8 +2458,8 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_convert_encoding() */
-PHPAPI char * php_mb_convert_encoding(char *input, size_t length, char *_to_encoding, 
char *_from_encodings, size_t *output_len TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_convert_encoding() */
+MBSTRING_API char * php_mb_convert_encoding(char *input, size_t length, char 
+*_to_encoding, char *_from_encodings, size_t *output_len TSRMLS_DC)
 {
mbfl_string string, result, *ret;
enum mbfl_no_encoding from_encoding, to_encoding;
@@ -3495,15 +3495,15 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI int php_mb_encoding_translation() */
-PHPAPI int php_mb_encoding_translation(TSRMLS_D) 
+/* {{{ MBSTRING_API int php_mb_encoding_translation() */
+MBSTRING_API int php_mb_encoding_translation(TSRMLS_D) 
 {
return MBSTRG(encoding_translation);
 }
 /* }}} */
 
-/* {{{ PHPAPI size_t php_mb_mbchar_bytes_ex() */
-PHPAPI size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc)
+/* {{{ MBSTRING_API size_t php_mb_mbchar_bytes_ex() */
+MBSTRING_API size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc)
 {
if (enc != NULL) {
if (enc->flag & MBFL_ENCTYPE_MBCS) {
@@ -3520,16 +3520,16 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI size_t php_mb_mbchar_bytes() */
-PHPAPI size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC)
+/* {{{ MBSTRING_API size_t php_mb_mbchar_bytes() */
+MBSTRING_API size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC)
 {
return php_mb_mbchar_bytes_ex(s,
mbfl_no2encoding(MBSTRG(internal_encoding)));
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_safe_strrchr_ex() */
-PHPAPI char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, 
const mbfl_encoding *enc)
+/* {{{ MBSTRING_API char *php_mb_safe_strrchr_ex() */
+MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t 
+nbytes, const mbfl_encoding *enc)
 {
register const char *p = s;
char *last=NULL;
@@ -3560,24 +3560,24 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_safe_strrchr() */
-PHPAPI char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes 
TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_safe_strrchr() */
+MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes 
+TSRMLS_DC)
 {
return php_mb_safe_strrchr_ex(s, c, nbytes,
mbfl_no2encoding(MBSTRG(internal_encoding)));
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_strrchr() */
-PHPAPI char *php_mb_strrchr(const char *s, char c TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_strrchr() */
+MBSTRING_API char *php_mb_strrchr(const char *s, char c TSRMLS_DC)
 {
return php_mb_safe_strrchr(s, c, -1 TSRMLS_CC);
 }
 /* }}} */
 
 #ifdef ZEND_MULTIBYTE
-/* {{{ PHPAPI int php_mb_set_zend_encoding() */
-PHPAPI int php_mb_set_zend_encoding(TSRMLS_D)
+/* {{{ MBSTRING_API int php_mb_set_zend_encoding() */
+MBSTRING_API int php_mb_set_zend_encoding(TSRMLS_D)
 {
/* 'd better use mbfl_memory_device? */
char *name, *list = NULL;
Index: php4/ext/mbstring/mbstring.dsp
diff -u php4/ext/mbstring/mbstring.dsp:1.12 php4/ext/mbstring/mbstring.dsp:1.12.2.1
--- php4/ext/mbstring/mbstring.dsp:1.12 T

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

2002-11-13 Thread Sascha Schumann
sas Wed Nov 13 18:01:42 2002 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  always use the mass_join formats, when the server is sending a namelist
  
  always use the single join format, when the server is sending a JOIN
  
  combining both was originally seen as more convenient, but proved
  to be difficult when developing frontends.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.137 php4/ext/ircg/ircg.c:1.138
--- php4/ext/ircg/ircg.c:1.137  Thu Oct 17 06:40:17 2002
+++ php4/ext/ircg/ircg.cWed Nov 13 18:01:42 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.137 2002/10/17 10:40:17 sas Exp $ */
+/* $Id: ircg.c,v 1.138 2002/11/13 23:01:42 sas Exp $ */
 
 /* {{{ includes */
 
@@ -1128,32 +1128,61 @@
msg_send(conn, &m);
 }
 
-static void user_add(irconn_t *ircc, smart_str *channel, smart_str *users,
-   int nr, void *dummy)
+static void user_add_single(php_irconn_t *conn, smart_str *channel, smart_str *users)
+{
+   smart_str m = {0};
+   FORMAT_MSG(conn, FMT_MSG_JOIN, channel, NULL, &users[0],
+   NULL, &m, conn->conn.username, conn->conn.username_len);
+   FORMAT_MSG(conn, FMT_MSG_JOIN_LIST_END, channel, NULL, NULL,
+   NULL, &m, conn->conn.username, conn->conn.username_len);
+   msg_send(conn, &m);
+}
+
+static void user_add_multiple(php_irconn_t *conn, smart_str *channel, smart_str 
+*users, int nr)
 {
-   php_irconn_t *conn = dummy;
int i;
smart_str m = {0};
 
-   if (nr > 1) {
-   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_BEGIN, channel, NULL, NULL,
-   NULL, &m, conn->conn.username, 
conn->conn.username_len);
-   for (i = 0; i < nr; i++) {
-   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_ELEMENT, channel, NULL,
-   &users[i], NULL, &m, conn->conn.username, 
conn->conn.username_len);
-   }
-   
-   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_END, channel, NULL, NULL,
-   NULL, &m, conn->conn.username, 
conn->conn.username_len);
-   } else {
-   FORMAT_MSG(conn, FMT_MSG_JOIN, channel, NULL, &users[0],
-   NULL, &m, conn->conn.username, 
conn->conn.username_len);
-   FORMAT_MSG(conn, FMT_MSG_JOIN_LIST_END, channel, NULL, NULL,
+   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_BEGIN, channel, NULL, NULL,
NULL, &m, conn->conn.username, conn->conn.username_len);
+   for (i = 0; i < nr; i++) {
+   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_ELEMENT, channel, NULL,
+   &users[i], NULL, &m, conn->conn.username, 
+conn->conn.username_len);
}
+
+   FORMAT_MSG(conn, FMT_MSG_MASS_JOIN_END, channel, NULL, NULL,
+   NULL, &m, conn->conn.username, conn->conn.username_len);
+
+
msg_send(conn, &m);
 }
 
+#if IRCG_API_VERSION >= 20021109
+
+static void user_add_ex(irconn_t *ircc, smart_str *channel, smart_str *users,
+   int nr, int namelist, void *dummy)
+{
+   if (namelist) {
+   user_add_multiple(dummy, channel, users, nr);
+   } else {
+   user_add_single(dummy, channel, users);
+   }
+}
+
+#else
+
+static void user_add(irconn_t *ircc, smart_str *channel, smart_str *users,
+   int nr, void *dummy)
+{
+   if (nr > 1) {
+   user_add_multiple(dummy, channel, users, nr);
+   } else {
+   user_add_single(dummy, channel, users);
+   }
+}
+
+#endif
+
 static void new_topic(irconn_t *ircc, smart_str *channel, smart_str *who, smart_str 
*topic, void *dummy)
 {
php_irconn_t *conn = dummy;
@@ -1386,10 +1415,14 @@
thttpd_register_on_close(http_closed_connection);
thttpd_set_dont_close();
conn->fd = thttpd_get_fd();
+   printf("conn->fd is %d\n", conn->fd);
+   fflush(stdout);
if (fcntl(conn->fd, F_GETFL) == -1) {
zend_hash_index_del(&h_irconn, Z_LVAL_PP(p1));
+   php_error(E_WARNING, "current fd is not valid");
RETURN_FALSE;
}
+   ADD_HEADER("Connection: close");
zend_hash_index_update(&h_fd2irconn, conn->fd, &Z_LVAL_PP(p1), sizeof(int), 
NULL);
if (conn->file_fd == -1) {
flush_data = conn;
@@ -1818,7 +1851,6 @@
IFMSG(FMT_MSG_NICK, IRCG_NICK, nick_handler);
 
IFMSG(FMT_MSG_SELF_PART, IRCG_PART, part_handler);
-   IFMSG(FMT_MSG_MASS_JOIN_ELEMENT, IRCG_USER_ADD, user_add);
IFMSG(FMT_MSG_LEAVE, IRCG_USER_LEAVE, user_leave);
IFMSG(FMT_MSG_KICK, IRCG_USER_KICK, user_kick);
IFMSG(FMT_MSG_QUIT, IRCG_USER_QUIT, user_quit);
@@ -1849,6 +1881,12 @@
/* RPL_LIST/RPL_LISTEND */
irc_register_hook(conn, IRCG_LIST, list_handler);
irc_r

[PHP-CVS] cvs: php4 /ext/mbstring mbstring.c mbstring.dsp mbstring.h php_mbregex.c php_mbregex.h php_unicode.c php_unicode.h

2002-11-13 Thread Edin Kadribasic
edink   Wed Nov 13 18:11:14 2002 EDT

  Modified files:  
/php4/ext/mbstring  mbstring.c mbstring.dsp mbstring.h php_mbregex.c 
php_mbregex.h php_unicode.c php_unicode.h 
  Log:
  MFB (made mbstring compile on windows again).
  
  
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.142 php4/ext/mbstring/mbstring.c:1.143
--- php4/ext/mbstring/mbstring.c:1.142  Wed Nov 13 03:26:04 2002
+++ php4/ext/mbstring/mbstring.cWed Nov 13 18:11:14 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.142 2002/11/13 08:26:04 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.143 2002/11/13 23:11:14 edink Exp $ */
 
 /*
  * PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -415,8 +415,8 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI php_mb_check_encoding_list */
-PHPAPI int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) {
+/* {{{ MBSTRING_API php_mb_check_encoding_list */
+MBSTRING_API int php_mb_check_encoding_list(const char *encoding_list TSRMLS_DC) {
return php_mb_parse_encoding_list(encoding_list, strlen(encoding_list), NULL, 
NULL, 0); 
 }
 /* }}} */
@@ -1525,9 +1525,9 @@
 #define IS_SJIS1(c) c)>=0x81 && (c)<=0x9f) || ((c)>=0xe0 && (c)<=0xf5)) ? 1 : 0)
 #define IS_SJIS2(c) c)>=0x40 && (c)<=0x7e) || ((c)>=0x80 && (c)<=0xfc)) ? 1 : 0)
 
-/* {{{ SAPI_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
+/* {{{ MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
  * http input processing */
-SAPI_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
+MBSTRING_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
 {
char *res = NULL, *separator=NULL;
const char *c_var;
@@ -2458,8 +2458,8 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_convert_encoding() */
-PHPAPI char * php_mb_convert_encoding(char *input, size_t length, char *_to_encoding, 
char *_from_encodings, size_t *output_len TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_convert_encoding() */
+MBSTRING_API char * php_mb_convert_encoding(char *input, size_t length, char 
+*_to_encoding, char *_from_encodings, size_t *output_len TSRMLS_DC)
 {
mbfl_string string, result, *ret;
enum mbfl_no_encoding from_encoding, to_encoding;
@@ -3495,15 +3495,15 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI int php_mb_encoding_translation() */
-PHPAPI int php_mb_encoding_translation(TSRMLS_D) 
+/* {{{ MBSTRING_API int php_mb_encoding_translation() */
+MBSTRING_API int php_mb_encoding_translation(TSRMLS_D) 
 {
return MBSTRG(encoding_translation);
 }
 /* }}} */
 
-/* {{{ PHPAPI size_t php_mb_mbchar_bytes_ex() */
-PHPAPI size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc)
+/* {{{ MBSTRING_API size_t php_mb_mbchar_bytes_ex() */
+MBSTRING_API size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc)
 {
if (enc != NULL) {
if (enc->flag & MBFL_ENCTYPE_MBCS) {
@@ -3520,16 +3520,16 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI size_t php_mb_mbchar_bytes() */
-PHPAPI size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC)
+/* {{{ MBSTRING_API size_t php_mb_mbchar_bytes() */
+MBSTRING_API size_t php_mb_mbchar_bytes(const char *s TSRMLS_DC)
 {
return php_mb_mbchar_bytes_ex(s,
mbfl_no2encoding(MBSTRG(internal_encoding)));
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_safe_strrchr_ex() */
-PHPAPI char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t nbytes, 
const mbfl_encoding *enc)
+/* {{{ MBSTRING_API char *php_mb_safe_strrchr_ex() */
+MBSTRING_API char *php_mb_safe_strrchr_ex(const char *s, unsigned int c, size_t 
+nbytes, const mbfl_encoding *enc)
 {
register const char *p = s;
char *last=NULL;
@@ -3560,24 +3560,24 @@
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_safe_strrchr() */
-PHPAPI char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes 
TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_safe_strrchr() */
+MBSTRING_API char *php_mb_safe_strrchr(const char *s, unsigned int c, size_t nbytes 
+TSRMLS_DC)
 {
return php_mb_safe_strrchr_ex(s, c, nbytes,
mbfl_no2encoding(MBSTRG(internal_encoding)));
 }
 /* }}} */
 
-/* {{{ PHPAPI char *php_mb_strrchr() */
-PHPAPI char *php_mb_strrchr(const char *s, char c TSRMLS_DC)
+/* {{{ MBSTRING_API char *php_mb_strrchr() */
+MBSTRING_API char *php_mb_strrchr(const char *s, char c TSRMLS_DC)
 {
return php_mb_safe_strrchr(s, c, -1 TSRMLS_CC);
 }
 /* }}} */
 
 #ifdef ZEND_MULTIBYTE
-/* {{{ PHPAPI int php_mb_set_zend_encoding() */
-PHPAPI int php_mb_set_zend_encoding(TSRMLS_D)
+/* {{{ MBSTRING_API int php_mb_set_zend_encoding() */
+MBSTRING_API int php_mb_set_zend_encoding(TSRMLS_D)
 {
/* 'd better use mbfl_memory_device? */
char *name, *list = NULL;
Index: php4/ext/mbstring/mbstring.dsp
diff -u php4/ext/mbstring/mbstring.dsp:1.12 php4/ext/mbstring/mbstring.dsp:1.13
--- php4/ext/mbstring/mbstring.dsp:1.12 Thu Sep 26 02:10:22 2002

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

2002-11-13 Thread Sascha Schumann
sas Wed Nov 13 18:19:12 2002 EDT

  Modified files:  
/php4/ext/ircg  ircg.c 
  Log:
  Remove debugging stuff
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.138 php4/ext/ircg/ircg.c:1.139
--- php4/ext/ircg/ircg.c:1.138  Wed Nov 13 18:01:42 2002
+++ php4/ext/ircg/ircg.cWed Nov 13 18:19:12 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.138 2002/11/13 23:01:42 sas Exp $ */
+/* $Id: ircg.c,v 1.139 2002/11/13 23:19:12 sas Exp $ */
 
 /* {{{ includes */
 
@@ -1415,14 +1415,11 @@
thttpd_register_on_close(http_closed_connection);
thttpd_set_dont_close();
conn->fd = thttpd_get_fd();
-   printf("conn->fd is %d\n", conn->fd);
-   fflush(stdout);
if (fcntl(conn->fd, F_GETFL) == -1) {
zend_hash_index_del(&h_irconn, Z_LVAL_PP(p1));
php_error(E_WARNING, "current fd is not valid");
RETURN_FALSE;
}
-   ADD_HEADER("Connection: close");
zend_hash_index_update(&h_fd2irconn, conn->fd, &Z_LVAL_PP(p1), sizeof(int), 
NULL);
if (conn->file_fd == -1) {
flush_data = conn;



-- 
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/pdf config.m4

2002-11-13 Thread Jani Taskinen
sniper  Wed Nov 13 19:20:21 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/pdf   config.m4 
  Log:
  Fixed bug: #20414, shared build did not work
  
  
Index: php4/ext/pdf/config.m4
diff -u php4/ext/pdf/config.m4:1.35 php4/ext/pdf/config.m4:1.35.2.1
--- php4/ext/pdf/config.m4:1.35 Sun Oct 20 22:46:13 2002
+++ php4/ext/pdf/config.m4  Wed Nov 13 19:20:21 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.35 2002/10/21 02:46:13 sniper Exp $
+dnl $Id: config.m4,v 1.35.2.1 2002/11/14 00:20:21 sniper Exp $
 dnl
 
 PHP_ARG_WITH(pdflib,for PDFlib support,
@@ -30,7 +30,7 @@
 if test "$PHP_PDFLIB" != "no"; then
 
   PHP_NEW_EXTENSION(pdf, pdf.c, $ext_shared)
-  PHP_SUBST(PDFLIB_SHARED_LIBADD)
+  PHP_SUBST(PDF_SHARED_LIBADD)
 
   dnl #
   dnl # Optional libraries for PDFlib 
@@ -40,7 +40,7 @@
   if test "$PHP_JPEG_DIR" != "no"; then
 PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libjpeg not found!])
 ],[
@@ -54,7 +54,7 @@
   if test "$PHP_PNG_DIR" != "no"; then
 PHP_CHECK_LIBRARY(png,png_create_info_struct, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libpng not found!])
 ],[
@@ -68,7 +68,7 @@
   if test "$PHP_TIFF_DIR" != "no"; then
 PHP_CHECK_LIBRARY(tiff,TIFFOpen, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libtiff not found!])
 ],[
@@ -84,7 +84,7 @@
 AC_MSG_RESULT([no. If configure fails, try --with-zlib-dir=])
   else   
 AC_MSG_RESULT([$PHP_ZLIB_DIR])
-PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, PDFLIB_SHARED_LIBADD)
+PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, PDF_SHARED_LIBADD)
   fi
 
   dnl #
@@ -95,7 +95,7 @@
 yes)
   AC_CHECK_LIB(pdf, PDF_show_boxed, [
 AC_DEFINE(HAVE_PDFLIB,1,[ ])
-PHP_ADD_LIBRARY(pdf,, PDFLIB_SHARED_LIBADD)
+PHP_ADD_LIBRARY(pdf,, PDF_SHARED_LIBADD)
   ],[
 AC_MSG_ERROR([
 PDFlib extension requires at least pdflib 3.x. You may also need libtiff, libjpeg, 
libpng and libz.
@@ -110,7 +110,7 @@
 PHP_CHECK_LIBRARY(pdf, PDF_show_boxed, 
 [
   AC_DEFINE(HAVE_PDFLIB,1,[ ]) 
-  PHP_ADD_LIBRARY_WITH_PATH(pdf, $PHP_PDFLIB/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(pdf, $PHP_PDFLIB/lib, PDF_SHARED_LIBADD)
   PHP_ADD_INCLUDE($PHP_PDFLIB/include)
 ],[
   AC_MSG_ERROR([
@@ -119,7 +119,7 @@
 See config.log for more information.
 ])
 ],[
-  -L$PHP_PDFLIB/lib $PDFLIB_SHARED_LIBADD
+  -L$PHP_PDFLIB/lib $PDF_SHARED_LIBADD
 ])
   else
 AC_MSG_ERROR([pdflib.h not found! Check the path passed to 
--with-pdflib=. PATH should be the install prefix directory.])



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




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

2002-11-13 Thread Jani Taskinen
sniper  Wed Nov 13 19:21:13 2002 EDT

  Modified files:  
/php4/ext/pdf   config.m4 
  Log:
  MFB: Fix for bug: #20412
  
  
Index: php4/ext/pdf/config.m4
diff -u php4/ext/pdf/config.m4:1.35 php4/ext/pdf/config.m4:1.36
--- php4/ext/pdf/config.m4:1.35 Sun Oct 20 22:46:13 2002
+++ php4/ext/pdf/config.m4  Wed Nov 13 19:21:13 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.35 2002/10/21 02:46:13 sniper Exp $
+dnl $Id: config.m4,v 1.36 2002/11/14 00:21:13 sniper Exp $
 dnl
 
 PHP_ARG_WITH(pdflib,for PDFlib support,
@@ -30,7 +30,7 @@
 if test "$PHP_PDFLIB" != "no"; then
 
   PHP_NEW_EXTENSION(pdf, pdf.c, $ext_shared)
-  PHP_SUBST(PDFLIB_SHARED_LIBADD)
+  PHP_SUBST(PDF_SHARED_LIBADD)
 
   dnl #
   dnl # Optional libraries for PDFlib 
@@ -40,7 +40,7 @@
   if test "$PHP_JPEG_DIR" != "no"; then
 PHP_CHECK_LIBRARY(jpeg,jpeg_read_header, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(jpeg, $PHP_JPEG_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libjpeg not found!])
 ],[
@@ -54,7 +54,7 @@
   if test "$PHP_PNG_DIR" != "no"; then
 PHP_CHECK_LIBRARY(png,png_create_info_struct, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(png, $PHP_PNG_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libpng not found!])
 ],[
@@ -68,7 +68,7 @@
   if test "$PHP_TIFF_DIR" != "no"; then
 PHP_CHECK_LIBRARY(tiff,TIFFOpen, 
 [
-  PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(tiff, $PHP_TIFF_DIR/lib, PDF_SHARED_LIBADD)
 ],[
   AC_MSG_ERROR([libtiff not found!])
 ],[
@@ -84,7 +84,7 @@
 AC_MSG_RESULT([no. If configure fails, try --with-zlib-dir=])
   else   
 AC_MSG_RESULT([$PHP_ZLIB_DIR])
-PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, PDFLIB_SHARED_LIBADD)
+PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, PDF_SHARED_LIBADD)
   fi
 
   dnl #
@@ -95,7 +95,7 @@
 yes)
   AC_CHECK_LIB(pdf, PDF_show_boxed, [
 AC_DEFINE(HAVE_PDFLIB,1,[ ])
-PHP_ADD_LIBRARY(pdf,, PDFLIB_SHARED_LIBADD)
+PHP_ADD_LIBRARY(pdf,, PDF_SHARED_LIBADD)
   ],[
 AC_MSG_ERROR([
 PDFlib extension requires at least pdflib 3.x. You may also need libtiff, libjpeg, 
libpng and libz.
@@ -110,7 +110,7 @@
 PHP_CHECK_LIBRARY(pdf, PDF_show_boxed, 
 [
   AC_DEFINE(HAVE_PDFLIB,1,[ ]) 
-  PHP_ADD_LIBRARY_WITH_PATH(pdf, $PHP_PDFLIB/lib, PDFLIB_SHARED_LIBADD)
+  PHP_ADD_LIBRARY_WITH_PATH(pdf, $PHP_PDFLIB/lib, PDF_SHARED_LIBADD)
   PHP_ADD_INCLUDE($PHP_PDFLIB/include)
 ],[
   AC_MSG_ERROR([
@@ -119,7 +119,7 @@
 See config.log for more information.
 ])
 ],[
-  -L$PHP_PDFLIB/lib $PDFLIB_SHARED_LIBADD
+  -L$PHP_PDFLIB/lib $PDF_SHARED_LIBADD
 ])
   else
 AC_MSG_ERROR([pdflib.h not found! Check the path passed to 
--with-pdflib=. PATH should be the install prefix directory.])



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




[PHP-CVS] cvs: php4 / config.guess config.sub

2002-11-13 Thread Sascha Schumann
sas Wed Nov 13 19:41:53 2002 EDT

  Modified files:  
/php4   config.guess config.sub 
  Log:
  upgrade files to libtool 1.4.3 shipped ones
  # should be safe to upgrade these to the 1.5.x ones
  
  
Index: php4/config.guess
diff -u php4/config.guess:1.16 php4/config.guess:1.17
--- php4/config.guess:1.16  Thu Jul  4 04:21:31 2002
+++ php4/config.guess   Wed Nov 13 19:41:53 2002
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002 Free Software Foundation, Inc.
 
-timestamp='2002-05-29'
+timestamp='2002-10-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -88,30 +88,40 @@
   exit 1
 fi
 
+trap 'exit 1' 1 2 15
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
 
-# CC_FOR_BUILD -- compiler used by this script.
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)echo "int dummy(){}" > $dummy.c ;
+# This shell variable is my proudest work .. or something. --bje
+
+set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
+(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
+   || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
+dummy=$tmpdir/dummy ;
+files="$dummy.c $dummy.o $dummy.rel $dummy" ;
+trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
- if test $? = 0 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
 CC_FOR_BUILD="$c"; break ;
  fi ;
done ;
-   rm -f $dummy.c $dummy.o $dummy.rel ;
+   rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
  CC_FOR_BUILD=no_compiler_found ;
fi
;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac'
+esac ;
+unset files'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # ([EMAIL PROTECTED] 1994-08-24)
@@ -221,6 +231,7 @@
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
+   eval $set_cc_for_build
cat <$dummy.s
.data
 \$Lformat:
@@ -246,10 +257,9 @@
jsr \$26,exit
.end main
 EOF
-   eval $set_cc_for_build
-   $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+   $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
if test "$?" = 0 ; then
-   case `./$dummy` in
+   case `$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
@@ -271,9 +281,12 @@
2-1307)
UNAME_MACHINE="alphaev68"
;;
+   3-1307)
+   UNAME_MACHINE="alphaev7"
+   ;;
esac
fi
-   rm -f $dummy.s $dummy
+   rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
 Alpha\ *:Windows_NT*:*)
@@ -314,6 +327,10 @@
 NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+DRS?6000:UNIX_SV:4.2*:7*)
+   case `/usr/bin/uname -p` in
+   sparc) echo sparc-icl-nx7 && exit 0 ;;
+   esac ;;
 sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
@@ -420,15 +437,18 @@
  exit (-1);
}
 EOF
-   $CC_FOR_BUILD $dummy.c -o $dummy \
- && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && exit 0
-   rm -f $dummy.c $dummy
+   $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
+   rm -f $dummy.c $dummy && rmdir $tmpdir
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
 Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
+Motorola:*:4.3:PL8-*)
+   echo powerpc-harris-powermax
+   exit 0 ;;
 Night_Hawk:*:*:PowerMAX_OS)
echo powerpc-harris-powermax
exit 0 ;;
@@ -504,8 +524,8 @@
exit(0);
  

[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/ircg config.m4 ircg.c ircg_dummy.c ircg_thttpd.c /sapi/cli config.m4

2002-11-13 Thread Sascha Schumann
sas Wed Nov 13 20:09:46 2002 EDT

  Added files: 
/php4/ext/ircg  ircg_dummy.c ircg_thttpd.c 

  Modified files:  
/php4   acinclude.m4 configure.in 
/php4/ext/ircg  config.m4 ircg.c 
/php4/sapi/cli  config.m4 
  Log:
  - Remove PHP_DISABLE_CLI
  - Streamline ircg build: thttpd-dependent part moved into separate source 
file, so that it can be added to the SAPI-only object list.
  
  
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.218 php4/acinclude.m4:1.219
--- php4/acinclude.m4:1.218 Tue Oct 29 06:24:26 2002
+++ php4/acinclude.m4   Wed Nov 13 20:09:45 2002
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.218 2002/10/29 11:24:26 sniper Exp $
+dnl $Id: acinclude.m4,v 1.219 2002/11/14 01:09:45 sas Exp $
 dnl
 dnl This file contains local autoconf functions.
 
@@ -137,13 +137,6 @@
   done
 ])
 
-dnl
-dnl Disable building CLI
-dnl
-AC_DEFUN([PHP_DISABLE_CLI],[
-  disable_cli=1
-])
-   
 dnl
 dnl Separator into the configure --help display.
 dnl 
Index: php4/configure.in
diff -u php4/configure.in:1.397 php4/configure.in:1.398
--- php4/configure.in:1.397 Wed Nov 13 14:19:04 2002
+++ php4/configure.in   Wed Nov 13 20:09:45 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.397 2002/11/13 19:19:04 andrei Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.398 2002/11/14 01:09:45 sas Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -607,7 +607,7 @@
 [  --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
   --without-pear  Do not install PEAR], DEFAULT, no)
 
-if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
+if test "$PHP_PEAR" != "no" && test "$PHP_SAPI_CLI" != "no"; then
   install_pear="install-pear install-build install-headers install-programs"
   PEAR_INSTALLDIR=$PHP_PEAR
 fi
@@ -957,7 +957,7 @@
 PHP_OS=`uname | xargs`
 AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
 
-if test "$disable_cli" != "1"; then
+if test "$PHP_SAPI_CLI" != "no"; then
   PHP_CLI_TARGET=sapi/cli/php
   PHP_INSTALL_CLI_TARGET="install-cli"
   PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli)
Index: php4/ext/ircg/config.m4
diff -u php4/ext/ircg/config.m4:1.14 php4/ext/ircg/config.m4:1.15
--- php4/ext/ircg/config.m4:1.14Mon Mar 18 10:00:57 2002
+++ php4/ext/ircg/config.m4 Wed Nov 13 20:09:45 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.14 2002/03/18 15:00:57 sas Exp $
+dnl $Id: config.m4,v 1.15 2002/11/14 01:09:45 sas Exp $
 dnl
 
 PHP_ARG_WITH(ircg, for IRCG support,
@@ -26,11 +26,13 @@
   PHP_EVAL_INCLINE(`$IRCG_CONFIG --cppflags`)
   PHP_ADD_LIBRARY_WITH_PATH(ircg, $PHP_IRCG/lib)
   PHP_ADD_INCLUDE($PHP_IRCG/include)
+  PHP_NEW_EXTENSION(ircg, ircg.c ircg_scanner.c, $ext_shared)
   if test "$PHP_SAPI" = "thttpd"; then
-AC_DEFINE(IRCG_WITH_THTTPD, 1, [Whether thttpd is available])
-PHP_DISABLE_CLI
+PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_thttpd.c,[],sapi)
+PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_dummy.c,[],cli)
+  else
+PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_dummy.c)
   fi
   AC_DEFINE(HAVE_IRCG, 1, [Whether you want IRCG support])
-  PHP_NEW_EXTENSION(ircg, ircg.c ircg_scanner.c, $ext_shared)
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.139 php4/ext/ircg/ircg.c:1.140
--- php4/ext/ircg/ircg.c:1.139  Wed Nov 13 18:19:12 2002
+++ php4/ext/ircg/ircg.cWed Nov 13 20:09:45 2002
@@ -14,9 +14,9 @@
+--+
| Author: Sascha Schumann <[EMAIL PROTECTED]> |
+--+
- */
+*/
 
-/* $Id: ircg.c,v 1.139 2002/11/13 23:19:12 sas Exp $ */
+/* $Id: ircg.c,v 1.140 2002/11/14 01:09:45 sas Exp $ */
 
 /* {{{ includes */
 
@@ -1379,7 +1379,6 @@
Sets current connection for output */
 PHP_FUNCTION(ircg_set_current)
 {
-#ifdef IRCG_WITH_THTTPD
zval **p1;
php_irconn_t *conn;
 #if 0
@@ -1412,10 +1411,9 @@
 #endif
 
irc_set_currents++;
-   thttpd_register_on_close(http_closed_connection);
-   thttpd_set_dont_close();
-   conn->fd = thttpd_get_fd();
-   if (fcntl(conn->fd, F_GETFL) == -1) {
+
+   if (php_ircg_register_with_sapi(&conn->fd, http_closed_connection) 
+   || fcntl(conn->fd, F_GETFL) == -1) {
zend_hash_index_del(&h_irconn, Z_LVAL_PP(p1));
php_error(E_WARNING, "current fd is not valid");
RETURN_FALSE;
@@ -1427,7 +1425,6 @@
}
 
RETURN_TRUE;
-#endif
 }
 /* }}} */
 
Index: php4/sapi/cli/config.m4
diff -u php4/sapi/cli/config.m4:1.11 php4/sapi/cli/config.m4:1.12
--- php4/sapi/cli/config.m4:1.11Sun Sep 29 12:22:48 2002
+++ php4/sapi/cli/config.m4 Wed Nov 13 20:09:46 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.11 2002/09/29 16:22:48 sas Exp $
+dnl $Id: config.m4,v 1.12 2002/11/14 01:

[PHP-CVS] cvs: php4 / NEWS

2002-11-13 Thread James Cox
imajes  Wed Nov 13 20:54:38 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  englishify
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1252 php4/NEWS:1.1253
--- php4/NEWS:1.1252Wed Nov 13 17:35:16 2002
+++ php4/NEWS   Wed Nov 13 20:54:38 2002
@@ -14,7 +14,7 @@
   . ext/cybercash
   . ext/icap
   . sapi/fhttpd
-- To PECL moved extensions: (James, Derick)
+- Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 



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

2002-11-13 Thread James Cox
imajes  Wed Nov 13 20:57:20 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4   NEWS 
  Log:
  MFH
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1247.2.1 php4/NEWS:1.1247.2.2
--- php4/NEWS:1.1247.2.1Wed Nov 13 14:41:54 2002
+++ php4/NEWS   Wed Nov 13 20:57:20 2002
@@ -10,7 +10,7 @@
   . ext/cybercash
   . ext/icap
   . sapi/fhttpd
-- To PECL moved extensions: (James, Derick)
+- Moved extensions to PECL (http://pear.php.net/): (James, Derick)
   . ext/vpopmail
   . ext/cybermut
 - Added "neutral" language entry to mbstring spec. (Moriyoshi) 



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




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

2002-11-13 Thread James Cox
imajes  Wed Nov 13 21:05:54 2002 EDT

  Modified files:  
/php4/ext/standard  credits.c 
  Log:
  changing..
  
  #also, i think the qa and web team needs updating -- i'd like to see web change to a 
more general infrastructure category... anyone care to volunteer? :)
  
  
Index: php4/ext/standard/credits.c
diff -u php4/ext/standard/credits.c:1.21 php4/ext/standard/credits.c:1.22
--- php4/ext/standard/credits.c:1.21Sun Nov 10 18:49:04 2002
+++ php4/ext/standard/credits.c Wed Nov 13 21:05:53 2002
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: credits.c,v 1.21 2002/11/10 23:49:04 imajes Exp $ */
+/* $Id: credits.c,v 1.22 2002/11/14 02:05:53 imajes Exp $ */
 
 #include "php.h"
 #include "info.h"
@@ -61,7 +61,7 @@
CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken, Sascha 
Schumann");
CREDIT_LINE("Win32 Port", "Shane Caraveo, Zeev Suraski");
CREDIT_LINE("Server API (SAPI) Abstraction Layer", "Andi Gutmans, 
Shane Caraveo, Zeev Suraski");
-   CREDIT_LINE("Streams Support and Development", "Wez Furlong");
+   CREDIT_LINE("Streams Abstraction Layer", "Wez Furlong");
php_info_print_table_end();
}
 



-- 
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/standard credits.c

2002-11-13 Thread James Cox
imajes  Wed Nov 13 21:07:37 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  credits.c 
  Log:
  MFH..
  
  
Index: php4/ext/standard/credits.c
diff -u php4/ext/standard/credits.c:1.21 php4/ext/standard/credits.c:1.21.2.1
--- php4/ext/standard/credits.c:1.21Sun Nov 10 18:49:04 2002
+++ php4/ext/standard/credits.c Wed Nov 13 21:07:37 2002
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: credits.c,v 1.21 2002/11/10 23:49:04 imajes Exp $ */
+/* $Id: credits.c,v 1.21.2.1 2002/11/14 02:07:37 imajes Exp $ */
 
 #include "php.h"
 #include "info.h"
@@ -61,7 +61,7 @@
CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken, Sascha 
Schumann");
CREDIT_LINE("Win32 Port", "Shane Caraveo, Zeev Suraski");
CREDIT_LINE("Server API (SAPI) Abstraction Layer", "Andi Gutmans, 
Shane Caraveo, Zeev Suraski");
-   CREDIT_LINE("Streams Support and Development", "Wez Furlong");
+   CREDIT_LINE("Streams Abstraction Layer", "Wez Furlong");
php_info_print_table_end();
}
 



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




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

2002-11-13 Thread Sterling Hughes
sterlingWed Nov 13 23:07:51 2002 EDT

  Modified files:  
/php4/ext/curl  multi.c 
  Log:
  remove C++ comments
  
  
Index: php4/ext/curl/multi.c
diff -u php4/ext/curl/multi.c:1.2 php4/ext/curl/multi.c:1.3
--- php4/ext/curl/multi.c:1.2   Wed Nov 13 17:43:31 2002
+++ php4/ext/curl/multi.c   Wed Nov 13 23:07:51 2002
@@ -195,7 +195,7 @@
CURLMsg   *tmp_msg;
intqueued_msgs;
 
-   // XXX: Not Implemented
+   /* XXX: Not Implemented */
return;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_mh) == FAILURE) {
@@ -212,7 +212,7 @@
array_init(return_value);
add_assoc_long(return_value, "msg", tmp_msg->msg);
add_assoc_long(return_value, "result", tmp_msg->data.result);
-// add_assoc_resource(return_value, "handle", _find_handle(tmp_msg->easy_handle));
+/* add_assoc_resource(return_value, "handle", 
+_find_handle(tmp_msg->easy_handle)); */
add_assoc_string(return_value, "whatever", (char *) tmp_msg->data.whatever, 1);
 }
 /* }}} */
@@ -235,7 +235,7 @@
 {
php_curlm *mh = (php_curlm *) rsrc->ptr;
curl_multi_cleanup(mh->multi);
-   // XXX: keep track of all curl handles and zval_ptr_dtor them here
+   /* XXX: keep track of all curl handles and zval_ptr_dtor them here */
 }
 
 #endif



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




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

2002-11-13 Thread Jon Parise
jon Thu Nov 14 00:46:10 2002 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  @- Added an optional "step" parameter to range(). (Jon)
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.199 php4/ext/standard/array.c:1.200
--- php4/ext/standard/array.c:1.199 Wed Nov 13 08:31:32 2002
+++ php4/ext/standard/array.c   Thu Nov 14 00:46:10 2002
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.199 2002/11/13 13:31:32 john Exp $ */
+/* $Id: array.c,v 1.200 2002/11/14 05:46:10 jon Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1411,48 +1411,60 @@
 }
 /* }}} */
 
-/* {{{ proto array range(mixed low, mixed high)
+/* {{{ proto array range(mixed low, mixed high[, int step])
Create an array containing the range of integers or characters from low to high 
(inclusive) */
 PHP_FUNCTION(range)
 {
-   zval **zlow, **zhigh;
-   
-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &zlow, &zhigh) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   zval *zlow, *zhigh;
+   long step = 1;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz|l", &zlow,
+ &zhigh, &step) == FAILURE) {
+   RETURN_FALSE;
}
 
-   /* allocate an array for return */
+   /* We only want positive step values. */
+   if (step < 0) {
+   step *= -1;
+   }
+
+   /* Initialize the return_value as an array. */
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
 
-   if (Z_TYPE_PP(zlow)==IS_STRING && Z_TYPE_PP(zhigh)==IS_STRING) {
+   /* If the range is given as strings, generate an array of characters. */
+   if (Z_TYPE_P(zlow) == IS_STRING && Z_TYPE_P(zhigh) == IS_STRING) {
char *low, *high;
-   convert_to_string_ex(zlow);
-   convert_to_string_ex(zhigh);
-   low = Z_STRVAL_PP(zlow);
-   high = Z_STRVAL_PP(zhigh);
-   if (*low>*high) {
-   for (; *low >= *high; (*low)--) {
+
+   convert_to_string_ex(&zlow);
+   convert_to_string_ex(&zhigh);
+   low = Z_STRVAL_P(zlow);
+   high = Z_STRVAL_P(zhigh);
+
+   if (*low > *high) { /* Negative steps */
+   for (; *low >= *high; (*low) -= step) {
add_next_index_stringl(return_value, low, 1, 1);
-   }   
-   } else {
-   for (; *low <= *high; (*low)++) {
+   }
+   } else {/* Positive steps */
+   for (; *low <= *high; (*low) += step) {
add_next_index_stringl(return_value, low, 1, 1);
-   }   
+   }
}
} else {
int low, high;
-   convert_to_long_ex(zlow);
-   convert_to_long_ex(zhigh);
-   low = Z_LVAL_PP(zlow);
-   high = Z_LVAL_PP(zhigh);
-   if (low > high) { 
-   for (; low >= high; low--) {
+
+   convert_to_long_ex(&zlow);
+   convert_to_long_ex(&zhigh);
+   low = Z_LVAL_P(zlow);
+   high = Z_LVAL_P(zhigh);
+
+   if (low > high) {   /* Negative steps */
+   for (; low >= high; low -= step) {
add_next_index_long(return_value, low);
}   
-   } else {
-   for (; low <= high; low++) {
+   } else {/* Positive steps */
+   for (; low <= high; low += step) {
add_next_index_long(return_value, low);
}   
}



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