]> git.mxchange.org Git - flightgear.git/commitdiff
Modified so that you can specify FG_DEBUGCLASS ***or*** FG_DEBUG_PRIORITY
authorcurt <curt>
Mon, 9 Mar 1998 22:44:58 +0000 (22:44 +0000)
committercurt <curt>
Mon, 9 Mar 1998 22:44:58 +0000 (22:44 +0000)
Main/fg_debug.c
Main/fg_debug.h

index 7da257fd59120e3d14ed27e3abedb03ee65b84f3..4ea83bfb1d9bca6e168edc2c1eba1864d30df49c 100644 (file)
@@ -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.
index 612d77772a01457f648dfea626d2c9ee737eeaac..aa3b44117971624b6fe7e14b8c50a74e524142c1 100644 (file)
@@ -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. */