OSDN Git Service

* c-lex.c (interpret_float): Give a pedwarn rather than a warning
[pf3gnuchains/gcc-fork.git] / gcc / java / zipfile.h
1 /* Definitions for using a zipped' archive.
2    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
3    Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
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)
10 any later version.
11
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.
16
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.  
21
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.  */
25
26 struct ZipFile {
27   char *name;
28   int fd;
29   long size;
30   long count;
31   long dir_size;
32   char *central_directory;
33
34   /* Chain together in SeenZipFiles. */
35   struct ZipFile *next;
36 };
37
38 typedef struct ZipFile ZipFile;
39
40 struct ZipDirectory {
41   int direntry_size;
42   int filename_offset;
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 */
47   ZipFile *zipf;
48   int filename_length;
49   /* char mid_padding[...]; */
50   /* char filename[filename_length]; */
51   /* char end_padding[...]; */
52 };
53
54 typedef struct ZipDirectory ZipDirectory;
55
56 extern struct ZipFile *SeenZipFiles;
57
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     
62
63 extern ZipFile * opendir_in_zip (const char *, int);
64 extern int read_zip_archive (ZipFile *);
65 #ifdef GCC_JCF_H
66 extern int read_zip_member (JCF*, ZipDirectory*, ZipFile *);
67 extern int open_in_zip (struct JCF *, const char *, const char *, int);
68 #endif