remove flags argument from zip_replace and zip_add

--HG--
branch : HEAD
diff --git a/TODO b/TODO
index 9687816..7688acc 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
 ------------------------------------------------ showstopper
-* zip_replace: remove flags argument?  (currently unused)
 * API cleanup
 	check function names (consistency, appropriateness)
 	file sizes, offsets: type big enough? (no, zip64)
@@ -13,6 +12,7 @@
 * code review
 * README
 ------------------------------------------------ others
+* zip_commit
 * zip_replace_zip: allow rewinding
 * API for (file and archive) comments
 * fix warnings in zipcmp
diff --git a/lib/zip.h b/lib/zip.h
index 576f900..908f189 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -2,7 +2,7 @@
 #define _HAD_ZIP_H
 
 /*
-  $NiH: zip.h,v 1.37 2004/04/16 09:40:26 dillo Exp $
+  $NiH: zip.h,v 1.38 2004/06/24 15:01:57 dillo Exp $
 
   zip.h -- exported declarations.
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -137,7 +137,7 @@
 
 
 
-int zip_add(struct zip *, const char *, zip_read_func, void *, int);
+int zip_add(struct zip *, const char *, zip_read_func, void *);
 int zip_add_data(struct zip *, const char *, const void *, off_t, int);
 int zip_add_file(struct zip *, const char *, const char *, off_t, off_t);
 int zip_add_filep(struct zip *, const char *, FILE *, off_t, off_t);
@@ -159,7 +159,7 @@
 int zip_name_locate(struct zip *, const char *, int);
 struct zip *zip_open(const char *, int, int *);
 int zip_rename(struct zip *, int, const char *);
-int zip_replace(struct zip *, int, zip_read_func, void *, int);
+int zip_replace(struct zip *, int, zip_read_func, void *);
 int zip_replace_data(struct zip *, int, const void *, off_t, int);
 int zip_replace_file(struct zip *, int, const char *, off_t, off_t);
 int zip_replace_filep(struct zip *, int, FILE *, off_t, off_t);
diff --git a/lib/zip_add.c b/lib/zip_add.c
index 1b927d0..a03b79a 100644
--- a/lib/zip_add.c
+++ b/lib/zip_add.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: zip_add.c,v 1.10 2004/04/14 14:01:22 dillo Exp $
+  $NiH: zip_add.c,v 1.11 2004/04/16 09:40:26 dillo Exp $
 
   zip_add.c -- add file via callback function
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -41,13 +41,12 @@
 
 
 int
-zip_add(struct zip *zf, const char *name,
-	zip_read_func fn, void *state, int flags)
+zip_add(struct zip *zf, const char *name, zip_read_func fn, void *state)
 {
     if (name == NULL) {
 	_zip_error_set(&zf->error, ZERR_INVAL, 0);
 	return -1;
     }
 	
-    return _zip_replace(zf, -1, name, fn, state, flags);
+    return _zip_replace(zf, -1, name, fn, state);
 }
diff --git a/lib/zip_replace.c b/lib/zip_replace.c
index 553b11f..4506f73 100644
--- a/lib/zip_replace.c
+++ b/lib/zip_replace.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: zip_replace.c,v 1.13 2004/04/16 09:40:29 dillo Exp $
+  $NiH: zip_replace.c,v 1.14 2004/06/24 15:01:58 dillo Exp $
 
   zip_replace.c -- replace file via callback function
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -41,14 +41,14 @@
 
 
 int
-zip_replace(struct zip *zf, int idx, zip_read_func fn, void *state, int flags)
+zip_replace(struct zip *zf, int idx, zip_read_func fn, void *state)
 {
     if (idx < 0 || idx >= zf->nentry) {
 	_zip_error_set(&zf->error, ZERR_INVAL, 0);
 	return -1;
     }
 
-    return _zip_replace(zf, idx, NULL, fn, state, flags);
+    return _zip_replace(zf, idx, NULL, fn, state);
 }
 
 
@@ -56,7 +56,7 @@
 
 int
 _zip_replace(struct zip *zf, int idx, const char *name,
-	     zip_read_func fn, void *state, int flags)
+	     zip_read_func fn, void *state)
 {
     if (idx == -1) {
 	if (_zip_new_entry(zf) == NULL)
diff --git a/lib/zip_replace_data.c b/lib/zip_replace_data.c
index 367b8cc..68ce5da 100644
--- a/lib/zip_replace_data.c
+++ b/lib/zip_replace_data.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: zip_replace_data.c,v 1.14 2004/04/16 09:40:30 dillo Exp $
+  $NiH: zip_replace_data.c,v 1.15 2004/06/24 15:01:58 dillo Exp $
 
   zip_replace_data.c -- replace file from buffer
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -82,7 +82,7 @@
     f->freep = freep;
     f->mtime = time(NULL);
     
-    return _zip_replace(zf, idx, name, read_data, f, 0);
+    return _zip_replace(zf, idx, name, read_data, f);
 }
 
 
diff --git a/lib/zip_replace_filep.c b/lib/zip_replace_filep.c
index cfe193b..b45329f 100644
--- a/lib/zip_replace_filep.c
+++ b/lib/zip_replace_filep.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: zip_replace_filep.c,v 1.9 2004/04/16 09:40:30 dillo Exp $
+  $NiH: zip_replace_filep.c,v 1.10 2004/06/24 15:01:58 dillo Exp $
 
   zip_replace_filep.c -- replace file from FILE*
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -85,7 +85,7 @@
     f->off = start;
     f->len = (len ? len : -1);
     
-    return _zip_replace(zf, idx, name, read_file, f, 0);
+    return _zip_replace(zf, idx, name, read_file, f);
 }
 
 
diff --git a/lib/zip_replace_zip.c b/lib/zip_replace_zip.c
index fa0ceec..2dd2168 100644
--- a/lib/zip_replace_zip.c
+++ b/lib/zip_replace_zip.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: zip_replace_zip.c,v 1.21 2004/05/16 00:50:48 dillo Exp $
+  $NiH: zip_replace_zip.c,v 1.22 2004/06/24 15:01:58 dillo Exp $
 
   zip_replace_zip.c -- replace file from zip file
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -112,8 +112,7 @@
 	/* XXX: crc */
     }
     
-    return _zip_replace(zf, idx, name, read_zip, p,
-			(flags & ZIP_FL_COMPRESSED) ? ZIP_CH_ISCOMP : 0);
+    return _zip_replace(zf, idx, name, read_zip, p);
 }
 
 
diff --git a/lib/zipint.h b/lib/zipint.h
index 3f60759..30626f6 100644
--- a/lib/zipint.h
+++ b/lib/zipint.h
@@ -3,7 +3,7 @@
 #define _HAD_ZIPINT_H
 
 /*
-  $NiH: zipint.h,v 1.25 2004/04/19 11:49:13 dillo Exp $
+  $NiH: zipint.h,v 1.26 2004/06/24 15:01:59 dillo Exp $
 
   zipint.h -- internal declarations.
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -188,7 +188,7 @@
 struct zip_entry *_zip_new_entry(struct zip *);
 unsigned short _zip_read2(unsigned char **);
 unsigned int _zip_read4(unsigned char **);
-int _zip_replace(struct zip *, int, const char *,zip_read_func, void *, int);
+int _zip_replace(struct zip *, int, const char *,zip_read_func, void *);
 int _zip_replace_data(struct zip *, int, const char *,
 		      const void *, off_t, int);
 int _zip_replace_file(struct zip *, int, const char *,