Bruno Haible <[EMAIL PROTECTED]> writes:

> Ben Pfaff wrote on Friday/Saturday:
>> The following patch attempts to remedy the situation.
>
> I cannot see the big picture in this change. You want a snprintf() whose
> return value is correct but which still doesn't support argument reordering
> on NetBSD and doesn't support %n on HP-UX? And an unchanged printf() and
> fprintf()? 

I want a [v]snprintf that always null-terminates its output
string (if the size argument is greater than zero), so that I can
safely call [v]snprintf, then treat the result as a
null-terminated string without having to check the return value
at all.  The pre-C99 [v]snprintfs don't necessarily do this, and
in particular Microsoft documents its _[v]snprintf to *not*
null-terminate if the output is too long.

> Please see the other mail ("Printf for gnulib") for a proposal
> how to get it all right.

Since there's momentum to fix all these problems at the same
time, I'll withdraw my proposal for a module, and work around the
problem for now.
-- 
Ben Pfaff 
[EMAIL PROTECTED]
http://benpfaff.org



Reply via email to