| 1 | // natInflater.cc - Implementation of Inflater native methods.
|
|---|
| 2 |
|
|---|
| 3 | /* Copyright (C) 1999 Free Software Foundation
|
|---|
| 4 |
|
|---|
| 5 | This file is part of libgcj.
|
|---|
| 6 |
|
|---|
| 7 | This software is copyrighted work licensed under the terms of the
|
|---|
| 8 | Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|---|
| 9 | details. */
|
|---|
| 10 |
|
|---|
| 11 | // Written by Tom Tromey <[email protected]>
|
|---|
| 12 |
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 |
|
|---|
| 15 | #include <zlib.h>
|
|---|
| 16 | #include <stdlib.h>
|
|---|
| 17 |
|
|---|
| 18 | #include <gcj/cni.h>
|
|---|
| 19 | #include <jvm.h>
|
|---|
| 20 |
|
|---|
| 21 | #include <java/util/zip/Inflater.h>
|
|---|
| 22 | #include <java/util/zip/DataFormatException.h>
|
|---|
| 23 |
|
|---|
| 24 | #include <java/lang/InternalError.h>
|
|---|
| 25 | #include <java/lang/NullPointerException.h>
|
|---|
| 26 | #include <java/lang/ArrayIndexOutOfBoundsException.h>
|
|---|
| 27 | #include <java/lang/OutOfMemoryError.h>
|
|---|
| 28 |
|
|---|
| 29 | |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 | // A couple of helper functions used to interface with zlib's
|
|---|
| 33 | // allocation.
|
|---|
| 34 |
|
|---|
| 35 | void *
|
|---|
| 36 | _Jv_ZMalloc (void *, uInt nitems, uInt size)
|
|---|
| 37 | {
|
|---|
| 38 | return _Jv_Malloc (nitems * size);
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | void
|
|---|
| 42 | _Jv_ZFree (void *, void *addr)
|
|---|
|
|---|