David Laight wrote:
On Tue, Aug 02, 2005 at 10:35:59PM +0900, Mike McCormack wrote:
It's a little more complicated than you think, after you start handling
all the width modifiers, various floating point formats, etc.
Not to mention coding in the 'brokenness'!
On windows:
_snprintf(buff, 3, "ab" ) returns 2, buff = "ab<0>"
_snprintf(buff, 3, "abcd" ) returns -1, buff = "ab<0>"
but:
_snprintf(buff, 3, "abc" ) returns 3, buff = "abc"
without NUL terminating the string.
Do you replicate that?
David
I believe my attempt at this was entirely compatible with Windows'
behaviour (modulo some potential undiscovered bugs), including
deviations from MSDN. Unfortunately, it wasn't very well written, and I
can never seem to find the time to get the experience necessary to
become competent. If anyone wants to look at it though, try the archive
for wine-devel and wine-patches. If anyone has a *particular* interest,
I might even have a look at it again with the benefit of at least *some*
additional coding practice :). At least I could reduce the number of
HeapAllocs, though I imagine there are more fundamental problems...
Aneurin Price