c++ - tchar.h error in _stprintf
- Wu Yongwei (6/6) Jan 01 2004 Line 345 of tchar.h is wrong. It is
- Walter (4/10) Jan 03 2004 No, I think _snprintf is right. Things are moving towards checked buffer
- Matthew (2/19) Jan 03 2004
- Wu Yongwei (8/23) Jan 14 2004 I don't think so. Check MSDN:
- Jan Knepper (6/41) Jan 15 2004 --
- Wu Yongwei (10/40) Jan 16 2004 Sorry, what standard?! The C standard never mentions anything about tcha...
- Matthew (8/49) Jan 16 2004 I've just looked in the standard, and there is no ???tprintf. Are you
- Walter (1/1) Jan 23 2004 Fixed. -Walter
Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 01 2004
No, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked. "Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 03 2004
No, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked.Still sounds wrong to me. Wouldn't it be _stnprintf? It's not a subtle change; it will break code."Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 03 2004
I don't think so. Check MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_sprintf.2c_.swprintf.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__snprintf.2c_._snwprintf.asp It is _sntprintf that maps to _snprintf, but not _stprintf. Your include file BREAKS code. Best regards, Wu Yongwei In article <bt886a$2t6r$1 digitaldaemon.com>, Walter says...No, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked. "Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 14 2004
Check the STANDARD... I think MSDN has this wrong! Wu Yongwei wrote:I don't think so. Check MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_sprintf.2c_.swprintf.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__snprintf.2c_._snwprintf.asp It is _sntprintf that maps to _snprintf, but not _stprintf. Your include file BREAKS code. Best regards, Wu Yongwei In article <bt886a$2t6r$1 digitaldaemon.com>, Walter says...-- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.orgNo, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked. "Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 15 2004
Sorry, what standard?! The C standard never mentions anything about tchar.h or _stprintf. In fact, the prefixing underscore in the name "_stprintf" has already told you that it is NON-standard. The whole tchar stuff is defined by Microsoft. Microsoft IS the standard, in this case. I never see any Win32 compiler other than DMC deviate from the MSDN documentation. I have checked with MSVC, MinGW GCC, and BCC. This behaviour is specific to DMC and BREAKS code! Regards, Wu Yongwei In article <bu69s9$2br8$1 digitaldaemon.com>, Jan Knepper says...Check the STANDARD... I think MSDN has this wrong! Wu Yongwei wrote:I don't think so. Check MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_sprintf.2c_.swprintf.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__snprintf.2c_._snwprintf.asp It is _sntprintf that maps to _snprintf, but not _stprintf. Your include file BREAKS code. Best regards, Wu Yongwei In article <bt886a$2t6r$1 digitaldaemon.com>, Walter says...No, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked. "Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf
Jan 16 2004
I've just looked in the standard, and there is no ???tprintf. Are you walking about an amendment? If so, what is it? I find it *really* hard to believe that DMC++ has it correct. "Jan Knepper" <jan smartsoft.us> wrote in message news:bu69s9$2br8$1 digitaldaemon.com...Check the STANDARD... I think MSDN has this wrong! Wu Yongwei wrote:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_sprintf.2c_.swprintf.aspI don't think so. Check MSDN:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__snprintf.2c_._snwprintf.aspfileIt is _sntprintf that maps to _snprintf, but not _stprintf. Your includeBREAKS code. Best regards, Wu Yongwei In article <bt886a$2t6r$1 digitaldaemon.com>, Walter says...-- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.orgNo, I think _snprintf is right. Things are moving towards checked buffer sizes, and sprintf is not checked. "Wu Yongwei" <Wu_member pathlink.com> wrote in message news:bt325l$1982$1 digitaldaemon.com...Line 345 of tchar.h is wrong. It is #define _stprintf _snprintf while it should be #define _stprintf sprintf Best regards, Wu Yongwei
Jan 16 2004