From b9fad1ab2ad3bd87bff05c4688c978d582ada438 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 15 May 2012 22:27:48 +0100 Subject: Upstream version 2.08rc7 --- lib/snprintf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/snprintf.c (limited to 'lib/snprintf.c') diff --git a/lib/snprintf.c b/lib/snprintf.c new file mode 100644 index 0000000..01734dc --- /dev/null +++ b/lib/snprintf.c @@ -0,0 +1,25 @@ +/* + * snprintf() + * + * Implement snprintf() in terms of vsnprintf() + */ + +#include "compiler.h" + +#include +#include +#include + +#include "nasmlib.h" + +int snprintf(char *str, size_t size, const char *format, ...) +{ + va_list ap; + int rv; + + va_start(ap, format); + rv = vsnprintf(str, size, format, ap); + va_end(ap); + + return rv; +} -- cgit v1.2.3