From ce3fa54da69c118ede869dd69307ac3c5a63ce9a Mon Sep 17 00:00:00 2001 From: curt Date: Sun, 1 Feb 1998 03:34:59 +0000 Subject: [PATCH] Tweaks to compile with g++. --- Main/fg_debug.c | 14 +++++++------- Main/fg_debug.h | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Main/fg_debug.c b/Main/fg_debug.c index 16498d7c3..7cc80b723 100644 --- a/Main/fg_debug.c +++ b/Main/fg_debug.c @@ -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; } diff --git a/Main/fg_debug.h b/Main/fg_debug.h index e34128653..662869ad6 100644 --- a/Main/fg_debug.h +++ b/Main/fg_debug.h @@ -28,7 +28,7 @@ #include -/* 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() -- 2.39.2