00001
00002
00003
00004
00005
00006
00007
00008 #ifdef HAVE_CONFIG_H
00009 #include "config.h"
00010 #endif
00011
00012 #ifndef HAVE_VSNPRINTF
00013
00014 #ifndef NO_SYSTEM_INCLUDES
00015 #include <sys/types.h>
00016
00017 #include <stdio.h>
00018 #ifdef __STDC__
00019 #include <stdarg.h>
00020 #else
00021 #include <varargs.h>
00022 #endif
00023 #endif
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 int
00035 vsnprintf(str, n, fmt, ap)
00036 char *str;
00037 size_t n;
00038 const char *fmt;
00039 va_list ap;
00040 {
00041 n = 0;
00042
00043 #ifdef SPRINTF_RET_CHARPNT
00044 (void)vsprintf(str, fmt, ap);
00045 return (strlen(str));
00046 #else
00047 return (vsprintf(str, fmt, ap));
00048 #endif
00049 }
00050 #endif
00051