[PHP-CVS] cvs: php4 / NEWS

2002-09-28 Thread Markus Fischer

mfischerSat Sep 28 04:56:33 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - Don't forget whom to blame ... ;)
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1145 php4/NEWS:1.1146
--- php4/NEWS:1.1145Fri Sep 27 20:34:07 2002
+++ php4/NEWS   Sat Sep 28 04:56:33 2002
 -3,7 +3,7 
 ? ? ??? 2002, Version 4.3.0
 - Added stream_select() which works like socket_select but only works on
   streams returned by fopen(), fsockopen() and pfsockopen(). (Wez)
-- Fixed bug #19595 (Missing functions for GD2 format handling).
+- Fixed bug #19595 (Missing functions for GD2 format handling). (Edin)
 - Fix for bug #19633 (wrong directories in ext/ldap/config.m4). (Derick)
 - Fixed bugs #17274 and #19627 (segfault in sem_remove). (Wez)
 - Fixed bug #18022 (fopen does not work with php://stdin anymore on Solaris).



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




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

2002-09-28 Thread Yasuo Ohgaki

yohgaki Sat Sep 28 05:14:46 2002 EDT

  Modified files:  
/php4/ext/standard  dir.c 
  Log:
  It must be GLOB_NOCHECK instead of GLOB_NOMATCH. 
  GLOB_NOMATCH does not make sense at all.
  
  
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.105 php4/ext/standard/dir.c:1.106
--- php4/ext/standard/dir.c:1.105   Fri Sep 27 09:15:56 2002
+++ php4/ext/standard/dir.c Sat Sep 28 05:14:45 2002
 -16,7 +16,7 
+--+
  */
 
-/* $Id: dir.c,v 1.105 2002/09/27 13:15:56 sniper Exp $ */
+/* $Id: dir.c,v 1.106 2002/09/28 09:14:45 yohgaki Exp $ */
 
 /* {{{ includes/startup/misc */
 
 -138,7 +138,7 
REGISTER_LONG_CONSTANT(GLOB_NOSORT, GLOB_NOSORT, CONST_CS | 
CONST_PERSISTENT);
 #endif
 #ifdef GLOB_NOCHECK
-   REGISTER_LONG_CONSTANT(GLOB_NOMATCH, GLOB_NOCHECK, CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(GLOB_NOCHECK, GLOB_NOCHECK, CONST_CS | 
+CONST_PERSISTENT);
 #endif
 #ifdef GLOB_NOESCAPE
REGISTER_LONG_CONSTANT(GLOB_NOESCAPE, GLOB_NOESCAPE, CONST_CS | 
CONST_PERSISTENT);



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




[PHP-CVS] cvs: php4 / NEWS

2002-09-28 Thread Derick Rethans

derick  Sat Sep 28 05:14:59 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - Consistency
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1146 php4/NEWS:1.1147
--- php4/NEWS:1.1146Sat Sep 28 04:56:33 2002
+++ php4/NEWS   Sat Sep 28 05:14:59 2002
 -4,7 +4,7 
 - Added stream_select() which works like socket_select but only works on
   streams returned by fopen(), fsockopen() and pfsockopen(). (Wez)
 - Fixed bug #19595 (Missing functions for GD2 format handling). (Edin)
-- Fix for bug #19633 (wrong directories in ext/ldap/config.m4). (Derick)
+- Fixed bug #19633 (Wrong directories in ext/ldap/config.m4). (Derick)
 - Fixed bugs #17274 and #19627 (segfault in sem_remove). (Wez)
 - Fixed bug #18022 (fopen does not work with php://stdin anymore on Solaris).
   (Wez)



-- 
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-09-28 Thread Wez Furlong

wez Sat Sep 28 09:04:48 2002 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  Add missing folding marker.
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.264 php4/ext/standard/file.c:1.265
--- php4/ext/standard/file.c:1.264  Fri Sep 27 19:42:38 2002
+++ php4/ext/standard/file.cSat Sep 28 09:04:47 2002
 -21,7 +21,7 
+--+
  */
 
-/* $Id: file.c,v 1.264 2002/09/27 23:42:38 wez Exp $ */
+/* $Id: file.c,v 1.265 2002/09/28 13:04:47 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
 -761,6 +761,7 
 
RETURN_LONG(retval);
 }
+/* }}} */
 
 
 /* {{{ stream_context related functions */



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




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

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 09:05:48 2002 EDT

  Modified files:  
/php4/main  php_streams.h streams.c user_streams.c 
  Log:
  Allow user streams/wrappers to implement fstat(), opendir() and stat().
  
  

Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.49 php4/main/php_streams.h:1.50
--- php4/main/php_streams.h:1.49Thu Sep 26 06:14:41 2002
+++ php4/main/php_streams.h Sat Sep 28 09:05:47 2002
 -514,7 +514,9 
 
 /* for user-space streams */
 PHPAPI extern php_stream_ops php_stream_userspace_ops;
+PHPAPI extern php_stream_ops php_stream_userspace_dir_ops;
 #define PHP_STREAM_IS_USERSPACEphp_stream_userspace_ops
+#define PHP_STREAM_IS_USERSPACE_DIRphp_stream_userspace_dir_ops
 
 PHPAPI void php_stream_context_free(php_stream_context *context);
 PHPAPI php_stream_context *php_stream_context_alloc(void);
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.84 php4/main/streams.c:1.85
--- php4/main/streams.c:1.84Thu Sep 26 12:22:28 2002
+++ php4/main/streams.c Sat Sep 28 09:05:47 2002
 -20,7 +20,7 
+--+
  */
 
-/* $Id: streams.c,v 1.84 2002/09/26 16:22:28 wez Exp $ */
+/* $Id: streams.c,v 1.85 2002/09/28 13:05:47 wez Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
 -133,6 +133,72 
return PHP_STREAM_PERSISTENT_NOT_EXIST;
 }
 
+static void display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, 
+const char *caption TSRMLS_DC)
+{
+   char *tmp = estrdup(path);
+   char *msg;
+   int free_msg = 0;
+
+   if (wrapper) {
+   if (wrapper-err_count  0) {
+   int i;
+   size_t l;
+   int brlen;
+   char *br;
+
+   if (PG(html_errors)) {
+   brlen = 7;
+   br = br /\n;
+   } else {
+   brlen = 1;
+   br = \n;
+   }
+
+   for (i = 0, l = 0; i  wrapper-err_count; i++) {
+   l += strlen(wrapper-err_stack[i]);
+   if (i  wrapper-err_count - 1)
+   l += brlen;
+   }
+   msg = emalloc(l + 1);
+   msg[0] = '\0';
+   for (i = 0; i  wrapper-err_count; i++) {
+   strcat(msg, wrapper-err_stack[i]);
+   if (i  wrapper-err_count - 1)
+   strcat(msg, br);
+   }
+
+   free_msg = 1;
+   } else {
+   msg = strerror(errno);
+   }
+   } else {
+   msg = no suitable wrapper could be found;
+   }
+
+   php_strip_url_passwd(tmp);
+   php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, %s: %s, caption, msg);
+   efree(tmp);
+   if (free_msg)
+   efree(msg);
+}
+
+static void tidy_wrapper_error_log(php_stream_wrapper *wrapper TSRMLS_DC)
+{
+   if (wrapper) {
+   /* tidy up the error stack */
+   int i;
+
+   for (i = 0; i  wrapper-err_count; i++)
+   efree(wrapper-err_stack[i]);
+   if (wrapper-err_stack)
+   efree(wrapper-err_stack);
+   wrapper-err_stack = NULL;
+   wrapper-err_count = 0;
+   }
+}
+
+
+
 /* allocate a new stream for a particular ops */
 PHPAPI php_stream *_php_stream_alloc(php_stream_ops *ops, void *abstract, const char 
*persistent_id, const char *mode STREAMS_DC TSRMLS_DC) /* {{{ */
 {
 -1858,28 +1924,21 
 
if (wrapper  wrapper-wops-dir_opener)   {
stream = wrapper-wops-dir_opener(wrapper,
-   path_to_open, r, options, NULL,
+   path_to_open, r, options ^ REPORT_ERRORS, NULL,
context STREAMS_REL_CC TSRMLS_CC);
 
if (stream) {
stream-wrapper = wrapper;
stream-flags |= PHP_STREAM_FLAG_NO_BUFFER;
}
+   } else if (wrapper) {
+   php_stream_wrapper_log_error(wrapper, options ^ REPORT_ERRORS 
+TSRMLS_CC, not implemented);
}
-
if (stream == NULL  (options  REPORT_ERRORS)) {
-   char *tmp = estrdup(path);
-   char *msg;
-
-   if (wrapper)
-   msg = strerror(errno);
-   else
-   msg = no suitable wrapper could be found;
-   
-   php_strip_url_passwd(tmp);
-   php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, %s, msg);
-   efree(tmp);
+   display_wrapper_errors(wrapper, path, failed to open dir TSRMLS_CC);

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

2002-09-28 Thread Marcus Börger

helly   Sat Sep 28 09:59:17 2002 EDT

  Modified files:  
/php4/ext/iconv/tests   002.phpt 
  Log:
  Synch with README.TESTING
  
  
Index: php4/ext/iconv/tests/002.phpt
diff -u php4/ext/iconv/tests/002.phpt:1.2 php4/ext/iconv/tests/002.phpt:1.3
--- php4/ext/iconv/tests/002.phpt:1.2   Sat Mar  2 02:00:39 2002
+++ php4/ext/iconv/tests/002.phpt   Sat Sep 28 09:59:17 2002
 -2,8 +2,6 
 UCS4BE to ASCII
 --SKIPIF--
 ?php include('skipif.inc'); ?
---POST--
---GET--
 --FILE--
 ?php include('002.inc'); ?
 --EXPECT--



-- 
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-09-28 Thread James Moore

jmoore  Sat Sep 28 11:37:21 2002 EDT

  Modified files:  
/php4/ext/fribidi   fribidi.c 
  Log:
  Make ext/fribidi compile against latest fribidi CVS
  
  
Index: php4/ext/fribidi/fribidi.c
diff -u php4/ext/fribidi/fribidi.c:1.25 php4/ext/fribidi/fribidi.c:1.26
--- php4/ext/fribidi/fribidi.c:1.25 Thu Sep 26 08:58:31 2002
+++ php4/ext/fribidi/fribidi.c  Sat Sep 28 11:37:21 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: fribidi.c,v 1.25 2002/09/26 12:58:31 tal Exp $ */
+/* $Id: fribidi.c,v 1.26 2002/09/28 15:37:21 jmoore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -30,6 +30,19 
 
 #include ext/standard/info.h
 #include fribidi/fribidi.h
+
+/* The fribidi guys dont believe in BC */
+#ifndef FRIBIDI_CHARSET_NOT_FOUND
+
+#define FRIBIDI_CHARSET_UTF8FRIBIDI_CHAR_SET_UTF8
+#define FRIBIDI_CHARSET_ISO8859_6   FRIBIDI_CHAR_SET_ISO8859_6
+#define FRIBIDI_CHARSET_ISO8859_8   FRIBIDI_CHAR_SET_ISO8859_8
+#define FRIBIDI_CHARSET_CP1255  FRIBIDI_CHAR_SET_CP1255
+#define FRIBIDI_CHARSET_CP1256  FRIBIDI_CHAR_SET_CP1256
+#define FRIBIDI_CHARSET_ISIRI_3342  FRIBIDI_CHAR_SET_ISIRI_3342
+#define FRIBIDI_CHARSET_CAP_RTL FRIBIDI_CHAR_SET_CAP_RTL
+
+#endif
 
 function_entry fribidi_functions[] = {
PHP_FE(fribidi_log2vis, NULL)   



-- 
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-09-28 Thread Tal Peer

tal Sat Sep 28 11:41:57 2002 EDT

  Modified files:  
/php4/ext/fribidi   fribidi.c 
  Log:
  
  - Eliminated LFs
  
  
Index: php4/ext/fribidi/fribidi.c
diff -u php4/ext/fribidi/fribidi.c:1.26 php4/ext/fribidi/fribidi.c:1.27
--- php4/ext/fribidi/fribidi.c:1.26 Sat Sep 28 11:37:21 2002
+++ php4/ext/fribidi/fribidi.c  Sat Sep 28 11:41:57 2002
 -17,7 +17,7 
+--+
  */
 
-/* $Id: fribidi.c,v 1.26 2002/09/28 15:37:21 jmoore Exp $ */
+/* $Id: fribidi.c,v 1.27 2002/09/28 15:41:57 tal Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 -30,19 +30,19 
 
 #include ext/standard/info.h
 #include fribidi/fribidi.h
-
-/* The fribidi guys dont believe in BC */
-#ifndef FRIBIDI_CHARSET_NOT_FOUND
-
-#define FRIBIDI_CHARSET_UTF8FRIBIDI_CHAR_SET_UTF8
-#define FRIBIDI_CHARSET_ISO8859_6   FRIBIDI_CHAR_SET_ISO8859_6
-#define FRIBIDI_CHARSET_ISO8859_8   FRIBIDI_CHAR_SET_ISO8859_8
-#define FRIBIDI_CHARSET_CP1255  FRIBIDI_CHAR_SET_CP1255
-#define FRIBIDI_CHARSET_CP1256  FRIBIDI_CHAR_SET_CP1256
-#define FRIBIDI_CHARSET_ISIRI_3342  FRIBIDI_CHAR_SET_ISIRI_3342
-#define FRIBIDI_CHARSET_CAP_RTL FRIBIDI_CHAR_SET_CAP_RTL
-
-#endif
+
+/* The fribidi guys dont believe in BC */
+#ifndef FRIBIDI_CHARSET_NOT_FOUND
+
+#define FRIBIDI_CHARSET_UTF8FRIBIDI_CHAR_SET_UTF8
+#define FRIBIDI_CHARSET_ISO8859_6   FRIBIDI_CHAR_SET_ISO8859_6
+#define FRIBIDI_CHARSET_ISO8859_8   FRIBIDI_CHAR_SET_ISO8859_8
+#define FRIBIDI_CHARSET_CP1255  FRIBIDI_CHAR_SET_CP1255
+#define FRIBIDI_CHARSET_CP1256  FRIBIDI_CHAR_SET_CP1256
+#define FRIBIDI_CHARSET_ISIRI_3342  FRIBIDI_CHAR_SET_ISIRI_3342
+#define FRIBIDI_CHARSET_CAP_RTL FRIBIDI_CHAR_SET_CAP_RTL
+
+#endif
 
 function_entry fribidi_functions[] = {
PHP_FE(fribidi_log2vis, NULL)   



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




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

2002-09-28 Thread Rasmus Lerdorf

rasmus  Sat Sep 28 12:10:43 2002 EDT

  Modified files:  
/php4/main  fopen_wrappers.c 
  Log:
  Probable fix for bug #19292
  
  
Index: php4/main/fopen_wrappers.c
diff -u php4/main/fopen_wrappers.c:1.148 php4/main/fopen_wrappers.c:1.149
--- php4/main/fopen_wrappers.c:1.148Sun Sep 22 14:30:38 2002
+++ php4/main/fopen_wrappers.c  Sat Sep 28 12:10:43 2002
@@ -16,7 +16,7 @@
|  Jim Winstead [EMAIL PROTECTED] |
+--+
  */
-/* $Id: fopen_wrappers.c,v 1.148 2002/09/22 18:30:38 iliaa Exp $ */
+/* $Id: fopen_wrappers.c,v 1.149 2002/09/28 16:10:43 rasmus Exp $ */
 
 /* {{{ includes
  */
@@ -199,8 +199,8 @@
  */
 PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
 {
-   /* Only check when safe_mode on and safe_mode_include_dir is available */
-   if (PG(safe_mode)  PG(safe_mode_include_dir) 
+   /* Only check when safe_mode or open_basedir is on and safe_mode_include_dir 
+is available */
+   if (((PG(open_basedir)  *PG(open_basedir)) || PG(safe_mode))  
+PG(safe_mode_include_dir) 
*PG(safe_mode_include_dir))
{
char *pathbuf;



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




[PHP-CVS] cvs: php4(PHP_4_2_0) /main fopen_wrappers.c

2002-09-28 Thread Rasmus Lerdorf

rasmus  Sat Sep 28 12:27:53 2002 EDT

  Modified files:  (Branch: PHP_4_2_0)
/php4/main  fopen_wrappers.c 
  Log:
  MFH fix for bug 19292
  
  
Index: php4/main/fopen_wrappers.c
diff -u php4/main/fopen_wrappers.c:1.142.2.3 php4/main/fopen_wrappers.c:1.142.2.4
--- php4/main/fopen_wrappers.c:1.142.2.3Fri Aug 23 04:00:49 2002
+++ php4/main/fopen_wrappers.c  Sat Sep 28 12:27:53 2002
@@ -16,7 +16,7 @@
|  Jim Winstead [EMAIL PROTECTED] |
+--+
  */
-/* $Id: fopen_wrappers.c,v 1.142.2.3 2002/08/23 08:00:49 zeev Exp $ */
+/* $Id: fopen_wrappers.c,v 1.142.2.4 2002/09/28 16:27:53 rasmus Exp $ */
 
 /* {{{ includes
  */
@@ -226,8 +226,8 @@
 PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
 {
/* Only check when safe_mode on and safe_mode_include_dir is available */
-   if (PG(safe_mode)  PG(safe_mode_include_dir) 
-   *PG(safe_mode_include_dir))
+   if (((PG(open_basedir)  *PG(open_basedir)) || PG(safe_mode)) 
+PG(safe_mode_include_dir)  *PG(safe_mode_include_dir))
{
char *pathbuf;
char *ptr;
@@ -268,7 +268,7 @@
}
 
/* Nothing to check... */
-   return -1;
+   return 0;
 }
 /* }}} */
 



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




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

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 13:03:02 2002 EDT

  Modified files:  
/php4/ext/ncurses   ncurses_functions.c 
  Log:
  Fix crash bug and return value.
  
  
Index: php4/ext/ncurses/ncurses_functions.c
diff -u php4/ext/ncurses/ncurses_functions.c:1.21 
php4/ext/ncurses/ncurses_functions.c:1.22
--- php4/ext/ncurses/ncurses_functions.c:1.21   Fri Sep 27 18:33:14 2002
+++ php4/ext/ncurses/ncurses_functions.cSat Sep 28 13:03:02 2002
 -1642,7 +1642,7 
 }
 /* }}} */
 
-/* {{{ proto int ncurses_mousemask(int newmask, int oldmask)
+/* {{{ proto int ncurses_mousemask(int newmask, int oldmask)
Returns and sets mouse options */
 PHP_FUNCTION(ncurses_mousemask)
 {
 -1669,13 +1669,13 
Reads mouse event from queue */
 PHP_FUNCTION(ncurses_getmouse)
 {
-  zval **arg;
+   zval **arg;
MEVENT mevent;
ulong retval;
 
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE){
WRONG_PARAM_COUNT;
-  }
+   }
 
pval_destructor(*arg);
array_init(*arg);
 -1688,7 +1688,7 
add_assoc_long(*arg, z, mevent.z);
add_assoc_long(*arg, mmask, mevent.bstate);
 
-   RETURN_BOOL(retval);
+   RETURN_BOOL(retval == 0);
 }
 /* }}} */
 
 -1775,9 +1775,9 
int nx, ny, retval;
WINDOW **win;
 
-   if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, y, x, toscreen) == 
FAILURE){
+   if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, handle, y, x, 
+toscreen) == FAILURE){
WRONG_PARAM_COUNT;
-  }
+   }
 
FETCH_WINRES(win, handle);
 
 -1788,10 +1788,10 
ny = Z_LVAL_PP(y);
nx = Z_LVAL_PP(x);
 
- retval = wmouse_trafo (*win, ny, nx, Z_LVAL_PP(toscreen));
+   retval = wmouse_trafo (*win, ny, nx, Z_LVAL_PP(toscreen));
 
- Z_LVAL_PP(y) = ny;
- Z_LVAL_PP(x) = nx;
+   Z_LVAL_PP(y) = ny;
+   Z_LVAL_PP(x) = nx;
 
RETURN_BOOL(retval);
 }



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




[PHP-CVS] cvs: php4 /ext/mnogosearch CREDITS php_mnogo.c

2002-09-28 Thread Sergey Kartashoff

gluke   Sat Sep 28 13:52:06 2002 EDT

  Modified files:  
/php4/ext/mnogosearch   CREDITS php_mnogo.c 
  Log:
  - Site mirror detection and popularity rank has been added to mnogosearch
extension
  
  
Index: php4/ext/mnogosearch/CREDITS
diff -u php4/ext/mnogosearch/CREDITS:1.1 php4/ext/mnogosearch/CREDITS:1.2
--- php4/ext/mnogosearch/CREDITS:1.1Thu Feb  8 05:14:56 2001
+++ php4/ext/mnogosearch/CREDITSSat Sep 28 13:52:06 2002
 -1,2 +1,2 
 mnoGoSearch
-Alex Barkov, Ramil Kalimullin, Sergey Kartashoff
+Sergey Kartashoff, Alex Barkov, Ramil Kalimullin
Index: php4/ext/mnogosearch/php_mnogo.c
diff -u php4/ext/mnogosearch/php_mnogo.c:1.65 php4/ext/mnogosearch/php_mnogo.c:1.66
--- php4/ext/mnogosearch/php_mnogo.c:1.65   Sat Sep  7 10:19:51 2002
+++ php4/ext/mnogosearch/php_mnogo.cSat Sep 28 13:52:06 2002
 -1,5 +1,5 
 /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */
-/* $Id: php_mnogo.c,v 1.65 2002/09/07 14:19:51 gluke Exp $ */
+/* $Id: php_mnogo.c,v 1.66 2002/09/28 17:52:06 gluke Exp $ */
 
 /*
+--+
 -52,6 +52,8 
 #define UDM_FIELD_LANG 14
 #define UDM_FIELD_CHARSET  15
 #define UDM_FIELD_SITEID   16
+#define UDM_FIELD_POP_RANK 17
+#define UDM_FIELD_ORIGINID 18
 
 /* udm_set_agent_param constants */
 #define UDM_PARAM_PAGE_SIZE1
 -82,6 +84,7 
 #define UDM_PARAM_STORED   26
 #define UDM_PARAM_GROUPBYSITE  27
 #define UDM_PARAM_SITEID   28
+#define UDM_PARAM_DETECT_CLONES29
 
 /* udm_add_search_limit constants */
 #define UDM_LIMIT_URL  1
 -260,6 +263,8 
REGISTER_LONG_CONSTANT(UDM_FIELD_LANG,UDM_FIELD_LANG,CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(UDM_FIELD_CHARSET, UDM_FIELD_CHARSET,CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(UDM_FIELD_SITEID,  UDM_FIELD_SITEID,CONST_CS | 
CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(UDM_FIELD_POP_RANK,UDM_FIELD_POP_RANK,CONST_CS | 
+CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(UDM_FIELD_ORIGINID,UDM_FIELD_ORIGINID,CONST_CS | 
+CONST_PERSISTENT);
 
/* udm_set_agent_param constants */
REGISTER_LONG_CONSTANT(UDM_PARAM_PAGE_SIZE,   UDM_PARAM_PAGE_SIZE,CONST_CS | 
CONST_PERSISTENT);
 -310,6 +315,7 
REGISTER_LONG_CONSTANT(UDM_PARAM_REMOTE_ADDR, UDM_PARAM_REMOTE_ADDR,CONST_CS 
| CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(UDM_PARAM_QUERY,   UDM_PARAM_QUERY,CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(UDM_PARAM_SITEID,  UDM_PARAM_SITEID,CONST_CS | 
CONST_PERSISTENT);
+   
+REGISTER_LONG_CONSTANT(UDM_PARAM_DETECT_CLONES,UDM_PARAM_DETECT_CLONES,CONST_CS | 
+CONST_PERSISTENT);

/* udm_add_search_limit constants */
REGISTER_LONG_CONSTANT(UDM_LIMIT_CAT, UDM_LIMIT_CAT,CONST_CS | 
CONST_PERSISTENT);
 -450,12 +456,13 

UdmVarListReplaceStr(Env-Vars,SyslogFacility,local7);
UdmSetLogLevel(Env,0);
UdmOpenLog(mnoGoSearch-php,Env,0);
-   
+
if(!memcmp(dbaddr,searchd:,8)){
UDM_URL Url;
UdmURLParse(Url,dbaddr);
UdmDBListAdd(Env-sdcl,Url.hostinfo);
}
+   
UdmVarListReplaceStr(Env-Vars,DBAddr,dbaddr);

if(UDM_OK!=UdmDBSetAddr(Env-db,dbaddr,UDM_OPEN_MODE_READ)){
sprintf(Env-errstr,Invalid DBAddr: '%s',dbaddr);
 -463,6 +470,7 
php_error(E_WARNING,%s(): Invalid DBAddr, 
get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
+   
Agent=UdmAgentInit(NULL,Env,0);
 #elif UDM_VERSION_ID = 30200
Env=UdmAllocEnv();
 -1024,7 +1032,7 
break;

default:
-   php_error(E_WARNING,%s(): Unknown crosswords 
mode, get_active_function_name(TSRMLS_C));
+   php_error(E_WARNING,%s(): Unknown groupbysite 
+mode, get_active_function_name(TSRMLS_C));
RETURN_FALSE;
break;
}
 -1036,6 +1044,25 

break;
 
+   case UDM_PARAM_DETECT_CLONES: 
+   switch (atoi(val)){
+   case UDM_ENABLED:
+   

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

2002-09-28 Thread Ilia Alshanetsky

iliaa   Sat Sep 28 16:13:28 2002 EDT

  Modified files:  
/php4/main  main.c 
  Log:
  Fixed bug #13936
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.491 php4/main/main.c:1.492
--- php4/main/main.c:1.491  Wed Sep 25 12:11:31 2002
+++ php4/main/main.cSat Sep 28 16:13:28 2002
 -18,7 +18,7 
+--+
 */
 
-/* $Id: main.c,v 1.491 2002/09/25 16:11:31 sas Exp $ */
+/* $Id: main.c,v 1.492 2002/09/28 20:13:28 iliaa Exp $ */
 
 /* {{{ includes
  */
 -1507,9 +1507,14 
 
if(primary_file-filename) {
char realfile[MAXPATHLEN];
+   int realfile_len;
int dummy = 1;
if(VCWD_REALPATH(primary_file-filename, realfile)) {
-   zend_hash_add(EG(included_files), realfile, 
strlen(realfile)+1, (void *)dummy, sizeof(int), NULL);
+   realfile_len =  strlen(realfile);
+   zend_hash_add(EG(included_files), realfile, 
+realfile_len+1, (void *)dummy, sizeof(int), NULL);
+   primary_file-opened_path = emalloc(realfile_len+1);
+   memcpy(primary_file-opened_path, realfile, 
+realfile_len);
+   primary_file-opened_path[realfile_len] = '\0';
}
}
 



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




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

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:10:47 2002 EDT

  Modified files:  
/php4/main  streams.c php_streams.h 
  Log:
  Differentiate between write buffer and streams read buffer sizes.
  Add options for timeout and chunk size; previously these were only
  set-able for socket streams.
  
  
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.85 php4/main/streams.c:1.86
--- php4/main/streams.c:1.85Sat Sep 28 09:05:47 2002
+++ php4/main/streams.c Sat Sep 28 18:10:46 2002
 -20,7 +20,7 
+--+
  */
 
-/* $Id: streams.c,v 1.85 2002/09/28 13:05:47 wez Exp $ */
+/* $Id: streams.c,v 1.86 2002/09/28 22:10:46 wez Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
 -799,7 +799,12 

if (ret == PHP_STREAM_OPTION_RETURN_NOTIMPL) {
switch(option) {
-   case PHP_STREAM_OPTION_BUFFER:
+   case PHP_STREAM_OPTION_SET_CHUNK_SIZE:
+   ret = stream-chunk_size;
+   stream-chunk_size = value;
+   return ret;
+
+   case PHP_STREAM_OPTION_READ_BUFFER:
/* try to match the buffer mode as best we can */
if (value == PHP_STREAM_BUFFER_NONE) {
stream-flags |= PHP_STREAM_FLAG_NO_BUFFER;
 -1291,7 +1296,7 
return -1; /* not yet implemented */
 #endif

-   case PHP_STREAM_OPTION_BUFFER:
+   case PHP_STREAM_OPTION_WRITE_BUFFER:
if (ptrparam)
size = *(size_t *)ptrparam;
else
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.50 php4/main/php_streams.h:1.51
--- php4/main/php_streams.h:1.50Sat Sep 28 09:05:47 2002
+++ php4/main/php_streams.h Sat Sep 28 18:10:47 2002
 -374,16 +374,23 
 PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, void 
*ptrparam TSRMLS_DC);
 #define php_stream_set_option(stream, option, value, ptrvalue) 
_php_stream_set_option((stream), (option), (value), (ptrvalue) TSRMLS_CC)
 
+#define php_stream_set_chunk_size(stream, size) php_stream_set_option((stream), 
+PHP_STREAM_OPTION_SET_CHUNK_SIZE, (size), NULL TSRMLS_CC)
+
 /* change the blocking mode of stream: value == 1 = blocking, value == 0 = 
non-blocking. */
 #define PHP_STREAM_OPTION_BLOCKING 1
 
 /* change the buffering mode of stream. value is a PHP_STREAM_BUFFER_ value, 
ptrparam is a ptr to a size_t holding
  * the required buffer size */
-#define PHP_STREAM_OPTION_BUFFER   2
+#define PHP_STREAM_OPTION_READ_BUFFER  2
+#define PHP_STREAM_OPTION_WRITE_BUFFER 3
 
 #define PHP_STREAM_BUFFER_NONE 0   /* unbuffered */
 #define PHP_STREAM_BUFFER_LINE 1   /* line buffered */
 #define PHP_STREAM_BUFFER_FULL 2   /* fully buffered */
+
+/* set the timeout duration for reads on the stream. ptrparam is a pointer to a 
+struct timeval * */
+#define PHP_STREAM_OPTION_READ_TIMEOUT 4
+#define PHP_STREAM_OPTION_SET_CHUNK_SIZE   5
 
 #define PHP_STREAM_OPTION_RETURN_OK 0 /* option set OK */
 #define PHP_STREAM_OPTION_RETURN_ERR   -1 /* problem setting option */



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




[PHP-CVS] cvs: php4 /main network.c php_network.h

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:12:23 2002 EDT

  Modified files:  
/php4/main  network.c php_network.h 
  Log:
  remove chunk size setting code (it's now in streams.c).
  Move timeout setting code.
  
  
Index: php4/main/network.c
diff -u php4/main/network.c:1.69 php4/main/network.c:1.70
--- php4/main/network.c:1.69Wed Sep 25 11:25:12 2002
+++ php4/main/network.c Sat Sep 28 18:12:23 2002
@@ -16,7 +16,7 @@
| Streams work by Wez Furlong [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: network.c,v 1.69 2002/09/25 15:25:12 wez Exp $ */
+/* $Id: network.c,v 1.70 2002/09/28 22:12:23 wez Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -670,16 +670,6 @@
 
 #endif
 
-PHPAPI void php_stream_sock_set_timeout(php_stream *stream, struct timeval *timeout 
TSRMLS_DC)
-{
-   php_netstream_data_t *sock = (php_netstream_data_t*)stream-abstract;
-
-   if (!php_stream_is(stream, PHP_STREAM_IS_SOCKET))
-   return;
-   
-   sock-timeout = *timeout;
-   sock-timeout_event = 0;
-}
 
 PHPAPI int php_set_sock_blocking(int socketd, int block TSRMLS_DC)
 {
@@ -711,20 +701,6 @@
   return ret;
 }
 
-PHPAPI size_t php_stream_sock_set_chunk_size(php_stream *stream, size_t size 
TSRMLS_DC)
-{
-   size_t oldsize;
-
-   oldsize = stream-chunk_size;
-   stream-chunk_size = size;
-
-   return oldsize;
-}
-
-#define TOREAD(sock) ((sock)-writepos - (sock)-readpos)
-#define READPTR(sock) ((sock)-readbuf + (sock)-readpos)
-#define WRITEPTR(sock) ((sock)-readbuf + (sock)-writepos)
-
 static size_t php_sockop_write(php_stream *stream, const char *buf, size_t count 
TSRMLS_DC)
 {
php_netstream_data_t *sock = (php_netstream_data_t*)stream-abstract;
@@ -897,10 +873,15 @@
return oldmode;
}
 
-   return -1;
+   return PHP_STREAM_OPTION_RETURN_ERR;
+
+   case PHP_STREAM_OPTION_READ_TIMEOUT:
+   sock-timeout = *(struct timeval*)ptrparam;
+   sock-timeout_event = 0;
+   return PHP_STREAM_OPTION_RETURN_OK;
 
default:
-   return -1;
+   return PHP_STREAM_OPTION_RETURN_NOTIMPL;
}
 }
 
Index: php4/main/php_network.h
diff -u php4/main/php_network.h:1.29 php4/main/php_network.h:1.30
--- php4/main/php_network.h:1.29Wed Sep 25 11:25:12 2002
+++ php4/main/php_network.h Sat Sep 28 18:12:23 2002
@@ -15,7 +15,7 @@
| Author: Stig Venaas [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: php_network.h,v 1.29 2002/09/25 15:25:12 wez Exp $ */
+/* $Id: php_network.h,v 1.30 2002/09/28 22:12:23 wez Exp $ */
 
 #ifndef _PHP_NETWORK_H
 #define _PHP_NETWORK_H
@@ -137,10 +137,6 @@
 #define php_stream_sock_open_unix_rel(path, pathlen, persistent, timeval)  
_php_stream_sock_open_unix((path), (pathlen), (persistent), (timeval) STREAMS_REL_CC 
TSRMLS_CC)
 
 /* }}} */
-
-PHPAPI void php_stream_sock_set_timeout(php_stream *stream, struct timeval *timeout 
TSRMLS_DC);
-/* set the chunk size for the stream; return the old chunk size */
-PHPAPI size_t php_stream_sock_set_chunk_size(php_stream *stream, size_t size 
TSRMLS_DC);
 
 #if HAVE_OPENSSL_EXT
 PHPAPI int php_stream_sock_ssl_activate_with_method(php_stream *stream, int activate, 
SSL_METHOD *method, php_stream *session_stream TSRMLS_DC);



-- 
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 file.c file.h http_fopen_wrapper.c /ext/standard/tests/file userstreams.phpt /main user_streams.c

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:14:21 2002 EDT

  Modified files:  
/php4/ext/standard  basic_functions.c file.c file.h 
http_fopen_wrapper.c 
/php4/ext/standard/tests/file   userstreams.phpt 
/php4/main  user_streams.c 
  Log:
  Rename streams functions to fit with naming conventions, adding aliases
  for old functions where required.
  Make use of recent changes to chunk size and timeout setting code.
  
  

Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.514 
php4/ext/standard/basic_functions.c:1.515
--- php4/ext/standard/basic_functions.c:1.514   Fri Sep 27 19:42:38 2002
+++ php4/ext/standard/basic_functions.c Sat Sep 28 18:14:20 2002
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.514 2002/09/27 23:42:38 wez Exp $ */
+/* $Id: basic_functions.c,v 1.515 2002/09/28 22:14:20 wez Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -630,20 +630,22 @@
PHP_FE(fgetcsv,
 NULL)
PHP_FE(flock,  
 NULL)
PHP_FE(get_meta_tags,  
 NULL)
-   PHP_FE(set_file_buffer,
 NULL)
+   PHP_FE(stream_set_write_buffer,
+ NULL)
+   PHP_FALIAS(set_file_buffer, stream_set_write_buffer,   
+ NULL)
 
PHP_FE(set_socket_blocking,
 NULL)
PHP_FE(stream_set_blocking,
 NULL)
PHP_FALIAS(socket_set_blocking, stream_set_blocking,   
 NULL)
 
-   PHP_FE(file_get_meta_data, 
 NULL)
-   PHP_FE(file_register_wrapper,  
 NULL)
+   PHP_FE(stream_get_meta_data,   
+ NULL)
+   PHP_FE(stream_register_wrapper,
+ NULL)
 
 #if HAVE_SYS_TIME_H || defined(PHP_WIN32)
-   PHP_FE(socket_set_timeout, 
 NULL)
+   PHP_FE(stream_set_timeout, 
+ NULL)
+   PHP_FALIAS(socket_set_timeout, stream_set_timeout, 
+ NULL)
 #endif
 
-   PHP_FALIAS(socket_get_status, file_get_meta_data,  
 NULL)
+   PHP_FALIAS(socket_get_status, stream_get_meta_data,
+ NULL)
 
 #if (!defined(PHP_WIN32)  !defined(__BEOS__)  !defined(NETWARE)  HAVE_REALPATH) 
|| defined(ZTS)
PHP_FE(realpath,   
 NULL)
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.265 php4/ext/standard/file.c:1.266
--- php4/ext/standard/file.c:1.265  Sat Sep 28 09:04:47 2002
+++ php4/ext/standard/file.cSat Sep 28 18:14:21 2002
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.265 2002/09/28 13:04:47 wez Exp $ */
+/* $Id: file.c,v 1.266 2002/09/28 22:14:21 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -582,9 +582,9 @@
 }
 /* }}} */
 
-/* {{{ proto resource file_get_meta_data(resource fp)
+/* {{{ proto resource stream_get_meta_data(resource fp)
 Retrieves header/meta data from streams/file pointers */
-PHP_FUNCTION(file_get_meta_data)
+PHP_FUNCTION(stream_get_meta_data)
 {
zval **arg1;
php_stream *stream;
@@ -639,6 +639,7 @@
 }
 /* }}} */
 
+/* {{{ stream_select related functions */
 static int stream_array_to_fd_set(zval *stream_array, fd_set *fds, int *max_fd 
TSRMLS_DC)
 {
zval **elem;
@@ -664,9 +665,7 @@
}
}
}
-
return 1;
-
 }
 
 static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC)
@@ -708,9 +707,8 @@
Z_ARRVAL_P(stream_array) = new_hash;

return 1;
-
 }
-
+/* }}} */
 
 /* {{{ proto int stream_select(array 

[PHP-CVS] cvs: php4 / NEWS

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:37:12 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  More streams related news.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1147 php4/NEWS:1.1148
--- php4/NEWS:1.1147Sat Sep 28 05:14:59 2002
+++ php4/NEWS   Sat Sep 28 18:37:11 2002
 -1,8 +1,23 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
-- Added stream_select() which works like socket_select but only works on
-  streams returned by fopen(), fsockopen() and pfsockopen(). (Wez)
+- Renamed:
+socket_set_timeout()  - stream_set_timeout()
+socket_set_blocking() - stream_set_blocking()
+   set_file_buffer() - stream_set_write_buffer()
+   socket_get_status()   - stream_get_meta_data()
+  As these functions can (in theory) work on any type of stream. (Wez)
+- Added stream_context_create(), stream_context_set_params() and
+  stream_context_set_option and added an optional fourth parameter to
+  fopen() which accepts a stream context.  Contexts allow sharing of
+  information between streams (a kind of session) and setting notification
+  callbacks. (Wez)
+- Added stream_filter_prepend() and stream_filter_append() which apply
+  a filter to either the top or the bottom of the filter stack for a stream.
+  Implemented string.rot13 filter as an example; more filters are expected
+  to follow in later releases and other extensions. (Wez)
+- Added stream_select() which works like socket_select but works on streams
+  returned by fopen(), fsockopen() and pfsockopen() instead. (Wez)
 - Fixed bug #19595 (Missing functions for GD2 format handling). (Edin)
 - Fixed bug #19633 (Wrong directories in ext/ldap/config.m4). (Derick)
 - Fixed bugs #17274 and #19627 (segfault in sem_remove). (Wez)
 -278,7 +293,7 
   . zlib wrappers/streams can be used even on systems without fopencookie()
   . Added 'compress.bzip2://' stream and wrapper support.
   . Added user-space streams - it is now possible to define a class in PHP
-code and register it as a URL wrapper.
+code and register it as a URL wrapper. (stream_register_wrapper)
   . Most extensions now support streams when passing files, which means
 that those extensions will support URL wrappers. (Wez)
   . Added memory stream support. (Marcus)



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




[PHP-CVS] cvs: php4 / NEWS

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:37:51 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  WS
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1148 php4/NEWS:1.1149
--- php4/NEWS:1.1148Sat Sep 28 18:37:11 2002
+++ php4/NEWS   Sat Sep 28 18:37:51 2002
 -4,8 +4,8 
 - Renamed:
 socket_set_timeout()  - stream_set_timeout()
 socket_set_blocking() - stream_set_blocking()
-   set_file_buffer() - stream_set_write_buffer()
-   socket_get_status()   - stream_get_meta_data()
+set_file_buffer() - stream_set_write_buffer()
+socket_get_status()   - stream_get_meta_data()
   As these functions can (in theory) work on any type of stream. (Wez)
 - Added stream_context_create(), stream_context_set_params() and
   stream_context_set_option and added an optional fourth parameter to



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




[PHP-CVS] cvs: php4 /ext/ncurses ncurses_fe.c ncurses_functions.c php_ncurses_fe.h

2002-09-28 Thread Wez Furlong

wez Sat Sep 28 18:50:23 2002 EDT

  Modified files:  
/php4/ext/ncurses   ncurses_fe.c ncurses_functions.c php_ncurses_fe.h 
  Log:
  Added ncurses_getyx().
  
  
Index: php4/ext/ncurses/ncurses_fe.c
diff -u php4/ext/ncurses/ncurses_fe.c:1.16 php4/ext/ncurses/ncurses_fe.c:1.17
--- php4/ext/ncurses/ncurses_fe.c:1.16  Fri Sep 27 18:33:14 2002
+++ php4/ext/ncurses/ncurses_fe.c   Sat Sep 28 18:50:23 2002
 -175,6 +175,7 
PHP_FE(ncurses_wborder, NULL)
PHP_FE(ncurses_whline,  NULL)
PHP_FE(ncurses_wvline,  NULL)
+   PHP_FE(ncurses_getyx,   secondandthird_args_force_ref)

 #if HAVE_NCURSES_PANEL
PHP_FE(ncurses_update_panels,   NULL)
Index: php4/ext/ncurses/ncurses_functions.c
diff -u php4/ext/ncurses/ncurses_functions.c:1.22 
php4/ext/ncurses/ncurses_functions.c:1.23
--- php4/ext/ncurses/ncurses_functions.c:1.22   Sat Sep 28 13:03:02 2002
+++ php4/ext/ncurses/ncurses_functions.cSat Sep 28 18:50:23 2002
 -1797,6 +1797,24 
 }
 /* }}} */
 
+/* {{{ proto void ncurses_getyx(resource window, int y, int x)
+   Returns the current cursor position for a window */
+PHP_FUNCTION(ncurses_getyx)
+{
+   zval **handle, **x, **y;
+   WINDOW **win;
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, handle, y, x) == 
+FAILURE){
+   WRONG_PARAM_COUNT;
+   }
+
+   FETCH_WINRES(win, handle);
+
+   convert_to_long_ex(x);
+   convert_to_long_ex(y);
+
+   getyx(*win, Z_LVAL_PP(y), Z_LVAL_PP(x));
+}
+/* }}} */
 
 /* {{{ proto int ncurses_wmove(resource window, int y, int x)
Moves windows output position */
Index: php4/ext/ncurses/php_ncurses_fe.h
diff -u php4/ext/ncurses/php_ncurses_fe.h:1.16 php4/ext/ncurses/php_ncurses_fe.h:1.17
--- php4/ext/ncurses/php_ncurses_fe.h:1.16  Fri Sep 27 18:33:14 2002
+++ php4/ext/ncurses/php_ncurses_fe.h   Sat Sep 28 18:50:23 2002
 -161,6 +161,7 
 PHP_FUNCTION(ncurses_wborder);
 PHP_FUNCTION(ncurses_whline);
 PHP_FUNCTION(ncurses_wvline);
+PHP_FUNCTION(ncurses_getyx);
 #if HAVE_NCURSES_PANEL
 PHP_FUNCTION(ncurses_update_panels);
 PHP_FUNCTION(ncurses_panel_window);



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




[PHP-CVS] cvs: php4 / NEWS

2002-09-28 Thread Ilia Alshanetsky

iliaa   Sat Sep 28 19:39:59 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Bug fixing news
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1149 php4/NEWS:1.1150
--- php4/NEWS:1.1149Sat Sep 28 18:37:51 2002
+++ php4/NEWS   Sat Sep 28 19:39:59 2002
 -1,6 +1,7 
 PHP 4  NEWS
 |||
 ? ? ??? 2002, Version 4.3.0
+- Fixed bug #13936 (__FILE__ constant didn't contain full path). (Ilia)
 - Renamed:
 socket_set_timeout()  - stream_set_timeout()
 socket_set_blocking() - stream_set_blocking()



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




[PHP-CVS] cvs: php4 / Makefile.global configure.in /main php_embed.c php_embed.h /win32 phpembed.dsp

2002-09-28 Thread Edin Kadribasic

edink   Sat Sep 28 22:45:25 2002 EDT

  Added files: 
/php4/main  php_embed.c php_embed.h 
/php4/win32 phpembed.dsp 

  Modified files:  
/php4   Makefile.global configure.in 
  Log:
  Added php/embed toolkit for embedding PHP engine into C/C++ applications.
  See my post to php-dev on the subject.
  
  

Index: php4/Makefile.global
diff -u php4/Makefile.global:1.24 php4/Makefile.global:1.25
--- php4/Makefile.global:1.24   Thu Aug 15 20:36:05 2002
+++ php4/Makefile.globalSat Sep 28 22:45:24 2002
@@ -22,8 +22,15 @@
 sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS)
$(BUILD_CLI)
 
-install: $(install_targets) 
+libphp.la: $(PHP_LIB_OBJS)
+   $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) 
+$(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_LIB_OBJS) $(EXTRA_LIBS) 
+$(ZEND_EXTRA_LIBS) -o $@
+
+libphp.so: $(PHP_LIB_OBJS)
+   $(LIBTOOL) --mode=link $(CC) -shared -export-dynamic $(COMMON_FLAGS) 
+$(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) 
+$(PHP_LIB_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@  cp $@ .libs
 
+libs: libphp.la libphp.so
+
+install: $(install_targets) 
 
 install-cli: sapi/cli/php
@echo Installing PHP CLI binary:$(INSTALL_ROOT)$(bindir)/
@@ -62,7 +69,7 @@
$(top_builddir)/sapi/cli/php -c php.ini-dist 
$(top_srcdir)/run-tests.php $(TESTS)
 
 clean:
-   find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f
+   find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a -o -name \*.so| 
+xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp4.la php sapi/cli/php modules/* libs/*
 
Index: php4/configure.in
diff -u php4/configure.in:1.372 php4/configure.in:1.373
--- php4/configure.in:1.372 Fri Sep  6 13:18:16 2002
+++ php4/configure.in   Sat Sep 28 22:45:24 2002
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.372 2002/09/06 17:18:16 sniper Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.373 2002/09/29 02:45:24 edink Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -1077,6 +1077,12 @@
 fi
 
 PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
+
+
+PHP_ADD_SOURCES_X(main, php_embed.c,, PHP_LIB_OBJS)
+PHP_LIB_OBJS=$PHP_GLOBAL_OBJS $PHP_LIB_OBJS main/internal_functions_cli.lo
+PHP_SUBST(PHP_LIB_OBJS)
+
 
 PHP_ADD_BUILD_DIR(main)
 PHP_ADD_BUILD_DIR(regex)

Index: php4/main/php_embed.c
+++ php4/main/php_embed.c
/*
   +--+
   | 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: Edin Kadrinasic [EMAIL PROTECTED]  |
   +--+
*/
/* $Id: php_embed.c,v 1.1 2002/09/29 02:45:25 edink Exp $ */

#include php_embed.h

#ifdef PHP_WIN32
#include io.h
#include fcntl.h
#endif

static char* php_embed_read_cookies(TSRMLS_D)
{
return NULL;
}

static int php_embed_deactivate(TSRMLS_D)
{
fflush(stdout);
return SUCCESS;
}

static inline size_t php_embed_single_write(const char *str, uint str_length)
{
#ifdef PHP_WRITE_STDOUT
long ret;

ret = write(STDOUT_FILENO, str, str_length);
if (ret = 0) return 0;
return ret;
#else
size_t ret;

ret = fwrite(str, 1, MIN(str_length, 16384), stdout);
return ret;
#endif
}


static int php_embed_ub_write(const char *str, uint str_length TSRMLS_DC)
{
const char *ptr = str;
uint remaining = str_length;
size_t ret;

while (remaining  0) {
ret = php_embed_single_write(ptr, remaining);
if (!ret) {
php_handle_aborted_connection();
}
ptr += ret;
remaining -= ret;
}

return str_length;
}

static void php_embed_flush(void *server_context)
{
if (fflush(stdout)==EOF) {
php_handle_aborted_connection();
}
}

static void