OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [fastjar/] [zipfile.h] - Blame information for rev 22

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* $Id: zipfile.h,v 1.1.1.1 2007/08/18 13:57:12 jeunes2 Exp $
2
 
3
   $Log: zipfile.h,v $
4
   Revision 1.1.1.1  2007/08/18 13:57:12  jeunes2
5
   Initial Revision.
6
 
7
   Revision 1.1.1.1  1999/12/06 03:09:11  toast
8
   initial checkin..
9
 
10
 
11
 
12
   Revision 1.6  1999/05/10 08:33:08  burnsbr
13
   added UNPACK_UB4 and UNPACK_UB2
14
 
15
   Revision 1.5  1999/04/26 02:36:34  burnsbr
16
   added LOC_EXTRA macro
17
 
18
   Revision 1.4  1999/04/23 12:01:19  burnsbr
19
   added more defines
20
 
21
 
22
*/
23
 
24
/*
25
  zipfile.h - defines for indexing zipfile headers
26
  Copyright (C) 1999  Bryan Burns
27
 
28
  This program is free software; you can redistribute it and/or
29
  modify it under the terms of the GNU General Public License
30
  as published by the Free Software Foundation; either version 2
31
  of the License, or (at your option) any later version.
32
 
33
  This program is distributed in the hope that it will be useful,
34
  but WITHOUT ANY WARRANTY; without even the implied warranty of
35
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36
  GNU General Public License for more details.
37
 
38
  You should have received a copy of the GNU General Public License
39
  along with this program; if not, write to the Free Software
40
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
41
 */
42
 
43
#define LOC_EXTRA   6  /* extra bytes */
44
#define LOC_COMP    8  /* compression method */
45
#define LOC_MODTIME 10 /* last modification time */
46
#define LOC_MODDATE 12 /* last modification date */
47
#define LOC_CRC     14 /* CRC */
48
#define LOC_CSIZE   18 /* compressed size */
49
#define LOC_USIZE   22 /* uncompressed size */
50
#define LOC_FNLEN   26 /* filename length */
51
#define LOC_EFLEN   28 /* extra-field length */
52
 
53
#define CEN_FLAGS    8
54
#define CEN_COMP    10 /* compression method */
55
#define CEN_MODTIME 12
56
#define CEN_MODDATE 14
57
#define CEN_CRC     16
58
#define CEN_CSIZE   20
59
#define CEN_USIZE   24
60
#define CEN_FNLEN   28
61
#define CEN_EFLEN   30
62
#define CEN_COMLEN  32
63
#define CEN_OFFSET  42
64
 
65
 
66
/* macros */
67
#define PACK_UB4(d, o, v) d[o] = (ub1)((v) & 0x000000ff); \
68
                          d[o + 1] = (ub1)(((v) & 0x0000ff00) >> 8); \
69
                          d[o + 2] = (ub1)(((v) & 0x00ff0000) >> 16); \
70
                          d[o + 3] = (ub1)(((v) & 0xff000000) >> 24)
71
 
72
#define PACK_UB2(d, o, v) d[o] = (ub1)((v) & 0x00ff); \
73
                          d[o + 1] = (ub1)(((v) & 0xff00) >> 8)
74
 
75
#define UNPACK_UB4(s, o) (ub4)s[o] + (((ub4)s[o + 1]) << 8) +\
76
                         (((ub4)s[o + 2]) << 16) + (((ub4)s[o + 3]) << 24)
77
 
78
#define UNPACK_UB2(s, o)  (ub2)s[o] + (((ub2)s[o + 1]) << 8)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.