scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

snprintf.c (235B)


      1 #include <stdarg.h>
      2 #include <stdio.h>
      3 
      4 #undef snprintf
      5 
      6 int
      7 snprintf(char *restrict s, size_t siz, const char *restrict fmt, ...)
      8 {
      9 	int r;
     10 	va_list va;
     11 
     12 	va_start(va, fmt);
     13 	r = vsnprintf(s, siz, fmt, va);
     14 	va_end(va);
     15 
     16 	return r;
     17 }