59cc89c2c2
files, curses, db, regex etc that we already have). The other glue will follow shortly. Obtained from: Keith Bostic <bostic@bostic.com>
32 lines
479 B
C
32 lines
479 B
C
#include "config.h"
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#ifdef __STDC__
|
|
#include <stdarg.h>
|
|
#else
|
|
#include <varargs.h>
|
|
#endif
|
|
|
|
/*
|
|
* PUBLIC: #ifndef HAVE_VSNPRINTF
|
|
* PUBLIC: int vsnprintf __P((char *, size_t, const char *, ...));
|
|
* PUBLIC: #endif
|
|
*/
|
|
int
|
|
vsnprintf(str, n, fmt, ap)
|
|
char *str;
|
|
size_t n;
|
|
const char *fmt;
|
|
va_list ap;
|
|
{
|
|
#ifdef SPRINTF_RET_CHARPNT
|
|
(void)vsprintf(str, fmt, ap);
|
|
return (strlen(str));
|
|
#else
|
|
return (vsprintf(str, fmt, ap));
|
|
#endif
|
|
}
|