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_fixcpp/sys/src/ape/lib/ap/stdio/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
 
6
int snprintf(char *buf, size_t nbuf, const char *fmt, ...){
7
	int n;
8
	va_list args;
9
	FILE *f=_IO_sopenw();
10
	if(f==NULL)
11
		return 0;
12
	setvbuf(f, buf, _IOFBF, nbuf);
13
	va_start(args, fmt);
14
	n=vfprintf(f, fmt, args);
15
	va_end(args);
16
	_IO_sclose(f);
17
	return n;
18
}