X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=progs%2Fdemos%2FLorenz%2Florenz.c;h=a3a61dbe5aa20242b90f47e36f10c712facb1594;hb=99318ae110a3ddbf067e03b9f2426c2fb1e3c9e7;hp=366c7e4710c077320d9ac4583bf3431a52f44392;hpb=2de8ecb067e6142a4f0d717c1e5bef62f3f53b81;p=freeglut diff --git a/progs/demos/Lorenz/lorenz.c b/progs/demos/Lorenz/lorenz.c index 366c7e4..a3a61db 100644 --- a/progs/demos/Lorenz/lorenz.c +++ b/progs/demos/Lorenz/lorenz.c @@ -220,8 +220,7 @@ void mouse_cb ( int button, int updown, int x, int y ) { if ( updown == GLUT_DOWN ) { - double dist = 1.0e20 ; /* A very large number */ - dist = 0.0 ; /* so we don't get "unused variable" compiler warning */ + /*double dist = 1.0e20 ; A very large number */ /* The idea here is that we go into "pick" mode and pick the nearest point to the mouse click position. Unfortunately I don't have the time to implement it at the moment. */ @@ -249,7 +248,11 @@ void bitmapPrintf (const char *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); +#endif va_end(args); glutBitmapString ( GLUT_BITMAP_HELVETICA_12, (unsigned char*)buf ) ; }