From 0c642b269179ca0592f213cfe52f26d125adeb93 Mon Sep 17 00:00:00 2001 From: ikits Date: Mon, 2 Feb 2004 02:30:43 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@220 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/src/glewinfo_post.c | 12 +++++++----- auto/src/glewinfo_pre.c | 3 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/auto/src/glewinfo_post.c b/auto/src/glewinfo_post.c index 8fc0459..6e378bc 100644 --- a/auto/src/glewinfo_post.c +++ b/auto/src/glewinfo_post.c @@ -7,6 +7,8 @@ int main (int argc, char** argv) { GLuint err; + +#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX) char* display = NULL; int visual = -1; @@ -14,13 +16,13 @@ int main (int argc, char** argv) { #if defined(_WIN32) fprintf(stderr, "Usage: glewinfo [-pf ]\n"); -#elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) - fprintf(stderr, "Usage: glewinfo\n"); #else fprintf(stderr, "Usage: glewinfo [-display ] [-visual ]\n"); #endif return 1; } +#endif + #if defined(_WIN32) if (GL_TRUE == glewCreateContext(&visual)) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) @@ -73,6 +75,7 @@ int main (int argc, char** argv) /* ------------------------------------------------------------------------ */ +#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX) GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual) { int p = 0; @@ -86,7 +89,7 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual) } else return GL_TRUE; -#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) +#else if (!strcmp(argv[p], "-display")) { if (++p >= argc) return GL_TRUE; @@ -99,12 +102,11 @@ GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual) } else return GL_TRUE; -#else - return GL_TRUE; #endif } return GL_FALSE; } +#endif /* ------------------------------------------------------------------------ */ diff --git a/auto/src/glewinfo_pre.c b/auto/src/glewinfo_pre.c index e08f144..83d3876 100644 --- a/auto/src/glewinfo_pre.c +++ b/auto/src/glewinfo_pre.c @@ -49,7 +49,10 @@ GLboolean glewCreateContext (const char* display, int* visual); GLboolean glewCreateContext (); #endif +#if defined(_WIN32) || !defined(__APPLE__) || defined(GLEW_APPLE_GLX) GLboolean glewParseArgs (int argc, char** argv, char** display, int* visual); +#endif + void glewDestroyContext (); /* ------------------------------------------------------------------------- */