Index: src/fileio/buffer.cpp =================================================================== --- src/fileio/buffer.cpp (revision 2) +++ src/fileio/buffer.cpp (revision 3) @@ -48,11 +48,11 @@ } // test for data - if ( !*(PositionInCurrentLine._Myptr) ) + if ( LineNumber == 0 ) { // Nothing has been read-in yet, so read the first line GetLine(); - if (!*(PositionInCurrentLine._Myptr) ) + if ( Line.empty() && inStream.eof() ) { return '\0'; } Index: src/fileio/imageio.cpp =================================================================== --- src/fileio/imageio.cpp (revision 2) +++ src/fileio/imageio.cpp (revision 3) @@ -1,6 +1,12 @@ #define cimg_use_png #define cimg_use_jpeg +// Apple hack; otherwise CImg will decide that this is running in the +// X environment and include X11 headers +#if defined(__APPLE__) +#define cimg_display_type 0 +#endif + #include "CImg.h" #include "imageio.h" Index: src/ui/glObjects.cpp =================================================================== --- src/ui/glObjects.cpp (revision 2) +++ src/ui/glObjects.cpp (revision 3) @@ -231,7 +231,7 @@ cover it up. */ /* save the current matrix mode. */ - int savemode; + GLint savemode; glGetIntegerv( GL_MATRIX_MODE, &savemode ); /* translate the origin to the other end of the cylinder. */ @@ -288,7 +288,7 @@ gluDeleteQuadric( gluq ); /* save the current matrix mode. */ - int savemode; + GLint savemode; glGetIntegerv( GL_MATRIX_MODE, &savemode ); /* translate the origin to the other end of the cylinder. */ Index: Makefile =================================================================== --- Makefile (revision 2) +++ Makefile (revision 3) @@ -3,12 +3,12 @@ # # set LOCAL to the path to fltk -LOCAL = /usr +LOCAL = /Developer/Local INCLUDE = -I$(LOCAL)/include -LIBDIR = -L$(LOCAL)/lib -L/usr/X11R6/lib +LIBDIR = -L$(LOCAL)/lib -LIBS = -lfltk -lfltk_gl -lXext -lX11 -lm -lGL -lGLU -lfltk_images +LIBS = -framework agl -framework Carbon -framework OpenGL -framework GLUT -ljpeg -lpng -lfltk -lfltk_gl -lm -lfltk_images CFLAGS = -g #CFLAGS = -O3 -march=i686 @@ -36,7 +36,7 @@ src/SceneObjects/Cylinder.o src/SceneObjects/trimesh.o \ src/SceneObjects/Sphere.o src/SceneObjects/Square.o -ray: $(ALL.O) +ray: Makefile $(ALL.O) $(CC) $(CFLAGS) -o $@ $(ALL.O) $(INCLUDE) $(LIBDIR) $(LIBS) clean: