示例#1
0
/**
   Test if the specified character sequence has been entered on the
   keyboard
*/
static int try_sequence( const char *seq )
{
	int j, k;
	wint_t c=0;
	
	for( j=0; 
	     seq[j] != '\0' && seq[j] == (c=input_common_readch( j>0 )); 
	     j++ )
		;

	if( seq[j] == '\0' )
	{		
		return 1;
	}
	else
	{
		input_common_unreadch(c);
		for(k=j-1; k>=0; k--)
			input_common_unreadch(seq[k]);
	}
	return 0;
}
示例#2
0
文件: input.c 项目: cardmagic/lucash
void input_unreadch( wint_t ch )
{
	input_common_unreadch( ch );
}