NAME
kjb_vsprintf - A version of vprintf that checks for buffer overflow and has some extras
SYNOPSIS
#include "l/l_sys_str.h"
Example compile flags (system dependent):
-DLINUX_386 -DLINUX_386_P4
-I/home/kobus/include
-L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
-lKJB -llapack -lblas -lg2c -lXext -lX11
long kjb_vsprintf
(
char *buff,
size_t max_len,
const char *format_str,
va_list ap
);
DESCRIPTION
This routine is mostly use to construct others (e.g. kjb_sprintf()). However,
it may useful outside this context, hence we export the routine.
This routine is similar to vprintf(), except that it checks for buffer
overflow. The extra formatting items described in kjb_fprintf() are
avaliable. Thus is it is more similar to vnprintf(), but that routine is not
universally available (at least at the time this routine was written).
We don't have a separate routine for when we want buffer overflow to be
checked becuase it should always be checked.
RETURNS
The number of characters written to the buffer.
WARNING
The second parameter of this routine is the size of the buffer. This is
DIFFERENT than sprintf!
SEEALSO
kjb_fprintf, kjb_sprintf
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTOR
Kobus Barnard
SEE ALSO
kjb_sprintf