projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added error check (John Fay)
[freeglut]
/
src
/
freeglut_internal.h
diff --git
a/src/freeglut_internal.h
b/src/freeglut_internal.h
index
17509ad
..
96326c7
100644
(file)
--- a/
src/freeglut_internal.h
+++ b/
src/freeglut_internal.h
@@
-28,7
+28,7
@@
#ifndef FREEGLUT_INTERNAL_H
#define FREEGLUT_INTERNAL_H
#ifndef FREEGLUT_INTERNAL_H
#define FREEGLUT_INTERNAL_H
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include "config.h"
#endif
# include "config.h"
#endif
@@
-73,7
+73,6
@@
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
-#include <stdarg.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
@@
-361,6
+360,14
@@
struct tagSFG_WindowState
/*
/*
+ * A generic function pointer. We should really use the GLUTproc type
+ * defined in freeglut_ext.h, but if we include that header in this file
+ * a bunch of other stuff (font-related) blows up!
+ */
+typedef void (*SFG_Proc)();
+
+
+/*
* SET_WCB() is used as:
*
* SET_WCB( window, Visibility, func );
* SET_WCB() is used as:
*
* SET_WCB( window, Visibility, func );
@@
-381,8
+388,8
@@
struct tagSFG_WindowState
do \
{ \
if( FETCH_WCB( window, cbname ) != func ) \
do \
{ \
if( FETCH_WCB( window, cbname ) != func ) \
- (((window).CallBacks[CB_ ## cbname]) = (void *) func); \
-} while( 0 ) \
+ (((window).CallBacks[CB_ ## cbname]) = (SFG_Proc) func); \
+} while( 0 )
/*
* FETCH_WCB() is used as:
/*
* FETCH_WCB() is used as:
@@
-533,7
+540,7
@@
struct tagSFG_Window
SFG_Context Window; /* Window and OpenGL context */
SFG_WindowState State; /* The window state */
SFG_Context Window; /* Window and OpenGL context */
SFG_WindowState State; /* The window state */
- void *CallBacks[ TOTAL_CALLBACKS ]; /* Array of window callbacks */
+ SFG_Proc CallBacks[ TOTAL_CALLBACKS ]; /* Array of window callbacks */
void *UserData ; /* For use by user */
SFG_Menu* Menu[ FREEGLUT_MAX_MENUS ]; /* Menus appended to window */
void *UserData ; /* For use by user */
SFG_Menu* Menu[ FREEGLUT_MAX_MENUS ]; /* Menus appended to window */