Re: AW: AW: AW: [xml] xmlTextWriter



On Wed, 2003-10-08 at 20:37, Daniel Veillard wrote:
On Wed, Oct 08, 2003 at 11:12:53AM +0200, Mickautsch, Alfred wrote:
M$:
_vsnprintf and _vsnwprintf return the number of characters written, not including the terminating null 
character, or a negative value if an output error occurs. For _vsnprintf, if the number of bytes to write 
exceeds buffer, then count bytes are written and -1 is returned.

See what I mean? And there exist other variations too.

  yes, that's called a broken infrastructure... get a real vsnprintf,

That's a little harsh. :-) The return value of vsnprintf was changed in
C99 (compared to C89). It's something that really needs to be checked in
configure.in (basically it could return the current glibc number, the
current Microsoft number or -1, like older glibc's did -- although I'm
not sure what standard the latter behaviour was following).

The vsnprintf and snprintf functions are really ugly to work with
portably, since you really want to be able to assume a C99-compatible
compiler, but that is often unrealistic.

Cheers,
Malcolm




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]