wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
- if( -1 == err )
+ if( ( -1 == err ) && ( errno != EINTR ) )
fgWarning ( "freeglut select() error: %d", errno );
}
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
special_cb = FETCH_WCB( *window, SpecialUp );
}
- /* Is there a keyboard/special callback hooked for this window? */
+ /*
+ * Is there a keyboard/special callback hooked for this window?
+ */
if( keyboard_cb || special_cb )
{
XComposeStatus composeStatus;
KeySym keySym;
int len;
- /* Check for the ASCII/KeySym codes associated with the event: */
+ /*
+ * Check for the ASCII/KeySym codes associated with the event:
+ */
len = XLookupString( &event.xkey, asciiCode, sizeof(asciiCode),
&keySym, &composeStatus
);
- /* GLUT API tells us to have two separate callbacks... */
+ /*
+ * GLUT API tells us to have two separate callbacks...
+ */
if( len > 0 )
{
- /* ...one for the ASCII translateable keypresses... */
+ /*
+ * ...one for the ASCII translateable keypresses...
+ */
if( keyboard_cb )
{
fgSetWindow( window );
* XXX function (or perhaps invoke glutSetCursor())?
* XXX That is, why are we duplicating code, here, from
* XXX glutSetCursor()? The WIN32 code should be able to just
- * XXX call glutSetCursor() instead of defining two macros
+ * XXX call glutSetCurdsor() instead of defining two macros
* XXX and implementing a nested case in-line.
*/
case WM_SETCURSOR:
window->State.MouseX = mouse_pos.x;
window->State.MouseY = mouse_pos.y;
- /* Convert the Win32 keystroke codes to GLUTtish way */
+ /*
+ * Convert the Win32 keystroke codes to GLUTtish way
+ */
# define KEY(a,b) case a: keypress = b; break;
switch( wParam )
KEY( VK_INSERT, GLUT_KEY_INSERT );
case VK_DELETE:
- /* The delete key should be treated as an ASCII keypress: */
+ /*
+ * The delete key should be treated as an ASCII keypress:
+ */
INVOKE_WCB( *window, Keyboard,
( 127, window->State.MouseX, window->State.MouseY )
);
KEY( VK_INSERT, GLUT_KEY_INSERT );
case VK_DELETE:
- /* The delete key should be treated as an ASCII keypress: */
+ /*
+ * The delete key should be treated as an ASCII keypress:
+ */
INVOKE_WCB( *window, KeyboardUp,
( 127, window->State.MouseX, window->State.MouseY )
);
/*lRet = DefWindowProc( hWnd, uMsg, wParam, lParam ); */
break;
- /* Other messages that I have seen and which are not handled already */
+ /*
+ * Other messages that I have seen and which are not handled already
+ */
case WM_SETTEXT: /* 0x000c */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
/* Pass it on to "DefWindowProc" to set the window text */
break;
default:
- /* Handle unhandled messages */
+ /*
+ * Handle unhandled messages
+ */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
break;
}