merge
diff --git a/man/zip_source_begin_write.man b/man/zip_source_begin_write.man index 0b5fc2d..5ba499c 100644 --- a/man/zip_source_begin_write.man +++ b/man/zip_source_begin_write.man
@@ -12,19 +12,19 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_begin_write\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_begin_write\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_begin_write\fR() -prepares the zip_source -\fIzs\fR +prepares +\fIsource\fR for writing. Usually this involves creating temporary files or allocating buffers. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_close.man b/man/zip_source_close.man index ba350fc..8c0a873 100644 --- a/man/zip_source_close.man +++ b/man/zip_source_close.man
@@ -12,18 +12,18 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_close\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_close\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_close\fR() -closes the zip_source -\fIzs\fR -which was open for reading. +closes +\fIsource\fR, +indicating that no more data will be read. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_commit_write.man b/man/zip_source_commit_write.man index 55c3522..6bd026a 100644 --- a/man/zip_source_commit_write.man +++ b/man/zip_source_commit_write.man
@@ -12,19 +12,18 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_commit_write\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_commit_write\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_commit_write\fR() -finishes writing data to the zip source -\fIzs\fR. -Usually this involves flushing buffers, replacing original files with -temporary files or cleaning up buffers. +finishes writing data to +\fIsource\fR +and replaces the original with the newly written data. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_function.man b/man/zip_source_function.man index 7dd4d01..6c9f1c2 100644 --- a/man/zip_source_function.man +++ b/man/zip_source_function.man
@@ -30,7 +30,7 @@ which must be of the following type: .PP \fItypedef zip_int64_t\fR -\fB(*zip_source_callback)\fR(\fIvoid *userdata\fR, \fIvoid *data\fR, \fIzip_uint64_t len\fR, \fIzip_source_cmd_t cmd\fR) +\fB\fR(*\fPzip_source_callback\fR)\fP\fR(\fIvoid\ *userdata\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR, \fIzip_source_cmd_t\ cmd\fR) .PP \fIarchive\fR or
diff --git a/man/zip_source_function.mdoc b/man/zip_source_function.mdoc index d6e4e79..ae8b865 100644 --- a/man/zip_source_function.mdoc +++ b/man/zip_source_function.mdoc
@@ -53,7 +53,9 @@ which must be of the following type: .Pp .Ft typedef zip_int64_t -.Fn (*zip_source_callback) "void *userdata" "void *data" "zip_uint64_t len" "zip_source_cmd_t cmd" +.Fo \fR(*\fPzip_source_callback\fR)\fP +.Fa "void *userdata" "void *data" "zip_uint64_t len" "zip_source_cmd_t cmd" +.Fc .Pp .Ar archive or
diff --git a/man/zip_source_is_deleted.man b/man/zip_source_is_deleted.man index 16ad365..6313d81 100644 --- a/man/zip_source_is_deleted.man +++ b/man/zip_source_is_deleted.man
@@ -12,13 +12,13 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_is_deleted\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_is_deleted\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_is_deleted\fR() -returns if the zip_source was deleted. -This can for example happen every entry is removed from a zip archive. +returns whether the zip_source was deleted. +This can for example happen when all entries are removed from a zip archive. .SH "RETURN VALUES" \fBzip_source_is_deleted\fR() returns 1 if the zip_source is deleted and 0 otherwise.
diff --git a/man/zip_source_open.man b/man/zip_source_open.man index 51dbcd9..b42761b 100644 --- a/man/zip_source_open.man +++ b/man/zip_source_open.man
@@ -12,18 +12,18 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_open\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_open\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_open\fR() -opens the zip_source -\fIzs\fR +opens +\fIsource\fR for reading. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_read.man b/man/zip_source_read.man index 840eed6..5a06ca5 100644 --- a/man/zip_source_read.man +++ b/man/zip_source_read.man
@@ -12,21 +12,27 @@ \fIzip_int64_t\fR .PD 0 .HP 4n -\fBzip_source_read\fR(\fIzip_source_t\ *zs\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR); +\fBzip_source_read\fR(\fIzip_source_t\ *source\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_read\fR() reads up to \fIlen\fR -bytes of data from the zip source -\fIzs\fR -at the current read offset and writes them to the buffer +bytes of data from +\fIsource\fR +at the current read offset into the buffer \fIdata\fR. +.PP +The zip source +\fIsource\fR +has to be opened for reading by calling +zip_source_open(3) +first. .SH "RETURN VALUES" Upon successful completion the number of bytes read is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_rollback_write.man b/man/zip_source_rollback_write.man index 7c1f5da..7e9bb4e 100644 --- a/man/zip_source_rollback_write.man +++ b/man/zip_source_rollback_write.man
@@ -12,18 +12,21 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_rollback_write\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_rollback_write\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_rollback_write\fR() -reverts changes written to the zip source -\fIzs\fR. -Usually this removes temporary files or freeing buffers. +reverts changes written to +\fIsource\fR, +restoring the data before +zip_source_begin_write(3) +was called. +Usually this removes temporary files or frees buffers. .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_seek.man b/man/zip_source_seek.man index c546612..1224021 100644 --- a/man/zip_source_seek.man +++ b/man/zip_source_seek.man
@@ -12,16 +12,13 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_seek\fR(\fIzip_source_t\ *zs\fR, \fIzip_int64_t\ offset\fR, \fIint\ whence\fR); +\fBzip_source_seek\fR(\fIzip_source_t\ *source\fR, \fIzip_int64_t\ offset\fR, \fIint\ whence\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_seek\fR() -sets the current read offset for the zip source -\fIzs\fR -to -\fIoffset\fR -bytes. +sets the current read offset for +\fIsource\fR. Just like in fseek(3), depending on the @@ -35,7 +32,7 @@ start of file .TP 12n \fRSEEK_CUR\fR -current position in file +current read offset in file .TP 12n \fRSEEK_END\fR end of file @@ -43,7 +40,7 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_seek_write.man b/man/zip_source_seek_write.man index 2eff679..0ba3192 100644 --- a/man/zip_source_seek_write.man +++ b/man/zip_source_seek_write.man
@@ -12,16 +12,13 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_seek_write\fR(\fIzip_source_t\ *zs\fR, \fIzip_int64_t\ offset\fR, \fIint\ whence\fR); +\fBzip_source_seek_write\fR(\fIzip_source_t\ *source\fR, \fIzip_int64_t\ offset\fR, \fIint\ whence\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_seek_write\fR() -sets the current write offset for the zip source -\fIzs\fR -to -\fIoffset\fR -bytes. +sets the current write offset for +\fIsource\fR. Just like in fseek(3), depending on the @@ -35,7 +32,7 @@ start of file .TP 12n \fRSEEK_CUR\fR -current position in file +current write offset in file .TP 12n \fRSEEK_END\fR end of file @@ -43,7 +40,7 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_stat.man b/man/zip_source_stat.man index 6d16c96..24411ff 100644 --- a/man/zip_source_stat.man +++ b/man/zip_source_stat.man
@@ -12,13 +12,13 @@ \fIint\fR .PD 0 .HP 4n -\fBzip_source_stat\fR(\fIzip_source_t\ *zs\fR, \fIzip_stat_t\ *sb\fR); +\fBzip_source_stat\fR(\fIzip_source_t\ *source\fR, \fIzip_stat_t\ *sb\fR); .PD .SH "DESCRIPTION" The \fBzip_source_stat\fR() function obtains information about the zip source -\fIzs\fR +\fIsource\fR .PP The \fIsb\fR @@ -44,7 +44,9 @@ .fi The structure pointed to by \fIsb\fR -must be allocated before calling +must be initialized with +\fBzip_stat_init\fR(\fI3\fR) +before calling \fBzip_source_stat\fR(). .PP The @@ -95,7 +97,7 @@ .SH "RETURN VALUES" Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_tell.man b/man/zip_source_tell.man index e65de35..76e146c 100644 --- a/man/zip_source_tell.man +++ b/man/zip_source_tell.man
@@ -12,25 +12,25 @@ \fIzip_int64_t\fR .PD 0 .HP 4n -\fBzip_source_tell\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_tell\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_tell\fR() -returns the current read offset (relative to the start of the file) -for the zip source -\fIzs\fR. +returns the current read offset +for +\fIsource\fR. The return value can be passed to zip_source_seek(3) with \fIwhence\fR set to \fRSEEK_SET\fR -to return to the same location in the file. +to return to the same location in the source. .SH "RETURN VALUES" Upon successful completion the current read offset is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_tell_write.man b/man/zip_source_tell_write.man index d93a525..ab340ec 100644 --- a/man/zip_source_tell_write.man +++ b/man/zip_source_tell_write.man
@@ -12,25 +12,25 @@ \fIzip_int64_t\fR .PD 0 .HP 4n -\fBzip_source_tell_write\fR(\fIzip_source_t\ *zs\fR); +\fBzip_source_tell_write\fR(\fIzip_source_t\ *source\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_tell_write\fR() -returns the current write offset (relative to the start of the file) -for the zip source -\fIzs\fR. +returns the current write offset +for +\fIsource\fR. The return value can be passed to zip_source_seek_write(3) with \fIwhence\fR set to \fRSEEK_SET\fR -to return to the same location in the file. +to return to the same location in the source. .SH "RETURN VALUES" Upon successful completion the current write offset is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),
diff --git a/man/zip_source_write.man b/man/zip_source_write.man index c11a768..1c029b9 100644 --- a/man/zip_source_write.man +++ b/man/zip_source_write.man
@@ -12,28 +12,28 @@ \fIzip_int64_t\fR .PD 0 .HP 4n -\fBzip_source_write\fR(\fIzip_source_t\ *zs\fR, \fIconst\ void\ *data\fR, \fIzip_uint64_t\ len\fR); +\fBzip_source_write\fR(\fIzip_source_t\ *source\fR, \fIconst\ void\ *data\fR, \fIzip_uint64_t\ len\fR); .PD .SH "DESCRIPTION" The function \fBzip_source_write\fR() writes \fIlen\fR -bytes of data from the buffer +bytes from the buffer \fIdata\fR to the zip source -\fIzs\fR +\fIsource\fR at the current write offset. .PP The zip source -\fIzs\fR -has to be prepared for this by calling +\fIsource\fR +has to be prepared for writing by calling zip_source_begin_write(3) first. .SH "RETURN VALUES" Upon successful completion the number of bytes written is returned. Otherwise, \-1 is returned and the error information in -\fIzs\fR +\fIsource\fR is set to indicate the error. .SH "SEE ALSO" libzip(3),