X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FGCJ.cc;h=030dfbe13ebc71887a8e5f65a4cf84d4b112fc21;hb=2ecea0c2856332ce907f16b4e2a233ff1428e4d6;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..030dfbe 100644 --- a/src/org/xwt/plat/GCJ.cc +++ b/src/org/xwt/plat/GCJ.cc @@ -1,15 +1,39 @@ -#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 + + +// 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 +121,3 @@ void org::xwt::plat::GCJ$JPEG::nativeDecompress() { jpeg_destroy_decompress(&cinfo); } -