question about config code

Graham Wilson bob at decoy.wox.org
Fri Nov 29 21:06:07 CET 2002


On Mon, Nov 25, 2002 at 08:14:40AM -0500, David Relson wrote:
> If you want to see more of what's happening, use command line options "-x 
> c" and "-v" to turn on some debugging info.  Use the attached patch and a 
> second "-v" for more info.  The "-x c" combo turns on DEBUG_CONFIG, i.e. 
> debugging for the config module.
> 
> The patch has been added to cvs, so running "cvs update" will update your 
> code to the latest and greatest.

your patch uses printf and not fprintf, which is what the rest of the
debug code uses.


Index: config.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/config.c,v
retrieving revision 1.60
diff -u -r1.60 config.c
--- config.c	29 Nov 2002 10:32:33 -0000	1.60
+++ config.c	29 Nov 2002 20:05:27 -0000
@@ -267,12 +266,12 @@
     for ( arg = parms; arg->name != NULL; arg += 1 )
     {
 	if (DEBUG_CONFIG(1))
-	    printf( "Testing:  %s\n", arg->name);
+	    fprintf( stderr, "Testing:  %s\n", arg->name);
 	if (strncmp(arg->name, line, len) == 0)
 	{
 	    bool ok = process_config_parameter(arg, val);
 	    if (DEBUG_CONFIG(1) && ok )
-		printf( "%s\n", "   Found it!");
+		fprintf( stderr, "%s\n", "   Found it!");
 	    return ok;
 	}
     }

--
gram



More information about the bogofilter-dev mailing list