linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #02538
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2303: fix MSVC debug output
------------------------------------------------------------
revno: 2303
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-11-23 18:14:48 +0100
message:
fix MSVC debug output
modified:
dcpp/DCPlusPlus.h
dcpp/ShareManager.cpp
dcpp/SimpleXML.cpp
dcpp/Socket.cpp
win32/QueueFrame.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/DCPlusPlus.h'
--- dcpp/DCPlusPlus.h 2010-07-10 14:36:48 +0000
+++ dcpp/DCPlusPlus.h 2010-11-23 17:14:48 +0000
@@ -31,15 +31,7 @@
{
va_list args;
va_start(args, format);
-
-#if defined _WIN32 && defined _MSC_VER
- char buf[512];
-
- _vsnprintf(buf, sizeof(buf), format, args);
- OutputDebugStringA(buf);
-#else // _WIN32
vprintf(format, args);
-#endif // _WIN32
va_end(args);
}
@@ -50,18 +42,11 @@
dcdebug("Assertion hit in %s(%d): " #exp "\n", __FILE__, __LINE__); \
if(1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #exp)) \
_CrtDbgBreak(); } } while(false)
-#define dcasserta(exp) dcassert(0)
#else
-#define dcasserta(exp) assert(exp)
#define dcassert(exp) assert(exp)
#endif
#define dcdrun(exp) exp
#else //_DEBUG
-#ifdef _MSC_VER
-#define dcasserta(exp) __assume(exp)
-#else
-#define dcasserta(exp)
-#endif // _WIN32
#define dcdebug if (false) printf
#define dcassert(exp)
#define dcdrun(exp)
=== modified file 'dcpp/ShareManager.cpp'
--- dcpp/ShareManager.cpp 2010-11-19 15:11:20 +0000
+++ dcpp/ShareManager.cpp 2010-11-23 17:14:48 +0000
@@ -1061,7 +1061,7 @@
}
break;
default:
- dcasserta(0);
+ dcassert(0);
break;
}
return false;
=== modified file 'dcpp/SimpleXML.cpp'
--- dcpp/SimpleXML.cpp 2010-02-11 21:44:13 +0000
+++ dcpp/SimpleXML.cpp 2010-11-23 17:14:48 +0000
@@ -68,7 +68,7 @@
case '>': aString.replace(i, 1, ">"); i+=4; break;
case '\'': aString.replace(i, 1, "'"); i+=6; break;
case '"': aString.replace(i, 1, """); i+=6; break;
- default: dcasserta(0);
+ default: dcassert(0);
}
}
// No need to convert back to acp since our utf8Header denotes we
=== modified file 'dcpp/Socket.cpp'
--- dcpp/Socket.cpp 2010-08-27 13:47:33 +0000
+++ dcpp/Socket.cpp 2010-11-23 17:14:48 +0000
@@ -75,7 +75,7 @@
sock = checksocket(socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP));
break;
default:
- dcasserta(0);
+ dcassert(0);
}
type = aType;
setBlocking(false);
=== modified file 'win32/QueueFrame.cpp'
--- win32/QueueFrame.cpp 2010-09-02 18:16:12 +0000
+++ win32/QueueFrame.cpp 2010-11-23 17:14:48 +0000
@@ -356,7 +356,7 @@
case QueueItem::NORMAL: display->columns[COLUMN_PRIORITY] = T_("Normal"); break;
case QueueItem::HIGH: display->columns[COLUMN_PRIORITY] = T_("High"); break;
case QueueItem::HIGHEST: display->columns[COLUMN_PRIORITY] = T_("Highest"); break;
- default: dcasserta(0); break;
+ default: dcassert(0); break;
}
}