From 929b4d880cc9bc99c3f4db62855b3d2445e9398d Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Fri, 10 Jul 2009 16:18:06 +0000 Subject: [PATCH] Making the "AT_EXIT" hack look a bit less like a copy-and-paste git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@828 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_init.c | 10 +++++----- src/freeglut_internal.h | 2 +- src/freeglut_menu.c | 6 +++--- src/freeglut_window.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/freeglut_init.c b/src/freeglut_init.c index 9b4eb09..b419025 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -854,13 +854,13 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) } } -#ifdef _WIN32 -void (__cdecl *__glutExitFunc)( int retval ) = NULL; +#ifdef TARGET_HOST_MS_WINDOWS +void (__cdecl *__glutExitFunc)( int return_value ) = NULL; -void FGAPIENTRY __glutInitWithExit( int *argcp, char **argv, void (__cdecl *exitfunc)(int) ) +void FGAPIENTRY __glutInitWithExit( int *pargc, char **argv, void (__cdecl *exit_function)(int) ) { - __glutExitFunc = exitfunc; - glutInit(argcp, argv); + __glutExitFunc = exit_function; + glutInit(pargc, argv); } #endif diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index 05cdddf..0b26626 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -934,7 +934,7 @@ int fgHintPresent(Window window, Atom property, Atom hint); SFG_Proc fghGetProcAddress( const char *procName ); #ifdef _WIN32 -extern void (__cdecl *__glutExitFunc)( int retval ); +extern void (__cdecl *__glutExitFunc)( int return_value ); #endif #endif /* FREEGLUT_INTERNAL_H */ diff --git a/src/freeglut_menu.c b/src/freeglut_menu.c index dbf44e5..dccc4dc 100644 --- a/src/freeglut_menu.c +++ b/src/freeglut_menu.c @@ -779,10 +779,10 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) ) return fgCreateMenu( callback )->ID; } -#ifdef _WIN32 -int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exitfunc)(int) ) +#ifdef TARGET_HOST_MS_WINDOWS +int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) ) { - __glutExitFunc = exitfunc; + __glutExitFunc = exit_function; return glutCreateMenu( callback ); } #endif diff --git a/src/freeglut_window.c b/src/freeglut_window.c index 03a3b25..7b73146 100644 --- a/src/freeglut_window.c +++ b/src/freeglut_window.c @@ -1094,9 +1094,9 @@ int FGAPIENTRY glutCreateWindow( const char* title ) } #ifdef _WIN32 -int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exitfunc)(int) ) +int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) ) { - __glutExitFunc = exitfunc; + __glutExitFunc = exit_function; return glutCreateWindow( title ); } #endif -- 1.7.10.4