made a lot of changes
This commit is contained in:
@@ -8,5 +8,13 @@
|
||||
int
|
||||
puts(register const char *s)
|
||||
{
|
||||
return fputs(s, stdout);
|
||||
register FILE *file = stdout;
|
||||
register int i = 0;
|
||||
|
||||
while (*s) {
|
||||
if (putc(*s++, file) == EOF) return EOF;
|
||||
else i++;
|
||||
}
|
||||
if (putc('\n', file) == EOF) return EOF;
|
||||
return i + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user