mirror of
https://github.com/cahirwpz/libnix.git
synced 2025-11-19 16:00:58 +00:00
Moved putchar to putchar.c
This commit is contained in:
11
libnix/sources/nix/stdio/putchar.c
Normal file
11
libnix/sources/nix/stdio/putchar.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int puts(const char *s)
|
||||
{
|
||||
while(*s)
|
||||
if(fputc(*s++,stdout)==EOF)
|
||||
return EOF;
|
||||
if(fputc('\n',stdout)==EOF)
|
||||
return EOF;
|
||||
return 0;
|
||||
}
|
||||
@ -9,7 +9,3 @@ int puts(const char *s)
|
||||
return EOF;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int putchar(int c) {
|
||||
return fputc(c, stdout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user