* gcc.dg/20050330-2.c: New test.
[official-gcc.git] / fastjar / jartool.h
blobdf166517d254e32f8aea98627225b54784fdab95
1 /* $Id: jartool.h,v 1.4 2000/08/24 15:23:35 cory Exp $
3 $Log: jartool.h,v $
4 Revision 1.4 2000/08/24 15:23:35 cory
5 Set version number since I think we can let this one out.
7 Revision 1.3 2000/08/23 19:42:17 cory
8 Added support for more Unix platforms. The following code has been hacked
9 to work on AIX, Solaris, True 64, and HP-UX.
10 Added bigendian check. Probably works on most big and little endian platforms
11 now.
13 Revision 1.2 1999/12/06 03:47:20 toast
14 fixing version string
16 Revision 1.1.1.1 1999/12/06 03:08:24 toast
17 initial checkin..
21 Revision 1.6 1999/05/10 09:16:08 burnsbr
22 *** empty log message ***
24 Revision 1.5 1999/04/27 10:04:20 burnsbr
25 configure support
27 Revision 1.4 1999/04/26 02:36:15 burnsbr
28 changed RDSZ to 4096 from 512
30 Revision 1.3 1999/04/23 12:00:29 burnsbr
31 modified zipentry struct
37 jartool.h - generic defines, struct defs etc.
38 Copyright (C) 1999, 2005 Bryan Burns
40 This program is free software; you can redistribute it and/or
41 modify it under the terms of the GNU General Public License
42 as published by the Free Software Foundation; either version 2
43 of the License, or (at your option) any later version.
45 This program is distributed in the hope that it will be useful,
46 but WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 GNU General Public License for more details.
50 You should have received a copy of the GNU General Public License
51 along with this program; if not, write to the Free Software
52 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
55 #ifndef __FASTJAR_JARTOOL_H__
56 #define __FASTJAR_JARTOOL_H__
58 #include <sys/types.h>
59 #include "config.h"
61 #define ACTION_NONE 0
62 #define ACTION_CREATE 1
63 #define ACTION_EXTRACT 2
64 #define ACTION_UPDATE 3
65 #define ACTION_LIST 4
67 #define TRUE 1
68 #define FALSE 0
70 /* Amount of bytes to read at a time. You can change this to optimize for
71 your system */
72 #define RDSZ 4096
74 /* Change these to match your system:
75 ub1 == unsigned 1 byte word
76 ub2 == unsigned 2 byte word
77 ub4 == unsigned 4 byte word
79 #if SIZEOF_CHAR == 1
80 typedef unsigned char ub1;
81 #else
82 typedef u_int8_t ub1;
83 #endif
85 #if SIZEOF_SHORT == 2
86 typedef unsigned short ub2;
87 #elif SIZEOF_INT == 2
88 typedef unsigned int ub2;
89 #else
90 typedef u_int16_t ub2;
91 #endif
93 #if SIZEOF_INT == 4
94 typedef unsigned int ub4;
95 #elif SIZEOF_LONG == 4
96 typedef unsigned long ub4;
97 #elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 4
98 typedef unsigned long long ub4;
99 #else
100 typedef u_int32_t ub4;
101 #endif
103 struct zipentry {
104 ub2 mod_time;
105 ub2 mod_date;
106 ub4 crc;
107 ub4 csize;
108 ub4 usize;
109 ub4 offset;
110 ub1 compressed;
111 ub2 flags;
112 char *filename;
114 struct zipentry *next_entry;
117 typedef struct zipentry zipentry;
119 #ifndef __GNUC__
120 #define __attribute__()
121 #endif
123 #endif /* __FASTJAR_JARTOOL_H__ */