|
|
1.1 root 1: /*
2: * libc/stdio/puts.c
3: * ANSI-compliant C standard i/o library.
4: * puts()
5: * ANSI 4.9.7.10.
6: * Write string s to stdout.
7: * Append newline.
8: */
9:
10: #include <stdio.h>
11:
12: int
13: puts(s) const char *s;
14: {
15: while (*s)
16: if (putchar(*s++) == EOF && ferror(stdout))
17: return EOF;
18: if (putchar('\n') == EOF)
19: return EOF;
20: return 1;
21: }
22:
23: /* end of libc/stdio/puts.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.