[Vm-dev] [commit][3746] VMMaker 4.15.7 Updates from oscog, Laura' s JPEGReadWriter2 plus a missing fsync primitive

commits at squeakvm.org commits at squeakvm.org
Sat Jul 9 16:14:08 UTC 2016


Revision: 3746
Author:   lewis
Date:     2016-07-09 09:14:07 -0700 (Sat, 09 Jul 2016)
Log Message:
-----------
VMMaker 4.15.7 Updates from oscog, Laura's JPEGReadWriter2 plus a missing fsync primitive

Modified Paths:
--------------
    trunk/src/ckformat.c
    trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
    trunk/src/plugins/AioPlugin/AioPlugin.c
    trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
    trunk/src/plugins/B2DPlugin/B2DPlugin.c
    trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
    trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
    trunk/src/plugins/BitBltPlugin/BitBltPlugin.c
    trunk/src/plugins/CameraPlugin/CameraPlugin.c
    trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
    trunk/src/plugins/CroquetPlugin/CroquetPlugin.c
    trunk/src/plugins/DBusPlugin/DBusPlugin.c
    trunk/src/plugins/DESPlugin/DESPlugin.c
    trunk/src/plugins/DSAPrims/DSAPrims.c
    trunk/src/plugins/DropPlugin/DropPlugin.c
    trunk/src/plugins/FFTPlugin/FFTPlugin.c
    trunk/src/plugins/FT2Plugin/FT2Plugin.c
    trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c
    trunk/src/plugins/FilePlugin/FilePlugin.c
    trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
    trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c
    trunk/src/plugins/GeniePlugin/GeniePlugin.c
    trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c
    trunk/src/plugins/ImmX11Plugin/ImmX11Plugin.c
    trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
    trunk/src/plugins/JPEGReaderPlugin/JPEGReaderPlugin.c
    trunk/src/plugins/JoystickTabletPlugin/JoystickTabletPlugin.c
    trunk/src/plugins/KedamaPlugin2/KedamaPlugin2.c
    trunk/src/plugins/Klatt/Klatt.c
    trunk/src/plugins/LargeIntegers/LargeIntegers.c
    trunk/src/plugins/LocalePlugin/LocalePlugin.c
    trunk/src/plugins/MD5Plugin/MD5Plugin.c
    trunk/src/plugins/MIDIPlugin/MIDIPlugin.c
    trunk/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
    trunk/src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
    trunk/src/plugins/Mpeg3Plugin/Mpeg3Plugin.c
    trunk/src/plugins/RePlugin/RePlugin.c
    trunk/src/plugins/RomePlugin/RomePlugin.c
    trunk/src/plugins/SHA256Plugin/SHA256Plugin.c
    trunk/src/plugins/ScratchPlugin/ScratchPlugin.c
    trunk/src/plugins/SecurityPlugin/SecurityPlugin.c
    trunk/src/plugins/SerialPlugin/SerialPlugin.c
    trunk/src/plugins/SocketPlugin/SocketPlugin.c
    trunk/src/plugins/SoundCodecPrims/SoundCodecPrims.c
    trunk/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
    trunk/src/plugins/SoundPlugin/SoundPlugin.c
    trunk/src/plugins/Squeak3D/Squeak3D.c
    trunk/src/plugins/SqueakFFIPrims/SqueakFFIPrims.c
    trunk/src/plugins/SqueakSSL/SqueakSSL.c
    trunk/src/plugins/StarSqueakPlugin/StarSqueakPlugin.c
    trunk/src/plugins/UUIDPlugin/UUIDPlugin.c
    trunk/src/plugins/UnicodePlugin/UnicodePlugin.c
    trunk/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
    trunk/src/plugins/WeDoPlugin/WeDoPlugin.c
    trunk/src/plugins/XDisplayControlPlugin/XDisplayControlPlugin.c
    trunk/src/plugins/ZipPlugin/ZipPlugin.c
    trunk/src/vm/interp.c
    trunk/src/vm/interp.h
    trunk/src/vm/sqNamedPrims.h

Modified: trunk/src/ckformat.c
===================================================================
--- trunk/src/ckformat.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/ckformat.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -5,7 +5,7 @@
 /* Usage: ckformat imageFileName */
 
 /* --- DO NOT EDIT THIS FILE --- */
-/* --- Automatically generated from class ImageFormat 2016-03-27T21:52:01.822+01:00--- */
+/* --- Automatically generated from class ImageFormat 2016-07-09T12:04:31.596+01:00--- */
 /* --- Source code is in package ImageFormat in the VMMaker repository --- */
 /* --- DO NOT EDIT THIS FILE --- */
 

Modified: trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
===================================================================
--- trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:50 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:19 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	ADPCMCodecPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	ADPCMCodecPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "ADPCMCodecPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -70,9 +70,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"ADPCMCodecPlugin 27 March 2016 (i)"
+	"ADPCMCodecPlugin 9 July 2016 (i)"
 #else
-	"ADPCMCodecPlugin 27 March 2016 (e)"
+	"ADPCMCodecPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/AioPlugin/AioPlugin.c
===================================================================
--- trunk/src/plugins/AioPlugin/AioPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/AioPlugin/AioPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:52:01 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:31 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
 	UnixAioPlugin *  uuid: nil
  */
@@ -86,9 +86,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"AioPlugin 27 March 2016 (i)"
+	"AioPlugin 9 July 2016 (i)"
 #else
-	"AioPlugin 27 March 2016 (e)"
+	"AioPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c
===================================================================
--- trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/AsynchFilePlugin/AsynchFilePlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:50 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:19 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	AsynchFilePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	AsynchFilePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "AsynchFilePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -67,9 +67,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"AsynchFilePlugin 27 March 2016 (i)"
+	"AsynchFilePlugin 9 July 2016 (i)"
 #else
-	"AsynchFilePlugin 27 March 2016 (e)"
+	"AsynchFilePlugin 9 July 2016 (e)"
 #endif
 ;
 static void * sCOAFfn;

Modified: trunk/src/plugins/B2DPlugin/B2DPlugin.c
===================================================================
--- trunk/src/plugins/B2DPlugin/B2DPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/B2DPlugin/B2DPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:52 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:21 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	BalloonEnginePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	BalloonEnginePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "BalloonEnginePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -447,9 +447,9 @@
 static void * loadBBFn;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"B2DPlugin 27 March 2016 (i)"
+	"B2DPlugin 9 July 2016 (i)"
 #else
-	"B2DPlugin 27 March 2016 (e)"
+	"B2DPlugin 9 July 2016 (e)"
 #endif
 ;
 static int* objBuffer;

Modified: trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c
===================================================================
--- trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/B3DAcceleratorPlugin/B3DAcceleratorPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:57 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:26 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	B3DAcceleratorPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	B3DAcceleratorPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "B3DAcceleratorPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -107,9 +107,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"B3DAcceleratorPlugin 27 March 2016 (i)"
+	"B3DAcceleratorPlugin 9 July 2016 (i)"
 #else
-	"B3DAcceleratorPlugin 27 March 2016 (e)"
+	"B3DAcceleratorPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c
===================================================================
--- trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/BMPReadWriterPlugin/BMPReadWriterPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:50 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:19 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	BMPReadWriterPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	BMPReadWriterPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "BMPReadWriterPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -58,9 +58,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"BMPReadWriterPlugin 27 March 2016 (i)"
+	"BMPReadWriterPlugin 9 July 2016 (i)"
 #else
-	"BMPReadWriterPlugin 27 March 2016 (e)"
+	"BMPReadWriterPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/BitBltPlugin/BitBltPlugin.c
===================================================================
--- trunk/src/plugins/BitBltPlugin/BitBltPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/BitBltPlugin/BitBltPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:53 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	BitBltSimulation VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	BitBltSimulation VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "BitBltSimulation VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -256,9 +256,9 @@
 };
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"BitBltPlugin 27 March 2016 (i)"
+	"BitBltPlugin 9 July 2016 (i)"
 #else
-	"BitBltPlugin 27 March 2016 (e)"
+	"BitBltPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt nWords;
@@ -2596,7 +2596,7 @@
 		destPPW = 32 / destDepth;
 		destPitch = ((destWidth + (destPPW - 1)) / destPPW) * 4;
 		destBitsSize = interpreterProxy->byteSizeOf(destBits);
-		if (!((interpreterProxy->isWordsOrBytes(destBits)) && (destBitsSize == (destPitch * destHeight)))) {
+		if (!((interpreterProxy->isWordsOrBytes(destBits)) && (destBitsSize >= (destPitch * destHeight)))) {
 			ok = 0;
 			goto l3;
 		}
@@ -2644,7 +2644,7 @@
 			sourcePPW = 32 / sourceDepth;
 			sourcePitch = ((sourceWidth + (sourcePPW - 1)) / sourcePPW) * 4;
 			sourceBitsSize = interpreterProxy->byteSizeOf(sourceBits);
-			if (!((interpreterProxy->isWordsOrBytes(sourceBits)) && (sourceBitsSize == (sourcePitch * sourceHeight)))) {
+			if (!((interpreterProxy->isWordsOrBytes(sourceBits)) && (sourceBitsSize >= (sourcePitch * sourceHeight)))) {
 				ok = 0;
 				goto l4;
 			}

Modified: trunk/src/plugins/CameraPlugin/CameraPlugin.c
===================================================================
--- trunk/src/plugins/CameraPlugin/CameraPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/CameraPlugin/CameraPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:57 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:26 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	CameraPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	CameraPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "CameraPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "CameraPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -64,9 +64,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"CameraPlugin 27 March 2016 (i)"
+	"CameraPlugin 9 July 2016 (i)"
 #else
-	"CameraPlugin 27 March 2016 (e)"
+	"CameraPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c
===================================================================
--- trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/ClipboardExtendedPlugin/ClipboardExtendedPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:57 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:26 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	ClipboardExtendedPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	ClipboardExtendedPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "ClipboardExtendedPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "ClipboardExtendedPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -61,9 +61,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"ClipboardExtendedPlugin 27 March 2016 (i)"
+	"ClipboardExtendedPlugin 9 July 2016 (i)"
 #else
-	"ClipboardExtendedPlugin 27 March 2016 (e)"
+	"ClipboardExtendedPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/CroquetPlugin/CroquetPlugin.c
===================================================================
--- trunk/src/plugins/CroquetPlugin/CroquetPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/CroquetPlugin/CroquetPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:53 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	CroquetPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	CroquetPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "CroquetPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "CroquetPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -73,9 +73,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"CroquetPlugin 27 March 2016 (i)"
+	"CroquetPlugin 9 July 2016 (i)"
 #else
-	"CroquetPlugin 27 March 2016 (e)"
+	"CroquetPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/DBusPlugin/DBusPlugin.c
===================================================================
--- trunk/src/plugins/DBusPlugin/DBusPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/DBusPlugin/DBusPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:57 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:27 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
 	DBusPlugin DBus-Plugin-dtl.35 uuid: 2ae30f08-4793-4acb-876b-c443a5f5e665
  */
@@ -143,9 +143,9 @@
 static DBusMessageIter messageIter[DBUS_MAXIMUM_TYPE_RECURSION_DEPTH];
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"DBusPlugin 27 March 2016 (i)"
+	"DBusPlugin 9 July 2016 (i)"
 #else
-	"DBusPlugin 27 March 2016 (e)"
+	"DBusPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/DESPlugin/DESPlugin.c
===================================================================
--- trunk/src/plugins/DESPlugin/DESPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/DESPlugin/DESPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:53 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
 	DESPlugin * CryptographyPlugins-rww.10 uuid: 8beefa4e-8411-4385-93ed-1c5d66481465
  */
@@ -69,9 +69,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"DESPlugin 27 March 2016 (i)"
+	"DESPlugin 9 July 2016 (i)"
 #else
-	"DESPlugin 27 March 2016 (e)"
+	"DESPlugin 9 July 2016 (e)"
 #endif
 ;
 static unsigned char pc1[56] = {

Modified: trunk/src/plugins/DSAPrims/DSAPrims.c
===================================================================
--- trunk/src/plugins/DSAPrims/DSAPrims.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/DSAPrims/DSAPrims.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,6 +1,6 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:53 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
 	DSAPlugin * CryptographyPlugins-rww.10 uuid: 8beefa4e-8411-4385-93ed-1c5d66481465
  */
@@ -67,9 +67,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"DSAPrims 27 March 2016 (i)"
+	"DSAPrims 9 July 2016 (i)"
 #else
-	"DSAPrims 27 March 2016 (e)"
+	"DSAPrims 9 July 2016 (e)"
 #endif
 ;
 static sqInt remainderDigitCount;

Modified: trunk/src/plugins/DropPlugin/DropPlugin.c
===================================================================
--- trunk/src/plugins/DropPlugin/DropPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/DropPlugin/DropPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:53 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	DropPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	DropPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "DropPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "DropPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -62,9 +62,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"DropPlugin 27 March 2016 (i)"
+	"DropPlugin 9 July 2016 (i)"
 #else
-	"DropPlugin 27 March 2016 (e)"
+	"DropPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/FFTPlugin/FFTPlugin.c
===================================================================
--- trunk/src/plugins/FFTPlugin/FFTPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FFTPlugin/FFTPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:22 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	FFTPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	FFTPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "FFTPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "FFTPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -68,9 +68,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FFTPlugin 27 March 2016 (i)"
+	"FFTPlugin 9 July 2016 (i)"
 #else
-	"FFTPlugin 27 March 2016 (e)"
+	"FFTPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt nu;

Modified: trunk/src/plugins/FT2Plugin/FT2Plugin.c
===================================================================
--- trunk/src/plugins/FT2Plugin/FT2Plugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FT2Plugin/FT2Plugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,4 +1,4 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:58 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:27 pm */
 /* Automatically generated by
 	FT2PluginCodeGenerator * FreeType-nice.443 uuid: d8120335-a67f-4a64-94ea-90145046f7dc
    from
@@ -121,9 +121,9 @@
 static FT_Library library;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FT2Plugin 27 March 2016 (i)"
+	"FT2Plugin 9 July 2016 (i)"
 #else
-	"FT2Plugin 27 March 2016 (e)"
+	"FT2Plugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c
===================================================================
--- trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FileCopyPlugin/FileCopyPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:58 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:27 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	FileCopyPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	FileCopyPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "FileCopyPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "FileCopyPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -57,9 +57,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FileCopyPlugin 27 March 2016 (i)"
+	"FileCopyPlugin 9 July 2016 (i)"
 #else
-	"FileCopyPlugin 27 March 2016 (e)"
+	"FileCopyPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/FilePlugin/FilePlugin.c
===================================================================
--- trunk/src/plugins/FilePlugin/FilePlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FilePlugin/FilePlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:23 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	FilePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	FilePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "FilePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "FilePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -85,6 +85,7 @@
 EXPORT(sqInt) primitiveFileSetPosition(void);
 EXPORT(sqInt) primitiveFileSize(void);
 EXPORT(sqInt) primitiveFileStdioHandles(void);
+EXPORT(sqInt) primitiveFileSync(void);
 EXPORT(sqInt) primitiveFileTruncate(void);
 EXPORT(sqInt) primitiveFileWrite(void);
 EXPORT(sqInt) primitiveHasFileAccess(void);
@@ -100,9 +101,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FilePlugin 27 March 2016 (i)"
+	"FilePlugin 9 July 2016 (i)"
 #else
-	"FilePlugin 27 March 2016 (e)"
+	"FilePlugin 9 July 2016 (e)"
 #endif
 ;
 static void * sCCPfn;
@@ -810,7 +811,29 @@
 	return null;
 }
 
+EXPORT(sqInt) primitiveFileSync(void) {
+    SQFile * file;
+    sqInt objectPointer;
 
+	/* begin fileValueOf: */
+	objectPointer = interpreterProxy->stackValue(0);
+	if (!((interpreterProxy->isBytes(objectPointer)) && ((interpreterProxy->byteSizeOf(objectPointer)) == (sizeof(SQFile))))) {
+		interpreterProxy->primitiveFail();
+		file = null;
+		goto l1;
+	}
+	file = interpreterProxy->firstIndexableField(objectPointer);
+l1:	/* end fileValueOf: */;
+	if (!(interpreterProxy->failed())) {
+		sqFileSync(file);
+	}
+	if (!(interpreterProxy->failed())) {
+		interpreterProxy->pop(1);
+	}
+	return null;
+}
+
+
 /*	ftruncate is not an ansi function so we have a macro to point to a suitable platform implementation */
 
 EXPORT(sqInt) primitiveFileTruncate(void) {
@@ -961,8 +984,9 @@
 	{"FilePlugin", "primitiveFileRead", (void*)primitiveFileRead},
 	{"FilePlugin", "primitiveDirectoryDelimitor", (void*)primitiveDirectoryDelimitor},
 	{"FilePlugin", "setInterpreter", (void*)setInterpreter},
+	{"FilePlugin", "primitiveFileSync", (void*)primitiveFileSync},
+	{"FilePlugin", "primitiveFileClose", (void*)primitiveFileClose},
 	{"FilePlugin", "setMacFileTypeAndCreator", (void*)setMacFileTypeAndCreator},
-	{"FilePlugin", "primitiveFileClose", (void*)primitiveFileClose},
 	{"FilePlugin", "primitiveDirectoryDelete", (void*)primitiveDirectoryDelete},
 	{"FilePlugin", "getModuleName", (void*)getModuleName},
 	{"FilePlugin", "primitiveFileOpen", (void*)primitiveFileOpen},

Modified: trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
===================================================================
--- trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:23 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	FloatArrayPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	FloatArrayPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "FloatArrayPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "FloatArrayPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -72,9 +72,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FloatArrayPlugin 27 March 2016 (i)"
+	"FloatArrayPlugin 9 July 2016 (i)"
 #else
-	"FloatArrayPlugin 27 March 2016 (e)"
+	"FloatArrayPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c
===================================================================
--- trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/FloatMathPlugin/FloatMathPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:23 pm */
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	VMPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	FloatMathPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	FloatMathPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "FloatMathPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "FloatMathPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -79,9 +79,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"FloatMathPlugin 27 March 2016 (i)"
+	"FloatMathPlugin 9 July 2016 (i)"
 #else
-	"FloatMathPlugin 27 March 2016 (e)"
+	"FloatMathPlugin 9 July 2016 (e)"
 #endif
 ;
 

Modified: trunk/src/plugins/GeniePlugin/GeniePlugin.c
===================================================================
--- trunk/src/plugins/GeniePlugin/GeniePlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/GeniePlugin/GeniePlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:23 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	GeniePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	GeniePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "GeniePlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "GeniePlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -61,9 +61,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"GeniePlugin v2.0 27 March 2016 (i)"
+	"GeniePlugin v2.0 9 July 2016 (i)"
 #else
-	"GeniePlugin v2.0 27 March 2016 (e)"
+	"GeniePlugin v2.0 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c
===================================================================
--- trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/HostWindowPlugin/HostWindowPlugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:59 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:28 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	HostWindowPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	HostWindowPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "HostWindowPlugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "HostWindowPlugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -66,9 +66,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"HostWindowPlugin 27 March 2016 (i)"
+	"HostWindowPlugin 9 July 2016 (i)"
 #else
-	"HostWindowPlugin 27 March 2016 (e)"
+	"HostWindowPlugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/ImmX11Plugin/ImmX11Plugin.c
===================================================================
--- trunk/src/plugins/ImmX11Plugin/ImmX11Plugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/ImmX11Plugin/ImmX11Plugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.6 translated as C source on 14 May 2016 11:38:05 am */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:28 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator * VMMaker-dtl.382 uuid: c8058d87-c626-4cc5-ad9f-8469e42cd043
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	ImmX11Plugin * VMMaker-dtl.382 uuid: c8058d87-c626-4cc5-ad9f-8469e42cd043
+	ImmX11Plugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "ImmX11Plugin * VMMaker-dtl.382 uuid: c8058d87-c626-4cc5-ad9f-8469e42cd043 " __DATE__ ;
+static char __buildInfo[] = "ImmX11Plugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -84,9 +84,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"ImmX11Plugin 14 May 2016 (i)"
+	"ImmX11Plugin 9 July 2016 (i)"
 #else
-	"ImmX11Plugin 14 May 2016 (e)"
+	"ImmX11Plugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;

Modified: trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c
===================================================================
--- trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c	2016-06-11 00:32:11 UTC (rev 3745)
+++ trunk/src/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.c	2016-07-09 16:14:07 UTC (rev 3746)
@@ -1,10 +1,10 @@
-/* Smalltalk from Squeak4.5 with VMMaker 4.15.5 translated as C source on 27 March 2016 9:51:54 pm */
+/* Smalltalk from Squeak4.5 with VMMaker 4.15.7 translated as C source on 9 July 2016 12:04:23 pm */
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	SmartSyntaxPluginCodeGenerator VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
    from
-	JPEGReadWriter2Plugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3
+	JPEGReadWriter2Plugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b
  */
-static char __buildInfo[] = "JPEGReadWriter2Plugin VMMaker-dtl.379 uuid: 08564677-5e9d-48d5-a63c-b53bd85489f3 " __DATE__ ;
+static char __buildInfo[] = "JPEGReadWriter2Plugin VMMaker-dtl.384 uuid: 53635f21-7aaa-454b-bbfc-9fc2b67fb70b " __DATE__ ;
 
 
 
@@ -49,6 +49,7 @@
 #pragma export on
 EXPORT(sqInt) initialiseModule(void);
 EXPORT(sqInt) primImageHeight(void);
+EXPORT(sqInt) primImageNumComponents(void);
 EXPORT(sqInt) primImageWidth(void);
 EXPORT(sqInt) primJPEGCompressStructSize(void);
 EXPORT(sqInt) primJPEGDecompressStructSize(void);
@@ -57,6 +58,7 @@
 EXPORT(sqInt) primJPEGReadHeaderfromByteArrayerrorMgr(void);
 EXPORT(sqInt) primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr(void);
 EXPORT(sqInt) primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr(void);
+EXPORT(sqInt) primSupports8BitGrayscaleJPEGs(void);
 EXPORT(sqInt) setInterpreter(struct VirtualMachine*anInterpreter);
 EXPORT(sqInt) shutdownModule(void);
 #pragma export off
@@ -68,9 +70,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"JPEGReadWriter2Plugin 27 March 2016 (i)"
+	"JPEGReadWriter2Plugin 9 July 2016 (i)"
 #else
-	"JPEGReadWriter2Plugin 27 March 2016 (e)"
+	"JPEGReadWriter2Plugin 9 July 2016 (e)"
 #endif
 ;
 static sqInt simulator;
@@ -117,6 +119,28 @@
 	return null;
 }
 
+EXPORT(sqInt) primImageNumComponents(void) {
+	char *aJPEGDecompressStruct;
+	sqInt _return_value;
+
+	interpreterProxy->success(interpreterProxy->isBytes(interpreterProxy->stackValue(0)));
+	aJPEGDecompressStruct = ((char *) (interpreterProxy->firstIndexableField(interpreterProxy->stackValue(0))));
+	if (interpreterProxy->failed()) {
+		return null;
+	}
+	
+		interpreterProxy->success
+			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct jpeg_decompress_struct))); 
+		if (interpreterProxy->failed()) return null;
+	;
+	_return_value = interpreterProxy->integerObjectOf((((j_decompress_ptr)aJPEGDecompressStruct)->num_components));
+	if (interpreterProxy->failed()) {
+		return null;
+	}
+	interpreterProxy->popthenPush(2, _return_value);
+	return null;
+}
+
 EXPORT(sqInt) primImageWidth(void) {
 	char *aJPEGDecompressStruct;
 	sqInt _return_value;
@@ -185,8 +209,6 @@
 
 EXPORT(sqInt) primJPEGReadHeaderfromByteArrayerrorMgr(void) {
 	sqInt sourceSize;
-	j_decompress_ptr  pcinfo;
-	error_ptr2  pjerr;
 	char *aJPEGDecompressStruct;
 	char *source;
 	char *aJPEGErrorMgr2Struct;
@@ -200,79 +222,36 @@
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	pcinfo = null;
-	pjerr = null;
-	sourceSize = null;
-	pcinfo;
-	pjerr;
-	sourceSize;
-	
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(2))) >= (sizeof(struct jpeg_decompress_struct)));
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); 
-		if (interpreterProxy->failed()) return null;
-	;
-	
-		sourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(1));
-		pcinfo = (j_decompress_ptr)aJPEGDecompressStruct;
-		pjerr = (error_ptr2)aJPEGErrorMgr2Struct;
-		if (sourceSize) {
-			pcinfo->err = jpeg_std_error(&pjerr->pub);
-			pjerr->pub.error_exit = error_exit;
-			if (setjmp(pjerr->setjmp_buffer)) {
-				jpeg_destroy_decompress(pcinfo);
-				sourceSize = 0;
-			}
-			if (sourceSize) {
-				jpeg_create_decompress(pcinfo);
-				jpeg_mem_src(pcinfo, source, sourceSize);
-				jpeg_read_header(pcinfo, TRUE);
-			}
-		}
-	;
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(2)) >= (sizeof(struct jpeg_decompress_struct)));
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(0)) >= (sizeof(struct error_mgr2)));
 	if (interpreterProxy->failed()) {
 		return null;
 	}
+	sourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(1));
+	if (sourceSize > 0) {
+		primJPEGReadHeaderfromByteArraysizeerrorMgrReadHeader(aJPEGDecompressStruct, source, sourceSize, aJPEGErrorMgr2Struct);
+	}
+	if (interpreterProxy->failed()) {
+		return null;
+	}
 	interpreterProxy->pop(3);
 	return null;
 }
 
 EXPORT(sqInt) primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgr(void) {
-	unsigned *  formBits;
-	sqInt ok;
-	sqInt g1;
-	sqInt gOff;
-	error_ptr2  pjerr;
-	sqInt bOff2;
 	sqInt formWidth;
+	sqInt formBitmapOOP;
+	sqInt formComponents;
 	sqInt formDepth;
-	sqInt dmv1;
-	sqInt formPix;
-	sqInt dmo;
-	sqInt formBitsOops;
-	sqInt r2;
-	sqInt dmi;
-	sqInt r1;
-	sqInt gOff2;
-	sqInt j;
+	sqInt formNativeDepth;
+	sqInt pixelsPerWord;
 	sqInt formPitch;
-	sqInt i;
-	sqInt b2;
-	sqInt rowStride;
-	sqInt b1;
-	sqInt formBitsSize;
-	sqInt di;
-	sqInt dmv2;
-	sqInt rOff;
-	JSAMPARRAY  buffer;
-	sqInt pixPerWord;
-	j_decompress_ptr  pcinfo;
-	sqInt g2;
-	sqInt bOff;
-	sqInt sourceSize;
-	sqInt rOff2;
+	sqInt formBitmapSizeInBytes;
 	sqInt formHeight;
+	sqInt sourceSize;
+	sqInt wordsPerRow;
+	unsigned int*formBitmap;
+	sqInt formComponentBitSize;
 	char *aJPEGDecompressStruct;
 	char *source;
 	sqInt form;
@@ -291,214 +270,70 @@
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	pcinfo = null;
-	pjerr = null;
-	buffer = null;
-	rowStride = null;
-	formDepth = null;
-	formBits = null;
-	i = null;
-	j = null;
-	formPix = null;
-	ok = null;
-	rOff = null;
-	gOff = null;
-	bOff = null;
-	rOff2 = null;
-	gOff2 = null;
-	bOff2 = null;
-	sourceSize = null;
-	r1 = null;
-	r2 = null;
-	g1 = null;
-	g2 = null;
-	b1 = null;
-	b2 = null;
-	dmv1 = null;
-	dmv2 = null;
-	di = null;
-	dmi = null;
-	dmo = null;
-	pcinfo;
-	pjerr;
-	buffer;
-	rowStride;
-	formBits;
-	formDepth;
-	i;
-	j;
-	formPix;
-	ok;
-	rOff;
-	gOff;
-	bOff;
-	rOff2;
-	gOff2;
-	bOff2;
-	sourceSize;
-	r1;
-	r2;
-	g1;
-	g2;
-	b1;
-	b2;
-	dmv1;
-	dmv2;
-	di;
-	dmi;
-	dmo;
-	formBitsOops = interpreterProxy->fetchPointerofObject(0, form);
+	formBitmapOOP = interpreterProxy->fetchPointerofObject(0, form);
+	formNativeDepth = interpreterProxy->fetchIntegerofObject(3, form);
+	formWidth = interpreterProxy->fetchIntegerofObject(1, form);
+	formHeight = interpreterProxy->fetchIntegerofObject(2, form);
 
 	/* Various parameter checks */
 
-	formDepth = interpreterProxy->fetchIntegerofObject(3, form);
-	
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(4))) >= (sizeof(struct jpeg_decompress_struct)));
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); 
-		if (interpreterProxy->failed()) return null;
-	;
-	formWidth = ((j_decompress_ptr)aJPEGDecompressStruct)->image_width;
-	formHeight = ((j_decompress_ptr)aJPEGDecompressStruct)->image_height;
-	pixPerWord = 32 / formDepth;
-	formPitch = ((formWidth + (pixPerWord - 1)) / pixPerWord) * 4;
-	formBitsSize = interpreterProxy->byteSizeOf(formBitsOops);
-	interpreterProxy->success((interpreterProxy->isWordsOrBytes(formBitsOops)) && (formBitsSize == (formPitch * formHeight)));
+	formDepth = abs(formNativeDepth);
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(4)) >= (sizeof(struct jpeg_decompress_struct)));
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(0)) >= (sizeof(struct error_mgr2)));
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	formBits = interpreterProxy->firstIndexableField(formBitsOops);
-	
-		sourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(3));
-		if (sourceSize == 0) {
-			interpreterProxy->success(false);
-			return null;
-		}
-		pcinfo = (j_decompress_ptr)aJPEGDecompressStruct;
-		pjerr = (error_ptr2)aJPEGErrorMgr2Struct;
-		pcinfo->err = jpeg_std_error(&pjerr->pub);
-		pjerr->pub.error_exit = error_exit;
-		ok = 1;
-		if (setjmp(pjerr->setjmp_buffer)) {
-			jpeg_destroy_decompress(pcinfo);
-			ok = 0;
-		}
-		if (ok) {
-			ok = jpeg_mem_src_newLocationOfData(pcinfo, source, sourceSize);
-			if (ok) {
-				/* Dither Matrix taken from Form>>orderedDither32To16, but rewritten for this method. */
-				int ditherMatrix1[] = { 2, 0, 14, 12, 1, 3, 13, 15 };
-				int ditherMatrix2[] = { 10, 8, 6, 4, 9, 11, 5, 7 };
- 				jpeg_start_decompress(pcinfo);
-				rowStride = pcinfo->output_width * pcinfo->output_components;
-				if (pcinfo->out_color_components == 3) {
-					rOff = 0; gOff = 1; bOff = 2;
-					rOff2 = 3; gOff2 = 4; bOff2 = 5;
-				} else {
-					rOff = 0; gOff = 0; bOff = 0;
-					rOff2 = 1; gOff2 = 1; bOff2 = 1;
-				}
-				/* Make a one-row-high sample array that will go away when done with image */
-				buffer = (*(pcinfo->mem)->alloc_sarray)
-					((j_common_ptr) pcinfo, JPOOL_IMAGE, rowStride, 1);
-
-				/* Step 6: while (scan lines remain to be read) */
-				/*           jpeg_read_scanlines(...); */
-
-				/* Here we use the library state variable cinfo.output_scanline as the
-				 * loop counter, so that we dont have to keep track ourselves.
-				 */
-				while (pcinfo->output_scanline < pcinfo->output_height) {
-					/* jpeg_read_scanlines expects an array of pointers to scanlines.
-					 * Here the array is only one element long, but you could ask for
-					 * more than one scanline at a time if thats more convenient.
-					 */
-					(void) jpeg_read_scanlines(pcinfo, buffer, 1);
-
-					switch (formDepth) {
-						case 32:
-							for(i = 0, j = 0; i < rowStride; i +=(pcinfo->out_color_components), j++) {
-								formPix = (255 << 24) | (buffer[0][i+rOff] << 16) | (buffer[0][i+gOff] << 8) | buffer[0][i+bOff];
-								if (formPix == 0) formPix = 1;
-								formBits [ ((pcinfo->output_scanline - 1) * (pcinfo->image_width)) + j ] = formPix;
-							}
-							break;
-
-						case 16:
-							for(i = 0, j = 0; i < rowStride; i +=(pcinfo->out_color_components*2), j++) {
-								r1 = buffer[0][i+rOff];
-								r2 = buffer[0][i+rOff2];
-								g1 = buffer[0][i+gOff];
-								g2 = buffer[0][i+gOff2];
-								b1 = buffer[0][i+bOff];
-								b2 = buffer[0][i+bOff2];
-
-								if (!ditherFlag) {
-									r1 = r1 >> 3;
-									r2 = r2 >> 3;
-									g1 = g1 >> 3;
-									g2 = g2 >> 3;
-									b1 = b1 >> 3;
-									b2 = b2 >> 3;
-								} else {
-									/* Do 4x4 ordered dithering. Taken from Form>>orderedDither32To16 */
-									dmv1 = ditherMatrix1[ ((pcinfo->output_scanline & 3 )<< 1) | (j&1) ];
-									dmv2 = ditherMatrix2[ ((pcinfo->output_scanline & 3 )<< 1) | (j&1) ];
-
-									di = (r1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv1 < dmi) { r1 = dmo+1; } else { r1 = dmo; };
-									di = (g1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv1 < dmi) { g1 = dmo+1; } else { g1 = dmo; };
-									di = (b1 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv1 < dmi) { b1 = dmo+1; } else { b1 = dmo; };
-
-									di = (r2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv2 < dmi) { r2 = dmo+1; } else { r2 = dmo; };
-									di = (g2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv2 < dmi) { g2 = dmo+1; } else { g2 = dmo; };
-									di = (b2 * 496) >> 8; dmi = di & 15; dmo = di >> 4;
-									if(dmv2 < dmi) { b2 = dmo+1; } else { b2 = dmo; };
-								}
-
-								formPix = (r1 << 10) | (g1 << 5) | b1;
-								if (!formPix) formPix = 1;
-								formPix = (formPix << 16) | (r2 << 10) | (g2 << 5) | b2;
-								if (!(formPix & 65535)) formPix = formPix | 1;
-								formBits [ ((pcinfo->output_scanline - 1) * (pcinfo->image_width)) / 2 + j ] = formPix;
-							}
-							break;
-					}
-				}
-				jpeg_finish_decompress(pcinfo);
-			}
-			jpeg_destroy_decompress(pcinfo);
-		}
-	;
+	formComponents = (formDepth != 8
+		? 4
+		: 1);
+	formComponentBitSize = (formDepth != 16
+		? 8
+		: 4);
+	pixelsPerWord = 32 / (formComponents * formComponentBitSize);
+	wordsPerRow = ((formWidth + pixelsPerWord) - 1) / pixelsPerWord;
+	formPitch = ((formWidth + (pixelsPerWord - 1)) / pixelsPerWord) * 4;
+	formBitmapSizeInBytes = interpreterProxy->byteSizeOf(formBitmapOOP);
+	interpreterProxy->success((interpreterProxy->isWordsOrBytes(formBitmapOOP)) && (formBitmapSizeInBytes >= (formPitch * formHeight)));
 	if (interpreterProxy->failed()) {
 		return null;
 	}
+	sourceSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(3));
+	interpreterProxy->success(sourceSize != 0);
+	if (interpreterProxy->failed()) {
+		return null;
+	}
+	formBitmap = interpreterProxy->firstIndexableField(formBitmapOOP);
+	primJPEGReadImagefromByteArrayonFormdoDitheringerrorMgrReadScanlines(
+			aJPEGDecompressStruct,
+    			aJPEGErrorMgr2Struct,
+			source,
+    			sourceSize,
+    			ditherFlag,
+    			formBitmap,
+   			pixelsPerWord,
+   			wordsPerRow,
+    			formNativeDepth);;
+	if (interpreterProxy->failed()) {
+		return null;
+	}
 	interpreterProxy->pop(5);
 	return null;
 }
 
 EXPORT(sqInt) primJPEGWriteImageonByteArrayformqualityprogressiveJPEGerrorMgr(void) {
 	sqInt formWidth;
-	sqInt j;
 	unsigned int destinationSize;
-	sqInt i;
-	sqInt formPix;
+	sqInt formBitmapOOP;
+	sqInt formComponents;
+	sqInt formNativeDepth;
 	sqInt formDepth;
-	error_ptr2  pjerr;
+	sqInt pixelsPerWord;
 	sqInt formPitch;
-	sqInt rowStride;
-	sqInt formBitsSize;
-	sqInt formBitsOops;
+	sqInt formBitmapSizeInBytes;
 	sqInt formHeight;
-	unsigned *  formBits;
-	sqInt pixPerWord;
-	j_compress_ptr  pcinfo;
-	JSAMPARRAY  buffer;
+	sqInt wordsPerRow;
+	unsigned int *formBitmap;
+	sqInt formComponentBitSize;
 	char *aJPEGCompressStruct;
 	char *destination;
 	sqInt form;
@@ -520,113 +355,50 @@
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	pcinfo = null;
-	pjerr = null;
-	buffer = null;
-	rowStride = null;
-	formBits = null;
-	formWidth = null;
-	formHeight = null;
-	formDepth = null;
-	i = null;
-	j = null;
-	formPix = null;
-	destinationSize = null;
-	pcinfo;
-	pjerr;
-	buffer;
-	rowStride;
-	formBits;
-	formWidth;
-	formHeight;
-	formDepth;
-	i;
-	j;
-	formPix;
-	destinationSize;
-	formBitsOops = interpreterProxy->fetchPointerofObject(0, form);
+	formBitmapOOP = interpreterProxy->fetchPointerofObject(0, form);
 	formWidth = interpreterProxy->fetchIntegerofObject(1, form);
 	formHeight = interpreterProxy->fetchIntegerofObject(2, form);
+	formNativeDepth = interpreterProxy->fetchIntegerofObject(3, form);
 
 	/* Various parameter checks */
 
-	formDepth = interpreterProxy->fetchIntegerofObject(3, form);
-	
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(5))) >= (sizeof(struct jpeg_compress_struct)));
-		interpreterProxy->success
-			((interpreterProxy->stSizeOf(interpreterProxy->stackValue(0))) >= (sizeof(struct error_mgr2))); 
-		if (interpreterProxy->failed()) return null;
-	;
-	pixPerWord = 32 / formDepth;
-	formPitch = ((formWidth + (pixPerWord - 1)) / pixPerWord) * 4;
-	formBitsSize = interpreterProxy->byteSizeOf(formBitsOops);
-	interpreterProxy->success((interpreterProxy->isWordsOrBytes(formBitsOops)) && (formBitsSize == (formPitch * formHeight)));
+	formDepth = abs(formNativeDepth);
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(5)) >= (sizeof(struct jpeg_compress_struct)));
+	interpreterProxy->success(interpreterProxy->stSizeOf(interpreterProxy->stackValue(0)) >= (sizeof(struct error_mgr2)));
 	if (interpreterProxy->failed()) {
 		return null;
 	}
-	formBits = interpreterProxy->firstIndexableField(formBitsOops);
-	
-		destinationSize = interpreterProxy->stSizeOf(interpreterProxy->stackValue(4));
-		pcinfo = (j_compress_ptr)aJPEGCompressStruct;
-		pjerr = (error_ptr2)aJPEGErrorMgr2Struct;
-		if (destinationSize) {
-			pcinfo->err = jpeg_std_error(&pjerr->pub);
-			pjerr->pub.error_exit = error_exit;
-			if (setjmp(pjerr->setjmp_buffer)) {
-				jpeg_destroy_compress(pcinfo);
-				destinationSize = 0;
-			}
-			if (destinationSize) {
-				jpeg_create_compress(pcinfo);
-				jpeg_mem_dest(pcinfo, destination, &destinationSize);

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list