Moved putchar to putchar.c

This commit is contained in:
jshepher 2004-12-20 01:46:40 +00:00
parent 7a5099b1d8
commit 96e0e3d2f9
2 changed files with 11 additions and 4 deletions

View 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;
}

View File

@ -9,7 +9,3 @@ int puts(const char *s)
return EOF;
return 0;
}
int putchar(int c) {
return fputc(c, stdout);
}