fputs.c 230 B

123456789101112131415161718
  1. /*
  2. * fputs - print a string
  3. */
  4. /* $Id$ */
  5. #include <stdio.h>
  6. int
  7. fputs(register const char *s, register FILE *stream)
  8. {
  9. register int i = 0;
  10. while (*s)
  11. if (putc(*s++, stream) == EOF) return EOF;
  12. else i++;
  13. return i;
  14. }