-#include <stdlib.h>
-#include <stdio.h>
+// Copyright 2002 Adam Megacz, see the COPYING file for licensing [LGPL]
+
+// Inclusions /////////////////////////////////////////////////////////
+
#include <gcj/cni.h>
#include <gcj/array.h>
-#include "jpeglib.h"
+extern "C" {
+#include <stdlib.h>
+#include <stdio.h>
#include <setjmp.h>
-
-#include <java/lang/RuntimeException.h>
+#include "jpeglib.h"
+}
+#include <org/xwt/plat/GCJ.h>
#include <java/io/InputStream.h>
+#include <java/io/ByteArrayInputStream.h>
+#include <java/lang/RuntimeException.h>
#include <org/xwt/plat/GCJ.h>
#include <org/xwt/plat/GCJ$JPEG.h>
+
+
+// JPEG ////////////////////////////////////////////////////////////////
+
#define INPUT_BUF_SIZE (1024 * 16)
typedef struct {
jpeg_destroy_decompress(&cinfo);
}
-