mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +08:00
Make sure fish_indent handles io erros
darcs-hash:20080113164905-75c98-b090ce79fb50a260874951525218cac65a097a6d.gz
This commit is contained in:
parent
87db9517e9
commit
8d2564291d
|
@ -55,9 +55,16 @@ static void read_file( FILE *f, string_buffer_t *b )
|
|||
{
|
||||
while( 1 )
|
||||
{
|
||||
errno=0;
|
||||
wint_t c = fgetwc( f );
|
||||
if( c == WEOF )
|
||||
{
|
||||
if( errno )
|
||||
{
|
||||
wperror(L"fgetwc");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user