File:  [Research Unix] / researchv10no / libc / stdio / fputs.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/* Copyright AT&T Bell Laboratories, 1993 */
#include	<stdio.h>

fputs(const char *s, FILE *iop)
{
	unsigned char *e, *t;
	for(;;) {
		t = iop->_ptr;
		e = t + iop->_cnt;
		while(*s && t < e)
			*t++ = *s++;
		iop->_cnt -= t - iop->_ptr;
		iop->_ptr = t;
		if(*s == 0)
			break;
		if(putc(*s++, iop) == EOF)
			return EOF;
	}
	return 0;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.