Echo Lineinitial commit9fd65008 years agoHistory
20 lines · 330 B · C
RawDownload
#include <inttypes.h>#include <u.h>#include <libc.h>#include "fmtdef.h" /* * generic routine for flushing a formatting buffer * to a file descriptor */int__fmtFdFlush(Fmt *f){	int n; 	n = (char*)f->to - (char*)f->start;	if(n && write((uintptr_t)f->farg, f->start, n) != n)		return 0;	f->to = f->start;	return 1;}