|
From: John M M. <jo...@us...> - 2004-09-22 18:56:42
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7530/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin Modified Files: sqMacOpenGL.c Log Message: 3.7.5b3 Change logic when we open 3d log file. Ensure we open in working directory, not the root directory. Also fix problems with open on os9, I doubt it worked on that platform before Index: sqMacOpenGL.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** sqMacOpenGL.c 3 Aug 2004 02:41:16 -0000 1.9 --- sqMacOpenGL.c 22 Sep 2004 18:56:33 -0000 1.10 *************** *** 37,43 **** --- 37,48 ---- #include <Events.h> #endif + /* Do not include the entire sq.h file but just those parts needed. */ + /* The virtual machine proxy definition */ #include "sqVirtualMachine.h" + /* Configuration options */ #include "sqConfig.h" + /* Platform specific definitions */ #include "sqPlatformSpecific.h" + #include "B3DAcceleratorPlugin.h" #include "sqMacOpenGL.h" *************** *** 89,97 **** #define forceFlush 1 /* Note: Print this stuff into a file in case we lock up*/ #undef DPRINTF # define DPRINTF(vLevel, args) if(vLevel <= verboseLevel) {\ ! FILE *fp = fopen("Squeak3D.log", "at");\ if(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }} /* Plugin refs */ --- 94,124 ---- #define forceFlush 1 + FILE *xopenf(char *filename,char* attr); + #include "sqMacFileLogic.h" + + static FILE *xopenf(char *filename,char* attr) { + FSSpec imageSpec; + char fullName[1024]; + FILE *fp; + makeFSSpec("", 0, &imageSpec); + PathToFile(fullName,sizeof(fullName),&imageSpec,gCurrentVMEncoding); + strcat(fullName,filename); + fp = fopen(fullName, attr); + return fp; + } + /* Note: Print this stuff into a file in case we lock up*/ #undef DPRINTF + #if defined (__APPLE__) && defined(__MACH__) # define DPRINTF(vLevel, args) if(vLevel <= verboseLevel) {\ ! char fileName[1024]; \ ! sqFilenameFromStringOpen(fileName,(long) &":Squeak3D.log", strlen(":Squeak3D.log")); \ ! FILE *fp = fopen(fileName, "at");\ if(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }} + #else + # define DPRINTF(vLevel, args) if(vLevel <= verboseLevel) {\ + FILE *fp = xopenf("Squeak3D.log", "at");\ + if(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }} + #endif /* Plugin refs */ |