Re: [Flightgear-devel] JSBSim Build Problem Under MSVC
I second that idea to use streams instead of old C formating. We can use ostrstream, or better, ostringstream classes -Fred - Original Message - From: Jon Berndt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 01, 2002 5:15 AM Subject: RE: [Flightgear-devel] JSBSim Build Problem Under MSVC 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. This can be done in other ways, such as using the string class. 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. ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
[Flightgear-devel] JSBSim Build Problem Under MSVC
Here is one you will all like. It appears as if MSVC does not define snprintf() in any of its headers, but it does have _snprintf() with the same parameter list. RG! In JSBSim/FGFCS.cpp, I had to add a #define to map _snprintf() to snprintf( ) in order to get the latest CVS updates to build. I wasn't sure if replacing snprintf() with sprintf() would be safe, so I didn't. Jonathan Polley ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] JSBSim Build Problem Under MSVC
On Tue, 2002-04-30 at 17:24, Jonathan Polley wrote: Here is one you will all like. It appears as if MSVC does not define snprintf() in any of its headers, but it does have _snprintf() with the same parameter list. RG! In JSBSim/FGFCS.cpp, I had to add a #define to map _snprintf() to snprintf( ) Sorry about that. in order to get the latest CVS updates to build. I wasn't sure if replacing snprintf() with sprintf() would be safe, so I didn't. It's not, that's why snprintf exists. Jonathan Polley ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel -- 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
Re: [Flightgear-devel] JSBSim Build Problem Under MSVC
On Tuesday, April 30, 2002, at 08:57 PM, Tony Peden wrote: On Tue, 2002-04-30 at 17:24, Jonathan Polley wrote: In JSBSim/FGFCS.cpp, I had to add a #define to map _snprintf() to snprintf( ) Sorry about that. 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 Jonathan Polley ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
RE: [Flightgear-devel] JSBSim Build Problem Under MSVC
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. This can be done in other ways, such as using the string class. 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. smime.p7s Description: application/pkcs7-signature