Add clang-format configuration.

For now, it uses tabs like before, to make the diff easier to read/check.
One of following commits will switch it to spaces.
This commit is contained in:
Alexey Sokolov
2015-12-06 22:36:35 +00:00
parent 02f8749a8b
commit 33b0627d75
132 changed files with 12743 additions and 8904 deletions
+7 -5
View File
@@ -23,21 +23,23 @@
bool CDebug::stdoutIsTTY = true;
bool CDebug::debug =
#ifdef _DEBUG
true;
true;
#else
false;
false;
#endif
CDebugStream::~CDebugStream() {
timeval tTime;
gettimeofday(&tTime, nullptr);
time_t tSec = (time_t)tTime.tv_sec; // some systems (e.g. openbsd) define tv_sec as long int instead of time_t
time_t tSec = (time_t)tTime.tv_sec; // some systems (e.g. openbsd) define
// tv_sec as long int instead of time_t
tm tM;
tzset();// localtime_r requires this
tzset(); // localtime_r requires this
localtime_r(&tSec, &tM);
char sTime[20] = {};
strftime(sTime, sizeof(sTime), "%Y-%m-%d %H:%M:%S", &tM);
char sUsec[7] = {};
snprintf(sUsec, sizeof(sUsec), "%06lu", (unsigned long int)tTime.tv_usec);
std::cout << "[" << sTime << "." << sUsec << "] " << CString(this->str()).Escape_n(CString::EDEBUG) << std::endl;
std::cout << "[" << sTime << "." << sUsec << "] "
<< CString(this->str()).Escape_n(CString::EDEBUG) << std::endl;
}