* struct zip_stat increased for future encryption support
* zip_add return value changed (now returns new index of added file)
* shared library major bump because of previous two

--HG--
branch : HEAD
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 8f5aa7a..a9481a6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,7 +2,7 @@
 noinst_HEADERS = zipint.h
 include_HEADERS = zip.h
 
-libzip_la_LDFLAGS=-version-info 0:5
+libzip_la_LDFLAGS=-version-info 1:0
 libzip_la_LIBADD=@LIBOBJS@
 
 libzip_la_SOURCES=\
diff --git a/lib/zip.h b/lib/zip.h
index fe80d21..4d8f515 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -2,10 +2,10 @@
 #define _HAD_ZIP_H
 
 /*
-  $NiH: zip.h,v 1.50 2005/07/14 14:08:11 dillo Exp $
+  $NiH: zip.h,v 1.51 2005/09/06 23:44:25 wiz Exp $
 
   zip.h -- exported declarations.
-  Copyright (C) 1999, 2003, 2004, 2005 Dieter Baron and Thomas Klausner
+  Copyright (C) 1999, 2003, 2004, 2005, 2006 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>
@@ -133,6 +133,7 @@
     off_t size;				/* size of file (uncompressed) */
     off_t comp_size;			/* size of file (compressed) */
     unsigned short comp_method;		/* compression method used */
+    unsigned short encryption_method;	/* encryption method used */
 };
 
 struct zip;
diff --git a/lib/zip_replace.c b/lib/zip_replace.c
index 92929aa..9d62199 100644
--- a/lib/zip_replace.c
+++ b/lib/zip_replace.c
@@ -1,8 +1,8 @@
 /*
-  $NiH: zip_replace.c,v 1.18 2004/11/30 21:42:23 wiz Exp $
+  $NiH: zip_replace.c,v 1.19 2004/11/30 22:19:38 wiz Exp $
 
   zip_replace.c -- replace file via callback function
-  Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
+  Copyright (C) 1999, 2003, 2004, 2006 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>
@@ -48,7 +48,10 @@
 	return -1;
     }
 
-    return _zip_replace(za, idx, NULL, source);
+    if (_zip_replace(za, idx, NULL, source) == -1)
+	return -1;
+
+    return 0;
 }
 
 
@@ -74,5 +77,5 @@
 			    ? ZIP_ST_ADDED : ZIP_ST_REPLACED);
     za->entry[idx].source = source;
 
-    return 0;
+    return idx;
 }