1 /* Definitions for using a zipped' archive.
2 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
3 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Java and all Java-based marks are trademarks or registered trademarks
23 of Sun Microsystems, Inc. in the United States and other countries.
24 The Free Software Foundation is independent of Sun Microsystems, Inc. */
32 char *central_directory
;
34 /* Chain together in SeenZipFiles. */
38 typedef struct ZipFile ZipFile
;
43 int compression_method
;
44 unsigned size
; /* length of file */
45 unsigned uncompressed_size
; /* length of uncompressed data */
46 unsigned filestart
; /* start of file in archive */
49 /* char mid_padding[...]; */
50 /* char filename[filename_length]; */
51 /* char end_padding[...]; */
54 typedef struct ZipDirectory ZipDirectory
;
56 extern struct ZipFile
*SeenZipFiles
;
58 #define ZIPDIR_FILENAME(ZIPD) ((char*)(ZIPD)+(ZIPD)->filename_offset)
59 #define ZIPDIR_NEXT(ZIPD) \
60 ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
61 #define ZIPMAGIC 0x504b0304
63 extern ZipFile
* opendir_in_zip (const char *, int);
64 extern int read_zip_archive (ZipFile
*);
66 extern int read_zip_member (JCF
*, ZipDirectory
*, ZipFile
*);
67 extern int open_in_zip (struct JCF
*, const char *, const char *, int);