fputs() no longer prints an extra \n

This commit is contained in:
Max Wash
2020-12-21 23:24:04 +00:00
parent 8f0d0a99f7
commit d397eac2d9
2 changed files with 6 additions and 6 deletions

View File

@@ -10,10 +10,5 @@ int fputs(const char *str, FILE *fp)
}
}
__fio_write(fp, "\n", 1);
if (__fio_error(fp)) {
return EOF;
}
return 0;
}

View File

@@ -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);
}