Improve man page installation. - add file with list of links and script to install/remove them - remove generated .man versions from repository (recreate with mandoc)
diff --git a/TODO b/TODO index daf65f3..b21f730 100644 --- a/TODO +++ b/TODO
@@ -97,8 +97,7 @@ Infrastructure ============== -- remove .man pages from repository -- better infrastructure for man page links +- create CMakefile.txt man page linking from links file Test Case Issues
diff --git a/man/Makefile.am b/man/Makefile.am index 41ebf8b..21aad62 100644 --- a/man/Makefile.am +++ b/man/Makefile.am
@@ -3,7 +3,7 @@ man3_MANS=${MAN3:.mdoc=.${MANFMT}} DISTCLEANFILES=${HTML} -EXTRA_DIST=${MANDOC} ${MAN} CMakeLists.txt +EXTRA_DIST=${MANDOC} ${MAN} CMakeLists.txt handle_links links MAN1= zipcmp.mdoc zipmerge.mdoc ziptorrent.mdoc MAN3= \ @@ -96,75 +96,14 @@ LN=ln -f link-man3: install-man3 uninstall-hook - ${LN} ${DESTDIR}${man3dir}/zip_error_clear.3 \ - ${DESTDIR}${man3dir}/zip_file_error_clear.3 - ${LN} ${DESTDIR}${man3dir}/zip_error_get.3 \ - ${DESTDIR}${man3dir}/zip_file_error_get.3 - ${LN} ${DESTDIR}${man3dir}/zip_error_init.3 \ - ${DESTDIR}${man3dir}/zip_error_init_with_code.3 - ${LN} ${DESTDIR}${man3dir}/zip_file_add.3 \ - ${DESTDIR}${man3dir}/zip_file_replace.3 - ${LN} ${DESTDIR}${man3dir}/zip_file_extra_field_delete.3 \ - ${DESTDIR}${man3dir}/zip_file_extra_field_delete_by_id.3 - ${LN} ${DESTDIR}${man3dir}/zip_file_extra_field_get.3 \ - ${DESTDIR}${man3dir}/zip_file_extra_field_get_by_id.3 - ${LN} ${DESTDIR}${man3dir}/zip_file_extra_fields_count.3 \ - ${DESTDIR}${man3dir}/zip_file_extra_fields_count_by_id.3 - ${LN} ${DESTDIR}${man3dir}/zip_fopen.3 \ - ${DESTDIR}${man3dir}/zip_fopen_index.3 - ${LN} ${DESTDIR}${man3dir}/zip_fopen_encrypted.3 \ - ${DESTDIR}${man3dir}/zip_fopen_index_encrypted.3 - ${LN} ${DESTDIR}${man3dir}/zip_add.3 \ - ${DESTDIR}${man3dir}/zip_replace.3 - ${LN} ${DESTDIR}${man3dir}/zip_open.3 \ - ${DESTDIR}${man3dir}/zip_open_from_source.3 - ${LN} ${DESTDIR}${man3dir}/zip_stat.3 \ - ${DESTDIR}${man3dir}/zip_stat_index.3 - ${LN} ${DESTDIR}${man3dir}/zip_source_function.3 \ - ${DESTDIR}${man3dir}/zip_source_function_create.3 - ${LN} ${DESTDIR}${man3dir}/zip_file_strerror.3 \ - ${DESTDIR}${man3dir}/zip_strerror.3 + @${srcdir}/handle_links install directory=${DESTDIR}${man3dir} extension=3 command="${LN}" file=${srcdir}/links uninstall-hook: - -rm -f ${DESTDIR}${man3dir}/zip_error_init_with_code.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_error_clear.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_error_get.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_extra_field_delete_by_id.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_extra_field_get_by_id.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_extra_fields_count_by_id.3 - -rm -f ${DESTDIR}${man3dir}/zip_file_replace.3 - -rm -f ${DESTDIR}${man3dir}/zip_fopen_index.3 - -rm -f ${DESTDIR}${man3dir}/zip_fopen_index_encrypted.3 - -rm -f ${DESTDIR}${man3dir}/zip_open_from_source.3 - -rm -f ${DESTDIR}${man3dir}/zip_replace.3 - -rm -f ${DESTDIR}${man3dir}/zip_source_function_create.3 - -rm -f ${DESTDIR}${man3dir}/zip_stat_index.3 - -rm -f ${DESTDIR}${man3dir}/zip_strerror.3 + @${srcdir}/handle_links uninstall directory=${DESTDIR}${man3dir} extension=3 command="rm -f" file=${srcdir}/links link-html: ${HTML} - -rm -f zip_file_error_clear.html \ - zip_file_error_get.html \ - zip_file_extra_field_delete_by_id.html \ - zip_file_extra_field_get_by_id.html \ - zip_file_extra_fields_count_by_id.html \ - zip_file_replace.html \ - zip_fopen_index.html \ - zip_fopen_index_encrypted \ - zip_replace.html \ - zip_stat_index.html \ - zip_strerror.html - ${LN} zip_error_clear.html zip_file_error_clear.html - ${LN} zip_error_get.html zip_file_error_get.html - ${LN} zip_error_init.html zip_error_code_with_init.html - ${LN} zip_file_extra_field_delete.html zip_file_extra_field_delete_by_id.html - ${LN} zip_file_extra_field_get.html zip_file_extra_field_get_by_id.html - ${LN} zip_file_extra_fields_count.html zip_file_extra_fields_count_by_id.html - ${LN} zip_file_add.html zip_file_replace.html - ${LN} zip_fopen.html zip_fopen_index.html - ${LN} zip_fopen_encrypted.html zip_fopen_index_encrypted.html - ${LN} zip_add.html zip_replace.html - ${LN} zip_stat.html zip_stat_index.html - ${LN} zip_file_strerror.html zip_strerror.html + @${srcdir}/handle_links uninstall directory=. extension=html command="rm -f" file=${srcdir}/links + @${srcdir}/handle_links install directory=. extension=html command="${LN}" file=${srcdir}/links MANDOC=${MAN1} ${MAN3} HTML=${MANDOC:.mdoc=.html}
diff --git a/man/ZIP_SOURCE_GET_ARGS.man b/man/ZIP_SOURCE_GET_ARGS.man deleted file mode 100644 index 263dc11..0000000 --- a/man/ZIP_SOURCE_GET_ARGS.man +++ /dev/null
@@ -1,47 +0,0 @@ -.TH "ZIP_SOURCE_GET_ARGS" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBZIP_SOURCE_GET_ARGS\fR -\- validate and cast arguments to source callback -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fItype *\fR -.PD 0 -.HP 4n -\fBZIP_SOURCE_GET_ARGS\fR(\fItype\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -The -\fBZIP_SOURCE_GET_ARGS\fR() -macro casts -\fIdata\fR -to a pointer to -\fItype\fR. -.SH "RETURN VALUES" -On success, -\fBZIP_SOURCE_GET_ARGS\fR() -returns -\fIdata\fR. -In case of error, it returns -\fRNULL\fR -and sets -\fIerror\fR. -.SH "ERRORS" -\fBZIP_SOURCE_GET_ARGS\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIlen\fR -is less than the size of -\fItype\fR -.SH "SEE ALSO" -libzip(3), -zip_source_function(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/handle_links b/man/handle_links new file mode 100755 index 0000000..7c2ed37 --- /dev/null +++ b/man/handle_links
@@ -0,0 +1,74 @@ +#!/usr/bin/env perl + +use strict; + +my $operation = shift @ARGV; + +if ($operation !~ m/^(install|uninstall)$/) { + print STDERR "$0: unknown operation $operation\n"; + exit(1); +} + +my %options = (); + +for my $arg (@ARGV) { + if ($arg =~ m/([^=]*)=(.*)/) { + $options{$1} = $2; + } + else { + print STDERR "$0: can't parse option [$arg]\n"; + exit(1); + } +} + +for my $option (qw(command directory extension file)) { + unless (defined($options{$option})) { + print STDERR "$0: required variable $option not provided\n"; + exit(1); + } +} + +my $fh; +unless (open $fh, '<', $options{file}) { + print STDERR "$0: can't open links file '$options{file}': $!"; + exit(1); +} + +my @cmd = split /\s+/, $options{command}; + +while (my $line = <$fh>) { + chomp $line; + my @args = split /\s+/, $line; + + process(@args); +} + +sub process { + my ($source, @destinations) = @_; + + my @args = (@cmd); + + if ($operation eq 'install') { + push @args, "$options{directory}/$source.$options{extension}"; + } + + for my $destination (@destinations) { + push @args, "$options{directory}/$destination.$options{extension}"; + run_command(@args); + pop @args; + } +} + +sub run_command { + print (join ' ', @_); + print "\n"; + + my $ret = system(@_); + + if ($ret != 0) { + print STDERR "$0: command failed: $?\n"; + exit(1); + } + + return 1; +}
diff --git a/man/libzip.man b/man/libzip.man deleted file mode 100644 index f00a1ab..0000000 --- a/man/libzip.man +++ /dev/null
@@ -1,88 +0,0 @@ -.TH "LIBZIP" "3" "August 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBlibzip\fR -\- library for manipulating zip archives -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.SH "DESCRIPTION" -\fBlibzip\fR -is a library for reading, creating, and modifying zip archives. -.PP -Below there are two sections listing functions: one for how to read -from zip archives and one for how to create/modify them. -.SH "READING ZIP ARCHIVES" -.SS "open archive" -zip_open(3) -zip_fdopen(3) -.SS "find files" -zip_name_locate(3) -.SS "read files" -zip_fopen(3) -zip_fopen_encrypted(3) -zip_fopen_index(3) -zip_fopen_index_encrypted(3) -zip_fread(3) -zip_fclose(3) -.SS "close archive" -zip_close(3) -zip_discard(3) -.SS "miscellaneous" -zip_stat(3) -zip_file_get_comment(3) -zip_get_archive_comment(3) -zip_get_archive_flag(3) -zip_get_name(3) -zip_get_num_entries(3) -zip_set_default_password(3) -.SH "CREATING/MODIFYING ZIP ARCHIVES" -.SS "create/open archive" -zip_open(3) -.SS "add/change files and directories" -zip_dir_add(3) -zip_file_add(3) -zip_file_replace(3) -zip_file_set_comment(3) -zip_set_file_compression(3) -zip_source_buffer(3) -zip_source_file(3) -zip_source_filep(3) -zip_source_free(3) -zip_source_function(3) -zip_source_zip(3) -.SS "rename files" -zip_rename(3) -.SS "delete files" -zip_delete(3) -.SS "revert changes" -zip_unchange(3) -zip_unchange_all(3) -zip_unchange_archive(3) -.SS "read/modify extra fields" -zip_file_extra_field_by_id(3) -zip_file_extra_field_delete(3) -zip_file_extra_field_delete_by_id(3) -zip_file_extra_field_get(3) -zip_file_extra_field_set(3) -zip_file_extra_fields_count(3) -zip_file_extra_fields_count_by_id(3) -.SS "close archive" -zip_close(3) -.SS "miscellaneous" -zip_set_archive_comment(3) -zip_set_archive_flag(3) -zip_source(3) -.SH "ERROR HANDLING" -zip_error_to_str(3) -zip_strerror(3) -zip_file_strerror(3) -zip_error_get(3) -zip_error_get_sys_type(3) -zip_errors(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/links b/man/links new file mode 100644 index 0000000..57c3c89 --- /dev/null +++ b/man/links
@@ -0,0 +1,14 @@ +zip_error_clear zip_file_error_clear +zip_error_get zip_file_error_get +zip_error_init zip_error_init_with_code +zip_file_add zip_file_replace +zip_file_extra_field_delete zip_file_extra_field_delete_by_id +zip_file_extra_field_get zip_file_extra_field_get_by_id +zip_file_extra_fields_count zip_file_extra_fields_count_by_id +zip_fopen zip_fopen_index +zip_fopen_encrypted zip_fopen_index_encrypted +zip_add zip_replace +zip_open zip_open_from_source +zip_stat zip_stat_index +zip_source_function zip_source_function_create +zip_file_strerror zip_strerror
diff --git a/man/zip_add.man b/man/zip_add.man deleted file mode 100644 index ec56b74..0000000 --- a/man/zip_add.man +++ /dev/null
@@ -1,50 +0,0 @@ -.TH "ZIP_ADD" "3" "October 6, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_add\fR, -\fBzip_replace\fR -\- add file to zip archive or replace file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_source_t\ *source\fR); -.PD -.PP -\fIint\fR -.PD 0 -.HP 4n -\fBzip_replace\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_add\fR() -is the obsolete version of -zip_file_add(3). -It is the same as calling -zip_file_add(3) -with an empty -\fIflags\fR -argument. -Similarly, the -\fBzip_replace\fR() -function is the obsolete version of -zip_file_replace(3). -It is the same as calling -zip_file_replace(3) -with an empty -\fIflags\fR -argument. -.SH "SEE ALSO" -libzip(3), -zip_file_add(3), -zip_file_replace(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_add_dir.man b/man/zip_add_dir.man deleted file mode 100644 index 9990208..0000000 --- a/man/zip_add_dir.man +++ /dev/null
@@ -1,31 +0,0 @@ -.TH "ZIP_ADD_DIR" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_add_dir\fR -\- add directory to zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_add_dir\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_add_dir\fR() -is the obsolete version of -zip_dir_add(3). -It is the same as calling -zip_dir_add(3) -with an empty flags argument. -.SH "SEE ALSO" -libzip(3), -zip_dir_add(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_close.man b/man/zip_close.man deleted file mode 100644 index d553754..0000000 --- a/man/zip_close.man +++ /dev/null
@@ -1,98 +0,0 @@ -.TH "ZIP_CLOSE" "3" "February 13, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_close\fR -\- close zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_close\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_close\fR() -function closes -\fIarchive\fR -and frees the memory allocated for it. -If any files within were changed, those changes are written to disk -first. -If writing changes fails, -\fBzip_close\fR() -fails and -\fIarchive\fR -is left unchanged. -If -\fIarchive\fR -contains no files, the file is completely removed (no empty archive is -written). -.PP -To close a zip file without saving changes, use -zip_discard(3). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_close\fR() -will fail if: -.TP 19n -[\fRZIP_ER_EOF\fR] -Unexpected end-of-file found while reading from a file. -.TP 19n -[\fRZIP_ER_INTERNAL\fR] -The callback function of an added or replaced file returned an -error but failed to report which. -.TP 19n -[\fRZIP_ER_INVAL\fR] -The -\fIpath\fR -argument is -\fRNULL\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_NOZIP\fR] -File is not a zip archive. -.TP 19n -[\fRZIP_ER_READ\fR] -A file read failed. -.TP 19n -[\fRZIP_ER_RENAME\fR] -A temporary file could not be renamed to its final name. -.TP 19n -[\fRZIP_ER_SEEK\fR] -A file seek failed. -.TP 19n -[\fRZIP_ER_TMPOPEN\fR] -A temporary file could not be created. -.TP 19n -[\fRZIP_ER_WRITE\fR] -A file write failed. -.TP 19n -[\fRZIP_ER_ZLIB\fR] -An error occurred while (de)compressing a stream with -zlib(3). -.PD 0 -.PP -Additionally, any errors returned by the callback function -for added or replaced files will be passed back. -.PD -.SH "SEE ALSO" -libzip(3), -zip_discard(3), -zip_error_get(3), -zip_fdopen(3), -zip_open(3), -zip_strerror(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_delete.man b/man/zip_delete.man deleted file mode 100644 index a4bc2cf..0000000 --- a/man/zip_delete.man +++ /dev/null
@@ -1,42 +0,0 @@ -.TH "ZIP_DELETE" "3" "March 10, 2009" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_delete\fR -\- delete file from zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_delete\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR); -.PD -.SH "DESCRIPTION" -The file at position -\fIindex\fR -in the zip archive -\fIarchive\fR -is marked as deleted. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_delete\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_unchange(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_dir_add.man b/man/zip_dir_add.man deleted file mode 100644 index bd255b8..0000000 --- a/man/zip_dir_add.man +++ /dev/null
@@ -1,75 +0,0 @@ -.TH "ZIP_DIR_ADD" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_dir_add\fR -\- add directory to zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_dir_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_dir_add\fR() -adds a directory to a zip archive. -The argument -\fIarchive\fR -specifies the zip archive to which the directory should be added. -\fIname\fR -is the directory's name in the zip archive. -The -\fIflags\fR -argument can be any of: -.TP 22n -\fRZIP_FL_ENC_GUESS\fR -Guess encoding of -\fIname\fR -(default). -.TP 22n -\fRZIP_FL_ENC_UTF_8\fR -Interpret -\fIname\fR -as UTF-8. -.TP 22n -\fRZIP_FL_ENC_CP437\fR -Interpret -\fIname\fR -as code page 437 (CP-437). -.SH "RETURN VALUES" -Upon successful completion, the index of the new entry in the archive -is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_dir_add\fR() -fails if: -.TP 19n -[\fRZIP_ER_EXISTS\fR] -There is already an entry called -\fIname\fR -in the archive. -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIarchive\fR -or -\fIname\fR -are -\fRNULL\fR, -or invalid UTF-8 encoded file names. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_add(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_discard.man b/man/zip_discard.man deleted file mode 100644 index 3a3fae1..0000000 --- a/man/zip_discard.man +++ /dev/null
@@ -1,30 +0,0 @@ -.TH "ZIP_DISCARD" "3" "February 13, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_discard\fR -\- close zip archive and discard changes -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_discard\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_discard\fR() -function closes -\fIarchive\fR -and frees the memory allocated for it. -Any changes to the archive are not written to disk and discarded. -.SH "SEE ALSO" -libzip(3), -zip_close(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_clear.man b/man/zip_error_clear.man deleted file mode 100644 index 2cf0431..0000000 --- a/man/zip_error_clear.man +++ /dev/null
@@ -1,40 +0,0 @@ -.TH "ZIP_ERROR_CLEAR" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_clear\fR, -\fBzip_file_error_clear\fR -\- clear error state for archive or file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_clear\fR(\fIzip_t\ *archive\fR); -.PD -.PP -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_file_error_clear\fR(\fIzip_file_t\ *file\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_clear\fR() -function clears the error state for the zip archive -\fIarchive\fR. -.PP -The -\fBzip_file_error_clear\fR() -function does the same for the zip file -\fIfile\fR. -.SH "SEE ALSO" -libzip(3), -zip_error_get(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_code_system.man b/man/zip_error_code_system.man deleted file mode 100644 index bc839e2..0000000 --- a/man/zip_error_code_system.man +++ /dev/null
@@ -1,32 +0,0 @@ -.TH "ZIP_ERROR_CODE_SYSTEM" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_code_system\fR -\- get operating system error part of zip_error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_error_code_system\fR(\fIconst\ zip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_code_system\fR() -function returns the system specific part of the error from the -zip_error error -\fIze\fR. -For finding out what system reported the error, use -zip_error_system_type(3). -.SH "SEE ALSO" -libzip(3), -zip_error_code_zip(3), -zip_error_system_type(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_code_zip.man b/man/zip_error_code_zip.man deleted file mode 100644 index 627413a..0000000 --- a/man/zip_error_code_zip.man +++ /dev/null
@@ -1,29 +0,0 @@ -.TH "ZIP_ERROR_CODE_ZIP" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_code_zip\fR -\- get libzip error part of zip_error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_error_code_zip\fR(\fIconst\ zip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_code_zip\fR() -function returns the libzip specific part of the error from the -zip_error error -\fIze\fR. -.SH "SEE ALSO" -libzip(3), -zip_error_code_system(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_fini.man b/man/zip_error_fini.man deleted file mode 100644 index f715aef..0000000 --- a/man/zip_error_fini.man +++ /dev/null
@@ -1,29 +0,0 @@ -.TH "ZIP_ERROR_FINI" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_fini\fR -\- clean up zip_error structure -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_fini\fR(\fIzip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_fini\fR() -function cleans up and frees internally allocated memory of the -zip_error pointed to by -\fIze\fR. -.SH "SEE ALSO" -libzip(3), -zip_error_init(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_get.man b/man/zip_error_get.man deleted file mode 100644 index 491621c..0000000 --- a/man/zip_error_get.man +++ /dev/null
@@ -1,87 +0,0 @@ -.TH "ZIP_ERROR_GET" "3" "December 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_get\fR, -\fBzip_file_error_get\fR -\- get error codes for archive or file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_get\fR(\fIzip_t\ *archive\fR, \fIint\ *zep\fR, \fIint\ *sep\fR); -.PD -.PP -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_file_error_get\fR(\fIzip_file_t\ *file\fR, \fIint\ *zep\fR, \fIint\ *sep\fR); -.PD -.SH "DESCRIPTION" -The functions -\fBzip_error_get\fR() -and -\fBzip_file_error_get\fR() -are deprecated. -Use -zip_error_code_system(3), -zip_error_code_zip(3), -zip_file_get_error(3), -and -zip_get_error(3) -instead. -.PP -For -\fBzip_error_get\fR(), -replace -.nf -.sp -.RS 6n -int ze, se; -zip_error_get(za, &ze, &se); -.RE -.fi -with -.nf -.sp -.RS 6n -int ze, se; -zip_error_t *error = zip_get_error(za); -ze = zip_error_code_zip(error); -se = zip_error_code_system(error); -.RE -.fi -For -\fBzip_file_error_get\fR(), -replace -.nf -.sp -.RS 6n -int ze, se; -zip_file_error_get(zf, &ze, &se); -.RE -.fi -with -.nf -.sp -.RS 6n -int ze, se; -zip_error_t *error = zip_file_get_error(zf); -ze = zip_error_code_zip(error); -se = zip_error_code_system(error); -.RE -.fi -.SH "SEE ALSO" -libzip(3), -zip_error_code_system(3), -zip_error_code_zip(3), -zip_file_get_error(3), -zip_get_error(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_get_sys_type.man b/man/zip_error_get_sys_type.man deleted file mode 100644 index 2bbf912..0000000 --- a/man/zip_error_get_sys_type.man +++ /dev/null
@@ -1,49 +0,0 @@ -.TH "ZIP_ERROR_GET_SYS_TYPE" "3" "December 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_get_sys_type\fR -\- get type of system error code -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_error_get_sys_type\fR(\fIint\ ze\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_error_get_sys_type\fR() -is deprecated; use -zip_error_init_with_code(3) -and -zip_error_system_type(3) -instead. -.PP -Replace -.nf -.sp -.RS 6n -int i = zip_error_get_sys_type(ze); -.RE -.fi -with -.nf -.sp -.RS 6n -zip_error_t error; -zip_error_init_with_code(&error, ze); -int i = zip_error_system_type(&error); -.RE -.fi -.SH "SEE ALSO" -libzip(3), -zip_error_init_with_code(3), -zip_error_system_type(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_init.man b/man/zip_error_init.man deleted file mode 100644 index d8b996f..0000000 --- a/man/zip_error_init.man +++ /dev/null
@@ -1,46 +0,0 @@ -.TH "ZIP_ERROR_INIT" "3" "December 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_init\fR, -\fBzip_error_init_with_code\fR -\- initialize zip_error structure -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_init\fR(\fIzip_error_t\ *error\fR); -.PD -.PP -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_init_with_code\fR(\fIzip_error_t\ *error\fR, \fIint\ ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_init\fR() -function initializes the zip_error pointed to by -\fIerror\fR. -\fI*error\fR -must be allocated before calling -\fBzip_error_init\fR(). -.PP -The -\fBzip_error_init_with_code\fR() -function does the same, but additionally sets the zip error code to -\fIze\fR -and sets the system error code to the current -errno(3) -value, if appropriate. -.SH "SEE ALSO" -libzip(3), -zip_error_fini(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_set.man b/man/zip_error_set.man deleted file mode 100644 index 02e2f01..0000000 --- a/man/zip_error_set.man +++ /dev/null
@@ -1,38 +0,0 @@ -.TH "ZIP_ERROR_SET" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_set\fR -\- fill in zip_error structure -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_error_set\fR(\fIzip_error_t\ *ze\fR, \fIint\ le\fR, \fIint\ se\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_set\fR() -function sets the zip_error pointed to by -\fIze\fR -to the libzip error code -\fIle\fR -and the system error code -\fIse\fR. -.PP -\fIze\fR -must be allocated and initialized with -zip_error_fini(3) -before calling -\fBzip_error\fR(\fIset\fR). -.SH "SEE ALSO" -libzip(3), -zip_error_init(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_strerror.man b/man/zip_error_strerror.man deleted file mode 100644 index b69d5a2..0000000 --- a/man/zip_error_strerror.man +++ /dev/null
@@ -1,36 +0,0 @@ -.TH "ZIP_ERROR_STRERROR" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_strerror\fR -\- create human-readable string for zip_error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_error_strerror\fR(\fIzip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_strerror\fR() -function returns an error message string corresponding to -\fIze\fR -like -strerror(3). -This string will stay valid until the next call to -\fBzip_error_strerror\fR() -or until -zip_error_fini(3) -is called. -.SH "SEE ALSO" -libzip(3), -strerror(3), -zip_error_fini(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_system_type.man b/man/zip_error_system_type.man deleted file mode 100644 index 8187c30..0000000 --- a/man/zip_error_system_type.man +++ /dev/null
@@ -1,46 +0,0 @@ -.TH "ZIP_ERROR_SYSTEM_TYPE" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_system_type\fR -\- return type of system error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_error_system_type\fR(\fIconst\ zip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_error_system_type\fR() -function returns the type of the system specific part for the zip_error -\fIze\fR. -Currently, the following system types are defined: -.TP 13n -\fRZIP_ET_NONE\fR -System specific part of -\fIze\fR -is unused. -.TP 13n -\fRZIP_ET_SYS\fR -System specific part of -\fIze\fR -is an -errno(2). -.TP 13n -\fRZIP_ET_ZLIB\fR -\fIze\fR -is a -zlib(3) -error. -.SH "SEE ALSO" -libzip(3), -zip_error_code_system(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_to_data.man b/man/zip_error_to_data.man deleted file mode 100644 index b90a49c..0000000 --- a/man/zip_error_to_data.man +++ /dev/null
@@ -1,38 +0,0 @@ -.TH "ZIP_ERROR_TO_DATA" "3" "November 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_to_data\fR -\- convert zip_error to return value suitable for ZIP_SOURCE_ERROR -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_error_to_data\fR(\fIconst\ zip_error_t\ *ze\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ len\fR); -.PD -.SH "DESCRIPTION" -\fBzip_error_to_data\fR() -function converts the zip_error -\fIze\fR -into data suitable as return value for -\fRZIP_SOURCE_ERROR\fR. -The data is written into the buffer -\fIdata\fR -of size -\fIlen\fR. -If the buffer is not large enough to hold 2 ints, an error is -returned. -.SH "RETURN VALUES" -\fBzip_error_to_data\fR() -returns 2*(sizeof int) on success, and \-1 on error. -.SH "SEE ALSO" -libzip(3), -zip_source_function(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_error_to_str.man b/man/zip_error_to_str.man deleted file mode 100644 index aac3d8b..0000000 --- a/man/zip_error_to_str.man +++ /dev/null
@@ -1,52 +0,0 @@ -.TH "ZIP_ERROR_TO_STR" "3" "December 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_error_to_str\fR -\- get string representation of zip error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_error_to_str\fR(\fIchar\ *buf\fR, \fIzip_uint64_t\ len\fR, \fIint\ ze\fR, \fIint\ se\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_error_to_str\fR() -is deprecated; use -zip_error_init_with_code(3) -and -zip_error_strerror(3) -instead. -.PP -Replace -.nf -.sp -.RS 6n -char buf[BUFSIZE]; -zip_error_to_str(buf, sizeof(buf), ze, se); -printf("%s", buf); -.RE -.fi -with -.nf -.sp -.RS 6n -zip_error_t error; -zip_error_init_with_code(&error, ze); -printf("%s", zip_error_strerror(&error)); -zip_error_fini(&error); -.RE -.fi -.SH "SEE ALSO" -libzip(3), -zip_error_init_with_code(3), -zip_error_strerror(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_errors.man b/man/zip_errors.man deleted file mode 100644 index 4591743..0000000 --- a/man/zip_errors.man +++ /dev/null
@@ -1,100 +0,0 @@ -.TH "ZIP_ERRORS" "3" "March 10, 2009" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_errors\fR -\- list of all libzip error codes -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.SH "DESCRIPTION" -The following error codes are used by libzip: -.TP 23n -[\fRZIP_ER_OK\fR] -No error. -.TP 23n -[\fRZIP_ER_MULTIDISK\fR] -Multi-disk zip archives not supported. -.TP 23n -[\fRZIP_ER_RENAME\fR] -Renaming temporary file failed. -.TP 23n -[\fRZIP_ER_CLOSE\fR] -Closing zip archive failed. -.TP 23n -[\fRZIP_ER_SEEK\fR] -Seek error. -.TP 23n -[\fRZIP_ER_READ\fR] -Read error. -.TP 23n -[\fRZIP_ER_WRITE\fR] -Write error. -.TP 23n -[\fRZIP_ER_CRC\fR] -CRC error. -.TP 23n -[\fRZIP_ER_ZIPCLOSED\fR] -Containing zip archive was closed. -.TP 23n -[\fRZIP_ER_NOENT\fR] -No such file. -.TP 23n -[\fRZIP_ER_EXISTS\fR] -File already exists. -.TP 23n -[\fRZIP_ER_OPEN\fR] -Can't open file. -.TP 23n -[\fRZIP_ER_TMPOPEN\fR] -Failure to create temporary file. -.TP 23n -[\fRZIP_ER_ZLIB\fR] -Zlib error. -.TP 23n -[\fRZIP_ER_MEMORY\fR] -Malloc failure. -.TP 23n -[\fRZIP_ER_CHANGED\fR] -Entry has been changed. -.TP 23n -[\fRZIP_ER_COMPNOTSUPP\fR] -Compression method not supported. -.TP 23n -[\fRZIP_ER_EOF\fR] -Premature EOF. -.TP 23n -[\fRZIP_ER_INVAL\fR] -Invalid argument. -.TP 23n -[\fRZIP_ER_NOZIP\fR] -Not a zip archive. -.TP 23n -[\fRZIP_ER_INTERNAL\fR] -Internal error. -.TP 23n -[\fRZIP_ER_INCONS\fR] -Zip archive inconsistent. -.TP 23n -[\fRZIP_ER_REMOVE\fR] -Can't remove file. -.TP 23n -[\fRZIP_ER_DELETED\fR] -Entry has been deleted. -.TP 23n -[\fRZIP_ER_ENCRNOTSUPP\fR] -Encryption method not supported. -.TP 23n -[\fRZIP_ER_RDONLY\fR] -Read-only archive. -.TP 23n -[\fRZIP_ER_NOPASSWD\fR] -No password provided. -.TP 23n -[\fRZIP_ER_WRONGPASSWD\fR] -Wrong password provided. -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fclose.man b/man/zip_fclose.man deleted file mode 100644 index 37e239e..0000000 --- a/man/zip_fclose.man +++ /dev/null
@@ -1,33 +0,0 @@ -.TH "ZIP_FCLOSE" "3" "October 3, 2003" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_fclose\fR -\- close file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_fclose\fR(\fIzip_file_t\ *file\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_fclose\fR() -function closes -\fIfile\fR -and frees the memory allocated for it. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, the error code is returned. -.SH "SEE ALSO" -libzip(3), -zip_fopen(3), -zip_fread(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fdopen.man b/man/zip_fdopen.man deleted file mode 100644 index 6a4661e..0000000 --- a/man/zip_fdopen.man +++ /dev/null
@@ -1,122 +0,0 @@ -.TH "ZIP_FDOPEN" "3" "February 13, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_fdopen\fR -\- open zip archive using open file descriptor -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_t *\fR -.PD 0 -.HP 4n -\fBzip_fdopen\fR(\fIint\ fd\fR, \fIint\ flags\fR, \fIint\ *errorp\fR); -.PD -.SH "DESCRIPTION" -The zip archive specified by the open file descriptor -\fIfd\fR -is opened and a pointer to a -\fIstruct zip\fR, -used to manipulate the archive, is returned. -In contrast to -zip_open(3), -using -\fBzip_fdopen\fR -the archive can only be opened in read-only mode. -The -\fIfd\fR -argument may not be used any longer after calling -\fBzip_fdopen\fR. -The -\fIflags\fR -are specified by -\fIor\fR'ing -the following values, or 0 for none of them. -.RS 6n -.TP 15n -\fRZIP_CHECKCONS\fR -Perform additional stricter consistency checks on the archive, and -error if they fail. -.RE -.PP -If an error occurs and -\fIerrorp\fR -is -non-\fRNULL\fR, -it will be set to the corresponding error code. -.SH "RETURN VALUES" -Upon successful completion -\fBzip_fdopen\fR() -returns a -\fIstruct zip\fR -pointer, and -\fIfd\fR -should not be used any longer, nor passed to -close(2). -Otherwise, -\fRNULL\fR -is returned and -\fI*errorp\fR -is set to indicate the error. -In the error case, -\fIfd\fR -remains unchanged. -.SH "ERRORS" -The file specified by -\fIfd\fR -is prepared for use by -libzip(3) -unless: -.TP 19n -[\fRZIP_ER_INCONS\fR] -Inconsistencies were found in the file specified by -\fIpath\fR. -This error is often caused by specifying -\fRZIP_CHECKCONS\fR -but can also happen without it. -.TP 19n -[\fRZIP_ER_INVAL\fR] -The -\fIflags\fR -argument is invalid. -Not all -zip_open(3) -flags are allowed for -\fBzip_fdopen\fR, -see -\fIDESCRIPTION\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_NOZIP\fR] -The file specified by -\fIfd\fR -is not a zip archive. -.TP 19n -[\fRZIP_ER_OPEN\fR] -The file specified by -\fIfd\fR -could not be prepared for use by -libzip(3). -.TP 19n -[\fRZIP_ER_READ\fR] -A read error occurred; see -\fIerrno\fR -for details. -.TP 19n -[\fRZIP_ER_SEEK\fR] -The file specified by -\fIfd\fR -does not allow seeks. -.SH "SEE ALSO" -libzip(3), -zip_close(3), -zip_error_to_str(3), -zip_open(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_add.man b/man/zip_file_add.man deleted file mode 100644 index 66da783..0000000 --- a/man/zip_file_add.man +++ /dev/null
@@ -1,133 +0,0 @@ -.TH "ZIP_FILE_ADD" "3" "August 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_add\fR, -\fBzip_file_replace\fR -\- add file to zip archive or replace file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_file_add\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *name\fR, \fIzip_source_t\ *source\fR, \fIzip_flags_t\ flags\fR); -.PD -.PP -\fIint\fR -.PD 0 -.HP 4n -\fBzip_file_replace\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_source_t\ *source\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_file_add\fR() -adds a file to a zip archive, while -\fBzip_file_replace\fR() -replaces an existing file in a zip archive. -The argument -\fIarchive\fR -specifies the zip archive to which the file should be added. -\fIname\fR -is the file's name in the zip archive (for -\fBzip_file_add\fR()), -while -\fIindex\fR -specifies which file should be replaced (for -\fBzip_file_replace\fR()). -The -\fIflags\fR -argument can be any combination of -\fRZIP_FL_OVERWRITE\fR -with one of -\fRZIP_FL_ENC_*\fR: -.TP 22n -\fRZIP_FL_OVERWRITE\fR -Overwrite any existing file of the same name. -For -\fBzip_file_add\fR -only. -.TP 22n -\fRZIP_FL_ENC_GUESS\fR -Guess encoding of -\fIname\fR -(default). -.TP 22n -\fRZIP_FL_ENC_UTF_8\fR -Interpret -\fIname\fR -as UTF-8. -.TP 22n -\fRZIP_FL_ENC_CP437\fR -Interpret -\fIname\fR -as code page 437 (CP-437). -.PD 0 -.PP -The data is obtained from the -\fIsource\fR -argument, see -zip_source(3). -.PD -.SH "RETURN VALUES" -Upon successful completion, -\fBzip_file_add\fR() -returns the index of the new file in the archive, and -\fBzip_file_replace\fR() -returns 0. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "EXAMPLES" -.nf -.RS 6n -zip_source_t *s; -const char buf="teststring"; - -if ((s=zip_source_buffer(archive, buffer, sizeof(buf), 0)) == NULL || - zip_file_add(archive, name, s, ZIP_FL_ENC_UTF_8) < 0) { - zip_source_free(s); - printf("error adding file: %s\en", zip_strerror(archive)); -} -.RE -.fi -.SH "ERRORS" -\fBzip_file_add\fR() -and -\fBzip_file_replace\fR() -fail if: -.TP 19n -[\fRZIP_ER_EXISTS\fR] -There is already a file called -\fIname\fR -in the archive. -(Only applies to -\fBzip_file_add\fR(), -and only if -\fRZIP_FL_OVERWRITE\fR -is not provided). -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIsource\fR -or -\fIname\fR -are -\fRNULL\fR, -or -\fIindex\fR -is invalid. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_RDONLY\fR] -Archive was opened in read-only mode. -.SH "SEE ALSO" -libzip(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_field_delete.man b/man/zip_file_extra_field_delete.man deleted file mode 100644 index 7179434..0000000 --- a/man/zip_file_extra_field_delete.man +++ /dev/null
@@ -1,102 +0,0 @@ -.TH "ZIP_FILE_EXTRA_FIELD_DELETE" "3" "July 31, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_extra_field_delete\fR, -\fBzip_file_extra_field_delete_by_id\fR -\- delete extra field for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_file_extra_field_delete\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIzip_flags_t\ flags\fR); -.PD -.PP -\fIint\fR -.PD 0 -.HP 4n -\fBzip_file_extra_field_delete_by_id\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_id\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_extra_field_delete\fR() -function deletes the extra field with index -\fIextra_field_index\fR -for the file at position -\fIindex\fR -in the zip archive. -.PP -If -\fIextra_field_index\fR -is -\fRZIP_EXTRA_FIELD_ALL\fR, -then all extra fields will be deleted. -.PP -The following -\fIflags\fR -are supported: -.RS 6n -.TP 18n -\fRZIP_FL_CENTRAL\fR -Delete extra fields from the archive's central directory. -.TP 18n -\fRZIP_FL_LOCAL\fR -Delete extra fields from the local file headers. -.RE -.PP -The -\fBzip_file_extra_field_delete_by_id\fR() -function deletes the extra field with ID (two-byte signature) -\fIextra_field_id\fR -and index -\fIextra_field_index\fR -(in other words, the -\fIextra_field_index\fR'th -extra field with ID -\fIextra_field_id\fR) -The other arguments are the same as for -\fBzip_file_extra_field_delete\fR() -(\fRZIP_EXTRA_FIELD_ALL\fR -will delete all extra fields of the specified ID). -.PP -Please note that due to the library design, the index of an extra -field may be different between central directory and local file -headers. -For this reason, it is not allowed to specify both -\fRZIP_FL_CENTRAL\fR -and -\fRZIP_FL_LOCAL\fR -in -\fIflags\fR, -except when deleting all extra fields (i.e., -\fIextra_field_index\fR -being -\fRZIP_EXTRA_FIELD_ALL\fR). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_extra_field_delete\fR() -and -\fBzip_file_extra_field_delete_by_id\fR() -fail if: -.TP 19n -[\fRZIP_ER_NOENT\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_file_extra_field_get(3), -zip_file_extra_field_set(3), -zip_file_extra_fields_count(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_field_get.man b/man/zip_file_extra_field_get.man deleted file mode 100644 index 5c2c883..0000000 --- a/man/zip_file_extra_field_get.man +++ /dev/null
@@ -1,130 +0,0 @@ -.TH "ZIP_FILE_EXTRA_FIELD_GET" "3" "October 8, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_extra_field_get\fR, -\fBzip_file_extra_field_get_by_id\fR -\- get extra field for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst zip_uint8_t *\fR -.PD 0 -.HP 4n -\fBzip_file_extra_field_get\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIzip_uint16_t\ *idp\fR, \fIzip_uint16_t\ *lenp\fR, \fIzip_flags_t\ flags\fR); -.PD -.PP -\fIconst zip_uint8_t *\fR -.PD 0 -.HP 4n -\fBzip_file_extra_field_get_by_id\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_id\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIzip_uint16_t\ *lenp\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_extra_field_get\fR() -function returns the extra field with index -\fIextra_field_index\fR -for the file at position -\fIindex\fR -in the zip archive. -This pointer should not be modified or -free(3)'d, -and becomes invalid when -\fIarchive\fR -is closed. -If -\fIidp\fR -is not -\fRNULL\fR, -the integer to which it points will be set to the ID (two-byte -signature) of the selected extra field. -If -\fIlenp\fR -is not -\fRNULL\fR, -the integer to which it points will be set to the length of the -extra field. -Generally speaking, -\fIlenp\fR -and -\fIidp\fR -should be passed since only the extra field data is returned (i.e., -neither the ID nor the length, if the -\fIidp\fR -and -\fIlenp\fR -arguments are not provided). -.PP -The following -\fIflags\fR -are supported: -.RS 6n -.TP 20n -\fRZIP_FL_CENTRAL\fR -Return extra fields from the archive's central directory. -.TP 20n -\fRZIP_FL_LOCAL\fR -Return extra fields from the local file headers. -.TP 20n -\fRZIP_FL_UNCHANGED\fR -Return the original unchanged extra fields, ignoring any changes made. -.RE -.PP -The -\fBzip_file_extra_field_get_by_id\fR() -function returns the extra field with ID (two-byte signature) -\fIextra_field_id\fR -and index -\fIextra_field_index\fR -(in other words, the -\fIextra_field_index\fR'th -extra field with ID -\fIextra_field_id\fR) -The other arguments are the same as for -\fBzip_file_extra_field_get\fR(). -.SH "RETURN VALUES" -Upon successful completion, a pointer to an extra field is returned, -or -\fRNULL\fR -if there is no extra field with that -\fIextra_field_index\fR -for the file with index -\fIindex\fR. -In case of an error, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_extra_field_get\fR() -and -\fBzip_file_extra_field_get_by_id\fR() -fail if: -.TP 19n -[\fRZIP_ER_NOENT\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR, -or -\fIextra_field_index\fR -is not a valid extra file index (for ID -\fIextra_field_id\fR). -.SH "SEE ALSO" -libzip(3), -zip_file_extra_field_delete(3), -zip_file_extra_field_set(3), -zip_file_extra_fields_count(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR> -.SH "CAVEATS" -Please note that the extra field IDs 0x0001 (ZIP64 extension), -0x6375 (Infozip UTF-8 comment), and -0x7075 (Infozip UTF-8 file name) can not be read using -\fBzip_file_extra_field_get\fR() -since they are used by -libzip(3) -internally.
diff --git a/man/zip_file_extra_field_set.man b/man/zip_file_extra_field_set.man deleted file mode 100644 index 0926ec0..0000000 --- a/man/zip_file_extra_field_set.man +++ /dev/null
@@ -1,87 +0,0 @@ -.TH "ZIP_FILE_EXTRA_FIELD_SET" "3" "February 20, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_extra_field_set\fR -\- set extra field for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_file_extra_field_set\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_id\fR, \fIzip_uint16_t\ extra_field_index\fR, \fIconst\ zip_uint8_t\ *extra_field_data\fR, \fIzip_uint16_t\ len\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_extra_field_set\fR() -function sets the extra field with ID (two-byte signature) -\fIextra_field_id\fR -and index -\fIextra_field_index\fR -for the file at position -\fIindex\fR -in the zip archive. -The extra field's data will be set to -\fIextra_field_data\fR -and length -\fIlen\fR. -If a new entry shall be appended, set -\fIextra_field_index\fR -to -\fRZIP_EXTRA_FIELD_NEW\fR. -.PP -At least one of the following -\fIflags\fR -must be set: -.RS 6n -.TP 18n -\fRZIP_FL_CENTRAL\fR -Set extra field in the archive's central directory. -.TP 18n -\fRZIP_FL_LOCAL\fR -Set extra field in the local file headers. -.RE -.PP -Please note that the extra field IDs 0x0001 (ZIP64 extension), -0x6375 (Infozip UTF-8 comment), and -0x7075 (Infozip UTF-8 file name) can not be set using -\fBzip_file_extra_field_set\fR() -since they are set by -libzip(3) -automatically when needed. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_extra_field_set\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -The extra field size is too large (ID and length need 4 bytes; the -maximum length of all extra fields for one file combined is 65536 -bytes). -This error also occurs if -\fIextra_field_index\fR -is too large. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_NOENT\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_file_extra_field_delete(3), -zip_file_extra_field_get(3), -zip_file_extra_fields_count(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_extra_fields_count.man b/man/zip_file_extra_fields_count.man deleted file mode 100644 index 17d3f7e..0000000 --- a/man/zip_file_extra_fields_count.man +++ /dev/null
@@ -1,85 +0,0 @@ -.TH "ZIP_FILE_EXTRA_FIELDS_COUNT" "3" "February 20, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_extra_fields_count\fR, -\fBzip_file_extra_fields_count_by_id\fR -\- count extra fields for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int16_t\fR -.PD 0 -.HP 4n -\fBzip_file_extra_fields_count\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR); -.PD -.PP -\fIzip_int16_t\fR -.PD 0 -.HP 4n -\fBzip_file_extra_fields_count_by_id\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint16_t\ extra_field_id\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_extra_fields_count\fR() -function counts the extra fields for the file at position -\fIindex\fR -in the zip archive. -.PP -The following -\fIflags\fR -are supported: -.RS 6n -.TP 18n -\fRZIP_FL_CENTRAL\fR -Count extra fields from the archive's central directory. -.TP 18n -\fRZIP_FL_LOCAL\fR -Count extra fields from the local file headers. -.TP 18n -\fRZIP_FL_UNCHANGED\fR -Count the original unchanged extra fields, ignoring any changes made. -.RE -.PP -The -\fBzip_file_extra_fields_count_by_id\fR() -function counts the extra fields with ID (two-byte signature) -\fIextra_field_id\fR. -The other arguments are the same as for -\fBzip_file_extra_fields_count\fR(). -.PP -Extra fields that are the same in the central directory and the local file -header are merged into one. -Therefore, the counts with -\fRZIP_FL_CENTRAL\fR -and -\fRZIP_FL_LOCAL\fR -do not need to add up to the same value as when given -\fRZIP_FL_CENTRAL|ZIP_FL_LOCAL\fR -at the same time. -.SH "RETURN VALUES" -Upon successful completion, the requested number of extra fields is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_extra_fields_count\fR() -and -\fBzip_file_extra_fields_count_by_id\fR() -fail if: -.TP 19n -[\fRZIP_ER_NOENT\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_file_extra_field_delete(3), -zip_file_extra_field_get(3), -zip_file_extra_field_set(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_get_comment.man b/man/zip_file_get_comment.man deleted file mode 100644 index 94b5cb4..0000000 --- a/man/zip_file_get_comment.man +++ /dev/null
@@ -1,89 +0,0 @@ -.TH "ZIP_FILE_GET_COMMENT" "3" "September 19, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_get_comment\fR -\- get comment for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_file_get_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_uint32_t\ *lenp\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_get_comment\fR() -function returns the comment for the file at position -\fIindex\fR -in the zip archive. -The name is in UTF-8 encoding unless -\fRZIP_FL_ENC_RAW\fR -was specified (see below). -This pointer should not be modified or -free(3)'d, -and becomes invalid when -\fIarchive\fR -is closed. -If -\fIlenp\fR -is not -\fRNULL\fR, -the integer to which it points will be set to the length of the -comment. -If -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original unchanged comment is returned. -.PP -Additionally, the following -\fIflags\fR -are supported: -.RS 6n -.TP 21n -\fRZIP_FL_ENC_RAW\fR -Return the unmodified comment as it is in the ZIP archive. -.TP 21n -\fRZIP_FL_ENC_GUESS\fR -(Default.) -Guess the encoding of the comment in the ZIP archive and convert it -to UTF-8, if necessary. -.TP 21n -\fRZIP_FL_ENC_STRICT\fR -Follow the ZIP specification for file names and extend it to file -comments, expecting them to be encoded in CP-437 in the ZIP archive -(except if it is a UTF-8 comment from the special extra field). -Convert it to UTF-8. -.RE -\fINote\fR: -ASCII is a subset of both CP-437 and UTF-8. -.SH "RETURN VALUES" -Upon successful completion, a pointer to the comment is returned, -or -\fRNULL\fR -if there is no comment. -In case of an error, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_get_comment\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_file_set_comment(3), -zip_get_archive_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_get_error.man b/man/zip_file_get_error.man deleted file mode 100644 index c80dad5..0000000 --- a/man/zip_file_get_error.man +++ /dev/null
@@ -1,26 +0,0 @@ -.TH "ZIP_FILE_GET_ERROR" "3" "November 9, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_get_error\fR -\- extract zip_error from zip_file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_error_t *\fR -.PD 0 -.HP 4n -\fBzip_file_get_error\fR(\fIzip_file_t\ *zf\fR); -.PD -.SH "DESCRIPTION" -\fBzip_file_get_error\fR() -function returns the zip_error associated with the zip_file -\fIzf\fR. -.SH "SEE ALSO" -libzip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_get_external_attributes.man b/man/zip_file_get_external_attributes.man deleted file mode 100644 index 8d7c3fc..0000000 --- a/man/zip_file_get_external_attributes.man +++ /dev/null
@@ -1,138 +0,0 @@ -.TH "ZIP_FILE_GET_EXTERNAL_ATTRIBUTES" "3" "September 19, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_get_external_attributes\fR -\- get external attributes for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_file_get_external_attributes\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR, \fIzip_uint8_t\ *opsys\fR, \fIzip_uint32_t\ *attributes\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_get_external_attributes\fR() -function returns the operating system and external attributes for the -file at position -\fIindex\fR -in the zip archive. -The external attributes usually contain the operating system-specific -file permissions. -If -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original unchanged values are returned. -If -\fIopsys\fR -or -\fIattributes\fR -are -\fRNULL\fR, -they are not filled in. -.PP -The following operating systems are defined by the zip specification: -.RS 6n -.PD 0 -.PP -\fRZIP_OPSYS_ACORN_RISC\fR -.PP -\fRZIP_OPSYS_ALTERNATE_MVS\fR -.PP -\fRZIP_OPSYS_AMIGA\fR -.PP -\fRZIP_OPSYS_ATARI_ST\fR -.PP -\fRZIP_OPSYS_BEOS\fR -.PP -\fRZIP_OPSYS_CPM\fR -.PP -\fRZIP_OPSYS_DOS\fR -.PP -\fRZIP_OPSYS_MACINTOSH\fR -.PP -\fRZIP_OPSYS_MVS\fR -.PP -\fRZIP_OPSYS_OPENVMS\fR -.PP -\fRZIP_OPSYS_OS_2\fR -.PP -\fRZIP_OPSYS_OS_400\fR -.PP -\fRZIP_OPSYS_OS_X\fR -.PP -\fRZIP_OPSYS_TANDEM\fR -.PP -\fRZIP_OPSYS_UNIX\fR -.PP -\fRZIP_OPSYS_VFAT\fR -.PP -\fRZIP_OPSYS_VM_CMS\fR -.PP -\fRZIP_OPSYS_VSE\fR -.PP -\fRZIP_OPSYS_WINDOWS_NTFS\fR -(uncommon, use -\fRZIP_OPSYS_DOS\fR -instead) -.PP -\fRZIP_OPSYS_Z_SYSTEM\fR -.RE -.PD -.PP -The defines above follow the PKWARE Inc. Appnote; please note that -the InfoZIP Appnote has a slightly different mapping. -.SH "RETURN VALUES" -Upon successful completion, 0 is returned. -In case of an error, -\fR\-1\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "EXAMPLES" -The following code can be used to expand -\fIattributes\fR -if the operating system is -\fRZIP_OPSYS_DOS\fR. -.nf -.sp -.RS 0n -#include <sys/stat.h> - -#define FA_RDONLY 0x01 // FILE_ATTRIBUTE_READONLY -#define FA_DIREC 0x10 // FILE_ATTRIBUTE_DIRECTORY - -static mode_t -_zip_dos_attr2mode(zip_uint32_t attr) -{ - mode_t m = S_IRUSR | S_IRGRP | S_IROTH; - if (0 == (attr & FA_RDONLY)) - m |= S_IWUSR | S_IWGRP | S_IWOTH; - - if (attr & FA_DIREC) - m = (S_IFDIR | (m & ~S_IFMT)) | S_IXUSR | S_IXGRP | S_IXOTH; - - return m; -} -.RE -.fi -.SH "ERRORS" -\fBzip_file_get_external_attributes\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_file_set_external_attributes(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_rename.man b/man/zip_file_rename.man deleted file mode 100644 index ab2fa41..0000000 --- a/man/zip_file_rename.man +++ /dev/null
@@ -1,74 +0,0 @@ -.TH "ZIP_FILE_RENAME" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_rename\fR -\- rename file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_file_rename\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIconst\ char\ *name\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The file at position -\fIindex\fR -in the zip archive -\fIarchive\fR -is renamed to -\fIname\fR. -The -\fIflags\fR -argument can be any of: -.TP 22n -\fRZIP_FL_ENC_GUESS\fR -Guess encoding of -\fIname\fR -(default). -.TP 22n -\fRZIP_FL_ENC_UTF_8\fR -Interpret -\fIname\fR -as UTF-8. -.TP 22n -\fRZIP_FL_ENC_CP437\fR -Interpret -\fIname\fR -as code page 437 (CP-437). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_rename\fR() -fails if: -.TP 19n -[\fRZIP_ER_DELETED\fR] -The file to be renamed has been deleted from the archive. -.TP 19n -[\fRZIP_ER_EXISTS\fR] -There is already a file called -\fIname\fR -in the archive. -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR, -\fIname is\fR -\fRNULL\fR, -the empty string, or not a valid UTF-8 encoded string. -Also a file cannot be renamed to a directory or vice versa. -Directories are denoted by a trailing slash. -.SH "SEE ALSO" -libzip(3), -zip_unchange(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_set_comment.man b/man/zip_file_set_comment.man deleted file mode 100644 index 15d082b..0000000 --- a/man/zip_file_set_comment.man +++ /dev/null
@@ -1,86 +0,0 @@ -.TH "ZIP_FILE_SET_COMMENT" "3" "September 19, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_set_comment\fR -\- set comment for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_file_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIconst\ char\ *comment\fR, \fIzip_uint16_t\ len\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_set_comment\fR() -function sets the comment for the file at position -\fIindex\fR -in the zip archive to -\fIcomment\fR -of length -\fIlen\fR. -If -\fIcomment\fR -is -\fRNULL\fR -and -\fIlen\fR -is 0, the file comment will be removed. -The -\fIflags\fR -argument can be any of: -.TP 22n -\fRZIP_FL_ENC_GUESS\fR -Guess encoding of -\fIcomment\fR -(default). -.TP 22n -\fRZIP_FL_ENC_UTF_8\fR -Interpret -\fIcomment\fR -as UTF-8. -.TP 22n -\fRZIP_FL_ENC_CP437\fR -Interpret -\fIcomment\fR -as code page 437 (CP-437). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_set_comment\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR, -or -\fIlen\fR -is less than 0 or longer than the maximum comment length in a zip file -(65535), or -\fIcomment\fR -is not a valid UTF-8 encoded string. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_RDONLY\fR] -The -\fIarchive\fR -was opened in read-only mode. -.SH "SEE ALSO" -libzip(3), -zip_file_get_comment(3), -zip_get_archive_comment(3), -zip_set_archive_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_set_external_attributes.man b/man/zip_file_set_external_attributes.man deleted file mode 100644 index 859295a..0000000 --- a/man/zip_file_set_external_attributes.man +++ /dev/null
@@ -1,59 +0,0 @@ -.TH "ZIP_FILE_SET_EXTERNAL_ATTRIBUTES" "3" "September 19, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_set_external_attributes\fR -\- set external attributes for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_file_set_external_attributes\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR, \fIzip_uint8_t\ opsys\fR, \fIzip_uint32_t\ attributes\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_set_external_attributes\fR() -function sets the operating system and external attributes for the -file at position -\fIindex\fR -in the zip archive. -Currently, no -\fIflags\fR -are supported. -.PP -For a list of known -\fIopsys\fR -values, see -zip_file_get_external_attributes(3). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_set_external_attributes\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_RDONLY\fR] -The -\fIarchive\fR -was opened in read-only mode. -.SH "SEE ALSO" -libzip(3), -zip_file_get_external_attributes(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_set_mtime.man b/man/zip_file_set_mtime.man deleted file mode 100644 index a348982..0000000 --- a/man/zip_file_set_mtime.man +++ /dev/null
@@ -1,55 +0,0 @@ -.TH "ZIP_FILE_SET_MTIME" "3" "August 5, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_set_mtime\fR -\- set last modification time (mtime) for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_file_mtime\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fItime_t\ mtime\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_file_set_mtime\fR() -function sets the last modification time (mtime) for the file at -position -\fIindex\fR -in the zip archive to -\fImtime\fR. -Currently, no support for any -\fIflags\fR -is implemented. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_file_set_mtime\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_RDONLY\fR] -The -\fIarchive\fR -was opened in read-only mode. -.SH "SEE ALSO" -libzip(3), -zip_stat(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_file_strerror.man b/man/zip_file_strerror.man deleted file mode 100644 index ae5ffde..0000000 --- a/man/zip_file_strerror.man +++ /dev/null
@@ -1,56 +0,0 @@ -.TH "ZIP_FILE_STRERROR" "3" "December 27, 2004" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_file_strerror\fR, -\fBzip_strerror\fR -\- get string representation for a zip error -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_file_strerror\fR(\fIzip_file_t\ *file\fR); -.PD -.PP -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_strerror\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_strerror\fR() -function returns a string describing the last error for the zip archive -\fIarchive\fR, -while the -\fBzip_file_strerror\fR() -function does the same for a zip file -\fIfile\fR -(one file in an archive). -The returned string must not be modified or freed, and becomes invalid when -\fIarchive\fR -or -\fIfile\fR, -respectively, -is closed or on the next call to -\fBzip_strerror\fR() -or -\fBzip_file_strerror\fR(), -respectively, -for the same archive. -.SH "RETURN VALUES" -\fBzip_file_strerror\fR() -and -\fBzip_strerror\fR() -return a pointer to the error string. -.SH "SEE ALSO" -libzip(3), -zip_error_to_str(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fopen.man b/man/zip_fopen.man deleted file mode 100644 index 8c0db87..0000000 --- a/man/zip_fopen.man +++ /dev/null
@@ -1,126 +0,0 @@ -.TH "ZIP_FOPEN" "3" "October 23, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_fopen\fR, -\fBzip_fopen_index\fR -\- open file in zip archive for reading -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_file_t *\fR -.PD 0 -.HP 4n -\fBzip_fopen\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_flags_t\ flags\fR); -.PD -.PP -\fIzip_file_t *\fR -.PD 0 -.HP 4n -\fBzip_fopen_index\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_fopen\fR() -function opens the file name -\fIfname\fR -in -\fIarchive\fR. -The -\fIflags\fR -argument specifies how the name lookup should be done, according to -the values are described in -zip_name_locate(3). -Also, the following values may be -\fIor\fR'ed -to it. -.RS 6n -.TP 19n -\fRZIP_FL_COMPRESSED\fR -Read the compressed data. -Otherwise the data is uncompressed by -\fBzip_fread\fR(). -.TP 19n -\fRZIP_FL_UNCHANGED\fR -Read the original data from the zip archive, ignoring any changes made -to the file. -.RE -.PP -The -\fBzip_fopen_index\fR() -function opens the file at position -\fIindex\fR. -.PP -If encrypted data is encountered, the functions call -zip_fopen_encrypted(3) -or -zip_fopen_index_encrypted(3) -respectively, using the default password set with -zip_set_default_password(3). -.SH "RETURN VALUES" -Upon successful completion, a -\fIstruct zip_file\fR -pointer is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -.TP 19n -[\fRZIP_ER_CHANGED\fR] -The file data has been changed. -.TP 19n -[\fRZIP_ER_COMPNOTSUPP\fR] -The compression method used is not supported. -.TP 19n -[\fRZIP_ER_ENCRNOTSUPP\fR] -The encryption method used is not supported. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_NOPASSWD\fR] -The file is encrypted, but no password has been provided. -.TP 19n -[\fRZIP_ER_READ\fR] -A file read error occurred. -.TP 19n -[\fRZIP_ER_SEEK\fR] -A file seek error occurred. -.TP 19n -[\fRZIP_ER_WRONGPASSWD\fR] -The provided password does not match the password used for encryption. -Note that some incorrect passwords are not detected by the check done by -\fBzip_fopen\fR(). -.TP 19n -[\fRZIP_ER_ZLIB\fR] -Initializing the zlib stream failed. -.PP -The function -\fBzip_fopen\fR() -may also fail and set -\fIzip_err\fR -for any of the errors specified for the routine -zip_name_locate(3). -.PP -The function -\fBzip_fopen_index\fR() -may also fail with -\fRZIP_ER_INVAL\fR -if -\fIindex\fR -is invalid. -.SH "SEE ALSO" -libzip(3), -zip_fclose(3), -zip_fread(3), -zip_get_num_entries(3), -zip_name_locate(3), -zip_set_default_password(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fopen_encrypted.man b/man/zip_fopen_encrypted.man deleted file mode 100644 index 1acc6db..0000000 --- a/man/zip_fopen_encrypted.man +++ /dev/null
@@ -1,87 +0,0 @@ -.TH "ZIP_FOPEN_ENCRYPTED" "3" "July 22, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_fopen_encrypted\fR, -\fBzip_fopen_index_encrypted\fR -\- open encrypted file in zip archive for reading -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_file_t *\fR -.PD 0 -.HP 4n -\fBzip_fopen_encrypted\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_flags_t\ flags\fR, \fIconst\ char\ *password\fR); -.PD -.PP -\fIzip_file_t *\fR -.PD 0 -.HP 4n -\fBzip_fopen_index_encrypted\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR, \fIconst\ char\ *password\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_fopen_encrypted\fR() -function opens the encrypted file name -\fIfname\fR -in -\fIarchive\fR -using the password given in the -\fIpassword\fR -argument. -The -\fIflags\fR -argument are the same as for -zip_fopen(3). -.PP -The -\fBzip_fopen_index_encrypted\fR() -function opens the file at position -\fIindex\fR, -see -zip_fopen_index(3). -These functions are called automatically by -zip_fopen(3); -you only need to call them if you want to specify a non-default password -(see -zip_set_default_password(3)). -.SH "RETURN VALUES" -Upon successful completion, a -\fIstruct zip_file\fR -pointer is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -.TP 22n -[\fRZIP_ER_NOPASSWD\fR] -No password was provided. -.PP -The function -\fBzip_fopen_encrypted\fR() -may also fail and set -\fIzip_err\fR -for any of the errors specified for the routine -zip_fopen(3). -.PP -The function -\fBzip_fopen_index_encrypted\fR() -may also fail and set -\fIzip_err\fR -for any of the errors specified for the routine -zip_fopen_index(3). -.SH "SEE ALSO" -libzip(3), -zip_fclose(3), -zip_fopen(3), -zip_fread(3), -zip_get_num_entries(3), -zip_name_locate(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_fread.man b/man/zip_fread.man deleted file mode 100644 index 170d31c..0000000 --- a/man/zip_fread.man +++ /dev/null
@@ -1,36 +0,0 @@ -.TH "ZIP_FREAD" "3" "March 10, 2009" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_fread\fR -\- read from file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_fread\fR(\fIzip_file_t\ *file\fR, \fIvoid\ *buf\fR, \fIzip_uint64_t\ nbytes\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_fread\fR() -function reads at most -\fInbytes\fR -bytes from -\fIfile\fR -into -\fIbuf\fR. -.SH "RETURN VALUES" -If successful, the number of bytes actually read is returned. -Otherwise, \-1 is returned. -.SH "SEE ALSO" -libzip(3), -zip_fclose(3), -zip_fopen(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_archive_comment.man b/man/zip_get_archive_comment.man deleted file mode 100644 index d2decf7..0000000 --- a/man/zip_get_archive_comment.man +++ /dev/null
@@ -1,72 +0,0 @@ -.TH "ZIP_GET_ARCHIVE_COMMENT" "3" "February 20, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_archive_comment\fR -\- get zip archive comment -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_get_archive_comment\fR(\fIzip_t\ *archive\fR, \fIint\ *lenp\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_archive_comment\fR() -function returns the comment for the entire zip archive. -The name is in UTF-8 encoding unless -\fRZIP_FL_ENC_RAW\fR -was specified (see below). -This pointer should not be modified or -free(3)'d, -and becomes invalid when -\fIarchive\fR -is closed. -If -\fIlenp\fR -is not -\fRNULL\fR, -the integer to which it points will be set to the length of the -comment. -If -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original unchanged comment is returned. -.PP -Additionally, the following -\fIflags\fR -are supported: -.RS 6n -.TP 21n -\fRZIP_FL_ENC_RAW\fR -Return the unmodified archive comment as it is in the ZIP archive. -.TP 21n -\fRZIP_FL_ENC_GUESS\fR -(Default.) -Guess the encoding of the archive comment in the ZIP archive and convert it -to UTF-8, if necessary. -.TP 21n -\fRZIP_FL_ENC_STRICT\fR -Follow the ZIP specification for file names and extend it to the -archive comment, thus also expecting it in CP-437 encoding. -Convert it to UTF-8. -.RE -\fINote\fR: -ASCII is a subset of both CP-437 and UTF-8. -.SH "RETURN VALUES" -Upon successful completion, a pointer to the comment is returned, -or -\fRNULL\fR -if there is no comment. -.SH "SEE ALSO" -libzip(3), -zip_get_file_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_archive_flag.man b/man/zip_get_archive_flag.man deleted file mode 100644 index f4f73b9..0000000 --- a/man/zip_get_archive_flag.man +++ /dev/null
@@ -1,50 +0,0 @@ -.TH "ZIP_GET_ARCHIVE_FLAG" "3" "July 22, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_archive_flag\fR -\- get status flags for zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_get_archive_flag\fR(\fIzip_t\ *archive\fR, \fIzip_flags_t\ flag\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_archive_flag\fR() -function returns if the flag -\fIflag\fR -is set for the archive -\fIarchive\fR. -The archive flags might have been changed with -\fBzip_set_archive_flag\fR(); -if -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original unchanged flags are tested. -.PP -Supported flags are: -.TP 21n -\fRZIP_AFL_TORRENT\fR -The archive is torrent-zipped. -.SH "RETURN VALUES" -\fBzip_get_archive_flag\fR() -returns 1 if -\fIflag\fR -is set for -\fIarchive\fR, -0 if not, -and \-1 if an error occurred. -.SH "SEE ALSO" -libzip(3), -zip_set_archive_flag(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_error.man b/man/zip_get_error.man deleted file mode 100644 index ac315f1..0000000 --- a/man/zip_get_error.man +++ /dev/null
@@ -1,29 +0,0 @@ -.TH "ZIP_GET_ERROR" "3" "October 30, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_error\fR -\- get zip error for archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_error_t *\fR -.PD 0 -.HP 4n -\fBzip_get_error\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_error\fR() -function returns the zip error for the zip archive -\fIarchive\fR. -.SH "SEE ALSO" -libzip(3), -zip_error_code_system(3), -zip_error_code_zip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_file_comment.man b/man/zip_get_file_comment.man deleted file mode 100644 index 70f7a57..0000000 --- a/man/zip_get_file_comment.man +++ /dev/null
@@ -1,33 +0,0 @@ -.TH "ZIP_GET_FILE_COMMENT" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_file_comment\fR -\- get comment for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_get_file_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIint\ *lenp\fR, \fIint\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_file_comment\fR() -function is the obsolete version of -zip_file_get_comment(3). -The only differences are the types of the -\fIlenp\fR -and -\fIflags\fR -arguments. -.SH "SEE ALSO" -libzip(3), -zip_file_get_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_name.man b/man/zip_get_name.man deleted file mode 100644 index 8f9f996..0000000 --- a/man/zip_get_name.man +++ /dev/null
@@ -1,92 +0,0 @@ -.TH "ZIP_GET_NAME" "3" "February 20, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_name\fR -\- get name of file by index -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIconst char *\fR -.PD 0 -.HP 4n -\fBzip_get_name\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_name\fR() -function returns the name of the file at position -\fIindex\fR -in -\fIarchive\fR. -The name is in UTF-8 encoding unless -\fRZIP_FL_ENC_RAW\fR -was specified (see below). -.PP -If -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original unchanged filename is returned. -The returned string must not be modified or freed, and becomes invalid when -\fIarchive\fR -is closed. -.PP -Additionally, the following -\fIflags\fR -are supported: -.RS 6n -.TP 21n -\fRZIP_FL_ENC_RAW\fR -Return the unmodified names as it is in the ZIP archive. -.TP 21n -\fRZIP_FL_ENC_GUESS\fR -(Default.) -Guess the encoding of the name in the ZIP archive and convert it -to UTF-8, if necessary. -.TP 21n -\fRZIP_FL_ENC_STRICT\fR -Follow the ZIP specification and expect CP-437 encoded names in -the ZIP archive (except if they are explicitly marked as UTF-8). -Convert it to UTF-8. -.RE -\fINote\fR: -ASCII is a subset of both CP-437 and UTF-8. -.SH "RETURN VALUES" -Upon successful completion, a pointer to the name is returned. -Otherwise, -\fRNULL\fR -and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_get_name\fR() -fails if: -.TP 19n -[\fRZIP_ER_DELETED\fR] -\fIindex\fR -refers to a file that has been deleted -(see -zip_delete(3)). -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR, -or -\fIindex\fR -points to an added file and -\fRZIP_FL_UNCHANGED\fR -is set. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_name_locate(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_num_entries.man b/man/zip_get_num_entries.man deleted file mode 100644 index 4965e98..0000000 --- a/man/zip_get_num_entries.man +++ /dev/null
@@ -1,41 +0,0 @@ -.TH "ZIP_GET_NUM_ENTRIES" "3" "August 1, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_num_entries\fR -\- get number of files in archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_get_num_entries\fR(\fIzip_t\ *archive\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_get_num_entries\fR() -function returns the number of files in -\fIarchive\fR. -If -\fIflags\fR -is set to -\fRZIP_FL_UNCHANGED\fR, -the original number of entries is returned. -.SH "RETURN VALUES" -\fBzip_get_num_entries\fR() -returns the number of files in the zip archive, -or \-1 if -\fIarchive\fR -is -\fRNULL\fR. -.SH "SEE ALSO" -libzip(3), -zip_fopen_index(3), -zip_stat_index(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_get_num_files.man b/man/zip_get_num_files.man deleted file mode 100644 index 5a688b2..0000000 --- a/man/zip_get_num_files.man +++ /dev/null
@@ -1,41 +0,0 @@ -.TH "ZIP_GET_NUM_FILES" "3" "February 14, 2011" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_get_num_files\fR -\- get number of files in archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_get_num_files\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -\fIThis function is deprecated\fR. -\fIUse\fR -zip_get_num_entries(3) -\fIinstead\fR. -.PP -The -\fBzip_get_num_files\fR() -function returns the number of files in -\fIarchive\fR. -.SH "RETURN VALUES" -\fBzip_get_num_files\fR() -returns the number of files in the zip archive, -or \-1 if -\fIarchive\fR -is -\fRNULL\fR. -.SH "SEE ALSO" -libzip(3), -zip_fopen_index(3), -zip_stat_index(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_name_locate.man b/man/zip_name_locate.man deleted file mode 100644 index 5330956..0000000 --- a/man/zip_name_locate.man +++ /dev/null
@@ -1,84 +0,0 @@ -.TH "ZIP_NAME_LOCATE" "3" "July 21, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_name_locate\fR -\- get index of file by name -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_name_locate\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_flags_t\ flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_name_locate\fR() -function returns the index of the file named -\fIfname\fR -in -\fIarchive\fR. -If -\fIarchive\fR -does not contain a file with that name, \-1 is returned. -The -\fIflags\fR -are specified by -\fIor\fR'ing -the following values, or 0 for none of them. -.RS 6n -.TP 15n -\fRZIP_FL_NOCASE\fR -Ignore case distinctions. -(Will only work well if the file names are ASCII.) -.TP 15n -\fRZIP_FL_NODIR\fR -Ignore directory part of file name in archive. -.TP 15n -\fRZIP_FL_ENC_RAW\fR -.br -Compare against the unmodified names as it is in the ZIP archive. -.TP 15n -\fRZIP_FL_ENC_GUESS\fR -(Default.) -Guess the encoding of the name in the ZIP archive and convert it -to UTF-8, if necessary, before comparing. -.TP 15n -\fRZIP_FL_ENC_STRICT\fR -Follow the ZIP specification and expect CP-437 encoded names in -the ZIP archive (except if they are explicitly marked as UTF-8). -Convert it to UTF-8 before comparing. -.RE -\fINote\fR: -ASCII is a subset of both CP-437 and UTF-8. -.SH "RETURN VALUES" -\fBzip_name_locate\fR() -returns the index of the file named -\fIfname\fR -or \-1, if -\fIarchive\fR -does not contain an entry of that name. -.SH "ERRORS" -\fBzip_name_locate\fR() -fails if: -.TP 19n -[\fRZIP_ER_NOENT\fR] -No entry of the name -\fIfname\fR -is found in the archive. -.TP 19n -[\fRZIP_ER_INVAL\fR] -One of the arguments is invalid. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_get_name(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_open.man b/man/zip_open.man deleted file mode 100644 index 9027d07..0000000 --- a/man/zip_open.man +++ /dev/null
@@ -1,153 +0,0 @@ -.TH "ZIP_OPEN" "3" "November 9, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_open\fR, -\fBzip_open_from_source\fR -\- open zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_t *\fR -.PD 0 -.HP 4n -\fBzip_open\fR(\fIconst\ char\ *path\fR, \fIint\ flags\fR, \fIint\ *errorp\fR); -.PD -.PP -\fIzip_t *\fR -.PD 0 -.HP 4n -\fBzip_open_from_source\fR(\fIzip_source_t\ *zs\fR, \fIint\ flags\fR, \fIzip_error_t\ *ze\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_open\fR() -function opens the zip archive specified by -\fIpath\fR -and returns a pointer to a -\fIstruct zip\fR, -used to manipulate the archive. -The -\fIflags\fR -are specified by -\fIor\fR'ing -the following values, or 0 for none of them. -.RS 6n -.TP 15n -\fRZIP_CHECKCONS\fR -Perform additional stricter consistency checks on the archive, and -error if they fail. -.TP 15n -\fRZIP_CREATE\fR -Create the archive if it does not exist. -.TP 15n -\fRZIP_EXCL\fR -Error if archive already exists. -.TP 15n -\fRZIP_TRUNCATE\fR -If archive exists, ignore its current contents. -In other words, handle it the same way as an empty archive. -.TP 15n -\fRZIP_RDONLY\fR -Open archive in read-only mode. -.RE -.PP -If an error occurs and -\fIerrorp\fR -is -non-\fRNULL\fR, -it will be set to the corresponding error code. -.PP -The -\fBzip_open_from_source\fR() -function opens a zip archive encapsulated by the zip_source -\fIzs\fR -using the provided -\fIflags\fR. -In case of error, the zip_error -\fIze\fR -is filled in. -.SH "RETURN VALUES" -Upon successful completion -\fBzip_open\fR() -and -\fBzip_open_from_source\fR() -return a -\fIstruct zip\fR -pointer. -Otherwise, -\fRNULL\fR -is returned and -\fBzip_open\fR() -sets -\fI*errorp\fR -to indicate the error, while -\fBzip_open_from\fR(\fIsource\fR) -sets -\fIze\fR -to indicate the error. -.SH "ERRORS" -The archive specified by -\fIpath\fR -is opened unless: -.TP 19n -[\fRZIP_ER_EXISTS\fR] -The file specified by -\fIpath\fR -exists and -\fRZIP_EXCL\fR -is set. -.TP 19n -[\fRZIP_ER_INCONS\fR] -Inconsistencies were found in the file specified by -\fIpath\fR. -This error is often caused by specifying -\fRZIP_CHECKCONS\fR -but can also happen without it. -.TP 19n -[\fRZIP_ER_INVAL\fR] -The -\fIpath\fR -argument is -\fRNULL\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_NOENT\fR] -The file specified by -\fIpath\fR -does not exist and -\fRZIP_CREATE\fR -is not set. -.TP 19n -[\fRZIP_ER_NOZIP\fR] -The file specified by -\fIpath\fR -is not a zip archive. -.TP 19n -[\fRZIP_ER_OPEN\fR] -The file specified by -\fIpath\fR -could not be opened. -.TP 19n -[\fRZIP_ER_READ\fR] -A read error occurred; see -\fIerrno\fR -for details. -.TP 19n -[\fRZIP_ER_SEEK\fR] -The file specified by -\fIpath\fR -does not allow seeks. -.SH "SEE ALSO" -libzip(3), -zip_close(3), -zip_error_to_str(3), -zip_fdopen(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_rename.man b/man/zip_rename.man deleted file mode 100644 index 43b0bd5..0000000 --- a/man/zip_rename.man +++ /dev/null
@@ -1,30 +0,0 @@ -.TH "ZIP_RENAME" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_rename\fR -\- rename file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_rename\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIconst\ char\ *name\fR); -.PD -.SH "DESCRIPTION" -\fBzip_rename\fR() -is the obsolete version of -zip_file_rename(3). -It is the same as calling -zip_file_rename(3) -with an empty flags argument. -.SH "SEE ALSO" -libzip(3), -zip_file_rename(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_archive_comment.man b/man/zip_set_archive_comment.man deleted file mode 100644 index a0998bd..0000000 --- a/man/zip_set_archive_comment.man +++ /dev/null
@@ -1,56 +0,0 @@ -.TH "ZIP_SET_ARCHIVE_COMMENT" "3" "July 22, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_set_archive_comment\fR -\- set zip archive comment -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_archive_comment\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *comment\fR, \fIzip_uint16_t\ len\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_set_archive_comment\fR() -function sets the comment for the entire zip archive. -If -\fIcomment\fR -is -\fRNULL\fR -and -\fIlen\fR -is 0, the archive comment will be removed. -\fIcomment\fR -must be encoded in ASCII or UTF-8. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_set_archive_comment\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIlen\fR -is less than 0 or longer than the maximum comment length in a zip file -(65535), or -\fIcomment\fR -is not a valid UTF-8 encoded string. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_get_archive_comment(3), -zip_get_file_comment(3), -zip_set_file_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_archive_flag.man b/man/zip_set_archive_flag.man deleted file mode 100644 index 6b0b4c1..0000000 --- a/man/zip_set_archive_flag.man +++ /dev/null
@@ -1,45 +0,0 @@ -.TH "ZIP_SET_ARCHIVE_FLAG" "3" "July 22, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_set_archive_flag\fR -\- set zip archive flag -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_archive_flag\fR(\fIzip_t\ *archive\fR, \fIzip_flags_t\ flag\fR, \fIint\ value\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_set_archive_flag\fR() -function sets the flag -\fIflag\fR -for the archive -\fIarchive\fR -to the value -\fIvalue\fR. -.PP -Supported flags are: -.TP 21n -\fRZIP_AFL_TORRENT\fR -Create a torrent-zipped archive. -This restricts the values that can be set from the application side. -In particular, time stamps are not saved and the order of the files in -the archive is alphabetical. -No file comments or extended attributes are allowed and the archive -comment can not be chosen. -.SH "RETURN VALUES" -Upon successful completion 0 is returned, and \-1 if an error -occurred. -.SH "SEE ALSO" -libzip(3), -zip_get_archive_flag(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_default_password.man b/man/zip_set_default_password.man deleted file mode 100644 index 2219e71..0000000 --- a/man/zip_set_default_password.man +++ /dev/null
@@ -1,51 +0,0 @@ -.TH "ZIP_SET_DEFAULT_PASSWORD" "3" "January 3, 2011" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_set_default_password\fR -\- set default password for encrypted files in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_default_password\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *password\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_set_default_password\fR() -function sets the default password used when accessing encrypted files. -If -\fIpassword\fR -is -\fRNULL\fR, -the default password is unset. -.PP -If you prefer a different password for single files, use -zip_fopen_encrypted(3) -instead of -zip_fopen(3). -Usually, however, the same password is used for every file in an -zip archive. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_set_default_password\fR() -fails if: -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_fopen(3), -zip_fopen_encrypted(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_file_comment.man b/man/zip_set_file_comment.man deleted file mode 100644 index 5a22dc4..0000000 --- a/man/zip_set_file_comment.man +++ /dev/null
@@ -1,39 +0,0 @@ -.TH "ZIP_SET_FILE_COMMENT" "3" "June 23, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_set_file_comment\fR -\- set comment for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_file_comment\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIconst\ char\ *comment\fR, \fIint\ len\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_set_file_comment\fR() -function is the obsolete version of -zip_file_set_comment(3). -The only differences are the type of the -\fIlen\fR -argument and the additional -\fIflags\fR -argument. -\fBzip_set_file_comment\fR() -is the same as calling -zip_file_set_comment(3) -with an empty -\fIflags\fR -argument. -.SH "SEE ALSO" -libzip(3), -zip_file_set_comment(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_set_file_compression.man b/man/zip_set_file_compression.man deleted file mode 100644 index fd870f3..0000000 --- a/man/zip_set_file_compression.man +++ /dev/null
@@ -1,79 +0,0 @@ -.TH "ZIP_SET_FILE_COMPRESSION" "3" "May 1, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_set_file_compression\fR -\- set compression method for file in zip -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_set_file_compression\fR(\fIzip_t\ *archive\fR, \fIzip_uint64_t\ index\fR, \fIzip_int32_t\ comp\fR, \fIzip_uint32_t\ comp_flags\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_set_file_compression\fR() -function sets the compression method for the file at position -\fIindex\fR -in the zip archive to -\fIcomp\fR -with the compression method specific -\fIcomp_flags\fR. -The -\fIcomp\fR -is the same as returned by -zip_stat(3). -For the -\fIcomp\fR -argument, currently only the following values are supported: -.TP 19n -\fRZIP_CM_DEFAULT\fR -default compression; currently the same as -\fRZIP_CM_DEFLATE\fR. -.TP 19n -\fRZIP_CM_STORE\fR -Store the file uncompressed. -.TP 19n -\fRZIP_CM_DEFLATE\fR -Deflate the file with the -zlib(3) -algorithm and default options -.PP -The -\fIcomp_flags\fR -argument is currently ignored. -.PP -The current compression method for a file in a zip archive can be -determined using -zip_stat(3). -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_set_file_compression\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIarchive\fR, -or the argument combination is invalid. -.TP 19n -[\fRZIP_ER_COMPNOTSUPP\fR] -Unsupported compression method requested. -.TP 19n -[\fRZIP_ER_RDONLY\fR] -Read-only zip file, no changes allowed. -.SH "SEE ALSO" -libzip(3), -zip_stat(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source.man b/man/zip_source.man deleted file mode 100644 index 0e66dbb..0000000 --- a/man/zip_source.man +++ /dev/null
@@ -1,57 +0,0 @@ -.TH "ZIP_SOURCE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source\fR -\- zip data source structure -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_source_t *zs\fR; -.SH "DESCRIPTION" -A -\fIstruct zip_source\fR -is a data source used by -libzip(3) -for adding or replacing file contents for a file in a zip archive. -If the source supports seeking, it can also be used to open zip archives from. -It is created by calling one of -zip_source_buffer(3), -zip_source_buffer_create(3), -zip_source_file(3), -zip_source_file_create(3), -zip_source_filep(3), -zip_source_filep_create(3), -zip_source_function(3), -zip_source_function_create(3), -or -zip_source_zip(3). -\fIzip_source_t\fR -is reference counted, and created with a reference count of 1. -zip_open_from_source(3), -zip_file_add(3), -and -zip_file_replace(3). -will decrement the reference count of the -\fIzip_source_t\fR -when they are done using it, so -zip_source_free(3) -only needs to be called when these functions return an error. -Use -zip_source_keep(3) -to increase the reference count, for example if you need the source after -zip_close(3). -.SH "SEE ALSO" -libzip(3), -zip_source_buffer(3), -zip_source_file(3), -zip_source_filep(3), -zip_source_free(3), -zip_source_function(3), -zip_source_zip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_begin_write.man b/man/zip_source_begin_write.man deleted file mode 100644 index 5ba499c..0000000 --- a/man/zip_source_begin_write.man +++ /dev/null
@@ -1,40 +0,0 @@ -.TH "ZIP_SOURCE_BEGIN_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_begin_write\fR -\- prepare zip source for writing -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_begin_write\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_begin_write\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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_commit_write(3), -zip_source_rollback_write(3), -zip_source_seek_write(3), -zip_source_tell_write(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_buffer.man b/man/zip_source_buffer.man deleted file mode 100644 index 7e26c44..0000000 --- a/man/zip_source_buffer.man +++ /dev/null
@@ -1,72 +0,0 @@ -.TH "ZIP_SOURCE_BUFFER" "3" "October 17, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_buffer\fR -\- create zip data source from buffer -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_buffer\fR(\fIzip_t\ *archive\fR, \fIconst\ void\ *data\fR, \fIzip_uint64_t\ len\fR, \fIint\ freep\fR); -.PD -.PP -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_buffer_create\fR(\fIconst\ void\ *data\fR, \fIzip_uint64_t\ len\fR, \fIint\ freep\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -The functions -\fBzip_source_buffer\fR() -and -\fBzip_source_buffer_create\fR() -create a zip source from the buffer -\fIdata\fR -of size -\fIlen\fR. -If -\fIfreep\fR -is non-zero, the buffer will be freed when it is no longer needed. -\fIdata\fR -must remain valid for the lifetime of the created source. -.PP -The source can be used to open a zip archive from. -.SH "RETURN VALUES" -Upon successful completion, the created source is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -or -\fIerror\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_source_buffer\fR() -and -\fBzip_source_buffer_create\fR() -fail if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIlen\fR -is greater than zero and -\fIdata\fR -is -\fRNULL\fR. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_add(3), -zip_open_from_source(3), -zip_replace(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_close.man b/man/zip_source_close.man deleted file mode 100644 index 8c0a873..0000000 --- a/man/zip_source_close.man +++ /dev/null
@@ -1,36 +0,0 @@ -.TH "ZIP_SOURCE_CLOSE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_close\fR -\- open zip_source (which was open for reading) -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_close\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_close\fR() -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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_free(3), -zip_source_open(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_commit_write.man b/man/zip_source_commit_write.man deleted file mode 100644 index 6bd026a..0000000 --- a/man/zip_source_commit_write.man +++ /dev/null
@@ -1,39 +0,0 @@ -.TH "ZIP_SOURCE_COMMIT_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_commit_write\fR -\- finalize changes to zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_commit_write\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_commit_write\fR() -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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_rollback_write(3), -zip_source_seek_write(3), -zip_source_tell_write(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_error.man b/man/zip_source_error.man deleted file mode 100644 index 16a57d9..0000000 --- a/man/zip_source_error.man +++ /dev/null
@@ -1,29 +0,0 @@ -.TH "ZIP_SOURCE_ERROR" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_error\fR -\- get zip error for data source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_error_t *\fR -.PD 0 -.HP 4n -\fBzip_source_error\fR(\fIzip_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_source_error\fR() -function returns the zip error for the data source -\fIsource\fR. -.SH "SEE ALSO" -libzip(3), -zip_error_code_system(3), -zip_error_code_zip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_file.man b/man/zip_source_file.man deleted file mode 100644 index 36ae172..0000000 --- a/man/zip_source_file.man +++ /dev/null
@@ -1,83 +0,0 @@ -.TH "ZIP_SOURCE_FILE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_file\fR -\- create data source from a file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_file\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR); -.PD -.PP -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_file\fR(\fIconst\ char\ *fname\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -The functions -\fBzip_source_file\fR() -and -\fBzip_source_file_create\fR() -create a zip source from a file. -They open -\fIfname\fR -and read -\fIlen\fR -bytes from offset -\fIstart\fR -from it. -If -\fIlen\fR -is 0 or \-1, the whole file (starting from -\fIstart\fR) -is used. -.PP -If the file supports seek, the source can be used to open a zip archive from. -.PP -The file is opened and read when the data from the source is used, usually by -\fBzip_close\fR() -or -\fBzip_open_from_source\fR(). -.SH "RETURN VALUES" -Upon successful completion, the created source is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -or -\fIerror\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_source_file\fR() -and -\fBzip_source_file_create\fR() -fail if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIfname\fR, -\fIstart\fR, -or -\fIlen\fR -are invalid. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.TP 19n -[\fRZIP_ER_OPEN\fR] -Opening -\fIfname\fR -failed. -.SH "SEE ALSO" -libzip(3), -zip_add(3), -zip_replace(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_filep.man b/man/zip_source_filep.man deleted file mode 100644 index c19510c..0000000 --- a/man/zip_source_filep.man +++ /dev/null
@@ -1,70 +0,0 @@ -.TH "ZIP_SOURCE_FILEP" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_filep\fR -\- create data source from FILE * -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_filep\fR(\fIzip_t\ *archive\fR, \fIFILE\ *file\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR); -.PD -.PP -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_filep\fR(\fIFILE\ *file\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -The functions -\fBzip_source_filep\fR() -and -\fBzip_source_filep_create\fR() -create a zip source from a file stream. -They read -\fIlen\fR -bytes from offset -\fIstart\fR -from the open file stream -\fIfile\fR. -If -\fIlen\fR -is 0 or \-1, the whole file (starting from -\fIstart\fR) -is used. -.PP -If the file stream supports seeking, the source can be used to open a read-only zip archive from. -.SH "RETURN VALUES" -Upon successful completion, the created source is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -or -\fIerror\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_source_filep\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIfile\fR, -\fIstart\fR, -or -\fIlen\fR -are invalid. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_add(3), -zip_replace(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_free.man b/man/zip_source_free.man deleted file mode 100644 index 13541ae..0000000 --- a/man/zip_source_free.man +++ /dev/null
@@ -1,45 +0,0 @@ -.TH "ZIP_SOURCE_FREE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_free\fR -\- free zip data source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_source_free\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_free\fR() -decrements the reference count of -\fIsource\fR -and frees it if the reference count drops to 0. -If -\fIsource\fR -is -\fRNULL\fR, -it does nothing. -.PP -\fINOTE\fR: -This function should not be called on a -\fIsource\fR -after it was used successfully in a -zip_open_from_source(3), -zip_add(3), -or -zip_replace(3) -call. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_keep(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_function.man b/man/zip_source_function.man deleted file mode 100644 index 6c9f1c2..0000000 --- a/man/zip_source_function.man +++ /dev/null
@@ -1,271 +0,0 @@ -.TH "ZIP_SOURCE_FUNCTION" "3" "November 13, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_function\fR -\- create data source from function -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_function\fR(\fIzip_t\ *archive\fR, \fIzip_source_callback\ fn\fR, \fIvoid\ *userdata\fR); -.PD -.PP -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_function_create\fR(\fIzip_source_callback\ fn\fR, \fIvoid\ *userdata\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -The functions -\fBzip_source_function\fR() -and -\fBzip_source_function_create\fR() -creates a zip source from the user-provided function -\fIfn\fR, -which must be of the following type: -.PP -\fItypedef zip_int64_t\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 -\fIerror\fR -are used for reporting errors and can be -\fRNULL\fR. -.PP -When called by the library, the first argument is the -\fIuserdata\fR -argument supplied to the function. -The next two arguments are a buffer -\fIdata\fR -of size -\fIlen\fR -when data is passed in or expected to be returned, or else -\fRNULL\fR -and 0. -The last argument, -\fIcmd\fR, -specifies which action the function should perform. -.PP -Depending on the uses, there are three useful sets of commands to be supported by a -\fBzip_source_callback\fR(): -.TP 24n -read source -Providing streamed data (for file data added to archives). -Must support -\fRZIP_SOURCE_OPEN\fR, -\fRZIP_SOURCE_READ\fR, -\fRZIP_SOURCE_CLOSE\fR, -\fRZIP_SOURCE_STAT\fR, -and -\fRZIP_SOURCE_ERROR\fR. -.TP 24n -seekable read source -Same as previous, but from a source allowing reading from arbitrary -offsets (also for read-only zip archive). -Must additionally support -\fRZIP_SOURCE_SEEK\fR, -\fRZIP_SOURCE_TELL\fR, -and -\fRZIP_SOURCE_SUPPORTS\fR. -.TP 24n -read/write source -Same as previous, but additionally allowing writing (also for writable -zip archives). -Must additionally support -\fRZIP_SOURCE_BEGIN_WRITE\fR, -\fRZIP_SOURCE_COMMIT_WRITE\fR, -\fRZIP_SOURCE_ROLLBACK_WRITE\fR, -\fRZIP_SOURCE_SEEK_WRITE\fR, -\fRZIP_SOURCE_TELL_WRITE\fR, -and -\fRZIP_SOURCE_REMOVE\fR. -.SS "\fRZIP_SOURCE_BEGIN_WRITE\fR" -Prepare the source for writing. -Use this to create any temporary file(s). -.SS "\fRZIP_SOURCE_CLOSE\fR" -Reading is done. -.SS "\fRZIP_SOURCE_COMMIT_WRITE\fR" -Finish writing to the source. -Replace the original data with the newly written data. -Clean up temporary files or internal buffers. -Subsequently opening and reading from the source should return the -newly written data. -.SS "\fRZIP_SOURCE_ERROR\fR" -Get error information. -\fIdata\fR -points to an array of two ints, which should be filled with the libzip -error code and the corresponding system error code for the error that -occurred. -See -zip_errors(3) -for details on the error codes. -If the source stores error information in a zip_error_t, use -zip_error_to_data(3) -and return its return value. -Otherwise, return 2 * sizeof(int). -.SS "\fRZIP_SOURCE_FREE\fR" -Clean up and free all resources, including -\fIstate\fR. -The callback function will not be called again. -.SS "\fRZIP_SOURCE_OPEN\fR" -Prepare for reading. -.SS "\fRZIP_SOURCE_READ\fR" -Read data into the buffer -\fIdata\fR -of size -\fIlen\fR. -Return the number of bytes placed into -\fIdata\fR -on success. -.SS "\fRZIP_SOURCE_REMOVE\fR" -Remove the underlying file. -This is called if a zip archive is empty when closed. -.SS "\fRZIP_SOURCE_ROLLBACK_WRITE\fR" -Abort writing to the source. -Discard written data. -Clean up temporary files or internal buffers. -Subsequently opening and reading from the source should return the -original data. -.SS "\fRZIP_SOURCE_SEEK\fR" -Specify position to read next byte from, like -fseek(3). -Use -ZIP_SOURCE_GET_ARGS(3) -to decode the arguments into the following struct: -.nf -.sp -.RS 0n -struct zip_source_args_seek { - zip_int64_t offset; - int whence; -}; -.RE -.fi -.PP -If the size of the source's data is known, use -zip_source_seek_compute_offset(3) -to validate the arguments and compute the new offset. -.SS "\fRZIP_SOURCE_SEEK_WRITE\fR" -Specify position to write next byte to, like -fseek(3). -See -\fRZIP_SOURCE_SEEK\fR -for details. -.SS "\fRZIP_SOURCE_STAT\fR" -Get meta information for the input data. -\fIdata\fR -points to an allocated -\fIstruct zip_stat\fR, -which should be initialized using -zip_stat_init(3) -and then filled in. -Information only available after the source has been read (e.g. size) -can be omitted in an earlier call. -Return sizeof(struct zip_stat) on success. -\fINOTE\fR: -\fBzip_source_function\fR() -may be called with this argument even after being called with -\fRZIP_SOURCE_CLOSE\fR. -.SS "\fRZIP_SOURCE_SUPPORTS\fR" -Return bitmap specifying which commands are supported. -Use -zip_source_make_command_bitmap(3). -If this command is not implemented, the source is assumed to be a -read source without seek support. -.SS "\fRZIP_SOURCE_TELL\fR" -Return the current read offset in the source, like -ftell(3). -.SS "\fRZIP_SOURCE_TELL_WRITE\fR" -Return the current write offset in the source, like -ftell(3). -.SS "\fRZIP_SOURCE_WRITE\fR" -Write data to the source. -Return number of bytes written. -.SS "Return Values" -Commands should return \-1 on error. -\fRZIP_SOURCE_ERROR\fR -will be called to retrieve the error code. -On success, commands return 0, unless specified otherwise in the -description above. -.SS "Calling Conventions" -The library will always issue -\fRZIP_SOURCE_OPEN\fR -before issuing -\fRZIP_SOURCE_READ\fR, -\fRZIP_SOURCE_SEEK\fR, -or -\fRZIP_SOURCE_TELL\fR. -When it no longer wishes to read from this source, it will issue -\fRZIP_SOURCE_CLOSE\fR. -If the library wishes to read the data again, it will issue -\fRZIP_SOURCE_OPEN\fR -a second time. -If the function is unable to provide the data again, it should -return \-1. -.PP -\fRZIP_SOURCE_BEGIN_WRITE\fR -will be called before -\fRZIP_SOURCE_WRITE\fR, -\fRZIP_SOURCE_SEEK_WRITE\fR, -or -\fRZIP_SOURCE_TELL_WRITE\fR. -When writing is complete, either -\fRZIP_SOURCE_COMMIT_WRITE\fR -or -\fRZIP_SOURCE_ROLLBACK_WRITE\fR -will be called. -.PP -\fRZIP_SOURCE_STAT\fR -can be issued at any time. -.PP -\fRZIP_SOURCE_ERROR\fR -will only be issued in response to the function -returning \-1. -.PP -\fRZIP_SOURCE_FREE\fR -will be the last command issued; -if -\fRZIP_SOURCE_OPEN\fR -was called and succeeded, -\fRZIP_SOURCE_CLOSE\fR -will be called before -\fRZIP_SOURCE_FREE\fR, -and similarly for -\fRZIP_SOURCE_BEGIN_WRITE\fR -and -\fRZIP_SOURCE_COMMIT_WRITE\fR -or -\fRZIP_SOURCE_ROLLBACK_WRITE\fR. -.SH "RETURN VALUES" -Upon successful completion, the created source is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -or -\fIerror\fR -is set to indicate the error (unless -it is -\fRNULL\fR). -.SH "ERRORS" -\fBzip_source_function\fR() -fails if: -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.SH "SEE ALSO" -libzip(3), -zip_add(3), -zip_replace(3), -zip_source(3), -zip_stat_init(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_is_deleted.man b/man/zip_source_is_deleted.man deleted file mode 100644 index 6313d81..0000000 --- a/man/zip_source_is_deleted.man +++ /dev/null
@@ -1,31 +0,0 @@ -.TH "ZIP_SOURCE_IS_DELETED" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_is_deleted\fR -\- check if zip_source is deleted -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_is_deleted\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_is_deleted\fR() -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. -.SH "SEE ALSO" -libzip(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_keep.man b/man/zip_source_keep.man deleted file mode 100644 index b952cfe..0000000 --- a/man/zip_source_keep.man +++ /dev/null
@@ -1,29 +0,0 @@ -.TH "ZIP_SOURCE_KEEP" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_keep\fR -\- increment reference count of zip data source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_source_keep\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_keep\fR() -increments the reference count of -\fIsource\fR. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_free(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_make_command_bitmap.man b/man/zip_source_make_command_bitmap.man deleted file mode 100644 index a90ffd3..0000000 --- a/man/zip_source_make_command_bitmap.man +++ /dev/null
@@ -1,31 +0,0 @@ -.TH "ZIP_SOURCE_MAKE_COMMAND_BITMAP" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_make_command_bitmap\fR -\- create bitmap of supported source operations -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_source_make_command_bitmap\fR(\fIzip_source_cmd_t\ command\fR, \fI...\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_source_make_command_bitmap\fR() -function returns a bitmap of source commands suitable as return value -for -\fRZIP_SOURCE_SUPPORTS\fR. -It includes all the commands from the argument list, which must be -terminated by \-1. -.SH "SEE ALSO" -libzip(3), -zip_source_function(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_open.man b/man/zip_source_open.man deleted file mode 100644 index b42761b..0000000 --- a/man/zip_source_open.man +++ /dev/null
@@ -1,39 +0,0 @@ -.TH "ZIP_SOURCE_OPEN" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_open\fR -\- open zip_source for reading -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_open\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_open\fR() -opens -\fIsource\fR -for reading. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_close(3), -zip_source_read(3), -zip_source_seek(3), -zip_source_tell(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_read.man b/man/zip_source_read.man deleted file mode 100644 index 5a06ca5..0000000 --- a/man/zip_source_read.man +++ /dev/null
@@ -1,46 +0,0 @@ -.TH "ZIP_SOURCE_READ" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_read\fR -\- read data from zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\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 -\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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_seek(3), -zip_source_tell(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_rollback_write.man b/man/zip_source_rollback_write.man deleted file mode 100644 index 7e9bb4e..0000000 --- a/man/zip_source_rollback_write.man +++ /dev/null
@@ -1,42 +0,0 @@ -.TH "ZIP_SOURCE_ROLLBACK_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_rollback_write\fR -\- undo changes to zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_source_rollback_write\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_rollback_write\fR() -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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_commit_write(3), -zip_source_seek_write(3), -zip_source_tell_write(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_seek.man b/man/zip_source_seek.man deleted file mode 100644 index 1224021..0000000 --- a/man/zip_source_seek.man +++ /dev/null
@@ -1,53 +0,0 @@ -.TH "ZIP_SOURCE_SEEK" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_seek\fR -\- set read offset in zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\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 -\fIsource\fR. -Just like in -fseek(3), -depending on the -\fIwhence\fR -argument, the -\fIoffset\fR -is counted relative from: -.RS 6n -.TP 12n -\fRSEEK_SET\fR -start of file -.TP 12n -\fRSEEK_CUR\fR -current read offset in file -.TP 12n -\fRSEEK_END\fR -end of file -.RE -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_read(3), -zip_source_tell(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_seek_compute_offset.man b/man/zip_source_seek_compute_offset.man deleted file mode 100644 index f564b5f..0000000 --- a/man/zip_source_seek_compute_offset.man +++ /dev/null
@@ -1,49 +0,0 @@ -.TH "ZIP_SOURCE_SEEK_COMPUTE_OFFSET" "1" "November 13, 2014" "NiH" "LOCAL" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_seek_compute_offset\fR -\- validate arguments and compute offset -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_source_seek_compute_offset\fR(\fIzip_uint64_t\ offset\fR, \fIzip_uint64_t\ length\fR, \fIvoid\ *data\fR, \fIzip_uint64_t\ data_length\fR, \fIzip_error_t\ *error\fR); -.PD -.SH "DESCRIPTION" -Use this function to compute the offset for a -\fRZIP_SOURCE_SEEK\fR -or -\fRZIP_SOURCE_SEEK_WRITE\fR -command. -\fIdata\fR -and -\fIdata_length\fR -are the arguments to the source callback, -\fIoffset\fR -is the current offset and -\fIlength\fR -is the length of the source data or, for -\fRZIP_SOURCE_SEEK_WRITE\fR, -the amount of data written. -.SH "RETURN VALUES" -On success, it returns the new offset, on error it returns \-1 and -sets -\fIerror\fR. -.SH "ERRORS" -\fBzip_source_seek_compute_offset\fR() -fails if: -.TP 19n -[\fRZIP_ER_INVAL\fR] -One of the arguments is invalid or the seek would place the offset -outside the data. -.SH "SEE ALSO" -zip_source_function(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_seek_write.man b/man/zip_source_seek_write.man deleted file mode 100644 index 0ba3192..0000000 --- a/man/zip_source_seek_write.man +++ /dev/null
@@ -1,56 +0,0 @@ -.TH "ZIP_SOURCE_SEEK_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_seek_write\fR -\- set write offset in zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\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 -\fIsource\fR. -Just like in -fseek(3), -depending on the -\fIwhence\fR -argument, the -\fIoffset\fR -is counted relative from: -.RS 6n -.TP 12n -\fRSEEK_SET\fR -start of file -.TP 12n -\fRSEEK_CUR\fR -current write offset in file -.TP 12n -\fRSEEK_END\fR -end of file -.RE -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_commit_write(3), -zip_source_rollback_write(3), -zip_source_tell_write(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_stat.man b/man/zip_source_stat.man deleted file mode 100644 index 24411ff..0000000 --- a/man/zip_source_stat.man +++ /dev/null
@@ -1,108 +0,0 @@ -.TH "ZIP_SOURCE_STAT" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_stat\fR -\- get information about zip_source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\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 -\fIsource\fR -.PP -The -\fIsb\fR -argument is a pointer to a -\fIstruct zip_source_stat\fR -(shown below), into which information about the zip source is placed. -.nf -.sp -.RS 0n -struct zip_source_stat { - zip_uint64_t valid; /* which fields have valid values */ - const char *name; /* name of the file */ - zip_uint64_t index; /* index within archive */ - zip_uint64_t size; /* size of file (uncompressed) */ - zip_uint64_t comp_size; /* size of file (compressed) */ - time_t mtime; /* modification time */ - zip_uint32_t crc; /* crc of file data */ - zip_uint16_t comp_method; /* compression method used */ - zip_uint16_t encryption_method; /* encryption method used */ - zip_uint32_t flags; /* reserved for future use */ -}; -.RE -.fi -The structure pointed to by -\fIsb\fR -must be initialized with -\fBzip_stat_init\fR(\fI3\fR) -before calling -\fBzip_source_stat\fR(). -.PP -The -\fIvalid\fR -field of the structure specifies which other fields are valid. -Check if the flag defined by the following defines are in -\fIvalid\fR -before accessing the fields: -.RS 6n -.PD 0 -.TP 37n -\fRZIP_SOURCE_STAT_NAME\fR -\fIname\fR -.TP 37n -\fRZIP_SOURCE_STAT_INDEX\fR -\fIindex\fR -.TP 37n -\fRZIP_SOURCE_STAT_SIZE\fR -\fIsize\fR -.TP 37n -\fRZIP_SOURCE_STAT_COMP_SIZE\fR -\fIcomp_size\fR -.TP 37n -\fRZIP_SOURCE_STAT_MTIME\fR -\fImtime\fR -.TP 37n -\fRZIP_SOURCE_STAT_CRC\fR -\fIcrc\fR -.TP 37n -\fRZIP_SOURCE_STAT_COMP_METHOD\fR -\fIcomp_method\fR -.TP 37n -\fRZIP_SOURCE_STAT_ENCRYPTION_METHOD\fR -\fIencryption_method\fR -.TP 37n -\fRZIP_SOURCE_STAT_FLAGS\fR -\fIflags\fR -.RE -.PD -.PP -\fINOTE\fR: -Some fields may only be filled out after all data has been read from -the source, for example the -\fIcrc\fR -or -\fIsize\fR -fields. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_tell.man b/man/zip_source_tell.man deleted file mode 100644 index 76e146c..0000000 --- a/man/zip_source_tell.man +++ /dev/null
@@ -1,43 +0,0 @@ -.TH "ZIP_SOURCE_TELL" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_tell\fR -\- report current read offset in zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\fBzip_source_tell\fR(\fIzip_source_t\ *source\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_tell\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 source. -.SH "RETURN VALUES" -Upon successful completion the current read offset is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_read(3), -zip_source_tell(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_tell_write.man b/man/zip_source_tell_write.man deleted file mode 100644 index ab340ec..0000000 --- a/man/zip_source_tell_write.man +++ /dev/null
@@ -1,46 +0,0 @@ -.TH "ZIP_SOURCE_TELL_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_tell_write\fR -\- report current write offset in zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\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 -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 source. -.SH "RETURN VALUES" -Upon successful completion the current write offset is returned. -Otherwise, \-1 is returned and the error information in -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_commit_write(3), -zip_source_rollback_write(3), -zip_source_tell_write(3), -zip_source_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_write.man b/man/zip_source_write.man deleted file mode 100644 index 1c029b9..0000000 --- a/man/zip_source_write.man +++ /dev/null
@@ -1,49 +0,0 @@ -.TH "ZIP_SOURCE_WRITE" "3" "November 18, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_write\fR -\- write data to zip source -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_int64_t\fR -.PD 0 -.HP 4n -\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 from the buffer -\fIdata\fR -to the zip source -\fIsource\fR -at the current write offset. -.PP -The zip source -\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 -\fIsource\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_source(3), -zip_source_begin_write(3), -zip_source_commit_write(3), -zip_source_rollback_write(3), -zip_source_seek_write(3), -zip_source_tell_write(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_source_zip.man b/man/zip_source_zip.man deleted file mode 100644 index a088036..0000000 --- a/man/zip_source_zip.man +++ /dev/null
@@ -1,93 +0,0 @@ -.TH "ZIP_SOURCE_ZIP" "3" "August 2, 2014" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_source_zip\fR -\- create data source from zip file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIzip_source_t *\fR -.PD 0 -.HP 4n -\fBzip_source_zip\fR(\fIzip_t\ *archive\fR, \fIzip_t\ *srcarchive\fR, \fIzip_uint64_t\ srcidx\fR, \fIzip_flags_t\ flags\fR, \fIzip_uint64_t\ start\fR, \fIzip_int64_t\ len\fR); -.PD -.SH "DESCRIPTION" -The function -\fBzip_source_zip\fR() -creates a zip source from a file in a zip archive. -The -\fIsrcarchive\fR -argument is the (open) zip archive containing the source zip file -at index -\fIsrcidx\fR. -\fIlen\fR -bytes from offset -\fIstart\fR -will be used in the zip_source. -If -\fIlen\fR -is 0 or \-1, the rest of the file, starting from -\fIstart\fR, -is used. -If -\fIstart\fR -is zero and -\fIlen\fR -is \-1, the whole file will be copied without decompressing it. -.PP -Supported flags are: -.TP 23n -\fRZIP_FL_UNCHANGED\fR -Try to get the original data without any changes that may have been -made to -\fIsrcarchive\fR -after opening it. -.TP 23n -\fRZIP_FL_RECOMPRESS\fR -When adding the data from -\fIsrcarchive\fR, -re-compress it using the current settings instead of copying the -compressed data. -.SH "RETURN VALUES" -Upon successful completion, the created source is returned. -Otherwise, -\fRNULL\fR -is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_source_zip\fR() -fails if: -.TP 19n -[\fRZIP_ER_CHANGED\fR] -Unchanged data was requested, but it is not available. -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIsrcarchive\fR, -\fIsrcidx\fR, -\fIstart\fR, -or -\fIlen\fR -are invalid. -.TP 19n -[\fRZIP_ER_MEMORY\fR] -Required memory could not be allocated. -.PD 0 -.PP -Additionally, it can return all error codes from -\fBzip_stat_index\fR() -and -\fBzip_fopen_index\fR(). -.PD -.SH "SEE ALSO" -libzip(3), -zip_add(3), -zip_replace(3), -zip_source(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_stat.man b/man/zip_stat.man deleted file mode 100644 index 2419e32..0000000 --- a/man/zip_stat.man +++ /dev/null
@@ -1,145 +0,0 @@ -.TH "ZIP_STAT" "3" "July 22, 2012" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_stat\fR, -\fBzip_stat_index\fR -\- get information about file -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_stat\fR(\fIzip_t\ *archive\fR, \fIconst\ char\ *fname\fR, \fIzip_flags_t\ flags\fR, \fIzip_stat_t\ *sb\fR); -.PD -.PP -\fIint\fR -.PD 0 -.HP 4n -\fBzip_stat_index\fR(\fIzip_t\ *archive\fR, \fIint\ index\fR, \fIzip_flags_t\ flags\fR, \fIzip_stat_t\ *sb\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_stat\fR() -function obtains information about the file named -\fIfname\fR -in -\fIarchive\fR. -The -\fIflags\fR -argument specifies how the name lookup should be done. -Its values are described in -zip_name_locate(3). -Also, -\fRZIP_FL_UNCHANGED\fR -may be -\fIor\fR'ed -to it to request information about the original file in the archive, -ignoring any changes made. -.PP -The -\fBzip_stat_index\fR() -function obtains information about the file at position -\fIindex\fR. -.PP -The -\fIsb\fR -argument is a pointer to a -\fIstruct zip_stat\fR -(shown below), into which information about the file is placed. -.nf -.sp -.RS 0n -struct zip_stat { - zip_uint64_t valid; /* which fields have valid values */ - const char *name; /* name of the file */ - zip_uint64_t index; /* index within archive */ - zip_uint64_t size; /* size of file (uncompressed) */ - zip_uint64_t comp_size; /* size of file (compressed) */ - time_t mtime; /* modification time */ - zip_uint32_t crc; /* crc of file data */ - zip_uint16_t comp_method; /* compression method used */ - zip_uint16_t encryption_method; /* encryption method used */ - zip_uint32_t flags; /* reserved for future use */ -}; -.RE -.fi -The structure pointed to by -\fIsb\fR -must be allocated before calling -\fBzip_stat\fR() -or -\fBzip_stat_index\fR(). -.PP -The -\fIvalid\fR -field of the structure specifies which other fields are valid. -Check if the flag defined by the following defines are in -\fIvalid\fR -before accessing the fields: -.RS 6n -.PD 0 -.TP 30n -\fRZIP_STAT_NAME\fR -\fIname\fR -.TP 30n -\fRZIP_STAT_INDEX\fR -\fIindex\fR -.TP 30n -\fRZIP_STAT_SIZE\fR -\fIsize\fR -.TP 30n -\fRZIP_STAT_COMP_SIZE\fR -\fIcomp_size\fR -.TP 30n -\fRZIP_STAT_MTIME\fR -\fImtime\fR -.TP 30n -\fRZIP_STAT_CRC\fR -\fIcrc\fR -.TP 30n -\fRZIP_STAT_COMP_METHOD\fR -\fIcomp_method\fR -.TP 30n -\fRZIP_STAT_ENCRYPTION_METHOD\fR -\fIencryption_method\fR -.TP 30n -\fRZIP_STAT_FLAGS\fR -\fIflags\fR -.RE -.PD -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error information in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -The function -\fBzip_stat\fR() -can fail for any of the errors specified for the routine -zip_name_locate(3). -.PP -The function -\fBzip_stat_index\fR() -fails and sets the error information to -\fRZIP_ER_INVAL\fR -if -\fIindex\fR -is invalid. -If -\fRZIP_FL_UNCHANGED\fR -is not set and no information can be obtained from the source -callback, the error information is set to -\fRZIP_ER_CHANGED\fR. -.SH "SEE ALSO" -libzip(3), -zip_get_num_entries(3), -zip_name_locate(3), -zip_stat_init(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_stat_init.man b/man/zip_stat_init.man deleted file mode 100644 index 142a74e..0000000 --- a/man/zip_stat_init.man +++ /dev/null
@@ -1,45 +0,0 @@ -.TH "ZIP_STAT_INIT" "3" "September 22, 2013" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_stat_init\fR -\- initialize zip_stat structure -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIvoid\fR -.PD 0 -.HP 4n -\fBzip_stat_init\fR(\fIzip_stat_t\ *sb\fR); -.PD -.SH "DESCRIPTION" -The -\fBzip_stat_init\fR() -function initializes the members of a struct zip_stat. -The current members are described in -zip_stat(3), -but this function should be used to initialize it to -make sure none are missed. -The structure pointed to by -\fIsb\fR -must be allocated before calling -\fBzip_stat_init\fR(). -.PP -This function should be used by functions provided to -zip_source_function(3) -when returning -\fRZIP_SOURCE_STAT\fR -information to make sure all fields are initialized. -.SH "RETURN VALUES" -If -\fIsb\fR -is valid, the function is always successful. -.SH "SEE ALSO" -libzip(3), -zip_stat(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange.man b/man/zip_unchange.man deleted file mode 100644 index db2697b..0000000 --- a/man/zip_unchange.man +++ /dev/null
@@ -1,44 +0,0 @@ -.TH "ZIP_UNCHANGE" "3" "April 23, 2006" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_unchange\fR -\- undo changes to file in zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_unchange\fR(\fIzip_t\ *archive\fR, \fIint\ index\fR); -.PD -.SH "DESCRIPTION" -Changes to the file at position -\fIindex\fR -are reverted. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "ERRORS" -\fBzip_unchange\fR() -fails if: -.TP 19n -[\fRZIP_ER_EXISTS\fR] -Unchanging the name would result in a duplicate name in the archive. -.TP 19n -[\fRZIP_ER_INVAL\fR] -\fIindex\fR -is not a valid file index in -\fIzip\fR. -.SH "SEE ALSO" -libzip(3), -zip_unchange_all(3), -zip_unchange_archive(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange_all.man b/man/zip_unchange_all.man deleted file mode 100644 index 9cf0381..0000000 --- a/man/zip_unchange_all.man +++ /dev/null
@@ -1,33 +0,0 @@ -.TH "ZIP_UNCHANGE_ALL" "3" "April 23, 2006" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_unchange_all\fR -\- undo all changes in a zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_unchange_all\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -All changes to files and global information in -\fIarchive\fR -are reverted. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_unchange(3), -zip_unchange_archive(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zip_unchange_archive.man b/man/zip_unchange_archive.man deleted file mode 100644 index 9b71cfa..0000000 --- a/man/zip_unchange_archive.man +++ /dev/null
@@ -1,33 +0,0 @@ -.TH "ZIP_UNCHANGE_ARCHIVE" "3" "May 14, 2008" "NiH" "Library Functions Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzip_unchange_archive\fR -\- undo global changes to zip archive -.SH "LIBRARY" -libzip (-lzip) -.SH "SYNOPSIS" -\fB#include <zip.h>\fR -.sp -\fIint\fR -.PD 0 -.HP 4n -\fBzip_unchange_archive\fR(\fIzip_t\ *archive\fR); -.PD -.SH "DESCRIPTION" -Revert all global changes to the archive -\fIarchive\fR. -This reverts changes to the archive comment and global flags. -.SH "RETURN VALUES" -Upon successful completion 0 is returned. -Otherwise, \-1 is returned and the error code in -\fIarchive\fR -is set to indicate the error. -.SH "SEE ALSO" -libzip(3), -zip_unchange(3), -zip_unchange_all(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zipcmp.man b/man/zipcmp.man deleted file mode 100644 index 32952f9..0000000 --- a/man/zipcmp.man +++ /dev/null
@@ -1,61 +0,0 @@ -.TH "ZIPCMP" "1" "January 29, 2014" "NiH" "General Commands Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzipcmp\fR -\- compare contents of zip archives -.SH "SYNOPSIS" -.HP 7n -\fBzipcmp\fR -[\fB\-hipqtVv\fR] -\fIarchive1\ archive2\fR -.SH "DESCRIPTION" -\fBzipcmp\fR -compares the zip archives or directories -\fIarchive1\fR -and -\fIarchive2\fR -and checks if they contain the same files, comparing their names, -uncompressed sizes, and CRCs. -File order and compressed size differences are ignored. -.PP -Supported options: -.TP 5n -\fB\-h\fR -Display a short help message and exit. -.TP 5n -\fB\-i\fR -Compare names ignoring case distinctions. -.TP 5n -\fB\-p\fR -Enable paranoid checks. -Compares extra fields and other meta data. -(Automatically disabled if one of the archives is a directory.) -.TP 5n -\fB\-q\fR -Quiet mode. -Compare -\fB\-v\fR. -.TP 5n -\fB\-t\fR -Test zip files by comparing the contents to their checksums. -.TP 5n -\fB\-V\fR -Display version information and exit. -.TP 5n -\fB\-v\fR -Verbose mode. -Print details about differences to stdout. -(This is the default.) -.SH "EXIT STATUS" -\fBzipcmp\fR -exits 0 if the two archives contain the same files, 1 if they differ, -and >1 if an error occurred. -.SH "SEE ALSO" -zipmerge(1), -ziptorrent(1), -libzip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/zipmerge.man b/man/zipmerge.man deleted file mode 100644 index 08757e8..0000000 --- a/man/zipmerge.man +++ /dev/null
@@ -1,60 +0,0 @@ -.TH "ZIPMERGE" "1" "June 4, 2008" "NiH" "General Commands Manual" -.nh -.if n .ad l -.SH "NAME" -\fBzipmerge\fR -\- merge zip archives -.SH "SYNOPSIS" -.HP 9n -\fBzipmerge\fR -[\fB\-DhIiSsV\fR] -\fItarget-zip\fR -\fIsource-zip\fR\ [\fIsource-zip\ ...\fR] -.SH "DESCRIPTION" -\fBzipmerge\fR -merges the source zip archives -\fIsource-zip\fR -into the target zip archive -\fItarget-zip\fR. -By default, files in the source zip archives overwrite -existing files of the same name in the target zip archive. -.PP -Supported options: -.TP 5n -\fB\-D\fR -Ignore directory components in file name comparisons. -.TP 5n -\fB\-h\fR -Display a short help message and exit. -.TP 5n -\fB\-I\fR -Ignore case in file name comparisons -.TP 5n -\fB\-i\fR -Ask before overwriting files. -See also -\fB\-s\fR. -.TP 5n -\fB\-S\fR -Do not overwrite files that have the same size and -CRC32 in both the source and target archives. -.TP 5n -\fB\-s\fR -When -\fB\-i\fR -is given, do not before overwriting files that have the same size -and CRC32. -.TP 5n -\fB\-V\fR -Display version information and exit. -.SH "EXIT STATUS" -\fBzipmerge\fR -exits 0 on success and >1 if an error occurred. -.SH "SEE ALSO" -zipcmp(1), -ziptorrent(1), -libzip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/man/ziptorrent.man b/man/ziptorrent.man deleted file mode 100644 index 2d4c516..0000000 --- a/man/ziptorrent.man +++ /dev/null
@@ -1,46 +0,0 @@ -.TH "ZIPTORRENT" "1" "July 24, 2008" "NiH" "General Commands Manual" -.nh -.if n .ad l -.SH "NAME" -\fBziptorrent\fR -\- torrentzip zip archives -.SH "SYNOPSIS" -.HP 11n -\fBziptorrent\fR -[\fB\-hnVv\fR] -\fIarchive\fR\ [\fI...\fR] -.SH "DESCRIPTION" -\fBziptorrent\fR -torrentzips -\fIarchive\fR. -This is a restricted file format used for using bittorrent on zip -files. -Please see -zip_set_archive_flag(3) -for details on what information gets lost through this process. -.PP -Supported options: -.TP 5n -\fB\-h\fR -Display a short help message and exit. -.TP 5n -\fB\-n\fR -Don't actually change archives, just print what would be done. -.TP 5n -\fB\-V\fR -Display version information and exit. -.TP 5n -\fB\-v\fR -Be verbose: print which archives are already torrentzipped and which -need to be rezipped. -.SH "EXIT STATUS" -\fBziptorrent\fR -exits 0 on success and >1 if an error occurred. -.SH "SEE ALSO" -zipcmp(1), -zipmerge(1), -libzip(3) -.SH "AUTHORS" -Dieter Baron <\fIdillo@nih.at\fR> -and -Thomas Klausner <\fItk@giga.or.at\fR>
diff --git a/xcode/libzip.xcodeproj/project.pbxproj b/xcode/libzip.xcodeproj/project.pbxproj index 9f0b6a4..7d72ab4 100644 --- a/xcode/libzip.xcodeproj/project.pbxproj +++ b/xcode/libzip.xcodeproj/project.pbxproj
@@ -723,6 +723,8 @@ 4B01D72215B2F572002D5007 /* zipmerge.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = zipmerge.c; sourceTree = "<group>"; }; 4B01D72315B2F572002D5007 /* ziptorrent.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ziptorrent.c; sourceTree = "<group>"; }; 4B01D73D15B2FB6B002D5007 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; + 4B1ABD1A1A2E5DA700C93867 /* links */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = links; sourceTree = "<group>"; }; + 4B1ABD1B1A2E5E4D00C93867 /* handle_links */ = {isa = PBXFileReference; explicitFileType = text.script.perl; fileEncoding = 4; path = handle_links; sourceTree = "<group>"; }; 4B1E46E51A08CB7600A376D2 /* zip_error_code_system.mdoc */ = {isa = PBXFileReference; lastKnownFileType = text; path = zip_error_code_system.mdoc; sourceTree = "<group>"; }; 4B1E46E61A08CB7600A376D2 /* zip_error_code_zip.mdoc */ = {isa = PBXFileReference; lastKnownFileType = text; path = zip_error_code_zip.mdoc; sourceTree = "<group>"; }; 4B1E46E71A08CB7600A376D2 /* zip_error_fini.mdoc */ = {isa = PBXFileReference; lastKnownFileType = text; path = zip_error_fini.mdoc; sourceTree = "<group>"; }; @@ -861,7 +863,7 @@ 4BCF3031199ABD3A0064207B /* zip_source_remove.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip_source_remove.c; sourceTree = "<group>"; }; 4BCF3034199ABDDA0064207B /* zip_source_seek_write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip_source_seek_write.c; sourceTree = "<group>"; }; 4BCF3035199ABDDA0064207B /* zip_source_tell_write.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip_source_tell_write.c; sourceTree = "<group>"; }; - 4BD155CE191CD28D0046F012 /* NiHTest.pm */ = {isa = PBXFileReference; indentWidth = 8; lastKnownFileType = text.script.perl; path = NiHTest.pm; sourceTree = "<group>"; }; + 4BD155CE191CD28D0046F012 /* NiHTest.pm */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.script.perl; path = NiHTest.pm; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; }; 4BD155CF191CD28D0046F012 /* runtest.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = runtest.in; sourceTree = "<group>"; }; 4BD5053219A0116D007DD28A /* zip_source_call.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip_source_call.c; sourceTree = "<group>"; }; 4BD6CB5C19E6A5D900710654 /* source_hole.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = source_hole.c; sourceTree = "<group>"; }; @@ -1137,6 +1139,8 @@ isa = PBXGroup; children = ( 4BCD77A91A14ED5C001A9F55 /* CMakeLists.txt */, + 4B1ABD1B1A2E5E4D00C93867 /* handle_links */, + 4B1ABD1A1A2E5DA700C93867 /* links */, 4B26FF141A07DF1A000E9788 /* Makefile.am */, 4BC386511A1BE04700CDCAAC /* fix-man-links.sh */, 4BC386521A1BE04700CDCAAC /* make_zip_errors.sh */,