Update of /cvsroot/squeak/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7571/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin
Modified Files:
sqMacOpenGLInfo.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: sqMacOpenGLInfo.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sqMacOpenGLInfo.c 6 Feb 2002 06:57:19 -0000 1.3
--- sqMacOpenGLInfo.c 22 Sep 2004 18:56:40 -0000 1.4
***************
*** 27,30 ****
--- 27,33 ----
#endif
+ #include "sq.h"
+ #include "sqVirtualMachine.h"
+
int printRendererInfo(void);
int printFormatInfo(AGLPixelFormat info);
***************
*** 43,52 ****
/* define forceFlush if we should fflush() before closing file */
#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); }}
/*****************************************************************************/
--- 46,79 ----
/* define forceFlush if we should fflush() before closing file */
#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*/
/* 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
/*****************************************************************************/
|