Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / clib / vsnprintf.c
blobeb9bbf482faa0c5082a4b2e2f83b218024eb61cb
1 /* $NetBSD$ */
3 #include "config.h"
5 #include <sys/types.h>
7 #include <stdio.h>
9 #ifdef __STDC__
10 #include <stdarg.h>
11 #else
12 #include <varargs.h>
13 #endif
16 * PUBLIC: #ifndef HAVE_VSNPRINTF
17 * PUBLIC: int vsnprintf __P((char *, size_t, const char *, ...));
18 * PUBLIC: #endif
20 int
21 vsnprintf(str, n, fmt, ap)
22 char *str;
23 size_t n;
24 const char *fmt;
25 va_list ap;
27 #ifdef SPRINTF_RET_CHARPNT
28 (void)vsprintf(str, fmt, ap);
29 return (strlen(str));
30 #else
31 return (vsprintf(str, fmt, ap));
32 #endif