complaining about if( a = get_a_value_for_a( ) ) type code.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@412
7f0cb862-5218-0410-a997-
914c9d46530a
static void fghCheckTimers( void )
{
long checkTime = fgElapsedTime( );
static void fghCheckTimers( void )
{
long checkTime = fgElapsedTime( );
- while( timer = fgState.Timers.First )
+ while( fgState.Timers.First )
+ SFG_Timer *timer = fgState.Timers.First;
+
if( timer->TriggerTime > checkTime )
break;
if( timer->TriggerTime > checkTime )
break;
*/
void fgCloseWindows( )
{
*/
void fgCloseWindows( )
{
- SFG_WindowList *window_ptr;
-
- while( window_ptr = fgStructure.WindowsToDestroy.First )
+ while( fgStructure.WindowsToDestroy.First )
+ SFG_WindowList *window_ptr = fgStructure.WindowsToDestroy.First;
fgDestroyWindow( window_ptr->window );
fgListRemove( &fgStructure.WindowsToDestroy, &window_ptr->node );
free( window_ptr );
fgDestroyWindow( window_ptr->window );
fgListRemove( &fgStructure.WindowsToDestroy, &window_ptr->node );
free( window_ptr );
*/
void fgDestroyWindow( SFG_Window* window )
{
*/
void fgDestroyWindow( SFG_Window* window )
{
- SFG_Window* subWindow;
- int menu_index ;
assert( window );
freeglut_assert_ready;
assert( window );
freeglut_assert_ready;
- while( subWindow = ( SFG_Window * )window->Children.First )
- fgDestroyWindow( subWindow );
+ while( window->Children.First )
+ fgDestroyWindow( ( SFG_Window * )window->Children.First );
- SFG_Window *activeWindow = fgStructure.Window ;
+ SFG_Window *activeWindow = fgStructure.Window;
INVOKE_WCB( *window, Destroy, ( ) );
INVOKE_WCB( *window, Destroy, ( ) );
- fgSetWindow ( activeWindow );
+ fgSetWindow( activeWindow );
if( window->ActiveMenu )
fgDeactivateMenu( window );
if( window->ActiveMenu )
fgDeactivateMenu( window );
- for ( menu_index = 0; menu_index < 3; menu_index ++ )
- {
- if ( window->Menu[menu_index] )
- window->Menu[menu_index]->ParentWindow = NULL ;
- }
+ for( menu_index = 0; menu_index < 3; menu_index ++ )
+ if( window->Menu[ menu_index ] )
+ window->Menu[ menu_index ]->ParentWindow = NULL;
fgClearCallBacks( window );
fgCloseWindow( window );
fgClearCallBacks( window );
fgCloseWindow( window );
*/
void fgDestroyStructure( void )
{
*/
void fgDestroyStructure( void )
{
- SFG_Window *window;
- SFG_Menu *menu;
-
freeglut_assert_ready;
/*
* Clean up the WindowsToDestroy list.
*/
freeglut_assert_ready;
/*
* Clean up the WindowsToDestroy list.
*/
/*
* Make sure all windows and menus have been deallocated
*/
/*
* Make sure all windows and menus have been deallocated
*/
- while( menu = ( SFG_Menu * )fgStructure.Menus.First )
- fgDestroyMenu( menu );
-
- while( window = ( SFG_Window * )fgStructure.Windows.First )
- fgDestroyWindow( window );
+ while( fgStructure.Menus.First )
+ fgDestroyMenu( ( SFG_Menu * )fgStructure.Menus.First );
+
+ while( fgStructure.Windows.First )
+ fgDestroyWindow( ( SFG_Window * )fgStructure.Windows.First );
/*
* Make sure we do not overwrite our precious results...
*/
/*
* Make sure we do not overwrite our precious results...
*/
- if ( enumerator->found )
+ if( enumerator->found )
return;
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
return;
/*
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
*/
- if( window->ID == (int) (enumerator->data) ) /* XXX int/ptr conversion! */
+ if( window->ID == ( int )(enumerator->data) ) /* XXX int/ptr conversion! */
{
enumerator->found = GL_TRUE;
enumerator->data = window;
{
enumerator->found = GL_TRUE;
enumerator->data = window;
* Uses a method very similiar for fgWindowByHandle...
*/
enumerator.found = GL_FALSE;
* Uses a method very similiar for fgWindowByHandle...
*/
enumerator.found = GL_FALSE;
- enumerator.data = (void *) windowID; /* XXX int/pointer conversion! */
+ enumerator.data = ( void * )windowID; /* XXX int/pointer conversion! */
fgEnumWindows( fghcbWindowByID, &enumerator );
if( enumerator.found )
fgEnumWindows( fghcbWindowByID, &enumerator );
if( enumerator.found )
- return( SFG_Window *) enumerator.data;
+ return ( SFG_Window * )enumerator.data;