--- imapfilter/account.c 2003/08/03 16:01:53 1.3 +++ imapfilter/account.c 2004/02/09 17:34:56 1.6 @@ -3,6 +3,8 @@ #include #include #include +#include /* IEEE Std 1003.1-2001 non-conformance. */ +#include #include "config.h" #include "imapfilter.h" @@ -64,9 +66,7 @@ strncat(node->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1)); -#ifdef DEBUG - fprintf(stderr, "debug: ACCOUNT: '%s'\n", node->key); -#endif + debug("ACCOUNT: '%s'\n", node->key); if (m[3].rm_so != -1) { strncat(node->username, line + m[3].rm_so, @@ -79,9 +79,7 @@ if (string_decode(node->username)) return ERROR_CONFIG_PARSE; -#ifdef DEBUG - fprintf(stderr, "debug: USERNAME: '%s'\n", node->username); -#endif + debug("USERNAME: '%s'\n", node->username); if (m[4].rm_so != -1) { strncat(node->password, line + m[4].rm_so, @@ -93,25 +91,19 @@ } else flags |= FLAG_BLANK_PASSWORD; -#ifdef DEBUG - fprintf(stderr, "debug: PASSWORD: '%s'\n", node->password); -#endif + debug("PASSWORD: '%s'\n", node->password); strncat(node->server, line + m[6].rm_so, min(m[6].rm_eo - m[6].rm_so, SERVER_LEN - 1)); -#ifdef DEBUG - fprintf(stderr, "debug: SERVER: '%s'\n", node->server); -#endif + debug("SERVER: '%s'\n", node->server); if (m[7].rm_so != -1) { n = min(m[7].rm_eo - m[7].rm_so - 1, 5); xstrncpy(p, line + m[7].rm_so + 1, n); p[n] = '\0'; node->port = strtoul(p, NULL, 10); -#ifdef DEBUG - fprintf(stderr, "debug: PORT: %d\n", node->port); -#endif + debug("PORT: %d\n", node->port); } if (m[8].rm_so != -1) { if (m[7].rm_so == -1) @@ -185,9 +177,7 @@ strncat(node->key, line + m[1].rm_so, min(m[1].rm_eo - m[1].rm_so, KEY_LEN - 1)); -#ifdef DEBUG - fprintf(stderr, "debug: FOLDER: '%s'\n", node->key); -#endif + debug("FOLDER: '%s'\n", node->key); strncat(mboxs, line + m[2].rm_so, min(m[2].rm_eo - m[2].rm_so, LINE_MAX - 1)); @@ -260,9 +250,7 @@ strncat(node->name, s, MBOX_NAME_LEN - 1); -#ifdef DEBUG - fprintf(stderr, "debug: MBOX: '%s'\n", node->name); -#endif + debug("MBOX: '%s'\n", node->name); APPEND_LINKED_LIST(cur_acct->mboxes, node, mbox); @@ -330,9 +318,7 @@ while ((c = strchr(c, '/'))) *(c++) = delim; -#ifdef DEBUG - fprintf(stderr, "debug: MAILBOX: '%s'\n", m); -#endif + debug("MAILBOX: '%s'\n", m); return m; }