Fix a problem that caused the new interface code to not actually be
[mesa.git] / src / glut / glx / glut_menu.c
index 2af3482afc0e7be3fae8438b49a0c13f1c1de9da..4e2cac279594e85059d2ae03833e7493aaa09d1e 100644 (file)
@@ -9,6 +9,10 @@
    the menuing functionality implemented.  This file is used only by
    the X Window System version of GLUT. */
 
+#ifdef __VMS
+#include <GL/vms_x_fix.h>
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -99,8 +103,8 @@ ifSunCreator(void)
 {
   char *xvendor, *glvendor, *renderer;
   int isSunCreator = 0; /* Until proven that it is. */
-  int savedDisplayMode;
-  char *savedDisplayString;
+  int savedDisplayMode = 0;
+  char *savedDisplayString = 0;
   GLUTwindow *window;
 
 #define VENDOR_SUN "Sun Microsystems"
@@ -154,7 +158,7 @@ menuVisualSetup(void)
   Bool presumablyMesa;
   int layer, nVisuals, i, dummy;
   unsigned long *placeHolders = NULL;
-  int numPlaceHolders;
+  int numPlaceHolders = 0;
   Bool allocateHigh;
 
   allocateHigh = ifSunCreator();
@@ -827,7 +831,7 @@ installMenuCallbacks(void)
   __glutGetMenuItem = getMenuItem;
 }
 
-int APIENTRY 
+int GLUTAPIENTRY 
 glutCreateMenu(GLUTselectCB selectFunc)
 {
   XSetWindowAttributes wa;
@@ -886,7 +890,7 @@ glutCreateMenu(GLUTselectCB selectFunc)
 }
 
 /* CENTRY */
-int APIENTRY 
+int GLUTAPIENTRY 
 glutGetMenu(void)
 {
   if (__glutCurrentMenu) {
@@ -896,7 +900,7 @@ glutGetMenu(void)
   }
 }
 
-void APIENTRY 
+void GLUTAPIENTRY 
 glutSetMenu(int menuid)
 {
   GLUTmenu *menu;
@@ -936,7 +940,7 @@ __glutSetMenuItem(GLUTmenuItem * item, const char *label,
 }
 
 /* CENTRY */
-void APIENTRY 
+void GLUTAPIENTRY 
 glutAddMenuEntry(const char *label, int value)
 {
   XSetWindowAttributes wa;
@@ -964,7 +968,7 @@ glutAddMenuEntry(const char *label, int value)
   __glutCurrentMenu->list = entry;
 }
 
-void APIENTRY 
+void GLUTAPIENTRY 
 glutAddSubMenu(const char *label, int menu)
 {
   XSetWindowAttributes wa;
@@ -993,7 +997,7 @@ glutAddSubMenu(const char *label, int menu)
   __glutCurrentMenu->list = submenu;
 }
 
-void APIENTRY 
+void GLUTAPIENTRY 
 glutAttachMenu(int button)
 {
   if (__glutMappedMenu) {