Circa 2000-Jul-25 12:26:18 +0200 dixit A. van Werven:
: Peter Mittermayer:
: [snprintf() not available]
:
: >From the snprintf man page:
: The snprintf() function is identical to sprintf() with the addition
: of the argument n, which specifies the size of the buffer referred
: to by s. The buffer is terminated with the null byte only if space
: is available.
:
: So, why not just write your own snprintf?
:
: Hope this helps,
I don't know Peter or anything about his abilities or desire for
challenging problems to solve, but i suspect it doesn't.
What would be better than having everyone who lacks snprintf roll their
own would be to find a suitable snprintf that could be included in
Blackbox for systems that lack it. The OpenBSD snprintf comes to mind;
it's under a BSD-ish license and is also used by the portable OpenSSH:
http://www.openssh.com/portable.html
The portable OpenSSH also includes some autoconf magic to detect
whether to use the included snprintf or not.
--
jim knoble | [EMAIL PROTECTED] | http://www.jmknoble.cx/