source: trunk/src/gcc/fastjar/jartool.h@ 2

Last change on this file since 2 was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/* $Id: jartool.h,v 1.1 2000/12/09 03:08:23 apbianco Exp $
2
3 $Log: jartool.h,v $
4 Revision 1.1 2000/12/09 03:08:23 apbianco
5 2000-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6
7 * fastjar: Imported.
8
9 Revision 1.4 2000/08/24 15:23:35 cory
10 Set version number since I think we can let this one out.
11
12 Revision 1.3 2000/08/23 19:42:17 cory
13 Added support for more Unix platforms. The following code has been hacked
14 to work on AIX, Solaris, True 64, and HP-UX.
15 Added bigendian check. Probably works on most big and little endian platforms
16 now.
17
18 Revision 1.2 1999/12/06 03:47:20 toast
19 fixing version string
20
21 Revision 1.1.1.1 1999/12/06 03:08:24 toast
22 initial checkin..
23
24
25
26 Revision 1.6 1999/05/10 09:16:08 burnsbr
27 *** empty log message ***
28
29 Revision 1.5 1999/04/27 10:04:20 burnsbr
30 configure support
31
32 Revision 1.4 1999/04/26 02:36:15 burnsbr
33 changed RDSZ to 4096 from 512
34
35 Revision 1.3 1999/04/23 12:00:29 burnsbr
36 modified zipentry struct
37
38
39*/
40
41/*
42 jartool.h - generic defines, struct defs etc.
43 Copyright (C) 1999 Bryan Burns
44
45 This program is free software; you can redistribute it and/or
46 modify it under the terms of the GNU General Public License
47 as published by the Free Software Foundation; either version 2
48 of the License, or (at your option) any later version.
49
50 This program is distributed in the hope that it will be useful,
51 but WITHOUT ANY WARRANTY; without even the implied warranty of
52 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 GNU General Public License for more details.
54
55 You should have received a copy of the GNU General Public License
56 along with this program; if not, write to the Free Software
57 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
58 */
59
60#include "config.h"
61
62#define ACTION_NONE 0
63#define ACTION_CREATE 1
64#define ACTION_EXTRACT 2
65#define ACTION_UPDATE 3
66#define ACTION_LIST 4
67
68#define TRUE 1
69#define FALSE 0
70
71/* Amount of bytes to read at a time. You can change this to optimize for
72 your system */
73#define RDSZ 4096
74
75/* Change these to match your system:
76 ub1 == unsigned 1 byte word
77 ub2 == unsigned 2 byte word
78 ub4 == unsigned 4 byte word
79*/
80#if SIZEOF_CHAR == 1
81typedef unsigned char ub1;
82#else
83typedef u_int8_t ub1;
84#endif
85
86#if SIZEOF_SHORT == 2
87typedef unsigned short ub2;
88#elif SIZEOF_INT == 2
89typedef unsigned int ub2;
90#else
91typedef u_int16_t ub2;
92#endif
93
94#if SIZEOF_INT == 4
95typedef unsigned int ub4;
96#elif SIZEOF_LONG == 4
97typedef unsigned long ub4;
98#elif SIZEOF_LONG_LONG == 4
99typedef unsigned long long ub4;
100#else
101typedef u_int32_t ub4;
102#endif
103
104struct zipentry {
105 ub2 mod_time;
106 ub2 mod_date;
107 ub4 crc;
108 ub4 csize;
109 ub4 usize;
110 ub4 offset;
111 ub1 compressed;
112 char *filename;
113
114 struct zipentry *next_entry;
115};
116
117typedef struct zipentry zipentry;
Note: See TracBrowser for help on using the repository browser.