Split a few overlong lines.
Adjusted some spacing in a few spots to be more consistant with freeglut style. Including one unindented if() body. Eliminated a dead variable. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@437 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
ba4088e1f2
commit
be6350a54f
@ -1380,13 +1380,13 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( GetSystemMetrics( SM_SWAPBUTTON ) )
|
||||
if( GetSystemMetrics( SM_SWAPBUTTON ) )
|
||||
{
|
||||
if ( button == GLUT_LEFT_BUTTON )
|
||||
if( button == GLUT_LEFT_BUTTON )
|
||||
button = GLUT_RIGHT_BUTTON;
|
||||
else
|
||||
if ( button == GLUT_RIGHT_BUTTON )
|
||||
button = GLUT_LEFT_BUTTON;
|
||||
if( button == GLUT_RIGHT_BUTTON )
|
||||
button = GLUT_LEFT_BUTTON;
|
||||
}
|
||||
|
||||
if( button == -1 )
|
||||
|
@ -362,7 +362,8 @@ static void fghDisplayMenuBox( SFG_Menu* menu )
|
||||
/*
|
||||
* Have the label drawn, character after character:
|
||||
*/
|
||||
glutBitmapString( FREEGLUT_MENU_FONT, (unsigned char *) menuEntry->Text);
|
||||
glutBitmapString( FREEGLUT_MENU_FONT,
|
||||
(unsigned char *)menuEntry->Text);
|
||||
|
||||
/*
|
||||
* If it's a submenu, draw a right arrow
|
||||
@ -674,15 +675,20 @@ void fghCalculateMenuBoxSize( void )
|
||||
/*
|
||||
* Update the menu entry's width value
|
||||
*/
|
||||
menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT,
|
||||
(unsigned char *) menuEntry->Text );
|
||||
menuEntry->Width = glutBitmapLength(
|
||||
FREEGLUT_MENU_FONT,
|
||||
(unsigned char *)menuEntry->Text
|
||||
);
|
||||
|
||||
/*
|
||||
* If the entry is a submenu, then it needs to be wider to
|
||||
* accomodate the arrow. JCJ 31 July 2003
|
||||
*/
|
||||
if (menuEntry->SubMenu )
|
||||
menuEntry->Width += glutBitmapLength( FREEGLUT_MENU_FONT, (unsigned char *) "_" );
|
||||
menuEntry->Width += glutBitmapLength(
|
||||
FREEGLUT_MENU_FONT,
|
||||
(unsigned char *)"_"
|
||||
);
|
||||
|
||||
/*
|
||||
* Check if it's the biggest we've found
|
||||
|
@ -600,15 +600,13 @@ void fgListAppend(SFG_List *list, SFG_Node *node)
|
||||
|
||||
void fgListRemove(SFG_List *list, SFG_Node *node)
|
||||
{
|
||||
SFG_Node *ln;
|
||||
|
||||
if( (ln = (SFG_Node *)node->Next) != NULL )
|
||||
ln->Prev = node->Prev;
|
||||
if( (ln = (SFG_Node *)node->Prev) != NULL )
|
||||
ln->Next = node->Next;
|
||||
if( (ln = (SFG_Node *)list->First) == node )
|
||||
if( node->Next )
|
||||
( ( SFG_Node * )node->Next )->Prev = node->Prev;
|
||||
if( node->Prev )
|
||||
( ( SFG_Node * )node->Prev )->Next = node->Next;
|
||||
if( ( ( SFG_Node * )list->First ) == node )
|
||||
list->First = node->Next;
|
||||
if( (ln = (SFG_Node *)list->Last) == node )
|
||||
if( ( ( SFG_Node * )list->Last ) == node )
|
||||
list->Last = node->Prev;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user