Disable token debug spew unless imap4:stream debug is enabled.
authorJeffrey Stedfast <fejj@novell.com>
Mon, 10 Jan 2005 17:02:57 +0000 (17:02 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Mon, 10 Jan 2005 17:02:57 +0000 (17:02 +0000)
2005-01-10  Jeffrey Stedfast  <fejj@novell.com>

* providers/imap4/camel-imap4-stream.c: Disable token debug spew
unless imap4:stream debug is enabled.

camel/ChangeLog
camel/providers/imap4/camel-imap4-stream.c

index f338701..a4c3c73 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-10  Jeffrey Stedfast  <fejj@novell.com>
+
+       * providers/imap4/camel-imap4-stream.c: Disable token debug spew
+       unless imap4:stream debug is enabled.
+
 2005-01-10  Sushma Rai <rsushma@novell.com>
 
        * camel-provider.[ch] (camel_provider_validate_user):
index 4a48fe5..696f667 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "camel-imap4-stream.h"
 
-#define d(x) x
+#define d(x) (camel_debug ("imap4:stream") ? (x) : 0)
 
 #define IMAP4_TOKEN_LEN  128
 
@@ -417,12 +417,14 @@ camel_imap4_stream_next_token (CamelIMAP4Stream *stream, camel_imap4_token_t *to
                        } else if (strchr ("+*()[]\n", *inptr)) {
                                /* special character token */
                                token->token = *inptr++;
-#if d(!)0
-                               if (token->token != '\n')
-                                       fprintf (stderr, "token: %c\n", token->token);
-                               else
-                                       fprintf (stderr, "token: \\n\n");
-#endif
+                               
+                               if (camel_debug ("imap4:stream")) {
+                                       if (token->token != '\n')
+                                               fprintf (stderr, "token: %c\n", token->token);
+                                       else
+                                               fprintf (stderr, "token: \\n\n");
+                               }
+                               
                                break;
                        } else if (*inptr == '{') {
                                /* literal identifier token */