summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_fclose.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-05-21 09:27:41 +0000
committerPierre Joye <pajoye@php.net>2008-05-21 09:27:41 +0000
commitb734bf4b97f9203eb7a7a6a7ef24286f2272bd08 (patch)
treea361418bf40dfa23ac4d33ba3eae99c987f1ddae /ext/zip/lib/zip_fclose.c
parent3681756cfb6d66c35f532f890160a1d56601e96c (diff)
downloadphp-git-b734bf4b97f9203eb7a7a6a7ef24286f2272bd08.tar.gz
- sync with PECL HEAD
Diffstat (limited to 'ext/zip/lib/zip_fclose.c')
-rw-r--r--ext/zip/lib/zip_fclose.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/ext/zip/lib/zip_fclose.c b/ext/zip/lib/zip_fclose.c
index 91f30b7bb9..6bf697301a 100644
--- a/ext/zip/lib/zip_fclose.c
+++ b/ext/zip/lib/zip_fclose.c
@@ -1,11 +1,9 @@
/*
- $NiH: zip_fclose.c,v 1.14 2005/06/09 19:57:09 dillo Exp $
-
zip_fclose.c -- close file in zip archive
- Copyright (C) 1999, 2004, 2005 Dieter Baron and Thomas Klausner
+ Copyright (C) 1999-2007 Dieter Baron and Thomas Klausner
This file is part of libzip, a library to manipulate ZIP archives.
- The authors can be contacted at <nih@giga.or.at>
+ The authors can be contacted at <libzip@nih.at>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -37,12 +35,11 @@
#include <stdlib.h>
-#include "zip.h"
#include "zipint.h"
-PHPZIPAPI int
+ZIP_EXTERN(int)
zip_fclose(struct zip_file *zf)
{
int i, ret;
@@ -51,15 +48,14 @@ zip_fclose(struct zip_file *zf)
inflateEnd(zf->zstr);
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;