1 #include "config.h"
2
3 #include <sys/types.h>
4
5 #include <stdio.h>
6
7 #ifdef __STDC__
8 #include <stdarg.h>
9 #else
10 #include <varargs.h>
11 #endif
12
13 /*
14 * PUBLIC: #ifndef HAVE_VSNPRINTF
15 * PUBLIC: int vsnprintf __P((char *, size_t, const char *, ...));
16 * PUBLIC: #endif
17 */
18 int
vsnprintf(str,n,fmt,ap)19 vsnprintf(str, n, fmt, ap)
20 char *str;
21 size_t n;
22 const char *fmt;
23 va_list ap;
24 {
25 #ifdef SPRINTF_RET_CHARPNT
26 (void)vsprintf(str, fmt, ap);
27 return (strlen(str));
28 #else
29 return (vsprintf(str, fmt, ap));
30 #endif
31 }
32