repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Expand PMF_FN_* macros.
[netbsd-mini2440.git]
/
dist
/
nvi
/
clib
/
vsnprintf.c
blob
eb9bbf482faa0c5082a4b2e2f83b218024eb61cb
1
/* $NetBSD$ */
2
3
#include
"config.h"
4
5
#include <sys/types.h>
6
7
#include <stdio.h>
8
9
#ifdef __STDC__
10
#include <stdarg.h>
11
#else
12
#include <varargs.h>
13
#endif
14
15
/*
16
* PUBLIC: #ifndef HAVE_VSNPRINTF
17
* PUBLIC: int vsnprintf __P((char *, size_t, const char *, ...));
18
* PUBLIC: #endif
19
*/
20
int
21
vsnprintf
(
str
,
n
,
fmt
,
ap
)
22
char
*
str
;
23
size_t
n
;
24
const char
*
fmt
;
25
va_list
ap
;
26
{
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
33
}