projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First attempt at adding John Tsiombikas' spaceball support for X11. It compiles...
[freeglut]
/
progs
/
demos
/
Lorenz
/
lorenz.c
diff --git
a/progs/demos/Lorenz/lorenz.c
b/progs/demos/Lorenz/lorenz.c
index
98361bc
..
6a816b2
100644
(file)
--- a/
progs/demos/Lorenz/lorenz.c
+++ b/
progs/demos/Lorenz/lorenz.c
@@
-33,7
+33,7
@@
#include <string.h>
#include <math.h>
#include <GL/freeglut.h>
#include <string.h>
#include <math.h>
#include <GL/freeglut.h>
-#ifdef WIN32
+#ifdef _MSC_VER
/* DUMP MEMORY LEAKS */
#include <crtdbg.h>
#endif
/* DUMP MEMORY LEAKS */
#include <crtdbg.h>
#endif
@@
-249,7
+249,11
@@
void bitmapPrintf (const char *fmt, ...)
va_list args;
va_start(args, fmt);
va_list args;
va_start(args, fmt);
+#if defined(WIN32) && !defined(__CYGWIN__)
+ (void) _vsnprintf (buf, sizeof(buf), fmt, args);
+#else
(void) vsnprintf (buf, sizeof(buf), fmt, args);
(void) vsnprintf (buf, sizeof(buf), fmt, args);
+#endif
va_end(args);
glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ;
}
va_end(args);
glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ;
}
@@
-365,7
+369,7
@@
int main ( int argc, char *argv[] )
/* Enter the GLUT main loop */
glutMainLoop () ;
/* Enter the GLUT main loop */
glutMainLoop () ;
-#ifdef WIN32
+#ifdef _MSC_VER
/* DUMP MEMORY LEAK INFORMATION */
_CrtDumpMemoryLeaks () ;
#endif
/* DUMP MEMORY LEAK INFORMATION */
_CrtDumpMemoryLeaks () ;
#endif