]> gcc.gnu.org Git - gcc.git/blame - gcc/java/zipfile.h
buffer.h: PROTO -> PARAMS.
[gcc.git] / gcc / java / zipfile.h
CommitLineData
e04a16fb
AG
1/* Definitions for using a zipped' archive.
2
df32d2ce 3 Copyright (C) 1996, 97-99, 2000 Free Software Foundation, Inc.
e04a16fb
AG
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 2, or (at your option)
8any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GNU CC; see the file COPYING. If not, write to
17the Free Software Foundation, 59 Temple Place - Suite 330,
18Boston, MA 02111-1307, USA.
19
20Java and all Java-based marks are trademarks or registered trademarks
21of Sun Microsystems, Inc. in the United States and other countries.
22The Free Software Foundation is independent of Sun Microsystems, Inc. */
23
24struct ZipFile {
25 int fd;
26 long size;
27 long count;
28 long dir_size;
29 char *central_directory;
30};
31
32typedef struct ZipFile ZipFile;
33
34struct ZipDirectory {
35 int direntry_size;
36 int filename_offset;
37 long size; /* length of file */
38 long filestart; /* start of file in archive */
39 long filename_length;
40 /* char mid_padding[...]; */
41 /* char filename[filename_length]; */
42 /* char end_padding[...]; */
43};
44
45typedef struct ZipDirectory ZipDirectory;
46
47struct ZipFileCache {
48 struct ZipFile z;
49 struct ZipFileCache *next;
50 char *name;
51};
52
53extern struct ZipFileCache *SeenZipFiles;
54
55#define ZIPDIR_FILENAME(ZIPD) ((char*)(ZIPD)+(ZIPD)->filename_offset)
56#define ZIPDIR_NEXT(ZIPD) \
57 ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
58#define ZIPMAGIC 0x504b0304
e136860a 59
df32d2ce
KG
60extern ZipFile * opendir_in_zip PARAMS ((const char *, int));
61extern int read_zip_archive PARAMS ((ZipFile *));
4bcde32e 62#ifdef JCF_ZIP
df32d2ce 63extern int open_in_zip PARAMS ((struct JCF *, const char *,
4bcde32e
KG
64 const char *, int));
65#endif
This page took 0.346421 seconds and 5 git commands to generate.