MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / TLogHelper

Method TLogHelper

src/External/CascLib/test/TLogHelper.cpp:220–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 //
219
220 TLogHelper(const char * szNewMainTitle = NULL, const TCHAR * szNewSubTitle1 = NULL, const TCHAR * szNewSubTitle2 = NULL)
221 {
222 // Fill the variables
223 memset(this, 0, sizeof(TLogHelper));
224 UserString = "";
225 TotalFiles = 1;
226 UserCount = 1;
227 UserTotal = 1;
228
229#ifdef TEST_PLATFORM_WINDOWS
230 InitializeCriticalSection(&Locker);
231 TickCount = GetTickCount();
232#endif
233
234 // Remember the startup time
235 SetStartTime();
236
237 // Save all three titles
238 szMainTitle = szNewMainTitle;
239 szSubTitle1 = szNewSubTitle1;
240 szSubTitle2 = szNewSubTitle2;
241
242 // Print the initial information
243 if(szNewMainTitle != NULL)
244 {
245#ifdef __CASCLIB_SELF__
246 char szMainTitleT[0x100] = {0};
247 size_t nLength;
248
249 nLength = TestStrPrintf(szMainTitleT, _countof(szMainTitleT), "-- \"%s\" --", szNewMainTitle);
250 while(nLength < 90)
251 szMainTitleT[nLength++] = '-';
252 if(nLength < sizeof(szMainTitleT))
253 szMainTitleT[nLength++] = 0;
254
255 printf("%s\n", szMainTitleT);
256#endif
257
258#ifdef __STORMLIB_SELF__
259 TCHAR szMainTitleT[0x100] = {0};
260
261 // Copy the UNICODE main title
262 TestStrCopy(szMainTitleT, _countof(szMainTitleT), szMainTitle);
263
264 if(szSubTitle1 != NULL && szSubTitle2 != NULL)
265 nPrevPrinted = _tprintf(_T("\rRunning %s (%s+%s) ..."), szMainTitleT, szSubTitle1, szSubTitle2);
266 else if(szSubTitle1 != NULL)
267 nPrevPrinted = _tprintf(_T("\rRunning %s (%s) ..."), szMainTitleT, szSubTitle1);
268 else
269 nPrevPrinted = _tprintf(_T("\rRunning %s ..."), szMainTitleT);
270#endif
271 }
272 }
273
274 ~TLogHelper()
275 {

Callers

nothing calls this directly

Calls 2

TestStrPrintfFunction · 0.85
TestStrCopyFunction · 0.85

Tested by

no test coverage detected