]> git.mxchange.org Git - flightgear.git/commitdiff
Tweaks to compile with g++.
authorcurt <curt>
Sun, 1 Feb 1998 03:34:59 +0000 (03:34 +0000)
committercurt <curt>
Sun, 1 Feb 1998 03:34:59 +0000 (03:34 +0000)
Main/fg_debug.c
Main/fg_debug.h

index 16498d7c33c3bc0d388fe69ae8380978fb8ac007..7cc80b7231a0376fca7a9e6d88d411964f820fd4 100644 (file)
@@ -52,7 +52,7 @@ static fgDebugCallback fg_DebugCallback = NULL;
  */
 static struct {
   char *str;
-  fgDebugClass class;
+  fgDebugClass dbg_class;
 } fg_DebugClasses[] = {
   { "FG_NONE",    0x00000000 },
   { "FG_TERRAIN", 0x00000001 },
@@ -147,7 +147,7 @@ fgDebugClass fgDebugStrToClass( char *str )
       if( fg_DebugClasses[i].str == NULL ) {
        fprintf( stderr, "fg_debug.c: Could not find message class '%s'\n", pt ); 
       } else {
-       val |= fg_DebugClasses[i].class;
+       val |= fg_DebugClasses[i].dbg_class;
       }
     }
   }
@@ -166,10 +166,10 @@ void fgSetDebugOutput( FILE *out )
 
 
 /* fgSetDebugLevels =======================================================*/
-void fgSetDebugLevels( fgDebugClass class, fgDebugPriority prio )
+void fgSetDebugLevels( fgDebugClass dbg_class, fgDebugPriority prio )
 {
   FG_GRABDEBUGSEM;
-  fg_DebugClass = class;
+  fg_DebugClass = dbg_class;
   fg_DebugPriority = prio;
   FG_RELEASEDEBUGSEM;
 }
@@ -188,20 +188,20 @@ fgDebugCallback fgRegisterDebugCallback( fgDebugCallback callback )
 
 
 /* fgPrintf ===============================================================*/
-int fgPrintf( fgDebugClass class, fgDebugPriority prio, char *fmt, ... )
+int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... )
 {
   char szOut[1024+1];
   int ret = 0;
 
   FG_GRABDEBUGSEM;
 
-  if( !(class & fg_DebugClass) || (prio < fg_DebugPriority) ) {
+  if( !(dbg_class & fg_DebugClass) || (prio < fg_DebugPriority) ) {
     FG_RELEASEDEBUGSEM;
     return 0;
   } 
   ret = vsprintf( szOut, fmt, (&fmt+1));
 
-  if( fg_DebugCallback!=NULL && fg_DebugCallback(class, prio, szOut) ) {
+  if( fg_DebugCallback!=NULL && fg_DebugCallback(dbg_class, prio, szOut) ) {
     FG_RELEASEDEBUGSEM;
     return ret;
   } 
index e341286536112d717d992e8a7ae5793458da3c6c..662869ad61d3772b4510c76c42c1e67afbc487f6 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <stdio.h>
 
-/* NB:  To add a class, add it here, and add it to the structure
+/* NB:  To add a dbg_class, add it here, and add it to the structure
    in fg_debug.c
 */
 typedef enum {
@@ -81,16 +81,16 @@ void fgInitDebug( void );
    greater than or equal to fg_DebugPriority and in the current debug class 
    (fg_DebugClass) are printed.
 */
-int fgPrintf( fgDebugClass class, fgDebugPriority prio, char *fmt, ... ); 
+int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... ); 
 
 
 /* fgSetDebugLevels()
 
    Expects:
-   class      Bitmask representing classes to display.
+   dbg_class      Bitmask representing classes to display.
    prio       Minimum priority of messages to display.
 */
-void fgSetDebugLevels( fgDebugClass class, fgDebugPriority prio );
+void fgSetDebugLevels( fgDebugClass dbg_class, fgDebugPriority prio );
 
 /* fgSetDebugOutput()