NAME

kjb_sprintf - A version of sprintf 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_sprintf
(
	char *buff,
	size_t max_len,
	const char *format_str,
	...
);

DESCRIPTION

This routine is similar to sprintf(), except that it checks for buffer overflow. The extra formatting items described in kjb_fprintf() are avaliable. Thus is it is more similar to snprinf(), 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

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_vsprintf