Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - kcc-4/lib/stdio/fputs.c
There are 8 other files named fputs.c in the archive. Click here to see a list.
/*
 *	FPUTS - put a string to a stream
 *
 *	Copyright (c) 1986 by Ian Macky, SRI International
 */

#include "stdio.h"
#include "string.h"

int fputs(s, f)
register char *s;
register FILE *f;
{
    register int c;

    if (!_writeable(f))
	return EOF;
    if (f->sioflgs & _SIOF_BUF) {
	while ((c = *s++) && (c = putc(c, f)) != EOF) ;
	return c;
    } else
	return (write(f->siofd, s, strlen(s)) > 0) ? 0 : EOF;
}