Revision: 2698 Author: rowledge Date: 2013-03-05 20:33:50 -0800 (Tue, 05 Mar 2013) Log Message: ----------- add ioSetCursorARGB to sq.h, add an ACORN versoin of fileno to sqVirtualMachine.h and an ACORN fudge in FilePlugin.h
Modified Paths: -------------- trunk/platforms/Cross/plugins/FilePlugin/FilePlugin.h trunk/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c trunk/platforms/Cross/vm/sq.h trunk/platforms/Cross/vm/sqVirtualMachine.c
Modified: trunk/platforms/Cross/plugins/FilePlugin/FilePlugin.h =================================================================== --- trunk/platforms/Cross/plugins/FilePlugin/FilePlugin.h 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/plugins/FilePlugin/FilePlugin.h 2013-03-06 04:33:50 UTC (rev 2698) @@ -1,11 +1,11 @@ /**************************************************************************** * PROJECT: Common include * FILE: FilePlugin.h -* CONTENT: +* CONTENT: * -* AUTHOR: -* ADDRESS: -* EMAIL: +* AUTHOR: +* ADDRESS: +* EMAIL: * RCSID: $Id$ * * 2009-05-15 EEM add stdio flag; reorder SQFile to make it more compact @@ -22,10 +22,18 @@ int sessionID; /* ikp: must be first */ void *file; squeakFileOffsetType fileSize; /* 64-bits we hope. */ +#if defined(ACORN) +// ACORN has to have 'lastOp' as at least a 32 bit field in order to work + int lastOp; // actually used to save file position + char writable; + char lastChar; + char isStdioStream; +#else char writable; char lastOp; /* 0 = uncommitted, 1 = read, 2 = write */ char lastChar; char isStdioStream; +#endif } SQFile;
/* file i/o */
Modified: trunk/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h =================================================================== --- trunk/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/plugins/HostWindowPlugin/HostWindowPlugin.h 2013-03-06 04:33:50 UTC (rev 2698) @@ -18,7 +18,7 @@
/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the sqInt windowIndex * Return true if ok, false if not, but not currently checked */ -extern sqInt ioShowDisplayOnWindow( unsigned char* dispBitsIndex, sqInt width, sqInt +extern sqInt ioShowDisplayOnWindow( unsigned /* TPR char */ * dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB, sqInt windowIndex);
Modified: trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h =================================================================== --- trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.h 2013-03-06 04:33:50 UTC (rev 2698) @@ -14,4 +14,4 @@ void error_exit (j_common_ptr cinfo); GLOBAL(void) jpeg_mem_src (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); GLOBAL(int) jpeg_mem_src_newLocationOfData (j_decompress_ptr cinfo, char * pSourceData, unsigned sourceDataSize); -GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize); \ No newline at end of file +GLOBAL(void) jpeg_mem_dest (j_compress_ptr cinfo, char * pDestination, unsigned *pDestinationSize);
Modified: trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c =================================================================== --- trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/plugins/JPEGReadWriter2Plugin/jmemdatasrc.c 2013-03-06 04:33:50 UTC (rev 2698) @@ -198,4 +198,4 @@ src->actualPos = pSourceData + offset;
return((src->actualPos + src->bytesLeft) == (pSourceData + sourceDataSize)); -} \ No newline at end of file +}
Modified: trunk/platforms/Cross/vm/sq.h =================================================================== --- trunk/platforms/Cross/vm/sq.h 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/vm/sq.h 2013-03-06 04:33:50 UTC (rev 2698) @@ -1,11 +1,11 @@ /**************************************************************************** * PROJECT: Common include * FILE: sq.h -* CONTENT: +* CONTENT: * -* AUTHOR: -* ADDRESS: -* EMAIL: +* AUTHOR: +* ADDRESS: +* EMAIL: * RCSID: $Id$ * */ @@ -118,11 +118,11 @@ #define ioMSecs() ((1000 * clock()) / CLOCKS_PER_SEC)
/* this macro cannot be used now that ioMicroMSecs is involved in the - sqVirtualMachine structures - we must have a function + sqVirtualMachine structures - we must have a function #define ioMicroMSecs() ((1000 * clock()) / CLOCKS_PER_SEC) */
-/* New filename converting function; used by the interpreterProxy function +/* New filename converting function; used by the interpreterProxy function ioFilenamefromStringofLengthresolveAliases. Most platforms can ignore the resolveAlias boolean - it seems to only be of use by OSX but is crucial there. */ @@ -133,7 +133,7 @@ Override in sqPlatformSpecific.h for each platform that implements a file truncate, or consider replacing the ../Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c - file with a platform specific version as Win32 and RISC OS do. + file with a platform specific version as Win32 and RISC OS do. */ #define sqFTruncate(filenum, fileoffset) true
@@ -177,6 +177,7 @@ sqInt ioSeconds(void); sqInt ioSetCursor(sqInt cursorBitsIndex, sqInt offsetX, sqInt offsetY); sqInt ioSetCursorWithMask(sqInt cursorBitsIndex, sqInt cursorMaskIndex, sqInt offsetX, sqInt offsetY); +sqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY); sqInt ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB); sqInt ioHasDisplayDepth(sqInt depth); @@ -190,7 +191,7 @@ In general, either set of input function can be supported, depending on the platform. This (first) set is state based and should be supported even on platforms that make use - of the newer event driven API to support older images + of the newer event driven API to support older images without event support. */
Modified: trunk/platforms/Cross/vm/sqVirtualMachine.c =================================================================== --- trunk/platforms/Cross/vm/sqVirtualMachine.c 2013-03-02 01:22:06 UTC (rev 2697) +++ trunk/platforms/Cross/vm/sqVirtualMachine.c 2013-03-06 04:33:50 UTC (rev 2698) @@ -41,7 +41,7 @@ * equivalent but 64 bit valid function is added as * * 'fetchLong32OfObject' */ sqInt obsoleteDontUseThisFetchWordofObject(sqInt index, sqInt oop); -sqInt fetchLong32ofObject(sqInt index, sqInt oop); +sqInt fetchLong32ofObject(sqInt index, sqInt oop); void *firstFixedField(sqInt oop); void *firstIndexableField(sqInt oop); sqInt literalofMethod(sqInt offset, sqInt methodPointer); @@ -153,7 +153,7 @@ sqInt forceInterruptCheck(void); sqInt getThisSessionID(void); sqInt ioFilenamefromStringofLengthresolveAliases(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag); -sqInt vmEndianness(void); +sqInt vmEndianness(void); sqInt getInterruptPending(void);
/* InterpreterProxy methodsFor: 'BitBlt support' */ @@ -326,7 +326,7 @@ VM->falseObject = falseObject; VM->nilObject = nilObject; VM->trueObject = trueObject; - + /* InterpreterProxy methodsFor: 'special classes' */ VM->classArray = classArray; VM->classBitmap = classBitmap; @@ -511,6 +511,11 @@ # define fopen_for_append(filename) fopen(filename,"a+") #endif
+#if defined (ACORN) +#define fileno(thing) 0 +// just to make it compile - it wont actually work +#endif + void pushOutputFile(char *filenameOrStdioIndex) { @@ -541,7 +546,7 @@ }
void -popOutputFile() +popOutputFile(void) { if (stdoutStackIdx < 0) { fprintf(stderr,"output file stack is empty.\n"); @@ -560,3 +565,4 @@ } *stdout = stdoutStack[stdoutStackIdx--]; } +
vm-dev@lists.squeakfoundation.org