On 07.01.2014 20:34, Simo Sorce wrote:
Ok fine, makes sense once explained (need this explanation in the
docs/headers), but then use a different name.
If I see safe_snprintf, I assume the full format capabilities of
snprintf, the name in this case is misleading.
That said I am not sure what's the best name you could use...
maybe strextend ? and the astrextend variant for allocated ones ?
I've called it safe_str_snprintf (and so on). Hopefully that's clear
enough. It is processing the familiar printf syntax, so it makes sense
to have that somewhere.
Updated header documentation as requested, and made other fixes from
your earlier review.
Cheers,
Stef