mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Make sure fish_indent handles io erros
darcs-hash:20080113164905-75c98-b090ce79fb50a260874951525218cac65a097a6d.gz
This commit is contained in:
parent
87db9517e9
commit
8d2564291d
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue