Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/libstdio/snprintf.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/*
2
 * pANS stdio -- sprintf
3
 */
4
#include "iolib.h"
5
int snprintf(char *buf, int nbuf, const char *fmt, ...){
6
	int n;
7
	va_list args;
8
	FILE *f=sopenw();
9
	if(f==NULL)
10
		return 0;
11
	setvbuf(f, buf, _IOFBF, nbuf);
12
	va_start(args, fmt);
13
	n=vfprintf(f, fmt, args);
14
	va_end(args);
15
	sclose(f);
16
	return n;
17
}