]> git.mxchange.org Git - flightgear.git/blobdiff - Main/fg_debug.h
Incorporated code changes contributed by Charlie Hotchkiss
[flightgear.git] / Main / fg_debug.h
index 09943db0d6cf545d2a46169dcdb7fb7d9a10a84a..4aa9026136b23fb61de711dce04772ad81d73c66 100644 (file)
@@ -31,7 +31,7 @@
 /* NB:  To add a dbg_class, add it here, and add it to the structure
    in fg_debug.c
 */
-typedef enum {
+typedef enum{
   FG_NONE    = 0x00000000,
 
   FG_TERRAIN = 0x00000001,
@@ -45,20 +45,21 @@ typedef enum {
   FG_MATH    = 0x00000100,
   FG_EVENT   = 0x00000200,
   FG_AIRCRAFT= 0x00000400,
+  FG_UNDEFD  = 0x00001000, // For range checking
 
-  FG_ALL     = 0xFFFFFFFF
-} fgDebugClass;
+  FG_ALL     = 0xFFFFFFFFL  // -1!
+  } fgDebugClass;
 
 /* NB:  To add a priority, add it here.
 */
-typedef enum {
-  FG_BULK,     /* For frequent messages */ 
-  FG_DEBUG,    /* Less frequent debug type messages */
-  FG_INFO,      /* Informatory messages */
-  FG_WARN,     /* Possible impending problem */
-  FG_ALERT,    /* Very possible impending problem */
-  FG_EXIT,      /* Problem (no core) */
-  FG_ABORT      /* Abandon ship (core) */
+typedef enum  {
+  FG_BULK,         /* For frequent messages */
+  FG_DEBUG,        /* Less frequent debug type messages */
+  FG_INFO,          /* Informatory messages */
+  FG_WARN,         /* Possible impending problem */
+  FG_ALERT,         /* Very possible impending problem */
+  FG_EXIT,          /* Problem (no core) */
+  FG_ABORT          /* Abandon ship (core) */
 } fgDebugPriority;
 
 /* Initialize the debuggin stuff. */
@@ -122,9 +123,19 @@ void fgSetDebugOutput( FILE *out );
    processing of the message.**  Only one callback may be installed at a 
    time.
 */
-typedef int (*fgDebugCallback)(fgDebugClass, fgDebugPriority, char *outstr);
+
+//typedef int (*fgDebugCallback)(fgDebugClass, fgDebugPriority, char *outstr);
+//fgDebugCallback fgRegisterDebugCallback( fgDebugCallback callback );
+
+typedef int (*fgDebugCallback)( int DebugClass, int DebugPriority, char *outstr);
 fgDebugCallback fgRegisterDebugCallback( fgDebugCallback callback );
 
+// Leave these alone. Access intended for fg_debug and command line processing.
+//
+extern fgDebugClass    fg_DebugClass;
+extern fgDebugPriority fg_DebugPriority;
+
+extern FILE *          fg_DebugOutput;
 
 #endif /* _FG_DEBUG_H */