/* 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,
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. */
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 */