blob: e09283ada5a6265d1402e2a36b5db554729ba20b [file] [log] [blame]
Chris Lattnerc1e20ac2002-03-08 23:20:52 +00001//===-- io.c - IO routines for LLVM libc Library ------------------*- C -*-===//
2//
3// A lot of this code is ripped gratuitously from glibc and libiberty.
4//
5//===----------------------------------------------------------------------===//
6
7int putchar(int);
8
9// The puts() function writes the string pointed to by s, followed by a
10// NEWLINE character, to the standard output stream stdout. On success the
11// number of characters written is returned; otherwise they return EOF.
12//
13int puts(const char *S) {
14 const char *Str = S;
15 while (*Str) putchar(*Str++);
16 putchar('\n');
17 return Str+1-S;
18}