From c2f8ee96726028b9261f35f4e329f80072c9560f Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Fri, 12 Dec 2003 07:40:12 +0000 Subject: [PATCH] This commit was generated by cvs2svn to compensate for changes in r138, which included commits to RCS files with non-trunk default branches. --- docs/manpages.ar | 2194 +++++++++++++++++---------------------------- docs/zziplib.html | 4 +- zzip/write.c | 20 +- 3 files changed, 815 insertions(+), 1403 deletions(-) diff --git a/docs/manpages.ar b/docs/manpages.ar index 2e4426d..d323915 100644 --- a/docs/manpages.ar +++ b/docs/manpages.ar @@ -1,5 +1,5 @@ ! -// 584 ` +// 602 ` zzip_compr_str.3/ zzip_createdir.3/ zzip_dir_alloc.3/ @@ -17,6 +17,7 @@ zzip_file_mkdir.3/ zzip_file_open.3/ zzip_file_read.3/ zzip_file_real.3/ +zzip_file_stat.3/ zzip_file_write.3/ __zzip_find_disk_trailer.3/ zzip_get_default_io.3/ @@ -29,10 +30,10 @@ zzip_rewinddir.3/ zzip_strerror_of.3/ __zzip_try_open.3/ -zzip_close.3/ 1061226771 500 0 100664 23 ` +zzip_close.3/ 1071214812 500 0 100664 23 ` .so man3/zzip_fclose.3 -zzip_closedir.3/1061226771 500 0 100664 1236 ` +zzip_closedir.3/1071214812 500 0 100664 965 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -52,53 +53,41 @@ zzip_closedir.3/1061226771 500 0 100664 1236 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_CLOSEDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_CLOSEDIR" 3 "0.13.24" "zziplib" "zzip_closedir" .SH NAME zzip_closedir \- (zzip/dir.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 19 -int\ \fBzzip_closedir\fR\ (ZZIP_DIR*\ dir); +.HP 20 +int \ \fBzzip_closedir\fR\ (ZZIP_DIR*\ dir); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_closedir\fR function is the equivalent of \fBclosedir\fR(3) for a realdir or zipfile. + \fBThe zzip_closedir function\fR is the equivalent of \fBclosedir\fR(3) for a realdir or zipfile\&. .PP -The \fBzzip_closedir\fR function is magic - if the given arg-ZZIP_DIR is a real directory, it will call the real \fBclosedir\fR(3) and then free the wrapping ZZIP_DIR structure. Otherwise it will divert to \fBzzip_dir_close\fR which will free the ZZIP_DIR structure. + \fBThe zzip_closedir function\fR is magic \- if the given arg\-ZZIP_DIR is a real directory, it will call the real \fBclosedir\fR(3) and then free the wrapping ZZIP_DIR structure\&. Otherwise it will divert to \fBzzip_dir_close\fR which will free the ZZIP_DIR structure\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi -/0 1061226771 500 0 100664 981 ` +/0 1071214812 500 0 100664 692 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -118,20 +107,21 @@ Guido Draheim .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_COMPR_STR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_COMPR_STR" 3 "0.13.24" "zziplib" "zzip_compr_str" .SH NAME zzip_compr_str \- (zzip/info.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 29 -zzip_char_t*\ \fBzzip_compr_str\fR\ (int\ compr); +.HP 30 +zzip_char_t* \ \fBzzip_compr_str\fR\ (int\ compr); .ad .hy @@ -144,27 +134,12 @@ return static const string of the known compression methods, otherwise just "zip .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_creat.3/ 1061226771 500 0 100664 22 ` +zzip_creat.3/ 1071214812 500 0 100664 22 ` .so man3/zzip_mkdir.3 -/18 1061226771 500 0 100664 2592 ` +/18 1071214812 500 0 100664 2362 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -184,19 +159,19 @@ zzip_creat.3/ 1061226771 500 0 100664 22 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_CREATEDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_CREATEDIR" 3 "0.13.24" "zziplib" "zzip_createdir" .SH NAME zzip_createdir \- create a new archive area for writing .SH "SYNOPSIS" +.ad l +.hy 0 - #include + #include .sp -.ad l -.hy 0 -.HP 26 -ZZIP_DIR*\ \fBzzip_createdir\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 27 +ZZIP_DIR* \ \fBzzip_createdir\fR\ (zzip_char_t*\ name, int\ o_mode); .ad .hy @@ -206,48 +181,34 @@ ZZIP_DIR*\ \fBzzip_createdir\fR\ (zzip_char_t*\ name, int\ o_mode); .PP -The \fBzzip_createdir\fR function will create a new archive area. This may either be a a new zip archive or a new directory in the filesystem. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for \fBzzip_file_mkdir\fR and \fBzzip_file_creat\fR calls. The returned handle wraps both possibilities, it can be representing a zip central directory that must be saved to disk using \fBzzip_closedir\fR or it is just a handle for the name of the real directory that still must be run through \fBzzip_closedir\fR to release the wrapper around the directory name. + \fBThe zzip_createdir function\fR will create a new archive area\&. This may either be a a new zip archive or a new directory in the filesystem\&. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for \fBzzip_file_mkdir\fR and \fBzzip_file_creat\fR calls\&. The returned handle wraps both possibilities, it can be representing a zip central directory that must be saved to disk using \fBzzip_closedir\fR or it is just a handle for the name of the real directory that still must be run through \fBzzip_closedir\fR to release the wrapper around the directory name\&. .PP -The magic is pushed through the o_mode argument. Using a mode that has no group-write bit set (S_IWGRP = 0040) then the file is created as a zip directory. Note that this is unabridged of any umask value in the system where the argument to the \fBzzip_createdir\fR function could be 0775 but with an umask of 0755 it turns out as 0755 for a real directory. Using 0755 directly would not create it as a real directory but as a zip archive handle. +The magic is pushed through the o_mode argument\&. Using a mode that has no group\-write bit set (S_IWGRP = 0040) then the file is created as a zip directory\&. Note that this is unabridged of any umask value in the system where the argument to \fBthe zzip_createdir function\fR could be 0775 but with an umask of 0755 it turns out as 0755 for a real directory\&. Using 0755 directly would not create it as a real directory but as a zip archive handle\&. .PP -The \fBzzip_createdir\fR function is not yet implemented, check for #def ZZIP_NO_CREAT Write-support will extend \fBzzip_closedir\fR with semantics to finalize the zip-archive by writing the zip-trailer and closing the archive file. + \fBThe zzip_createdir function\fR is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support will extend \fBzzip_closedir\fR with semantics to finalize the zip\-archive by writing the zip\-trailer and closing the archive file\&. .PP -Returns null on error and sets errno. Remember, according to posix the \fBcreat\fR(2) call is equivalent to +Returns null on error and sets errno\&. Remember, according to posix the \fBcreat\fR(2) call is equivalent to .IP .nf - open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) .fi - so any previous zip-archive will be overwritten unconditionally and EEXIST errors from \fBmkdir\fR(2) are suppressed. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) + so any previous zip\-archive will be overwritten unconditionally and EEXIST errors from \fBmkdir\fR(2) are suppressed\&. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/36 1061226771 500 0 100664 33 ` +/36 1071214812 500 0 100664 33 ` .so man3/zzip_dir_alloc_ext_io.3 -/54 1061226771 500 0 100664 1656 ` +/54 1071214812 500 0 100664 1418 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -267,129 +228,54 @@ Guido Draheim .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_ALLOC_EXT_IO" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_ALLOC_EXT" 3 "0.13.24" "zziplib" "zzip_dir_alloc_ext_io" .SH NAME zzip_dir_alloc_ext_io, zzip_dir_alloc \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 33 -ZZIP_DIR*\ \fBzzip_dir_alloc_ext_io\fR\ (zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); -.HP 26 -ZZIP_DIR*\ \fBzzip_dir_alloc\fR\ (zzip_strings_t*\ fileext); +.HP 34 +ZZIP_DIR* \ \fBzzip_dir_alloc_ext_io\fR\ (zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); +.HP 27 +ZZIP_DIR* \ \fBzzip_dir_alloc\fR\ (zzip_strings_t*\ fileext); .ad .hy .SH "DESCRIPTION" .PP -allocate a new ZZIP_DIR handle and do basic initializations before usage by \fBzzip_dir_fdopen\fR \fBzzip_dir_open\fR \fBzzip_file_open\fR or through \fBzzip_open\fR (ext==null flags uses { ".zip" , ".ZIP" } ) (io ==null flags use of posix io defaults) +allocate a new ZZIP_DIR handle and do basic initializations before usage by \fBzzip_dir_fdopen\fR \fBzzip_dir_open\fR \fBzzip_file_open\fR or through \fBzzip_open\fR (ext==null flags uses { "\&.zip" , "\&.ZIP" } ) (io ==null flags use of posix io defaults) .PP -the \fBzzip_dir_alloc\fR function is obsolete - it was generally used for implementation and exported to let other code build on it. It is now advised to use \fBzzip_dir_alloc_ext_io\fR now on explicitly, just set that second argument to zero to achieve the same functionality as the old style. + \fBthe zzip_dir_alloc function\fR is obsolete \- it was generally used for implementation and exported to let other code build on it\&. It is now advised to use \fBzzip_dir_alloc_ext_io\fR now on explicitly, just set that second argument to zero to achieve the same functionality as the old style\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila -.LP - -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/79 1061226771 500 0 100664 1087 ` -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "ZZIP_DIR_CLOSE" 3 "0.13.23" "zziplib" "" -.SH NAME -zzip_dir_close \- (zzip/zip.c) -.SH "SYNOPSIS" - - - - -#include // archive handling - - -.sp -.ad l -.hy 0 -.HP 20 -int\ \fBzzip_dir_close\fR\ (ZZIP_DIR\ *\ dir); -.ad -.hy - -.SH "DESCRIPTION" - -.PP -It will also \fBfree\fR(2) the \fBZZIP_DIR\fR-handle given. the counterpart for \fBzzip_dir_open\fR see also \fBzzip_dir_free\fR - -.SH "AUTHOR" - -.TP 3 +Tomi Ollila +.TP \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi +/79 1071214812 500 0 100664 25 ` +.so man3/zzip_dir_free.3 - -/97 1061226771 500 0 100664 2505 ` +/97 1071214812 500 0 100664 2275 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -409,21 +295,21 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_CREAT" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_CREAT" 3 "0.13.24" "zziplib" "zzip_dir_creat" .SH NAME zzip_dir_creat, zzip_dir_creat_ext_io \- create a new zip archive for writing .SH "SYNOPSIS" +.ad l +.hy 0 - #include + #include .sp -.ad l -.hy 0 -.HP 26 -ZZIP_DIR*\ \fBzzip_dir_creat\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 33 -ZZIP_DIR*\ \fBzzip_dir_creat_ext_io\fR\ (zzip_char_t*\ name, int\ o_mode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 27 +ZZIP_DIR* \ \fBzzip_dir_creat\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 34 +ZZIP_DIR* \ \fBzzip_dir_creat_ext_io\fR\ (zzip_char_t*\ name, int\ o_mode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); .ad .hy @@ -433,53 +319,39 @@ ZZIP_DIR*\ \fBzzip_dir_creat_ext_io\fR\ (zzip_char_t*\ name, int\ o_mode, zzip_s .PP -The \fBzzip_dir_creat\fR function will create a new zip archive. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for \fBzzip_mkdir\fR and \fBzzip_creat\fR calls. The returned handle represents a zip central directory that must be saved to disk using \fBzzip_closedir\fR. + \fBThe zzip_dir_creat function\fR will create a new zip archive\&. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for \fBzzip_mkdir\fR and \fBzzip_creat\fR calls\&. The returned handle represents a zip central directory that must be saved to disk using \fBzzip_closedir\fR\&. .PP -Returns null on error and sets errno. Remember, according to posix the \fBcreat\fR(2) call is equivalent to +Returns null on error and sets errno\&. Remember, according to posix the \fBcreat\fR(2) call is equivalent to .IP .nf - open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) .fi - so any previous zip-archive will be overwritten unconditionally and EEXIST errors from \fBmkdir\fR(2) are suppressed. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) + so any previous zip\-archive will be overwritten unconditionally and EEXIST errors from \fBmkdir\fR(2) are suppressed\&. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) .PP .PP -If the third argument "ext" has another special meaning here, as it is used to ensure that a given zip-file is created with the first entry of the ext-list appended as an extension unless the file-path already ends with a file-extension registered in the list. Therefore {"",0} matches all files and creates them as zip-archives under the given nonmodified name. (Some magic here? If the path ends in the path separator then make a real directory even in the presence of ext-list?) +If the third argument "ext" has another special meaning here, as it is used to ensure that a given zip\-file is created with the first entry of the ext\-list appended as an extension unless the file\-path already ends with a file\-extension registered in the list\&. Therefore {"",0} matches all files and creates them as zip\-archives under the given nonmodified name\&. (Some magic here? If the path ends in the path separator then make a real directory even in the presence of ext\-list?) .PP -The \fBzzip_dir_creat_ext_io\fR function is not yet implemented, check for #def ZZIP_NO_CREAT Write-support will extend \fBzzip_closedir\fR with semantics to finalize the zip-archive by writing the zip-trailer and closing the archive file. + \fBThe zzip_dir_creat_ext_io function\fR is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support will extend \fBzzip_closedir\fR with semantics to finalize the zip\-archive by writing the zip\-trailer and closing the archive file\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/115 1061226771 500 0 100664 26 ` +/115 1071214812 500 0 100664 26 ` .so man3/zzip_dir_creat.3 -zzip_dirfd.3/ 1061226771 500 0 100664 26 ` +zzip_dirfd.3/ 1071214812 500 0 100664 26 ` .so man3/zzip_dirhandle.3 -/140 1061226771 500 0 100664 1637 ` +/140 1071214812 500 0 100664 1396 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -499,67 +371,57 @@ zzip_dirfd.3/ 1061226771 500 0 100664 26 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_FDOPEN" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_FDOPEN" 3 "0.13.24" "zziplib" "zzip_dir_fdopen" .SH NAME zzip_dir_fdopen, zzip_dir_fdopen_ext_io \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 29 -ZZIP_DIR\ *\ \fBzzip_dir_fdopen\fR\ (int\ fd, zzip_error_t\ *\ errcode_p); -.HP 36 -ZZIP_DIR\ *\ \fBzzip_dir_fdopen_ext_io\fR\ (int\ fd, zzip_error_t\ *\ errcode_p, zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); +.HP 31 +ZZIP_DIR\ *\ \ \fBzzip_dir_fdopen\fR\ (int\ fd, zzip_error_t\ *\ errcode_p); +.HP 38 +ZZIP_DIR\ *\ \ \fBzzip_dir_fdopen_ext_io\fR\ (int\ fd, zzip_error_t\ *\ errcode_p, zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -used by the \fBzzip_dir_open\fR and zzip_opendir(2) call. Opens the zip-archive as specified with the fd which points to an already openend file. The \fBzzip_dir_fdopen\fR function then search and parse the zip's central directory. +used by the \fBzzip_dir_open\fR and zzip_opendir(2) call\&. Opens the zip\-archive as specified with the fd which points to an already openend file\&. \fBThe zzip_dir_fdopen function\fR then search and parse the zip's central directory\&. .PP NOTE: refcount is zero, so an _open/_close pair will also delete this _dirhandle .PP -the \fBzzip_dir_fdopen_ext_io\fR function uses explicit ext and io instead of the internal defaults, setting these to zero is equivalent to \fBzzip_dir_fdopen\fR + \fBthe zzip_dir_fdopen_ext_io function\fR uses explicit ext and io instead of the internal defaults, setting these to zero is equivalent to \fBzzip_dir_fdopen\fR .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/159 1061226771 500 0 100664 27 ` +/159 1071214812 500 0 100664 27 ` .so man3/zzip_dir_fdopen.3 -zzip_dir_free.3/1061226771 500 0 100664 1284 ` +zzip_dir_free.3/1071214812 500 0 100664 1249 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -579,58 +441,55 @@ zzip_dir_free.3/1061226771 500 0 100664 1284 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_FREE" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_FREE" 3 "0.13.24" "zziplib" "zzip_dir_free" .SH NAME -zzip_dir_free \- (zzip/zip.c) +zzip_dir_free, zzip_dir_close \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 19 -int\ \fBzzip_dir_free\fR\ (ZZIP_DIR\ *\ dir); +.HP 21 +int\ \ \fBzzip_dir_free\fR\ (ZZIP_DIR\ *\ dir); +.HP 22 +int\ \ \fBzzip_dir_close\fR\ (ZZIP_DIR\ *\ dir); .ad .hy .SH "DESCRIPTION" .PP -will free the zzip_dir handle unless there are still zzip_files attached (that may use its cache buffer). This is the inverse of \fBzzip_dir_alloc\fR , and both are helper functions used implicitly in other zzipcalls e.g. \fBzzip_dir_close\fR = zzip_close +will free the zzip_dir handle unless there are still zzip_files attached (that may use its cache buffer)\&. This is the inverse of \fBzzip_dir_alloc\fR , and both are helper functions used implicitly in other zzipcalls e\&.g\&. \fBzzip_dir_close\fR = zzip_close + +.PP +returns zero on sucess returns the refcount when files are attached\&. .PP -returns zero on sucess returns the refcount when files are attached. +It will also \fBfree\fR(2) the \fBZZIP_DIR\fR\-handle given\&. the counterpart for \fBzzip_dir_open\fR see also \fBzzip_dir_free\fR .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi -/185 1061226771 500 0 100664 1426 ` +/185 1071214812 500 0 100664 1150 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -650,61 +509,48 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIRHANDLE" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIRHANDLE" 3 "0.13.24" "zziplib" "zzip_dirhandle" .SH NAME zzip_dirhandle, zzip_dirfd \- (zzip/info.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 28 -ZZIP_DIR\ *\ \fBzzip_dirhandle\fR\ (ZZIP_FILE\ *\ fp); -.HP 16 -int\ \fBzzip_dirfd\fR\ (ZZIP_DIR*\ dir); +.HP 30 +ZZIP_DIR\ *\ \ \fBzzip_dirhandle\fR\ (ZZIP_FILE\ *\ fp); +.HP 18 +int\ \ \fBzzip_dirfd\fR\ (ZZIP_DIR*\ dir); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_dirhandle\fR function will just return fp->dir + \fBThe zzip_dirhandle function\fR will just return fp\->dir .PP -If a ZZIP_FILE is contained within a zip-file that one will be a valid pointer, otherwise a NULL is returned and the ZZIP_FILE wraps a real file. +If a ZZIP_FILE is contained within a zip\-file that one will be a valid pointer, otherwise a NULL is returned and the ZZIP_FILE wraps a real file\&. .PP -The \fBzzip_dirfd\fR function will just return dir->fd + \fBThe zzip_dirfd function\fR will just return dir\->fd .PP -If a ZZIP_DIR does point to a zipfile then the file-descriptor of that zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps a real directory DIR (if you have dirent on your system). +If a ZZIP_DIR does point to a zipfile then the file\-descriptor of that zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps a real directory DIR (if you have dirent on your system)\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_dir_open.3/1061226771 500 0 100664 1463 ` +zzip_dir_open.3/1071214812 500 0 100664 1538 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -724,64 +570,73 @@ zzip_dir_open.3/1061226771 500 0 100664 1463 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_OPEN" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_OPEN" 3 "0.13.24" "zziplib" "zzip_dir_open" .SH NAME -zzip_dir_open, zzip_dir_open_ext_io \- (zzip/zip.c) +zzip_dir_open, zzip_dir_open_ext_io, zzip_dir_read \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 25 -ZZIP_DIR*\ \fBzzip_dir_open\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e); -.HP 32 -ZZIP_DIR*\ \fBzzip_dir_open_ext_io\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 27 +ZZIP_DIR*\ \ \fBzzip_dir_open\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e); +.HP 34 +ZZIP_DIR*\ \ \fBzzip_dir_open_ext_io\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 20 +int \ \fBzzip_dir_read\fR\ (ZZIP_DIR\ *\ dir, ZZIP_DIRENT\ *\ d); .ad .hy .SH "DESCRIPTION" .PP -Opens the zip-archive (if available). the two ext_io arguments will default to use posix io and a set of default fileext that can atleast add .zip ext itself. +Opens the zip\-archive (if available)\&. the two ext_io arguments will default to use posix io and a set of default fileext that can atleast add \&.zip ext itself\&. .PP -the \fBzzip_dir_open_ext_io\fR function uses explicit ext and io instead of the internal defaults. Setting these to zero is equivalent to \fBzzip_dir_open\fR + \fBthe zzip_dir_open_ext_io function\fR uses explicit ext and io instead of the internal defaults\&. Setting these to zero is equivalent to \fBzzip_dir_open\fR + +.PP +fills the dirent\-argument with the values and increments the read\-pointer of the dir\-argument\&. + +.PP +returns 0 if there no entry (anymore)\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila +.TP +\(bu +Guido Draheim +.TP +\(bu +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - +/203 1071214812 500 0 100664 25 ` +.so man3/zzip_dir_open.3 -/203 1061226771 500 0 100664 25 ` +zzip_dir_read.3/1071214812 500 0 100664 25 ` .so man3/zzip_dir_open.3 -zzip_dir_read.3/1061226771 500 0 100664 1112 ` +zzip_dir_real.3/1071214812 500 0 100664 26 ` +.so man3/zzip_file_real.3 +zzip_dir_stat.3/1071214812 500 0 100664 1876 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -801,60 +656,62 @@ zzip_dir_read.3/1061226771 500 0 100664 1112 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_READ" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_DIR_STAT" 3 "0.13.24" "zziplib" "zzip_dir_stat" .SH NAME -zzip_dir_read \- (zzip/zip.c) +zzip_dir_stat, zzip_file_stat, zzip_fstat \- (zzip/stat.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 19 -int\ \fBzzip_dir_read\fR\ (ZZIP_DIR\ *\ dir, ZZIP_DIRENT\ *\ d); +.HP 21 +int\ \ \fBzzip_dir_stat\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, ZZIP_STAT\ *\ zs, int\ flags); +.HP 22 +int\ \ \fBzzip_file_stat\fR\ (ZZIP_FILE*\ file, ZZIP_STAT*\ zs); +.HP 18 +int\ \ \fBzzip_fstat\fR\ (ZZIP_FILE*\ file, ZZIP_STAT*\ zs); .ad .hy .SH "DESCRIPTION" .PP -fills the dirent-argument with the values and increments the read-pointer of the dir-argument. +obtain information about a filename in an opened zip\-archive without opening that file first\&. Mostly used to obtain the uncompressed size of a file inside a zip\-archive\&. see \fBzzip_dir_open\fR\&. + +.PP + \fBThe zzip_file_stat function\fR will obtain information about a opened file _within_ a zip\-archive\&. The file is supposed to be open (otherwise \-1 is returned)\&. The st_size stat\-member contains the uncompressed size\&. The optional d_name is never set here\&. .PP -returns 0 if there no entry (anymore). + \fBThe zzip_fstat function\fR will obtain information about a opened file which may be either real/zipped\&. The file is supposed to be open (otherwise \-1 is returned)\&. The st_size stat\-member contains the uncompressed size\&. The optional d_name is never set here\&. For a real file, we do set the d_csize := st_size and d_compr := 0 for meaningful defaults\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_dir_real.3/1061226771 500 0 100664 26 ` -.so man3/zzip_file_real.3 -zzip_dir_stat.3/1061226771 500 0 100664 1151 ` +zzip_errno.3/ 1071214812 500 0 100664 895 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -874,54 +731,41 @@ zzip_dir_stat.3/1061226771 500 0 100664 1151 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_DIR_STAT" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_ERRNO" 3 "0.13.24" "zziplib" "zzip_errno" .SH NAME -zzip_dir_stat \- (zzip/stat.c) +zzip_errno \- (zzip/err.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 19 -int\ \fBzzip_dir_stat\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, ZZIP_STAT\ *\ zs, int\ flags); +.HP 17 +int \ \fBzzip_errno\fR\ (int\ errcode); .ad .hy .SH "DESCRIPTION" .PP -obtain information about a filename in an opened zip-archive without opening that file first. Mostly used to obtain the uncompressed size of a file inside a zip-archive. see \fBzzip_dir_open\fR. +map the error code to a system error code\&. This is used for the drop\-in replacement functions to return a value that can be interpreted correctly by code sections that are unaware of the fact they their \fBopen\fR(2) call had been diverted to a file inside a zip\-archive\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" -.IP -.nf - -(c) 1999,2000,2001,2002 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_errno.3/ 1061226771 500 0 100664 1189 ` +zzip_error.3/ 1071214812 500 0 100664 872 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -941,129 +785,42 @@ zzip_errno.3/ 1061226771 500 0 100664 1189 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_ERRNO" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_ERROR" 3 "0.13.24" "zziplib" "zzip_error" .SH NAME -zzip_errno \- (zzip/err.c) +zzip_error, zzip_seterror \- (zzip/info.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 16 -int\ \fBzzip_errno\fR\ (int\ errcode); +.HP 18 +int\ \ \fBzzip_error\fR\ (ZZIP_DIR\ *\ dir); +.HP 22 +void\ \ \fBzzip_seterror\fR\ (ZZIP_DIR\ *\ dir, int\ errcode); .ad .hy .SH "DESCRIPTION" .PP -map the error code to a system error code. This is used for the drop-in replacement functions to return a value that can be interpreted correctly by code sections that are unaware of the fact they their \fBopen\fR(2) call had been diverted to a file inside a zip-archive. - -.SH "AUTHOR" - -.TP 3 -\(bu -Guido Draheim -.TP -\(bu -Tomi Ollila -.LP - -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - - All rights reserved, - - use under the restrictions of the - - Lesser GNU General Public License - - or alternatively the restrictions - - of the Mozilla Public License 1.1 - - -.fi - - -zzip_error.3/ 1061226771 500 0 100664 1159 ` -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "ZZIP_ERROR" 3 "0.13.23" "zziplib" "" -.SH NAME -zzip_error, zzip_seterror \- (zzip/info.c) -.SH "SYNOPSIS" - - -#include // or - - -.sp -.ad l -.hy 0 -.HP 16 -int\ \fBzzip_error\fR\ (ZZIP_DIR\ *\ dir); -.HP 20 -void\ \fBzzip_seterror\fR\ (ZZIP_DIR\ *\ dir, int\ errcode); -.ad -.hy - -.SH "DESCRIPTION" - -.PP -just returns dir->errcode of the ZZIP_DIR handle see: \fBzzip_dir_open\fR, \fBzzip_diropen\fR, \fBzzip_readdir\fR, \fBzzip_dir_read\fR +just returns dir\->errcode of the ZZIP_DIR handle see: \fBzzip_dir_open\fR, \fBzzip_diropen\fR, \fBzzip_readdir\fR, \fBzzip_dir_read\fR .PP -The \fBzzip_seterror\fR function just does dir->errcode = errcode + \fBThe zzip_seterror function\fR just does dir\->errcode = errcode .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_fclose.3/ 1061226771 500 0 100664 1191 ` +zzip_fclose.3/ 1071214812 500 0 100664 993 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1083,32 +840,33 @@ zzip_fclose.3/ 1061226771 500 0 100664 1191 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FCLOSE" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FCLOSE" 3 "0.13.24" "zziplib" "zzip_fclose" .SH NAME zzip_fclose, zzip_close \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 17 -int\ \fBzzip_fclose\fR\ (ZZIP_FILE\ *\ fp); -.HP 16 -int\ \fBzzip_close\fR\ (ZZIP_FILE*\ fp); +.HP 19 +int\ \ \fBzzip_fclose\fR\ (ZZIP_FILE\ *\ fp); +.HP 18 +int\ \ \fBzzip_close\fR\ (ZZIP_FILE*\ fp); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_fclose\fR function closes the given ZZIP_FILE handle. + \fBThe zzip_fclose function\fR closes the given ZZIP_FILE handle\&. .PP -If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd that is being closed and the otherwise empty ZZIP_FILE gets freed. +If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd that is being closed and the otherwise empty ZZIP_FILE gets freed\&. .PP @@ -1117,28 +875,20 @@ If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd that is bein .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/227 1061226771 500 0 100664 1227 ` +/227 1071214812 500 0 100664 952 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1158,60 +908,46 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FILE_CLOSE" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FILE_CLOSE" 3 "0.13.24" "zziplib" "zzip_file_close" .SH NAME zzip_file_close \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 21 -int\ \fBzzip_file_close\fR\ (ZZIP_FILE\ *\ fp); +.HP 23 +int\ \ \fBzzip_file_close\fR\ (ZZIP_FILE\ *\ fp); .ad .hy .SH "DESCRIPTION" .PP -the direct function of \fBzzip_close\fR(fp). it will cleanup the inflate-portion of \fBzlib\fR and free the structure given. +the direct function of \fBzzip_close\fR(fp)\&. it will cleanup the inflate\-portion of \fBzlib\fR and free the structure given\&. .PP -it is called quite from the error-cleanup parts of the various \fB_open\fR functions. +it is called quite from the error\-cleanup parts of the various \fB_open\fR functions\&. .PP -the .refcount is decreased and if zero the fp->dir is closed just as well. +the \&.refcount is decreased and if zero the fp\->dir is closed just as well\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/246 1061226771 500 0 100664 3199 ` +/246 1071214812 500 0 100664 2954 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1231,21 +967,21 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FILE_CREAT" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FILE_CREAT" 3 "0.13.24" "zziplib" "zzip_file_creat" .SH NAME -zzip_file_creat, zzip_file_mkdir \- start next file entry in a zip archive creat(2) +zzip_file_creat, zzip_file_mkdir \- start next file entry in a zip archive .SH "SYNOPSIS" +.ad l +.hy 0 - #include + #include .sp -.ad l -.hy 0 -.HP 28 -ZZIP_FILE*\ \fBzzip_file_creat\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); -.HP 21 -int\ \fBzzip_file_mkdir\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); +.HP 29 +ZZIP_FILE* \ \fBzzip_file_creat\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); +.HP 22 +int \ \fBzzip_file_mkdir\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); .ad .hy @@ -1255,22 +991,22 @@ int\ \fBzzip_file_mkdir\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); .PP -The \fBzzip_file_creat\fR function will create a new file within a zzip archive, the one given as the primary argument and additionally to the posix creat(2) - just like zzip_mkdir has an additional argument over the posix mkdir(2) spec. For the \fBzzip_file_creat\fR function the primary parameter can be null as well thereby creating a real file instead of a new one inside the zip-archive otherwise given. If the primary parameter is not null but wraps a real directory then all new files are also real. + \fBThe zzip_file_creat function\fR will create a new file within a zzip archive, the one given as the primary argument and additionally to the posix creat(2) \- just like zzip_mkdir has an additional argument over the posix mkdir(2) spec\&. For \fBthe zzip_file_creat function\fR the primary parameter can be null as well thereby creating a real file instead of a new one inside the zip\-archive otherwise given\&. If the primary parameter is not null but wraps a real directory then all new files are also real\&. .PP -The \fBzzip_file_creat\fR function is not yet implemented, check for #def ZZIP_NO_CREAT + \fBThe zzip_file_creat function\fR is not yet implemented, check for #def ZZIP_NO_CREAT .PP -Returns NULL on an error setting errno, and opening a file _within_ a zip archive using O_RDONLY (and similar stuff) will surely lead to an error. +Returns NULL on an error setting errno, and opening a file _within_ a zip archive using O_RDONLY (and similar stuff) will surely lead to an error\&. .PP .PP -The \fBzzip_file_mkdir\fR function has an additional primary argument over the posix mkdir(2) - if it is null then the \fBzzip_file_mkdir\fR function behaves just like posix mkdir(2). The zzip_dir argument can be set to the result of a \fBzzip_createdir\fR which allows for some magic that the given directory name is created as an entry in the zip archive. + \fBThe zzip_file_mkdir function\fR has an additional primary argument over the posix mkdir(2) \- if it is null then \fBthe zzip_file_mkdir function\fR behaves just like posix mkdir(2)\&. The zzip_dir argument can be set to the result of a \fBzzip_createdir\fR which allows for some magic that the given directory name is created as an entry in the zip archive\&. .PP -If the given dir name argument is not within the basepath of the zip central directory then a real directory is created. Any EEXIST errors are not suppressed unlike with \fBzzip_createdir\fR +If the given dir name argument is not within the basepath of the zip central directory then a real directory is created\&. Any EEXIST errors are not suppressed unlike with \fBzzip_createdir\fR .PP Standard usage accepts a global/threaded/modular ZZIP_DIR pointer for all zip archive operations like in: @@ -1282,7 +1018,7 @@ Standard usage accepts a global/threaded/modular ZZIP_DIR pointer for all zip ar ZZIP_FILE* file = zzip_file_creat (zip, filename[i], 0644); zzip_write (file, buf, len); zzip_close (file); file = 0; - zzip_closedir (zip); zip = 0; + zzip_closedir (zip); zip = 0; .fi @@ -1292,13 +1028,13 @@ compare with \fBzzip_mkdir\fR inline macro which allows to collapse the examples .IP .nf #define zzip_savefile myproject_saveconfig - #include + #include ZZIP_DIR* zzip_savefile = zzip_createdir (sysconfpath, 0755); zzip_mkdir (filepath[i], 0755); ZZIP_FILE* file = zzip_creat(filepath[i], 0644); zzip_write (file, buf, len); zzip_close (file); file = 0; - zzip_closedir (zip_savefile); + zzip_closedir (zip_savefile); .fi @@ -1306,28 +1042,13 @@ compare with \fBzzip_mkdir\fR inline macro which allows to collapse the examples .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/265 1061226771 500 0 100664 27 ` +/265 1071214812 500 0 100664 27 ` .so man3/zzip_file_creat.3 -/284 1061226771 500 0 100664 1279 ` +/284 1071214812 500 0 100664 1006 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1347,57 +1068,43 @@ Guido Draheim .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FILE_OPEN" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FILE_OPEN" 3 "0.13.24" "zziplib" "zzip_file_open" .SH NAME zzip_file_open \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 29 -ZZIP_FILE\ *\ \fBzzip_file_open\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, int\ o_mode); +.HP 31 +ZZIP_FILE\ *\ \ \fBzzip_file_open\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, int\ o_mode); .ad .hy .SH "DESCRIPTION" .PP -open an \fBZZIP_FILE\fR from an already open \fBZZIP_DIR\fR handle. Since we have a chance to reuse a cached \fBbuf32k\fR and \fBZZIP_FILE\fR memchunk this is the best choice to unpack multiple files. +open an \fBZZIP_FILE\fR from an already open \fBZZIP_DIR\fR handle\&. Since we have a chance to reuse a cached \fBbuf32k\fR and \fBZZIP_FILE\fR memchunk this is the best choice to unpack multiple files\&. .PP -Note: the zlib supports 2..15 bit windowsize, hence we provide a 32k memchunk here... just to be safe. +Note: the zlib supports 2\&.\&.15 bit windowsize, hence we provide a 32k memchunk here\&.\&.\&. just to be safe\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/302 1061226771 500 0 100664 1574 ` +/302 1071214812 500 0 100664 1300 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1417,62 +1124,49 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FILE_READ" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FILE_READ" 3 "0.13.24" "zziplib" "zzip_file_read" .SH NAME zzip_file_read \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 29 -zzip_ssize_t\ \fBzzip_file_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); +.HP 31 +zzip_ssize_t\ \ \fBzzip_file_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_file_read\fR functions read data from zip-contained file. + \fBThe zzip_file_read function\fRs read data from zip\-contained file\&. .PP -It works like \fBread\fR(2) and will fill the given buffer with bytes from the opened file. It will return the number of bytes read, so if the \fBEOF\fR is encountered you will be prompted with the number of bytes actually read. +It works like \fBread\fR(2) and will fill the given buffer with bytes from the opened file\&. It will return the number of bytes read, so if the \fBEOF\fR is encountered you will be prompted with the number of bytes actually read\&. .PP -This is the routines that needs the \fBbuf32k\fR buffer, and it would have need for much more polishing but it does already work quite well. +This is the routines that needs the \fBbuf32k\fR buffer, and it would have need for much more polishing but it does already work quite well\&. .PP -Note: the 32K buffer is rather big. The original inflate-algorithm required just that but the latest zlib would work just fine with a smaller buffer. +Note: the 32K buffer is rather big\&. The original inflate\-algorithm required just that but the latest zlib would work just fine with a smaller buffer\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/320 1061226771 500 0 100664 1785 ` +/320 1071214812 500 0 100664 1525 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1492,68 +1186,58 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FILE_REAL" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FILE_REAL" 3 "0.13.24" "zziplib" "zzip_file_real" .SH NAME zzip_file_real, zzip_dir_real, zzip_realdir, zzip_realfd \- (zzip/info.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 20 -int\ \fBzzip_file_real\fR\ (ZZIP_FILE*\ fp); -.HP 19 -int\ \fBzzip_dir_real\fR\ (ZZIP_DIR*\ dir); +.HP 21 +int \ \fBzzip_file_real\fR\ (ZZIP_FILE*\ fp); .HP 20 -void*\ \fBzzip_realdir\fR\ (ZZIP_DIR*\ dir); -.HP 17 -int\ \fBzzip_realfd\fR\ (ZZIP_FILE*\ fp); +int \ \fBzzip_dir_real\fR\ (ZZIP_DIR*\ dir); +.HP 21 +void* \ \fBzzip_realdir\fR\ (ZZIP_DIR*\ dir); +.HP 18 +int \ \fBzzip_realfd\fR\ (ZZIP_FILE*\ fp); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_file_real\fR function checks if the ZZIP_FILE-handle is wrapping a real file or a zip-contained file. Returns 1 for a stat'able file, and 0 for a file inside a zip-archive. + \fBThe zzip_file_real function\fR checks if the ZZIP_FILE\-handle is wrapping a real file or a zip\-contained file\&. Returns 1 for a stat'able file, and 0 for a file inside a zip\-archive\&. .PP -The \fBzzip_dir_real\fR function checks if the ZZIP_DIR-handle is wrapping a real directory or a zip-archive. Returns 1 for a stat'able directory, and 0 for a handle to zip-archive. + \fBThe zzip_dir_real function\fR checks if the ZZIP_DIR\-handle is wrapping a real directory or a zip\-archive\&. Returns 1 for a stat'able directory, and 0 for a handle to zip\-archive\&. .PP -The \fBzzip_realdir\fR function returns the posix DIR* handle (if one exists). Check before with \fBzzip_dir_real\fR if the the ZZIP_DIR points to a real directory. + \fBThe zzip_realdir function\fR returns the posix DIR* handle (if one exists)\&. Check before with \fBzzip_dir_real\fR if the the ZZIP_DIR points to a real directory\&. .PP -The \fBzzip_realfd\fR function returns the posix file descriptor (if one exists). Check before with \fBzzip_file_real\fR if the the ZZIP_FILE points to a real file. + \fBThe zzip_realfd function\fR returns the posix file descriptor (if one exists)\&. Check before with \fBzzip_file_real\fR if the the ZZIP_FILE points to a real file\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi +/338 1071214812 500 0 100664 25 ` +.so man3/zzip_dir_stat.3 -/338 1061226771 500 0 100664 22 ` +/356 1071214812 500 0 100664 22 ` .so man3/zzip_write.3 -/357 1061226771 500 0 100664 1241 ` +/375 1071214812 500 0 100664 919 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1573,56 +1257,41 @@ Guido Draheim .el .ne 3 .IP "\\$1" \\$2 .. -.TH "__ZZIP_FIND_DISK_TRAILER" 3 "0.13.23" "zziplib" "" +.TH "__ZZIP_FIND_DISK" 3 "0.13.24" "zziplib" "__zzip_find_disk_trailer" .SH NAME __zzip_find_disk_trailer \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 30 -int\ \fB__zzip_find_disk_trailer\fR\ (int\ fd, zzip_off_t\ filesize, struct\ zzip_disk_trailer\ *\ trailer, zzip_plugin_io_t\ io); +.HP 32 +int\ \ \fB__zzip_find_disk_trailer\fR\ (int\ fd, zzip_off_t\ filesize, struct\ zzip_disk_trailer\ *\ trailer, zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -The \fB__zzip_find_disk_trailer\fR function is used by \fBzzip_file_open\fR. It tries to find the zip's central directory info that is usually a few bytes off the end of the file. + \fBThe __zzip_find_disk_trailer function\fR is used by \fBzzip_file_open\fR\&. It tries to find the zip's central directory info that is usually a few bytes off the end of the file\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_fopen.3/ 1061226771 500 0 100664 4264 ` +zzip_fopen.3/ 1071214812 500 0 100664 4108 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1642,116 +1311,112 @@ zzip_fopen.3/ 1061226771 500 0 100664 4264 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_FOPEN" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_FOPEN" 3 "0.13.24" "zziplib" "zzip_fopen" .SH NAME zzip_fopen, zzip_freopen \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 23 -ZZIP_FILE*\ \fBzzip_fopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode); -.HP 25 -ZZIP_FILE*\ \fBzzip_freopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode, ZZIP_FILE*\ stream); +.HP 24 +ZZIP_FILE* \ \fBzzip_fopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode); +.HP 26 +ZZIP_FILE* \ \fBzzip_freopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode, ZZIP_FILE*\ stream); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_fopen\fR function will \fBfopen\fR(3) a real/zipped file. + \fBThe zzip_fopen function\fR will \fBfopen\fR(3) a real/zipped file\&. .PP -It has some magic functionality builtin - it will first try to open the given filename as a normal file. If it does not exist, the given path to the filename (if any) is split into its directory-part and the file-part. A ".zip" extension is then added to the directory-part to create the name of a zip-archive. That zip-archive (if it exists) is being searched for the file-part, and if found a zzip-handle is returned. +It has some magic functionality builtin \- it will first try to open the given filename as a normal file\&. If it does not exist, the given path to the filename (if any) is split into its directory\-part and the file\-part\&. A "\&.zip" extension is then added to the directory\-part to create the name of a zip\-archive\&. That zip\-archive (if it exists) is being searched for the file\-part, and if found a zzip\-handle is returned\&. .PP -Note that if the file is found in the normal fs-directory the returned structure is mostly empty and the \fBzzip_read\fR call will use the libc \fBread\fR to obtain data. Otherwise a \fBzzip_file_open\fR is performed and any error mapped to \fBerrno\fR(3). +Note that if the file is found in the normal fs\-directory the returned structure is mostly empty and the \fBzzip_read\fR call will use the libc \fBread\fR to obtain data\&. Otherwise a \fBzzip_file_open\fR is performed and any error mapped to \fBerrno\fR(3)\&. .PP -unlike the posix-wrapper \fBzzip_open\fR the mode-argument is a string which allows for more freedom to support the extra zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH. Currently, this \fBzzip_fopen\fR call will convert the following characters in the mode-string into their corrsponding mode-bits: +unlike the posix\-wrapper \fBzzip_open\fR the mode\-argument is a string which allows for more freedom to support the extra zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH\&. Currently, this \fBzzip_fopen\fR call will convert the following characters in the mode\-string into their corrsponding mode\-bits: .nf -\fB "r" : O_RDONLY : \fR read-only - \fB "b" : O_BINARY : \fR binary (win32 specific) - \fB "f" : O_NOCTTY : \fR no char device (unix) - \fB "i" : ZZIP_CASELESS : \fR inside zip file - \fB "*" : ZZIP_NOPATHS : \fR inside zip file only +\fB "r" : O_RDONLY : \fR read\-only + \fB "b" : O_BINARY : \fR binary (win32 specific) + \fB "f" : O_NOCTTY : \fR no char device (unix) + \fB "i" : ZZIP_CASELESS : \fR inside zip file + \fB "*" : ZZIP_NOPATHS : \fR inside zip file only .fi .PP -all other modes will be ignored for zip-contained entries but they are transferred for compatibility and portability, including these extra sugar bits: +all other modes will be ignored for zip\-contained entries but they are transferred for compatibility and portability, including these extra sugar bits: .nf -\fB "x" : O_EXCL :\fR fail if file did exist - \fB "s" : O_SYNC :\fR synchronized access - \fB "n" : O_NONBLOCK :\fR nonblocking access - \fB "z#" : compression level :\fR for zlib - \fB "g#" : group access :\fR unix access bits - \fB "u#" : owner access :\fR unix access bits - \fB "o#" : world access :\fR unix access bits +\fB "x" : O_EXCL :\fR fail if file did exist + \fB "s" : O_SYNC :\fR synchronized access + \fB "n" : O_NONBLOCK :\fR nonblocking access + \fB "z#" : compression level :\fR for zlib + \fB "g#" : group access :\fR unix access bits + \fB "u#" : owner access :\fR unix access bits + \fB "o#" : world access :\fR unix access bits .fi .PP -... the access bits are in traditional unix bit format with 7 = read/write/execute, 6 = read/write, 4 = read-only. +\&.\&.\&. the access bits are in traditional unix bit format with 7 = read/write/execute, 6 = read/write, 4 = read\-only\&. .PP -The default access mode is 0664, and the compression level is ignored since the lib can not yet write zip files, otherwise it would be the initialisation value for the zlib deflateInit where 0 = no-compression, 1 = best-speed, 9 = best-compression. +The default access mode is 0664, and the compression level is ignored since the lib can not yet write zip files, otherwise it would be the initialisation value for the zlib deflateInit where 0 = no\-compression, 1 = best\-speed, 9 = best\-compression\&. .PP .PP -The \fBzzip_freopen\fR function receives an additional argument pointing to a ZZIP_FILE* being already in use. If this extra argument is null then the \fBzzip_freopen\fR function is identical with calling \fBzzip_fopen\fR + \fBThe zzip_freopen function\fR receives an additional argument pointing to a ZZIP_FILE* being already in use\&. If this extra argument is null then \fBthe zzip_freopen function\fR is identical with calling \fBzzip_fopen\fR .PP -Per default, the old file stream is closed and only the internal structures associated with it are kept. These internal structures may be reused for the return value, and this is a lot quicker when the filename matches a zipped file that is incidently in the very same zip arch as the old filename wrapped in the stream struct. +Per default, the old file stream is closed and only the internal structures associated with it are kept\&. These internal structures may be reused for the return value, and this is a lot quicker when the filename matches a zipped file that is incidently in the very same zip arch as the old filename wrapped in the stream struct\&. .PP -That's simply because the zip arch's central directory does not need to be read again. As an extension for the \fBzzip_freopen\fR function, if the mode-string contains a "q" then the old stream is not closed but left untouched, instead it is only given as a hint that a new file handle may share/copy the zip arch structures of the old file handle if that is possible, i.e when they are in the same zip arch. +That's simply because the zip arch's central directory does not need to be read again\&. As an extension for \fBthe zzip_freopen function\fR, if the mode\-string contains a "q" then the old stream is not closed but left untouched, instead it is only given as a hint that a new file handle may share/copy the zip arch structures of the old file handle if that is possible, i\&.e when they are in the same zip arch\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_fread.3/ 1061226771 500 0 100664 21 ` +zzip_fread.3/ 1071214812 500 0 100664 21 ` .so man3/zzip_read.3 -zzip_freopen.3/ 1061226771 500 0 100664 22 ` +zzip_freopen.3/ 1071214812 500 0 100664 22 ` .so man3/zzip_fopen.3 -zzip_fwrite.3/ 1061226771 500 0 100664 22 ` +zzip_fstat.3/ 1071214812 500 0 100664 25 ` +.so man3/zzip_dir_stat.3 + +zzip_fwrite.3/ 1071214812 500 0 100664 22 ` .so man3/zzip_write.3 -__zzip_get16.3/ 1061226771 500 0 100664 24 ` +__zzip_get16.3/ 1071214812 500 0 100664 24 ` .so man3/__zzip_get32.3 -__zzip_get32.3/ 1061226771 500 0 100664 1255 ` +__zzip_get32.3/ 1071214812 500 0 100664 1010 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1771,63 +1436,53 @@ __zzip_get32.3/ 1061226771 500 0 100664 1255 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "__ZZIP_GET32" 3 "0.13.23" "zziplib" "" +.TH "__ZZIP_GET32" 3 "0.13.24" "zziplib" "__zzip_get32" .SH NAME __zzip_get32, __zzip_get16 \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 23 -uint32_t\ \fB__zzip_get32\fR\ (unsigned\ char\ *\ s); -.HP 23 -uint16_t\ \fB__zzip_get16\fR\ (unsigned\ char\ *\ s); +.HP 25 +uint32_t\ \ \fB__zzip_get32\fR\ (unsigned\ char\ *\ s); +.HP 25 +uint16_t\ \ \fB__zzip_get16\fR\ (unsigned\ char\ *\ s); .ad .hy .SH "DESCRIPTION" .PP -Make 32 bit value in host byteorder from little-endian mapped octet-data (works also on machines which SIGBUS on misaligned data access (eg. 68000)) +Make 32 bit value in host byteorder from little\-endian mapped octet\-data (works also on machines which SIGBUS on misaligned data access (eg\&. 68000)) .PP -The \fB__zzip_get16\fR function does the same for a 16 bit value. + \fBThe __zzip_get16 function\fR does the same for a 16 bit value\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila .TP \(bu -Tomi Ollila +Guido Draheim +.TP +\(bu +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/385 1061226771 500 0 100664 24 ` +/403 1071214812 500 0 100664 24 ` .so man3/zzip_init_io.3 -/408 1061226771 500 0 100664 1071 ` +/426 1071214812 500 0 100664 787 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1847,54 +1502,41 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_INFLATE_INIT" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_INFLATE_INIT" 3 "0.13.24" "zziplib" "zzip_inflate_init" .SH NAME zzip_inflate_init \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 31 -static\ int\ \fBzzip_inflate_init\fR\ (ZZIP_FILE\ *\ fp, struct\ zzip_dir_hdr*\ hdr); +.HP 33 +static\ int\ \ \fBzzip_inflate_init\fR\ (ZZIP_FILE\ *\ fp, struct\ zzip_dir_hdr*\ hdr); .ad .hy .SH "DESCRIPTION" .PP -call \fBinflateInit\fR and setup fp's iterator variables, used by lowlevel \fB_open\fR functions. +call \fBinflateInit\fR and setup fp's iterator variables, used by lowlevel \fB_open\fR functions\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_init_io.3/ 1061226771 500 0 100664 1289 ` +zzip_init_io.3/ 1071214812 500 0 100664 1135 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1914,60 +1556,52 @@ zzip_init_io.3/ 1061226771 500 0 100664 1289 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_INIT_IO" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_INIT_IO" 3 "0.13.24" "zziplib" "zzip_init_io" .SH NAME zzip_init_io, zzip_get_default_io \- (zzip/plugin.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include +#include .sp -.ad l -.hy 0 -.HP 18 -int\ \fBzzip_init_io\fR\ (zzip_plugin_io_handlers_t\ io, int\ flags); -.HP 38 -zzip_plugin_io_t\ \fBzzip_get_default_io\fR\ (); +.HP 20 +int\ \ \fBzzip_init_io\fR\ (zzip_plugin_io_handlers_t\ io, int\ flags); +.HP 39 +zzip_plugin_io_t \ \fBzzip_get_default_io\fR\ (); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_init_io\fR function initializes the users handler struct to default values being the posix io functions in default configured environments. + \fBThe zzip_init_io function\fR initializes the users handler struct to default values being the posix io functions in default configured environments\&. .PP -The \fBzzip_get_default_io\fR function returns a zzip_plugin_io_t handle to static defaults wrapping the posix io file functions for actual file access. + \fBThe zzip_get_default_io function\fR returns a zzip_plugin_io_t handle to static defaults wrapping the posix io file functions for actual file access\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Mike Nordell +.TP +\(bu +Guido Draheim .TP \(bu -Mike Nordell +Mike Nordell .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_mkdir.3/ 1061226771 500 0 100664 2299 ` +zziplib.h.3/ 1071214812 500 0 100664 3477 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -1987,21 +1621,147 @@ zzip_mkdir.3/ 1061226771 500 0 100664 2299 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_MKDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIPLIB.H" 3 "0.13.24" "the library zziplib" "" .SH NAME -zzip_mkdir, zzip_creat \- create a zipped file/directory +zziplib.h \- library .SH "SYNOPSIS" +.ad l +.hy 0 + - #include + +#include .sp -.ad l -.hy 0 -.HP 16 -int\ \fBzzip_mkdir\fR\ (zzip_char_t*\ name, int\ o_mode); .HP 23 -ZZIP_FILE*\ \fBzzip_creat\fR\ (zzip_char_t*\ name, int\ o_mode); +void\ \ \fBzzip_rewinddir\fR\ (ZZIP_DIR\ *\ dir); +.HP 29 +ZZIP_DIRENT*\ \ \fBzzip_readdir\fR\ (ZZIP_DIR\ *\ dir); +.HP 26 +ZZIP_DIR*\ \ \fBzzip_opendir\fR\ (zzip_char_t*\ filename); +.HP 20 +int \ \fBzzip_closedir\fR\ (ZZIP_DIR*\ dir); +.HP 30 +zzip_char_t*\ \ \fBzzip_strerror\fR\ (int\ errcode); +.HP 17 +int \ \fBzzip_errno\fR\ (int\ errcode); +.HP 23 +int\ \ \fBzzip_file_close\fR\ (ZZIP_FILE\ *\ fp); +.HP 31 +ZZIP_FILE\ *\ \ \fBzzip_file_open\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, int\ o_mode); +.HP 33 +static\ int\ \ \fBzzip_inflate_init\fR\ (ZZIP_FILE\ *\ fp, struct\ zzip_dir_hdr*\ hdr); +.HP 19 +int\ \ \fBzzip_fclose\fR\ (ZZIP_FILE\ *\ fp); +.HP 31 +zzip_ssize_t\ \ \fBzzip_file_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); +.HP 25 +zzip_ssize_t \ \fBzzip_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); +.HP 24 +ZZIP_FILE* \ \fBzzip_fopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode); +.HP 23 +ZZIP_FILE* \ \fBzzip_open\fR\ (zzip_char_t*\ filename, int\ o_flags); +.HP 18 +int \ \fBzzip_rewind\fR\ (ZZIP_FILE\ *fp); +.HP 23 +zzip_off_t \ \fBzzip_seek\fR\ (ZZIP_FILE\ *\ fp, zzip_off_t\ offset, int\ whence); +.HP 23 +zzip_off_t \ \fBzzip_tell\fR\ (ZZIP_FILE\ *\ fp); +.HP 18 +int\ \ \fBzzip_error\fR\ (ZZIP_DIR\ *\ dir); +.HP 30 +ZZIP_DIR\ *\ \ \fBzzip_dirhandle\fR\ (ZZIP_FILE\ *\ fp); +.HP 30 +zzip_char_t* \ \fBzzip_compr_str\fR\ (int\ compr); +.HP 21 +int \ \fBzzip_file_real\fR\ (ZZIP_FILE*\ fp); +.HP 20 +int\ \ \fBzzip_init_io\fR\ (zzip_plugin_io_handlers_t\ io, int\ flags); +.HP 21 +int\ \ \fBzzip_dir_stat\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, ZZIP_STAT\ *\ zs, int\ flags); +.HP 27 +ZZIP_DIR* \ \fBzzip_dir_creat\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 27 +ZZIP_DIR* \ \fBzzip_createdir\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 29 +ZZIP_FILE* \ \fBzzip_file_creat\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); +.HP 26 +zzip_ssize_t \ \fBzzip_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); +.HP 25 +int\ inline \ \fBzzip_mkdir\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 27 +void\ inline \ \fBzzip_mkfifo\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 25 +uint32_t\ \ \fB__zzip_get32\fR\ (unsigned\ char\ *\ s); +.HP 32 +int\ \ \fB__zzip_find_disk_trailer\fR\ (int\ fd, zzip_off_t\ filesize, struct\ zzip_disk_trailer\ *\ trailer, zzip_plugin_io_t\ io); +.HP 35 +int\ \ \fB__zzip_parse_root_directory\fR\ (int\ fd, struct\ zzip_disk_trailer\ *\ trailer, struct\ zzip_dir_hdr\ **\ hdr_return, zzip_plugin_io_t\ io); +.HP 34 +ZZIP_DIR* \ \fBzzip_dir_alloc_ext_io\fR\ (zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); +.HP 21 +int\ \ \fBzzip_dir_free\fR\ (ZZIP_DIR\ *\ dir); +.HP 31 +ZZIP_DIR\ *\ \ \fBzzip_dir_fdopen\fR\ (int\ fd, zzip_error_t\ *\ errcode_p); +.HP 22 +int \ \fB__zzip_try_open\fR\ (zzip_char_t*\ filename, int\ filemode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 27 +ZZIP_DIR*\ \ \fBzzip_dir_open\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e); +.ad +.hy + +.SH "DESCRIPTION" + +.PP +zziplib library + +.SH "AUTHOR" + +.TP 3 +\(bu +Guido Draheim +.TP +\(bu +Tomi Ollila +.LP + + +zzip_mkdir.3/ 1071214812 500 0 100664 2079 ` +.\"Generated by db2man.xsl. Don't modify this, modify the source. +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "ZZIP_MKDIR" 3 "0.13.24" "zziplib" "zzip_mkdir" +.SH NAME +zzip_mkdir, zzip_creat \- create a zipped file/directory +.SH "SYNOPSIS" +.ad l +.hy 0 + + + #include + +.sp +.HP 25 +int\ inline \ \fBzzip_mkdir\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 32 +ZZIP_FILE*\ inline \ \fBzzip_creat\fR\ (zzip_char_t*\ name, int\ o_mode); .ad .hy @@ -2011,14 +1771,14 @@ ZZIP_FILE*\ \fBzzip_creat\fR\ (zzip_char_t*\ name, int\ o_mode); .PP -The \fBzzip_mkdir\fR function creates a directory entry in the default zip-archive. If you did not specify a "#define zzip_savefile somevar" then the default zip-archive is null and all directories are created as real directories in the filesystem. The \fBzzip_mkdir\fR function is really a preprocessor macro or preferably an inline function around \fBzzip_file_mkdir\fR, there is no such symbol generated into the library. The prototype is modelled after the posix \fBmkdir\fR(2) call. + \fBThe zzip_mkdir function\fR creates a directory entry in the default zip\-archive\&. If you did not specify a "#define zzip_savefile somevar" then the default zip\-archive is null and all directories are created as real directories in the filesystem\&. \fBThe zzip_mkdir function\fR is really a preprocessor macro or preferably an inline function around \fBzzip_file_mkdir\fR, there is no such symbol generated into the library\&. The prototype is modelled after the posix \fBmkdir\fR(2) call\&. .IP .nf #ifndef zzip_savefile #define zzip_savefile 0 #endif - #define zzip_mkdir(name,mode) \\ - + #define zzip_mkdir(name,mode) \\ \- .fi zzip_file_mkdir(zzip_savefile,name,mode) @@ -2029,14 +1789,14 @@ The \fBzzip_mkdir\fR function creates a directory entry in the default zip-archi .PP -The \fBzzip_creat\fR function creates a file in the default zip-archive. If you did not specify a "#define zzip_savefile somevar" then the default zip-archive is null and all files are created as real files. The \fBzzip_creat\fR function is really a preprocessor macro or preferably an inline function around \fBzzip_file_creat\fR, there is no such symbol generated into the library. The prototype is modelled after the posix \fBcreat\fR(2) call. + \fBThe zzip_creat function\fR creates a file in the default zip\-archive\&. If you did not specify a "#define zzip_savefile somevar" then the default zip\-archive is null and all files are created as real files\&. \fBThe zzip_creat function\fR is really a preprocessor macro or preferably an inline function around \fBzzip_file_creat\fR, there is no such symbol generated into the library\&. The prototype is modelled after the posix \fBcreat\fR(2) call\&. .IP .nf #ifndef zzip_savefile #define zzip_savefile 0 #endif - #define zzip_creat(name,mode) \\ - + #define zzip_creat(name,mode) \\ \- .fi zzip_file_creat(zzip_savefile,name,mode) @@ -2044,28 +1804,16 @@ The \fBzzip_creat\fR function creates a file in the default zip-archive. If you .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - .SH "SEE ALSO" - zzip_dir_creat, mkdir(2), creat(2), zzip_start + +.PP +zzip_dir_creat, mkdir(2), creat(2), zzip_start -zzip_mkfifo.3/ 1061226771 500 0 100664 2724 ` +zzip_mkfifo.3/ 1071214812 500 0 100664 2503 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2085,21 +1833,21 @@ zzip_mkfifo.3/ 1061226771 500 0 100664 2724 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_MKFIFO" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_MKFIFO" 3 "0.13.24" "zziplib" "zzip_mkfifo" .SH NAME zzip_mkfifo, zzip_sync \- start writing to the magic zzip_savefile .SH "SYNOPSIS" +.ad l +.hy 0 - #include + #include .sp -.ad l -.hy 0 -.HP 18 -void\ \fBzzip_mkfifo\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 16 -void\ \fBzzip_sync\fR\ (void); +.HP 27 +void\ inline \ \fBzzip_mkfifo\fR\ (zzip_char_t*\ name, int\ o_mode); +.HP 25 +void\ inline \ \fBzzip_sync\fR\ (void); .ad .hy @@ -2109,29 +1857,29 @@ void\ \fBzzip_sync\fR\ (void); .PP -open a zip archive for writing via the magic zzip_savefile macro variable. The name and mode are given to \fBzzip_createdir\fR and the result is stored into \fBzzip_savefile\fR - if the \fBzzip_savefile\fR did already have a zzip_dir handle then it is automatically finalized with \fBzzip_sync\fR and the handle closed and the zzip_savefile variable reused for the new zip archive just started with this call. - The \fBzzip_mkfifo\fR function is really a preprocessor macro or preferably an inline function around \fBzzip_dir_create\fR, there is no such symbol generated into the library. +open a zip archive for writing via the magic zzip_savefile macro variable\&. The name and mode are given to \fBzzip_createdir\fR and the result is stored into \fBzzip_savefile\fR \- if the \fBzzip_savefile\fR did already have a zzip_dir handle then it is automatically finalized with \fBzzip_sync\fR and the handle closed and the zzip_savefile variable reused for the new zip archive just started with this call\&. \- \fBThe zzip_mkfifo function\fR is really a preprocessor macro or preferably an inline function around \fBzzip_dir_create\fR, there is no such symbol generated into the library\&. .IP .nf #ifndef zzip_savefile #define zzip_savefile 0 #endif - #define zzip_start(name,mode,ext) \\ - + #define zzip_start(name,mode,ext) \\ \- .fi - { if (zzip_savefile) zzip_closedir(zzip_savefile); \\ - zzip_savefile = zzip_createdir(name,mode,ext); } The \fBzzip_mkfifo\fR function returns null on error or a zzip_dir handle on success. It is perfectly okay to continue with a null in the zzip_savefile variable since it makes subsequent calls to \fBzzip_creat\fR and \fBzzip_mkdir\fR to run as \fBcreat\fR(2) / \fBmkdir\fR(2) on the real filesystem. + { if (zzip_savefile) zzip_closedir(zzip_savefile); \\ \- zzip_savefile = zzip_createdir(name,mode,ext); } \fBThe zzip_mkfifo function\fR returns null on error or a zzip_dir handle on success\&. It is perfectly okay to continue with a null in the zzip_savefile variable since it makes subsequent calls to \fBzzip_creat\fR and \fBzzip_mkdir\fR to run as \fBcreat\fR(2) / \fBmkdir\fR(2) on the real filesystem\&. .PP .PP -finalize a zip archive thereby writing the central directory to the end of the file. If it was a real directory then we do just nothing - even that the prototype of the call itself is modelled to be similar to the posix \fBsync\fR(2) call. The \fBzzip_sync\fR function is really a preprocessor macro or preferably an inline function around \fBzzip_closedir\fR, there is no such symbol generated into the library. +finalize a zip archive thereby writing the central directory to the end of the file\&. If it was a real directory then we do just nothing \- even that the prototype of the call itself is modelled to be similar to the posix \fBsync\fR(2) call\&. \fBThe zzip_sync function\fR is really a preprocessor macro or preferably an inline function around \fBzzip_closedir\fR, there is no such symbol generated into the library\&. .IP .nf #ifndef zzip_savefile #define zzip_savefile 0 #endif - #define zzip_sync(name,mode) \\ - + #define zzip_sync(name,mode) \\ \- .fi { zzip_closedir(zzip_savefile); zzip_savefile = 0; } @@ -2142,27 +1890,16 @@ finalize a zip archive thereby writing the central directory to the end of the f .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf +.SH "SEE ALSO" -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi +.PP +zzip_creat, zzip_write, zzip_closedir, sync(2) -.SH "SEE ALSO" - zzip_creat, zzip_write, zzip_closedir, sync(2) -zzip_open.3/ 1061226771 500 0 100664 4030 ` +zzip_open.3/ 1071214812 500 0 100664 3961 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2182,49 +1919,50 @@ zzip_open.3/ 1061226771 500 0 100664 4030 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_OPEN" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_OPEN" 3 "0.13.24" "zziplib" "zzip_open" .SH NAME zzip_open, zzip_open_ext_io, zzip_open_shared_io \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 22 -ZZIP_FILE*\ \fBzzip_open\fR\ (zzip_char_t*\ filename, int\ o_flags); -.HP 29 -ZZIP_FILE*\ \fBzzip_open_ext_io\fR\ (zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 32 -ZZIP_FILE*\ \fBzzip_open_shared_io\fR\ (ZZIP_FILE*\ stream, zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 23 +ZZIP_FILE* \ \fBzzip_open\fR\ (zzip_char_t*\ filename, int\ o_flags); +.HP 30 +ZZIP_FILE* \ \fBzzip_open_ext_io\fR\ (zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 33 +ZZIP_FILE* \ \fBzzip_open_shared_io\fR\ (ZZIP_FILE*\ stream, zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_open\fR function will \fBopen\fR(2) a real/zipped file + \fBThe zzip_open function\fR will \fBopen\fR(2) a real/zipped file .PP -It has some magic functionality builtin - it will first try to open the given filename as a normal file. If it does not exist, the given path to the filename (if any) is split into its directory-part and the file-part. A ".zip" extension is then added to the directory-part to create the name of a zip-archive. That zip-archive (if it exists) is being searched for the file-part, and if found a zzip-handle is returned. +It has some magic functionality builtin \- it will first try to open the given filename as a normal file\&. If it does not exist, the given path to the filename (if any) is split into its directory\-part and the file\-part\&. A "\&.zip" extension is then added to the directory\-part to create the name of a zip\-archive\&. That zip\-archive (if it exists) is being searched for the file\-part, and if found a zzip\-handle is returned\&. .PP -Note that if the file is found in the normal fs-directory the returned structure is mostly empty and the \fBzzip_read\fR call will use the libc \fBread\fR to obtain data. Otherwise a \fBzzip_file_open\fR is performed and any error mapped to \fBerrno\fR(3). +Note that if the file is found in the normal fs\-directory the returned structure is mostly empty and the \fBzzip_read\fR call will use the libc \fBread\fR to obtain data\&. Otherwise a \fBzzip_file_open\fR is performed and any error mapped to \fBerrno\fR(3)\&. .PP -There was a possibility to transfer zziplib-specific openmodes through o_flags but you should please not use them anymore and look into \fBzzip_open_ext_io\fR to submit them down. The \fBzzip_open\fR function is shallow in that it just extracts the zzipflags and calls +There was a possibility to transfer zziplib\-specific openmodes through o_flags but you should please not use them anymore and look into \fBzzip_open_ext_io\fR to submit them down\&. \fBThe zzip_open function\fR is shallow in that it just extracts the zzipflags and calls .nf -\fB +\fB zzip_open_ext_io(filename, o_flags, zzipflags|0664, 0, 0) \fR .fi .PP -you must stop using this extra functionality (not well known anyway) since zzip_open might be later usable to open files for writing in which case the _EXTRAFLAGS will get in conflict. +you must stop using this extra functionality (not well known anyway) since zzip_open might be later usable to open files for writing in which case the _EXTRAFLAGS will get in conflict\&. .PP compare with \fBopen\fR(2) and \fBzzip_fopen\fR @@ -2233,48 +1971,47 @@ compare with \fBopen\fR(2) and \fBzzip_fopen\fR .PP -The \fBzzip_open_ext_io\fR function uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to \fBzzip_open\fR + \fBThe zzip_open_ext_io function\fR uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to \fBzzip_open\fR .PP -note that the two flag types have been split into an o_flags (for fcntl-like openflags) and o_modes where the latter shall carry the zzip_flags and possibly accessmodes for unix filesystems. Since this version of zziplib can not write zipfiles, it is not yet used for anything else than zzip-specific modeflags. +note that the two flag types have been split into an o_flags (for fcntl\-like openflags) and o_modes where the latter shall carry the zzip_flags and possibly accessmodes for unix filesystems\&. Since this version of zziplib can not write zipfiles, it is not yet used for anything else than zzip\-specific modeflags\&. .PP .PP -The \fBzzip_open_shared_io\fR function takes an extra stream argument - if a handle has been then ext/io can be left null and the new stream handle will pick up the ext/io. This should be used only in specific environment however since \fBzzip_file_real\fR does not store any ext-sequence. + \fBThe zzip_open_shared_io function\fR takes an extra stream argument \- if a handle has been then ext/io can be left null and the new stream handle will pick up the ext/io\&. This should be used only in specific environment however since \fBzzip_file_real\fR does not store any ext\-sequence\&. .PP -The benefit for the \fBzzip_open_shared_io\fR function comes in when the old file handle was openened from a file within a zip archive. When the new file is in the same zip archive then the internal zzip_dir structures will be shared. It is even quicker, as no check needs to be done anymore trying to guess the zip archive place in the filesystem, here we just check whether the zip archive's filepath is a prefix part of the filename to be opened. +The benefit for \fBthe zzip_open_shared_io function\fR comes in when the old file handle was openened from a file within a zip archive\&. When the new file is in the same zip archive then the internal zzip_dir structures will be shared\&. It is even quicker, as no check needs to be done anymore trying to guess the zip archive place in the filesystem, here we just check whether the zip archive's filepath is a prefix part of the filename to be opened\&. .PP -Note that the \fBzzip_open_shared_io\fR function is also used by \fBzzip_freopen\fR that will unshare the old handle, thereby possibly closing the handle. +Note that \fBthe zzip_open_shared_io function\fR is also used by \fBzzip_freopen\fR that will unshare the old handle, thereby possibly closing the handle\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim +.TP +\(bu +Tomi Ollila .TP \(bu -Tomi Ollila +Guido Draheim +.TP +\(bu +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_opendir.3/ 1061226771 500 0 100664 1616 ` +zzip_opendir.3/ 1071214812 500 0 100664 1353 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2294,69 +2031,57 @@ zzip_opendir.3/ 1061226771 500 0 100664 1616 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_OPENDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_OPENDIR" 3 "0.13.24" "zziplib" "zzip_opendir" .SH NAME zzip_opendir, zzip_opendir_ext_io \- (zzip/dir.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 24 -ZZIP_DIR*\ \fBzzip_opendir\fR\ (zzip_char_t*\ filename); -.HP 31 -ZZIP_DIR*\ \fBzzip_opendir_ext_io\fR\ (zzip_char_t*\ filename, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 26 +ZZIP_DIR*\ \ \fBzzip_opendir\fR\ (zzip_char_t*\ filename); +.HP 33 +ZZIP_DIR*\ \ \fBzzip_opendir_ext_io\fR\ (zzip_char_t*\ filename, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_opendir\fR function is the equivalent of \fBopendir\fR(3) for a realdir or zipfile. + \fBThe zzip_opendir function\fR is the equivalent of \fBopendir\fR(3) for a realdir or zipfile\&. .PP -The \fBzzip_opendir\fR function has some magic - if the given argument-path is a directory, it will wrap a real \fBopendir\fR(3) into the ZZIP_DIR structure. Otherwise it will divert to \fBzzip_dir_open\fR which can also attach a ".zip" extension if needed to find the archive. + \fBThe zzip_opendir function\fR has some magic \- if the given argument\-path is a directory, it will wrap a real \fBopendir\fR(3) into the ZZIP_DIR structure\&. Otherwise it will divert to \fBzzip_dir_open\fR which can also attach a "\&.zip" extension if needed to find the archive\&. .PP -the error-code is mapped to \fBerrno\fR(3). +the error\-code is mapped to \fBerrno\fR(3)\&. .PP -The \fBzzip_opendir_ext_io\fR function uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to \fBzzip_opendir\fR + \fBThe zzip_opendir_ext_io function\fR uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to \fBzzip_opendir\fR .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -/429 1061226771 500 0 100664 24 ` +/447 1071214812 500 0 100664 24 ` .so man3/zzip_opendir.3 -/452 1061226771 500 0 100664 21 ` +/470 1071214812 500 0 100664 21 ` .so man3/zzip_open.3 -/472 1061226771 500 0 100664 21 ` +/490 1071214812 500 0 100664 21 ` .so man3/zzip_open.3 -/495 1061226771 500 0 100664 1335 ` +/513 1071214812 500 0 100664 1012 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2376,56 +2101,40 @@ Guido Draheim .el .ne 3 .IP "\\$1" \\$2 .. -.TH "__ZZIP_PARSE_ROOT_DIRECTORY" 3 "0.13.23" "zziplib" "" +.TH "__ZZIP_PARSE_RO" 3 "0.13.24" "zziplib" "__zzip_parse_root_directory" .SH NAME __zzip_parse_root_directory \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 33 -int\ \fB__zzip_parse_root_directory\fR\ (int\ fd, struct\ zzip_disk_trailer\ *\ trailer, struct\ zzip_dir_hdr\ **\ hdr_return, zzip_plugin_io_t\ io); +.HP 35 +int\ \ \fB__zzip_parse_root_directory\fR\ (int\ fd, struct\ zzip_disk_trailer\ *\ trailer, struct\ zzip_dir_hdr\ **\ hdr_return, zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -The \fB__zzip_parse_root_directory\fR function is used by \fBzzip_file_open\fR, it is usually called after \fB__zzip_find_disk_trailer\fR. It will parse the zip's central directory information and create a zziplib private directory table in memory. + \fBThe __zzip_parse_root_directory function\fR is used by \fBzzip_file_open\fR, it is usually called after \fB__zzip_find_disk_trailer\fR\&. It will parse the zip's central directory information and create a zziplib private directory table in memory\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_read.3/ 1061226771 500 0 100664 1614 ` +zzip_read.3/ 1071214812 500 0 100664 1418 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2445,35 +2154,36 @@ zzip_read.3/ 1061226771 500 0 100664 1614 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_READ" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_READ" 3 "0.13.24" "zziplib" "zzip_read" .SH NAME zzip_read, zzip_fread \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 24 -zzip_ssize_t\ \fBzzip_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); -.HP 24 -zzip_size_t\ \fBzzip_fread\fR\ (void\ *ptr, zzip_size_t\ size, zzip_size_t\ nmemb, ZZIP_FILE\ *file); +.HP 25 +zzip_ssize_t \ \fBzzip_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); +.HP 25 +zzip_size_t \ \fBzzip_fread\fR\ (void\ *ptr, zzip_size_t\ size, zzip_size_t\ nmemb, ZZIP_FILE\ *file); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_read\fR function will read(2) data from a real/zipped file. + \fBThe zzip_read function\fR will read(2) data from a real/zipped file\&. .PP -the replacement for \fBread\fR(2) will fill the given buffer with bytes from the opened file. It will return the number of bytes read, so if the EOF is encountered you will be prompted with the number of bytes actually read. +the replacement for \fBread\fR(2) will fill the given buffer with bytes from the opened file\&. It will return the number of bytes read, so if the EOF is encountered you will be prompted with the number of bytes actually read\&. .PP -If the file-handle is wrapping a stat'able file then it will actually just perform a normal \fBread\fR(2)-call, otherwise \fBzzip_file_read\fR is called to decompress the data stream and any error is mapped to \fBerrno\fR(3). +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal \fBread\fR(2)\-call, otherwise \fBzzip_file_read\fR is called to decompress the data stream and any error is mapped to \fBerrno\fR(3)\&. .PP @@ -2482,27 +2192,19 @@ If the file-handle is wrapping a stat'able file then it will actually just perfo .TP 3 \(bu -Guido Draheim +Guido Draheim +.TP +\(bu +Tomi Ollila +.TP +\(bu +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_readdir.3/ 1061226771 500 0 100664 1309 ` +zzip_readdir.3/ 1071214812 500 0 100664 1035 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2522,58 +2224,45 @@ zzip_readdir.3/ 1061226771 500 0 100664 1309 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_READDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_READDIR" 3 "0.13.24" "zziplib" "zzip_readdir" .SH NAME zzip_readdir \- (zzip/dir.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 27 -ZZIP_DIRENT*\ \fBzzip_readdir\fR\ (ZZIP_DIR\ *\ dir); +.HP 29 +ZZIP_DIRENT*\ \ \fBzzip_readdir\fR\ (ZZIP_DIR\ *\ dir); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_readdir\fR function is the equivalent of a \fBreaddir\fR(2) for a realdir or a zipfile referenced by the ZZIP_DIR returned from \fBzzip_opendir\fR. + \fBThe zzip_readdir function\fR is the equivalent of a \fBreaddir\fR(2) for a realdir or a zipfile referenced by the ZZIP_DIR returned from \fBzzip_opendir\fR\&. .PP -The ZZIP_DIR handle (as returned by \fBzzip_opendir\fR) contains a few more entries than being copied into the ZZIP_DIRENT. The only valid fields in a ZZIP_DIRENT are d_name (the file name), d_compr (compression), d_csize (compressed size), st_size (uncompressed size). +The ZZIP_DIR handle (as returned by \fBzzip_opendir\fR) contains a few more entries than being copied into the ZZIP_DIRENT\&. The only valid fields in a ZZIP_DIRENT are d_name (the file name), d_compr (compression), d_csize (compressed size), st_size (uncompressed size)\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_realdir.3/ 1061226771 500 0 100664 26 ` +zzip_realdir.3/ 1071214812 500 0 100664 26 ` .so man3/zzip_file_real.3 -zzip_realfd.3/ 1061226771 500 0 100664 26 ` +zzip_realfd.3/ 1071214812 500 0 100664 26 ` .so man3/zzip_file_real.3 -zzip_rewind.3/ 1061226771 500 0 100664 1087 ` +zzip_rewind.3/ 1071214812 500 0 100664 799 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2593,57 +2282,44 @@ zzip_rewind.3/ 1061226771 500 0 100664 1087 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_REWIND" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_REWIND" 3 "0.13.24" "zziplib" "zzip_rewind" .SH NAME zzip_rewind \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 17 -int\ \fBzzip_rewind\fR\ (ZZIP_FILE\ *fp); +.HP 18 +int \ \fBzzip_rewind\fR\ (ZZIP_FILE\ *fp); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_rewind\fR function will rewind a real/zipped file. + \fBThe zzip_rewind function\fR will rewind a real/zipped file\&. .PP -It seeks to the beginning of this file's data in the zip, or the beginning of the file for a stat'fd. +It seeks to the beginning of this file's data in the zip, or the beginning of the file for a stat'fd\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -/526 1061226771 500 0 100664 1527 ` +/544 1071214812 500 0 100664 1264 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2663,61 +2339,47 @@ Tomi Ollila .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_REWINDDIR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_REWINDDIR" 3 "0.13.24" "zziplib" "zzip_rewinddir" .SH NAME zzip_rewinddir, zzip_telldir, zzip_seekdir \- (zzip/dir.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 21 -void\ \fBzzip_rewinddir\fR\ (ZZIP_DIR\ *\ dir); -.HP 25 -zzip_off_t\ \fBzzip_telldir\fR\ (ZZIP_DIR*\ dir); -.HP 19 -void\ \fBzzip_seekdir\fR\ (ZZIP_DIR*\ dir, zzip_off_t\ offset); +.HP 23 +void\ \ \fBzzip_rewinddir\fR\ (ZZIP_DIR\ *\ dir); +.HP 27 +zzip_off_t\ \ \fBzzip_telldir\fR\ (ZZIP_DIR*\ dir); +.HP 20 +void \ \fBzzip_seekdir\fR\ (ZZIP_DIR*\ dir, zzip_off_t\ offset); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_rewinddir\fR function is the equivalent of a \fBrewinddir\fR(2) for a realdir or the zipfile in place of a directory. The ZZIP_DIR handle returned from \fBzzip_opendir\fR has a flag saying realdir or zipfile. As for a zipfile, the filenames will include the filesubpath, so take care. + \fBThe zzip_rewinddir function\fR is the equivalent of a \fBrewinddir\fR(2) for a realdir or the zipfile in place of a directory\&. The ZZIP_DIR handle returned from \fBzzip_opendir\fR has a flag saying realdir or zipfile\&. As for a zipfile, the filenames will include the filesubpath, so take care\&. .PP -The \fBzzip_telldir\fR function is the equivalent of \fBtelldir\fR(2) for a realdir or zipfile. + \fBThe zzip_telldir function\fR is the equivalent of \fBtelldir\fR(2) for a realdir or zipfile\&. .PP -The \fBzzip_seekdir\fR function is the equivalent of \fBseekdir\fR(2) for a realdir or zipfile. + \fBThe zzip_seekdir function\fR is the equivalent of \fBseekdir\fR(2) for a realdir or zipfile\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_seek.3/ 1061226771 500 0 100664 1623 ` +zzip_seek.3/ 1071214812 500 0 100664 1339 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2737,64 +2399,51 @@ zzip_seek.3/ 1061226771 500 0 100664 1623 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_SEEK" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_SEEK" 3 "0.13.24" "zziplib" "zzip_seek" .SH NAME zzip_seek \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 22 -zzip_off_t\ \fBzzip_seek\fR\ (ZZIP_FILE\ *\ fp, zzip_off_t\ offset, int\ whence); +.HP 23 +zzip_off_t \ \fBzzip_seek\fR\ (ZZIP_FILE\ *\ fp, zzip_off_t\ offset, int\ whence); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_seek\fR function will perform a \fBlseek\fR(2) operation on a real/zipped file + \fBThe zzip_seek function\fR will perform a \fBlseek\fR(2) operation on a real/zipped file .PP -It will try to seek to the offset specified by offset, relative to whence, which is one of SEEK_SET, SEEK_CUR or SEEK_END. +It will try to seek to the offset specified by offset, relative to whence, which is one of SEEK_SET, SEEK_CUR or SEEK_END\&. .PP -If the file-handle is wrapping a stat'able file then it will actually just perform a normal \fBlseek\fR(2)-call. Otherwise the relative offset is calculated, negative offsets are transformed into positive ones by rewinding the file, and then data is read until the offset is reached. This can make the function terribly slow, but this is how gzio implements it, so I'm not sure there is a better way without using the internals of the algorithm. +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal \fBlseek\fR(2)\-call\&. Otherwise the relative offset is calculated, negative offsets are transformed into positive ones by rewinding the file, and then data is read until the offset is reached\&. This can make the function terribly slow, but this is how gzio implements it, so I'm not sure there is a better way without using the internals of the algorithm\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - - -zzip_seekdir.3/ 1061226771 500 0 100664 26 ` +zzip_seekdir.3/ 1071214812 500 0 100664 26 ` .so man3/zzip_rewinddir.3 -zzip_seterror.3/1061226771 500 0 100664 22 ` +zzip_seterror.3/1071214812 500 0 100664 22 ` .so man3/zzip_error.3 -zzip_strerror.3/1061226771 500 0 100664 1518 ` +zzip_strerror.3/1071214812 500 0 100664 1317 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2814,70 +2463,58 @@ zzip_strerror.3/1061226771 500 0 100664 1518 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_STRERROR" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_STRERROR" 3 "0.13.24" "zziplib" "zzip_strerror" .SH NAME zzip_strerror, zzip_strerror_of \- (zzip/err.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // or +#include + .sp -.ad l -.hy 0 -.HP 28 -zzip_char_t*\ \fBzzip_strerror\fR\ (int\ errcode); -.HP 31 -zzip_char_t*\ \fBzzip_strerror_of\fR\ (ZZIP_DIR*\ dir); +.HP 30 +zzip_char_t*\ \ \fBzzip_strerror\fR\ (int\ errcode); +.HP 33 +zzip_char_t*\ \ \fBzzip_strerror_of\fR\ (ZZIP_DIR*\ dir); .ad .hy .SH "DESCRIPTION" .PP -returns the static string for the given error code. The error code can be either a normal system error (a positive error code will flag this), it can be \fBlibz\fR error code (a small negative error code will flag this) or it can be an error code from \fBlibzzip\fR, which is an negative value lower than \fBZZIP_ERROR\fR +returns the static string for the given error code\&. The error code can be either a normal system error (a positive error code will flag this), it can be \fBlibz\fR error code (a small negative error code will flag this) or it can be an error code from \fBlibzzip\fR, which is an negative value lower than \fBZZIP_ERROR\fR .PP -The \fBzzip_strerror_of\fR function fetches the errorcode from the \fBDIR\fR-handle and runs it through \fBzzip_strerror\fR to obtain the static string describing the error. + \fBThe zzip_strerror_of function\fR fetches the errorcode from the \fBDIR\fR\-handle and runs it through \fBzzip_strerror\fR to obtain the static string describing the error\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila +.TP +\(bu +Guido Draheim +.TP +\(bu +Tomi Ollila .LP -.SH "COPYRIGHT" -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - - All rights reserved, - - use under the restrictions of the - - Lesser GNU General Public License - - or alternatively the restrictions - - of the Mozilla Public License 1.1 - - -.fi - -/544 1061226771 500 0 100664 25 ` +/562 1071214812 500 0 100664 25 ` .so man3/zzip_strerror.3 -zzip_sync.3/ 1061226771 500 0 100664 23 ` +zzip_sync.3/ 1071214812 500 0 100664 23 ` .so man3/zzip_mkfifo.3 -zzip_tell.3/ 1061226771 500 0 100664 1350 ` +zzip_tell.3/ 1071214812 500 0 100664 1061 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2897,61 +2534,49 @@ zzip_tell.3/ 1061226771 500 0 100664 1350 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_TELL" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_TELL" 3 "0.13.24" "zziplib" "zzip_tell" .SH NAME zzip_tell \- (zzip/file.c) .SH "SYNOPSIS" +.ad l +.hy 0 + -#include // or +#include .sp -.ad l -.hy 0 -.HP 22 -zzip_off_t\ \fBzzip_tell\fR\ (ZZIP_FILE\ *\ fp); +.HP 23 +zzip_off_t \ \fBzzip_tell\fR\ (ZZIP_FILE\ *\ fp); .ad .hy .SH "DESCRIPTION" .PP -The \fBzzip_tell\fR function will \fBtell\fR(2) the current position in a real/zipped file + \fBThe zzip_tell function\fR will \fBtell\fR(2) the current position in a real/zipped file .PP -It will return the current offset within the real/zipped file, measured in uncompressed bytes for the zipped-file case. +It will return the current offset within the real/zipped file, measured in uncompressed bytes for the zipped\-file case\&. .PP -If the file-handle is wrapping a stat'able file then it will actually just perform a normal \fBtell\fR(2)-call, otherwise the offset is calculated from the amount of data left and the total uncompressed size; +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal \fBtell\fR(2)\-call, otherwise the offset is calculated from the amount of data left and the total uncompressed size; .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi -zzip_telldir.3/ 1061226771 500 0 100664 26 ` +zzip_telldir.3/ 1071214812 500 0 100664 26 ` .so man3/zzip_rewinddir.3 -/564 1061226771 500 0 100664 1190 ` +/582 1071214812 500 0 100664 867 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -2971,55 +2596,41 @@ zzip_telldir.3/ 1061226771 500 0 100664 26 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "__ZZIP_TRY_OPEN" 3 "0.13.23" "zziplib" "" +.TH "__ZZIP_TRY_OPEN" 3 "0.13.24" "zziplib" "__zzip_try_open" .SH NAME __zzip_try_open \- (zzip/zip.c) .SH "SYNOPSIS" +.ad l +.hy 0 -#include // archive handling - +#include .sp -.ad l -.hy 0 -.HP 21 -int\ \fB__zzip_try_open\fR\ (zzip_char_t*\ filename, int\ filemode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); +.HP 22 +int \ \fB__zzip_try_open\fR\ (zzip_char_t*\ filename, int\ filemode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); .ad .hy .SH "DESCRIPTION" .PP -will attach a .zip extension and tries to open it the with \fBopen\fR(2). This is a helper function for \fBzzip_dir_open\fR, \fBzzip_opendir\fR and \fBzzip_open\fR. +will attach a \&.zip extension and tries to open it the with \fBopen\fR(2)\&. This is a helper function for \fBzzip_dir_open\fR, \fBzzip_opendir\fR and \fBzzip_open\fR\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .TP \(bu -Tomi Ollila +Tomi Ollila .LP -.SH "COPYRIGHT" -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - -zzip_write.3/ 1061226771 500 0 100664 2493 ` +zzip_write.3/ 1071214812 500 0 100664 2266 ` .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br @@ -3039,23 +2650,23 @@ zzip_write.3/ 1061226771 500 0 100664 2493 ` .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ZZIP_WRITE" 3 "0.13.23" "zziplib" "" +.TH "ZZIP_WRITE" 3 "0.13.24" "zziplib" "zzip_write" .SH NAME zzip_write, zzip_file_write, zzip_fwrite \- write to zzip storage .SH "SYNOPSIS" +.ad l +.hy 0 - #include + #include .sp -.ad l -.hy 0 -.HP 25 -zzip_ssize_t\ \fBzzip_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); -.HP 30 -zzip_ssize_t\ \fBzzip_file_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); -.HP 25 -zzip_size_t\ \fBzzip_fwrite\fR\ (const\ void*\ ptr, zzip_size_t\ len, zzip_size_t\ multiply, ZZIP_FILE*\ file); +.HP 26 +zzip_ssize_t \ \fBzzip_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); +.HP 31 +zzip_ssize_t \ \fBzzip_file_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); +.HP 26 +zzip_size_t \ \fBzzip_fwrite\fR\ (const\ void*\ ptr, zzip_size_t\ len, zzip_size_t\ multiply, ZZIP_FILE*\ file); .ad .hy @@ -3065,231 +2676,32 @@ zzip_size_t\ \fBzzip_fwrite\fR\ (const\ void*\ ptr, zzip_size_t\ len, zzip_size_ .PP -The \fBzzip_write\fR function will write data to a file descriptor. If the file descriptor represents a real file then it will be forwarded to call posix \fBwrite\fR(2) directly. If it is a descriptor for a file within a zip directory then the data will be "deflated" using \fBzlib\fR(3) and appended to the zip archive file. + \fBThe zzip_write function\fR will write data to a file descriptor\&. If the file descriptor represents a real file then it will be forwarded to call posix \fBwrite\fR(2) directly\&. If it is a descriptor for a file within a zip directory then the data will be "deflated" using \fBzlib\fR(3) and appended to the zip archive file\&. .PP .PP -The \fBzzip_file_write\fR function will write data to a file descriptor inside a zip archive. The data will be "deflated" using \fBzlib\fR(3) compression and appended to the end of the zip archive file. Only one file descriptor may be open per zzip_dir archive handle (fifo-like). + \fBThe zzip_file_write function\fR will write data to a file descriptor inside a zip archive\&. The data will be "deflated" using \fBzlib\fR(3) compression and appended to the end of the zip archive file\&. Only one file descriptor may be open per zzip_dir archive handle (fifo\-like)\&. .PP -The \fBzzip_file_write\fR function is not yet implemented, check for #def ZZIP_NO_CREAT It returns immediately -1 and sets errno=EROFS for indication. + \fBThe zzip_file_write function\fR is not yet implemented, check for #def ZZIP_NO_CREAT It returns immediately \-1 and sets errno=EROFS for indication\&. .PP -The \fBzzip_fwrite\fR function is the stdc variant for writing and the arguments are forwarded to \fBzzip_write\fR - the return value is floored to null as for STDC spec but there is no zzip_ferror call so far for the zziplib (later? is it actually needed?). + \fBThe zzip_fwrite function\fR is the stdc variant for writing and the arguments are forwarded to \fBzzip_write\fR \- the return value is floored to null as for STDC spec but there is no zzip_ferror call so far for the zziplib (later? is it actually needed?)\&. .PP -The \fBzzip_fwrite\fR function is not yet implemented, check for #def ZZIP_NO_CREAT Write-support extends \fBzzip_close\fR with semantics to write out a file-trailer to the zip-archive leaving a name/offset marker in the (still-open) ZZIP_DIR handle. + \fBThe zzip_fwrite function\fR is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support extends \fBzzip_close\fR with semantics to write out a file\-trailer to the zip\-archive leaving a name/offset marker in the (still\-open) ZZIP_DIR handle\&. .SH "AUTHOR" .TP 3 \(bu -Guido Draheim +Guido Draheim .LP -.SH "COPYRIGHT" - -.IP -.nf - -(c) 2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - .SH "SEE ALSO" - write(2), zlib(3), zzip_file_creat - -zzip-zzip.h.3/ 1061226771 500 0 100664 6021 ` -.\"Generated by db2man.xsl. Don't modify this, modify the source. -.de Sh \" Subsection -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR .PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.TH "ZZIP/ZZIP.H" 3 "0.13.23" "zziplib" " the library " -.SH NAME -zzip-zzip.h \- library -.SH "SYNOPSIS" -.ad l -.hy 0 -.HP 21 -void\ \fBzzip_rewinddir\fR\ (ZZIP_DIR\ *\ dir); -.HP 25 -zzip_off_t\ \fBzzip_telldir\fR\ (ZZIP_DIR*\ dir); -.HP 19 -void\ \fBzzip_seekdir\fR\ (ZZIP_DIR*\ dir, zzip_off_t\ offset); -.HP 27 -ZZIP_DIRENT*\ \fBzzip_readdir\fR\ (ZZIP_DIR\ *\ dir); -.HP 24 -ZZIP_DIR*\ \fBzzip_opendir\fR\ (zzip_char_t*\ filename); -.HP 31 -ZZIP_DIR*\ \fBzzip_opendir_ext_io\fR\ (zzip_char_t*\ filename, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 19 -int\ \fBzzip_closedir\fR\ (ZZIP_DIR*\ dir); -.HP 28 -zzip_char_t*\ \fBzzip_strerror\fR\ (int\ errcode); -.HP 31 -zzip_char_t*\ \fBzzip_strerror_of\fR\ (ZZIP_DIR*\ dir); -.HP 16 -int\ \fBzzip_errno\fR\ (int\ errcode); -.HP 21 -int\ \fBzzip_file_close\fR\ (ZZIP_FILE\ *\ fp); -.HP 29 -ZZIP_FILE\ *\ \fBzzip_file_open\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, int\ o_mode); -.HP 31 -static\ int\ \fBzzip_inflate_init\fR\ (ZZIP_FILE\ *\ fp, struct\ zzip_dir_hdr*\ hdr); -.HP 17 -int\ \fBzzip_fclose\fR\ (ZZIP_FILE\ *\ fp); -.HP 16 -int\ \fBzzip_close\fR\ (ZZIP_FILE*\ fp); -.HP 29 -zzip_ssize_t\ \fBzzip_file_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); -.HP 24 -zzip_ssize_t\ \fBzzip_read\fR\ (ZZIP_FILE\ *\ fp, char\ *\ buf, zzip_size_t\ len); -.HP 24 -zzip_size_t\ \fBzzip_fread\fR\ (void\ *ptr, zzip_size_t\ size, zzip_size_t\ nmemb, ZZIP_FILE\ *file); -.HP 23 -ZZIP_FILE*\ \fBzzip_fopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode); -.HP 25 -ZZIP_FILE*\ \fBzzip_freopen\fR\ (zzip_char_t*\ filename, zzip_char_t*\ mode, ZZIP_FILE*\ stream); -.HP 22 -ZZIP_FILE*\ \fBzzip_open\fR\ (zzip_char_t*\ filename, int\ o_flags); -.HP 29 -ZZIP_FILE*\ \fBzzip_open_ext_io\fR\ (zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 32 -ZZIP_FILE*\ \fBzzip_open_shared_io\fR\ (ZZIP_FILE*\ stream, zzip_char_t*\ filename, int\ o_flags, int\ o_modes, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 17 -int\ \fBzzip_rewind\fR\ (ZZIP_FILE\ *fp); -.HP 22 -zzip_off_t\ \fBzzip_seek\fR\ (ZZIP_FILE\ *\ fp, zzip_off_t\ offset, int\ whence); -.HP 22 -zzip_off_t\ \fBzzip_tell\fR\ (ZZIP_FILE\ *\ fp); -.HP 16 -int\ \fBzzip_error\fR\ (ZZIP_DIR\ *\ dir); -.HP 20 -void\ \fBzzip_seterror\fR\ (ZZIP_DIR\ *\ dir, int\ errcode); -.HP 28 -ZZIP_DIR\ *\ \fBzzip_dirhandle\fR\ (ZZIP_FILE\ *\ fp); -.HP 16 -int\ \fBzzip_dirfd\fR\ (ZZIP_DIR*\ dir); -.HP 29 -zzip_char_t*\ \fBzzip_compr_str\fR\ (int\ compr); -.HP 20 -int\ \fBzzip_file_real\fR\ (ZZIP_FILE*\ fp); -.HP 19 -int\ \fBzzip_dir_real\fR\ (ZZIP_DIR*\ dir); -.HP 20 -void*\ \fBzzip_realdir\fR\ (ZZIP_DIR*\ dir); -.HP 17 -int\ \fBzzip_realfd\fR\ (ZZIP_FILE*\ fp); -.HP 18 -int\ \fBzzip_init_io\fR\ (zzip_plugin_io_handlers_t\ io, int\ flags); -.HP 38 -zzip_plugin_io_t\ \fBzzip_get_default_io\fR\ (); -.HP 19 -int\ \fBzzip_dir_stat\fR\ (ZZIP_DIR\ *\ dir, zzip_char_t*\ name, ZZIP_STAT\ *\ zs, int\ flags); -.HP 26 -ZZIP_DIR*\ \fBzzip_dir_creat\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 33 -ZZIP_DIR*\ \fBzzip_dir_creat_ext_io\fR\ (zzip_char_t*\ name, int\ o_mode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 26 -ZZIP_DIR*\ \fBzzip_createdir\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 28 -ZZIP_FILE*\ \fBzzip_file_creat\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); -.HP 21 -int\ \fBzzip_file_mkdir\fR\ (ZZIP_DIR*\ dir, zzip_char_t*\ name, int\ o_mode); -.HP 25 -zzip_ssize_t\ \fBzzip_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); -.HP 30 -zzip_ssize_t\ \fBzzip_file_write\fR\ (ZZIP_FILE*\ file, const\ void*\ ptr, zzip_size_t\ len); -.HP 25 -zzip_size_t\ \fBzzip_fwrite\fR\ (const\ void*\ ptr, zzip_size_t\ len, zzip_size_t\ multiply, ZZIP_FILE*\ file); -.HP 16 -int\ \fBzzip_mkdir\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 23 -ZZIP_FILE*\ \fBzzip_creat\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 18 -void\ \fBzzip_mkfifo\fR\ (zzip_char_t*\ name, int\ o_mode); -.HP 16 -void\ \fBzzip_sync\fR\ (void); -.HP 23 -uint32_t\ \fB__zzip_get32\fR\ (unsigned\ char\ *\ s); -.HP 23 -uint16_t\ \fB__zzip_get16\fR\ (unsigned\ char\ *\ s); -.HP 30 -int\ \fB__zzip_find_disk_trailer\fR\ (int\ fd, zzip_off_t\ filesize, struct\ zzip_disk_trailer\ *\ trailer, zzip_plugin_io_t\ io); -.HP 33 -int\ \fB__zzip_parse_root_directory\fR\ (int\ fd, struct\ zzip_disk_trailer\ *\ trailer, struct\ zzip_dir_hdr\ **\ hdr_return, zzip_plugin_io_t\ io); -.HP 33 -ZZIP_DIR*\ \fBzzip_dir_alloc_ext_io\fR\ (zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); -.HP 26 -ZZIP_DIR*\ \fBzzip_dir_alloc\fR\ (zzip_strings_t*\ fileext); -.HP 19 -int\ \fBzzip_dir_free\fR\ (ZZIP_DIR\ *\ dir); -.HP 20 -int\ \fBzzip_dir_close\fR\ (ZZIP_DIR\ *\ dir); -.HP 29 -ZZIP_DIR\ *\ \fBzzip_dir_fdopen\fR\ (int\ fd, zzip_error_t\ *\ errcode_p); -.HP 36 -ZZIP_DIR\ *\ \fBzzip_dir_fdopen_ext_io\fR\ (int\ fd, zzip_error_t\ *\ errcode_p, zzip_strings_t*\ ext, const\ zzip_plugin_io_t\ io); -.HP 21 -int\ \fB__zzip_try_open\fR\ (zzip_char_t*\ filename, int\ filemode, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 25 -ZZIP_DIR*\ \fBzzip_dir_open\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e); -.HP 32 -ZZIP_DIR*\ \fBzzip_dir_open_ext_io\fR\ (zzip_char_t*\ filename, zzip_error_t*\ e, zzip_strings_t*\ ext, zzip_plugin_io_t\ io); -.HP 19 -int\ \fBzzip_dir_read\fR\ (ZZIP_DIR\ *\ dir, ZZIP_DIRENT\ *\ d); -.ad -.hy - -.SH "DESCRIPTION" - - : zziplib provides read access to zipped files in a zip-archive, - : using compression based solely on free algorithms provided by zlib. - - - -.SH "AUTHOR" - -.TP 3 -\(bu -Guido Draheim -.LP - -.SH "COPYRIGHT" - -.IP -.nf - -(c) 1999,2000,2001,2002,2003 Guido Draheim - All rights reserved, - use under the restrictions of the - Lesser GNU General Public License - or alternatively the restrictions - of the Mozilla Public License 1.1 - -.fi - +write(2), zlib(3), zzip_file_creat diff --git a/docs/zziplib.html b/docs/zziplib.html index 2942c44..9972765 100644 --- a/docs/zziplib.html +++ b/docs/zziplib.html @@ -11,7 +11,7 @@ ZZIPlib -
0.13.23 +
0.13.24
@@ -75,7 +75,7 @@

-generated 2003-08-18 +generated 2003-12-12
(C) Guido Draheim
guidod@gmx.de diff --git a/zzip/write.c b/zzip/write.c index 80905fc..36637dd 100644 --- a/zzip/write.c +++ b/zzip/write.c @@ -207,7 +207,7 @@ zzip_createdir(zzip_char_t* name, int o_mode) return zzip_dir_creat (name, o_mode); } -/** => zzip_file_creat => mkdir(2), zzip_dir_creat +/** => zzip_file_creat => mkdir(2), creat(2), zzip_dir_creat * * This function has an additional primary argument over the posix * mkdir(2) - if it is null then this function behaves just like @@ -255,7 +255,7 @@ zzip_file_mkdir(ZZIP_DIR* dir, zzip_char_t* name, int o_mode) } } -/** start next file entry in a zip archive => creat(2) +/** start next file entry in a zip archive * * This function will create a new file within a zzip archive, the * one given as the primary argument and additionally to the posix @@ -367,8 +367,8 @@ zzip_fwrite(const void* ptr, zzip_size_t len, zzip_size_t multiply, zzip_file_mkdir(zzip_savefile,name,mode) * */ -int -zzip_mkdir(zzip_char_t* name, int o_mode) inline +int inline +zzip_mkdir(zzip_char_t* name, int o_mode) { return zzip_file_creat(zzip_savefile, name, mode); } @@ -390,8 +390,8 @@ zzip_mkdir(zzip_char_t* name, int o_mode) inline #define zzip_creat(name,mode) \ - zzip_file_creat(zzip_savefile,name,mode) */ -ZZIP_FILE* -zzip_creat(zzip_char_t* name, int o_mode) inline +ZZIP_FILE* inline +zzip_creat(zzip_char_t* name, int o_mode) { return zzip_file_creat(zzip_savefile, name, mode); } @@ -422,8 +422,8 @@ zzip_creat(zzip_char_t* name, int o_mode) inline * => zzip_creat and => zzip_mkdir to run as => creat(2) / => mkdir(2) * on the real filesystem. */ -void -zzip_mkfifo(zzip_char_t* name, int o_mode) inline +void inline +zzip_mkfifo(zzip_char_t* name, int o_mode) { if (zzip_savefile) zzip_closedir (zzip_savefile); zzip_savefile = zzip_createdir(name, o_mode); @@ -447,8 +447,8 @@ zzip_mkfifo(zzip_char_t* name, int o_mode) inline { zzip_closedir(zzip_savefile); zzip_savefile = 0; } * */ -void -zzip_sync(void) inline +void inline +zzip_sync(void) { zzip_closedir (zzip_savefile); zzip_savefile = 0; } -- 2.40.0