Printf does not return a truth value for failure.
These -incorrect- tests were replaced by calls to ferror.
This commit is contained in:
parent
09000449a4
commit
7556180ab3
|
@ -19,14 +19,17 @@ int i;
|
||||||
if(i>0)
|
if(i>0)
|
||||||
if( fputc(' ',_chanwr)==EOF) error(29);
|
if( fputc(' ',_chanwr)==EOF) error(29);
|
||||||
fprintf(_chanwr,"%d",i);
|
fprintf(_chanwr,"%d",i);
|
||||||
|
if( ferror(_chanwr) ) error(29);
|
||||||
}
|
}
|
||||||
_wrflt(f)
|
_wrflt(f)
|
||||||
double f;
|
double f;
|
||||||
{
|
{
|
||||||
if( fprintf(_chanwr,"%f",f)== EOF) error(29);
|
fprintf(_chanwr,"%f",f);
|
||||||
|
if( ferror(_chanwr) ) error(29);
|
||||||
}
|
}
|
||||||
_wrstr(s)
|
_wrstr(s)
|
||||||
String *s;
|
String *s;
|
||||||
{
|
{
|
||||||
if( fprintf(_chanwr,"\"%s\"",s->strval)== EOF) error(29);
|
fprintf(_chanwr,"\"%s\"",s->strval);
|
||||||
|
if( ferror(_chanwr) ) error(29);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue