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

Contents of /navit/navit/zipfile.h

Parent Directory Parent Directory | Revision Log Revision Log


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

   
Visit the ZANavi Wiki