* zip.h: Rename zip_source_data to zip_source_buffer.
        Adapt users and documentation.

--HG--
branch : HEAD
diff --git a/ChangeLog b/ChangeLog
index 80f1ceb..238acd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-11-18  Thomas Klausner <wiz@danbala.tuwien.ac.at>
 
+	* zip.h: Rename zip_source_data to zip_source_buffer.
+	Adapt users and documentation.
+
 	* lib/zip_source_*: Verify user-supplied data.
 
 	* zip.h: Rename zip_get_error to zip_error_get;
diff --git a/configure.ac b/configure.ac
index b7d7091..854b116 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,7 @@
 		 man/zip_name_locate.3:man/zip_name_locate.${MANFMT}
 		 man/zip_open.3:man/zip_open.${MANFMT}
 		 man/zip_rename.3:man/zip_rename.${MANFMT}
-		 man/zip_source_data.3:man/zip_source_data.${MANFMT}
+		 man/zip_source_buffer.3:man/zip_source_buffer.${MANFMT}
 		 man/zip_source_file.3:man/zip_source_file.${MANFMT}
 		 man/zip_source_filep.3:man/zip_source_filep.${MANFMT}
 		 man/zip_source_free.3:man/zip_source_free.${MANFMT}
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 94f2d75..82e9c48 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -32,7 +32,7 @@
 	zip_open.c \
 	zip_rename.c \
 	zip_replace.c \
-	zip_source_data.c \
+	zip_source_buffer.c \
 	zip_source_file.c \
 	zip_source_filep.c \
 	zip_source_free.c \
diff --git a/lib/zip.h b/lib/zip.h
index 21c66f2..a81f59e 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -2,7 +2,7 @@
 #define _HAD_ZIP_H
 
 /*
-  $NiH: zip.h,v 1.41 2004/11/17 21:59:00 wiz Exp $
+  $NiH: zip.h,v 1.42 2004/11/18 15:04:04 wiz Exp $
 
   zip.h -- exported declarations.
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
@@ -153,7 +153,7 @@
 struct zip *zip_open(const char *, int, int *);
 int zip_rename(struct zip *, int, const char *);
 int zip_replace(struct zip *, int, struct zip_source *);
-struct zip_source *zip_source_data(struct zip *, const void *, off_t, int);
+struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int);
 struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t);
 struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t);
 void zip_source_free(struct zip_source *);
diff --git a/lib/zip_source_data.c b/lib/zip_source_buffer.c
similarity index 94%
rename from lib/zip_source_data.c
rename to lib/zip_source_buffer.c
index 56bf512..115b068 100644
--- a/lib/zip_source_data.c
+++ b/lib/zip_source_buffer.c
@@ -1,7 +1,7 @@
 /*
-  $NiH: zip_source_data.c,v 1.1 2004/11/18 15:06:23 wiz Exp $
+  $NiH: zip_source_buffer.c,v 1.2 2004/11/18 16:28:12 wiz Exp $
 
-  zip_source_data.c -- create zip data source from buffer
+  zip_source_buffer.c -- create zip data source from buffer
   Copyright (C) 1999, 2003, 2004 Dieter Baron and Thomas Klausner
 
   This file is part of libzip, a library to manipulate ZIP archives.
@@ -53,7 +53,7 @@
 
 
 struct zip_source *
-zip_source_data(struct zip *za, const void *data, off_t len, int freep)
+zip_source_buffer(struct zip *za, const void *data, off_t len, int freep)
 {
     struct read_data *f;
     struct zip_source *zs;
diff --git a/man/Makefile.am b/man/Makefile.am
index 3de06d2..cd432e0 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -17,7 +17,7 @@
 	zip_name_locate.3 \
 	zip_open.3 \
 	zip_rename.3 \
-	zip_source_data.3 \
+	zip_source_buffer.3 \
 	zip_source_file.3 \
 	zip_source_filep.3 \
 	zip_source_free.3 \
diff --git a/man/zip_add.mdoc b/man/zip_add.mdoc
index 82f5f5b..ad0b227 100644
--- a/man/zip_add.mdoc
+++ b/man/zip_add.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_add.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_add.mdoc,v 1.3 2004/11/18 15:04:06 wiz Exp $
 .\"
 .\" zip_add.mdoc -- add files to zip archive
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -80,7 +80,7 @@
 .Bd -literal -offset indent
 struct zip_source *s;
 
-if ((s=zip_source_data(archive, buffer, len)) == NULL ||
+if ((s=zip_source_buffer(archive, buffer, len)) == NULL ||
     zip_add(archive, name, s) < 0) {
     zip_source_free(s);
     printf("error adding file: %s\n", zip_strerror(archive));
diff --git a/man/zip_source_data.mdoc b/man/zip_source_buffer.mdoc
similarity index 89%
rename from man/zip_source_data.mdoc
rename to man/zip_source_buffer.mdoc
index f4179ac..348eef9 100644
--- a/man/zip_source_data.mdoc
+++ b/man/zip_source_buffer.mdoc
@@ -1,6 +1,6 @@
-.\" $NiH: zip_source_data.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_buffer.mdoc,v 1.1 2004/11/18 15:10:49 wiz Exp $
 .\"
-.\" zip_source_data.mdoc -- create zip data source from buffer
+.\" zip_source_buffer.mdoc -- create zip data source from buffer
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
 .\"
 .\" This file is part of libzip, a library to manipulate ZIP archives.
@@ -35,18 +35,18 @@
 .Dt ZIP_SOURCE_DATA 3
 .Os
 .Sh NAME
-.Nm zip_source_data
+.Nm zip_source_buffer
 .Nd create zip data source from buffer
 .Sh LIBRARY
 libzip (-lzip)
 .Sh SYNOPSIS
 .In zip.h
 .Ft int
-.Fn zip_source_data "struct zip *archive" "const void *data" "off_t len" \
+.Fn zip_source_buffer "struct zip *archive" "const void *data" "off_t len" \
 "int freep"
 .Sh DESCRIPTION
 The function
-.Fn zip_source_data
+.Fn zip_source_buffer
 creates a zip source from the buffer
 .Ar data
 of size
@@ -62,7 +62,7 @@
 .Ar archive
 is set to indicate the error.
 .Sh ERRORS
-.Fn zip_source_data
+.Fn zip_source_buffer
 fails if:
 .Bl -tag -width Er
 .It Bq Er ZIP_ER_INVAL
diff --git a/man/zip_source_file.mdoc b/man/zip_source_file.mdoc
index a692bb2..fae09c5 100644
--- a/man/zip_source_file.mdoc
+++ b/man/zip_source_file.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_source.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_file.mdoc,v 1.1 2004/11/18 16:48:07 wiz Exp $
 .\"
 .\" zip_source_file.mdoc -- create data source from a file
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -86,7 +86,7 @@
 .Sh SEE ALSO
 .Xr zip_add 3 ,
 .Xr zip_replace 3 ,
-.Xr zip_source_data 3 ,
+.Xr zip_source_buffer 3 ,
 .Xr zip_source_filep 3 ,
 .Xr zip_source_free 3 ,
 .Xr zip_source_function 3 ,
diff --git a/man/zip_source_filep.mdoc b/man/zip_source_filep.mdoc
index cdacebd..a4b6cf1 100644
--- a/man/zip_source_filep.mdoc
+++ b/man/zip_source_filep.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_source.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_filep.mdoc,v 1.1 2004/11/18 16:48:07 wiz Exp $
 .\"
 .\" zip_source_filep.mdoc -- create data source from a file stream
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -81,7 +81,7 @@
 .Sh SEE ALSO
 .Xr zip_add 3 ,
 .Xr zip_replace 3 ,
-.Xr zip_source_data 3 ,
+.Xr zip_source_buffer 3 ,
 .Xr zip_source_file 3 ,
 .Xr zip_source_free 3 ,
 .Xr zip_source_function 3 ,
diff --git a/man/zip_source_free.mdoc b/man/zip_source_free.mdoc
index 70e1e69..c759709 100644
--- a/man/zip_source_free.mdoc
+++ b/man/zip_source_free.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_source_free.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_free.mdoc,v 1.1 2004/11/18 16:49:20 wiz Exp $
 .\"
 .\" zip_source_free.mdoc -- free zip data source
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -54,7 +54,7 @@
 .Dv NULL ,
 it does nothing.
 .Sh SEE ALSO
-.Xr zip_source_data 3 ,
+.Xr zip_source_buffer 3 ,
 .Xr zip_source_file 3 ,
 .Xr zip_source_filep 3 ,
 .Xr zip_source_function 3 ,
diff --git a/man/zip_source_function.mdoc b/man/zip_source_function.mdoc
index 4498d63..8dd6501 100644
--- a/man/zip_source_function.mdoc
+++ b/man/zip_source_function.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_source.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_function.mdoc,v 1.1 2004/11/18 16:48:08 wiz Exp $
 .\"
 .\" zip_source_function.mdoc -- create data source from function
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -107,7 +107,7 @@
 .Sh SEE ALSO
 .Xr zip_add 3 ,
 .Xr zip_replace 3 ,
-.Xr zip_source_data 3 ,
+.Xr zip_source_buffer 3 ,
 .Xr zip_source_file 3 ,
 .Xr zip_source_filep 3 ,
 .Xr zip_source_free 3 ,
diff --git a/man/zip_source_zip.mdoc b/man/zip_source_zip.mdoc
index ad4b8da..e59e2ce 100644
--- a/man/zip_source_zip.mdoc
+++ b/man/zip_source_zip.mdoc
@@ -1,4 +1,4 @@
-.\" $NiH: zip_source.mdoc,v 1.2 2004/11/17 21:55:14 wiz Exp $
+.\" $NiH: zip_source_zip.mdoc,v 1.1 2004/11/18 16:48:08 wiz Exp $
 .\"
 .\" zip_source_zip.mdoc -- create data source from zip file
 .\" Copyright (C) 2004 Dieter Baron and Thomas Klausner
@@ -106,7 +106,7 @@
 .Sh SEE ALSO
 .Xr zip_add 3 ,
 .Xr zip_replace 3 ,
-.Xr zip_source_data 3 ,
+.Xr zip_source_buffer 3 ,
 .Xr zip_source_file 3 ,
 .Xr zip_source_filep 3 ,
 .Xr zip_source_free 3 ,
diff --git a/regress/buffadd.c b/regress/buffadd.c
index 339845e..c0ea07b 100644
--- a/regress/buffadd.c
+++ b/regress/buffadd.c
@@ -1,5 +1,5 @@
 /*
-  $NiH: buffadd.c,v 1.6 2004/11/18 15:04:07 wiz Exp $
+  $NiH: buffadd.c,v 1.7 2004/11/18 17:11:23 wiz Exp $
 
   buffadd.c -- test cases for adding files from buffer
   Copyright (C) 1999, 2003 Dieter Baron and Thomas Klausner
@@ -65,7 +65,7 @@
 	exit(1);
     }
 
-    if ((zs=zip_source_data(za, teststr, strlen(teststr), 0)) == NULL
+    if ((zs=zip_source_buffer(za, teststr, strlen(teststr), 0)) == NULL
 	|| zip_add(za, testname, zs) == -1) {
 	zip_source_free(zs);
 	fprintf(stderr,"%s: can't add buffer '%s': %s\n", argv[0],