1989-05-30 13:34:25 +00:00
|
|
|
/*
|
|
|
|
* fputs - print a string
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
fputs(register const char *s, register FILE *stream)
|
|
|
|
{
|
1989-12-18 15:04:14 +00:00
|
|
|
register int i = 0;
|
1989-05-30 13:34:25 +00:00
|
|
|
|
|
|
|
while (*s)
|
1989-12-18 15:04:14 +00:00
|
|
|
if (putc(*s++, stream) == EOF) return EOF;
|
|
|
|
else i++;
|
1989-05-30 13:34:25 +00:00
|
|
|
|
1989-12-18 15:04:14 +00:00
|
|
|
return i;
|
1989-05-30 13:34:25 +00:00
|
|
|
}
|