pajoye          Sun, 19 Jul 2009 15:20:48 +0000

URL: http://svn.php.net/viewvc?view=revision&revision=284361

Changed paths:
        U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_close.c
        U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fclose.c
        U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fread.c
        U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_get_archive_comment.c
        U   php/php-src/branches/PHP_5_3/ext/zip/lib/zip_open.c

Log:
- WS

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_close.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_close.c        2009-07-19 
15:08:58 UTC (rev 284360)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_close.c        2009-07-19 
15:20:48 UTC (rev 284361)
@@ -200,7 +200,7 @@
                de.comp_size = za->cdir->entry[i].comp_size;
                de.uncomp_size = za->cdir->entry[i].uncomp_size;
                de.bitflags &= ~ZIP_GPBF_DATA_DESCRIPTOR;
-           }
+               }
            memcpy(cd->entry+j, za->cdir->entry+i, sizeof(cd->entry[j]));
        }

@@ -229,11 +229,10 @@

            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) {
@@ -286,27 +285,27 @@
        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");
+               _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");
+               }
+               return -1;
        }
-       return -1;
-    }
     mask = umask(0);
     umask(mask);
     chmod(za->zn, 0666&~mask);

     _zip_free(za);
-    free(temp);
+       free(temp);

     return 0;
 }

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fclose.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fclose.c       2009-07-19 
15:08:58 UTC (rev 284360)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fclose.c       2009-07-19 
15:20:48 UTC (rev 284361)
@@ -49,14 +49,14 @@
     free(zf->buffer);
     free(zf->zstr);
        if (zf->za) {
-    for (i=0; i<zf->za->nfile; i++) {
-       if (zf->za->file[i] == zf) {
-           zf->za->file[i] = zf->za->file[zf->za->nfile-1];
-           zf->za->nfile--;
-           break;
+               for (i=0; i<zf->za->nfile; i++) {
+                       if (zf->za->file[i] == zf) {
+                               zf->za->file[i] = zf->za->file[zf->za->nfile-1];
+                               zf->za->nfile--;
+                               break;
+                       }
+               }
        }
-    }
-       }

     ret = 0;
     if (zf->error.zip_err)

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fread.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fread.c        2009-07-19 
15:08:58 UTC (rev 284360)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_fread.c        2009-07-19 
15:20:48 UTC (rev 284361)
@@ -41,7 +41,7 @@
 zip_fread(struct zip_file *zf, void *outbuf, size_t toread)
 {
     int ret;
-    size_t out_before, len;
+       size_t out_before, len;
     int i;

     if (!zf)

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_get_archive_comment.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_get_archive_comment.c  
2009-07-19 15:08:58 UTC (rev 284360)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_get_archive_comment.c  
2009-07-19 15:20:48 UTC (rev 284361)
@@ -42,11 +42,11 @@
 {
     if ((flags & ZIP_FL_UNCHANGED)
        || (za->ch_comment_len == -1)) {
-       if (za->cdir) {
-           if (lenp != NULL)
-               *lenp = za->cdir->comment_len;
-           return za->cdir->comment;
-       }
+               if (za->cdir) {
+                       if (lenp != NULL)
+                               *lenp = za->cdir->comment_len;
+                       return za->cdir->comment;
+               }
        else {
            if (lenp != NULL)
                *lenp = -1;

Modified: php/php-src/branches/PHP_5_3/ext/zip/lib/zip_open.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/zip/lib/zip_open.c 2009-07-19 15:08:58 UTC 
(rev 284360)
+++ php/php-src/branches/PHP_5_3/ext/zip/lib/zip_open.c 2009-07-19 15:20:48 UTC 
(rev 284361)
@@ -75,9 +75,10 @@
                        if (!(flags & ZIP_OVERWRITE)) {
                                return NULL;
                        }
-
+
     case 0:
        return _zip_allocate_new(fn, zep);
+
     default:
        break;
     }

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

Reply via email to