PageRenderTime 12ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/zziplib/zzip/file.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 81 lines | 43 code | 9 blank | 29 comment | 0 complexity | a01db52641a255775063ff90d08cae91 MD5 | raw file
 1/*
 2 * this is an internal header file - the structure contains two off_t
 3 * atleast making it LARGEFILE_SENSITIVE on linux2 and solaris systems
 4 * whereas about all functions just return a ZZIP_FILE* in zzip/zzip.h
 5 *
 6 * and so, this structure should be handled version-specific and
 7 * subject to change - it had been kept binary-compatible for quite
 8 * a while now so perhaps some program sources have errnously taken
 9 * advantage of this file.
10 *
11 * Author: 
12 *      Guido Draheim <guidod@gmx.de>
13 *      Tomi Ollila <Tomi.Ollila@tfi.net>
14 *
15 *      Copyright (c) 1999,2000,2001,2002 Guido Draheim
16 *          All rights reserved,
17 *          use under the restrictions of the
18 *          Lesser GNU General Public License
19 *          or alternatively the restrictions 
20 *          of the Mozilla Public License 1.1
21 */
22
23#ifndef _ZZIP_FILE_H /* zzip-file.h */
24#define _ZZIP_FILE_H 1
25
26#ifndef ZZIP_32K
27#ifdef __GNUC__
28/* include zzip/lib.h beforehand in order to suppress the following warning */
29#warning zzip/file.h is an internal header, do not use it freely
30#endif
31#endif
32
33#include <zzip/lib.h>
34#include <zlib.h>
35
36#ifdef ZZIP_HAVE_UNISTD_H
37#include <unistd.h>
38#else
39#include <stdio.h>
40# ifdef ZZIP_HAVE_SYS_TYPES_H
41# include <sys/types.h>
42# endif
43#endif
44
45#ifdef ZZIP_HAVE_SYS_PARAM_H
46#include <sys/param.h> /* PATH_MAX */
47#endif
48
49#ifndef PATH_MAX
50# ifdef  MAX_PATH /* windows */
51# define PATH_MAX MAX_PATH
52# else
53# define PATH_MAX 512
54# endif
55#endif
56/*
57 * ZZIP_FILE structure... currently no need to unionize, since structure needed
58 * for inflate is superset of structure needed for unstore.
59 *
60 * Don't make this public. Instead, create methods for needed operations.
61 */
62
63struct zzip_file
64{
65    struct zzip_dir* dir; 
66    int fd;
67    int method;
68    zzip_size_t restlen;
69    zzip_size_t crestlen;
70    zzip_size_t usize;
71    zzip_size_t csize;
72    /* added dataoffset member - data offset from start of zipfile*/
73    zzip_off_t dataoffset;
74    char* buf32k;
75    zzip_off_t offset; /* offset from the start of zipfile... */
76    z_stream d_stream;
77    zzip_plugin_io_t io;
78};
79
80#endif /* _ZZIP_FILE_H */
81