1 #include "dictP.h"
2
3 #include <stdarg.h>
4 #include <stddef.h>
5 #include <maa.h>
6 #include <string.h>
7
8 /*
9 partial snprintf implementation:
10 - size PARAMETER IS COMPLETELY IGNORED
11 */
12
snprintf(char * str,size_t size,const char * format,...)13 int snprintf(char *str, size_t size, const char *format, ...)
14 {
15 va_list ap;
16
17 va_start (ap, format);
18 vsprintf (str, format, ap);
19 va_end (ap);
20
21 if (strlen (str) >= size)
22 err_fatal( __func__, "Buffer too small\n" );
23 }
24