summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c')
-rw-r--r--Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c88
1 files changed, 45 insertions, 43 deletions
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c
index 144b163d9e8..0c50600ff24 100644
--- a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c
+++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c
@@ -1,16 +1,17 @@
+
/*
- * Author:
+ * Author:
* Guido Draheim <guidod@gmx.de>
*
* Copyright (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
+ * or alternatively the restrictions
* of the Mozilla Public License 1.1
*/
-#include <zzip/lib.h> /* exported... */
+#include <zzip/lib.h> /* exported... */
#include <zzip/file.h>
#include <zzip/format.h>
@@ -21,57 +22,57 @@
#include <stdio.h>
#endif
-/**
- * just returns dir->errcode of the ZZIP_DIR handle
- * see: => zzip_dir_open, => zzip_diropen, => zzip_readdir, => zzip_dir_read
+/**
+ * just returns dir->errcode of the ZZIP_DIR handle
+ * see: => zzip_dir_open, => zzip_dir_open, => zzip_readdir, => zzip_dir_read
*/
-int
-zzip_error(ZZIP_DIR * dir)
-{
- return dir->errcode;
+int
+zzip_error(ZZIP_DIR * dir)
+{
+ return dir->errcode;
}
/** => zzip_error
- * This function just does dir->errcode = errcode
+ * This function just does dir->errcode = errcode
*/
-void
-zzip_seterror(ZZIP_DIR * dir, int errcode)
-{ dir->errcode = errcode; }
+void
+zzip_seterror(ZZIP_DIR * dir, int errcode) { dir->errcode = errcode; }
-/**
- * This function will just return fp->dir
+/**
+ * This function will just return fp->dir
*
* 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.
*/
-ZZIP_DIR *
-zzip_dirhandle(ZZIP_FILE * fp)
-{
- return fp->dir;
+ZZIP_DIR *
+zzip_dirhandle(ZZIP_FILE * fp)
+{
+ return fp->dir;
}
/** => zzip_dirhandle
- * This function will just return dir->fd
+ * This function will just return dir->fd
*
* 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
+ * zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps
* a real directory DIR (if you have dirent on your system).
*/
-int
-zzip_dirfd(ZZIP_DIR* dir)
-{
- return dir->fd;
+int
+zzip_dirfd(ZZIP_DIR * dir)
+{
+ return dir->fd;
}
/**
- * return static const string of the known compression methods,
+ * return static const string of the known compression methods,
* otherwise just "zipped" is returned
*/
-zzip_char_t*
+zzip_char_t *
zzip_compr_str(int compr)
{
- switch(compr)
+ switch (compr)
{
+ /* *INDENT-OFF* */
case ZZIP_IS_STORED: return "stored";
case ZZIP_IS_SHRUNK: return "shrunk";
case ZZIP_IS_REDUCEDx1:
@@ -84,7 +85,7 @@ zzip_compr_str(int compr)
case ZZIP_IS_DEFLATED_BETTER: return "deflatedX";
case ZZIP_IS_IMPLODED_BETTER: return "implodedX";
default:
- if (0 < compr && compr < 256) return "zipped";
+ if (0 < compr && compr < 256) return "zipped";
else
{
# ifdef S_ISDIR
@@ -107,29 +108,30 @@ zzip_compr_str(int compr)
# endif
return "special";
}
- }/*switch*/
+ /* *INDENT-ON* */
+ } /*switch */
}
/** => zzip_file_real
- * This function checks if the ZZIP_DIR-handle is wrapping
- * a real directory or a zip-archive.
+ * This 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.
- */
+ */
int
-zzip_dir_real(ZZIP_DIR* dir)
+zzip_dir_real(ZZIP_DIR * dir)
{
return dir->realdir != 0;
}
/**
- * This function checks if the ZZIP_FILE-handle is wrapping
- * a real file or a zip-contained file.
+ * This 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.
*/
int
-zzip_file_real(ZZIP_FILE* fp)
+zzip_file_real(ZZIP_FILE * fp)
{
- return fp->dir == 0; /* ie. not dependent on a zip-arch-dir */
+ return fp->dir == 0; /* ie. not dependent on a zip-arch-dir */
}
/** => zzip_file_real
@@ -137,8 +139,8 @@ zzip_file_real(ZZIP_FILE* fp)
* Check before with => zzip_dir_real if the
* the ZZIP_DIR points to a real directory.
*/
-void*
-zzip_realdir(ZZIP_DIR* dir)
+void *
+zzip_realdir(ZZIP_DIR * dir)
{
return dir->realdir;
}
@@ -149,12 +151,12 @@ zzip_realdir(ZZIP_DIR* dir)
* the ZZIP_FILE points to a real file.
*/
int
-zzip_realfd(ZZIP_FILE* fp)
+zzip_realfd(ZZIP_FILE * fp)
{
return fp->fd;
}
-/*
+/*
* Local variables:
* c-file-style: "stroustrup"
* End: