summaryrefslogtreecommitdiffstats
path: root/runtime/GCCLibraries/libc/io.c
blob: e09283ada5a6265d1402e2a36b5db554729ba20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===-- io.c - IO routines for LLVM libc Library ------------------*- C -*-===//
// 
// A lot of this code is ripped gratuitously from glibc and libiberty.
//
//===----------------------------------------------------------------------===//

int putchar(int);

// The puts() function writes the string pointed to by s, followed by a 
// NEWLINE character, to the standard output stream stdout. On success the 
// number of characters written is returned; otherwise they return EOF.
//
int puts(const char *S) {
  const char *Str = S;
  while (*Str) putchar(*Str++);
  putchar('\n');
  return Str+1-S;
}