On Tue, 2002-04-30 at 20:15, Jon Berndt wrote: > I'd prefer to get away from using _snprintf, snprintf, or whatever. The > only reason we use them (IIRC) is to limit the length of an output string.
No, it allows the author of snprintf to guarantee that his code won't run off the end of the input string if the NULL character is not present. > This can be done in other ways, such as using the string class. AFAIK, the equivalent functionality is not available in the string class. It is from the strstream class, but that code ends up being horribly verbose when you want to control the width and/or precision of floating point conversions. >Since they > would not be used in performance critical areas, maybe that's an option? > > Jon > > > Does it make sense to have _snprintf() instead of snprintf()? I tried > > defining the function extern, but it wasn't found in the library. I > > suppose anther question would be, is it safe to use _snprintf() under > > windows and snprintf() everywhere else? FWIW, _snprintf() is defined in > > <stdio.h>. > -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
