nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] scan -width behaves oddly in 1.5RC3

2012-06-06 14:42:13
Ken Hornstein <kenh(_at_)pobox(_dot_)com> writes:
So my conjecture is that on your systmes if
snprintf() cannot fit a value in the width specified then it simply
refuses to put anything in there.  My reading of the specification
is that this is the correct behavior.

Whoops, I meant to say this is INCORRECT behavior.  But the more I look
at it the more I'm thinking you're getting tripped up by the old glibc
bug with snprintf().

Well, this is an ancient HPUX box, and it most certainly isn't using
glibc.  I think that portable software shouldn't be assuming very much
about what snprintf does when the string doesn't fit; it's only in
rather recent editions of POSIX that that's nailed down, and even there
it seems to be only implied, not stated explicitly, that the buffer
should be filled as far as possible.  I will take a look and see how
painful it is to remove the assumption.

                        regards, tom lane

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>