1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Added an implementation of puts(3) because gcc needs it.

I still didn't add it to stdio.h since it's still stupid.
This commit is contained in:
Jonas 'Sortie' Termansen 2012-01-08 01:57:45 +01:00
parent 25d8551b26
commit 8eebe18922

View file

@ -47,3 +47,12 @@ int putchar(int c)
{
return fputc(c, stdout);
}
/* This function is quite stupid because of its trailing newline that fputs(3)
does not have - but it's still better than gets(3). I'd have left it out if
various programs didn't need it. */
int puts(const char* str)
{
return printf("%s\n", str) < 0 ? EOF : 1;
}