mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Minor edits
darcs-hash:20051020120610-ac50b-62950ed81377c38979ea2967f915eaa0e7f01e33.gz
This commit is contained in:
24
reader.c
24
reader.c
@@ -2377,23 +2377,25 @@ static int read_i()
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Test if there are bytes available for reading on the specified file
|
||||
descriptor
|
||||
*/
|
||||
static int can_read( int fd )
|
||||
{
|
||||
struct pollfd pfd =
|
||||
{
|
||||
fd, POLLIN, 0
|
||||
}
|
||||
struct pollfd pfd[] =
|
||||
{
|
||||
{
|
||||
fd, POLLIN, 0
|
||||
}
|
||||
}
|
||||
;
|
||||
switch( poll( &pfd, 1, 0 ) )
|
||||
{
|
||||
case 1:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return poll( pfd, 1, 0 ) == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
Test if the specified character is in the private use area that fish uses to store internal characters
|
||||
Test if the specified character is in the private use area that
|
||||
fish uses to store internal characters
|
||||
*/
|
||||
static int wchar_private( wchar_t c )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user