Those functions are very useful to fight against buffer overflow and other nice things of the same kind. They work like printf() and snprintf() but you submit a limit to the size of output text ; you can then safely snprintf() into a buffer without any overflow problem.
nprintf() / vnprintf()
snprintf() / vsnprintf()
fnprintf() / vfnprintf()
asprintf() / vasprintf()
asnprintf() / vasnprintf()
Everything is thread aware (fully re-entrant) i.e you can use it with any multi-threaded system. It works on 32 and 64-bit platforms (and maybe higher). It works on ms-dos/16-bit. It works on Windows (win 3, win95, win98, winNT, win2000, etc). It works on Linux, OpenBSD, FreeBSD, NetBSD and so on.
The source code uses only standard C then it can be used everywhere without any special needs. Just copy and paste the file.
Released under the GNU Public License (GPL) and, at your option, under the modified BSD license.
For bug report, please contact -unavailable-
Source files: http://domainename.com/software/xnprintf.html
These details are provided for information only. No information here is legal advice and should not be used as such.