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,12 +1380,12 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetSystemMetrics( SM_SWAPBUTTON ) )
|
if( GetSystemMetrics( SM_SWAPBUTTON ) )
|
||||||
{
|
{
|
||||||
if ( button == GLUT_LEFT_BUTTON )
|
if( button == GLUT_LEFT_BUTTON )
|
||||||
button = GLUT_RIGHT_BUTTON;
|
button = GLUT_RIGHT_BUTTON;
|
||||||
else
|
else
|
||||||
if ( button == GLUT_RIGHT_BUTTON )
|
if( button == GLUT_RIGHT_BUTTON )
|
||||||
button = GLUT_LEFT_BUTTON;
|
button = GLUT_LEFT_BUTTON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -362,7 +362,8 @@ static void fghDisplayMenuBox( SFG_Menu* menu )
|
|||||||
/*
|
/*
|
||||||
* Have the label drawn, character after character:
|
* 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
|
* If it's a submenu, draw a right arrow
|
||||||
@ -674,15 +675,20 @@ void fghCalculateMenuBoxSize( void )
|
|||||||
/*
|
/*
|
||||||
* Update the menu entry's width value
|
* Update the menu entry's width value
|
||||||
*/
|
*/
|
||||||
menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT,
|
menuEntry->Width = glutBitmapLength(
|
||||||
(unsigned char *) menuEntry->Text );
|
FREEGLUT_MENU_FONT,
|
||||||
|
(unsigned char *)menuEntry->Text
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the entry is a submenu, then it needs to be wider to
|
* If the entry is a submenu, then it needs to be wider to
|
||||||
* accomodate the arrow. JCJ 31 July 2003
|
* accomodate the arrow. JCJ 31 July 2003
|
||||||
*/
|
*/
|
||||||
if (menuEntry->SubMenu )
|
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
|
* 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)
|
void fgListRemove(SFG_List *list, SFG_Node *node)
|
||||||
{
|
{
|
||||||
SFG_Node *ln;
|
if( node->Next )
|
||||||
|
( ( SFG_Node * )node->Next )->Prev = node->Prev;
|
||||||
if( (ln = (SFG_Node *)node->Next) != NULL )
|
if( node->Prev )
|
||||||
ln->Prev = node->Prev;
|
( ( SFG_Node * )node->Prev )->Next = node->Next;
|
||||||
if( (ln = (SFG_Node *)node->Prev) != NULL )
|
if( ( ( SFG_Node * )list->First ) == node )
|
||||||
ln->Next = node->Next;
|
|
||||||
if( (ln = (SFG_Node *)list->First) == node )
|
|
||||||
list->First = node->Next;
|
list->First = node->Next;
|
||||||
if( (ln = (SFG_Node *)list->Last) == node )
|
if( ( ( SFG_Node * )list->Last ) == node )
|
||||||
list->Last = node->Prev;
|
list->Last = node->Prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user