[PHP-CVS-DAILY] cvs: php4 / ChangeLog

2002-10-18 Thread changelog
changelog   Thu Oct 17 20:33:17 2002 EDT

  Modified files:  
/php4   ChangeLog 
  Log:
  ChangeLog update
  
  
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.1194 php4/ChangeLog:1.1195
--- php4/ChangeLog:1.1194   Wed Oct 16 20:33:13 2002
+++ php4/ChangeLog  Thu Oct 17 20:33:16 2002
@@ -1,3 +1,97 @@
+2002-10-17  Yasuo Ohgaki  [EMAIL PROTECTED]
+
+* NEWS: Added pg_get_pid() that get backend process PID.
+Does anyone prefer pg_get_backend_pid() or else?
+
+* ext/pgsql/README
+  ext/pgsql/pgsql.c
+  ext/pgsql/php_pgsql.h: Added pg_get_pid()
+
+2002-10-17  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/php_string.h
+  ext/standard/string.c
+  ext/standard/basic_functions.c:
+Renamed word_count to str_word_count to comply with naming conventions.
+Thanks Andi, for catching this oversight.
+
+2002-10-17  Tal Peer  [EMAIL PROTECTED]
+
+* ext/fribidi/fribidi.c:
+Improved fribidi_charset_info() slightly
+
+* ext/fribidi/php_fribidi.h
+  ext/fribidi/fribidi.c:
+New functions:
+fribidi_get_charsets()
+fribidi_charset_info()
+
+2002-10-17  Harald Radi  [EMAIL PROTECTED]
+
+* ext/com/COM.c:  fixes bugs #19156 and #19544 (memleak)
+
+2002-10-17  Derick Rethans  [EMAIL PROTECTED]
+
+* run-tests.php: - Removing debugging info
+
+2002-10-17  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/url.c:
+Added support for file:/. Thanks to Thies for noticing the problem.
+
+2002-10-17  Sascha Schumann  [EMAIL PROTECTED]
+
+* ext/ircg/ircg.c:
+A child process should not have access to IRCG's file descriptors.
+
+2002-10-17  Yasuo Ohgaki  [EMAIL PROTECTED]
+
+* php.ini-recommended
+  php.ini-dist: Add note for short_open_tag
+
+2002-10-17  Thies C. Arntzen  [EMAIL PROTECTED]
+
+* ext/oci8/oci8.c:
+- Added Oracle TIMESTAMP type to oci8 extension. (thies)
+
+2002-10-17  Yasuo Ohgaki  [EMAIL PROTECTED]
+
+* NEWS: Added pg_get_notify() for better performace for applications
+cache query results.
+Removed unneeded entry.
+
+* ext/pgsql/pgsql.c
+  ext/pgsql/php_pgsql.h: Added async message function - pg_get_notify()
+
+* ext/mysql/php_mysql.c: Remove mysql_result_seek() alias.
+
+2002-10-17  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/snmp/config.m4
+  ext/snmp/snmp.c: Fix this for Wez and his antique ucd-snmp
+
+* NEWS: Snow..yuck..
+
+* ext/zip/config.m4: Fix the phpize build
+
+* pear/pear.m4: Fix some phpize problems.
+
+* ext/zip/zip.c: Part 1 of fixing the shared build
+
+* ext/pdf/config.m4: --with-zlib-dir was missing. Needed for phpize builds
+
+2002-10-17  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/basic_functions.c
+  ext/standard/php_string.h
+  ext/standard/string.c:
+Added word_count() function that allows counting of words inside a string.
+The function also allows the user to retrieve all the words from a string.
+
+2002-10-17  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/snmp/snmp.c: ws fixes
+
 2002-10-16  Harald Radi  [EMAIL PROTECTED]
 
 * ext/com/VARIANT.c





[PHP-CVS-DAILY] cvs: php4 / ChangeLog

2002-10-18 Thread changelog
changelog   Fri Oct 18 20:33:00 2002 EDT

  Modified files:  
/php4   ChangeLog 
  Log:
  ChangeLog update
  
  
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.1195 php4/ChangeLog:1.1196
--- php4/ChangeLog:1.1195   Thu Oct 17 20:33:16 2002
+++ php4/ChangeLog  Fri Oct 18 20:32:59 2002
@@ -1,3 +1,84 @@
+2002-10-18  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/url.c:
+Added handling for file:/ schema, which does not contain a host.
+
+2002-10-18  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/standard/dns.c: ws fixes
+
+2002-10-18  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/standard/file.c
+  main/php_streams.h
+  main/streams.c: Fixed bug #19971 (optimized the file() function).
+The file() function is now also binary safe.
+
+2002-10-18  Derick Rethans  [EMAIL PROTECTED]
+
+* run-tests.php: - Added %x for HEX chars
+- Added %d as alias for %i (too much C here :)
+- Added beginning and end markers to regexp
+
+2002-10-18  Wez Furlong  [EMAIL PROTECTED]
+
+* main/network.c: Revert my last bogus commit.
+Change the comparison to something that is less likely to inspire me to
+make the same mistake again...
+
+* ext/standard/file.c: Improve file().
+Patch by Tal Peer [EMAIL PROTECTED]
+
+2002-10-18  Andrei Zmievski  [EMAIL PROTECTED]
+
+* apidoc-zend.txt: This is deprecated too.
+
+* apidoc.txt: Remove deprecated apidoc.txt.
+
+* ext/standard/string.c:
+- Fixed an infinite loop in setlocale() when only invalid locale names
+  were passed in the array. (patch by Pal Loberg, [EMAIL PROTECTED]).
+
+2002-10-18  Wez Furlong  [EMAIL PROTECTED]
+
+* main/network.c
+  main/streams.c: Improve EOF detection. Fixes #19970.
+
+2002-10-18  Tal Peer  [EMAIL PROTECTED]
+
+* ext/fribidi/fribidi.c
+  ext/fribidi/tests/002.phpt:
+Changed fribidi_get_charsets() return value to also include the constant
+itself (as the key).
+
+2002-10-18  Harald Radi  [EMAIL PROTECTED]
+
+* NEWS: make jani happy
+
+2002-10-18  Jani Taskinen  [EMAIL PROTECTED]
+
+* NEWS: achtung: keep the style consistent! :)
+
+2002-10-18  Yasuo Ohgaki  [EMAIL PROTECTED]
+
+* ext/pgsql/tests/17result.phpt
+  ext/pgsql/tests/18pg_escape_bytea.phpt
+  ext/pgsql/tests/19pg_ping.phpt
+  ext/pgsql/tests/20pg_get_pid.phpt
+  ext/pgsql/tests/21pg_get_notify.phpt
+  ext/pgsql/tests/README
+  ext/pgsql/tests/createdb.inc
+  ext/pgsql/tests/large_object.inc
+  ext/pgsql/tests/pg_escape_bytea.inc
+  ext/pgsql/tests/pg_get_notify.inc
+  ext/pgsql/tests/pg_get_pid.inc
+  ext/pgsql/tests/pg_ping.inc
+  ext/pgsql/tests/result.inc: Added tests for new functions
+
+2002-10-18  Markus Fischer  [EMAIL PROTECTED]
+
+* NEWS: - word_count() - str_word_count()
+
 2002-10-17  Yasuo Ohgaki  [EMAIL PROTECTED]
 
 * NEWS: Added pg_get_pid() that get backend process PID.





[PHP-CVS-DAILY] cvs: Zend / ChangeLog

2002-10-18 Thread changelog
changelog   Fri Oct 18 20:33:14 2002 EDT

  Modified files:  
/Zend   ChangeLog 
  Log:
  ChangeLog update
  
  
Index: Zend/ChangeLog
diff -u Zend/ChangeLog:1.89 Zend/ChangeLog:1.90
--- Zend/ChangeLog:1.89 Mon Oct 14 20:34:23 2002
+++ Zend/ChangeLog  Fri Oct 18 20:33:13 2002
@@ -1,3 +1,7 @@
+2002-10-18  Andi Gutmans  [EMAIL PROTECTED]
+
+* zend_execute.c: - Cleanup
+
 2002-10-14  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * zend_globals.h
@@ -511,7 +515,7 @@
 
 2002-05-13  Sterling Hughes  [EMAIL PROTECTED]
 
-* zend_qsort.c: add $Id: ChangeLog,v 1.89 2002/10/15 00:34:23 changelog Exp $ tag
+* zend_qsort.c: add $Id: ChangeLog,v 1.90 2002/10/19 00:33:13 changelog Exp $ tag
 
 2002-05-13  Derick Rethans  [EMAIL PROTECTED]
 





[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2002-10-18 Thread changelog
changelog   Fri Oct 18 20:33:30 2002 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
  
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.127 ZendEngine2/ChangeLog:1.128
--- ZendEngine2/ChangeLog:1.127 Wed Oct 16 20:33:37 2002
+++ ZendEngine2/ChangeLog   Fri Oct 18 20:33:29 2002
@@ -1,3 +1,14 @@
+2002-10-18  Andi Gutmans  [EMAIL PROTECTED]
+
+* zend.c
+  zend_compile.c
+  zend_execute.c:
+- Change opcode dispatch mechanism to use a function per opcode and use
+- a lookup table using the opcode # to call the correct function.
+- Still have lots of tuning to do.
+
+* zend_execute.c: - Cleanup
+
 2002-10-16  Sebastian Bergmann  [EMAIL PROTECTED]
 
 * zend_execute.c: Fix ZTS build.





[PHP-CVS-DAILY] cvs: php4 / NEWS

2002-10-18 Thread changelog
changelog   Thu Oct 17 20:34:26 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  NEWS update
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1213 php4/NEWS:1.1214
--- php4/NEWS:1.1213Thu Oct 17 19:42:43 2002
+++ php4/NEWS   Thu Oct 17 20:34:26 2002
 -1,6 +1,10 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
+- Added function fribidi_get_charsets() (Tal)
+- Added function fribidi_charset_info() (Tal)
+- fixes bugs #19156 and #19544 (memleak)
+- Added Oracle TIMESTAMP type to oci8 extension. (thies)
 - 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
   installed as {PREFIX}/bin/php-cgi.





[PHP-CVS-DAILY] cvs: php4 / NEWS

2002-10-18 Thread changelog
changelog   Fri Oct 18 20:34:02 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  NEWS update
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1217 php4/NEWS:1.1218
--- php4/NEWS:1.1217Fri Oct 18 04:18:11 2002
+++ php4/NEWS   Fri Oct 18 20:34:01 2002
@@ -1,6 +1,8 @@
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
+- Fixed an infinite loop in setlocale() when only invalid locale names
+  were passed in the array. (patch by Pal Loberg, [EMAIL PROTECTED]).
 - 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
   installed as {PREFIX}/bin/php-cgi.





[PHP-CVS] cvs: php4 / NEWS

2002-10-18 Thread Markus Fischer
mfischerFri Oct 18 03:29:40 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - word_count() - str_word_count()
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1214 php4/NEWS:1.1215
--- php4/NEWS:1.1214Thu Oct 17 20:34:26 2002
+++ php4/NEWS   Fri Oct 18 03:29:40 2002
 -19,7 +19,7 
 - Changed registry entries under HKLM\SOFTWARE\PHP\Per Directory Values to
   work also with administrative directives such as safe_mode, open_basedir,
   etc. (Claudio Felber) 
-- Added word_count() function which counts words inside a string. (Ilia)
+- Added str_word_count() function which counts words inside a string. (Ilia)
 - Added PGSQL_CONNECT_FORCE_NEW option to pg_connect() (Yasuo)
 - Added ICONV_IMPL and ICONV_VERSION constants to iconv extension to
   indicate which iconv implementation is used. (Moriyoshi)



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




[PHP-CVS] Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Ilia A.
On October 17, 2002 06:21 pm, Andi Gutmans wrote:
 It's not safe against something stupid like:
 ?xml . foo() ?

Okie, point made, there will be that one or more users who will be affected by 
this patch in a negative way. However, I think you'll agree with me that 
those users are doing something out of the ordinary. My proposal is a VERY 
DIRTY hack, but it's a hack that'll solve a problem for 99% of the users. 
Quite frankly, if I were in your shoes I am not sure I'd accept this hack 
myself.
Adding an ini option IMHO is a very bad idea, because it opens the door to 
various other engine hacks, which in the end may lead to ini file looking 
like
xml_hack=no
case_sensetivity_hack=yes
multibyte_hack=yes
and so on.
If it is all the same to you, I would rather see my patch rejected then added 
with an ini setting. 

Ilia

 Yes you can say it's stupid but this is what I could think of now and it's
 a valid PHP statement. This patch would add ambiguity to the language.
 We could have an INI directive such as xml_hack=on but I hate adding INI
 stuff too.

 I suggest people who are generating XML just turn off short-tags.

 Andi

 At 06:17 PM 10/17/2002 -0400, Ilia A. wrote:
 On October 17, 2002 06:03 pm, Andi Gutmans wrote:
   This is definitely one thing to think about. This is exactly the reason
   why I was against in the beginning. I had a feeling such ambiguities
   could arise.
 
 The latest incarnation of the patch I am attaching below is 'safe' against
 the
 problem demonstrated by Rasmus.
 
 Ilia
 
   Andi
  
   At 09:43 AM 10/17/2002 -0700, Rasmus Lerdorf wrote:
   My main worry with such a hack would be breaking a script like this:
   
  ?php
function xml() {
echo Hello World;
}
  ?
  ...
  ?xml ()?
  ...
   
   Now, people generally don't put spaces between the function name and
the (), but it is a BC concern since the above script works just fine
today.
   
   One idea would be to only strip ?xml tags up until we see the first
PHP tag.  That should cover most cases, but it may be a bit too
magical.
   
   -Rasmus
   
   On Thu, 17 Oct 2002, Andrei Zmievski wrote:
 They are _not_ the same person!

 On Thu, 17 Oct 2002, Zeev Suraski wrote:
  Well, I differ with you on that.  I don't think there's anything
  in the same class as ?xml.
 
  Zeev
 
  At 18:08 17/10/2002, Andi Gutmans wrote:
  I don't think we should add special hacks to the scanner. Soon
   we're
   
going
   
  to have a zillion hacks for other XML/SGML/foobar documents.
  
  Andi
  
  At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
  Since the general consensus by the developers is not to remove
   the short_tags
  or even disable them. Perhaps we should consider alternate
   solutions to this
  problem. Given the buzzword popularity of XML and its slowly
   growing popularity among website designers (XHTML) this issue
   is likely to come up in
  the future yet again.
  The solution I would like to offer, is a patch that adds
   special
   
handling
   
  for
  ?xml. Thus preventing the language parser from attempting to
   parse
   
data
   
  inside ?xml as PHP source.
  
  Ilia
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php

 -Andrei
 http://www.gravitonic.com/

 Claiming Java is easier than C++ is like
  saying that K2 is shorter than Everest.
  -- Larry O'Brien (editor, Software Development)

 --
 PHP Development 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/standard basic_functions.c php_string.h string.c

2002-10-18 Thread Ilia Alshanetsky
iliaa   Thu Oct 17 18:44:45 2002 EDT

  Modified files:  
/php4/ext/standard  basic_functions.c php_string.h string.c 
  Log:
  Renamed word_count to str_word_count to comply with naming conventions.
  Thanks Andi, for catching this oversight.
  
  
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.529 
php4/ext/standard/basic_functions.c:1.530
--- php4/ext/standard/basic_functions.c:1.529   Wed Oct 16 23:27:19 2002
+++ php4/ext/standard/basic_functions.c Thu Oct 17 18:44:43 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: basic_functions.c,v 1.529 2002/10/17 03:27:19 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.530 2002/10/17 22:44:43 iliaa Exp $ */
 
 #include php.h
 #include php_streams.h
 -334,7 +334,7 
PHP_FE(stristr,
 NULL)
PHP_FE(strrchr,
 NULL)
PHP_FE(str_shuffle,
 NULL)
-   PHP_FE(word_count, 
 NULL)
+   PHP_FE(str_word_count, 
+ NULL)
 
 #ifdef HAVE_STRCOLL
PHP_FE(strcoll,
 NULL)
Index: php4/ext/standard/php_string.h
diff -u php4/ext/standard/php_string.h:1.64 php4/ext/standard/php_string.h:1.65
--- php4/ext/standard/php_string.h:1.64 Wed Oct 16 23:27:19 2002
+++ php4/ext/standard/php_string.h  Thu Oct 17 18:44:44 2002
 -17,7 +17,7 
+--+
 */
 
-/* $Id: php_string.h,v 1.64 2002/10/17 03:27:19 iliaa Exp $ */
+/* $Id: php_string.h,v 1.65 2002/10/17 22:44:44 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
 -83,7 +83,7 
 PHP_FUNCTION(str_pad);
 PHP_FUNCTION(sscanf);
 PHP_FUNCTION(str_shuffle);
-PHP_FUNCTION(word_count);
+PHP_FUNCTION(str_word_count);
 #ifdef HAVE_STRCOLL
 PHP_FUNCTION(strcoll);
 #endif
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.324 php4/ext/standard/string.c:1.325
--- php4/ext/standard/string.c:1.324Wed Oct 16 23:27:19 2002
+++ php4/ext/standard/string.c  Thu Oct 17 18:44:44 2002
 -18,7 +18,7 
+--+
  */
 
-/* $Id: string.c,v 1.324 2002/10/17 03:27:19 iliaa Exp $ */
+/* $Id: string.c,v 1.325 2002/10/17 22:44:44 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
 -4027,7 +4027,7 
 }
 /* }}} */
 
-/* {{{ proto void word_count(string str, [int format])
+/* {{{ proto void str_word_count(string str, [int format])
Counts the number of words inside a string. If format of 1 is specified,
then the function will return an array containing all the words
found inside the string. If format of 2 is specified, then the function
 -4038,7 +4038,7 
string containing alphabetic characters, which also may contain, but not start
with ' and - characters.
 */
-PHP_FUNCTION(word_count)
+PHP_FUNCTION(str_word_count)
 {
zval **str, **o_format;
char *s, *e, *p, *buf;



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




[PHP-CVS] cvs: php4 /ext/pgsql/tests 17result.phpt 18pg_escape_bytea.phpt 19pg_ping.phpt 20pg_get_pid.phpt 21pg_get_notify.phpt README createdb.inc large_object.inc pg_escape_bytea.inc pg_get_notify.inc pg_get_pid.inc pg_ping.inc result.inc

2002-10-18 Thread Yasuo Ohgaki
yohgaki Fri Oct 18 03:52:10 2002 EDT

  Added files: 
/php4/ext/pgsql/tests   18pg_escape_bytea.phpt 19pg_ping.phpt 
20pg_get_pid.phpt 21pg_get_notify.phpt README 
pg_escape_bytea.inc pg_get_notify.inc 
pg_get_pid.inc pg_ping.inc 

  Modified files:  
/php4/ext/pgsql/tests   17result.phpt createdb.inc large_object.inc 
result.inc 
  Log:
  Added tests for new functions
  
  
Index: php4/ext/pgsql/tests/17result.phpt
diff -u php4/ext/pgsql/tests/17result.phpt:1.1 php4/ext/pgsql/tests/17result.phpt:1.2
--- php4/ext/pgsql/tests/17result.phpt:1.1  Thu Apr 25 03:52:01 2002
+++ php4/ext/pgsql/tests/17result.phpt  Fri Oct 18 03:52:09 2002
 -37,4 +37,13 
   [2]=
   NULL
 }
+array(3) {
+  [num]=
+  string(1) 2
+  [str]=
+  string(3) ABC
+  [bin]=
+  NULL
+}
+bool(true)
 Ok
Index: php4/ext/pgsql/tests/createdb.inc
diff -u php4/ext/pgsql/tests/createdb.inc:1.2 php4/ext/pgsql/tests/createdb.inc:1.3
--- php4/ext/pgsql/tests/createdb.inc:1.2   Fri Apr  5 01:06:21 2002
+++ php4/ext/pgsql/tests/createdb.inc   Fri Oct 18 03:52:09 2002
 -6,7 +6,7 
 $db = pg_connect($conn_str);
 if (!pg_num_rows(pg_query($db, SELECT * FROM .$table_name))) 
 {
-   pg_query($db,$table_def);
+   pg_query($db,$table_def); // Create table here
for ($i=0; $i  $num_test_record; $i++) {
pg_query($db,INSERT INTO .$table_name. VALUES ($i, 'ABC'););
}
Index: php4/ext/pgsql/tests/large_object.inc
diff -u php4/ext/pgsql/tests/large_object.inc:1.3 
php4/ext/pgsql/tests/large_object.inc:1.4
--- php4/ext/pgsql/tests/large_object.inc:1.3   Sat Apr 20 10:06:47 2002
+++ php4/ext/pgsql/tests/large_object.inc   Fri Oct 18 03:52:09 2002
 -3,6 +3,8 
 include('config.inc');
 
 $db = pg_connect($conn_str);
+
+// create/write/close LO
 pg_exec ($db, begin);
 $oid = pg_lo_create ($db);
 if (!$oid) echo (pg_lo_create() error\n);
 -12,6 +14,7 
 pg_lo_close ($handle);
 pg_exec ($db, commit);
 
+// open/read/tell/seek/close LO
 pg_exec ($db, begin);
 $handle = pg_lo_open ($db, $oid, w);
 pg_lo_read($handle, 100);
 -20,6 +23,7 
 pg_lo_close($handle);
 pg_exec ($db, commit);
 
+// open/read_all/close LO
 pg_exec ($db, begin);
 $handle = pg_lo_open ($db, $oid, w);
 pg_lo_read_all($handle);
 -27,6 +31,7 
 pg_lo_close($handle);
 pg_exec ($db, commit);
 
+// unlink LO
 pg_exec ($db, begin);
 pg_lo_unlink($db, $oid) or print(pg_lo_unlink() error\n);
 pg_exec ($db, commit);
 -43,6 +48,19 
 $oid = pg_lo_create ($db) or print(pg_lo_create() error\n);
 pg_lo_unlink($db, (string)$oid) or print(pg_lo_unlink() error\n);
 pg_exec ($db, commit);
+
+// import/export LO
+pg_query($db, 'begin');
+$oid = pg_lo_import($db, 'php.gif');
+pg_query($db, 'commit');
+pg_query($db, 'begin');
+unlink('php.gif.exported');
+pg_lo_export($oid, 'php.gif.exported', $db);
+if (!file_exists('php.gif.exported')) {
+   echo Export failed\n;
+}
+unlink('php.gif.exported');
+pg_query($db, 'commit');
 
 echo OK;
 
Index: php4/ext/pgsql/tests/result.inc
diff -u php4/ext/pgsql/tests/result.inc:1.1 php4/ext/pgsql/tests/result.inc:1.2
--- php4/ext/pgsql/tests/result.inc:1.1 Thu Apr 25 03:52:01 2002
+++ php4/ext/pgsql/tests/result.inc Fri Oct 18 03:52:09 2002
 -15,6 +15,9 
 var_dump($rec);
 $rec = pg_fetch_row($result, 1);
 var_dump($rec);
+$rec = pg_fetch_assoc($result);
+var_dump($rec);
+var_dump(pg_result_seek($result, 0));
 
 echo Ok\n;
 

Index: php4/ext/pgsql/tests/18pg_escape_bytea.phpt
+++ php4/ext/pgsql/tests/18pg_escape_bytea.phpt
--TEST--
PostgreSQL pg_escape_bytea() functions
--SKIPIF--
?php include(skipif.inc); ?
--FILE--
?php
include(pg_escape_bytea.inc);
?
--EXPECT--
OK

Index: php4/ext/pgsql/tests/19pg_ping.phpt
+++ php4/ext/pgsql/tests/19pg_ping.phpt
--TEST--
PostgreSQL pg_ping() functions
--SKIPIF--
?php include(skipif.inc); ?
--FILE--
?php
include(pg_ping.inc);
?
--EXPECT--
bool(true)

Index: php4/ext/pgsql/tests/20pg_get_pid.phpt
+++ php4/ext/pgsql/tests/20pg_get_pid.phpt
--TEST--
PostgreSQL pg_get_pid() functions
--SKIPIF--
?php include(skipif.inc); ?
--FILE--
?php
include(pg_get_pid.inc);
?
--EXPECT--
OK

Index: php4/ext/pgsql/tests/21pg_get_notify.phpt
+++ php4/ext/pgsql/tests/21pg_get_notify.phpt
--TEST--
PostgreSQL pg_get_notify() functions
--SKIPIF--
?php include(skipif.inc); ?
--FILE--
?php
include(pg_get_notify.inc);
?
--EXPECT--
OK

Index: php4/ext/pgsql/tests/pg_escape_bytea.inc
+++ php4/ext/pgsql/tests/pg_escape_bytea.inc
?php
// optional functions

include('config.inc');


$fp = fopen('php.gif', 'r');
$image = fread($fp, filesize('php.gif'));
$esc_image = pg_escape_bytea($image);

$db = pg_connect($conn_str);
pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, 
\''.$esc_image.'\');');
$result = pg_query($db, 'SELECT * FROM '.$table_name.' WHERE num = 9876');
$rows = pg_fetch_all($result);
$unesc_image = 

Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c php_string.hstring.c

2002-10-18 Thread Andi Gutmans
At 06:42 PM 10/17/2002 -0400, Ilia A. wrote:

I'll correct the name of the function I've added, I applogize for the
oversight. I do not think we should rename existing functions because it
would break BC and force us add to add even more function aliases. We already
have 400+ function alises in PHP, lets try avoiding adding new ones unless
absolutely needed.


I agree and that's what we decided a long time ago. Don't rename existing 
functions but name new ones correctly.
Thanks Ilia,

Andi


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



[PHP-CVS] cvs: php4 / NEWS

2002-10-18 Thread Jani Taskinen
sniper  Fri Oct 18 03:56:01 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  achtung: keep the style consistent! :)
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1215 php4/NEWS:1.1216
--- php4/NEWS:1.1215Fri Oct 18 03:29:40 2002
+++ php4/NEWS   Fri Oct 18 03:56:01 2002
 -1,10 +1,6 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
-- Added function fribidi_get_charsets() (Tal)
-- Added function fribidi_charset_info() (Tal)
-- fixes bugs #19156 and #19544 (memleak)
-- Added Oracle TIMESTAMP type to oci8 extension. (thies)
 - 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
   installed as {PREFIX}/bin/php-cgi.
 -15,6 +11,8 
   . ext/icap
   . sapi/fhttpd
 - Moved ext/vpopmail to PECL. (James)
+- Added fribidi_get_charsets() and fribidi_charset_info() functions. (Tal)
+- Added Oracle TIMESTAMP type to oci8 extension. (Thies)
 - Fixed fgets($fp) to read until EOL when length parameter is not set. (Wez)
 - Changed registry entries under HKLM\SOFTWARE\PHP\Per Directory Values to
   work also with administrative directives such as safe_mode, open_basedir,



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




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

2002-10-18 Thread Tal Peer
tal Thu Oct 17 14:32:16 2002 EDT

  Modified files:  
/php4/ext/fribidi   fribidi.c 
  Log:
  
  Improved fribidi_charset_info() slightly
  
  
Index: php4/ext/fribidi/fribidi.c
diff -u php4/ext/fribidi/fribidi.c:1.30 php4/ext/fribidi/fribidi.c:1.31
--- php4/ext/fribidi/fribidi.c:1.30 Thu Oct 17 14:04:42 2002
+++ php4/ext/fribidi/fribidi.c  Thu Oct 17 14:32:16 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: fribidi.c,v 1.30 2002/10/17 18:04:42 tal Exp $ */
+/* $Id: fribidi.c,v 1.31 2002/10/17 18:32:16 tal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -260,8 +260,6 
return;
}
 
-   array_init(return_value);
-
switch (charset) {
case FRIBIDI_CHARSET_UTF8:
case FRIBIDI_CHARSET_ISO8859_6:
 -270,26 +268,25 
case FRIBIDI_CHARSET_CP1256:
case FRIBIDI_CHARSET_ISIRI_3342:
case FRIBIDI_CHARSET_CAP_RTL:
+   array_init(return_value);
+   
name  = fribidi_char_set_name(charset);
title = fribidi_char_set_title(charset);
desc  = fribidi_char_set_desc(charset);

-   if (name == NULL) {
-   name = ;
+   if (name) {
+   add_assoc_string_ex(return_value, name, 
+sizeof(name), name, 1);
}
-   if (title == NULL) {
-   title = ;
+   if (title) {
+   add_assoc_string_ex(return_value, title, 
+sizeof(title), title, 1);
}
-   if (desc == NULL) {
-   desc = ;
+   if (desc) {
+   add_assoc_string_ex(return_value, desc, 
+sizeof(desc), desc, 1);
}
 
-   add_assoc_string(return_value, name, name , 1);
-   add_assoc_string(return_value, title, title, 1);
-   add_assoc_string(return_value, desc, desc, 1);
break;
default:
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown charset);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
+charset.);
RETURN_FALSE;
}
 }



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




[PHP-CVS] cvs: php4 / NEWS

2002-10-18 Thread Yasuo Ohgaki
yohgaki Thu Oct 17 19:42:44 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Added pg_get_pid() that get backend process PID.
  Does anyone prefer pg_get_backend_pid() or else?
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1212 php4/NEWS:1.1213
--- php4/NEWS:1.1212Thu Oct 17 04:04:28 2002
+++ php4/NEWS   Thu Oct 17 19:42:43 2002
 -59,7 +59,7 
 - Added getopt() for parsing command line options and arguments. (Jon)
 - Added pg_fetch_assoc(), pg_fetch_all(), pg_ping(), pg_meta_data(), pg_convert(), 
   pg_insert(), pg_select(), pg_update(), pg_delete(), pg_result_seek(),
-  pg_unescape_bytea() and pg_get_notify(). (Yasuo)
+  pg_unescape_bytea(), pg_get_notify() and pg_get_pid(). (Yasuo)
 - Fixed bug #17281 (Sanity checks for encoding sessions). (Ilia)
 - Fixed bug #16995 and #19392 (Prevent crash if $HTTP_SESSION_VARS != ARRAY).
   (Ilia)



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




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

2002-10-18 Thread James Cox
hang on -- why are we removing aliases? why would we _ever_ remove an alias?

 -- james

 -Original Message-
 From: Yasuo Ohgaki [mailto:yohgaki;ohgaki.net]
 Sent: Thursday, October 17, 2002 8:24 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-CVS] cvs: php4 /ext/mysql php_mysql.c 
 
 
 yohgaki   Thu Oct 17 03:24:04 2002 EDT
 
   Modified files:  
 /php4/ext/mysql   php_mysql.c 
   Log:
   Remove mysql_result_seek() alias.
   
   
 Index: php4/ext/mysql/php_mysql.c
 diff -u php4/ext/mysql/php_mysql.c:1.167 php4/ext/mysql/php_mysql.c:1.168
 --- php4/ext/mysql/php_mysql.c:1.167  Wed Oct  9 09:46:18 2002
 +++ php4/ext/mysql/php_mysql.cThu Oct 17 03:24:04 2002
 @@ -18,7 +18,7 @@
 
 +--+
  */
   
 -/* $Id: php_mysql.c,v 1.167 2002/10/09 13:46:18 zak Exp $ */
 +/* $Id: php_mysql.c,v 1.168 2002/10/17 07:24:04 yohgaki Exp $ */
  
  /* TODO:
   *
 @@ -193,7 +193,6 @@
   PHP_FALIAS(mysql_dbname,mysql_result,   
 NULL)
   PHP_FALIAS(mysql_tablename, mysql_result,   
 NULL)
   PHP_FALIAS(mysql_table_name,mysql_result,   NULL)
 - PHP_FALIAS(mysql_result_seek,   mysql_data_seek,NULL)
   {NULL, NULL, NULL}
  };
  /* }}} */
 
 
 
 -- 
 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/mysql php_mysql.c

2002-10-18 Thread Derick Rethans
On Thu, 17 Oct 2002, James Cox wrote:

 hang on -- why are we removing aliases? why would we _ever_ remove an alias?

Because he added this before and we decided to drop it?

Derick

  -Original Message-
  From: Yasuo Ohgaki [mailto:yohgaki;ohgaki.net]
  Sent: Thursday, October 17, 2002 8:24 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP-CVS] cvs: php4 /ext/mysql php_mysql.c 
  
  
  yohgaki Thu Oct 17 03:24:04 2002 EDT
  
Modified files:  
  /php4/ext/mysql php_mysql.c 
Log:
Remove mysql_result_seek() alias.


  Index: php4/ext/mysql/php_mysql.c
  diff -u php4/ext/mysql/php_mysql.c:1.167 php4/ext/mysql/php_mysql.c:1.168
  --- php4/ext/mysql/php_mysql.c:1.167Wed Oct  9 09:46:18 2002
  +++ php4/ext/mysql/php_mysql.c  Thu Oct 17 03:24:04 2002
  @@ -18,7 +18,7 @@
  
  +--+
   */

  -/* $Id: php_mysql.c,v 1.167 2002/10/09 13:46:18 zak Exp $ */
  +/* $Id: php_mysql.c,v 1.168 2002/10/17 07:24:04 yohgaki Exp $ */
   
   /* TODO:
*
  @@ -193,7 +193,6 @@
  PHP_FALIAS(mysql_dbname,mysql_result,   
  NULL)
  PHP_FALIAS(mysql_tablename, mysql_result,   
  NULL)
  PHP_FALIAS(mysql_table_name,mysql_result,   NULL)
  -   PHP_FALIAS(mysql_result_seek,   mysql_data_seek,NULL)
  {NULL, NULL, NULL}
   };
   /* }}} */
  
  
  
  -- 
  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
 

--

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

2002-10-18 Thread Harald Radi
phanto  Fri Oct 18 04:18:11 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  make jani happy
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1216 php4/NEWS:1.1217
--- php4/NEWS:1.1216Fri Oct 18 03:56:01 2002
+++ php4/NEWS   Fri Oct 18 04:18:11 2002
 -11,6 +11,8 
   . ext/icap
   . sapi/fhttpd
 - Moved ext/vpopmail to PECL. (James)
+- Fixed bugs #19156 and #19544 (COM extension leaks memory and keeps
+  components referenced). (Harald)
 - Added fribidi_get_charsets() and fribidi_charset_info() functions. (Tal)
 - Added Oracle TIMESTAMP type to oci8 extension. (Thies)
 - Fixed fgets($fp) to read until EOL when length parameter is not set. (Wez)



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




[PHP-CVS] cvs: php4 /ext/fribidi fribidi.c /ext/fribidi/tests 002.phpt

2002-10-18 Thread Tal Peer
tal Fri Oct 18 04:59:14 2002 EDT

  Modified files:  
/php4/ext/fribidi   fribidi.c 
/php4/ext/fribidi/tests 002.phpt 
  Log:
  
  Changed fribidi_get_charsets() return value to also include the constant
  itself (as the key).
  
  
Index: php4/ext/fribidi/fribidi.c
diff -u php4/ext/fribidi/fribidi.c:1.31 php4/ext/fribidi/fribidi.c:1.32
--- php4/ext/fribidi/fribidi.c:1.31 Thu Oct 17 14:32:16 2002
+++ php4/ext/fribidi/fribidi.c  Fri Oct 18 04:59:14 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: fribidi.c,v 1.31 2002/10/17 18:32:16 tal Exp $ */
+/* $Id: fribidi.c,v 1.32 2002/10/18 08:59:14 tal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -298,13 +298,13 
 {
array_init(return_value);
 
-   add_index_string(return_value, 0, FRIBIDI_CHARSET_UTF8, 1);
-   add_index_string(return_value, 1, FRIBIDI_CHARSET_8859_6, 1);
-   add_index_string(return_value, 2, FRIBIDI_CHARSET_8859_8, 1);
-   add_index_string(return_value, 3, FRIBIDI_CHARSET_CP1255, 1);
-   add_index_string(return_value, 4, FRIBIDI_CHARSET_CP1256, 1);
-   add_index_string(return_value, 5, FRIBIDI_CHARSET_ISIRI_3342, 1);
-   add_index_string(return_value, 6, FRIBIDI_CHARSET_CAP_RTL, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_UTF8, FRIBIDI_CHARSET_UTF8, 
+1);
+   add_index_string(return_value, FRIBIDI_CHARSET_CAP_RTL, 
+FRIBIDI_CHARSET_CAP_RTL, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_ISO8859_6, 
+FRIBIDI_CHARSET_8859_6, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_ISO8859_8, 
+FRIBIDI_CHARSET_8859_8, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_CP1255, 
+FRIBIDI_CHARSET_CP1255, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_CP1256, 
+FRIBIDI_CHARSET_CP1256, 1);
+   add_index_string(return_value, FRIBIDI_CHARSET_ISIRI_3342, 
+FRIBIDI_CHARSET_ISIRI_3342, 1);
 }
 /* }}} */
 
Index: php4/ext/fribidi/tests/002.phpt
diff -u php4/ext/fribidi/tests/002.phpt:1.1 php4/ext/fribidi/tests/002.phpt:1.2
--- php4/ext/fribidi/tests/002.phpt:1.1 Tue Oct  8 04:17:02 2002
+++ php4/ext/fribidi/tests/002.phpt Fri Oct 18 04:59:14 2002
 -15,6 +15,12 
echo FRIBIDI_CHARSET_CP1256.\n;
echo FRIBIDI_CHARSET_ISIRI_3342.\n;
echo FRIBIDI_CHARSET_CAP_RTL.\n;
+   
+   $charsets = fribidi_get_charsets();
+   foreach ($charsets as $k = $charset) {
+   print_r(fribidi_charset_info($k));
+   }
+
 ?
 --EXPECT--
 4
 -24,3 +30,92 
 6
 7
 2
+Array
+(
+[name] = UTF-8
+[title] = UTF-8 (Unicode)
+)
+Array
+(
+[name] = CapRTL
+[title] = CapRTL (Test)
+[desc] = CapRTL is a character set for testing with the reference
+implementation, with explicit marks escape strings, and
+the property that contains all unicode character types in
+ASCII range 1-127.
+
+Warning: CapRTL character types are subject to change.
+
+CapRTL's character types:
+
+  * 0x00 ^ ON* 0x01 ^A ON* 0x02 ^B ON* 0x03 ^C ON  
+  * 0x04 ^D LTR   * 0x05 ^E RTL   * 0x06 ^F ON* 0x07 ^G ON  
+  * 0x08 ^H ON* 0x09 ^I ON* 0x0a ^J ON* 0x0b ^K ON  
+  * 0x0c ^L ON* 0x0d ^M BS* 0x0e ^N RLO   * 0x0f ^O RLE 
+  * 0x10 ^P LRO   * 0x11 ^Q LRE   * 0x12 ^R PDF   * 0x13 ^S WS  
+  * 0x14 ^T ON* 0x15 ^U ON* 0x16 ^V ON* 0x17 ^W ON  
+  * 0x18 ^X ON* 0x19 ^Y ON* 0x1a ^Z ON* 0x1b ^[ ON  
+  * 0x1c ^\ ON* 0x1d ^] ON* 0x1e ^^ ON* 0x1f ^_ ON  
+  * 0x20WS* 0x21  ! ON* 0x22   ON* 0x23  # ON  
+  * 0x24  $ ET* 0x25  % ON* 0x26   ON* 0x27  ' ON  
+  * 0x28  ( ON* 0x29  ) ON* 0x2a  * ON* 0x2b  + ET  
+  * 0x2c  , CS* 0x2d  - ON* 0x2e  . ES* 0x2f  / ES  
+  * 0x30  0 EN* 0x31  1 EN* 0x32  2 EN* 0x33  3 EN  
+  * 0x34  4 EN* 0x35  5 EN* 0x36  6 AN* 0x37  7 AN  
+  * 0x38  8 AN* 0x39  9 AN* 0x3a  : CS* 0x3b  ; ON  
+  * 0x3c   ON* 0x3d  = ON* 0x3e   ON* 0x3f  ? ON  
+  * 0x40   RTL   * 0x41  A AL* 0x42  B AL* 0x43  C AL  
+  * 0x44  D AL* 0x45  E AL* 0x46  F AL* 0x47  G RTL 
+  * 0x48  H RTL   * 0x49  I RTL   * 0x4a  J RTL   * 0x4b  K RTL 
+  * 0x4c  L RTL   * 0x4d  M RTL   * 0x4e  N RTL   * 0x4f  O RTL 
+  * 0x50  P RTL   * 0x51  Q RTL   * 0x52  R RTL   * 0x53  S RTL 
+  * 0x54  T RTL   * 0x55  U RTL   * 0x56  V RTL   * 0x57  W RTL 
+  * 0x58  X RTL   * 0x59  Y RTL   * 0x5a  Z RTL   * 0x5b  [ ON  
+  * 0x5c  \ BS* 0x5d  ] ON* 0x5e  ^ ON* 0x5f  _ ON  
+  * 0x60  ` NSM   * 0x61  a LTR   * 0x62  b LTR   * 0x63  c LTR 
+  * 0x64  d LTR   * 0x65  e LTR   * 0x66  f LTR   * 0x67  g LTR 
+  * 0x68  h LTR   * 0x69  i LTR   * 0x6a  j LTR   * 0x6b  k LTR 
+  * 0x6c  l LTR   * 0x6d  m LTR   * 0x6e  n LTR   * 0x6f  o LTR 
+  * 0x70  p LTR   * 0x71  q LTR   * 0x72  r LTR   * 0x73  s LTR 
+  * 0x74  t LTR   * 0x75  u LTR   * 0x76  v LTR   * 0x77  w LTR 
+  * 0x78  x LTR   * 0x79 

[PHP-CVS] cvs: php4 /ext/pgsql README pgsql.c php_pgsql.h

2002-10-18 Thread Yasuo Ohgaki
yohgaki Thu Oct 17 19:41:34 2002 EDT

  Modified files:  
/php4/ext/pgsql README pgsql.c php_pgsql.h 
  Log:
  Added pg_get_pid()
  
  
Index: php4/ext/pgsql/README
diff -u php4/ext/pgsql/README:1.8 php4/ext/pgsql/README:1.9
--- php4/ext/pgsql/README:1.8   Sun Apr  7 21:50:06 2002
+++ php4/ext/pgsql/README   Thu Oct 17 19:41:34 2002
 -43,14 +43,13 
 somewhere in your system to build PHP with PostgreSQL support.
 
  Note For PostgreSQL 7.2 
-I've tested upto 7.2.1.
+I've tested upto 7.2.2.
 
  TODO List ===
 Make pg_convert() smater. 
  - Better regex
  - User defiend type support
 Support async connection.
-Support async notification.
 
  Experimental Functions =
 
 -217,6 +216,19 
Select records that has ids (id=value) 
 
 
+array pg_get_notify([resource db[, notify]])
+   Get notify message on the connection 
+
+
+string pg_unescape_bytea(string bytea_data)
+   Unescape bytea field data 
+
+
+bool pg_ping(resource db)
+   ping database connection and try to reset connection if it's
+   broken 
+
+---
 
 Again, experimental functions are subject to be changed without 
 notice.
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.236 php4/ext/pgsql/pgsql.c:1.237
--- php4/ext/pgsql/pgsql.c:1.236Thu Oct 17 03:58:46 2002
+++ php4/ext/pgsql/pgsql.c  Thu Oct 17 19:41:34 2002
 -19,7 +19,7 
+--+
  */
  
-/* $Id: pgsql.c,v 1.236 2002/10/17 07:58:46 yohgaki Exp $ */
+/* $Id: pgsql.c,v 1.237 2002/10/17 23:41:34 yohgaki Exp $ */
 
 #include stdlib.h
 
 -116,6 +116,7 
PHP_FE(pg_field_is_null,NULL)
/* async message function */
PHP_FE(pg_get_notify,   NULL)
+   PHP_FE(pg_get_pid,  NULL)
/* error message functions */
PHP_FE(pg_result_error, NULL)
PHP_FE(pg_last_error,   NULL)
 -3015,9 +3016,7 
zval *pgsql_link;
int id = -1, result_type = PGSQL_ASSOC;
PGconn *pgsql;
-   PGresult *pgsql_result;
PGnotify *pgsql_notify;
-   pgsql_result_handle *pg_result;
 
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
TSRMLS_CC, r|l,
 pgsql_link) == 
FAILURE) {
 -3044,6 +3043,24 
 }
 /* }}} */
 
+/* {{{ proto resource pg_get_pid([resource connection)
+   Get backend(server) pid */
+PHP_FUNCTION(pg_get_pid)
+{
+   zval *pgsql_link;
+   int id = -1, pid;
+   PGconn *pgsql;
+
+   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
+TSRMLS_CC, r,
+pgsql_link) == 
+FAILURE) {
+   RETURN_FALSE;
+   }
+
+   ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, PostgreSQL link, 
+le_link, le_plink);
+
+   RETURN_LONG(PQbackendPID(pgsql));
+}
+/* }}} */
 
 /* {{{ php_pgsql_meta_data
  * TODO: Add meta_data cache for better performance
Index: php4/ext/pgsql/php_pgsql.h
diff -u php4/ext/pgsql/php_pgsql.h:1.55 php4/ext/pgsql/php_pgsql.h:1.56
--- php4/ext/pgsql/php_pgsql.h:1.55 Thu Oct 17 03:58:46 2002
+++ php4/ext/pgsql/php_pgsql.h  Thu Oct 17 19:41:34 2002
 -17,7 +17,7 
+--+
  */
  
-/* $Id: php_pgsql.h,v 1.55 2002/10/17 07:58:46 yohgaki Exp $ */
+/* $Id: php_pgsql.h,v 1.56 2002/10/17 23:41:34 yohgaki Exp $ */
 
 #ifndef PHP_PGSQL_H
 #define PHP_PGSQL_H
 -99,6 +99,7 
 PHP_FUNCTION(pg_field_is_null);
 /* async message functions */
 PHP_FUNCTION(pg_get_notify);
+PHP_FUNCTION(pg_get_pid);
 /* error message functions */
 PHP_FUNCTION(pg_result_error);
 PHP_FUNCTION(pg_last_error);



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




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

2002-10-18 Thread Zeev Suraski
Doesn't sound conclusive to me, I'm with James on this one.  If it went 
public, the alias should stay.

At 16:28 17/10/2002, Derick Rethans wrote:
On Thu, 17 Oct 2002, James Cox wrote:

 has it not gone public then?

Long time ago... :
http://marc.theaimsgroup.com/?l=php-devm=103353186024693w=2
http://marc.theaimsgroup.com/?l=php-devm=103392284125085w=2
http://marc.theaimsgroup.com/?l=php-devm=103395032108784w=2

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/mysql php_mysql.c

2002-10-18 Thread Derick Rethans
On Thu, 17 Oct 2002, Zeev Suraski wrote:

 Doesn't sound conclusive to me, I'm with James on this one.  If it went 
 public, the alias should stay.

It wasn't in any release.

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/mysql php_mysql.c

2002-10-18 Thread Yasuo Ohgaki
Zeev Suraski wrote:

Doesn't sound conclusive to me, I'm with James on this one.  If it went 
public, the alias should stay.

Time zone diff. I read these mails now.

The alias is not included to any release.
(Except PHP 4.3.0-pre1 ;)

--
Yasuo Ohgaki


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




Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c php_string.hstring.c

2002-10-18 Thread Andi Gutmans
This should follow naming standards and start with str_

Andi

At 03:27 AM 10/17/2002 +, Ilia Alshanetsky wrote:

iliaa   Wed Oct 16 23:27:19 2002 EDT

  Modified files:
/php4/ext/standard  basic_functions.c php_string.h string.c
  Log:
  Added word_count() function that allows counting of words inside a string.
  The function also allows the user to retrieve all the words from a string.


Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.528 
php4/ext/standard/basic_functions.c:1.529
--- php4/ext/standard/basic_functions.c:1.528   Sun Oct  6 13:04:10 2002
+++ php4/ext/standard/basic_functions.c Wed Oct 16 23:27:19 2002
 -17,7 +17,7 
+--+
  */

-/* $Id: basic_functions.c,v 1.528 2002/10/06 17:04:10 rasmus Exp $ */
+/* $Id: basic_functions.c,v 1.529 2002/10/17 03:27:19 iliaa Exp $ */

 #include php.h
 #include php_streams.h
 -334,6 +334,7 
PHP_FE(stristr, 
   NULL)
PHP_FE(strrchr, 
   NULL)
PHP_FE(str_shuffle, 
   NULL)
+   PHP_FE(word_count, 
 NULL)

 #ifdef HAVE_STRCOLL
PHP_FE(strcoll, 
   NULL)
Index: php4/ext/standard/php_string.h
diff -u php4/ext/standard/php_string.h:1.63 
php4/ext/standard/php_string.h:1.64
--- php4/ext/standard/php_string.h:1.63 Fri Oct 11 10:48:25 2002
+++ php4/ext/standard/php_string.h  Wed Oct 16 23:27:19 2002
 -17,7 +17,7 
+--+
 */

-/* $Id: php_string.h,v 1.63 2002/10/11 14:48:25 iliaa Exp $ */
+/* $Id: php_string.h,v 1.64 2002/10/17 03:27:19 iliaa Exp $ */

 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */

 -83,6 +83,7 
 PHP_FUNCTION(str_pad);
 PHP_FUNCTION(sscanf);
 PHP_FUNCTION(str_shuffle);
+PHP_FUNCTION(word_count);
 #ifdef HAVE_STRCOLL
 PHP_FUNCTION(strcoll);
 #endif
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.323 php4/ext/standard/string.c:1.324
--- php4/ext/standard/string.c:1.323Fri Oct 11 08:42:01 2002
+++ php4/ext/standard/string.c  Wed Oct 16 23:27:19 2002
 -18,7 +18,7 
+--+
  */

-/* $Id: string.c,v 1.323 2002/10/11 12:42:01 sander Exp $ */
+/* $Id: string.c,v 1.324 2002/10/17 03:27:19 iliaa Exp $ */

 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

 -4027,6 +4027,80 
 }
 /* }}} */

+/* {{{ proto void word_count(string str, [int format])
+   Counts the number of words inside a string. If format of 1 is 
specified,
+   then the function will return an array containing all the words
+   found inside the string. If format of 2 is specified, then the 
function
+   will return an associated array where the position of the word is 
the key
+   and the word itself is the value.
+
+   For the purpose of this function, 'word' is defined as a locale 
dependent
+   string containing alphabetic characters, which also may contain, 
but not start
+   with ' and - characters.
+*/
+PHP_FUNCTION(word_count)
+{
+   zval **str, **o_format;
+   char *s, *e, *p, *buf;
+   int word_count = 0;
+   int type = 0;
+   int n_args = ZEND_NUM_ARGS();
+
+   if( n_args  2 || n_args  1 || zend_get_parameters_ex(n_args, 
str, o_format) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+
+   if (n_args == 2) {
+   convert_to_long_ex(o_format);
+   type = Z_LVAL_PP(o_format);
+
+   if (type != 1  type != 2) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, The 
specified format parameter, '%d' is invalid., type);
+   RETURN_FALSE;
+   }
+   }
+
+   convert_to_string_ex(str);
+
+   p = s = Z_STRVAL_PP(str);
+   e = Z_STRVAL_PP(str) + Z_STRLEN_PP(str);
+
+   if (type == 1 || type == 2) {
+   array_init(return_value);
+   }
+
+   while (p  e) {
+   if (isalpha(*p++)) {
+   s = p - 1;
+   while (isalpha(*p) || *p == '\'' || (*p == '-'  
isalpha(*(p+1 {
+   p++;
+   }
+
+   switch (type)
+   {
+   case 1:
+   buf = estrndup(s, (p-s));
+ 
add_next_index_stringl(return_value, buf, (p-s), 1);
+   efree(buf);
+   break;
+   case 2:
+   buf = estrndup(s, (p-s));
+   

Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c php_string.h string.c

2002-10-18 Thread Jon Parise
On Fri, Oct 18, 2002 at 12:22:10AM +0200, Andi Gutmans wrote:

 This should follow naming standards and start with str_
 
We also ready have 'wordwrap'.  This adds 'word_count'.  You suggest 
staying with 'str_'.  I think, whatever is decided, we should commit 
to using one notation.

-- 
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)

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




[PHP-CVS] cvs: CVSROOT / avail

2002-10-18 Thread Andrei Zmievski
andrei  Thu Oct 17 10:49:24 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Adjust acl for vpopmail.
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.513 CVSROOT/avail:1.514
--- CVSROOT/avail:1.513 Thu Oct 17 03:51:08 2002
+++ CVSROOT/avail   Thu Oct 17 10:49:23 2002
 -133,7 +133,7 
 avail|tommay,vvtk|php4/ext/sysvsem
 avail|nyenyon,vvtk|php4/ext/sysvshm
 avail|vvtk|php4/ext/sysvipc
-avail|david,bbonev|php4/ext/vpopmail
+avail|david,bbonev|pear/PECL/vpopmail
 avail|atrak|php4/ext/yp
 avail|sr|php4/ext/zlib
 avail|sterling|php4/ext/zziplib



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




[PHP-CVS] cvs: php4 /ext/fribidi fribidi.c php_fribidi.h

2002-10-18 Thread Tal Peer
tal Thu Oct 17 14:04:43 2002 EDT

  Modified files:  
/php4/ext/fribidi   fribidi.c php_fribidi.h 
  Log:
  
  New functions:
  fribidi_get_charsets()
  fribidi_charset_info()
  - Added function fribidi_get_charsets() (Tal)
  - Added function fribidi_charset_info() (Tal)
  
  
Index: php4/ext/fribidi/fribidi.c
diff -u php4/ext/fribidi/fribidi.c:1.29 php4/ext/fribidi/fribidi.c:1.30
--- php4/ext/fribidi/fribidi.c:1.29 Thu Oct 10 00:26:03 2002
+++ php4/ext/fribidi/fribidi.c  Thu Oct 17 14:04:42 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: fribidi.c,v 1.29 2002/10/10 04:26:03 sniper Exp $ */
+/* $Id: fribidi.c,v 1.30 2002/10/17 18:04:42 tal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -43,7 +43,9 
 #endif
 
 function_entry fribidi_functions[] = {
-   PHP_FE(fribidi_log2vis, NULL)   
+   PHP_FE(fribidi_log2vis,  NULL)
+   PHP_FE(fribidi_charset_info, NULL)
+   PHP_FE(fribidi_get_charsets, NULL)
{NULL, NULL, NULL}
 };
 
 -244,6 +246,68 
 
RETVAL_STRING(out_string, 1);
efree(out_string);
+}
+/* }}} */
+
+/* {{{ proto array fribidi_charset_info(int charset)
+   Returns an array containing information about the specified charset */
+PHP_FUNCTION(fribidi_charset_info)
+{
+   long charset;
+   char *name, *title, *desc;
+   
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, charset) == 
+FAILURE) {
+   return;
+   }
+
+   array_init(return_value);
+
+   switch (charset) {
+   case FRIBIDI_CHARSET_UTF8:
+   case FRIBIDI_CHARSET_ISO8859_6:
+   case FRIBIDI_CHARSET_ISO8859_8:
+   case FRIBIDI_CHARSET_CP1255:
+   case FRIBIDI_CHARSET_CP1256:
+   case FRIBIDI_CHARSET_ISIRI_3342:
+   case FRIBIDI_CHARSET_CAP_RTL:
+   name  = fribidi_char_set_name(charset);
+   title = fribidi_char_set_title(charset);
+   desc  = fribidi_char_set_desc(charset);
+   
+   if (name == NULL) {
+   name = ;
+   }
+   if (title == NULL) {
+   title = ;
+   }
+   if (desc == NULL) {
+   desc = ;
+   }
+
+   add_assoc_string(return_value, name, name , 1);
+   add_assoc_string(return_value, title, title, 1);
+   add_assoc_string(return_value, desc, desc, 1);
+   break;
+   default:
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown charset);
+   RETURN_FALSE;
+   }
+}
+/* }}} */
+
+/* {{{ proto array fribidi_get_charsets()
+   Returns an array containing available charsets */
+PHP_FUNCTION(fribidi_get_charsets)
+{
+   array_init(return_value);
+
+   add_index_string(return_value, 0, FRIBIDI_CHARSET_UTF8, 1);
+   add_index_string(return_value, 1, FRIBIDI_CHARSET_8859_6, 1);
+   add_index_string(return_value, 2, FRIBIDI_CHARSET_8859_8, 1);
+   add_index_string(return_value, 3, FRIBIDI_CHARSET_CP1255, 1);
+   add_index_string(return_value, 4, FRIBIDI_CHARSET_CP1256, 1);
+   add_index_string(return_value, 5, FRIBIDI_CHARSET_ISIRI_3342, 1);
+   add_index_string(return_value, 6, FRIBIDI_CHARSET_CAP_RTL, 1);
 }
 /* }}} */
 
Index: php4/ext/fribidi/php_fribidi.h
diff -u php4/ext/fribidi/php_fribidi.h:1.10 php4/ext/fribidi/php_fribidi.h:1.11
--- php4/ext/fribidi/php_fribidi.h:1.10 Mon Sep 16 11:31:32 2002
+++ php4/ext/fribidi/php_fribidi.h  Thu Oct 17 14:04:43 2002
 -39,6 +39,8 
 PHP_MINFO_FUNCTION(fribidi);
 
 PHP_FUNCTION(fribidi_log2vis);
+PHP_FUNCTION(fribidi_charset_info);
+PHP_FUNCTION(fribidi_get_charsets);
 
 #ifdef ZTS
 #define FRIBIDIG(v) TSRMG(fribidi_globals_id, php_fribidi_globals *, v)



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




[PHP-CVS] cvs: php4 / apidoc.txt

2002-10-18 Thread Andrei Zmievski
andrei  Fri Oct 18 09:36:02 2002 EDT

  Removed files:   
/php4   apidoc.txt 
  Log:
  Remove deprecated apidoc.txt.
  
  



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




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

2002-10-18 Thread Wez Furlong
wez Fri Oct 18 12:55:48 2002 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  Improve file().
  Patch by Tal Peer [EMAIL PROTECTED]
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.270 php4/ext/standard/file.c:1.271
--- php4/ext/standard/file.c:1.270  Tue Oct 15 12:45:26 2002
+++ php4/ext/standard/file.cFri Oct 18 12:55:47 2002
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.270 2002/10/15 16:45:26 wez Exp $ */
+/* $Id: file.c,v 1.271 2002/10/18 16:55:47 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -463,7 +463,7 @@
int filename_len;
char *slashed, *target_buf;
register int i = 0;
-   int target_len, len;
+   int len;
char eol_marker = '\n';
zend_bool use_include_path = 0;
zend_bool reached_eof = 0;
@@ -486,47 +486,19 @@
array_init(return_value);
 
/* Now loop through the file and do the magic quotes thing if needed */
-   target_len = 0;
-   target_buf = NULL;
while (1) {
-   if (!target_buf) {
-   target_buf = (char *) emalloc(PHP_FILE_BUF_SIZE+1);
-   target_buf[PHP_FILE_BUF_SIZE] = 0; /* avoid overflows */
-   } else {
-   target_buf = (char *) erealloc(target_buf, 
target_len+PHP_FILE_BUF_SIZE+1);
-   target_buf[target_len+PHP_FILE_BUF_SIZE] = 0; /* avoid 
overflows */
-   }
-   if (php_stream_gets(stream, target_buf+target_len, 
PHP_FILE_BUF_SIZE)==NULL) {
-   if (target_len==0) {
-   efree(target_buf);
-   break;
-   } else {
-   reached_eof = 1;
-   }
+   target_buf = php_stream_gets(stream, NULL, 0);
+   if (target_buf == NULL) {
+   break;
}

-   /* mini-hack because I don't feel like re-writing this whole function 
*/
-   if (stream-flags  PHP_STREAM_FLAG_EOL_MAC)
-   eol_marker = '\r';
-   
-   if (!reached_eof) {
-   target_len += strlen(target_buf+target_len);
-   if (target_buf[target_len-1] != eol_marker) {
-   continue;
-   }
-   }
if (PG(magic_quotes_runtime)) {
-   slashed = php_addslashes(target_buf, target_len, len, 1 
TSRMLS_CC); /* 1 = free source string */
-   add_index_stringl(return_value, i++, slashed, len, 0);
+   /* 1 = free source string */
+   slashed = php_addslashes(target_buf, strlen(target_buf), len, 
+1 TSRMLS_CC);
+   add_next_index_stringl(return_value, slashed, len, 0);
} else {
-   target_buf = erealloc(target_buf, target_len+1); /* do we 
really want to do that? */
-   add_index_stringl(return_value, i++, target_buf, target_len, 
0);
-   }
-   if (reached_eof) {
-   break;
+   add_next_index_string(return_value, target_buf, 0);
}
-   target_buf = NULL;
-   target_len = 0;
}
php_stream_close(stream);
 }



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




Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h streams.c

2002-10-18 Thread Ilia A.
On October 18, 2002 05:04 pm, Rasmus Lerdorf wrote:
  On October 18, 2002 04:40 pm, Rasmus Lerdorf wrote:
  Fixed bug #19971 (optimized the file() function).
  The file() function is now also binary safe.
  
   That's a bit misleading.  By definition file() cannot be binary-safe in
   that \n is treated specially.
 
  Not quite, in the old code (4.2.3) doing a file() would produce a wildly
  inaccurate count of lines. For example, a php executable was only 2200
  lines, while 'wc -l' and manual checks using C yielded a result of 9800
  lines. In my mind that meant that the old code was un-safe to use on
  binary files. The new code works properly and breaks down the file by
  lines accurately.
 
  Ilia
 
  P.S. Thanks to Wez  Sascha we also support MAC EOL in 4.3.0, so we don't
  look for \n specifically per say.

 My point is that the original data is munged once it goes through the
 file() function.  In that sense it is not binary safe as there is no
 way to restore the original data.

Unless the user actually goes and modifies the data, it is very easy to 
restore the original file back. The example script below will demonstrate 
that the output of file() can still be safely restored.

?php
echo md5_file(sapi/cli/php).\n;
echo md5(implode(, file(sapi/cli/php))).\n;
?

Both of the md5s are identical, meaning that the file() call itself did 
nothing that would corrupt the file preventing the the user from restoring 
file. IMHO that means that the function is binary safe.

Ilia

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




Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.h streams.c

2002-10-18 Thread Ilia A.
On October 18, 2002 04:40 pm, Rasmus Lerdorf wrote:
Fixed bug #19971 (optimized the file() function).
The file() function is now also binary safe.

 That's a bit misleading.  By definition file() cannot be binary-safe in
 that \n is treated specially.

Not quite, in the old code (4.2.3) doing a file() would produce a wildly 
inaccurate count of lines. For example, a php executable was only 2200 lines, 
while 'wc -l' and manual checks using C yielded a result of 9800 lines. In my 
mind that meant that the old code was un-safe to use on binary files.
The new code works properly and breaks down the file by lines accurately. 

Ilia

P.S. Thanks to Wez  Sascha we also support MAC EOL in 4.3.0, so we don't look 
for \n specifically per say. 


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




Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
 On October 18, 2002 04:40 pm, Rasmus Lerdorf wrote:
 Fixed bug #19971 (optimized the file() function).
 The file() function is now also binary safe.
 
  That's a bit misleading.  By definition file() cannot be binary-safe in
  that \n is treated specially.

 Not quite, in the old code (4.2.3) doing a file() would produce a wildly
 inaccurate count of lines. For example, a php executable was only 2200 lines,
 while 'wc -l' and manual checks using C yielded a result of 9800 lines. In my
 mind that meant that the old code was un-safe to use on binary files.
 The new code works properly and breaks down the file by lines accurately.

 Ilia

 P.S. Thanks to Wez  Sascha we also support MAC EOL in 4.3.0, so we don't look
 for \n specifically per say.

My point is that the original data is munged once it goes through the
file() function.  In that sense it is not binary safe as there is no
way to restore the original data.  I agree that the new approach is more
consistent, I just want to make sure that this isn't misinterpreted in
some way as to someone documenting that this function is now binary-clean.

-Rasmus


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




Re: [PHP-CVS] cvs: php4 /ext/standard file.c /main php_streams.hstreams.c

2002-10-18 Thread Rasmus Lerdorf
  But EOL is not always \n and it can be a mix of \r\n \n or \r.  You have
  no way of knowing which eol caused the break for any particular line.  In
  that sense file() is irreversible.

 Why would I care about that, the EOL are not stripped by file(), so I do not
 need to know EOLs when assembling the file back. As long as I assemble the
 number of lines equal to the number of lines read, I will get the same file.

Ah, you are right.  You have fixed this now.  I just tested your code.  In
the past something like:

$a = file('abc');
$fp = fopen(abc.new,w);
foreach($a as $l) {
fwrite($fp, $l);
}
fclose($fp);

Would create an abc.new file that was different from abc.

-Rasmus


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




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

2002-10-18 Thread Ilia Alshanetsky
iliaa   Fri Oct 18 19:54:58 2002 EDT

  Modified files:  
/php4/ext/standard  url.c 
  Log:
  Added handling for file:/ schema, which does not contain a host.
  
  
Index: php4/ext/standard/url.c
diff -u php4/ext/standard/url.c:1.56 php4/ext/standard/url.c:1.57
--- php4/ext/standard/url.c:1.56Thu Oct 17 09:59:55 2002
+++ php4/ext/standard/url.c Fri Oct 18 19:54:58 2002
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: url.c,v 1.56 2002/10/17 13:59:55 iliaa Exp $ */
+/* $Id: url.c,v 1.57 2002/10/18 23:54:58 iliaa Exp $ */
 
 #include stdlib.h
 #include string.h
@@ -101,7 +101,10 @@
if (*(e+2) == '/') {
s = e + 3;
} else {
-   s = e + 2;
+   s = e + 1;
+   if (!strncasecmp(file, ret-scheme, sizeof(file))) {
+   goto nohost;
+   }   
}   
} else if (e) { /* no scheme, look for port */
p = e + 1;
@@ -185,6 +188,8 @@
}

s = e;
+   
+   nohost:

if ((p = strchr(s, '?'))) {
pp = strchr(s, '#');



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




[PHP-CVS] cvs: CVSROOT / avail

2002-10-18 Thread Rasmus Lerdorf
rasmus  Fri Oct 18 21:27:53 2002 EDT

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



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




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

2002-10-18 Thread Jani Taskinen
sniper  Fri Oct 18 18:08:23 2002 EDT

  Modified files:  
/php4/ext/standard  dns.c 
  Log:
  ws fixes
  
  
Index: php4/ext/standard/dns.c
diff -u php4/ext/standard/dns.c:1.43 php4/ext/standard/dns.c:1.44
--- php4/ext/standard/dns.c:1.43Thu Sep  5 10:21:55 2002
+++ php4/ext/standard/dns.c Fri Oct 18 18:08:23 2002
 -16,21 +16,24 
+--+
  */
 
-/* $Id: dns.c,v 1.43 2002/09/05 14:21:55 hyanantha Exp $ */
+/* $Id: dns.c,v 1.44 2002/10/18 22:08:23 sniper Exp $ */
 
 /* {{{ includes
  */
+
 #include php.h
+
 #if HAVE_SYS_SOCKET_H
 #include sys/socket.h
 #endif
+
 #ifdef PHP_WIN32
 #if HAVE_LIBBIND
 #ifndef WINNT
 #define WINNT 1
 #endif
 /* located in www.php.net/extra/bindlib.zip */
-#if HAVE_ARPA_INET_H
+#if HAVE_ARPA_INET_H 
 #include arpa/inet.h
 #endif
 #include netdb.h
 -40,7 +43,7 
 #if HAVE_RESOLV_H
 #include resolv.h
 #endif
-#endif
+#endif /* HAVE_LIBBIND */
 #include winsock.h
 #else  /* This holds good for NetWare too, both for Winsock and Berkeley sockets */
 #include netinet/in.h
 -220,38 +223,44 
u_char ans[MAXPACKET];

switch (ZEND_NUM_ARGS()) {
-   case 1:
-   if (zend_get_parameters_ex(1, arg1) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-   type = T_MX;
-   convert_to_string_ex(arg1);
-   break;
-   case 2:
-   if (zend_get_parameters_ex(2, arg1, arg2) == FAILURE) {
+   case 1:
+   if (zend_get_parameters_ex(1, arg1) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   type = T_MX;
+   convert_to_string_ex(arg1);
+   break;
+
+   case 2:
+   if (zend_get_parameters_ex(2, arg1, arg2) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   convert_to_string_ex(arg1);
+   convert_to_string_ex(arg2);
+
+   if (!strcasecmp(A, Z_STRVAL_PP(arg2))) type = T_A;
+   else if (!strcasecmp(NS,Z_STRVAL_PP(arg2))) type = T_NS;
+   else if (!strcasecmp(MX,Z_STRVAL_PP(arg2))) type = T_MX;
+   else if (!strcasecmp(PTR,   Z_STRVAL_PP(arg2))) type = T_PTR;
+   else if (!strcasecmp(ANY,   Z_STRVAL_PP(arg2))) type = T_ANY;
+   else if (!strcasecmp(SOA,   Z_STRVAL_PP(arg2))) type = T_SOA;
+   else if (!strcasecmp(CNAME, Z_STRVAL_PP(arg2))) type = 
+T_CNAME;
+   else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Type '%s' 
+not supported, Z_STRVAL_PP(arg2));
+   RETURN_FALSE;
+   }
+   break;
+
+   default:
WRONG_PARAM_COUNT;
-   }
-   convert_to_string_ex(arg1);
-   convert_to_string_ex(arg2);
-   if ( !strcasecmp(A, Z_STRVAL_PP(arg2)) ) type = T_A;
-   else if ( !strcasecmp(NS, Z_STRVAL_PP(arg2)) ) type = T_NS;
-   else if ( !strcasecmp(MX, Z_STRVAL_PP(arg2)) ) type = T_MX;
-   else if ( !strcasecmp(PTR, Z_STRVAL_PP(arg2)) ) type = T_PTR;
-   else if ( !strcasecmp(ANY, Z_STRVAL_PP(arg2)) ) type = T_ANY;
-   else if ( !strcasecmp(SOA, Z_STRVAL_PP(arg2)) ) type = T_SOA;
-   else if ( !strcasecmp(CNAME, Z_STRVAL_PP(arg2)) ) type = T_CNAME;
-   else {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Type '%s' not 
supported, Z_STRVAL_PP(arg2));
-   RETURN_FALSE;
-   }
-   break;
-   default:
-   WRONG_PARAM_COUNT;
}
+
i = res_search(Z_STRVAL_PP(arg1), C_IN, type, ans, sizeof(ans));
-   if ( i  0 ) {
+
+   if (i  0) {
RETURN_FALSE;
}
+
RETURN_TRUE;
 }
 /* }}} */
 -283,65 +292,69 
int i;
 
switch(ZEND_NUM_ARGS()) {
-   case 2:
-   if (zend_get_parameters(ht, 2, host, mx_list) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-break;
-case 3:
-   if (zend_get_parameters(ht, 3, host, mx_list, weight_list) == 
FAILURE) {
+   case 2:
+   if (zend_get_parameters(ht, 2, host, mx_list) == FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   break;
+
+   case 3:
+   if (zend_get_parameters(ht, 3, host, mx_list, weight_list) 
+== FAILURE) {
+   WRONG_PARAM_COUNT;
+   }
+   need_weight = 1;
+