X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FGCJ.cc;h=9efbe82fccc33048a5490c13a6627e5c16812990;hb=b32cea3f3e272ab00899d134d75a8bd7bcf6c8c0;hp=b35c94ff442110c435c650f7d7cf94dac5116436;hpb=4f7f0b92b26b48cd88f534c5ca29b5bce98929b2;p=org.ibex.core.git diff --git a/src/org/xwt/plat/GCJ.cc b/src/org/xwt/plat/GCJ.cc index b35c94f..9efbe82 100644 --- a/src/org/xwt/plat/GCJ.cc +++ b/src/org/xwt/plat/GCJ.cc @@ -1,15 +1,40 @@ -#include -#include +// Copyright 2002 Adam Megacz, see the COPYING file for licensing [LGPL] + +// Inclusions ///////////////////////////////////////////////////////// + #include #include -#include "jpeglib.h" +extern "C" { +#include +#include #include - -#include +#include "jpeglib.h" +} +#include +#include #include +#include +#include #include #include + + +// builtin.xwar ///////////////////////////////////////////////////////// + +extern unsigned char builtin_xwar[]; +extern int builtin_xwar_length; + +java::io::InputStream* org::xwt::plat::GCJ::_getBuiltinInputStream() { + jbyteArray ret = JvNewByteArray(builtin_xwar_length); + memcpy(elements(ret), builtin_xwar, builtin_xwar_length); + return new java::io::ByteArrayInputStream(ret); +} + + + +// JPEG //////////////////////////////////////////////////////////////// + #define INPUT_BUF_SIZE (1024 * 16) typedef struct { @@ -97,4 +122,3 @@ void org::xwt::plat::GCJ$JPEG::nativeDecompress() { jpeg_destroy_decompress(&cinfo); } -