Fixing two minor bugs, adding comments
[freeglut] / src / freeglut_internal.h
index 8182f36..8ce6f7f 100644 (file)
@@ -42,7 +42,7 @@
 #   define  TARGET_HOST_UNIX_X11    0
 #   define  TARGET_HOST_WIN32       0
 #   define  TARGET_HOST_WINCE       1
-#elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
+#elif defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)
 #   define  TARGET_HOST_UNIX_X11    0
 #   define  TARGET_HOST_WIN32       1
 #   define  TARGET_HOST_WINCE       0
@@ -73,17 +73,19 @@ LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
 #endif
 #endif
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) || defined(__WATCOMC__)
 #define strdup   _strdup
 #endif
 
-/* Those files should be available on every platform. */
+/* These files should be available on every platform. */
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
 #include <stdlib.h>
+
+/* These are included based on autoconf directives. */
 #if HAVE_SYS_TYPES_H
 #    include <sys/types.h>
 #endif
@@ -126,6 +128,8 @@ LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
 #    define  FALSE  0
 #endif
 
+/* General defines */
+
 #define INVALID_MODIFIERS 0xffffffff
 
 /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
@@ -284,7 +288,7 @@ struct tagSFG_Display
     int             DisplayPointerX;    /* saved X location of the pointer   */
     int             DisplayPointerY;    /* saved Y location of the pointer   */
 
-#endif
+#endif /* X_XF86VidModeGetModeLine */
 
 #elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
     HINSTANCE        Instance;          /* The application's instance        */
@@ -592,19 +596,19 @@ struct tagSFG_WindowList
 typedef struct tagSFG_Structure SFG_Structure;
 struct tagSFG_Structure
 {
-    SFG_List        Windows;      /* The global windows list            */
-    SFG_List        Menus;        /* The global menus list              */
+    SFG_List        Windows;         /* The global windows list            */
+    SFG_List        Menus;           /* The global menus list              */
     SFG_List        WindowsToDestroy;
 
-    SFG_Window*     CurrentWindow; /* The currently set window          */
-    SFG_Menu*       CurrentMenu;   /* Same, but menu...                 */
+    SFG_Window*     CurrentWindow;   /* The currently set window          */
+    SFG_Menu*       CurrentMenu;     /* Same, but menu...                 */
 
-    SFG_MenuContext* MenuContext; /* OpenGL rendering context for menus */
+    SFG_MenuContext* MenuContext;    /* OpenGL rendering context for menus */
 
-    SFG_Window*      GameMode;    /* The game mode window               */
+    SFG_Window*      GameModeWindow; /* The game mode window               */
 
-    int              WindowID;    /* The new current window ID          */
-    int              MenuID;      /* The new current menu ID            */
+    int              WindowID;       /* The new current window ID          */
+    int              MenuID;         /* The new current menu ID            */
 };
 
 /*
@@ -781,11 +785,6 @@ void        fgInitialiseJoysticks( void );
 void        fgJoystickClose( void );
 void        fgJoystickPollWindow( SFG_Window* window );
 
-/* More joystick functions.  Should these go into the API?  */
-int  glutJoystickGetNumAxes( int ident );
-int  glutJoystickGetNumButtons( int ident );
-int  glutJoystickNotWorking( int ident );
-
 /* InputDevice Initialisation and Closure */
 int         fgInputDeviceDetect( void );
 void        fgInitialiseInputDevices( void );