8000 minix/lib/stdio/puts.c at v3.1.2a · devinblood/minix · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
executable file
·
20 lines (17 loc) · 321 Bytes

puts.c

File metadata and controls

executable file
·
20 lines (17 loc) · 321 Bytes
/*
* puts.c - print a string onto the standard output stream
*/
/* $Header$ */
#include <stdio.h>
int
puts(register const char *s)
{
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;
}
0