Re: [evolution-patches] [mailer+camel] #72184 Spam Checking is very loud




Instead of this:

On Fri, 2005-02-11 at 16:49 +0100, Radek Doulík wrote:
-#if d(!)0
-       {
+
+       d({
                int i;
                
                printf ("pipe_to_sa ");
                for (i = 0; argv[i]; i++)
                        printf ("%s ", argv[i]);
                printf ("\n");
-       }
-#endif
+       });

you should probably use:

if (camel_debug_start("junk")) {

    camel_debug_end();
}

(i think camel_debug_end() is the right one).

This will cause the debug code to lock around the i/o so you'll get a neat block of output even in multi-threaded situations, and the d() stuff around block statements isn't as portable to some finicky compilers.

Cheers,
Michael



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]