fputs() no longer prints an extra \n
This commit is contained in:
@@ -10,10 +10,5 @@ int fputs(const char *str, FILE *fp)
|
||||
}
|
||||
}
|
||||
|
||||
__fio_write(fp, "\n", 1);
|
||||
if (__fio_error(fp)) {
|
||||
return EOF;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
|
||||
int puts(const char *str)
|
||||
{
|
||||
return fputs(str, stdout);
|
||||
int r = fputs(str, stdout);
|
||||
if (r != 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
return fputc('\n', stdout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user