+
+/* forward typedefs ***********************************************************/
+
+typedef struct classbuffer classbuffer;
+typedef struct classpath_info classpath_info;
+
+
+#include "config.h"
+#include "types.h"
+#include "vm/class.h"
+#include "vm/descriptor.h"
+#include "vm/global.h"
+#include "vm/method.h"
+#include "vm/utf8.h"
+
+#if defined(USE_ZLIB)
+# include "vm/unzip.h"
+#endif
+
+
+/* signed suck defines ********************************************************/
+
+#define suck_s8(a) (s8) suck_u8((a))
+#define suck_s2(a) (s2) suck_u2((a))
+#define suck_s4(a) (s4) suck_u4((a))
+#define suck_s1(a) (s1) suck_u1((a))
+
+
+/* constant pool entries *******************************************************
+
+ All constant pool entries need a data structure which contain the entrys
+ value. In some cases this structure exist already, in the remaining cases
+ this structure must be generated:
+
+ kind structure generated?
+ ----------------------------------------------------------------------
+ CONSTANT_Class classinfo no XXX this will change
+ CONSTANT_Fieldref constant_FMIref yes
+ CONSTANT_Methodref constant_FMIref yes
+ CONSTANT_InterfaceMethodref constant_FMIref yes
+ CONSTANT_String unicode no
+ CONSTANT_Integer constant_integer yes
+ CONSTANT_Float constant_float yes
+ CONSTANT_Long constant_long yes
+ CONSTANT_Double constant_double yes
+ CONSTANT_NameAndType constant_nameandtype yes
+ CONSTANT_Utf8 unicode no
+ CONSTANT_UNUSED -
+
+*******************************************************************************/
+
+typedef struct { /* Fieldref, Methodref and InterfaceMethodref */
+ classinfo *class; /* class containing this field/method/intfmeth. */ /* XXX remove */
+ constant_classref *classref; /* class containing this field/meth./intfm. */
+ utf *name; /* field/method/interfacemethod name */
+ utf *descriptor; /* field/method/intfmeth. type descriptor string */
+ parseddesc parseddesc; /* parsed descriptor */
+} constant_FMIref;
+
+
+typedef struct { /* Integer */
+ s4 value;
+} constant_integer;
+
+
+typedef struct { /* Float */
+ float value;
+} constant_float;
+
+
+typedef struct { /* Long */
+ s8 value;
+} constant_long;
+
+
+typedef struct { /* Double */
+ double value;
+} constant_double;
+
+
+typedef struct { /* NameAndType (Field or Method) */
+ utf *name; /* field/method name */
+ utf *descriptor; /* field/method type descriptor string */
+} constant_nameandtype;
+
+
+/* classbuffer ****************************************************************/
+
+struct classbuffer {
+ classinfo *class; /* pointer to classinfo structure */
+ u1 *data; /* pointer to byte code */
+ s4 size; /* size of the byte code */
+ u1 *pos; /* current read position */
+};
+
+
+/* classpath_info *************************************************************/
+
+#define CLASSPATH_PATH 0
+#define CLASSPATH_ARCHIVE 1
+
+struct classpath_info {
+#if defined(USE_THREADS)
+ /* Required for monitor locking on zip/jar files. */
+ java_objectheader header;
+#endif
+ s4 type;
+ char *path;
+ s4 pathlen;
+#if defined(USE_ZLIB)
+ unzFile uf;