1 /* src/vm/zip.cpp - ZIP file handling for bootstrap classloader
3 Copyright (C) 1996-2005, 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
32 #include "toolbox/hashtable.h"
34 #include "vm/class.hpp"
35 #include "vm/global.h"
36 #include "vm/loader.hpp"
37 #include "vm/suck.hpp"
41 /* Local file header ***********************************************************
43 local file header signature 4 bytes (0x04034b50)
44 version needed to extract 2 bytes
45 general purpose bit flag 2 bytes
46 compression method 2 bytes
47 last mod file time 2 bytes
48 last mod file date 2 bytes
50 compressed size 4 bytes
51 uncompressed size 4 bytes
52 file name length 2 bytes
53 extra field length 2 bytes
55 file name (variable size)
56 extra field (variable size)
58 *******************************************************************************/
60 #define LFH_HEADER_SIZE 30
62 #define LFH_SIGNATURE 0x04034b50
63 #define LFH_FILE_NAME_LENGTH 26
64 #define LFH_EXTRA_FIELD_LENGTH 28
66 typedef struct lfh lfh;
76 /* hashtable_zipfile_entry ****************************************************/
78 typedef struct hashtable_zipfile_entry hashtable_zipfile_entry;
80 struct hashtable_zipfile_entry {
86 hashtable_zipfile_entry *hashlink;
90 /* function prototypes ********************************************************/
96 hashtable *zip_open(char *path);
97 hashtable_zipfile_entry *zip_find(list_classpath_entry *lce, utf *u);
98 classbuffer *zip_get(list_classpath_entry *lce, classinfo *c);
104 #endif /* _ZIP_HPP */
108 * These are local overrides for various environment variables in Emacs.
109 * Please do not remove this and leave it at the end of the file, where
110 * Emacs will automagically detect them.
111 * ---------------------------------------------------------------------
114 * indent-tabs-mode: t