summaryrefslogtreecommitdiff
path: root/ext/phar/zip.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2013-09-13 21:40:32 +0200
committerNikita Popov <nikic@php.net>2013-09-13 21:49:09 +0200
commitdb6d93fecab928058956c71c35c67658152726b1 (patch)
tree411ad82763182a0127aeff61f556bc0fa922b15d /ext/phar/zip.c
parente6b228332f3cd7b9e3a5f3ba8a8e08ae1b01abdf (diff)
downloadphp-git-db6d93fecab928058956c71c35c67658152726b1.tar.gz
Remove some more unnecessary macros from phar
Diffstat (limited to 'ext/phar/zip.c')
-rw-r--r--ext/phar/zip.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index e3b64859b8..2e977b8840 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -417,11 +417,11 @@ foundit:
php_stream_seek(fp, 0, SEEK_SET);
/* copy file contents + local headers and zip comment, if any, to be hashed for signature */
- phar_stream_copy_to_stream(fp, sigfile, entry.header_offset, NULL);
+ php_stream_copy_to_stream_ex(fp, sigfile, entry.header_offset, NULL);
/* seek to central directory */
php_stream_seek(fp, PHAR_GET_32(locator.cdir_offset), SEEK_SET);
/* copy central directory header */
- phar_stream_copy_to_stream(fp, sigfile, beforeus - PHAR_GET_32(locator.cdir_offset), NULL);
+ php_stream_copy_to_stream_ex(fp, sigfile, beforeus - PHAR_GET_32(locator.cdir_offset), NULL);
if (metadata) {
php_stream_write(sigfile, metadata, PHAR_GET_16(locator.comment_len));
}
@@ -905,7 +905,7 @@ static int phar_zip_changed_apply(void *data, void *arg TSRMLS_DC) /* {{{ */
php_stream_filter_append((&entry->cfp->writefilters), filter);
- if (SUCCESS != phar_stream_copy_to_stream(efp, entry->cfp, entry->uncompressed_filesize, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(efp, entry->cfp, entry->uncompressed_filesize, NULL)) {
spprintf(p->error, 0, "unable to copy compressed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
}
@@ -1010,7 +1010,7 @@ continue_dir:
if (!not_really_modified && entry->is_modified) {
if (entry->cfp) {
- if (SUCCESS != phar_stream_copy_to_stream(entry->cfp, p->filefp, entry->compressed_filesize, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(entry->cfp, p->filefp, entry->compressed_filesize, NULL)) {
spprintf(p->error, 0, "unable to write compressed contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
}
@@ -1024,7 +1024,7 @@ continue_dir:
phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC);
- if (SUCCESS != phar_stream_copy_to_stream(phar_get_efp(entry, 0 TSRMLS_CC), p->filefp, entry->uncompressed_filesize, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(phar_get_efp(entry, 0 TSRMLS_CC), p->filefp, entry->uncompressed_filesize, NULL)) {
spprintf(p->error, 0, "unable to write contents of file \"%s\" in zip-based phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
}
@@ -1050,7 +1050,7 @@ continue_dir:
}
}
- if (!entry->is_dir && entry->compressed_filesize && SUCCESS != phar_stream_copy_to_stream(p->old, p->filefp, entry->compressed_filesize, NULL)) {
+ if (!entry->is_dir && entry->compressed_filesize && SUCCESS != php_stream_copy_to_stream_ex(p->old, p->filefp, entry->compressed_filesize, NULL)) {
spprintf(p->error, 0, "unable to copy contents of file \"%s\" while creating zip-based phar \"%s\"", entry->filename, entry->phar->fname);
return ZEND_HASH_APPLY_STOP;
}
@@ -1093,10 +1093,10 @@ static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pas
st = tell = php_stream_tell(pass->filefp);
/* copy the local files, central directory, and the zip comment to generate the hash */
php_stream_seek(pass->filefp, 0, SEEK_SET);
- phar_stream_copy_to_stream(pass->filefp, newfile, tell, NULL);
+ php_stream_copy_to_stream_ex(pass->filefp, newfile, tell, NULL);
tell = php_stream_tell(pass->centralfp);
php_stream_seek(pass->centralfp, 0, SEEK_SET);
- phar_stream_copy_to_stream(pass->centralfp, newfile, tell, NULL);
+ php_stream_copy_to_stream_ex(pass->centralfp, newfile, tell, NULL);
if (metadata->c) {
php_stream_write(newfile, metadata->c, metadata->len);
}
@@ -1431,7 +1431,7 @@ nocentralerror:
{
size_t clen;
- int ret = phar_stream_copy_to_stream(pass.centralfp, pass.filefp, PHP_STREAM_COPY_ALL, &clen);
+ int ret = php_stream_copy_to_stream_ex(pass.centralfp, pass.filefp, PHP_STREAM_COPY_ALL, &clen);
if (SUCCESS != ret || clen != cdir_size) {
if (error) {
spprintf(error, 4096, "phar zip flush of \"%s\" failed: unable to write central-directory", phar->fname);
@@ -1501,7 +1501,7 @@ nocentralerror:
return EOF;
}
php_stream_rewind(pass.filefp);
- phar_stream_copy_to_stream(pass.filefp, phar->fp, PHP_STREAM_COPY_ALL, NULL);
+ php_stream_copy_to_stream_ex(pass.filefp, phar->fp, PHP_STREAM_COPY_ALL, NULL);
/* we could also reopen the file in "rb" mode but there is no need for that */
php_stream_close(pass.filefp);
}