sprintf(3s) query

Guy Harris guy at auspex.UUCP
Sat Dec 10 03:54:04 AEST 1988


>Actually the VAX version is wrong.  sprintf() is supposed to return int.
>This wasn't clearly specified in the "good old days", and since one
>implementation accidentally returned the buffer address, somebody thought
>that was supposed to be the definition.

Err, umm, accidentally or deliberately?  It wasn't specified *at all* in
the V7 documentation, as I remember, but at least one piece of *System
III* thought it should return the buffer address (one of the SCCS
commands) - which is kind of amusing, considering the behavior had been
changed by then.



More information about the Comp.lang.c mailing list