Modified so that you can specify FG_DEBUGCLASS ***or*** FG_DEBUG_PRIORITY
This commit is contained in:
parent
ae862a3ab5
commit
0c84182bbb
2 changed files with 18 additions and 7 deletions
|
@ -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
|
// If no action to take, then don't bother with the semaphore
|
||||||
// activity Slight speed benefit.
|
// activity Slight speed benefit.
|
||||||
|
|
||||||
if( !(dbg_class & fg_DebugClass) || (prio < fg_DebugPriority) ) {
|
// printf("dbg_class = %d fg_DebugClass = %d\n", dbg_class, fg_DebugClass);
|
||||||
// Its zero anyway. But we might think about changing
|
// printf("prio = %d fg_DebugPriority = %d\n", prio, fg_DebugPriority);
|
||||||
// it upon some error condition?
|
|
||||||
return ret;
|
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;
|
FG_GRABDEBUGSEM;
|
||||||
|
@ -257,9 +265,12 @@ int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.8 1998/03/09 22:11:00 curt
|
/* Revision 1.9 1998/03/09 22:44:58 curt
|
||||||
/* Processed through the format-o-matic.
|
/* 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
|
* Revision 1.7 1998/02/16 13:39:43 curt
|
||||||
* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
|
* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
|
||||||
* tiles to occasionally be missing.
|
* tiles to occasionally be missing.
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef enum {
|
||||||
FG_AIRCRAFT= 0x00000400,
|
FG_AIRCRAFT= 0x00000400,
|
||||||
FG_UNDEFD = 0x00001000, // For range checking
|
FG_UNDEFD = 0x00001000, // For range checking
|
||||||
|
|
||||||
FG_ALL = 0xFFFFFFFFL // -1!
|
FG_ALL = 0xFFFFFFFF
|
||||||
} fgDebugClass;
|
} fgDebugClass;
|
||||||
|
|
||||||
/* NB: To add a priority, add it here. */
|
/* NB: To add a priority, add it here. */
|
||||||
|
|
Loading…
Reference in a new issue