mirror of
https://github.com/RGBCube/serenity
synced 2025-07-16 02:37:36 +00:00
LibC: fputs() shouldn't add a trailing newline, only puts().
This commit is contained in:
parent
1ee8597ce4
commit
1483af406f
1 changed files with 5 additions and 2 deletions
|
@ -164,12 +164,15 @@ int fputs(const char* s, FILE* stream)
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
return putc('\n', stream);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int puts(const char* s)
|
int puts(const char* s)
|
||||||
{
|
{
|
||||||
return fputs(s, stdout);
|
int rc = fputs(s, stdout);
|
||||||
|
if (rc < 0)
|
||||||
|
return rc;
|
||||||
|
return fputc('\n', stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearerr(FILE* stream)
|
void clearerr(FILE* stream)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue