File:  [Research Unix] / researchv10no / libc / stdio / fprintf.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

/*
 * pANS stdio -- fprintf
 */
#include "iolib.h"

#ifdef V10
#define flags _flag
#define buf _base
#else
#endif

int fprintf(FILE *f, const char *fmt, ...){
	int n;
	va_list args;
	char buff[BUFSIZ];

	if (f->flags & _IONBF)
		setbuf(f, buff);
	va_start(args, fmt);
	n=vfprintf(f, fmt, args);
	va_end(args);
	if ((char *)f->buf == buff) {
		fflush(f);
		setbuf(f, NULL);
		}
	return n;
}

unix.superglobalmegacorp.com

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