[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-01-16 Thread changelog
changelog   Wed Jan 17 01:30:59 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2573r2=1.2574diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2573 php-src/ChangeLog:1.2574
--- php-src/ChangeLog:1.2573Tue Jan 16 01:31:03 2007
+++ php-src/ChangeLog   Wed Jan 17 01:30:58 2007
@@ -1,3 +1,68 @@
+2007-01-16  Marcus Boerger  [EMAIL PROTECTED]
+
+* ext/spl/spl_directory.c
+  ext/spl/spl_directory.h:
+  - Steps towards unicode
+
+2007-01-16  Andrei Zmievski  [EMAIL PROTECTED]
+
+* main/php.h:
+  Update PHP API version.
+  
+
+2007-01-16  Marcus Boerger  [EMAIL PROTECTED]
+
+* ext/standard/filestat.c
+  ext/standard/php_filestat.h:
+  - Add php_u_stat()
+
+* main/php_streams.h
+  main/streams/streams.c:
+  - Add more unicode stuff
+
+2007-01-16  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/odbc/php_odbc.c:
+  
+  MFB: Fixed output code inside odbc_result_all()
+
+* (PHP_4_4)
+  ext/odbc/php_odbc.c:
+  
+  MFH: Fixed output code inside odbc_result_all()
+
+* (PHP_5_2)
+  ext/odbc/php_odbc.c:
+  Fixed output code inside odbc_result_all()
+
+2007-01-16  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/gettext/gettext.c:
+  MFH: return false if realpath()/getcwd() fail
+
+* ext/gettext/gettext.c:
+  return false if realpath()/getcwd() fail
+
+* (PHP_5_2)
+  TSRM/tsrm_virtual_cwd.c:
+  MFH: free temp cwd_state struct on error
+
+* TSRM/tsrm_virtual_cwd.c:
+  free temporary cwd_state struct on error
+
+* ext/pspell/pspell.c:
+  plug leaks
+  initialize the last argument of RegQueryValueEx()
+  fix ws
+
+2007-01-16  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_4_4)
+  win32/sendmail.c:
+  
+  Added buffer length checks
+
 2007-01-15  Marcus Boerger  [EMAIL PROTECTED]
 
 * main/php_streams.h


[PHP-CVS] cvs: php-src /ext/pspell pspell.c

2007-01-16 Thread Antony Dovgal
tony2001Tue Jan 16 11:18:54 2007 UTC

  Modified files:  
/php-src/ext/pspell pspell.c 
  Log:
  plug leaks
  initialize the last argument of RegQueryValueEx()
  fix ws
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.55r2=1.56diff_format=u
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.55 php-src/ext/pspell/pspell.c:1.56
--- php-src/ext/pspell/pspell.c:1.55Mon Jan  1 09:29:28 2007
+++ php-src/ext/pspell/pspell.c Tue Jan 16 11:18:54 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pspell.c,v 1.55 2007/01/01 09:29:28 sebastian Exp $ */
+/* $Id: pspell.c,v 1.56 2007/01/16 11:18:54 tony2001 Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -186,6 +186,7 @@
 * pointing to the location of the dictionaries
 */
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
@@ -247,6 +248,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s, pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -289,6 +291,7 @@
 * pointing to the location of the dictionaries
 */
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
@@ -304,6 +307,7 @@
convert_to_string_ex(personal);
 
if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) {
+   delete_pspell_config(config);
RETURN_FALSE;
}
 
@@ -359,6 +363,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s, pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -392,6 +397,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s, pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -637,17 +643,18 @@
 /* If aspell was installed using installer, we should have a key
  * pointing to the location of the dictionaries
  */
-if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
-   RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen);
-   RegCloseKey(hkey);
-   strcpy(data_dir, aspell_dir);
-   strcat(data_dir, \\data);
-   strcpy(dict_dir, aspell_dir);
-   strcat(dict_dir, \\dict);
-
-   pspell_config_replace(config, data-dir, data_dir);
-   pspell_config_replace(config, dict-dir, dict_dir);
-  }
+   if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
+   RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
+   RegCloseKey(hkey);
+   strcpy(data_dir, aspell_dir);
+   strcat(data_dir, \\data);
+   strcpy(dict_dir, aspell_dir);
+   strcat(dict_dir, \\dict);
+
+   pspell_config_replace(config, data-dir, data_dir);
+   pspell_config_replace(config, dict-dir, dict_dir);
+   }
 #endif
 
convert_to_string_ex(language);

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pspell pspell.c

2007-01-16 Thread Antony Dovgal
tony2001Tue Jan 16 11:19:10 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pspell pspell.c 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.4r2=1.45.2.4.2.5diff_format=u
Index: php-src/ext/pspell/pspell.c
diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.4 
php-src/ext/pspell/pspell.c:1.45.2.4.2.5
--- php-src/ext/pspell/pspell.c:1.45.2.4.2.4Mon Jan  1 09:36:05 2007
+++ php-src/ext/pspell/pspell.c Tue Jan 16 11:19:10 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pspell.c,v 1.45.2.4.2.4 2007/01/01 09:36:05 sebastian Exp $ */
+/* $Id: pspell.c,v 1.45.2.4.2.5 2007/01/16 11:19:10 tony2001 Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -186,6 +186,7 @@
 * pointing to the location of the dictionaries
 */
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
@@ -247,6 +248,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s , pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -289,6 +291,7 @@
 * pointing to the location of the dictionaries
 */
if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
RegCloseKey(hkey);
strcpy(data_dir, aspell_dir);
@@ -304,10 +307,12 @@
convert_to_string_ex(personal);
 
if (PG(safe_mode)  (!php_checkuid(Z_STRVAL_PP(personal), NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
+   delete_pspell_config(config);
RETURN_FALSE;
}
 
if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) {
+   delete_pspell_config(config);
RETURN_FALSE;
}
 
@@ -363,6 +368,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s , pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -396,6 +402,7 @@
 
if(pspell_error_number(ret) != 0){
php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't 
open the dictionary. reason: %s , pspell_error_message(ret));
+   delete_pspell_manager(ret);
RETURN_FALSE;
}

@@ -641,17 +648,18 @@
 /* If aspell was installed using installer, we should have a key
  * pointing to the location of the dictionaries
  */
-if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
-   RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, dwLen);
-   RegCloseKey(hkey);
-   strcpy(data_dir, aspell_dir);
-   strcat(data_dir, \\data);
-   strcpy(dict_dir, aspell_dir);
-   strcat(dict_dir, \\dict);
-
-   pspell_config_replace(config, data-dir, data_dir);
-   pspell_config_replace(config, dict-dir, dict_dir);
-  }
+   if(0 == RegOpenKey(HKEY_LOCAL_MACHINE, Software\\Aspell, hkey)) {
+   dwLen = sizeof(aspell_dir) - 1;
+   RegQueryValueEx(hkey, , NULL, dwType, (LPBYTE)aspell_dir, 
dwLen);
+   RegCloseKey(hkey);
+   strcpy(data_dir, aspell_dir);
+   strcat(data_dir, \\data);
+   strcpy(dict_dir, aspell_dir);
+   strcat(dict_dir, \\dict);
+
+   pspell_config_replace(config, data-dir, data_dir);
+   pspell_config_replace(config, dict-dir, dict_dir);
+   }
 #endif
 
convert_to_string_ex(language);

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



[PHP-CVS] cvs: php-src /ext/gettext gettext.c

2007-01-16 Thread Antony Dovgal
tony2001Tue Jan 16 14:42:14 2007 UTC

  Modified files:  
/php-src/ext/gettextgettext.c 
  Log:
  return false if realpath()/getcwd() fail
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gettext/gettext.c?r1=1.53r2=1.54diff_format=u
Index: php-src/ext/gettext/gettext.c
diff -u php-src/ext/gettext/gettext.c:1.53 php-src/ext/gettext/gettext.c:1.54
--- php-src/ext/gettext/gettext.c:1.53  Mon Jan  1 09:29:24 2007
+++ php-src/ext/gettext/gettext.c   Tue Jan 16 14:42:14 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: gettext.c,v 1.53 2007/01/01 09:29:24 sebastian Exp $ */
+/* $Id: gettext.c,v 1.54 2007/01/16 14:42:14 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -236,9 +236,11 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, the first 
parameter must not be empty);
}
if (!dir_len || (dir_len == 1  *dir_str == '0')) {
-   VCWD_GETCWD(dir_tmp, sizeof(dir_tmp));
-   } else {
-   VCWD_REALPATH(dir_str, dir_tmp);
+   if (!VCWD_GETCWD(dir_tmp, sizeof(dir_tmp))) {
+   RETURN_FALSE;
+   }
+   } else if (!VCWD_REALPATH(dir_str, dir_tmp)) {
+   RETURN_FALSE;
}
RETURN_FS_STRING(bindtextdomain(domain_str, dir_tmp), ZSTR_DUPLICATE);
 }

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/odbc php_odbc.c

2007-01-16 Thread Ilia Alshanetsky
iliaa   Tue Jan 16 18:56:06 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/odbc   php_odbc.c 
  Log:
  Fixed output code inside odbc_result_all()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.3r2=1.189.2.4.2.4diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.3 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.4
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.3   Mon Jan  1 09:36:03 2007
+++ php-src/ext/odbc/php_odbc.c Tue Jan 16 18:56:06 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.3 2007/01/01 09:36:03 sebastian Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.4 2007/01/16 18:56:06 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1984,12 +1984,12 @@
RETURN_FALSE;
}
if (rc == SQL_SUCCESS_WITH_INFO)
-   
php_printf(buf,result-longreadlen);
+   PHPWRITE(buf, 
result-longreadlen);
else if (result-values[i].vallen == 
SQL_NULL_DATA) {
php_printf(tdNULL/td);
break;
} else {
-   php_printf(buf, 
result-values[i].vallen);
+   PHPWRITE(buf, 
result-values[i].vallen);
}
php_printf(/td);
break;

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/odbc php_odbc.c

2007-01-16 Thread Ilia Alshanetsky
iliaa   Tue Jan 16 18:56:45 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/odbc   php_odbc.c 
  Log:
  
  MFH: Fixed output code inside odbc_result_all()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.143.2.21.2.3r2=1.143.2.21.2.4diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.143.2.21.2.3 
php-src/ext/odbc/php_odbc.c:1.143.2.21.2.4
--- php-src/ext/odbc/php_odbc.c:1.143.2.21.2.3  Mon Jan  1 09:46:45 2007
+++ php-src/ext/odbc/php_odbc.c Tue Jan 16 18:56:45 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.143.2.21.2.3 2007/01/01 09:46:45 sebastian Exp $ */
+/* $Id: php_odbc.c,v 1.143.2.21.2.4 2007/01/16 18:56:45 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1980,12 +1980,12 @@
RETURN_FALSE;
}
if (rc == SQL_SUCCESS_WITH_INFO)
-   
php_printf(buf,result-longreadlen);
+   PHPWRITE(buf, 
result-longreadlen);
else if (result-values[i].vallen == 
SQL_NULL_DATA) {
php_printf(tdNULL/td);
break;
} else {
-   php_printf(buf, 
result-values[i].vallen);
+   PHPWRITE(buf, 
result-values[i].vallen);
}
php_printf(/td);
break;

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



[PHP-CVS] cvs: php-src /ext/odbc php_odbc.c

2007-01-16 Thread Ilia Alshanetsky
iliaa   Tue Jan 16 18:56:56 2007 UTC

  Modified files:  
/php-src/ext/odbc   php_odbc.c 
  Log:
  
  MFB: Fixed output code inside odbc_result_all()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.198r2=1.199diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.198 php-src/ext/odbc/php_odbc.c:1.199
--- php-src/ext/odbc/php_odbc.c:1.198   Mon Jan  1 09:29:26 2007
+++ php-src/ext/odbc/php_odbc.c Tue Jan 16 18:56:55 2007
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_odbc.c,v 1.198 2007/01/01 09:29:26 sebastian Exp $ */
+/* $Id: php_odbc.c,v 1.199 2007/01/16 18:56:55 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1977,12 +1977,12 @@
RETURN_FALSE;
}
if (rc == SQL_SUCCESS_WITH_INFO)
-   
php_printf(buf,result-longreadlen);
+   PHPWRITE(buf, 
result-longreadlen);
else if (result-values[i].vallen == 
SQL_NULL_DATA) {
php_printf(tdNULL/td);
break;
} else {
-   php_printf(buf, 
result-values[i].vallen);
+   PHPWRITE(buf, 
result-values[i].vallen);
}
php_printf(/td);
break;

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



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

2007-01-16 Thread Marcus Boerger
helly   Tue Jan 16 20:36:04 2007 UTC

  Modified files:  
/php-src/main   php_streams.h 
/php-src/main/streams   streams.c 
  Log:
  - Add more unicode stuff
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_streams.h?r1=1.122r2=1.123diff_format=u
Index: php-src/main/php_streams.h
diff -u php-src/main/php_streams.h:1.122 php-src/main/php_streams.h:1.123
--- php-src/main/php_streams.h:1.122Mon Jan 15 22:19:33 2007
+++ php-src/main/php_streams.h  Tue Jan 16 20:36:04 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_streams.h,v 1.122 2007/01/15 22:19:33 helly Exp $ */
+/* $Id: php_streams.h,v 1.123 2007/01/16 20:36:04 helly Exp $ */
 
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
@@ -360,7 +360,9 @@
 #define php_stream_rmdir(path, options, context)   _php_stream_rmdir(path, 
options, context TSRMLS_CC)
 
 PHPAPI php_stream *_php_stream_opendir(char *path, int options, 
php_stream_context *context STREAMS_DC TSRMLS_DC);
+PHPAPI php_stream *_php_stream_u_opendir(zend_uchar type, zstr path, int 
path_len, int options, php_stream_context *context STREAMS_DC TSRMLS_DC);
 #define php_stream_opendir(path, options, context) 
_php_stream_opendir((path), (options), (context) STREAMS_CC TSRMLS_CC)
+#define php_stream_u_opendir(path_type, path, path_len, options, context)  
_php_stream_u_opendir((path_type), (path), (path_len), (options), (context) 
STREAMS_CC TSRMLS_CC)
 PHPAPI php_stream_dirent *_php_stream_readdir(php_stream *dirstream, 
php_stream_dirent *ent TSRMLS_DC);
 #define php_stream_readdir(dirstream, dirent)  
_php_stream_readdir((dirstream), (dirent) TSRMLS_CC)
 #define php_stream_closedir(dirstream) php_stream_close((dirstream))
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.145r2=1.146diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.145 
php-src/main/streams/streams.c:1.146
--- php-src/main/streams/streams.c:1.145Mon Jan 15 22:19:33 2007
+++ php-src/main/streams/streams.c  Tue Jan 16 20:36:04 2007
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.145 2007/01/15 22:19:33 helly Exp $ */
+/* $Id: streams.c,v 1.146 2007/01/16 20:36:04 helly Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -2278,6 +2278,27 @@
 }
 /* }}} */
 
+PHPAPI php_stream *_php_stream_u_opendir(zend_uchar type, zstr path, int 
path_len, int options, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ 
*/
+{
+   char *filename;
+   int filename_len;
+   php_stream *stream;
+
+   if (type == IS_STRING) {
+   return php_stream_opendir(path.s, options, context);
+   }
+
+   /* type == IS_UNICODE */
+   if (FAILURE == php_stream_path_encode(NULL, filename, filename_len, 
path.u, path_len, options, context)) {
+   return NULL;
+   }
+
+   stream = php_stream_opendir(filename, options, context);
+   efree(filename);
+   return stream;
+}
+/* }}} */
+
 /* {{{ _php_stream_readdir */
 PHPAPI php_stream_dirent *_php_stream_readdir(php_stream *dirstream, 
php_stream_dirent *ent TSRMLS_DC)
 {

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



[PHP-CVS] cvs: php-src /ext/standard filestat.c php_filestat.h

2007-01-16 Thread Marcus Boerger
helly   Tue Jan 16 22:10:25 2007 UTC

  Modified files:  
/php-src/ext/standard   filestat.c php_filestat.h 
  Log:
  - Add php_u_stat()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.155r2=1.156diff_format=u
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.155 
php-src/ext/standard/filestat.c:1.156
--- php-src/ext/standard/filestat.c:1.155   Thu Jan 11 01:52:24 2007
+++ php-src/ext/standard/filestat.c Tue Jan 16 22:10:25 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: filestat.c,v 1.155 2007/01/11 01:52:24 pollita Exp $ */
+/* $Id: filestat.c,v 1.156 2007/01/16 22:10:25 helly Exp $ */
 
 #include php.h
 #include fopen_wrappers.h
@@ -752,6 +752,22 @@
 #define IS_ABLE_CHECK(__t) ((__t) == FS_IS_R || (__t) == FS_IS_W || (__t) == 
FS_IS_X)
 #define IS_ACCESS_CHECK(__t) (IS_ABLE_CHECK(type) || (__t) == FS_EXISTS)
 
+PHPAPI void php_u_stat(zend_uchar filename_type, const zstr filename, 
php_stat_len filename_length, int type, php_stream_context *context, zval 
*return_value TSRMLS_DC) /* {{{ */
+{
+   char *fn;
+
+   if (filename_type == IS_STRING) {
+   php_stat(filename.s, filename_length, type, return_value 
TSRMLS_CC);
+   } else {
+   if (FAILURE == php_stream_path_encode(NULL, fn, 
filename_length, filename.u, filename_length, REPORT_ERRORS, context)) {
+   RETURN_FALSE;
+   }
+   php_stat(filename.s, filename_length, type, return_value 
TSRMLS_CC);
+   efree(fn);
+   }
+}
+/* }}} */
+
 /* {{{ php_stat
  */
 PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int 
type, zval *return_value TSRMLS_DC)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_filestat.h?r1=1.29r2=1.30diff_format=u
Index: php-src/ext/standard/php_filestat.h
diff -u php-src/ext/standard/php_filestat.h:1.29 
php-src/ext/standard/php_filestat.h:1.30
--- php-src/ext/standard/php_filestat.h:1.29Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/php_filestat.h Tue Jan 16 22:10:25 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_filestat.h,v 1.29 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: php_filestat.h,v 1.30 2007/01/16 22:10:25 helly Exp $ */
 
 #ifndef PHP_FILESTAT_H
 #define PHP_FILESTAT_H
@@ -88,6 +88,7 @@
 #endif
 
 PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int 
type, zval *return_value TSRMLS_DC);
+PHPAPI void php_u_stat(zend_uchar filename_type, const zstr filename, 
php_stat_len filename_length, int type, php_stream_context *context, zval 
*return_value TSRMLS_DC);
 
 /* Switches for various filestat functions: */
 #define FS_PERMS0

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



[PHP-CVS] cvs: php-src /main php.h

2007-01-16 Thread Andrei Zmievski
andrei  Tue Jan 16 22:18:39 2007 UTC

  Modified files:  
/php-src/main   php.h 
  Log:
  Update PHP API version.
  
  # Wonder why it hasn't been done already.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.237r2=1.238diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.237 php-src/main/php.h:1.238
--- php-src/main/php.h:1.237Mon Jan  1 09:29:35 2007
+++ php-src/main/php.h  Tue Jan 16 22:18:39 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.237 2007/01/01 09:29:35 sebastian Exp $ */
+/* $Id: php.h,v 1.238 2007/01/16 22:18:39 andrei Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -26,7 +26,7 @@
 #include dmalloc.h
 #endif
 
-#define PHP_API_VERSION 20050809
+#define PHP_API_VERSION 20070116
 #define PHP_HAVE_STREAMS
 #define YYDEBUG 0
 

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



[PHP-CVS] cvs: php-src /ext/spl spl_directory.c spl_directory.h

2007-01-16 Thread Marcus Boerger
helly   Tue Jan 16 23:52:14 2007 UTC

  Modified files:  
/php-src/ext/splspl_directory.c spl_directory.h 
  Log:
  - Steps towards unicode
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.108r2=1.109diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.108 
php-src/ext/spl/spl_directory.c:1.109
--- php-src/ext/spl/spl_directory.c:1.108   Mon Jan  1 09:29:29 2007
+++ php-src/ext/spl/spl_directory.c Tue Jan 16 23:52:14 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.108 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: spl_directory.c,v 1.109 2007/01/16 23:52:14 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -76,11 +76,11 @@

zend_object_std_dtor(intern-std TSRMLS_CC);

-   if (intern-path) {
-   efree(intern-path);
+   if (intern-path.v) {
+   efree(intern-path.s);
}
-   if (intern-file_name) {
-   efree(intern-file_name);
+   if (intern-file_name.v) {
+   efree(intern-file_name.s);
}
switch(intern-type) {
case SPL_FS_INFO:
@@ -90,8 +90,8 @@
php_stream_close(intern-u.dir.dirp);
intern-u.dir.dirp = NULL;
}
-   if (intern-u.dir.sub_path) {
-   efree(intern-u.dir.sub_path);
+   if (intern-u.dir.sub_path.s) {
+   efree(intern-u.dir.sub_path.s);
}   
break;
case SPL_FS_FILE:
@@ -157,35 +157,45 @@
 
 static inline void spl_filesystem_object_get_file_name(spl_filesystem_object 
*intern TSRMLS_DC) /* {{{ */
 {
-   if (!intern-file_name) {
+   if (!intern-file_name.s) {
switch (intern-type) {
case SPL_FS_INFO:
case SPL_FS_FILE:
php_error_docref(NULL TSRMLS_CC, E_ERROR, Object not 
initialized);
break;
case SPL_FS_DIR:
-   intern-file_name_len = spprintf(intern-file_name, 0, 
%s%c%s, intern-path, DEFAULT_SLASH, intern-u.dir.entry.d_name);
+   if (intern-path_type == IS_UNICODE) {
+   intern-file_name_len = 
spprintf(intern-file_name.s, 0, %s%c%s, intern-path, DEFAULT_SLASH, 
intern-u.dir.entry.d_name);
+   } else {
+   intern-file_name_len = 
uspprintf(intern-file_name.s, 0, %r%c%s, intern-path, DEFAULT_SLASH, 
intern-u.dir.entry.d_name);
+   }
+   intern-file_name_type = intern-path_type;
break;
}
}
 } /* }}} */
 
+#if defined(PHP_WIN32) || defined(NETWARE)
+# define is_slash(c) (c == '/' || c == '\\')
+#else
+# define is_slash(c) (c == '/')
+#endif
+
+#define is_slash_at(type, zs, pos) (type == IS_UNICODE ? is_slash(zs.u[pos]) : 
is_slash(zs.s[pos]))
+
 /* {{{ spl_filesystem_dir_open */
 /* open a directory resource */
-static void spl_filesystem_dir_open(spl_filesystem_object* intern, char *path 
TSRMLS_DC)
+static void spl_filesystem_dir_open(spl_filesystem_object* intern, zend_uchar 
type, zstr path, int path_len TSRMLS_DC)
 {
intern-type = SPL_FS_DIR;
-   intern-path_len = strlen(path);
-   intern-u.dir.dirp = php_stream_opendir(path, REPORT_ERRORS, NULL);
+   intern-path_type= type;
+   intern-path_len = path_len;
+   intern-u.dir.dirp = php_stream_u_opendir(type, path, path_len, 
REPORT_ERRORS, NULL);
 
-   if (intern-path_len  (path[intern-path_len-1] == '/'
-#if defined(PHP_WIN32) || defined(NETWARE)
-   || path[intern-path_len-1] == '\\'
-#endif
-   )) {
-   intern-path = estrndup(path, --intern-path_len);
+   if (intern-path_len  is_slash_at(type, path, intern-path_len-1)) {
+   intern-path = ezstrndup(type, path, --intern-path_len);
} else {
-   intern-path = estrndup(path, intern-path_len);
+   intern-path = ezstrndup(type, path, intern-path_len);
}
intern-u.dir.index = 0;
 
@@ -204,13 +214,13 @@
 {
intern-type = SPL_FS_FILE;
intern-u.file.context = 
php_stream_context_from_zval(intern-u.file.zcontext, 0);
-   intern-u.file.stream = php_stream_open_wrapper_ex(intern-file_name, 
intern-u.file.open_mode, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, 
NULL, intern-u.file.context);
+   intern-u.file.stream = 
php_stream_u_open_wrapper(intern-file_name_type, intern-file_name, 
intern-file_name_len, intern-u.file.open_mode, (use_include_path ? USE_PATH : 
0) | REPORT_ERRORS, NULL, intern-u.file.context);
 
if (!intern-file_name_len || !intern-u.file.stream) {
if (!EG(exception)) {
-   

[PHP-CVS] cvs: php-src /ext/soap php_http.c php_xml.c

2007-01-16 Thread Sara Golemon
pollita Wed Jan 17 00:22:48 2007 UTC

  Modified files:  
/php-src/ext/soap   php_http.c php_xml.c 
  Log:
  INI options should not be modified directly.
  Bad extension.  No cookie for you.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.99r2=1.100diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.99 php-src/ext/soap/php_http.c:1.100
--- php-src/ext/soap/php_http.c:1.99Mon Jan  1 09:29:29 2007
+++ php-src/ext/soap/php_http.c Wed Jan 17 00:22:48 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.99 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: php_http.c,v 1.100 2007/01/17 00:22:48 pollita Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
@@ -318,12 +318,12 @@
}
 
old_allow_url_fopen = PG(allow_url_fopen);
-   PG(allow_url_fopen) = 1;
+   zend_alter_ini_entry(allow_url_fopen, sizeof(allow_url_fopen), 1, 
1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
if (use_ssl  php_stream_locate_url_wrapper(https://;, NULL, 
STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) == NULL) {
php_url_free(phpurl);
if (request != buf) {efree(request);}
add_soap_fault(this_ptr, HTTP, SSL support is not available 
in this build, NULL, NULL TSRMLS_CC);
-   PG(allow_url_fopen) = old_allow_url_fopen;
+   zend_alter_ini_entry(allow_url_fopen, 
sizeof(allow_url_fopen), old_allow_url_fopen ? 1 : 0, 1, PHP_INI_SYSTEM, 
PHP_INI_STAGE_RUNTIME);
return FALSE;
}
 
@@ -376,11 +376,11 @@
php_url_free(phpurl);
if (request != buf) {efree(request);}
add_soap_fault(this_ptr, HTTP, Could not connect to 
host, NULL, NULL TSRMLS_CC);
-   PG(allow_url_fopen) = old_allow_url_fopen;
+   zend_alter_ini_entry(allow_url_fopen, 
sizeof(allow_url_fopen), old_allow_url_fopen ? 1 : 0, 1, PHP_INI_SYSTEM, 
PHP_INI_STAGE_RUNTIME);
return FALSE;
}
}
-   PG(allow_url_fopen) = old_allow_url_fopen;
+   zend_alter_ini_entry(allow_url_fopen, sizeof(allow_url_fopen), 
old_allow_url_fopen ? 1 : 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
 
if (stream) {
if (client-url) {
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_xml.c?r1=1.30r2=1.31diff_format=u
Index: php-src/ext/soap/php_xml.c
diff -u php-src/ext/soap/php_xml.c:1.30 php-src/ext/soap/php_xml.c:1.31
--- php-src/ext/soap/php_xml.c:1.30 Mon Jan  1 09:29:29 2007
+++ php-src/ext/soap/php_xml.c  Wed Jan 17 00:22:48 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_xml.c,v 1.30 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: php_xml.c,v 1.31 2007/01/17 00:22:48 pollita Exp $ */
 
 #include php_soap.h
 #include libxml/parser.h
@@ -87,9 +87,9 @@
 */
 
old_allow_url_fopen = PG(allow_url_fopen);
-   PG(allow_url_fopen) = 1;
+   zend_alter_ini_entry(allow_url_fopen, sizeof(allow_url_fopen), 1, 
1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
ctxt = xmlCreateFileParserCtxt(filename);
-   PG(allow_url_fopen) = old_allow_url_fopen;
+   zend_alter_ini_entry(allow_url_fopen, sizeof(allow_url_fopen), 
old_allow_url_fopen ? 1 : 0, 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
if (ctxt) {
ctxt-keepBlanks = 0;
ctxt-sax-ignorableWhitespace = soap_ignorableWhitespace;

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



Re: [PHP-CVS] cvs: php-src /ext/standard formatted_print.c

2007-01-16 Thread Matt Wilmas
Hi Ilia,

- Original Message -
From: Ilia Alshanetsky
Sent: Saturday, January 13, 2007

 iliaa Sat Jan 13 16:32:29 2007 UTC
 
   Modified files:  
 /php-src/ext/standard formatted_print.c 
   Log:
   
   MFB: Improve validation of argnum, width and precision.
   [...]
 - php_error_docref(NULL TSRMLS_CC, E_WARNING, Zero is not a valid argument 
 number);
 + php_error_docref(NULL TSRMLS_CC, E_WARNING, Argument number must be 
 greater then zero.);
   return NULL;
   }
  
 + php_error_docref(NULL TSRMLS_CC, E_WARNING, Width must be greater then 
 zero and less then %d., INT_MAX);
 + return NULL;
 + }

 + php_error_docref(NULL TSRMLS_CC, E_WARNING, Precision must be greater then 
 zero and less then %d., INT_MAX);
 + return NULL;
 + }


Just a grammar nit-pick, but in those new error messages, then should be
than. :-)  Also, just noticed the period at the end of the messages, which
the vast majority of messages elsewhere don't have, so seems like they
should be removed.  (I sent a patch a few months ago to remove trailing
periods in the few errors that had one, and Hannes just applied it to HEAD;
although a few others were added back since then...)  IMO, those periods
make the full generated warning line look weird, which was also mentioned in
Bug #39112.

If you want/need patches to save time, let me know...


Matt

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