00001 /* 00002 * puts.c - print a string onto the standard output stream 00003 */ 00004 /* $Header: /opt/proj/minix/cvsroot/src/lib/stdio/puts.c,v 1.1.1.1 2005/04/21 14:56:36 beng Exp $ */ 00005 00006 #include <stdio.h> 00007 00008 int 00009 puts(register const char *s) 00010 { 00011 register FILE *file = stdout; 00012 register int i = 0; 00013 00014 while (*s) { 00015 if (putc(*s++, file) == EOF) return EOF; 00016 else i++; 00017 } 00018 if (putc('\n', file) == EOF) return EOF; 00019 return i + 1; 00020 }
1.4.6