tgsi: Clamp the source argument in micro_exp2() to avoid Inf.
[mesa.git] / src / glut / glx / glut_gamemode.c
index b685ce33e2afea87d4dc0414a49b1e396eee612e..3ffeafee57fdc6271d34bedd0bf088cd1e65f7d4 100644 (file)
@@ -5,6 +5,10 @@
    and is provided without guarantee or warrantee expressed or
    implied. This program is -not- in the public domain. */
 
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -41,7 +45,7 @@ static char *capstr[] =
 };
 #endif
 
-void __cdecl
+void
 __glutCloseDownGameMode(void)
 {
   if (__glutDisplaySettingsChanged) {
@@ -55,7 +59,7 @@ __glutCloseDownGameMode(void)
   __glutGameModeWindow = NULL;
 }
 
-void APIENTRY
+void GLUTAPIENTRY
 glutLeaveGameMode(void)
 {
   if (__glutGameModeWindow == NULL) {
@@ -158,7 +162,7 @@ findMatch(DisplayMode * dmodes, int ndmodes,
 {
   DisplayMode *found;
   int *bestScore, *thisScore;
-  int i, j, numok, result, worse, better;
+  int i, j, numok, result = 0, worse, better;
 
   found = NULL;
   numok = 1;            /* "num" capability is indexed from 1,
@@ -382,7 +386,7 @@ static int
 parseCriteria(char *word, Criterion * criterion)
 {
   char *cstr, *vstr, *response;
-  int comparator, value;
+  int comparator, value = 0;
 
   cstr = strpbrk(word, "=><!~");
   if (cstr) {
@@ -544,7 +548,7 @@ parseDisplayString(const char *display, int *ncriteria)
   return criteria;
 }
 
-void APIENTRY
+void GLUTAPIENTRY
 glutGameModeString(const char *string)
 {
   Criterion *criteria;
@@ -556,7 +560,7 @@ glutGameModeString(const char *string)
   free(criteria);
 }
 
-int APIENTRY
+int GLUTAPIENTRY
 glutEnterGameMode(void)
 {
   GLUTwindow *window;
@@ -650,7 +654,7 @@ glutEnterGameMode(void)
   return window->num + 1;
 }
 
-int APIENTRY
+int GLUTAPIENTRY
 glutGameModeGet(GLenum mode)
 {
   switch (mode) {