games/tetris/input.c
/*
 * `sleep' for the current turn time (using select).
 * Eat any input that might be available.
 */
`sleep' for the current turn time (using select).
Eat any input that might be available.
` sleep ' for the current turn time ( using select ) . Eat any input that might be available .
void
tsleep()
{
	struct timeval tv;
	char c;
	tv.tv_sec = 0;
	tv.tv_usec = fallrate;
	while (TV_POS(&tv))
		if (rwait(&tv) && read(0, &c, 1) != 1)
			break;
}
void tsleep ( ) { struct timeval tv ; char c ; tv . tv_sec = 0 ; tv . tv_usec = fallrate ; while ( TV_POS ( & tv ) ) if ( rwait ( & tv ) && read ( 0 , & c , 1 ) != 1 ) break ; }
`sleep' for the current turn time (using select).
` sleep ' for the current turn time ( using select ) .