Update of /cvsroot/pure-data/externals/mrpeach/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17397
Modified Files: tcpclient.c Log Message: Use sprintf_s instead of snprintf if _MSC_VER defined
Index: tcpclient.c =================================================================== RCS file: /cvsroot/pure-data/externals/mrpeach/net/tcpclient.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcpclient.c 28 Nov 2006 16:44:18 -0000 1.3 --- tcpclient.c 1 Dec 2006 16:50:16 -0000 1.4 *************** *** 47,50 **** --- 47,54 ---- #endif
+ #ifdef _MSC_VER + #define snprintf sprintf_s + #endif + #define DEFPOLLTIME 20 /* check for input every 20 ms */
*************** *** 108,128 **** if (k < len) { - #ifdef MSW - sprintf_s(&hexStr[j], 4, "%02X ", buf[k]); - sprintf_s(&ascStr[i], 2, "%c", ((buf[k] >= 32) && (buf[k] <= 126))? buf[k]: '.'); - #else snprintf(&hexStr[j], 4, "%02X ", buf[k]); snprintf(&ascStr[i], 2, "%c", ((buf[k] >= 32) && (buf[k] <= 126))? buf[k]: '.'); - #endif } else { // the last line - #ifdef MSW - sprintf_s(&hexStr[j], 4, " "); - sprintf_s(&ascStr[i], 2, " "); - #else snprintf(&hexStr[j], 4, " "); snprintf(&ascStr[i], 2, " "); - #endif } } --- 112,122 ----