Some build fixes for DEBUG=1.
This commit is contained in:
parent
e7bcffbb59
commit
6c6fcaf95b
@ -47,11 +47,13 @@ extern "C" {
|
|||||||
PRINT(("%s\t", #OBJ)); \
|
PRINT(("%s\t", #OBJ)); \
|
||||||
(OBJ).PrintToStream(); \
|
(OBJ).PrintToStream(); \
|
||||||
} ((void)0)
|
} ((void)0)
|
||||||
#define TRACE() _debugPrintf("File: %s, Line: %d, Thread: %ld\n", \
|
#define TRACE() _debugPrintf("File: %s, Line: %d, Thread: %" \
|
||||||
__FILE__, __LINE__, find_thread(NULL))
|
B_PRId32 "\n", __FILE__, __LINE__, \
|
||||||
|
find_thread(NULL))
|
||||||
|
|
||||||
#define SERIAL_TRACE() _sPrintf("File: %s, Line: %d, Thread: %ld\n", \
|
#define SERIAL_TRACE() _sPrintf("File: %s, Line: %d, Thread: %" \
|
||||||
__FILE__, __LINE__, find_thread(NULL))
|
B_PRId32 "\n", __FILE__, __LINE__, \
|
||||||
|
find_thread(NULL))
|
||||||
|
|
||||||
#define DEBUGGER(MSG) if (_rtDebugFlag) debugger(MSG)
|
#define DEBUGGER(MSG) if (_rtDebugFlag) debugger(MSG)
|
||||||
#if !defined(ASSERT)
|
#if !defined(ASSERT)
|
||||||
|
@ -562,14 +562,16 @@ PicturePlayer::Play(void **callBackTable, int32 tableEntries, void *userData)
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
numOps++;
|
numOps++;
|
||||||
#if DEBUG > 1
|
#if DEBUG > 1
|
||||||
fprintf(file, "executed in %lld usecs\n", system_time() - startOpTime);
|
fprintf(file, "executed in %" B_PRId64 " usecs\n", system_time()
|
||||||
|
- startOpTime);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
// TODO: what if too much was read, should we return B_ERROR?
|
// TODO: what if too much was read, should we return B_ERROR?
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
fprintf(file, "Done! %ld ops, rendering completed in %lld usecs.\n", numOps, system_time() - startTime);
|
fprintf(file, "Done! %" B_PRId32 " ops, rendering completed in %"
|
||||||
|
B_PRId64 " usecs.\n", numOps, system_time() - startTime);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
#endif
|
#endif
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
@ -903,7 +903,7 @@ OpenWithPoseView::HandleMessageDropped(BMessage* DEBUG_ONLY(message))
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
// in debug mode allow tweaking the colors
|
// in debug mode allow tweaking the colors
|
||||||
const rgb_color* color;
|
const rgb_color* color;
|
||||||
int32 size;
|
ssize_t size;
|
||||||
// handle roColour-style color drops
|
// handle roColour-style color drops
|
||||||
if (message->FindData("RGBColor", 'RGBC', (const void**)&color, &size) == B_OK) {
|
if (message->FindData("RGBColor", 'RGBC', (const void**)&color, &size) == B_OK) {
|
||||||
SetViewColor(*color);
|
SetViewColor(*color);
|
||||||
|
@ -299,7 +299,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref)
|
|||||||
timeData.tm_min = 0;
|
timeData.tm_min = 0;
|
||||||
nextHour = mktime(&timeData);
|
nextHour = mktime(&timeData);
|
||||||
|
|
||||||
PRINT(("%ld minutes, %ld seconds till next hour\n",
|
PRINT(("%" B_PRId32 " minutes, %" B_PRId32 " seconds till next hour\n",
|
||||||
(nextHour - now) / 60, (nextHour - now) % 60));
|
(nextHour - now) / 60, (nextHour - now) % 60));
|
||||||
|
|
||||||
time_t nextMinute = now + 60;
|
time_t nextMinute = now + 60;
|
||||||
@ -308,7 +308,7 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref)
|
|||||||
timeData.tm_sec = 0;
|
timeData.tm_sec = 0;
|
||||||
nextMinute = mktime(&timeData);
|
nextMinute = mktime(&timeData);
|
||||||
|
|
||||||
PRINT(("%ld seconds till next minute\n", nextMinute - now));
|
PRINT(("%" B_PRId32 " seconds till next minute\n", nextMinute - now));
|
||||||
|
|
||||||
bigtime_t delta;
|
bigtime_t delta;
|
||||||
if (fQueryListContainer->DynamicDateRefreshEveryMinute())
|
if (fQueryListContainer->DynamicDateRefreshEveryMinute())
|
||||||
@ -325,16 +325,18 @@ BQueryPoseView::InitDirentIterator(const entry_ref* ref)
|
|||||||
int32 hoursTillMidnight = minutesTillMidnight/60;
|
int32 hoursTillMidnight = minutesTillMidnight/60;
|
||||||
minutesTillMidnight %= 60;
|
minutesTillMidnight %= 60;
|
||||||
|
|
||||||
PRINT(("%ld hours, %ld minutes, %ld seconds till midnight\n",
|
PRINT(("%" B_PRId32 " hours, %" B_PRId32 " minutes, %" B_PRId32
|
||||||
hoursTillMidnight, minutesTillMidnight, secondsTillMidnight));
|
" seconds till midnight\n", hoursTillMidnight, minutesTillMidnight,
|
||||||
|
secondsTillMidnight));
|
||||||
|
|
||||||
int32 refreshInSeconds = delta % 60;
|
int32 refreshInSeconds = delta % 60;
|
||||||
int32 refreshInMinutes = delta / 60;
|
int32 refreshInMinutes = delta / 60;
|
||||||
int32 refreshInHours = refreshInMinutes / 60;
|
int32 refreshInHours = refreshInMinutes / 60;
|
||||||
refreshInMinutes %= 60;
|
refreshInMinutes %= 60;
|
||||||
|
|
||||||
PRINT(("next refresh in %ld hours, %ld minutes, %ld seconds\n",
|
PRINT(("next refresh in %" B_PRId32 " hours, %" B_PRId32 "minutes, %"
|
||||||
refreshInHours, refreshInMinutes, refreshInSeconds));
|
B_PRId32 " seconds\n", refreshInHours, refreshInMinutes,
|
||||||
|
refreshInSeconds));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// bump up to microseconds
|
// bump up to microseconds
|
||||||
|
@ -179,12 +179,12 @@ IconSpewer::DrawSomeNew()
|
|||||||
view->SetHighColor(Color(0, 0, 0));
|
view->SetHighColor(Color(0, 0, 0));
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
if (cycleTime) {
|
if (cycleTime) {
|
||||||
sprintf(buffer, "last cycle time %Ld ms", cycleTime/1000);
|
sprintf(buffer, "last cycle time %" B_PRId64 " ms", cycleTime/1000);
|
||||||
view->DrawString(buffer, BPoint(20, bounds.bottom - 20));
|
view->DrawString(buffer, BPoint(20, bounds.bottom - 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numDrawn) {
|
if (numDrawn) {
|
||||||
sprintf(buffer, "average draw time %Ld us per icon",
|
sprintf(buffer, "average draw time %" B_PRId64 " us per icon",
|
||||||
watch.ElapsedTime() / numDrawn);
|
watch.ElapsedTime() / numDrawn);
|
||||||
view->DrawString(buffer, BPoint(20, bounds.bottom - 30));
|
view->DrawString(buffer, BPoint(20, bounds.bottom - 30));
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ PoseInfo::EndianSwap(void* castToThis)
|
|||||||
void
|
void
|
||||||
PoseInfo::PrintToStream()
|
PoseInfo::PrintToStream()
|
||||||
{
|
{
|
||||||
PRINT(("%s, inode:%Lx, location %f %f\n",
|
PRINT(("%s, inode:%" B_PRIx64 ", location %f %f\n",
|
||||||
fInvisible ? "hidden" : "visible",
|
fInvisible ? "hidden" : "visible",
|
||||||
fInitedDirectory, fLocation.x, fLocation.y));
|
fInitedDirectory, fLocation.x, fLocation.y));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user