1989-05-30 13:34:25 +00:00
|
|
|
/*
|
|
|
|
* fputs - print a string
|
|
|
|
*/
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1989-05-30 13:34:25 +00:00
|
|
|
|
2018-06-21 20:33:47 +00:00
|
|
|
#include <stdio.h>
|
1989-05-30 13:34:25 +00:00
|
|
|
|
2018-06-21 20:33:47 +00:00
|
|
|
int fputs(register const char* s, register FILE* stream)
|
1989-05-30 13:34:25 +00:00
|
|
|
{
|
1989-12-18 15:04:14 +00:00
|
|
|
register int i = 0;
|
1989-05-30 13:34:25 +00:00
|
|
|
|
2018-06-21 20:33:47 +00:00
|
|
|
while (*s)
|
|
|
|
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
|
|
|
}
|