diff options
author | Anthony Green <green@redhat.com> | 2000-09-06 02:13:28 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2000-09-06 02:13:28 +0000 |
commit | 3ca8c9aea002945be6cc6164d3eee6e55acc1b67 (patch) | |
tree | f11498ff99199cfd9ecb821a470faf66c9a566dd /gcc/java/zextract.c | |
parent | 2a7ffc85e5eb9506241ee725324156bc3da9cf69 (diff) | |
download | gcc-3ca8c9aea002945be6cc6164d3eee6e55acc1b67.tar.gz |
jcf-io.c: Include zlib.h.
2000-09-02 Anthony Green <green@redhat.com>
* jcf-io.c: Include zlib.h.
(open_in_zip): Read compressed class file archives.
* zipfile.h (ZipDirectory): Add uncompressed_size and
compression_method fields.
* zextract.c (read_zip_archive): Collect file compression info.
From-SVN: r36175
Diffstat (limited to 'gcc/java/zextract.c')
-rw-r--r-- | gcc/java/zextract.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/zextract.c b/gcc/java/zextract.c index b7ced1562a1..f381f92c57f 100644 --- a/gcc/java/zextract.c +++ b/gcc/java/zextract.c @@ -318,6 +318,8 @@ read_zip_archive (zipf) for (i = 0; i < zipf->count; i++) { ZipDirectory *zipd = (ZipDirectory*)(dir_ptr + dir_last_pad); + int compression_method = (int) dir_ptr[4+C_COMPRESSION_METHOD]; + long size = makelong (&dir_ptr[4+C_COMPRESSED_SIZE]); long uncompressed_size = makelong (&dir_ptr[4+C_UNCOMPRESSED_SIZE]); long filename_length = makeword (&dir_ptr[4+C_FILENAME_LENGTH]); long extra_field_length = makeword (&dir_ptr[4+C_EXTRA_FIELD_LENGTH]); @@ -326,7 +328,9 @@ read_zip_archive (zipf) return -1; zipd->filename_length = filename_length; - zipd->size = uncompressed_size; + zipd->compression_method = compression_method; + zipd->size = size; + zipd->uncompressed_size = uncompressed_size; #ifdef __GNUC__ #define DIR_ALIGN __alignof__(ZipDirectory) #else |