From 0c84182bbbad076b0abc75ed4f7348b80588f1ce Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 9 Mar 1998 22:44:58 +0000 Subject: [PATCH] Modified so that you can specify FG_DEBUGCLASS ***or*** FG_DEBUG_PRIORITY --- Main/fg_debug.c | 23 +++++++++++++++++------ Main/fg_debug.h | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Main/fg_debug.c b/Main/fg_debug.c index 7da257fd5..4ea83bfb1 100644 --- a/Main/fg_debug.c +++ b/Main/fg_debug.c @@ -227,10 +227,18 @@ int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... ) { // If no action to take, then don't bother with the semaphore // activity Slight speed benefit. - if( !(dbg_class & fg_DebugClass) || (prio < fg_DebugPriority) ) { - // Its zero anyway. But we might think about changing - // it upon some error condition? - return ret; + // printf("dbg_class = %d fg_DebugClass = %d\n", dbg_class, fg_DebugClass); + // printf("prio = %d fg_DebugPriority = %d\n", prio, fg_DebugPriority); + + if( !(dbg_class & fg_DebugClass) ) { + // Failed to match a specific debug class + if ( prio < fg_DebugPriority ) { + // priority is less than requested + + // "ret" is zero anyway. But we might think about changing + // it upon some error condition? + return ret; + } } FG_GRABDEBUGSEM; @@ -257,9 +265,12 @@ int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... ) { /* $Log$ -/* Revision 1.8 1998/03/09 22:11:00 curt -/* Processed through the format-o-matic. +/* Revision 1.9 1998/03/09 22:44:58 curt +/* Modified so that you can specify FG_DEBUGCLASS ***or*** FG_DEBUG_PRIORITY /* + * Revision 1.8 1998/03/09 22:11:00 curt + * Processed through the format-o-matic. + * * Revision 1.7 1998/02/16 13:39:43 curt * Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole * tiles to occasionally be missing. diff --git a/Main/fg_debug.h b/Main/fg_debug.h index 612d77772..aa3b44117 100644 --- a/Main/fg_debug.h +++ b/Main/fg_debug.h @@ -47,7 +47,7 @@ typedef enum { FG_AIRCRAFT= 0x00000400, FG_UNDEFD = 0x00001000, // For range checking - FG_ALL = 0xFFFFFFFFL // -1! + FG_ALL = 0xFFFFFFFF } fgDebugClass; /* NB: To add a priority, add it here. */ -- 2.39.2