pajoye Sun, 19 Jul 2009 15:21:13 +0000
URL: http://svn.php.net/viewvc?view=revision&revision=284362
Changed paths:
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip.h
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_add.c
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_close.c
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_filerange_crc.c
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_get_archive_flag.c
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_open.c
U php/php-src/branches/PHP_5_2/ext/zip/lib/zip_set_archive_flag.c
Log:
- MF53
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip.h
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip.h 2009-07-19 15:20:48 UTC
(rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip.h 2009-07-19 15:21:13 UTC
(rev 284362)
@@ -20,7 +20,7 @@
3. The names of the authors may not be used to endorse or promote
products derived from this software without specific prior
written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -39,11 +39,11 @@
#ifdef PHP_WIN32
# include "zip_win32.h"
-# ifdef PHP_ZIP_EXPORTS
+# ifdef PHP_ZIP_EXPORTS
# define ZIP_EXTERN(rt) __declspec(dllexport)rt _stdcall
-# else
+# else
# define ZIP_EXTERN(rt) rt
-# endif
+# endif
#elif defined(__GNUC__) && __GNUC__ >= 4
# define ZIP_EXTERN(rt) __attribute__ ((visibility("default"))) rt
#else
@@ -217,7 +217,7 @@
off_t, off_t);
ZIP_EXTERN(void) zip_source_free(struct zip_source *);
ZIP_EXTERN(struct zip_source *)zip_source_function(struct zip *,
- zip_source_callback, void *);
+ zip_source_callback, void *);
ZIP_EXTERN(struct zip_source *)zip_source_zip(struct zip *, struct zip *,
int, int, off_t, off_t);
ZIP_EXTERN(int) zip_stat(struct zip *, const char *, int, struct zip_stat *);
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_add.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_add.c 2009-07-19 15:20:48 UTC
(rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_add.c 2009-07-19 15:21:13 UTC
(rev 284362)
@@ -17,7 +17,7 @@
3. The names of the authors may not be used to endorse or promote
products derived from this software without specific prior
written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_close.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_close.c 2009-07-19
15:20:48 UTC (rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_close.c 2009-07-19
15:21:13 UTC (rev 284362)
@@ -229,12 +229,11 @@
zs = NULL;
if (!ZIP_ENTRY_DATA_CHANGED(za->entry+i)) {
- if ((zs=zip_source_zip(za, za, i, ZIP_FL_RECOMPRESS, 0, -1))
- == NULL) {
- error = 1;
- break;
+ if ((zs=zip_source_zip(za, za, i, ZIP_FL_RECOMPRESS, 0,
-1)) == NULL) {
+ error = 1;
+ break;
+ }
}
- }
if (add_data(za, zs ? zs : za->entry[i].source, &de, out) < 0) {
error = 1;
@@ -286,19 +285,19 @@
return -1;
}
- if (za->zp) {
- fclose(za->zp);
- za->zp = NULL;
- reopen_on_error = 1;
+ if (za->zp) {
+ fclose(za->zp);
+ za->zp = NULL;
+ reopen_on_error = 1;
}
if (_zip_rename(temp, za->zn) != 0) {
_zip_error_set(&za->error, ZIP_ER_RENAME, errno);
remove(temp);
free(temp);
- if (reopen_on_error) {
- /* ignore errors, since we're already in an error case */
- za->zp = fopen(za->zn, "rb");
- }
+ if (reopen_on_error) {
+ /* ignore errors, since we're already in an error case */
+ za->zp = fopen(za->zn, "rb");
+ }
return -1;
}
mask = umask(0);
@@ -638,7 +637,7 @@
FILE *tfp;
int len = strlen(za->zn) + 8;
- if ((temp=(char *)malloc(strlen(za->zn)+8)) == NULL) {
+ if ((temp=(char *)malloc(len)) == NULL) {
_zip_error_set(&za->error, ZIP_ER_MEMORY, 0);
return NULL;
}
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_filerange_crc.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_filerange_crc.c
2009-07-19 15:20:48 UTC (rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_filerange_crc.c
2009-07-19 15:21:13 UTC (rev 284362)
@@ -1,6 +1,6 @@
/*
zip_filerange_crc.c -- compute CRC32 for a range of a file
- Copyright (C) 2008 Dieter Baron and Thomas Klausner
+ Copyright (C) 2008-2009 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <[email protected]>
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_get_archive_flag.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_get_archive_flag.c
2009-07-19 15:20:48 UTC (rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_get_archive_flag.c
2009-07-19 15:21:13 UTC (rev 284362)
@@ -1,6 +1,6 @@
/*
zip_get_archive_flag.c -- get archive global flag
- Copyright (C) 2008 Dieter Baron and Thomas Klausner
+ Copyright (C) 2008-2009 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <[email protected]>
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_open.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_open.c 2009-07-19 15:20:48 UTC
(rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_open.c 2009-07-19 15:21:13 UTC
(rev 284362)
@@ -69,15 +69,16 @@
if (flags & ZIP_OVERWRITE) {
return _zip_allocate_new(fn, zep);
}
-
+
switch (_zip_file_exists(fn, flags, zep)) {
case -1:
if (!(flags & ZIP_OVERWRITE)) {
- return NULL;
+ return NULL;
}
-
+
case 0:
return _zip_allocate_new(fn, zep);
+
default:
break;
}
Modified: php/php-src/branches/PHP_5_2/ext/zip/lib/zip_set_archive_flag.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/zip/lib/zip_set_archive_flag.c
2009-07-19 15:20:48 UTC (rev 284361)
+++ php/php-src/branches/PHP_5_2/ext/zip/lib/zip_set_archive_flag.c
2009-07-19 15:21:13 UTC (rev 284362)
@@ -1,6 +1,6 @@
/*
zip_get_archive_flag.c -- set archive global flag
- Copyright (C) 2008 Dieter Baron and Thomas Klausner
+ Copyright (C) 2008-2009 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
The authors can be contacted at <[email protected]>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php