tony2001                Fri Jan  9 18:23:45 2009 UTC

  Modified files:              
    /php-src/ext/standard       file.c ftp_fopen_wrapper.c mail.c string.c 
                                php_string.h 
  Log:
  change functions to be consistent between branches
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.535&r2=1.536&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.535 php-src/ext/standard/file.c:1.536
--- php-src/ext/standard/file.c:1.535   Wed Dec 31 11:12:36 2008
+++ php-src/ext/standard/file.c Fri Jan  9 18:23:45 2009
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: file.c,v 1.535 2008/12/31 11:12:36 sebastian Exp $ */
+/* $Id: file.c,v 1.536 2009/01/09 18:23:45 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -911,17 +911,18 @@
 {
        zval **ppdir, **ppprefix;
        char *dir, *prefix;
-       int dir_len, prefix_len, p_len;
+       int dir_len;
        char *opened_path;
        char *p;
        int fd;
+       size_t p_len, prefix_len;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZZ", &ppdir, 
&ppprefix) == FAILURE) {
                return;
        }
 
        if (php_stream_path_param_encode(ppdir, &dir, &dir_len, REPORT_ERRORS, 
FG(default_context)) == FAILURE ||
-               php_stream_path_param_encode(ppprefix, &prefix, &prefix_len, 
REPORT_ERRORS, FG(default_context)) == FAILURE) {
+               php_stream_path_param_encode(ppprefix, &prefix, (int 
*)&prefix_len, REPORT_ERRORS, FG(default_context)) == FAILURE) {
                RETURN_FALSE;
        }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.104&r2=1.105&diff_format=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.104 
php-src/ext/standard/ftp_fopen_wrapper.c:1.105
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.104      Wed Dec 31 11:12:36 2008
+++ php-src/ext/standard/ftp_fopen_wrapper.c    Fri Jan  9 18:23:45 2009
@@ -18,7 +18,7 @@
    |          Sara Golemon <poll...@php.net>                              |
    +----------------------------------------------------------------------+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.104 2008/12/31 11:12:36 sebastian Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.105 2009/01/09 18:23:45 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -592,7 +592,7 @@
        php_stream *innerstream = (php_stream *)stream->abstract;
        size_t tmp_len;
        char *basename;
-       int basename_len;
+       size_t basename_len;
 
        if (count != sizeof(php_stream_dirent)) {
                return 0;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/mail.c?r1=1.102&r2=1.103&diff_format=u
Index: php-src/ext/standard/mail.c
diff -u php-src/ext/standard/mail.c:1.102 php-src/ext/standard/mail.c:1.103
--- php-src/ext/standard/mail.c:1.102   Fri Jan  9 16:33:57 2009
+++ php-src/ext/standard/mail.c Fri Jan  9 18:23:45 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mail.c,v 1.102 2009/01/09 16:33:57 tony2001 Exp $ */
+/* $Id: mail.c,v 1.103 2009/01/09 18:23:45 tony2001 Exp $ */
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -227,7 +227,7 @@
                char *f;
                size_t f_len;
 
-               php_basename(tmp, strlen(tmp), NULL, 0,&f, &f_len TSRMLS_CC);
+               php_basename(tmp, strlen(tmp), NULL, 0, &f, &f_len TSRMLS_CC);
 
                if (headers != NULL) {
                        spprintf(&hdr, 0, "%s\r\nX-PHP-Originating-Script: 
%ld:%s\n", headers, php_getuid(), f);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.689&r2=1.690&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.689 php-src/ext/standard/string.c:1.690
--- php-src/ext/standard/string.c:1.689 Wed Dec 31 11:12:37 2008
+++ php-src/ext/standard/string.c       Fri Jan  9 18:23:45 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.689 2008/12/31 11:12:37 sebastian Exp $ */
+/* $Id: string.c,v 1.690 2009/01/09 18:23:45 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1847,7 +1847,7 @@
 
 /* {{{ php_u_basename
  */
-PHPAPI void php_u_basename(UChar *s, int len, UChar *suffix, int sufflen, 
UChar **p_ret, int *p_len TSRMLS_DC)
+PHPAPI void php_u_basename(UChar *s, size_t len, UChar *suffix, size_t 
sufflen, UChar **p_ret, size_t *p_len TSRMLS_DC)
 {
        UChar *end, *c, *comp, *cend;
        int state;
@@ -1895,7 +1895,7 @@
 
 /* {{{ php_basename
  */
-PHPAPI void php_basename(char *s, int len, char *suffix, int sufflen, char 
**p_ret, int *p_len TSRMLS_DC)
+PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, 
char **p_ret, size_t *p_len TSRMLS_DC)
 {
        char *ret = NULL, *c, *comp, *cend;
        size_t inc_len, cnt;
@@ -1972,7 +1972,7 @@
        zstr string, suffix = NULL_ZSTR, ret;
        int string_len, suffix_len = 0;
        zend_uchar string_type, suffix_type;
-       int ret_len;
+       size_t ret_len;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T|T", &string, 
&string_len, &string_type, &suffix, &suffix_len, &suffix_type) == FAILURE) {
                return;
@@ -1980,17 +1980,17 @@
 
        if (string_type == IS_UNICODE) {
                php_u_basename(string.u, string_len, suffix.u, suffix_len, 
&ret.u, &ret_len TSRMLS_CC);
-               RETURN_UNICODEL(ret.u, ret_len, 0);
+               RETURN_UNICODEL(ret.u, (int)ret_len, 0);
        } else {
                php_basename(string.s, string_len, suffix.s, suffix_len, 
&ret.s, &ret_len TSRMLS_CC);
-               RETURN_STRINGL(ret.s, ret_len, 0);
+               RETURN_STRINGL(ret.s, (int)ret_len, 0);
        }
 }
 /* }}} */
 
 /* {{{ php_u_dirname
    Returns directory name component of path */
-PHPAPI int php_u_dirname(UChar *path, int len)
+PHPAPI size_t php_u_dirname(UChar *path, size_t len)
 {
        return zend_u_dirname(path, len);
 }
@@ -1998,7 +1998,7 @@
 
 /* {{{ php_dirname
    Returns directory name component of path */
-PHPAPI int php_dirname(char *path, int len)
+PHPAPI size_t php_dirname(char *path, size_t len)
 {
        return zend_dirname(path, len);
 }
@@ -2012,7 +2012,7 @@
        int str_len;
        zend_uchar str_type;
        zstr ret;
-       int ret_len;
+       size_t ret_len;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &str, 
&str_len,
                                                          &str_type) == 
FAILURE) {
@@ -2027,7 +2027,7 @@
                ret_len = php_dirname(ret.s, str_len);
        }
 
-       RETURN_ZSTRL(str_type, ret, ret_len, 0);
+       RETURN_ZSTRL(str_type, ret, (int)ret_len, 0);
 }
 /* }}} */
 
@@ -2038,7 +2038,7 @@
        zstr path, ret = NULL_ZSTR;
        int path_len, have_basename, have_ext, have_filename;
        zend_uchar path_type;
-       int ret_len;
+       size_t ret_len;
        zval *tmp;
        long opt = PHP_PATHINFO_ALL;
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_string.h?r1=1.111&r2=1.112&diff_format=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.111 
php-src/ext/standard/php_string.h:1.112
--- php-src/ext/standard/php_string.h:1.111     Wed Dec 31 11:12:37 2008
+++ php-src/ext/standard/php_string.h   Fri Jan  9 18:23:45 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_string.h,v 1.111 2008/12/31 11:12:37 sebastian Exp $ */
+/* $Id: php_string.h,v 1.112 2009/01/09 18:23:45 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
@@ -136,10 +136,10 @@
 PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC);
 PHPAPI void php_u_stripslashes(UChar *str, int *len TSRMLS_DC);
 PHPAPI void php_stripcslashes(char *str, int *len);
-PHPAPI void php_u_basename(UChar *s, int len, UChar *suffix, int sufflen, 
UChar **p_ret, int *p_len TSRMLS_DC);
-PHPAPI void php_basename(char *s, int len, char *suffix, int sufflen, char 
**p_ret, int *p_len TSRMLS_DC);
-PHPAPI int php_u_dirname(UChar *str, int len);
-PHPAPI int php_dirname(char *str, int len);
+PHPAPI void php_u_basename(UChar *s, size_t len, UChar *suffix, size_t 
sufflen, UChar **p_ret, size_t *p_len TSRMLS_DC);
+PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, 
char **p_ret, size_t *p_len TSRMLS_DC);
+PHPAPI size_t php_u_dirname(UChar *str, size_t len);
+PHPAPI size_t php_dirname(char *str, size_t len);
 PHPAPI UChar *php_u_stristr(UChar *s, UChar *t, int s_len, int t_len, 
zend_bool find_first TSRMLS_DC);
 PHPAPI char *php_stristr(char *s, char *t, size_t s_len, size_t t_len);
 PHPAPI int php_u_strspn(UChar *s1, UChar *s2, UChar *s1_end, UChar *s2_end);

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

Reply via email to