/[zanavi_public1]/navit/navit/zipfile.h
ZANavi

Contents of /navit/navit/zipfile.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (12 years, 5 months ago) by zoff99
File MIME type: text/plain
File size: 4937 byte(s)
import files
1 zoff99 2 /**
2     * Navit, a modular navigation system.
3     * Copyright (C) 2005-2008 Navit Team
4     *
5     * This program is free software; you can redistribute it and/or
6     * modify it under the terms of the GNU Library General Public License
7     * version 2 as published by the Free Software Foundation.
8     *
9     * This program is distributed in the hope that it will be useful,
10     * but WITHOUT ANY WARRANTY; without even the implied warranty of
11     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12     * GNU Library General Public License for more details.
13     *
14     * You should have received a copy of the GNU Library General Public
15     * License along with this program; if not, write to the
16     * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17     * Boston, MA 02110-1301, USA.
18     */
19    
20     #ifndef __ZIPFILE_H__
21     #ifdef HAVE_API_WIN32_CE
22     /* cegcc doesn't honor the __attribute__(packed) need pragma to work */
23     #pragma pack(push)
24     #pragma pack(1)
25     #endif
26    
27     #define zip_split_sig 0x08074b50
28    
29     struct zip_split {
30     int zipsplitsig;
31     };
32    
33     #define zip_lfh_sig 0x04034b50
34    
35     #ifdef _MSC_VER
36     #pragma pack(push,1)
37     #endif /* _MSC_VER */
38     struct zip_lfh {
39     int ziplocsig;
40     short zipver; // 4
41     short zipgenfld; // 6
42     short zipmthd; // 8
43     short ziptime; // 10
44     short zipdate; // 12
45     int zipcrc; // 14
46     unsigned int zipsize; // 18
47     unsigned int zipuncmp; // 22
48     unsigned short zipfnln; // 26
49     unsigned short zipxtraln; // 30
50     char zipname[0]; // 34
51     #ifndef _MSC_VER
52     }__attribute__ ((packed));
53     #else /* _MSC_VER */
54     };
55     #pragma pack(pop)
56     #endif /* _MSC_VER */
57    
58     #define zip_cd_sig 0x02014b50
59    
60     #ifdef _MSC_VER
61     #pragma pack(push,1)
62     #endif /* _MSC_VER */
63     struct zip_cd {
64     int zipcensig;
65     char zipcver;
66     char zipcos;
67     char zipcvxt;
68     char zipcexos;
69     short zipcflg;
70     short zipcmthd;
71     short ziptim;
72     short zipdat;
73     int zipccrc;
74     unsigned int zipcsiz;
75     unsigned int zipcunc;
76     unsigned short zipcfnl;
77     unsigned short zipcxtl;
78     unsigned short zipccml;
79     unsigned short zipdsk;
80     unsigned short zipint;
81     unsigned int zipext;
82     unsigned int zipofst;
83     char zipcfn[0];
84     #ifndef _MSC_VER
85     }__attribute__ ((packed));
86     #else /* _MSC_VER */
87     };
88     #pragma pack(pop)
89     #endif /* _MSC_VER */
90    
91    
92     #ifdef _MSC_VER
93     #pragma pack(push,1)
94     #endif /* _MSC_VER */
95     struct zip_cd_ext {
96     short tag;
97     short size;
98     unsigned long long zipofst;
99     #ifndef _MSC_VER
100     }__attribute__ ((packed));
101     #else /* _MSC_VER */
102     };
103     #pragma pack(pop)
104     #endif /* _MSC_VER */
105    
106     #ifdef _MSC_VER
107     #pragma pack(push,1)
108     #endif /* _MSC_VER */
109     struct zip_enc {
110     short efield_header;
111     short efield_size;
112     short version;
113     char vendor_id1,vendor_id2;
114     char encryption_strength;
115     short compress_method;
116     #ifndef _MSC_VER
117     }__attribute__ ((packed));
118     #else /* _MSC_VER */
119     };
120     #pragma pack(pop)
121     #endif /* _MSC_VER */
122    
123     #define zip_eoc_sig 0x6054b50
124    
125     #ifdef _MSC_VER
126     #pragma pack(push,1)
127     #endif /* _MSC_VER */
128     struct zip_eoc {
129     int zipesig; /* end of central dir signature */
130     unsigned short zipedsk; /* number of this disk */
131     unsigned short zipecen; /* number of the disk with the start of the central directory */
132     unsigned short zipenum; /* total number of entries in the central directory on this disk */
133     unsigned short zipecenn; /* total number of entries in the central directory */
134     unsigned int zipecsz; /* size of the central directory */
135     unsigned int zipeofst; /* offset of start of central directory with respect to the starting disk number */
136     short zipecoml; /* .ZIP file comment length */
137     char zipecom[0]; /* .ZIP file comment */
138     #ifndef _MSC_VER
139     }__attribute__ ((packed));
140     #else /* _MSC_VER */
141     };
142     #pragma pack(pop)
143     #endif /* _MSC_VER */
144    
145     #define zip64_eoc_sig 0x6064b50
146    
147     #ifdef _MSC_VER
148     #pragma pack(push,1)
149     #endif /* _MSC_VER */
150     struct zip64_eoc {
151     int zip64esig; /* zip64 end of central dir signature */
152     unsigned long long zip64esize; /* size of zip64 end of central directory record */
153     unsigned short zip64ever; /* version made by */
154     unsigned short zip64eneed; /* version needed to extract */
155     unsigned int zip64edsk; /* number of this disk */
156     unsigned int zip64ecen; /* number of the disk with the start of the central directory */
157     unsigned long long zip64enum; /* total number of entries in the central directory on this disk */
158     unsigned long long zip64ecenn; /* total number of entries in the central directory */
159     unsigned long long zip64ecsz; /* size of the central directory */
160     unsigned long long zip64eofst; /* offset of start of central directory with respect to the starting disk number */
161     char zip64ecom[0]; /* zip64 extensible data sector */
162     #ifndef _MSC_VER
163     }__attribute__ ((packed));
164     #else /* _MSC_VER */
165     };
166     #pragma pack(pop)
167     #endif /* _MSC_VER */
168    
169     #define zip64_eocl_sig 0x07064b50
170    
171     #ifdef _MSC_VER
172     #pragma pack(push,1)
173     #endif /* _MSC_VER */
174     struct zip64_eocl {
175     int zip64lsig;
176     int zip64ldsk;
177     long long zip64lofst;
178     int zip74lnum;
179     #ifndef _MSC_VER
180     }__attribute__ ((packed));
181     #else /* _MSC_VER */
182     };
183     #pragma pack(pop)
184     #endif /* _MSC_VER */
185    
186     #define __ZIPFILE_H__
187     #ifdef __CEGCC__
188     #pragma pack(pop)
189     #endif
190    
191     #endif

   
Visit the ZANavi Wiki