cellog          Fri May 30 22:38:46 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/phar   dirstream.c dirstream.h phar.c phar_internal.h 
                        phar_object.c stream.c stream.h tar.c zip.c 
  Log:
  refactor function names for clarity.  No functionality change
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/dirstream.c?r1=1.26.2.2&r2=1.26.2.3&diff_format=u
Index: php-src/ext/phar/dirstream.c
diff -u php-src/ext/phar/dirstream.c:1.26.2.2 
php-src/ext/phar/dirstream.c:1.26.2.3
--- php-src/ext/phar/dirstream.c:1.26.2.2       Thu May 15 16:09:00 2008
+++ php-src/ext/phar/dirstream.c        Fri May 30 22:38:46 2008
@@ -309,7 +309,7 @@
        phar_entry_info *entry = NULL;
        uint host_len;
 
-       if ((resource = phar_open_url(wrapper, path, mode, options TSRMLS_CC)) 
== NULL) {
+       if ((resource = phar_parse_url(wrapper, path, mode, options TSRMLS_CC)) 
== NULL) {
                php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar 
url \"%s\" is unknown", path);
                return NULL;
        }
@@ -427,7 +427,7 @@
                return FAILURE;
        }
 
-       if ((resource = phar_open_url(wrapper, url_from, "w", options 
TSRMLS_CC)) == NULL) {
+       if ((resource = phar_parse_url(wrapper, url_from, "w", options 
TSRMLS_CC)) == NULL) {
                return FAILURE;
        }
 
@@ -546,7 +546,7 @@
                return FAILURE;
        }
 
-       if ((resource = phar_open_url(wrapper, url, "w", options TSRMLS_CC)) == 
NULL) {
+       if ((resource = phar_parse_url(wrapper, url, "w", options TSRMLS_CC)) 
== NULL) {
                return FAILURE;
        }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/dirstream.h?r1=1.5&r2=1.5.2.1&diff_format=u
Index: php-src/ext/phar/dirstream.h
diff -u php-src/ext/phar/dirstream.h:1.5 php-src/ext/phar/dirstream.h:1.5.2.1
--- php-src/ext/phar/dirstream.h:1.5    Mon Apr 14 04:46:59 2008
+++ php-src/ext/phar/dirstream.h        Fri May 30 22:38:46 2008
@@ -17,14 +17,14 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: dirstream.h,v 1.5 2008/04/14 04:46:59 cellog Exp $ */
+/* $Id: dirstream.h,v 1.5.2.1 2008/05/30 22:38:46 cellog Exp $ */
 
 BEGIN_EXTERN_C()
 int phar_wrapper_mkdir(php_stream_wrapper *wrapper, char *url_from, int mode, 
int options, php_stream_context *context TSRMLS_DC);
 int phar_wrapper_rmdir(php_stream_wrapper *wrapper, char *url, int options, 
php_stream_context *context TSRMLS_DC);
 
 #ifdef PHAR_DIRSTREAM
-php_url* phar_open_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC);
+php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC);
 
 /* directory handlers */
 static size_t phar_dir_write(php_stream *stream, const char *buf, size_t count 
TSRMLS_DC);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.7&r2=1.370.2.8&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.7 php-src/ext/phar/phar.c:1.370.2.8
--- php-src/ext/phar/phar.c:1.370.2.7   Thu May 29 17:34:49 2008
+++ php-src/ext/phar/phar.c     Fri May 30 22:38:46 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar.c,v 1.370.2.7 2008/05/29 17:34:49 cellog Exp $ */
+/* $Id: phar.c,v 1.370.2.8 2008/05/30 22:38:46 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -363,7 +363,7 @@
 /**
  * Open an already loaded phar
  */
-int phar_open_loaded(char *fname, int fname_len, char *alias, int alias_len, 
int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* 
{{{ */
+int phar_open_parsed_phar(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
 {
        phar_archive_data *phar;
 #ifdef PHP_WIN32
@@ -489,10 +489,10 @@
  * Parse a new one and add it to the cache, returning either SUCCESS or 
  * FAILURE, and setting pphar to the pointer to the manifest entry
  * 
- * This is used by phar_open_filename to process the manifest, but can be 
called
+ * This is used by phar_open_from_filename to process the manifest, but can be 
called
  * directly.
  */
-int phar_open_file(php_stream *fp, char *fname, int fname_len, char *alias, 
int alias_len, long halt_offset, phar_archive_data** pphar, php_uint32 
compression, char **error TSRMLS_DC) /* {{{ */
+int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char 
*alias, int alias_len, long halt_offset, phar_archive_data** pphar, php_uint32 
compression, char **error TSRMLS_DC) /* {{{ */
 {
        char b32[4], *buffer, *endbuffer, *savebuf;
        phar_archive_data *mydata = NULL;
@@ -1001,7 +1001,7 @@
        }
 
 check_file:
-       if (phar_open_loaded(fname, fname_len, alias, alias_len, is_data, 
options, test, &my_error TSRMLS_CC) == SUCCESS) {
+       if (phar_open_parsed_phar(fname, fname_len, alias, alias_len, is_data, 
options, test, &my_error TSRMLS_CC) == SUCCESS) {
                if (pphar) {
                        *pphar = *test;
                }
@@ -1072,7 +1072,7 @@
        }
 
        if (fp) {
-               if (phar_open_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
+               if (phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
                        if ((*pphar)->is_data || !PHAR_G(readonly)) {
                                (*pphar)->is_writeable = 1;
                        }
@@ -1182,10 +1182,10 @@
  * Return an already opened filename.
  *
  * Or scan a phar file for the required __HALT_COMPILER(); ?> token and verify
- * that the manifest is proper, then pass it to phar_open_file().  SUCCESS
+ * that the manifest is proper, then pass it to phar_parse_pharfile().  SUCCESS
  * or FAILURE is returned and pphar is set to a pointer to the phar's manifest
  */
-int phar_open_filename(char *fname, int fname_len, char *alias, int alias_len, 
int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */
+int phar_open_from_filename(char *fname, int fname_len, char *alias, int 
alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC) /* 
{{{ */
 {
        php_stream *fp;
        char *actual;
@@ -1199,7 +1199,7 @@
                is_data = 1;
        }
 
-       if (phar_open_loaded(fname, fname_len, alias, alias_len, is_data, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
+       if (phar_open_parsed_phar(fname, fname_len, alias, alias_len, is_data, 
options, pphar, error TSRMLS_CC) == SUCCESS) {
                return SUCCESS;
        } else if (error && *error) {
                return FAILURE;
@@ -1233,7 +1233,7 @@
                fname_len = strlen(actual);
        }
 
-       ret =  phar_open_fp(fp, fname, fname_len, alias, alias_len, options, 
pphar, error TSRMLS_CC);
+       ret =  phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
options, pphar, error TSRMLS_CC);
        if (actual) {
                efree(actual);
        }
@@ -1264,10 +1264,10 @@
 
 /**
  * Scan an open fp for the required __HALT_COMPILER(); ?> token and verify
- * that the manifest is proper, then pass it to phar_open_file().  SUCCESS
+ * that the manifest is proper, then pass it to phar_parse_pharfile().  SUCCESS
  * or FAILURE is returned and pphar is set to a pointer to the phar's manifest
  */
-static int phar_open_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
+static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC) /* {{{ */
 {
        const char token[] = "__HALT_COMPILER();";
        const char zip_magic[] = "PK\x03\x04";
@@ -1389,18 +1389,18 @@
                        }
                        if (!memcmp(pos, zip_magic, 4)) {
                                php_stream_seek(fp, 0, SEEK_END);
-                               return phar_open_zipfile(fp, fname, fname_len, 
alias, alias_len, pphar, error TSRMLS_CC);
+                               return phar_parse_zipfile(fp, fname, fname_len, 
alias, alias_len, pphar, error TSRMLS_CC);
                        }
                        if (got > 512) {
                                if (phar_is_tar(pos, fname)) {
                                        php_stream_rewind(fp);
-                                       return phar_open_tarfile(fp, fname, 
fname_len, alias, alias_len, options, pphar, compression, error TSRMLS_CC);
+                                       return phar_parse_tarfile(fp, fname, 
fname_len, alias, alias_len, options, pphar, compression, error TSRMLS_CC);
                                }
                        }
                }
                if ((pos = phar_strnstr(buffer, 1024 + sizeof(token), token, 
sizeof(token)-1)) != NULL) {
                        halt_offset += (pos - buffer); /* no -tokenlen+tokenlen 
here */
-                       return phar_open_file(fp, fname, fname_len, alias, 
alias_len, halt_offset, pphar, compression, error TSRMLS_CC);
+                       return phar_parse_pharfile(fp, fname, fname_len, alias, 
alias_len, halt_offset, pphar, compression, error TSRMLS_CC);
                }
 
                halt_offset += got;
@@ -1814,7 +1814,7 @@
  *
  * Optionally the name might start with 'phar://'
  *
- * This is used by phar_open_url()
+ * This is used by phar_parse_url()
  */
 int phar_split_fname(char *filename, int filename_len, char **arch, int 
*arch_len, char **entry, int *entry_len, int executable, int for_create 
TSRMLS_DC) /* {{{ */
 {
@@ -1879,7 +1879,7 @@
  * Invoked when a user calls Phar::mapPhar() from within an executing .phar
  * to set up its manifest directly
  */
-int phar_open_compiled_file(char *alias, int alias_len, char **error 
TSRMLS_DC) /* {{{ */
+int phar_open_executed_filename(char *alias, int alias_len, char **error 
TSRMLS_DC) /* {{{ */
 {
        char *fname;
        long halt_offset;
@@ -1895,7 +1895,7 @@
        fname = zend_get_executed_filename(TSRMLS_C);
        fname_len = strlen(fname);
 
-       if (phar_open_loaded(fname, fname_len, alias, alias_len, 0, 
REPORT_ERRORS, NULL, 0 TSRMLS_CC) == SUCCESS) {
+       if (phar_open_parsed_phar(fname, fname_len, alias, alias_len, 0, 
REPORT_ERRORS, NULL, 0 TSRMLS_CC) == SUCCESS) {
                return SUCCESS;
        }
 
@@ -1944,7 +1944,7 @@
                fname_len = strlen(actual);
        }
 
-       ret = phar_open_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, error TSRMLS_CC);
+       ret = phar_open_from_fp(fp, fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, error TSRMLS_CC);
        if (actual) {
                efree(actual);
        }
@@ -2855,7 +2855,7 @@
        phar_archive_data *phar;
 
        if (strstr(file_handle->filename, ".phar") && 
!strstr(file_handle->filename, "://")) {
-               if (SUCCESS == phar_open_filename(file_handle->filename, 
strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
+               if (SUCCESS == phar_open_from_filename(file_handle->filename, 
strlen(file_handle->filename), NULL, 0, 0, &phar, NULL TSRMLS_CC)) {
                        if (phar->is_zip || phar->is_tar) {
                                zend_file_handle f = *file_handle;
 
@@ -3052,7 +3052,7 @@
        php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
        php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
        php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
-       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.7 $");
+       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.8 $");
        php_info_print_table_row(2, "Phar-based phar archives", "enabled");
        php_info_print_table_row(2, "Tar-based phar archives", "enabled");
        php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.109.2.4&r2=1.109.2.5&diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.109.2.4 
php-src/ext/phar/phar_internal.h:1.109.2.5
--- php-src/ext/phar/phar_internal.h:1.109.2.4  Wed May 21 22:00:43 2008
+++ php-src/ext/phar/phar_internal.h    Fri May 30 22:38:46 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar_internal.h,v 1.109.2.4 2008/05/21 22:00:43 cellog Exp $ */
+/* $Id: phar_internal.h,v 1.109.2.5 2008/05/30 22:38:46 cellog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -398,13 +398,13 @@
 void phar_destroy_phar_data(phar_archive_data *phar TSRMLS_DC);
 
 int phar_open_entry_file(phar_archive_data *phar, phar_entry_info *entry, char 
**error TSRMLS_DC);
-int phar_open_filename(char *fname, int fname_len, char *alias, int alias_len, 
int options, phar_archive_data** pphar, char **error TSRMLS_DC);
+int phar_open_from_filename(char *fname, int fname_len, char *alias, int 
alias_len, int options, phar_archive_data** pphar, char **error TSRMLS_DC);
 int phar_open_or_create_filename(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
 int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
-int phar_open_compiled_file(char *alias, int alias_len, char **error 
TSRMLS_DC);
+int phar_open_executed_filename(char *alias, int alias_len, char **error 
TSRMLS_DC);
 int phar_free_alias(phar_archive_data *phar, char *alias, int alias_len 
TSRMLS_DC);
 int phar_get_archive(phar_archive_data **archive, char *fname, int fname_len, 
char *alias, int alias_len, char **error TSRMLS_DC);
-int phar_open_loaded(char *fname, int fname_len, char *alias, int alias_len, 
int is_data, int options, phar_archive_data** pphar, char **error TSRMLS_DC);
+int phar_open_parsed_phar(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
 
 /* utility functions */
 char *phar_create_default_stub(const char *index_php, const char *web_index, 
size_t *len, char **error TSRMLS_DC);
@@ -429,17 +429,17 @@
 
 /* tar functions in tar.c */
 int phar_is_tar(char *buf, char *fname);
-int phar_open_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, 
int alias_len, int options, phar_archive_data** pphar, php_uint32 compression, 
char **error TSRMLS_DC);
+int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, php_uint32 
compression, char **error TSRMLS_DC);
 int phar_open_or_create_tar(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
 int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int 
defaultstub, char **error TSRMLS_DC);
 
 /* zip functions in zip.c */
-int phar_open_zipfile(php_stream *fp, char *fname, int fname_len, char *alias, 
int alias_len, phar_archive_data** pphar, char **error TSRMLS_DC);
+int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char 
*alias, int alias_len, phar_archive_data** pphar, char **error TSRMLS_DC);
 int phar_open_or_create_zip(char *fname, int fname_len, char *alias, int 
alias_len, int is_data, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
 int phar_zip_flush(phar_archive_data *archive, char *user_stub, long len, int 
defaultstub, char **error TSRMLS_DC);
 
 #ifdef PHAR_MAIN
-static int phar_open_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
+static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, char **error 
TSRMLS_DC);
 extern php_stream_wrapper php_stream_phar_wrapper;
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.12&r2=1.266.2.13&diff_format=u
Index: php-src/ext/phar/phar_object.c
diff -u php-src/ext/phar/phar_object.c:1.266.2.12 
php-src/ext/phar/phar_object.c:1.266.2.13
--- php-src/ext/phar/phar_object.c:1.266.2.12   Sat May 24 13:13:47 2008
+++ php-src/ext/phar/phar_object.c      Fri May 30 22:38:46 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar_object.c,v 1.266.2.12 2008/05/24 13:13:47 sfox Exp $ */
+/* $Id: phar_object.c,v 1.266.2.13 2008/05/30 22:38:46 cellog Exp $ */
 
 #include "phar_internal.h"
 #include "func_interceptors.h"
@@ -530,7 +530,7 @@
        phar_request_initialize(TSRMLS_C);
        fname = zend_get_executed_filename(TSRMLS_C);
        fname_len = strlen(fname);
-       if (phar_open_compiled_file(alias, alias_len, &error TSRMLS_CC) != 
SUCCESS) {
+       if (phar_open_executed_filename(alias, alias_len, &error TSRMLS_CC) != 
SUCCESS) {
                if (error) {
                        zend_throw_exception_ex(phar_ce_PharException, 0 
TSRMLS_CC, error);
                        efree(error);
@@ -979,7 +979,7 @@
 
        phar_request_initialize(TSRMLS_C);
 
-       RETVAL_BOOL(phar_open_compiled_file(alias, alias_len, &error TSRMLS_CC) 
== SUCCESS);
+       RETVAL_BOOL(phar_open_executed_filename(alias, alias_len, &error 
TSRMLS_CC) == SUCCESS);
        if (error) {
                zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, 
error);
                efree(error);
@@ -999,7 +999,7 @@
 
        phar_request_initialize(TSRMLS_C);
 
-       RETVAL_BOOL(phar_open_filename(fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, &error TSRMLS_CC) == SUCCESS);
+       RETVAL_BOOL(phar_open_from_filename(fname, fname_len, alias, alias_len, 
REPORT_ERRORS, NULL, &error TSRMLS_CC) == SUCCESS);
        if (error) {
                zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, 
error);
                efree(error);
@@ -1289,7 +1289,7 @@
                return;
        }
 
-       if (FAILURE == phar_open_filename(fname, fname_len, NULL, 0, 
REPORT_ERRORS, &phar, &error TSRMLS_CC)) {
+       if (FAILURE == phar_open_from_filename(fname, fname_len, NULL, 0, 
REPORT_ERRORS, &phar, &error TSRMLS_CC)) {
                if (error) {
                        zend_throw_exception_ex(phar_ce_PharException, 0 
TSRMLS_CC, "Unknown phar archive \"%s\": %s", fname, error);
                        efree(error);
@@ -3939,7 +3939,7 @@
                return;
        }
 
-       if (phar_open_filename(arch, arch_len, NULL, 0, REPORT_ERRORS, 
&phar_data, &error TSRMLS_CC) == FAILURE) {
+       if (phar_open_from_filename(arch, arch_len, NULL, 0, REPORT_ERRORS, 
&phar_data, &error TSRMLS_CC) == FAILURE) {
                efree(arch);
                efree(entry);
                if (error) {
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/stream.c?r1=1.27.2.2&r2=1.27.2.3&diff_format=u
Index: php-src/ext/phar/stream.c
diff -u php-src/ext/phar/stream.c:1.27.2.2 php-src/ext/phar/stream.c:1.27.2.3
--- php-src/ext/phar/stream.c:1.27.2.2  Thu May 15 16:09:00 2008
+++ php-src/ext/phar/stream.c   Fri May 30 22:38:46 2008
@@ -56,7 +56,7 @@
 /**
  * Open a phar file for streams API
  */
-php_url* phar_open_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC) /* {{{ */
+php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC) /* {{{ */
 {
        php_url *resource;
        char *arch = NULL, *entry = NULL, *error;
@@ -125,7 +125,7 @@
                        return NULL;
                }
        } else {
-               if (phar_open_filename(resource->host, arch_len, NULL, 0, 
options, NULL, &error TSRMLS_CC) == FAILURE)
+               if (phar_open_from_filename(resource->host, arch_len, NULL, 0, 
options, NULL, &error TSRMLS_CC) == FAILURE)
                {
                        if (error) {
                                if (!(options & PHP_STREAM_URL_STAT_QUIET)) {
@@ -155,7 +155,7 @@
        zval **pzoption, *metadata;
        uint host_len;
 
-       if ((resource = phar_open_url(wrapper, path, mode, options TSRMLS_CC)) 
== NULL) {
+       if ((resource = phar_parse_url(wrapper, path, mode, options TSRMLS_CC)) 
== NULL) {
                return NULL;
        }
 
@@ -511,7 +511,7 @@
        uint host_len;
        int internal_file_len;
 
-       if ((resource = phar_open_url(wrapper, url, "r", 
flags|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
+       if ((resource = phar_parse_url(wrapper, url, "r", 
flags|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
                return FAILURE;
        }
 
@@ -644,7 +644,7 @@
        phar_archive_data **pphar;
        uint host_len;
 
-       if ((resource = phar_open_url(wrapper, url, "rb", options TSRMLS_CC)) 
== NULL) {
+       if ((resource = phar_parse_url(wrapper, url, "rb", options TSRMLS_CC)) 
== NULL) {
                php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar 
error: unlink failed");
                return 0;
        }
@@ -720,7 +720,7 @@
 
        error = NULL;
 
-       if ((resource_from = phar_open_url(wrapper, url_from, "wb", 
options|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
+       if ((resource_from = phar_parse_url(wrapper, url_from, "wb", 
options|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: cannot 
rename \"%s\" to \"%s\": invalid or non-writable url \"%s\"", url_from, url_to, 
url_from);
                return 0;
        }
@@ -736,7 +736,7 @@
                return 0;
        }
 
-       if ((resource_to = phar_open_url(wrapper, url_to, "wb", 
options|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
+       if ((resource_to = phar_parse_url(wrapper, url_to, "wb", 
options|PHP_STREAM_URL_STAT_QUIET TSRMLS_CC)) == NULL) {
                php_url_free(resource_from);
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: cannot 
rename \"%s\" to \"%s\": invalid or non-writable url \"%s\"", url_from, url_to, 
url_to);
                return 0;
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/stream.h?r1=1.3&r2=1.3.2.1&diff_format=u
Index: php-src/ext/phar/stream.h
diff -u php-src/ext/phar/stream.h:1.3 php-src/ext/phar/stream.h:1.3.2.1
--- php-src/ext/phar/stream.h:1.3       Mon Jan 28 08:52:06 2008
+++ php-src/ext/phar/stream.h   Fri May 30 22:38:46 2008
@@ -17,12 +17,12 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: stream.h,v 1.3 2008/01/28 08:52:06 cellog Exp $ */
+/* $Id: stream.h,v 1.3.2.1 2008/05/30 22:38:46 cellog Exp $ */
 
 BEGIN_EXTERN_C()
 int phar_postprocess_file(php_stream_wrapper *wrapper, int options, 
phar_entry_data *idata, php_uint32 crc32, char **error TSRMLS_DC);
 
-php_url* phar_open_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC);
+php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char 
*mode, int options TSRMLS_DC);
 void phar_entry_remove(phar_entry_data *idata, char **error TSRMLS_DC);
 
 static php_stream* phar_wrapper_open_url(php_stream_wrapper *wrapper, char 
*path, char *mode, int options, char **opened_path, php_stream_context *context 
STREAMS_DC TSRMLS_DC);
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tar.c?r1=1.55.2.3&r2=1.55.2.4&diff_format=u
Index: php-src/ext/phar/tar.c
diff -u php-src/ext/phar/tar.c:1.55.2.3 php-src/ext/phar/tar.c:1.55.2.4
--- php-src/ext/phar/tar.c:1.55.2.3     Thu May 22 06:33:09 2008
+++ php-src/ext/phar/tar.c      Fri May 30 22:38:46 2008
@@ -187,7 +187,7 @@
        return SUCCESS;
 }
 
-int phar_open_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, 
int alias_len, int options, phar_archive_data** pphar, php_uint32 compression, 
char **error TSRMLS_DC) /* {{{ */
+int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char 
*alias, int alias_len, int options, phar_archive_data** pphar, php_uint32 
compression, char **error TSRMLS_DC) /* {{{ */
 {
        char buf[512], *actual_alias = NULL, *p;
        phar_entry_info entry = {0};
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.2&r2=1.47.2.3&diff_format=u
Index: php-src/ext/phar/zip.c
diff -u php-src/ext/phar/zip.c:1.47.2.2 php-src/ext/phar/zip.c:1.47.2.3
--- php-src/ext/phar/zip.c:1.47.2.2     Thu May 22 06:33:09 2008
+++ php-src/ext/phar/zip.c      Fri May 30 22:38:46 2008
@@ -140,10 +140,10 @@
  * Parse a new one and add it to the cache, returning either SUCCESS or 
  * FAILURE, and setting pphar to the pointer to the manifest entry
  * 
- * This is used by phar_open_fp to process a zip-based phar, but can be called
+ * This is used by phar_open_from_fp to process a zip-based phar, but can be 
called
  * directly.
  */
-int phar_open_zipfile(php_stream *fp, char *fname, int fname_len, char *alias, 
int alias_len, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */
+int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char 
*alias, int alias_len, phar_archive_data** pphar, char **error TSRMLS_DC) /* 
{{{ */
 {
        phar_zip_dir_end locator;
        char buf[sizeof(locator) + 65536];

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

Reply via email to