* ggc-common.c (ggc_print_statistics): Make arguments to fprintf
[official-gcc.git] / gcc / java / zipfile.h
blob98a698ff8215af3c50d7a34f3d468d0c6c4005cb
1 /* Definitions for using a zipped' archive.
3 Copyright (C) 1996, 97-98, 1999 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNU CC; see the file COPYING. If not, write to
17 the Free Software Foundation, 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
20 Java and all Java-based marks are trademarks or registered trademarks
21 of Sun Microsystems, Inc. in the United States and other countries.
22 The Free Software Foundation is independent of Sun Microsystems, Inc. */
24 struct ZipFile {
25 int fd;
26 long size;
27 long count;
28 long dir_size;
29 char *central_directory;
32 typedef struct ZipFile ZipFile;
34 struct 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[...]; */
45 typedef struct ZipDirectory ZipDirectory;
47 struct ZipFileCache {
48 struct ZipFile z;
49 struct ZipFileCache *next;
50 char *name;
53 extern struct ZipFileCache *SeenZipFiles;
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
60 extern ZipFile * opendir_in_zip PROTO ((const char *, int));
61 extern int read_zip_archive PROTO ((ZipFile *));
62 #ifdef JCF_ZIP
63 extern int open_in_zip PROTO ((struct JCF *, const char *,
64 const char *, int));
65 #endif