]> granicus.if.org Git - neomutt/commitdiff
debug: Strip function names from debug messages 950/head
authorRichard Russon <rich@flatcap.org>
Sun, 12 Nov 2017 20:33:32 +0000 (20:33 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 26 Nov 2017 22:52:51 +0000 (22:52 +0000)
54 files changed:
alias.c
attach.c
bcache.c
body.c
color.c
complete.c
conn/getdomain.c
conn/sasl.c
conn/socket.c
conn/ssl.c
copy.c
curs_lib.c
curs_main.c
from.c
group.c
handler.c
hcache/lmdb.c
header.c
imap/auth.c
imap/auth_gss.c
imap/auth_sasl.c
imap/browse.c
imap/command.c
imap/imap.c
imap/message.c
imap/util.c
init.c
mbox.c
menu.c
mh.c
mutt/date.c
mutt/file.c
mutt_idna.c
mutt_lua.c
mutt_notmuch.c
muttlib.c
mx.c
ncrypt/crypt_gpgme.c
ncrypt/gnupgparse.c
ncrypt/pgp.c
ncrypt/pgpinvoke.c
ncrypt/pgpkey.c
ncrypt/pgpmicalg.c
ncrypt/smime.c
newsrc.c
nntp.c
pager.c
parse.c
pop.c
pop_auth.c
postpone.c
send.c
sendlib.c
smtp.c

diff --git a/alias.c b/alias.c
index 8f4be64660738e7e7f2829c3f426c944f3a33b10..205f5319ffed17702c94f4443b37444660122e19 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -75,7 +75,7 @@ static struct Address *expand_aliases_r(struct Address *a, struct ListHead *expn
         {
           if (mutt_str_strcmp(a->mailbox, np->data) == 0) /* alias already found */
           {
-            mutt_debug(1, "expand_aliases_r(): loop in alias found for '%s'\n", a->mailbox);
+            mutt_debug(1, "loop in alias found for '%s'\n", a->mailbox);
             i = true;
             break;
           }
@@ -627,57 +627,54 @@ bool mutt_addr_is_user(struct Address *addr)
   /* NULL address is assumed to be the user. */
   if (!addr)
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, NULL address\n");
+    mutt_debug(5, "yes, NULL address\n");
     return true;
   }
   if (!addr->mailbox)
   {
-    mutt_debug(5, "mutt_addr_is_user: no, no mailbox\n");
+    mutt_debug(5, "no, no mailbox\n");
     return false;
   }
 
   if (mutt_str_strcasecmp(addr->mailbox, Username) == 0)
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s = %s\n", addr->mailbox, Username);
+    mutt_debug(5, "#1 yes, %s = %s\n", addr->mailbox, Username);
     return true;
   }
   if (string_is_address(addr->mailbox, Username, ShortHostname))
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox,
-               Username, ShortHostname);
+    mutt_debug(5, "#2 yes, %s = %s @ %s\n", addr->mailbox, Username, ShortHostname);
     return true;
   }
   fqdn = mutt_fqdn(0);
   if (string_is_address(addr->mailbox, Username, fqdn))
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox,
-               Username, NONULL(fqdn));
+    mutt_debug(5, "#3 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
     return true;
   }
   fqdn = mutt_fqdn(1);
   if (string_is_address(addr->mailbox, Username, fqdn))
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox,
-               Username, NONULL(fqdn));
+    mutt_debug(5, "#4 yes, %s = %s @ %s\n", addr->mailbox, Username, NONULL(fqdn));
     return true;
   }
 
   if (From && (mutt_str_strcasecmp(From->mailbox, addr->mailbox) == 0))
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s = %s\n", addr->mailbox, From->mailbox);
+    mutt_debug(5, "#5 yes, %s = %s\n", addr->mailbox, From->mailbox);
     return true;
   }
 
   if (mutt_match_regex_list(addr->mailbox, Alternates))
   {
-    mutt_debug(5, "mutt_addr_is_user: yes, %s matched by alternates.\n", addr->mailbox);
+    mutt_debug(5, "yes, %s matched by alternates.\n", addr->mailbox);
     if (mutt_match_regex_list(addr->mailbox, UnAlternates))
-      mutt_debug(5, "mutt_addr_is_user: but, %s matched by unalternates.\n", addr->mailbox);
+      mutt_debug(5, "but, %s matched by unalternates.\n", addr->mailbox);
     else
       return true;
   }
 
-  mutt_debug(5, "mutt_addr_is_user: no, all failed.\n");
+  mutt_debug(5, "no, all failed.\n");
   return false;
 }
 
index 2d94995a1e445f32860ebb03feca6f27105147a9..3dadba516c1f5e9aeaa275df1e70b15383a80c61 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -338,7 +338,7 @@ void mutt_check_lookup_list(struct Body *b, char *type, int len)
                                       "multipart" :
                                       n == TYPETEXT ? "text" : n == TYPEVIDEO ? "video" : "other",
                  tmp.subtype);
-        mutt_debug(1, "mutt_check_lookup_list: \"%s\" -> %s\n", b->filename, type);
+        mutt_debug(1, "\"%s\" -> %s\n", b->filename, type);
       }
       if (tmp.subtype)
         FREE(&tmp.subtype);
@@ -560,9 +560,8 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
         decode_state.fpout = mutt_file_fopen(pagerfile, "w");
         if (!decode_state.fpout)
         {
-          mutt_debug(
-              1, "mutt_view_attachment:%d mutt_file_fopen(%s) errno=%d %s\n",
-              __LINE__, pagerfile, errno, strerror(errno));
+          mutt_debug(1, "mutt_file_fopen(%s) errno=%d %s\n", pagerfile, errno,
+                     strerror(errno));
           mutt_perror(pagerfile);
           mutt_sleep(1);
           goto return_error;
@@ -571,8 +570,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
         decode_state.flags = MUTT_CHARCONV;
         mutt_decode_attachment(a, &decode_state);
         if (fclose(decode_state.fpout) == EOF)
-          mutt_debug(1, "mutt_view_attachment:%d fclose(%s) errno=%d %s\n",
-                     __LINE__, pagerfile, errno, strerror(errno));
+          mutt_debug(1, "fclose(%s) errno=%d %s\n", pagerfile, errno, strerror(errno));
       }
       else
       {
index b276fe0a6e7a522dac62c3ed2be6dd2af1f37c67..c49b43482c75b9dfa7976c0056ee36b6fbe83dff 100644 (file)
--- a/bcache.c
+++ b/bcache.c
@@ -65,7 +65,7 @@ static int bcache_path(struct Account *account, const char *mailbox, char *dst,
   url.path = NULL;
   if (url_tostring(&url, host, sizeof(host), U_PATH) < 0)
   {
-    mutt_debug(1, "bcache_path: URL to string failed\n");
+    mutt_debug(1, "URL to string failed\n");
     return -1;
   }
 
@@ -78,12 +78,12 @@ static int bcache_path(struct Account *account, const char *mailbox, char *dst,
   len = snprintf(dst, dstlen - 1, "%s/%s%s%s", MessageCachedir, host, path,
                  (*path && path[plen - 1] == '/') ? "" : "/");
 
-  mutt_debug(3, "bcache_path: rc: %d, path: '%s'\n", len, dst);
+  mutt_debug(3, "rc: %d, path: '%s'\n", len, dst);
 
   if (len < 0 || (size_t) len >= dstlen - 1)
     return -1;
 
-  mutt_debug(3, "bcache_path: directory: '%s'\n", dst);
+  mutt_debug(3, "directory: '%s'\n", dst);
 
   return 0;
 }
diff --git a/body.c b/body.c
index ae8219b33ca117f90d88ac9984a5733cae45473c..4b621b0ee671c1455e0bd29c9fbb7fcdf286dea1 100644 (file)
--- a/body.c
+++ b/body.c
@@ -132,8 +132,7 @@ void mutt_free_body(struct Body **p)
     {
       if (b->unlink)
         unlink(b->filename);
-      mutt_debug(1, "mutt_free_body: %sunlinking %s.\n",
-                 b->unlink ? "" : "not ", b->filename);
+      mutt_debug(1, "%sunlinking %s.\n", b->unlink ? "" : "not ", b->filename);
     }
 
     FREE(&b->filename);
diff --git a/color.c b/color.c
index e7107dae78e5d11c2d1df4d283d9181174989eb4..a0961686036ddaf69a196116f4fb03862df981e5 100644 (file)
--- a/color.c
+++ b/color.c
@@ -304,7 +304,7 @@ int mutt_alloc_color(int fg, int bg)
 
     init_pair(i, fg, bg);
 
-  mutt_debug(3, "mutt_alloc_color(): Color pairs used so far: %d\n", UserColors);
+  mutt_debug(3, "Color pairs used so far: %d\n", UserColors);
 
   return (COLOR_PAIR(p->index));
 }
@@ -354,7 +354,7 @@ void mutt_free_color(int fg, int bg)
         return;
 
       UserColors--;
-      mutt_debug(1, "mutt_free_color(): Color pairs used so far: %d\n", UserColors);
+      mutt_debug(1, "Color pairs used so far: %d\n", UserColors);
 
       if (p == ColorList)
       {
index f2de4ef46edc92a74f9a79a46582dd8badebda1e..9af2fbc84e7fecc392d229e72b8dedd3b9f3686a 100644 (file)
@@ -61,7 +61,7 @@ int mutt_complete(char *s, size_t slen)
   char imap_path[LONG_STRING];
 #endif
 
-  mutt_debug(2, "mutt_complete: completing %s\n", s);
+  mutt_debug(2, "completing %s\n", s);
 
 #ifdef USE_NNTP
   if (option(OPT_NEWS))
@@ -196,8 +196,7 @@ int mutt_complete(char *s, size_t slen)
 
   if (!dirp)
   {
-    mutt_debug(1, "mutt_complete(): %s: %s (errno %d).\n", exp_dirpart,
-               strerror(errno), errno);
+    mutt_debug(1, "%s: %s (errno %d).\n", exp_dirpart, strerror(errno), errno);
     return -1;
   }
 
index ccbf2eac1cf4e7ac143a457f0e432409c14576cb..27c970df18af9a7c723d8ba7441f9c3ff5efd58e 100644 (file)
@@ -84,7 +84,7 @@ int getdnsdomainname(char *d, size_t len)
       h = reqs[0]->ar_result;
     else if (status == EAI_INPROGRESS)
     {
-      mutt_debug(1, "getdnsdomainname timeout\n");
+      mutt_debug(1, "timeout\n");
       /* request is not finish, cancel it to free it safely */
       if (gai_cancel(reqs[0]) == EAI_NOTCANCELED)
       {
@@ -93,7 +93,7 @@ int getdnsdomainname(char *d, size_t len)
       }
     }
     else
-      mutt_debug(1, "getdnsdomainname fail: (%d) %s\n", status, gai_strerror(status));
+      mutt_debug(1, "fail: (%d) %s\n", status, gai_strerror(status));
   }
   FREE(&reqs[0]);
 
@@ -110,7 +110,7 @@ int getdnsdomainname(char *d, size_t len)
   {
     mutt_str_strfcpy(d, ++p, len);
     rc = 0;
-    mutt_debug(1, "getdnsdomainname(): %s\n", d);
+    mutt_debug(1, "%s\n", d);
     freeaddrinfo(h);
   }
 
index 63e2602ca50315eeba413b8b2be341750629ec1a..f4f1e28bdd7f364a88fe535e9fdcb30df10aa369 100644 (file)
@@ -207,7 +207,7 @@ static int mutt_sasl_start(void)
 
   if (rc != SASL_OK)
   {
-    mutt_debug(1, "mutt_sasl_start: libsasl initialisation failed.\n");
+    mutt_debug(1, "libsasl initialisation failed.\n");
     return SASL_FAIL;
   }
 
@@ -238,9 +238,8 @@ static int mutt_sasl_cb_authname(void *context, int id, const char **result, uns
   if (!account)
     return SASL_BADPARAM;
 
-  mutt_debug(2, "mutt_sasl_cb_authname: getting %s for %s:%u\n",
-             id == SASL_CB_AUTHNAME ? "authname" : "user", account->host,
-             account->port);
+  mutt_debug(2, "getting %s for %s:%u\n", id == SASL_CB_AUTHNAME ? "authname" : "user",
+             account->host, account->port);
 
   if (id == SASL_CB_AUTHNAME)
   {
@@ -277,8 +276,8 @@ static int mutt_sasl_cb_pass(sasl_conn_t *conn, void *context, int id, sasl_secr
   if (!account || !psecret)
     return SASL_BADPARAM;
 
-  mutt_debug(2, "mutt_sasl_cb_pass: getting password for %s@%s:%u\n",
-             account->login, account->host, account->port);
+  mutt_debug(2, "getting password for %s@%s:%u\n", account->login,
+             account->host, account->port);
 
   if (mutt_account_getpass(account) < 0)
     return SASL_FAIL;
@@ -658,8 +657,7 @@ int mutt_sasl_interact(sasl_interact_t *interaction)
 
   while (interaction->id != SASL_CB_LIST_END)
   {
-    mutt_debug(2, "mutt_sasl_interact: filling in SASL interaction %ld.\n",
-               interaction->id);
+    mutt_debug(2, "filling in SASL interaction %ld.\n", interaction->id);
 
     snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt);
     resp[0] = '\0';
index be7b1a99dbc70aa5387a91bdaad40c7f50304527..bf3916962b0cbdb13524e7b625e709355965cc52 100644 (file)
@@ -186,7 +186,7 @@ int mutt_socket_close(struct Connection *conn)
   int rc = -1;
 
   if (conn->fd < 0)
-    mutt_debug(1, "mutt_socket_close: Attempt to close closed connection.\n");
+    mutt_debug(1, "Attempt to close closed connection.\n");
   else
     rc = conn->conn_close(conn);
 
@@ -214,7 +214,7 @@ int mutt_socket_write_d(struct Connection *conn, const char *buf, int len, int d
 
   if (conn->fd < 0)
   {
-    mutt_debug(1, "mutt_socket_write: attempt to write to closed connection\n");
+    mutt_debug(1, "attempt to write to closed connection\n");
     return -1;
   }
 
@@ -226,15 +226,14 @@ int mutt_socket_write_d(struct Connection *conn, const char *buf, int len, int d
     rc = conn->conn_write(conn, buf + sent, len - sent);
     if (rc < 0)
     {
-      mutt_debug(1, "mutt_socket_write: error writing (%s), closing socket\n",
-                 strerror(errno));
+      mutt_debug(1, "error writing (%s), closing socket\n", strerror(errno));
       mutt_socket_close(conn);
 
       return -1;
     }
 
     if (rc < len - sent)
-      mutt_debug(3, "mutt_socket_write: short write (%d of %d bytes)\n", rc, len - sent);
+      mutt_debug(3, "short write (%d of %d bytes)\n", rc, len - sent);
 
     sent += rc;
   }
@@ -276,8 +275,7 @@ int mutt_socket_readchar(struct Connection *conn, char *c)
       conn->available = conn->conn_read(conn, conn->inbuf, sizeof(conn->inbuf));
     else
     {
-      mutt_debug(
-          1, "mutt_socket_readchar: attempt to read from closed connection.\n");
+      mutt_debug(1, "attempt to read from closed connection.\n");
       return -1;
     }
     conn->bufpos = 0;
index 386a08cbeb7c9853654d4310c71cfdfc9cf77d45..25c3baf50282f178aec3f20f1010bf4661887da1 100644 (file)
@@ -134,7 +134,7 @@ static int ssl_load_certificates(SSL_CTX *ctx)
   char buf[STRING];
 #endif
 
-  mutt_debug(2, "ssl_load_certificates: loading trusted certificates\n");
+  mutt_debug(2, "loading trusted certificates\n");
   store = SSL_CTX_get_cert_store(ctx);
   if (!store)
   {
@@ -151,7 +151,7 @@ static int ssl_load_certificates(SSL_CTX *ctx)
     if ((X509_cmp_current_time(X509_get_notBefore(cert)) >= 0) ||
         (X509_cmp_current_time(X509_get_notAfter(cert)) <= 0))
     {
-      mutt_debug(2, "ssl_load_certificates: filtering expired cert: %s\n",
+      mutt_debug(2, "filtering expired cert: %s\n",
                  X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)));
     }
     else
@@ -190,15 +190,14 @@ static int ssl_set_verify_partial(SSL_CTX *ctx)
       X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_PARTIAL_CHAIN);
       if (0 == SSL_CTX_set1_param(ctx, param))
       {
-        mutt_debug(2, "ssl_set_verify_partial: SSL_CTX_set1_param() failed.\n");
+        mutt_debug(2, "SSL_CTX_set1_param() failed.\n");
         rc = -1;
       }
       X509_VERIFY_PARAM_free(param);
     }
     else
     {
-      mutt_debug(2,
-                 "ssl_set_verify_partial: X509_VERIFY_PARAM_new() failed.\n");
+      mutt_debug(2, "X509_VERIFY_PARAM_new() failed.\n");
       rc = -1;
     }
   }
@@ -363,8 +362,8 @@ static int ssl_passwd_cb(char *buf, int size, int rwflag, void *userdata)
   if (mutt_account_getuser(account) < 0)
     return 0;
 
-  mutt_debug(2, "ssl_passwd_cb: getting password for %s@%s:%u\n", account->user,
-             account->host, account->port);
+  mutt_debug(2, "getting password for %s@%s:%u\n", account->user, account->host,
+             account->port);
 
   if (mutt_account_getpass(account) < 0)
     return 0;
@@ -937,7 +936,7 @@ static int check_certificate_by_digest(X509 *peercert)
  */
 static int ssl_cache_trusted_cert(X509 *c)
 {
-  mutt_debug(1, "ssl_cache_trusted_cert: trusted\n");
+  mutt_debug(1, "trusted\n");
   if (!SslSessionCerts)
     SslSessionCerts = sk_X509_new_null();
   return (sk_X509_push(SslSessionCerts, X509_dup(c)));
@@ -1108,7 +1107,7 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al
   unset_option(OPT_IGNORE_MACRO_EVENTS);
   mutt_pop_current_menu(menu);
   mutt_menu_destroy(&menu);
-  mutt_debug(2, "ssl interactive_check_cert: done=%d\n", done);
+  mutt_debug(2, "done=%d\n", done);
   return (done == 2);
 }
 
@@ -1141,15 +1140,13 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
   ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
   if (!ssl)
   {
-    mutt_debug(1, "ssl_verify_callback: failed to retrieve SSL structure from "
-                  "X509_STORE_CTX\n");
+    mutt_debug(1, "failed to retrieve SSL structure from X509_STORE_CTX\n");
     return 0;
   }
   host = SSL_get_ex_data(ssl, HostExDataIndex);
   if (!host)
   {
-    mutt_debug(1, "ssl_verify_callback: failed to retrieve hostname from SSL "
-                  "structure\n");
+    mutt_debug(1, "failed to retrieve hostname from SSL structure\n");
     return 0;
   }
 
@@ -1165,8 +1162,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
   pos = X509_STORE_CTX_get_error_depth(ctx);
   len = sk_X509_num(X509_STORE_CTX_get_chain(ctx));
 
-  mutt_debug(1, "ssl_verify_callback: checking cert chain entry %s (preverify: "
-                "%d skipmode: %d)\n",
+  mutt_debug(1, "checking cert chain entry %s (preverify: %d skipmode: %d)\n",
              X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)),
              preverify_ok, skip_mode);
 
@@ -1182,9 +1178,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
       if (X509_digest(last_cert, EVP_sha256(), last_cert_md, &last_cert_mdlen) &&
           compare_certificates(cert, last_cert, last_cert_md, last_cert_mdlen))
       {
-        mutt_debug(
-            2,
-            "ssl_verify_callback: ignoring duplicate skipped certificate.\n");
+        mutt_debug(2, "ignoring duplicate skipped certificate.\n");
         return 1;
       }
     }
@@ -1199,7 +1193,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
   /* check session cache first */
   if (check_certificate_cache(cert))
   {
-    mutt_debug(2, "ssl_verify_callback: using cached certificate\n");
+    mutt_debug(2, "using cached certificate\n");
     SSL_set_ex_data(ssl, SkipModeExDataIndex, NULL);
     return 1;
   }
@@ -1216,7 +1210,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
        * for hostname mismatches. */
       return interactive_check_cert(cert, pos, len, ssl, 0);
     }
-    mutt_debug(2, "ssl_verify_callback: hostname check passed\n");
+    mutt_debug(2, "hostname check passed\n");
   }
 
   if (!preverify_ok || skip_mode)
@@ -1224,7 +1218,7 @@ static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
     /* automatic check from user's database */
     if (CertificateFile && check_certificate_by_digest(cert))
     {
-      mutt_debug(2, "ssl_verify_callback: digest check passed\n");
+      mutt_debug(2, "digest check passed\n");
       SSL_set_ex_data(ssl, SkipModeExDataIndex, NULL);
       return 1;
     }
@@ -1263,26 +1257,26 @@ static int ssl_negotiate(struct Connection *conn, struct SslSockData *ssldata)
   HostExDataIndex = SSL_get_ex_new_index(0, "host", NULL, NULL, NULL);
   if (HostExDataIndex == -1)
   {
-    mutt_debug(1, "failed to get index for application specific data\n");
+    mutt_debug(1, "#1 failed to get index for application specific data\n");
     return -1;
   }
 
   if (!SSL_set_ex_data(ssldata->ssl, HostExDataIndex, conn->account.host))
   {
-    mutt_debug(1, "failed to save hostname in SSL structure\n");
+    mutt_debug(1, "#2 failed to save hostname in SSL structure\n");
     return -1;
   }
 
   SkipModeExDataIndex = SSL_get_ex_new_index(0, "skip", NULL, NULL, NULL);
   if (SkipModeExDataIndex == -1)
   {
-    mutt_debug(1, "failed to get index for application specific data\n");
+    mutt_debug(1, "#3 failed to get index for application specific data\n");
     return -1;
   }
 
   if (!SSL_set_ex_data(ssldata->ssl, SkipModeExDataIndex, NULL))
   {
-    mutt_debug(1, "failed to save skip mode in SSL structure\n");
+    mutt_debug(1, "#4 failed to save skip mode in SSL structure\n");
     return -1;
   }
 
@@ -1386,14 +1380,14 @@ static int ssl_socket_open(struct Connection *conn)
   {
     if (!SSL_CTX_set_default_verify_paths(data->ctx))
     {
-      mutt_debug(1, "ssl_socket_open: Error setting default verify paths\n");
+      mutt_debug(1, "Error setting default verify paths\n");
       mutt_socket_close(conn);
       return -1;
     }
   }
 
   if (CertificateFile && !ssl_load_certificates(data->ctx))
-    mutt_debug(1, "ssl_socket_open: Error loading trusted certificates\n");
+    mutt_debug(1, "Error loading trusted certificates\n");
 
   ssl_get_client_cert(data, conn);
 
@@ -1452,7 +1446,7 @@ int mutt_ssl_starttls(struct Connection *conn)
   ssldata->ctx = SSL_CTX_new(SSLv23_client_method());
   if (!ssldata->ctx)
   {
-    mutt_debug(1, "mutt_ssl_starttls: Error allocating SSL_CTX\n");
+    mutt_debug(1, "Error allocating SSL_CTX\n");
     goto bail_ssldata;
   }
 #ifdef SSL_OP_NO_TLSv1_2
@@ -1476,7 +1470,7 @@ int mutt_ssl_starttls(struct Connection *conn)
 #endif
   if (!SSL_CTX_set_options(ssldata->ctx, ssl_options))
   {
-    mutt_debug(1, "mutt_ssl_starttls: Error setting options to %ld\n", ssl_options);
+    mutt_debug(1, "Error setting options to %ld\n", ssl_options);
     goto bail_ctx;
   }
 
@@ -1484,13 +1478,13 @@ int mutt_ssl_starttls(struct Connection *conn)
   {
     if (!SSL_CTX_set_default_verify_paths(ssldata->ctx))
     {
-      mutt_debug(1, "mutt_ssl_starttls: Error setting default verify paths\n");
+      mutt_debug(1, "Error setting default verify paths\n");
       goto bail_ctx;
     }
   }
 
   if (CertificateFile && !ssl_load_certificates(ssldata->ctx))
-    mutt_debug(1, "mutt_ssl_starttls: Error loading trusted certificates\n");
+    mutt_debug(1, "Error loading trusted certificates\n");
 
   ssl_get_client_cert(ssldata, conn);
 
@@ -1498,7 +1492,7 @@ int mutt_ssl_starttls(struct Connection *conn)
   {
     if (!SSL_CTX_set_cipher_list(ssldata->ctx, SslCiphers))
     {
-      mutt_debug(1, "mutt_ssl_starttls: Could not select preferred ciphers\n");
+      mutt_debug(1, "Could not select preferred ciphers\n");
       goto bail_ctx;
     }
   }
@@ -1512,13 +1506,13 @@ int mutt_ssl_starttls(struct Connection *conn)
   ssldata->ssl = SSL_new(ssldata->ctx);
   if (!ssldata->ssl)
   {
-    mutt_debug(1, "mutt_ssl_starttls: Error allocating SSL\n");
+    mutt_debug(1, "Error allocating SSL\n");
     goto bail_ctx;
   }
 
   if (SSL_set_fd(ssldata->ssl, conn->fd) != 1)
   {
-    mutt_debug(1, "mutt_ssl_starttls: Error setting fd\n");
+    mutt_debug(1, "Error setting fd\n");
     goto bail_ssl;
   }
 
diff --git a/copy.c b/copy.c
index dd76456d9fbda8b7050c8fae9c83b9ccbddc6733..ab1f403df6702313172b95acce8d1d61d68ea79e 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -770,7 +770,7 @@ int mutt_copy_message_ctx(FILE *fpout, struct Context *src, struct Header *hdr,
   r = mutt_copy_message_fp(fpout, msg->fp, hdr, flags, chflags);
   if ((r == 0) && (ferror(fpout) || feof(fpout)))
   {
-    mutt_debug(1, "mutt_copy_message failed to detect EOF!\n");
+    mutt_debug(1, "failed to detect EOF!\n");
     r = -1;
   }
   mx_close_message(src, &msg);
index 38acbbfe2f9b17bdb33b4bb45aa5103c09804420..33ddaea91bfd0f063dbf5b477e24f44481cc9234 100644 (file)
@@ -643,7 +643,7 @@ void mutt_reflow_windows(void)
   if (option(OPT_NO_CURSES))
     return;
 
-  mutt_debug(2, "In mutt_reflow_windows\n");
+  mutt_debug(2, "entering\n");
 
   MuttStatusWindow->rows = 1;
   MuttStatusWindow->cols = COLS;
index 4403580c9b7aa42927cff4f96e5e1831fa33c295..879a93e445a07eb543cd3346cd1a111b92b8fce0 100644 (file)
@@ -1116,7 +1116,7 @@ int mutt_index_menu(void)
 
       op = km_dokey(MENU_MAIN);
 
-      mutt_debug(4, "mutt_index_menu[%d]: Got op %d\n", __LINE__, op);
+      mutt_debug(4, "[%d]: Got op %d\n", __LINE__, op);
 
       /* either user abort or timeout */
       if (op < 0)
diff --git a/from.c b/from.c
index 030424df9e31ab5a2da9e31dfa326355c03930c2..c175a3716f91f956cf3a0e5ae92988fc3923d3c0 100644 (file)
--- a/from.c
+++ b/from.c
@@ -80,8 +80,8 @@ int is_from(const char *s, char *path, size_t pathlen, time_t *tp)
       p = strchr(p + 4, ' ');
       if (!p)
       {
-        mutt_debug(1, "is_from(): error parsing what appears to be a "
-                      "pipermail-style obscured return_path: %s\n",
+        mutt_debug(1, "error parsing what appears to be a pipermail-style "
+                      "obscured return_path: %s\n",
                    s);
         return 0;
       }
@@ -94,7 +94,7 @@ int is_from(const char *s, char *path, size_t pathlen, time_t *tp)
         len = pathlen - 1;
       memcpy(path, s, len);
       path[len] = '\0';
-      mutt_debug(3, "is_from(): got return path: %s\n", path);
+      mutt_debug(3, "got return path: %s\n", path);
     }
 
     s = p + 1;
@@ -104,7 +104,7 @@ int is_from(const char *s, char *path, size_t pathlen, time_t *tp)
 
     if (!mutt_date_is_day_name(s))
     {
-      mutt_debug(1, "is_from():  expected weekday, got: %s\n", s);
+      mutt_debug(1, " expected weekday, got: %s\n", s);
       return 0;
     }
   }
@@ -187,8 +187,8 @@ int is_from(const char *s, char *path, size_t pathlen, time_t *tp)
     return 0;
   tm.tm_year = yr > 1900 ? yr - 1900 : (yr < 70 ? yr + 100 : yr);
 
-  mutt_debug(3, "is_from(): month=%d, day=%d, hr=%d, min=%d, sec=%d, yr=%d.\n",
-             tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year);
+  mutt_debug(3, "month=%d, day=%d, hr=%d, min=%d, sec=%d, yr=%d.\n", tm.tm_mon,
+             tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year);
 
   tm.tm_isdst = -1;
 
diff --git a/group.c b/group.c
index d06172c61f6dcef019268cbea8fcc30297f5ce12..3f19c989deaeb313ab522c014a5dcc11a85c10b5 100644 (file)
--- a/group.c
+++ b/group.c
@@ -41,7 +41,7 @@ struct Group *mutt_pattern_group(const char *k)
   p = mutt_hash_find(Groups, k);
   if (!p)
   {
-    mutt_debug(2, "mutt_pattern_group: Creating group %s.\n", k);
+    mutt_debug(2, "Creating group %s.\n", k);
     p = mutt_mem_calloc(1, sizeof(struct Group));
     p->name = mutt_str_strdup(k);
     mutt_hash_insert(Groups, p->name, p);
index 98e9ba560f0d9d44686280664e3cbd6968559ee5..d07842ae1415cc45a86e010482e23548e7456c56 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -329,9 +329,7 @@ void mutt_decode_base64(struct State *s, long len, int istext, iconv_t cd)
     {
       /* "i" may be zero if there is trailing whitespace, which is not an error */
       if (i != 0)
-        mutt_debug(2, "%s:%d [mutt_decode_base64()]: "
-                      "didn't get a multiple of 4 chars.\n",
-                   __FILE__, __LINE__);
+        mutt_debug(2, "didn't get a multiple of 4 chars.\n");
       break;
     }
 
@@ -1908,9 +1906,8 @@ int mutt_body_handler(struct Body *b, struct State *s)
 
     if (b->encoding != ENC7BIT && b->encoding != ENC8BIT && b->encoding != ENCBINARY)
     {
-      mutt_debug(1, "Bad encoding type %d for multipart entity, "
-                    "assuming 7 bit\n",
-                 b->encoding);
+      mutt_debug(1,
+                 "Bad encoding type %d for multipart entity, assuming 7 bit\n", b->encoding);
       b->encoding = ENC7BIT;
     }
   }
index 512fae10e59ca37149a9c768fd3d00d267a6a5d9..bcbd01b0b326dbc2279e41368ed25204073a02ea 100644 (file)
@@ -76,8 +76,8 @@ static int mdb_get_r_txn(struct HcacheLmdbCtx *ctx)
   if (rc == MDB_SUCCESS)
     ctx->txn_mode = TXN_READ;
   else
-    mutt_debug(2, "mdb_get_r_txn: %s: %s\n",
-               ctx->txn ? "mdb_txn_renew" : "mdb_txn_begin", mdb_strerror(rc));
+    mutt_debug(2, "%s: %s\n", ctx->txn ? "mdb_txn_renew" : "mdb_txn_begin",
+               mdb_strerror(rc));
 
   return rc;
 }
@@ -99,7 +99,7 @@ static int mdb_get_w_txn(struct HcacheLmdbCtx *ctx)
   if (rc == MDB_SUCCESS)
     ctx->txn_mode = TXN_WRITE;
   else
-    mutt_debug(2, "mdb_get_w_txn: mdb_txn_begin: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_txn_begin: %s\n", mdb_strerror(rc));
 
   return rc;
 }
@@ -113,7 +113,7 @@ static void *hcache_lmdb_open(const char *path)
   rc = mdb_env_create(&ctx->env);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_open_lmdb: mdb_env_create: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_env_create: %s\n", mdb_strerror(rc));
     FREE(&ctx);
     return NULL;
   }
@@ -123,21 +123,21 @@ static void *hcache_lmdb_open(const char *path)
   rc = mdb_env_open(ctx->env, path, MDB_NOSUBDIR, 0644);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_open_lmdb: mdb_env_open: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_env_open: %s\n", mdb_strerror(rc));
     goto fail_env;
   }
 
   rc = mdb_get_r_txn(ctx);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_open_lmdb: mdb_txn_begin: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_txn_begin: %s\n", mdb_strerror(rc));
     goto fail_env;
   }
 
   rc = mdb_dbi_open(ctx->txn, NULL, MDB_CREATE, &ctx->db);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_open_lmdb: mdb_dbi_open: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_dbi_open: %s\n", mdb_strerror(rc));
     goto fail_dbi;
   }
 
@@ -175,7 +175,7 @@ static void *hcache_lmdb_fetch(void *vctx, const char *key, size_t keylen)
   if (rc != MDB_SUCCESS)
   {
     ctx->txn = NULL;
-    mutt_debug(2, "hcache_lmdb_fetch: txn_renew: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "txn_renew: %s\n", mdb_strerror(rc));
     return NULL;
   }
   rc = mdb_get(ctx->txn, ctx->db, &dkey, &data);
@@ -185,7 +185,7 @@ static void *hcache_lmdb_fetch(void *vctx, const char *key, size_t keylen)
   }
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_lmdb_fetch: mdb_get: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_get: %s\n", mdb_strerror(rc));
     return NULL;
   }
 
@@ -215,13 +215,13 @@ static int hcache_lmdb_store(void *vctx, const char *key, size_t keylen, void *d
   rc = mdb_get_w_txn(ctx);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_lmdb_store: mdb_get_w_txn: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_get_w_txn: %s\n", mdb_strerror(rc));
     return rc;
   }
   rc = mdb_put(ctx->txn, ctx->db, &dkey, &databuf, 0);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcahce_lmdb_store: mdb_put: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_put: %s\n", mdb_strerror(rc));
     mdb_txn_abort(ctx->txn);
     ctx->txn_mode = TXN_UNINITIALIZED;
     ctx->txn = NULL;
@@ -244,13 +244,13 @@ static int hcache_lmdb_delete(void *vctx, const char *key, size_t keylen)
   rc = mdb_get_w_txn(ctx);
   if (rc != MDB_SUCCESS)
   {
-    mutt_debug(2, "hcache_lmdb_delete: mdb_get_w_txn: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_get_w_txn: %s\n", mdb_strerror(rc));
     return rc;
   }
   rc = mdb_del(ctx->txn, ctx->db, &dkey, NULL);
   if (rc != MDB_SUCCESS && rc != MDB_NOTFOUND)
   {
-    mutt_debug(2, "hcache_lmdb_delete: mdb_del: %s\n", mdb_strerror(rc));
+    mutt_debug(2, "mdb_del: %s\n", mdb_strerror(rc));
     mdb_txn_abort(ctx->txn);
     ctx->txn_mode = TXN_UNINITIALIZED;
     ctx->txn = NULL;
index a73954bb210e97c3e356985fb19fe82b905bddd8..214fb2727ae5da4dfabeea6a2ea932b10e0b3ed4 100644 (file)
--- a/header.c
+++ b/header.c
@@ -92,7 +92,7 @@ void mutt_edit_headers(const char *editor, const char *body, struct Header *msg,
   stat(path, &st);
   if (mtime == st.st_mtime)
   {
-    mutt_debug(1, "ci_edit_headers(): temp file was not modified.\n");
+    mutt_debug(1, "temp file was not modified.\n");
     /* the file has not changed! */
     mutt_file_unlink(path);
     return;
index 0c31061990a6c9466d66a6892ef8928453d933d8..21caa7db78d9f2cbd8d2ab829cc156980fb87245 100644 (file)
@@ -90,7 +90,7 @@ int imap_authenticate(struct ImapData *idata)
       if (!method[0])
         continue;
 
-      mutt_debug(2, "imap_authenticate: Trying method %s\n", method);
+      mutt_debug(2, "Trying method %s\n", method);
       authenticator = imap_authenticators;
 
       while (authenticator->authenticate)
@@ -115,7 +115,7 @@ int imap_authenticate(struct ImapData *idata)
   else
   {
     /* Fall back to default: any authenticator */
-    mutt_debug(2, "imap_authenticate: Using any available method.\n");
+    mutt_debug(2, "Using any available method.\n");
     authenticator = imap_authenticators;
 
     while (authenticator->authenticate)
index 57d9cc9b8369944003058b9228f65fbe83a63257..46229c4de30ea25f4093f279408e7b60d9b1387d 100644 (file)
@@ -190,7 +190,7 @@ enum ImapAuthRes imap_auth_gss(struct ImapData *idata, const char *method)
 
     if (rc != IMAP_CMD_RESPOND)
     {
-      mutt_debug(1, "Error receiving server response.\n");
+      mutt_debug(1, "#1 Error receiving server response.\n");
       gss_release_name(&min_stat, &target_name);
       goto bail;
     }
@@ -227,7 +227,7 @@ enum ImapAuthRes imap_auth_gss(struct ImapData *idata, const char *method)
 
   if (rc != IMAP_CMD_RESPOND)
   {
-    mutt_debug(1, "Error receiving server response.\n");
+    mutt_debug(1, "#2 Error receiving server response.\n");
     goto bail;
   }
   request_buf.length = mutt_b64_decode(buf2, idata->buf + 2);
index 6d9376a59810c624f1e29fb998e1e40c0b02e4c4..2b212237bedbba4f2a2f07cdee5b119c35692de5 100644 (file)
@@ -66,7 +66,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
 
   if (mutt_sasl_client_new(idata->conn, &saslconn) < 0)
   {
-    mutt_debug(1, "imap_auth_sasl: Error allocating SASL connection.\n");
+    mutt_debug(1, "Error allocating SASL connection.\n");
     return IMAP_AUTH_FAILURE;
   }
 
@@ -114,10 +114,11 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
   if (rc != SASL_OK && rc != SASL_CONTINUE)
   {
     if (method)
-      mutt_debug(2, "imap_auth_sasl: %s unavailable\n", method);
+      mutt_debug(2, "%s unavailable\n", method);
     else
-      mutt_debug(1, "imap_auth_sasl: Failure starting authentication exchange. "
-                    "No shared mechanisms?\n");
+      mutt_debug(
+          1,
+          "Failure starting authentication exchange. No shared mechanisms?\n");
     /* SASL doesn't support LOGIN, so fall back */
 
     return IMAP_AUTH_UNAVAIL;
@@ -135,7 +136,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
     buf[len++] = ' ';
     if (sasl_encode64(pc, olen, buf + len, bufsize - len, &olen) != SASL_OK)
     {
-      mutt_debug(1, "imap_auth_sasl: error base64-encoding client response.\n");
+      mutt_debug(1, "#1 error base64-encoding client response.\n");
       goto bail;
     }
     client_start = false;
@@ -174,8 +175,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
          * include space for the trailing null */
         if (sasl_decode64(idata->buf + 2, len, buf, bufsize - 1, &len) != SASL_OK)
         {
-          mutt_debug(
-              1, "imap_auth_sasl: error base64-decoding server response.\n");
+          mutt_debug(1, "error base64-decoding server response.\n");
           goto bail;
         }
       }
@@ -206,8 +206,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
       }
       if (sasl_encode64(pc, olen, buf, bufsize, &olen) != SASL_OK)
       {
-        mutt_debug(1,
-                   "imap_auth_sasl: error base64-encoding client response.\n");
+        mutt_debug(1, "#2 error base64-encoding client response.\n");
         goto bail;
       }
     }
@@ -222,7 +221,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method)
     if (rc < 0)
     {
       mutt_socket_write(idata->conn, "*\r\n");
-      mutt_debug(1, "imap_auth_sasl: sasl_client_step error %d\n", rc);
+      mutt_debug(1, "sasl_client_step error %d\n", rc);
     }
 
     olen = 0;
@@ -251,7 +250,7 @@ bail:
 
   if (method)
   {
-    mutt_debug(2, "imap_auth_sasl: %s failed\n", method);
+    mutt_debug(2, "%s failed\n", method);
     return IMAP_AUTH_UNAVAIL;
   }
 
index f62fee190d87b8e66713a916ea9d5d51c32da4a5..a13961deeb4b10bc9bfd3581cc9a05a81b7ba238 100644 (file)
@@ -161,8 +161,7 @@ static int browse_add_list_result(struct ImapData *idata, const char *cmd,
 
   if (imap_parse_path(state->folder, &mx))
   {
-    mutt_debug(2, "browse_add_list_result: current folder %s makes no sense\n",
-               state->folder);
+    mutt_debug(2, "current folder %s makes no sense\n", state->folder);
     return -1;
   }
 
@@ -245,7 +244,7 @@ int imap_browse(char *path, struct BrowserState *state)
   if (n)
   {
     int rc;
-    mutt_debug(3, "imap_browse: mbox: %s\n", mbox);
+    mutt_debug(3, "mbox: %s\n", mbox);
 
     /* if our target exists and has inferiors, enter it if we
      * aren't already going to */
@@ -296,7 +295,7 @@ int imap_browse(char *path, struct BrowserState *state)
 
       if (showparents)
       {
-        mutt_debug(3, "imap_init_browse: adding parent %s\n", mbox);
+        mutt_debug(3, "adding parent %s\n", mbox);
         add_folder(list.delim, mbox, 1, 0, state, 1);
       }
 
@@ -335,7 +334,7 @@ int imap_browse(char *path, struct BrowserState *state)
     state->folder = mutt_str_strdup(buf);
   }
 
-  mutt_debug(3, "imap_browse: Quoting mailbox scan: %s -> ", mbox);
+  mutt_debug(3, "Quoting mailbox scan: %s -> ", mbox);
   snprintf(buf, sizeof(buf), "%s%%", mbox);
   imap_munge_mbox_name(idata, munged_mbox, sizeof(munged_mbox), buf);
   mutt_debug(3, "%s\n", munged_mbox);
@@ -381,15 +380,14 @@ int imap_mailbox_create(const char *folder)
 
   if (imap_parse_path(folder, &mx) < 0)
   {
-    mutt_debug(1, "imap_mailbox_create: Bad starting path %s\n", folder);
+    mutt_debug(1, "Bad starting path %s\n", folder);
     return -1;
   }
 
   idata = imap_conn_find(&mx.account, MUTT_IMAP_CONN_NONEW);
   if (!idata)
   {
-    mutt_debug(1, "imap_mailbox_create: Couldn't find open connection to %s\n",
-               mx.account.host);
+    mutt_debug(1, "Couldn't find open connection to %s\n", mx.account.host);
     goto fail;
   }
 
@@ -444,15 +442,14 @@ int imap_mailbox_rename(const char *mailbox)
 
   if (imap_parse_path(mailbox, &mx) < 0)
   {
-    mutt_debug(1, "imap_mailbox_rename: Bad source mailbox %s\n", mailbox);
+    mutt_debug(1, "Bad source mailbox %s\n", mailbox);
     return -1;
   }
 
   idata = imap_conn_find(&mx.account, MUTT_IMAP_CONN_NONEW);
   if (!idata)
   {
-    mutt_debug(1, "imap_mailbox_rename: Couldn't find open connection to %s\n",
-               mx.account.host);
+    mutt_debug(1, "Couldn't find open connection to %s\n", mx.account.host);
     goto fail;
   }
 
index 9fc6977806d18d2ebf1f4dc1cc147f37e2df4c70..bb3bc0db6254d820bb6e297b807e631584df512a 100644 (file)
@@ -104,7 +104,7 @@ static struct ImapCommand *cmd_new(struct ImapData *idata)
 
   if (cmd_queue_full(idata))
   {
-    mutt_debug(3, "cmd_new: IMAP command queue full\n");
+    mutt_debug(3, "IMAP command queue full\n");
     return NULL;
   }
 
@@ -302,14 +302,14 @@ static void cmd_parse_fetch(struct ImapData *idata, char *s)
   msn = atoi(s);
   if (msn < 1 || msn > idata->max_msn)
   {
-    mutt_debug(3, "FETCH response ignored for this message\n");
+    mutt_debug(3, "#1 FETCH response ignored for this message\n");
     return;
   }
 
   h = idata->msn_index[msn - 1];
   if (!h || !h->active)
   {
-    mutt_debug(3, "FETCH response ignored for this message\n");
+    mutt_debug(3, "#2 FETCH response ignored for this message\n");
     return;
   }
 
@@ -838,14 +838,12 @@ static int cmd_handle_untagged(struct ImapData *idata)
       /* at least the InterChange server sends EXISTS messages freely,
        * even when there is no new mail */
       else if (count == idata->max_msn)
-        mutt_debug(3, "cmd_handle_untagged: superfluous EXISTS message.\n");
+        mutt_debug(3, "superfluous EXISTS message.\n");
       else
       {
         if (!(idata->reopen & IMAP_EXPUNGE_PENDING))
         {
-          mutt_debug(
-              2, "cmd_handle_untagged: New mail in %s - %d messages total.\n",
-              idata->mailbox, count);
+          mutt_debug(2, "New mail in %s - %d messages total.\n", idata->mailbox, count);
           idata->reopen |= IMAP_NEWMAIL_PENDING;
         }
         idata->new_mail_count = count;
@@ -949,7 +947,7 @@ int imap_cmd_step(struct ImapData *idata)
     {
       mutt_mem_realloc(&idata->buf, idata->blen + IMAP_CMD_BUFSIZE);
       idata->blen = idata->blen + IMAP_CMD_BUFSIZE;
-      mutt_debug(3, "imap_cmd_step: grew buffer to %u bytes\n", idata->blen);
+      mutt_debug(3, "grew buffer to %u bytes\n", idata->blen);
     }
 
     /* back up over '\0' */
@@ -958,7 +956,7 @@ int imap_cmd_step(struct ImapData *idata)
     c = mutt_socket_readln(idata->buf + len, idata->blen - len, idata->conn);
     if (c <= 0)
     {
-      mutt_debug(1, "imap_cmd_step: Error reading server response.\n");
+      mutt_debug(1, "Error reading server response.\n");
       cmd_handle_fatal(idata);
       return IMAP_CMD_BAD;
     }
@@ -975,7 +973,7 @@ int imap_cmd_step(struct ImapData *idata)
   {
     mutt_mem_realloc(&idata->buf, IMAP_CMD_BUFSIZE);
     idata->blen = IMAP_CMD_BUFSIZE;
-    mutt_debug(3, "imap_cmd_step: shrank buffer to %u bytes\n", idata->blen);
+    mutt_debug(3, "shrank buffer to %u bytes\n", idata->blen);
   }
 
   idata->lastread = time(NULL);
@@ -1061,7 +1059,7 @@ const char *imap_cmd_trailer(struct ImapData *idata)
 
   if (!s)
   {
-    mutt_debug(2, "imap_cmd_trailer: not a tagged response\n");
+    mutt_debug(2, "not a tagged response\n");
     return notrailer;
   }
 
@@ -1070,7 +1068,7 @@ const char *imap_cmd_trailer(struct ImapData *idata)
              (mutt_str_strncasecmp(s, "NO", 2) != 0) &&
              (mutt_str_strncasecmp(s, "BAD", 3) != 0)))
   {
-    mutt_debug(2, "imap_cmd_trailer: not a command completion: %s\n", idata->buf);
+    mutt_debug(2, "not a command completion: %s\n", idata->buf);
     return notrailer;
   }
 
@@ -1137,7 +1135,7 @@ int imap_exec(struct ImapData *idata, const char *cmdstr, int flags)
     if ((flags & IMAP_CMD_FAIL_OK) && idata->status != IMAP_FATAL)
       return -2;
 
-    mutt_debug(1, "imap_exec: command failed: %s\n", idata->buf);
+    mutt_debug(1, "command failed: %s\n", idata->buf);
     return -1;
   }
 
@@ -1172,7 +1170,7 @@ void imap_cmd_finish(struct ImapData *idata)
         (idata->reopen & IMAP_NEWMAIL_PENDING) && count > idata->max_msn)
     {
       /* read new mail messages */
-      mutt_debug(2, "imap_cmd_finish: Fetching new mail\n");
+      mutt_debug(2, "Fetching new mail\n");
       /* check_status: curs_main uses imap_check_mailbox to detect
        *   whether the index needs updating */
       idata->check_status = IMAP_NEWMAIL_PENDING;
@@ -1180,7 +1178,7 @@ void imap_cmd_finish(struct ImapData *idata)
     }
     else if (idata->reopen & IMAP_EXPUNGE_PENDING)
     {
-      mutt_debug(2, "imap_cmd_finish: Expunging mailbox\n");
+      mutt_debug(2, "Expunging mailbox\n");
       imap_expunge_mailbox(idata);
       /* Detect whether we've gotten unexpected EXPUNGE messages */
       if ((idata->reopen & IMAP_EXPUNGE_PENDING) && !(idata->reopen & IMAP_EXPUNGE_EXPECTED))
@@ -1231,7 +1229,7 @@ int imap_cmd_idle(struct ImapData *idata)
   }
   if (rc != IMAP_CMD_OK)
   {
-    mutt_debug(1, "imap_cmd_idle: error starting IDLE\n");
+    mutt_debug(1, "error starting IDLE\n");
     return -1;
   }
 
index b73f2d35929e73df348e08e57e6f0cb014b75f20..e1fbb93a5eae4e6828f5cb9770db9c3bcf845c26 100644 (file)
@@ -152,14 +152,14 @@ static char *get_flags(struct ListHead *hflags, char *s)
   /* sanity-check string */
   if (mutt_str_strncasecmp("FLAGS", s, 5) != 0)
   {
-    mutt_debug(1, "get_flags: not a FLAGS response: %s\n", s);
+    mutt_debug(1, "not a FLAGS response: %s\n", s);
     return NULL;
   }
   s += 5;
   SKIPWS(s);
   if (*s != '(')
   {
-    mutt_debug(1, "get_flags: bogus FLAGS response: %s\n", s);
+    mutt_debug(1, "bogus FLAGS response: %s\n", s);
     return NULL;
   }
 
@@ -181,7 +181,7 @@ static char *get_flags(struct ListHead *hflags, char *s)
   /* note bad flags response */
   if (*s != ')')
   {
-    mutt_debug(1, "get_flags: Unterminated FLAGS response: %s\n", s);
+    mutt_debug(1, "Unterminated FLAGS response: %s\n", s);
     mutt_list_free(hflags);
 
     return NULL;
@@ -386,7 +386,7 @@ static int get_mailbox(const char *path, struct ImapData **hidata, char *buf, si
 
   if (imap_parse_path(path, &mx))
   {
-    mutt_debug(1, "get_mailbox: Error parsing %s\n", path);
+    mutt_debug(1, "Error parsing %s\n", path);
     return -1;
   }
   if (!(*hidata = imap_conn_find(&(mx.account), option(OPT_IMAP_PASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)) ||
@@ -673,7 +673,7 @@ int imap_access(const char *path)
 
   if (imap_mboxcache_get(idata, mailbox, 0))
   {
-    mutt_debug(3, "imap_access: found %s in cache\n", mailbox);
+    mutt_debug(3, "found %s in cache\n", mailbox);
     return 0;
   }
 
@@ -685,14 +685,14 @@ int imap_access(const char *path)
     snprintf(buf, sizeof(buf), "STATUS %s (UID-VALIDITY)", mbox);
   else
   {
-    mutt_debug(2, "imap_access: STATUS not supported?\n");
+    mutt_debug(2, "STATUS not supported?\n");
     return -1;
   }
 
   rc = imap_exec(idata, buf, IMAP_CMD_FAIL_OK);
   if (rc < 0)
   {
-    mutt_debug(1, "imap_access: Can't check STATUS of %s\n", mbox);
+    mutt_debug(1, "Can't check STATUS of %s\n", mbox);
     return rc;
   }
 
@@ -822,13 +822,13 @@ int imap_read_literal(FILE *fp, struct ImapData *idata, long bytes, struct Progr
   char c;
   bool r = false;
 
-  mutt_debug(2, "imap_read_literal: reading %ld bytes\n", bytes);
+  mutt_debug(2, "reading %ld bytes\n", bytes);
 
   for (long pos = 0; pos < bytes; pos++)
   {
     if (mutt_socket_readchar(idata->conn, &c) != 1)
     {
-      mutt_debug(1, "imap_read_literal: error during read, %ld bytes read\n", pos);
+      mutt_debug(1, "error during read, %ld bytes read\n", pos);
       idata->status = IMAP_FATAL;
 
       return -1;
@@ -1224,7 +1224,7 @@ int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post,
   cmd = mutt_buffer_new();
   if (!cmd)
   {
-    mutt_debug(1, "imap_exec_msgset: unable to allocate buffer\n");
+    mutt_debug(1, "unable to allocate buffer\n");
     return -1;
   }
 
@@ -1522,7 +1522,7 @@ int imap_buffy_check(int force, int check_stats)
       /* Send commands to previous server. Sorting the buffy list
        * may prevent some infelicitous interleavings */
       if (imap_exec(lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1)
-        mutt_debug(1, "Error polling mailboxes\n");
+        mutt_debug(1, "#1 Error polling mailboxes\n");
 
       lastdata = NULL;
     }
@@ -1547,7 +1547,7 @@ int imap_buffy_check(int force, int check_stats)
 
   if (lastdata && (imap_exec(lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1))
   {
-    mutt_debug(1, "Error polling mailboxes\n");
+    mutt_debug(1, "#2 Error polling mailboxes\n");
     return 0;
   }
 
@@ -1674,8 +1674,8 @@ struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox,
       }
       status->uidvalidity = *(unsigned int *) uidvalidity;
       status->uidnext = uidnext ? *(unsigned int *) uidnext : 0;
-      mutt_debug(3, "mboxcache: hcache uidvalidity %d, uidnext %d\n",
-                 status->uidvalidity, status->uidnext);
+      mutt_debug(3, "hcache uidvalidity %d, uidnext %d\n", status->uidvalidity,
+                 status->uidnext);
     }
     mutt_hcache_free(hc, &uidvalidity);
     mutt_hcache_free(hc, &uidnext);
@@ -1927,14 +1927,14 @@ int imap_fast_trash(struct Context *ctx, char *dest)
 
   if (imap_parse_path(dest, &mx))
   {
-    mutt_debug(1, "imap_fast_trash: bad destination %s\n", dest);
+    mutt_debug(1, "bad destination %s\n", dest);
     return -1;
   }
 
   /* check that the save-to folder is in the same account */
   if (!mutt_account_match(&(idata->conn->account), &(mx.account)))
   {
-    mutt_debug(3, "imap_fast_trash: %s not same server as %s\n", dest, ctx->path);
+    mutt_debug(3, "%s not same server as %s\n", dest, ctx->path);
     return 1;
   }
 
@@ -1952,7 +1952,7 @@ int imap_fast_trash(struct Context *ctx, char *dest)
       rc = imap_sync_message_for_copy(idata, ctx->hdrs[i], sync_cmd, &err_continue);
       if (rc < 0)
       {
-        mutt_debug(1, "imap_fast_trash: could not sync\n");
+        mutt_debug(1, "could not sync\n");
         goto out;
       }
     }
@@ -1964,7 +1964,7 @@ int imap_fast_trash(struct Context *ctx, char *dest)
     rc = imap_exec_msgset(idata, "UID COPY", mmbox, MUTT_TRASH, 0, 0);
     if (!rc)
     {
-      mutt_debug(1, "imap_fast_trash: No messages to trash\n");
+      mutt_debug(1, "No messages to trash\n");
       rc = -1;
       goto out;
     }
@@ -1988,7 +1988,7 @@ int imap_fast_trash(struct Context *ctx, char *dest)
       /* bail out if command failed for reasons other than nonexistent target */
       if (mutt_str_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
         break;
-      mutt_debug(3, "imap_fast_trash: server suggests TRYCREATE\n");
+      mutt_debug(3, "server suggests TRYCREATE\n");
       snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
       if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
       {
@@ -2232,7 +2232,7 @@ static int imap_open_mailbox(struct Context *ctx)
     goto fail;
   }
 
-  mutt_debug(2, "imap_open_mailbox: msgcount is %d\n", ctx->msgcount);
+  mutt_debug(2, "msgcount is %d\n", ctx->msgcount);
   FREE(&mx.mbox);
   return 0;
 
@@ -2424,7 +2424,7 @@ int imap_sync_mailbox(struct Context *ctx, int expunge)
 
   if (idata->state < IMAP_SELECTED)
   {
-    mutt_debug(2, "imap_sync_mailbox: no mailbox selected\n");
+    mutt_debug(2, "no mailbox selected\n");
     return -1;
   }
 
@@ -2490,8 +2490,7 @@ int imap_sync_mailbox(struct Context *ctx, int expunge)
         if (!appendctx)
           appendctx = mx_open_mailbox(ctx->path, MUTT_APPEND | MUTT_QUIET, NULL);
         if (!appendctx)
-          mutt_debug(
-              1, "imap_sync_mailbox: Error opening mailbox in append mode\n");
+          mutt_debug(1, "Error opening mailbox in append mode\n");
         else
           mutt_save_message_ctx(h, 1, 0, 0, appendctx);
         h->xlabel_changed = false;
@@ -2728,7 +2727,7 @@ static int imap_commit_message_tags(struct Context *ctx, struct Header *h, char
     cmd = mutt_buffer_new();
     if (!cmd)
     {
-      mutt_debug(1, "imap_commit_message_tags: unable to allocate buffer\n");
+      mutt_debug(1, "unable to allocate buffer\n");
       return -1;
     }
     cmd->dptr = cmd->data;
@@ -2756,7 +2755,7 @@ static int imap_commit_message_tags(struct Context *ctx, struct Header *h, char
     cmd = mutt_buffer_new();
     if (!cmd)
     {
-      mutt_debug(1, "imap_commit_message_tags: fail to remove old flags\n");
+      mutt_debug(1, "fail to remove old flags\n");
       return -1;
     }
     cmd->dptr = cmd->data;
@@ -2768,7 +2767,7 @@ static int imap_commit_message_tags(struct Context *ctx, struct Header *h, char
 
     if (imap_exec(idata, cmd->data, 0) != 0)
     {
-      mutt_debug(1, "imap_commit_message_tags: fail to add new flags\n");
+      mutt_debug(1, "fail to add new flags\n");
       mutt_buffer_free(&cmd);
       return -1;
     }
index 8c0cf92aa11b97619faa2436ead895390883ca92..4cafe9eb55ad0811d6a07dbe0cbab54f4d2c94b4 100644 (file)
@@ -215,14 +215,14 @@ static char *msg_parse_flags(struct ImapHeader *h, char *s)
   /* sanity-check string */
   if (mutt_str_strncasecmp("FLAGS", s, 5) != 0)
   {
-    mutt_debug(1, "msg_parse_flags: not a FLAGS response: %s\n", s);
+    mutt_debug(1, "not a FLAGS response: %s\n", s);
     return NULL;
   }
   s += 5;
   SKIPWS(s);
   if (*s != '(')
   {
-    mutt_debug(1, "msg_parse_flags: bogus FLAGS response: %s\n", s);
+    mutt_debug(1, "bogus FLAGS response: %s\n", s);
     return NULL;
   }
   s++;
@@ -291,7 +291,7 @@ static char *msg_parse_flags(struct ImapHeader *h, char *s)
     s++;
   else
   {
-    mutt_debug(1, "msg_parse_flags: Unterminated FLAGS response: %s\n", s);
+    mutt_debug(1, "Unterminated FLAGS response: %s\n", s);
     return NULL;
   }
 
@@ -338,7 +338,7 @@ static int msg_parse_fetch(struct ImapHeader *h, char *s)
       SKIPWS(s);
       if (*s != '\"')
       {
-        mutt_debug(1, "msg_parse_fetch(): bogus INTERNALDATE entry: %s\n", s);
+        mutt_debug(1, "bogus INTERNALDATE entry: %s\n", s);
         return -1;
       }
       s++;
@@ -729,24 +729,24 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
 
         if (!h.data->uid)
         {
-          mutt_debug(2, "imap_read_headers: skipping hcache FETCH "
-                        "response for message number %d missing a UID\n",
+          mutt_debug(2, "skipping hcache FETCH response for message number %d "
+                        "missing a UID\n",
                      h.data->msn);
           continue;
         }
 
         if (h.data->msn < 1 || h.data->msn > msn_end)
         {
-          mutt_debug(1, "imap_read_headers: skipping hcache FETCH "
-                        "response for unknown message number %d\n",
-                     h.data->msn);
+          mutt_debug(
+              1,
+              "skipping hcache FETCH response for unknown message number %d\n",
+              h.data->msn);
           continue;
         }
 
         if (idata->msn_index[h.data->msn - 1])
         {
-          mutt_debug(2, "imap_read_headers: skipping hcache FETCH "
-                        "for duplicate message %d\n",
+          mutt_debug(2, "skipping hcache FETCH for duplicate message %d\n",
                      h.data->msn);
           continue;
         }
@@ -858,8 +858,8 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
 
         if (h.data->msn < 1 || h.data->msn > fetch_msn_end)
         {
-          mutt_debug(1, "imap_read_headers: skipping FETCH response for "
-                        "unknown message number %d\n",
+          mutt_debug(1,
+                     "skipping FETCH response for unknown message number %d\n",
                      h.data->msn);
           continue;
         }
@@ -867,8 +867,7 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i
         /* May receive FLAGS updates in a separate untagged response (#2935) */
         if (idata->msn_index[h.data->msn - 1])
         {
-          mutt_debug(2, "imap_read_headers: skipping FETCH response for "
-                        "duplicate message %d\n",
+          mutt_debug(2, "skipping FETCH response for duplicate message %d\n",
                      h.data->msn);
           continue;
         }
@@ -1321,7 +1320,7 @@ int imap_append_message(struct Context *ctx, struct Message *msg)
   {
     char *pc = NULL;
 
-    mutt_debug(1, "imap_append_message(): command failed: %s\n", idata->buf);
+    mutt_debug(1, "#1 command failed: %s\n", idata->buf);
 
     pc = idata->buf + SEQLEN;
     SKIPWS(pc);
@@ -1361,7 +1360,7 @@ int imap_append_message(struct Context *ctx, struct Message *msg)
   {
     char *pc = NULL;
 
-    mutt_debug(1, "imap_append_message(): command failed: %s\n", idata->buf);
+    mutt_debug(1, "#2 command failed: %s\n", idata->buf);
     pc = idata->buf + SEQLEN;
     SKIPWS(pc);
     pc = imap_next_word(pc);
@@ -1404,21 +1403,20 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
 
   if (imap_parse_path(dest, &mx))
   {
-    mutt_debug(1, "imap_copy_messages: bad destination %s\n", dest);
+    mutt_debug(1, "bad destination %s\n", dest);
     return -1;
   }
 
   /* check that the save-to folder is in the same account */
   if (!mutt_account_match(&(idata->conn->account), &(mx.account)))
   {
-    mutt_debug(3, "imap_copy_messages: %s not same server as %s\n", dest, ctx->path);
+    mutt_debug(3, "%s not same server as %s\n", dest, ctx->path);
     return 1;
   }
 
   if (h && h->attach_del)
   {
-    mutt_debug(
-        3, "imap_copy_messages: Message contains attachments to be deleted\n");
+    mutt_debug(3, "#1 Message contains attachments to be deleted\n");
     return 1;
   }
 
@@ -1446,8 +1444,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
 
         if (ctx->hdrs[i]->attach_del)
         {
-          mutt_debug(3, "imap_copy_messages: Message contains attachments to "
-                        "be deleted\n");
+          mutt_debug(3, "#2 Message contains attachments to be deleted\n");
           return 1;
         }
 
@@ -1456,7 +1453,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
           rc = imap_sync_message_for_copy(idata, ctx->hdrs[i], &sync_cmd, &err_continue);
           if (rc < 0)
           {
-            mutt_debug(1, "imap_copy_messages: could not sync\n");
+            mutt_debug(1, "#1 could not sync\n");
             goto out;
           }
         }
@@ -1465,13 +1462,13 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
       rc = imap_exec_msgset(idata, "UID COPY", mmbox, MUTT_TAG, 0, 0);
       if (!rc)
       {
-        mutt_debug(1, "imap_copy_messages: No messages tagged\n");
+        mutt_debug(1, "No messages tagged\n");
         rc = -1;
         goto out;
       }
       else if (rc < 0)
       {
-        mutt_debug(1, "could not queue copy\n");
+        mutt_debug(1, "#1 could not queue copy\n");
         goto out;
       }
       else
@@ -1487,14 +1484,14 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
         rc = imap_sync_message_for_copy(idata, h, &sync_cmd, &err_continue);
         if (rc < 0)
         {
-          mutt_debug(1, "imap_copy_messages: could not sync\n");
+          mutt_debug(1, "#2 could not sync\n");
           goto out;
         }
       }
       rc = imap_exec(idata, cmd.data, IMAP_CMD_QUEUE);
       if (rc < 0)
       {
-        mutt_debug(1, "could not queue copy\n");
+        mutt_debug(1, "#2 could not queue copy\n");
         goto out;
       }
     }
@@ -1511,7 +1508,7 @@ int imap_copy_messages(struct Context *ctx, struct Header *h, char *dest, int de
       /* bail out if command failed for reasons other than nonexistent target */
       if (mutt_str_strncasecmp(imap_get_qualifier(idata->buf), "[TRYCREATE]", 11) != 0)
         break;
-      mutt_debug(3, "imap_copy_messages: server suggests TRYCREATE\n");
+      mutt_debug(3, "server suggests TRYCREATE\n");
       snprintf(prompt, sizeof(prompt), _("Create %s?"), mbox);
       if (option(OPT_CONFIRMCREATE) && mutt_yesorno(prompt, 1) != MUTT_YES)
       {
@@ -1649,7 +1646,7 @@ char *imap_set_flags(struct ImapData *idata, struct Header *h, char *s, int *ser
 
   memcpy(&old_hd, hd, sizeof(old_hd));
 
-  mutt_debug(2, "imap_set_flags: parsing FLAGS\n");
+  mutt_debug(2, "parsing FLAGS\n");
   s = msg_parse_flags(&newh, s);
   if (!s)
     return NULL;
index db3da95d871ec9e6a236d473f5ed3c63d1d68db2..b35f6bc8229de213567db0977fe5f94c2dab95fb 100644 (file)
@@ -456,7 +456,7 @@ int imap_parse_path(const char *path, struct ImapMbox *mx)
     n = sscanf(tmp, "%127[^:/]%127s", mx->account.host, tmp);
     if (n < 1)
     {
-      mutt_debug(1, "imap_parse_path: NULL host in %s\n", path);
+      mutt_debug(1, "NULL host in %s\n", path);
       FREE(&mx->mbox);
       return -1;
     }
@@ -471,7 +471,7 @@ int imap_parse_path(const char *path, struct ImapMbox *mx)
           mx->account.flags |= MUTT_ACCT_SSL;
         else
         {
-          mutt_debug(1, "imap_parse_path: Unknown connection type in %s\n", path);
+          mutt_debug(1, "Unknown connection type in %s\n", path);
           FREE(&mx->mbox);
           return -1;
         }
diff --git a/init.c b/init.c
index b3ebe5bdc000a186b2591f496ab4b493371c4246..4d2e7d1ef3cef8387e93d01623b1e3117dda7b52 100644 (file)
--- a/init.c
+++ b/init.c
@@ -318,7 +318,7 @@ static struct MbTable *parse_mbtable(const char *s)
   {
     if (k == (size_t)(-1) || k == (size_t)(-2))
     {
-      mutt_debug(1, "parse_mbtable: mbrtowc returned %d converting %s in %s\n",
+      mutt_debug(1, "mbrtowc returned %d converting %s in %s\n",
                  (k == (size_t)(-1)) ? -1 : -2, s, t->orig_str);
       if (k == (size_t)(-1))
         memset(&mbstate, 0, sizeof(mbstate));
@@ -613,14 +613,14 @@ int mutt_extract_token(struct Buffer *dest, struct Buffer *tok, int flags)
       } while (pc && *pc != '`');
       if (!pc)
       {
-        mutt_debug(1, "mutt_get_token: mismatched backticks\n");
+        mutt_debug(1, "mismatched backticks\n");
         return -1;
       }
       cmd = mutt_str_substr_dup(tok->dptr, pc);
       pid = mutt_create_filter(cmd, NULL, &fp, NULL);
       if (pid < 0)
       {
-        mutt_debug(1, "mutt_get_token: unable to fork command: %s\n", cmd);
+        mutt_debug(1, "unable to fork command: %s\n", cmd);
         FREE(&cmd);
         return -1;
       }
@@ -1602,7 +1602,7 @@ static int parse_attach_list(struct Buffer *buf, struct Buffer *s,
       return -1;
     }
 
-    mutt_debug(5, "parse_attach_list: added %s/%s [%d]\n", a->major, a->minor, a->major_int);
+    mutt_debug(5, "added %s/%s [%d]\n", a->major, a->minor, a->major_int);
 
     mutt_list_insert_tail(head, (char *) a);
   } while (MoreArgs(s));
@@ -1646,12 +1646,11 @@ static int parse_unattach_list(struct Buffer *buf, struct Buffer *s,
     STAILQ_FOREACH_SAFE(np, head, entries, tmp2)
     {
       a = (struct AttachMatch *) np->data;
-      mutt_debug(5, "parse_unattach_list: check %s/%s [%d] : %s/%s [%d]\n",
-                 a->major, a->minor, a->major_int, tmp, minor, major);
+      mutt_debug(5, "check %s/%s [%d] : %s/%s [%d]\n", a->major, a->minor,
+                 a->major_int, tmp, minor, major);
       if (a->major_int == major && (mutt_str_strcasecmp(minor, a->minor) == 0))
       {
-        mutt_debug(5, "parse_unattach_list: removed %s/%s [%d]\n", a->major,
-                   a->minor, a->major_int);
+        mutt_debug(5, "removed %s/%s [%d]\n", a->major, a->minor, a->major_int);
         regfree(&a->minor_regex);
         FREE(&a->major);
         STAILQ_REMOVE(head, np, ListNode, entries);
@@ -1941,7 +1940,7 @@ static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data,
   }
 
   mutt_extract_token(buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON);
-  mutt_debug(3, "parse_alias: Second token is '%s'.\n", buf->data);
+  mutt_debug(3, "Second token is '%s'.\n", buf->data);
 
   tmp->addr = mutt_parse_adrlist(tmp->addr, buf->data);
 
@@ -1967,9 +1966,9 @@ static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data,
     for (struct Address *a = tmp->addr; a && a->mailbox; a = a->next)
     {
       if (!a->group)
-        mutt_debug(3, "parse_alias:   %s\n", a->mailbox);
+        mutt_debug(3, "  %s\n", a->mailbox);
       else
-        mutt_debug(3, "parse_alias:   Group %s\n", a->mailbox);
+        mutt_debug(3, "  Group %s\n", a->mailbox);
     }
   }
 #endif
diff --git a/mbox.c b/mbox.c
index 45ddd8c854cc3a9922afb6581510a7a5001c73b9..0ad0e8609ffc3182e4e70434a9dab4f29412ae86 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -154,7 +154,7 @@ static int mmdf_parse_mailbox(struct Context *ctx)
       if (fgets(buf, sizeof(buf) - 1, ctx->fp) == NULL)
       {
         /* TODO: memory leak??? */
-        mutt_debug(1, "mmdf_parse_mailbox: unexpected EOF\n");
+        mutt_debug(1, "unexpected EOF\n");
         break;
       }
 
@@ -164,7 +164,7 @@ static int mmdf_parse_mailbox(struct Context *ctx)
       {
         if (fseeko(ctx->fp, loc, SEEK_SET) != 0)
         {
-          mutt_debug(1, "mmdf_parse_mailbox: fseek() failed\n");
+          mutt_debug(1, "#1 fseek() failed\n");
           mutt_error(_("Mailbox is corrupt!"));
           return -1;
         }
@@ -189,7 +189,7 @@ static int mmdf_parse_mailbox(struct Context *ctx)
               (mutt_str_strcmp(MMDF_SEP, buf) != 0))
           {
             if (fseeko(ctx->fp, loc, SEEK_SET) != 0)
-              mutt_debug(1, "mmdf_parse_mailbox: fseek() failed\n");
+              mutt_debug(1, "#2 fseek() failed\n");
             hdr->content->length = -1;
           }
         }
@@ -226,7 +226,7 @@ static int mmdf_parse_mailbox(struct Context *ctx)
     }
     else
     {
-      mutt_debug(1, "mmdf_parse_mailbox: corrupt mailbox!\n");
+      mutt_debug(1, "corrupt mailbox!\n");
       mutt_error(_("Mailbox is corrupt!"));
       return -1;
     }
@@ -340,14 +340,14 @@ static int mbox_parse_mailbox(struct Context *ctx)
               fgets(buf, sizeof(buf), ctx->fp) == NULL ||
               (mutt_str_strncmp("From ", buf, 5) != 0))
           {
-            mutt_debug(1, "mbox_parse_mailbox: bad content-length in message "
-                          "%d (cl=" OFF_T_FMT ")\n",
+            mutt_debug(1,
+                       "bad content-length in message %d (cl=" OFF_T_FMT ")\n",
                        curhdr->index, curhdr->content->length);
             mutt_debug(1, "\tLINE: %s", buf);
             /* nope, return the previous position */
             if ((loc < 0) || (fseeko(ctx->fp, loc, SEEK_SET) != 0))
             {
-              mutt_debug(1, "mbox_parse_mailbox: fseek() failed\n");
+              mutt_debug(1, "#1 fseek() failed\n");
             }
             curhdr->content->length = -1;
           }
@@ -371,7 +371,7 @@ static int mbox_parse_mailbox(struct Context *ctx)
 
             /* count the number of lines in this message */
             if ((loc < 0) || (fseeko(ctx->fp, loc, SEEK_SET) != 0))
-              mutt_debug(1, "mbox_parse_mailbox: fseek() failed\n");
+              mutt_debug(1, "#2 fseek() failed\n");
             while (cl-- > 0)
             {
               if (fgetc(ctx->fp) == '\n')
@@ -381,7 +381,7 @@ static int mbox_parse_mailbox(struct Context *ctx)
 
           /* return to the offset of the next message separator */
           if (fseeko(ctx->fp, tmploc, SEEK_SET) != 0)
-            mutt_debug(1, "mbox_parse_mailbox: fseek() failed\n");
+            mutt_debug(1, "#3 fseek() failed\n");
         }
       }
 
@@ -896,14 +896,14 @@ static int mbox_check_mailbox(struct Context *ctx, int *index_hint)
        * folder.
        */
       if (fseeko(ctx->fp, ctx->size, SEEK_SET) != 0)
-        mutt_debug(1, "mbox_check_mailbox: fseek() failed\n");
+        mutt_debug(1, "#1 fseek() failed\n");
       if (fgets(buffer, sizeof(buffer), ctx->fp) != NULL)
       {
         if ((ctx->magic == MUTT_MBOX && (mutt_str_strncmp("From ", buffer, 5) == 0)) ||
             (ctx->magic == MUTT_MMDF && (mutt_str_strcmp(MMDF_SEP, buffer) == 0)))
         {
           if (fseeko(ctx->fp, ctx->size, SEEK_SET) != 0)
-            mutt_debug(1, "mbox_check_mailbox: fseek() failed\n");
+            mutt_debug(1, "#2 fseek() failed\n");
           if (ctx->magic == MUTT_MBOX)
             mbox_parse_mailbox(ctx);
           else
@@ -927,7 +927,7 @@ static int mbox_check_mailbox(struct Context *ctx, int *index_hint)
       }
       else
       {
-        mutt_debug(1, "mbox_check_mailbox: fgets returned NULL.\n");
+        mutt_debug(1, "fgets returned NULL.\n");
         modified = true;
       }
     }
@@ -1101,7 +1101,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
     mutt_error(
         _("sync: mbox modified, but no modified messages! (report this bug)"));
     mutt_sleep(5); /* the mutt_error /will/ get cleared! */
-    mutt_debug(1, "mbox_sync_mailbox(): no modified messages.\n");
+    mutt_debug(1, "no modified messages.\n");
     unlink(tempfile);
     goto bail;
   }
@@ -1207,8 +1207,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
   if (fclose(fp) != 0)
   {
     fp = NULL;
-    mutt_debug(1,
-               "mbox_sync_mailbox: mutt_file_fclose (&) returned non-zero.\n");
+    mutt_debug(1, "mutt_file_fclose (&) returned non-zero.\n");
     unlink(tempfile);
     mutt_perror(tempfile);
     mutt_sleep(5);
@@ -1230,8 +1229,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
   {
     mutt_unblock_signals();
     mx_fastclose_mailbox(ctx);
-    mutt_debug(1,
-               "mbox_sync_mailbox: unable to reopen temp copy of mailbox!\n");
+    mutt_debug(1, "unable to reopen temp copy of mailbox!\n");
     mutt_perror(tempfile);
     mutt_sleep(5);
     FREE(&newOffset);
@@ -1245,7 +1243,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
       (ctx->magic == MUTT_MBOX && (mutt_str_strncmp("From ", buf, 5) != 0)) ||
       (ctx->magic == MUTT_MMDF && (mutt_str_strcmp(MMDF_SEP, buf) != 0)))
   {
-    mutt_debug(1, "mbox_sync_mailbox: message not in expected position.\n");
+    mutt_debug(1, "message not in expected position.\n");
     mutt_debug(1, "\tLINE: %s\n", buf);
     i = -1;
   }
@@ -1254,7 +1252,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
     if (fseeko(ctx->fp, offset, SEEK_SET) != 0) /* return to proper offset */
     {
       i = -1;
-      mutt_debug(1, "mbox_sync_mailbox: fseek() failed\n");
+      mutt_debug(1, "fseek() failed\n");
     }
     else
     {
@@ -1274,7 +1272,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint)
       if ((ctx->size < 0) || (ftruncate(fileno(ctx->fp), ctx->size) != 0))
       {
         i = -1;
-        mutt_debug(1, "mbox_sync_mailbox: ftruncate() failed\n");
+        mutt_debug(1, "ftruncate() failed\n");
       }
     }
   }
diff --git a/menu.c b/menu.c
index 5e5641566133f403cf1cc29dbd57593878ade050..b7ab5c43393d414e1da1aeb58b591237170f9a73 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -860,7 +860,7 @@ void mutt_pop_current_menu(struct Menu *menu)
 
   if (!MenuStackCount || (MenuStack[MenuStackCount - 1] != menu))
   {
-    mutt_debug(1, "mutt_pop_current_menu() called with inactive menu\n");
+    mutt_debug(1, "called with inactive menu\n");
     return;
   }
 
diff --git a/mh.c b/mh.c
index 0a14658ffa9aa088a7fd8182783329ea88e49e12..92410ef8ce436246ae93559db3c714b6fafd6169 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -868,7 +868,7 @@ static int maildir_parse_dir(struct Context *ctx, struct Maildir ***last,
     }
 
     /* FOO - really ignore the return value? */
-    mutt_debug(2, "%s:%d: queueing %s\n", __FILE__, __LINE__, de->d_name);
+    mutt_debug(2, "queueing %s\n", de->d_name);
 
     h = mutt_new_header();
     h->old = is_old;
@@ -915,15 +915,13 @@ static bool maildir_add_to_context(struct Context *ctx, struct Maildir *md)
 
   while (md)
   {
-    mutt_debug(2, "%s:%d maildir_add_to_context(): Considering %s\n", __FILE__,
-               __LINE__, NONULL(md->canon_fname));
+    mutt_debug(2, "Considering %s\n", NONULL(md->canon_fname));
 
     if (md->h)
     {
-      mutt_debug(2, "%s:%d Adding header structure. Flags: %s%s%s%s%s\n",
-                 __FILE__, __LINE__, md->h->flagged ? "f" : "",
-                 md->h->deleted ? "D" : "", md->h->replied ? "r" : "",
-                 md->h->old ? "O" : "", md->h->read ? "R" : "");
+      mutt_debug(2, "Adding header structure. Flags: %s%s%s%s%s\n",
+                 md->h->flagged ? "f" : "", md->h->deleted ? "D" : "",
+                 md->h->replied ? "r" : "", md->h->old ? "O" : "", md->h->read ? "R" : "");
       if (ctx->msgcount == ctx->hdrmax)
         mx_alloc_memory(ctx);
 
@@ -1468,8 +1466,7 @@ static int maildir_mh_open_message(struct Context *ctx, struct Message *msg,
   if (!msg->fp)
   {
     mutt_perror(path);
-    mutt_debug(1, "maildir_mh_open_message: fopen: %s: %s (errno %d).\n", path,
-               strerror(errno), errno);
+    mutt_debug(1, "fopen: %s: %s (errno %d).\n", path, strerror(errno), errno);
     return -1;
   }
 
@@ -1531,7 +1528,7 @@ static int maildir_open_new_message(struct Message *msg, struct Context *dest,
     snprintf(path, _POSIX_PATH_MAX, "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s", dest->path, subdir,
              (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix);
 
-    mutt_debug(2, "maildir_open_new_message (): Trying %s.\n", path);
+    mutt_debug(2, "Trying %s.\n", path);
 
     fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666);
     if (fd == -1)
@@ -1545,7 +1542,7 @@ static int maildir_open_new_message(struct Message *msg, struct Context *dest,
     }
     else
     {
-      mutt_debug(2, "maildir_open_new_message (): Success.\n");
+      mutt_debug(2, "Success.\n");
       msg->path = mutt_str_strdup(path);
       break;
     }
@@ -1614,7 +1611,7 @@ static int md_commit_message(struct Context *ctx, struct Message *msg, struct He
              (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix);
     snprintf(full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
 
-    mutt_debug(2, "md_commit_message (): renaming %s to %s.\n", msg->path, full);
+    mutt_debug(2, "renaming %s to %s.\n", msg->path, full);
 
     if (mutt_file_safe_rename(msg->path, full) == 0)
     {
@@ -1869,7 +1866,7 @@ static int maildir_sync_message(struct Context *ctx, int msgno)
     p = strrchr(h->path, '/');
     if (!p)
     {
-      mutt_debug(1, "maildir_sync_message: %s: unable to find subdir!\n", h->path);
+      mutt_debug(1, "%s: unable to find subdir!\n", h->path);
       return -1;
     }
     p++;
index bb8f70ac3bb4710c31bc291f0a858f6588d18604..7b23f45d6fb7f6a79d31d84e86e825b829415e49 100644 (file)
@@ -522,7 +522,7 @@ time_t mutt_date_parse_date(const char *s, struct Tz *tz_out)
           sec = 0;
         else
         {
-          mutt_debug(1, "parse_date: could not process time format: %s\n", t);
+          mutt_debug(1, "could not process time format: %s\n", t);
           return -1;
         }
         if ((hour < 0) || (hour > 23) || (min < 0) || (min > 59) || (sec < 0) || (sec > 60))
@@ -589,8 +589,7 @@ time_t mutt_date_parse_date(const char *s, struct Tz *tz_out)
 
   if (count < 4) /* don't check for missing timezone */
   {
-    mutt_debug(
-        1, "parse_date(): error parsing date format, using received time\n");
+    mutt_debug(1, "error parsing date format, using received time\n");
     return -1;
   }
 
index aa7f67d9ad9ace2a7a2ac7bbe6e6755d2a592021..c16fc06c25401e9bba7c79a1c993bda2c66ae4e2 100644 (file)
@@ -145,14 +145,14 @@ static int mkwrapdir(const char *path, char *newfile, size_t nflen, char *newdir
   snprintf(newdir, ndlen, "%s/%s", parent, ".muttXXXXXX");
   if (!mkdtemp(newdir))
   {
-    mutt_debug(1, "mkwrapdir: mkdtemp() failed\n");
+    mutt_debug(1, "mkdtemp() failed\n");
     return -1;
   }
 
   if (snprintf(newfile, nflen, "%s/%s", newdir, NONULL(basename)) >= nflen)
   {
     rmdir(newdir);
-    mutt_debug(1, "mkwrapdir: string was truncated\n");
+    mutt_debug(1, "string was truncated\n");
     return -1;
   }
   return 0;
@@ -389,8 +389,7 @@ int mutt_file_safe_rename(const char *src, const char *target)
      * With other file systems, rename should just fail when
      * the files reside on different file systems, so it's safe
      * to try it here. */
-    mutt_debug(1, "mutt_file_safe_rename: link (%s, %s) failed: %s (%d)\n", src,
-               target, strerror(errno), errno);
+    mutt_debug(1, "link (%s, %s) failed: %s (%d)\n", src, target, strerror(errno), errno);
 
     /* FUSE may return ENOSYS. VFAT may return EPERM. FreeBSD's
      * msdosfs may return EOPNOTSUPP.  ENOTSUP can also appear. */
@@ -403,15 +402,14 @@ int mutt_file_safe_rename(const char *src, const char *target)
 #endif
         )
     {
-      mutt_debug(1, "mutt_file_safe_rename: trying rename...\n");
+      mutt_debug(1, "trying rename...\n");
       if (rename(src, target) == -1)
       {
-        mutt_debug(1,
-                   "mutt_file_safe_rename: rename (%s, %s) failed: %s (%d)\n",
-                   src, target, strerror(errno), errno);
+        mutt_debug(1, "rename (%s, %s) failed: %s (%d)\n", src, target,
+                   strerror(errno), errno);
         return -1;
       }
-      mutt_debug(1, "mutt_file_safe_rename: rename succeeded.\n");
+      mutt_debug(1, "rename succeeded.\n");
 
       return 0;
     }
@@ -423,15 +421,13 @@ int mutt_file_safe_rename(const char *src, const char *target)
 
   if (lstat(src, &ssb) == -1)
   {
-    mutt_debug(1, "mutt_file_safe_rename: can't stat %s: %s (%d)\n", src,
-               strerror(errno), errno);
+    mutt_debug(1, "#1 can't stat %s: %s (%d)\n", src, strerror(errno), errno);
     return -1;
   }
 
   if (lstat(target, &tsb) == -1)
   {
-    mutt_debug(1, "mutt_file_safe_rename: can't stat %s: %s (%d)\n", src,
-               strerror(errno), errno);
+    mutt_debug(1, "#2 can't stat %s: %s (%d)\n", src, strerror(errno), errno);
     return -1;
   }
 
@@ -439,9 +435,7 @@ int mutt_file_safe_rename(const char *src, const char *target)
 
   if (!compare_stat(&ssb, &tsb))
   {
-    mutt_debug(1, "mutt_file_safe_rename: stat blocks for %s and %s diverge; "
-                  "pretending EEXIST.\n",
-               src, target);
+    mutt_debug(1, "stat blocks for %s and %s diverge; pretending EEXIST.\n", src, target);
     errno = EEXIST;
     return -1;
   }
@@ -450,8 +444,7 @@ int mutt_file_safe_rename(const char *src, const char *target)
    * Should we really ignore the return value here? XXX */
   if (unlink(src) == -1)
   {
-    mutt_debug(1, "mutt_file_safe_rename: unlink (%s) failed: %s (%d)\n", src,
-               strerror(errno), errno);
+    mutt_debug(1, "unlink (%s) failed: %s (%d)\n", src, strerror(errno), errno);
   }
 
   return 0;
@@ -474,7 +467,7 @@ int mutt_file_rmtree(const char *path)
   dirp = opendir(path);
   if (!dirp)
   {
-    mutt_debug(1, "mutt_file_rmtree: error opening directory %s\n", path);
+    mutt_debug(1, "error opening directory %s\n", path);
     return -1;
   }
   while ((de = readdir(dirp)))
@@ -1128,7 +1121,7 @@ int mutt_file_lock(const char *path, int fd, int excl, int timeout)
   attempt = 0;
   while (fcntl(fd, F_SETLK, &lck) == -1)
   {
-    mutt_debug(1, "mutt_file_lock(): fcntl errno %d.\n", errno);
+    mutt_debug(1, "fcntl errno %d.\n", errno);
     if ((errno != EAGAIN) && (errno != EACCES))
     {
       mutt_perror("fcntl");
index 9695e4f15eabdf099ae4385b42c7b07821a4d0a9..50c9a649b40e48c90a2f460a0414196729d74608 100644 (file)
@@ -135,17 +135,15 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
 
     if (mutt_convert_string(&reversed_user, Charset, "utf-8", 0) == -1)
     {
-      mutt_debug(1, "intl_to_local: Not reversible. Charset conv to utf-8 "
-                    "failed for user = '%s'.\n",
-                 reversed_user);
+      mutt_debug(
+          1, "Not reversible. Charset conv to utf-8 failed for user = '%s'.\n", reversed_user);
       goto cleanup;
     }
 
     if (mutt_str_strcasecmp(orig_user, reversed_user) != 0)
     {
-      mutt_debug(
-          1, "intl_to_local: Not reversible. orig = '%s', reversed = '%s'.\n",
-          orig_user, reversed_user);
+      mutt_debug(1, "#1 Not reversible. orig = '%s', reversed = '%s'.\n",
+                 orig_user, reversed_user);
       goto cleanup;
     }
 
@@ -153,9 +151,10 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
 
     if (mutt_convert_string(&reversed_domain, Charset, "utf-8", 0) == -1)
     {
-      mutt_debug(1, "intl_to_local: Not reversible. Charset conv to utf-8 "
-                    "failed for domain = '%s'.\n",
-                 reversed_domain);
+      mutt_debug(
+          1,
+          "Not reversible. Charset conv to utf-8 failed for domain = '%s'.\n",
+          reversed_domain);
       goto cleanup;
     }
 
@@ -168,9 +167,8 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
     {
       if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
       {
-        mutt_debug(1, "intl_to_local: Not reversible. idna_to_ascii_8z failed "
-                      "for domain = '%s'.\n",
-                   reversed_domain);
+        mutt_debug(
+            1, "Not reversible. idna_to_ascii_8z failed for domain = '%s'.\n", reversed_domain);
         goto cleanup;
       }
       mutt_str_replace(&reversed_domain, tmp);
@@ -179,9 +177,8 @@ static char *intl_to_local(char *orig_user, char *orig_domain, int flags)
 
     if (mutt_str_strcasecmp(orig_domain, reversed_domain) != 0)
     {
-      mutt_debug(
-          1, "intl_to_local: Not reversible. orig = '%s', reversed = '%s'.\n",
-          orig_domain, reversed_domain);
+      mutt_debug(1, "#2 Not reversible. orig = '%s', reversed = '%s'.\n",
+                 orig_domain, reversed_domain);
       goto cleanup;
     }
   }
index 9d03d556596cd400d54c6d413c49672c275514bd..7faa2fbd1713cb650a1a6dbdde1f6707b0d1739e 100644 (file)
@@ -258,7 +258,7 @@ static int lua_mutt_get(lua_State *l)
         return -1;
     }
   }
-  mutt_debug(2, " * lua_mutt_get() -> error\n");
+  mutt_debug(2, " * error\n");
   luaL_error(l, "NeoMutt parameter not found %s", param);
   return -1;
 }
@@ -390,13 +390,13 @@ int mutt_lua_parse(struct Buffer *tmp, struct Buffer *s, unsigned long data, str
 
   if (luaL_dostring(Lua, s->dptr))
   {
-    mutt_debug(2, " * mutt_lua_parse(%s) -> failure\n", s->dptr);
+    mutt_debug(2, " * %s -> failure\n", s->dptr);
     snprintf(err->data, err->dsize, _("%s: %s"), s->dptr, lua_tostring(Lua, -1));
     /* pop error message from the stack */
     lua_pop(Lua, 1);
     return -1;
   }
-  mutt_debug(2, " * mutt_lua_parse(%s) -> success\n", s->dptr);
+  mutt_debug(2, " * %s -> success\n", s->dptr);
   return 2;
 }
 
index 18c4ef866b681763df91d916e3e18ea34679ccda..853da8c1e4aaf37a60683b8a452f2cf2087374f8 100644 (file)
@@ -300,7 +300,7 @@ static bool query_window_check_timebase(const char *timebase)
  */
 static void query_window_reset(void)
 {
-  mutt_debug(2, "query_window_reset ()\n");
+  mutt_debug(2, "entering\n");
   NmQueryWindowCurrentPosition = 0;
 }
 
@@ -344,7 +344,7 @@ static void query_window_reset(void)
  */
 static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz)
 {
-  mutt_debug(2, "nm: windowed_query_from_query (%s)\n", query);
+  mutt_debug(2, "nm: %s\n", query);
 
   int beg = NmQueryWindowDuration * (NmQueryWindowCurrentPosition + 1);
   int end = NmQueryWindowDuration * NmQueryWindowCurrentPosition;
@@ -375,7 +375,7 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz
     snprintf(buf, bufsz, "date:%d%s..%d%s and %s", beg, NmQueryWindowTimebase,
              end, NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
 
-  mutt_debug(2, "nm: windowed_query_from_query (%s) -> %s\n", query, buf);
+  mutt_debug(2, "nm: %s -> %s\n", query, buf);
 
   return true;
 }
@@ -398,7 +398,7 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz
  */
 static char *get_query_string(struct NmCtxData *data, bool window)
 {
-  mutt_debug(2, "nm: get_query_string(%s)\n", window ? "true" : "false");
+  mutt_debug(2, "nm: %s\n", window ? "true" : "false");
 
   struct UrlQueryString *item = NULL;
 
@@ -1588,7 +1588,7 @@ done:
 
 char *nm_uri_from_query(struct Context *ctx, char *buf, size_t bufsz)
 {
-  mutt_debug(2, "nm_uri_from_query (%s)\n", buf);
+  mutt_debug(2, "(%s)\n", buf);
   struct NmCtxData *data = get_ctxdata(ctx);
   char uri[_POSIX_PATH_MAX + LONG_STRING + 32]; /* path to DB + query + URI "decoration" */
   int added;
@@ -1650,7 +1650,7 @@ char *nm_uri_from_query(struct Context *ctx, char *buf, size_t bufsz)
  */
 bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz)
 {
-  mutt_debug(2, "nm_normalize_uri (%s)\n", orig_uri);
+  mutt_debug(2, "(%s)\n", orig_uri);
   char buf[LONG_STRING];
   int rc = -1;
 
@@ -1664,12 +1664,12 @@ bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz)
   tmp_ctx.magic = MUTT_NOTMUCH;
   tmp_ctx.data = tmp_ctxdata;
 
-  mutt_debug(2, "nm_normalize_uri #1 () -> db_query: %s\n", tmp_ctxdata->db_query);
+  mutt_debug(2, "#1 () -> db_query: %s\n", tmp_ctxdata->db_query);
 
   if (get_query_string(tmp_ctxdata, false) == NULL)
     goto gone;
 
-  mutt_debug(2, "nm_normalize_uri #2 () -> db_query: %s\n", tmp_ctxdata->db_query);
+  mutt_debug(2, "#2 () -> db_query: %s\n", tmp_ctxdata->db_query);
 
   mutt_str_strfcpy(buf, tmp_ctxdata->db_query, sizeof(buf));
 
@@ -1678,7 +1678,7 @@ bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz)
 
   strncpy(new_uri, buf, new_uri_sz);
 
-  mutt_debug(2, "nm_normalize_uri #3 (%s) -> %s\n", orig_uri, new_uri);
+  mutt_debug(2, "#3 (%s) -> %s\n", orig_uri, new_uri);
 
   rc = 0;
 gone:
@@ -1688,7 +1688,7 @@ gone:
   if (rc < 0)
   {
     mutt_error(_("failed to parse notmuch uri: %s"), orig_uri);
-    mutt_debug(2, "nm_normalize_uri () -> error\n");
+    mutt_debug(2, "() -> error\n");
     return false;
   }
   return true;
@@ -1708,7 +1708,7 @@ void nm_query_window_forward(void)
   if (NmQueryWindowCurrentPosition != 0)
     NmQueryWindowCurrentPosition--;
 
-  mutt_debug(2, "nm_query_window_forward (%d)\n", NmQueryWindowCurrentPosition);
+  mutt_debug(2, "(%d)\n", NmQueryWindowCurrentPosition);
 }
 
 /**
@@ -1722,7 +1722,7 @@ void nm_query_window_forward(void)
 void nm_query_window_backward(void)
 {
   NmQueryWindowCurrentPosition++;
-  mutt_debug(2, "nm_query_window_backward (%d)\n", NmQueryWindowCurrentPosition);
+  mutt_debug(2, "(%d)\n", NmQueryWindowCurrentPosition);
 }
 
 /**
index fc95a4ab94dafbf309c36255b47007d8d49c116e..14c3d4945bcc2eaf1b7fb31c7e9fd7a230a3a64c 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -829,7 +829,7 @@ char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, struct ReplaceList
       switcher ^= 1;
       dst = twinbuf[switcher];
 
-      mutt_debug(5, "mutt_apply_replace: %s matches %s\n", src, l->regex->pattern);
+      mutt_debug(5, "%s matches %s\n", src, l->regex->pattern);
 
       /* Copy into other twinbuf with substitutions */
       if (l->template)
@@ -868,7 +868,7 @@ char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, struct ReplaceList
         }
       }
       dst[tlen] = '\0';
-      mutt_debug(5, "mutt_apply_replace: subst %s\n", dst);
+      mutt_debug(5, "subst %s\n", dst);
     }
     src = dst;
   }
@@ -1607,7 +1607,7 @@ bool mutt_match_regex_list(const char *s, struct RegexList *l)
   {
     if (regexec(l->regex->regex, s, (size_t) 0, (regmatch_t *) 0, (int) 0) == 0)
     {
-      mutt_debug(5, "mutt_match_regex_list: %s matches %s\n", s, l->regex->pattern);
+      mutt_debug(5, "%s matches %s\n", s, l->regex->pattern);
       return true;
     }
   }
@@ -1651,8 +1651,8 @@ bool mutt_match_spam_list(const char *s, struct ReplaceList *l, char *text, int
     /* Does this pattern match? */
     if (regexec(l->regex->regex, s, (size_t) l->nmatch, (regmatch_t *) pmatch, (int) 0) == 0)
     {
-      mutt_debug(5, "mutt_match_spam_list: %s matches %s\n", s, l->regex->pattern);
-      mutt_debug(5, "mutt_match_spam_list: %d subs\n", (int) l->regex->regex->re_nsub);
+      mutt_debug(5, "%s matches %s\n", s, l->regex->pattern);
+      mutt_debug(5, "%d subs\n", (int) l->regex->regex->re_nsub);
 
       /* Copy template into text, with substitutions. */
       for (p = l->template; *p && tlen < textsize - 1;)
@@ -1692,7 +1692,7 @@ bool mutt_match_spam_list(const char *s, struct ReplaceList *l, char *text, int
       if (tlen < textsize)
       {
         text[tlen] = '\0';
-        mutt_debug(5, "mutt_match_spam_list: \"%s\"\n", text);
+        mutt_debug(5, "\"%s\"\n", text);
       }
       return true;
     }
diff --git a/mx.c b/mx.c
index 7be1140e8d625085e9b78d5b7cbdbe259cd12df5..c68b026de851545d993a2c030180eb48686bc237 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -239,8 +239,7 @@ int mx_get_magic(const char *path)
 
   if (stat(path, &st) == -1)
   {
-    mutt_debug(1, "mx_get_magic(): unable to stat %s: %s (errno %d).\n", path,
-               strerror(errno), errno);
+    mutt_debug(1, "unable to stat %s: %s (errno %d).\n", path, strerror(errno), errno);
     return -1;
   }
 
@@ -301,7 +300,7 @@ int mx_get_magic(const char *path)
   }
   else
   {
-    mutt_debug(1, "mx_get_magic(): unable to open file %s for reading.\n", path);
+    mutt_debug(1, "unable to open file %s for reading.\n", path);
     return -1;
   }
 
@@ -1142,10 +1141,7 @@ struct Message *mx_open_new_message(struct Context *dest, struct Header *hdr, in
 
   if (!dest->mx_ops || !dest->mx_ops->open_new_msg)
   {
-    mutt_debug(
-        1,
-        "mx_open_new_message(): function unimplemented for mailbox type %d.\n",
-        dest->magic);
+    mutt_debug(1, "function unimplemented for mailbox type %d.\n", dest->magic);
     return NULL;
   }
 
@@ -1198,7 +1194,7 @@ int mx_check_mailbox(struct Context *ctx, int *index_hint)
 {
   if (!ctx || !ctx->mx_ops)
   {
-    mutt_debug(1, "mx_check_mailbox: null or invalid context.\n");
+    mutt_debug(1, "null or invalid context.\n");
     return -1;
   }
 
@@ -1214,8 +1210,7 @@ struct Message *mx_open_message(struct Context *ctx, int msgno)
 
   if (!ctx->mx_ops || !ctx->mx_ops->open_msg)
   {
-    mutt_debug(
-        1, "mx_open_message(): function not implemented for mailbox type %d.\n", ctx->magic);
+    mutt_debug(1, "function not implemented for mailbox type %d.\n", ctx->magic);
     return NULL;
   }
 
@@ -1236,8 +1231,7 @@ int mx_commit_message(struct Message *msg, struct Context *ctx)
 
   if (!(msg->write && ctx->append))
   {
-    mutt_debug(1, "mx_commit_message(): msg->write = %d, ctx->append = %d\n",
-               msg->write, ctx->append);
+    mutt_debug(1, "msg->write = %d, ctx->append = %d\n", msg->write, ctx->append);
     return -1;
   }
 
@@ -1258,7 +1252,7 @@ int mx_close_message(struct Context *ctx, struct Message **msg)
 
   if ((*msg)->path)
   {
-    mutt_debug(1, "mx_close_message (): unlinking %s\n", (*msg)->path);
+    mutt_debug(1, "unlinking %s\n", (*msg)->path);
     unlink((*msg)->path);
     FREE(&(*msg)->path);
   }
index e02d48bb23412116a0122f5c7be94e2ac0f2ad27..b493cfb6fb4e88edfa921ca0a621756d226e1c90 100644 (file)
@@ -1757,7 +1757,7 @@ static int verify_one(struct Body *sigbdy, struct State *s, const char *tempfile
   gpgme_release(ctx);
 
   state_attach_puts(_("[-- End signature information --]\n\n"), s);
-  mutt_debug(1, "verify_one: returning %d.\n", badsig);
+  mutt_debug(1, "returning %d.\n", badsig);
 
   return badsig ? 1 : anywarn ? 2 : 0;
 }
@@ -2508,7 +2508,7 @@ int pgp_gpgme_application_handler(struct Body *m, struct State *s)
 
   char body_charset[STRING]; /* Only used for clearsigned messages. */
 
-  mutt_debug(2, "Entering pgp_application_pgp handler\n");
+  mutt_debug(2, "Entering handler\n");
 
   /* For clearsigned messages we won't be able to get a character set
      but we know that this may only be text thus we assume Latin-1
@@ -2723,7 +2723,7 @@ int pgp_gpgme_application_handler(struct Body *m, struct State *s)
                       s);
     return 1;
   }
-  mutt_debug(2, "Leaving pgp_application_pgp handler\n");
+  mutt_debug(2, "Leaving handler\n");
 
   return err;
 }
@@ -2746,7 +2746,7 @@ int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
   int is_signed;
   int rc = 0;
 
-  mutt_debug(2, "Entering pgp_encrypted handler\n");
+  mutt_debug(2, "Entering handler\n");
 
   mutt_mktemp(tempfile, sizeof(tempfile));
   fpout = mutt_file_fopen(tempfile, "w+");
@@ -2807,7 +2807,7 @@ int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
 
   mutt_file_fclose(&fpout);
   mutt_file_unlink(tempfile);
-  mutt_debug(2, "Leaving pgp_encrypted handler\n");
+  mutt_debug(2, "Leaving handler\n");
 
   return rc;
 }
@@ -2823,7 +2823,7 @@ int smime_gpgme_application_handler(struct Body *a, struct State *s)
   int is_signed;
   int rc = 0;
 
-  mutt_debug(2, "Entering smime_encrypted handler\n");
+  mutt_debug(2, "Entering handler\n");
 
   a->warnsig = false;
   mutt_mktemp(tempfile, sizeof(tempfile));
@@ -2885,7 +2885,7 @@ int smime_gpgme_application_handler(struct Body *a, struct State *s)
 
   mutt_file_fclose(&fpout);
   mutt_file_unlink(tempfile);
-  mutt_debug(2, "Leaving smime_encrypted handler\n");
+  mutt_debug(2, "Leaving handler\n");
 
   return rc;
 }
@@ -4389,8 +4389,7 @@ static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a,
   if (!keys)
     return NULL;
 
-  mutt_debug(5, "crypt_getkeybyaddr: looking for %s <%s>.\n",
-             a ? a->personal : "", a ? a->mailbox : "");
+  mutt_debug(5, "looking for %s <%s>.\n", a ? a->personal : "", a ? a->mailbox : "");
 
   for (k = keys; k; k = k->next)
   {
@@ -4512,9 +4511,8 @@ static struct CryptKeyInfo *crypt_getkeybystr(char *p, short abilities,
     if (abilities && !(k->flags & abilities))
       continue;
 
-    mutt_debug(5, "crypt_getkeybystr: matching \"%s\" against "
-                  "key %s, \"%s\": ",
-               p, crypt_long_keyid(k), k->uid);
+    mutt_debug(5, "matching \"%s\" against key %s, \"%s\": ", p,
+               crypt_long_keyid(k), k->uid);
 
     if (!*p || (pfcopy && (mutt_str_strcasecmp(pfcopy, crypt_fpr(k)) == 0)) ||
         (pl && (mutt_str_strcasecmp(pl, crypt_long_keyid(k)) == 0)) ||
index 71fe7a27e8532eb9f2e0d7d0d8f3ee3d9f3b3e09..510a249406be1cf45f5c979a40d2f29de608d053 100644 (file)
@@ -143,7 +143,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe
   else
     memset(&tmp, 0, sizeof(tmp));
 
-  mutt_debug(2, "parse_pub_line: buf = `%s'\n", buf);
+  mutt_debug(2, "buf = `%s'\n", buf);
 
   for (p = buf; p; p = pend)
   {
@@ -380,7 +380,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe
   return k;
 
 bail:
-  mutt_debug(5, "parse_pub_line: invalid number: '%s'\n", p);
+  mutt_debug(5, "invalid number: '%s'\n", p);
   return NULL;
 }
 
index 34fdd3118d67a38617f7a30e91f9798cec627d74..ae0fc3ed2da1af8d3c7b82ff8256d8a55be7f3d6 100644 (file)
@@ -202,11 +202,11 @@ static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
     {
       if (regexec(PgpGoodSign.regex, line, 0, NULL, 0) == 0)
       {
-        mutt_debug(2, "pgp_copy_checksig: \"%s\" matches regex.\n", line);
+        mutt_debug(2, "\"%s\" matches regex.\n", line);
         rc = 0;
       }
       else
-        mutt_debug(2, "pgp_copy_checksig: \"%s\" doesn't match regex.\n", line);
+        mutt_debug(2, "\"%s\" doesn't match regex.\n", line);
 
       if (strncmp(line, "[GNUPG:] ", 9) == 0)
         continue;
@@ -217,7 +217,7 @@ static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
   }
   else
   {
-    mutt_debug(2, "pgp_copy_checksig: No pattern.\n");
+    mutt_debug(2, "No pattern.\n");
     mutt_file_copy_stream(fpin, fpout);
     rc = 1;
   }
@@ -246,19 +246,18 @@ static int pgp_check_decryption_okay(FILE *fpin)
     {
       if (regexec(PgpDecryptionOkay.regex, line, 0, NULL, 0) == 0)
       {
-        mutt_debug(2, "pgp_check_decryption_okay: \"%s\" matches regex.\n", line);
+        mutt_debug(2, "\"%s\" matches regex.\n", line);
         rc = 0;
         break;
       }
       else
-        mutt_debug(2,
-                   "pgp_check_decryption_okay: \"%s\" doesn't match regex.\n", line);
+        mutt_debug(2, "\"%s\" doesn't match regex.\n", line);
     }
     FREE(&line);
   }
   else
   {
-    mutt_debug(2, "pgp_check_decryption_okay: No pattern.\n");
+    mutt_debug(2, "No pattern.\n");
     rc = 1;
   }
 
@@ -752,7 +751,7 @@ int pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
     if ((rv = mutt_wait_filter(thepid)))
       badsig = -1;
 
-    mutt_debug(1, "pgp_verify_one: mutt_wait_filter returned %d.\n", rv);
+    mutt_debug(1, "mutt_wait_filter returned %d.\n", rv);
   }
 
   mutt_file_fclose(&pgperr);
@@ -762,7 +761,7 @@ int pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
   mutt_file_unlink(sigfile);
   mutt_file_unlink(pgperrfile);
 
-  mutt_debug(1, "pgp_verify_one: returning %d.\n", badsig);
+  mutt_debug(1, "returning %d.\n", badsig);
 
   return badsig;
 }
index 89e801586634e64e8a5fc5a1450376a035f8ae4f..6daddd0a24cd26fb90b361b80fe5a0e2b2e8f8db 100644 (file)
@@ -147,7 +147,7 @@ static void mutt_pgp_command(char *buf, size_t buflen,
 {
   mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(fmt),
                       fmt_pgp_command, (unsigned long) cctx, 0);
-  mutt_debug(2, "mutt_pgp_command: %s\n", buf);
+  mutt_debug(2, "%s\n", buf);
 }
 
 /*
index 3c2dff4e175f9bdef0171b4d638f8a6e2bc4e80d..8e569ce0e0b5d198d6f725490c113ac7ca72f3f2 100644 (file)
@@ -852,7 +852,7 @@ struct PgpKeyInfo *pgp_getkeybyaddr(struct Address *a, short abilities,
   if (!keys)
     return NULL;
 
-  mutt_debug(5, "pgp_getkeybyaddr: looking for %s <%s>.\n", a->personal, a->mailbox);
+  mutt_debug(5, "looking for %s <%s>.\n", a->personal, a->mailbox);
 
   for (k = keys; k; k = kn)
   {
@@ -990,26 +990,24 @@ struct PgpKeyInfo *pgp_getkeybystr(char *p, short abilities, enum PgpRing keyrin
 
     bool match = false;
 
-    mutt_debug(5, "pgp_getkeybystr: matching \"%s\" against key %s:\n", p,
-               pgp_long_keyid(k));
+    mutt_debug(5, "matching \"%s\" against key %s:\n", p, pgp_long_keyid(k));
 
     if (!*p || (pfcopy && (mutt_str_strcasecmp(pfcopy, k->fingerprint) == 0)) ||
         (pl && (mutt_str_strcasecmp(pl, pgp_long_keyid(k)) == 0)) ||
         (ps && (mutt_str_strcasecmp(ps, pgp_short_keyid(k)) == 0)))
     {
-      mutt_debug(5, "\t\tmatch.\n");
+      mutt_debug(5, "\t\tmatch #1\n");
       match = true;
     }
     else
     {
       for (a = k->address; a; a = a->next)
       {
-        mutt_debug(5,
-                   "pgp_getkeybystr: matching \"%s\" against key %s, \"%s\":\n",
-                   p, pgp_long_keyid(k), NONULL(a->addr));
+        mutt_debug(5, "matching \"%s\" against key %s, \"%s\":\n", p,
+                   pgp_long_keyid(k), NONULL(a->addr));
         if (mutt_str_stristr(a->addr, p))
         {
-          mutt_debug(5, "\t\tmatch.\n");
+          mutt_debug(5, "\t\tmatch #2\n");
           match = true;
           break;
         }
index 46c9a9da9cf3b16aec3aafd0e02504cc14033038..2086d7a449176b1db5ac820cd2c397ee29f61b3b 100644 (file)
@@ -78,7 +78,7 @@ static void pgp_dearmor(FILE *in, FILE *out)
   }
   if (!r)
   {
-    mutt_debug(1, "pgp_dearmor: Can't find begin of ASCII armor.\n");
+    mutt_debug(1, "Can't find begin of ASCII armor.\n");
     return;
   }
 
@@ -92,7 +92,7 @@ static void pgp_dearmor(FILE *in, FILE *out)
   }
   if (!r)
   {
-    mutt_debug(1, "pgp_dearmor: Armor header doesn't end.\n");
+    mutt_debug(1, "Armor header doesn't end.\n");
     return;
   }
 
@@ -110,20 +110,20 @@ static void pgp_dearmor(FILE *in, FILE *out)
   }
   if (!r)
   {
-    mutt_debug(1, "pgp_dearmor: Can't find end of ASCII armor.\n");
+    mutt_debug(1, "Can't find end of ASCII armor.\n");
     return;
   }
 
   end = ftello(in) - strlen(line);
   if (end < start)
   {
-    mutt_debug(1, "pgp_dearmor: end < start???\n");
+    mutt_debug(1, "end < start???\n");
     return;
   }
 
   if (fseeko(in, start, SEEK_SET) == -1)
   {
-    mutt_debug(1, "pgp_dearmor: Can't seekto start.\n");
+    mutt_debug(1, "Can't seekto start.\n");
     return;
   }
 
@@ -135,7 +135,7 @@ static short pgp_mic_from_packet(unsigned char *p, size_t len)
   /* is signature? */
   if ((p[0] & 0x3f) != PT_SIG)
   {
-    mutt_debug(1, "pgp_mic_from_packet: tag = %d, want %d.\n", p[0] & 0x3f, PT_SIG);
+    mutt_debug(1, "tag = %d, want %d.\n", p[0] & 0x3f, PT_SIG);
     return -1;
   }
 
@@ -147,7 +147,7 @@ static short pgp_mic_from_packet(unsigned char *p, size_t len)
     return (short) p[4];
   else
   {
-    mutt_debug(1, "pgp_mic_from_packet: Bad signature packet.\n");
+    mutt_debug(1, "Bad signature packet.\n");
     return -1;
   }
 }
@@ -190,7 +190,7 @@ static short pgp_find_hash(const char *fname)
   }
   else
   {
-    mutt_debug(1, "pgp_find_hash: No packet.\n");
+    mutt_debug(1, "No packet.\n");
   }
 
 bye:
index 7528116d5eb0861c39158a92a325a0b02cab1205..64e8b9ce26c54e48fb47b70864d2b8e8945b1674 100644 (file)
@@ -297,7 +297,7 @@ static void smime_command(char *buf, size_t buflen,
 {
   mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(fmt),
                       fmt_smime_command, (unsigned long) cctx, 0);
-  mutt_debug(2, "smime_command: %s\n", buf);
+  mutt_debug(2, "%s\n", buf);
 }
 
 static pid_t smime_invoke(FILE **smimein, FILE **smimeout, FILE **smimeerr,
index e2768fdb89ef67e0dc8ecba1896bb6f81531a8b5..80813d93bf908dbad67f38804b0f4447037f5c7b 100644 (file)
--- a/newsrc.c
+++ b/newsrc.c
@@ -288,7 +288,7 @@ int nntp_newsrc_parse(struct NntpServer *nserv)
     nntp_data->newsrc_len = j;
     mutt_mem_realloc(&nntp_data->newsrc_ent, j * sizeof(struct NewsrcEntry));
     nntp_group_unread_stat(nntp_data);
-    mutt_debug(2, "nntp_newsrc_parse: %s\n", nntp_data->group);
+    mutt_debug(2, "%s\n", nntp_data->group);
   }
   FREE(&line);
   return 1;
@@ -702,7 +702,7 @@ void nntp_hcache_update(struct NntpData *nntp_data, header_cache_t *hc)
   hdata = mutt_hcache_fetch_raw(hc, "index", 5);
   if (hdata)
   {
-    mutt_debug(2, "nntp_hcache_update: mutt_hcache_fetch index: %s\n", (char *) hdata);
+    mutt_debug(2, "mutt_hcache_fetch index: %s\n", (char *) hdata);
     if (sscanf(hdata, ANUM " " ANUM, &first, &last) == 2)
     {
       old = true;
@@ -715,7 +715,7 @@ void nntp_hcache_update(struct NntpData *nntp_data, header_cache_t *hc)
           continue;
 
         snprintf(buf, sizeof(buf), "%d", current);
-        mutt_debug(2, "nntp_hcache_update: mutt_hcache_delete %s\n", buf);
+        mutt_debug(2, "mutt_hcache_delete %s\n", buf);
         mutt_hcache_delete(hc, buf, strlen(buf));
       }
     }
@@ -726,7 +726,7 @@ void nntp_hcache_update(struct NntpData *nntp_data, header_cache_t *hc)
   if (!old || nntp_data->first_message != first || nntp_data->last_message != last)
   {
     snprintf(buf, sizeof(buf), "%u %u", nntp_data->first_message, nntp_data->last_message);
-    mutt_debug(2, "nntp_hcache_update: mutt_hcache_store index: %s\n", buf);
+    mutt_debug(2, "mutt_hcache_store index: %s\n", buf);
     mutt_hcache_store_raw(hc, "index", 5, buf, strlen(buf));
   }
 }
@@ -745,7 +745,7 @@ static int nntp_bcache_delete(const char *id, struct BodyCache *bcache, void *da
       anum < nntp_data->first_message || anum > nntp_data->last_message)
   {
     if (nntp_data)
-      mutt_debug(2, "nntp_bcache_delete: mutt_bcache_del %s\n", id);
+      mutt_debug(2, "mutt_bcache_del %s\n", id);
     mutt_bcache_del(bcache, id);
   }
   return 0;
@@ -773,7 +773,7 @@ void nntp_delete_group_cache(struct NntpData *nntp_data)
   cache_expand(file, sizeof(file), &nntp_data->nserv->conn->account, file);
   unlink(file);
   nntp_data->last_cached = 0;
-  mutt_debug(2, "nntp_delete_group_cache: %s\n", file);
+  mutt_debug(2, "%s\n", file);
 #endif
 
   if (!nntp_data->bcache)
@@ -781,7 +781,7 @@ void nntp_delete_group_cache(struct NntpData *nntp_data)
         mutt_bcache_open(&nntp_data->nserv->conn->account, nntp_data->group);
   if (nntp_data->bcache)
   {
-    mutt_debug(2, "nntp_delete_group_cache: %s/*\n", nntp_data->group);
+    mutt_debug(2, "%s/*\n", nntp_data->group);
     mutt_bcache_list(nntp_data->bcache, nntp_bcache_delete, NULL);
     mutt_bcache_close(&nntp_data->bcache);
   }
@@ -850,7 +850,7 @@ void nntp_clear_cache(struct NntpServer *nserv)
       if (S_ISDIR(sb.st_mode))
       {
         rmdir(file);
-        mutt_debug(2, "nntp_clear_cache: %s\n", file);
+        mutt_debug(2, "%s\n", file);
       }
     }
     closedir(dp);
@@ -1110,8 +1110,7 @@ struct NntpServer *nntp_select_server(char *server, bool leave_lock)
             if (last >= nntp_data->first_message && last <= nntp_data->last_message)
             {
               nntp_data->last_cached = last;
-              mutt_debug(2, "nntp_select_server: %s last_cached=%u\n",
-                         nntp_data->group, last);
+              mutt_debug(2, "%s last_cached=%u\n", nntp_data->group, last);
             }
           }
           mutt_hcache_free(hc, &hdata);
diff --git a/nntp.c b/nntp.c
index 9093a025aebadcacd9370cf7fc1ac7d30b005caa..d8e67da9cfc0da305b00b63c90508082ccb3d499 100644 (file)
--- a/nntp.c
+++ b/nntp.c
@@ -354,7 +354,7 @@ static int nntp_auth(struct NntpServer *nserv)
       p++;
     }
 
-    mutt_debug(1, "nntp_auth: available methods: %s\n", nserv->authenticators);
+    mutt_debug(1, "available methods: %s\n", nserv->authenticators);
     a = authenticators;
     while (true)
     {
@@ -386,7 +386,7 @@ static int nntp_auth(struct NntpServer *nserv)
         if (*m != '\0' && *m != ' ')
           continue;
       }
-      mutt_debug(1, "nntp_auth: trying method %s\n", method);
+      mutt_debug(1, "trying method %s\n", method);
 
       /* AUTHINFO USER authentication */
       if (strcmp(method, "USER") == 0)
@@ -440,7 +440,7 @@ static int nntp_auth(struct NntpServer *nserv)
 
         if (mutt_sasl_client_new(conn, &saslconn) < 0)
         {
-          mutt_debug(1, "nntp_auth: error allocating SASL connection.\n");
+          mutt_debug(1, "error allocating SASL connection.\n");
           continue;
         }
 
@@ -455,8 +455,7 @@ static int nntp_auth(struct NntpServer *nserv)
         if (rc != SASL_OK && rc != SASL_CONTINUE)
         {
           sasl_dispose(&saslconn);
-          mutt_debug(
-              1, "nntp_auth: error starting SASL authentication exchange.\n");
+          mutt_debug(1, "error starting SASL authentication exchange.\n");
           continue;
         }
 
@@ -490,8 +489,7 @@ static int nntp_auth(struct NntpServer *nserv)
             if (sasl_encode64(client_out, client_len, buf + len,
                               sizeof(buf) - len, &len) != SASL_OK)
             {
-              mutt_debug(1,
-                         "nntp_auth: error base64-encoding client response.\n");
+              mutt_debug(1, "error base64-encoding client response.\n");
               break;
             }
           }
@@ -535,8 +533,7 @@ static int nntp_auth(struct NntpServer *nserv)
           else if (sasl_decode64(inbuf + 4, strlen(inbuf + 4), buf,
                                  sizeof(buf) - 1, &len) != SASL_OK)
           {
-            mutt_debug(1,
-                       "nntp_auth: error base64-decoding server response.\n");
+            mutt_debug(1, "error base64-decoding server response.\n");
             break;
           }
 #ifdef DEBUG
@@ -1103,7 +1100,7 @@ static int parse_overview_line(char *line, void *data)
     *field++ = '\0';
   if (sscanf(line, ANUM, &anum) != 1)
     return 0;
-  mutt_debug(2, "parse_overview_line: " ANUM "\n", anum);
+  mutt_debug(2, "" ANUM "\n", anum);
 
   /* out of bounds */
   if (anum < fc->first || anum > fc->last)
@@ -1175,7 +1172,7 @@ static int parse_overview_line(char *line, void *data)
     hdata = mutt_hcache_fetch(fc->hc, buf, strlen(buf));
     if (hdata)
     {
-      mutt_debug(2, "parse_overview_line: mutt_hcache_fetch %s\n", buf);
+      mutt_debug(2, "mutt_hcache_fetch %s\n", buf);
       mutt_free_header(&hdr);
       ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata);
       mutt_hcache_free(fc->hc, &hdata);
@@ -1188,7 +1185,7 @@ static int parse_overview_line(char *line, void *data)
       {
         if (nntp_data->bcache)
         {
-          mutt_debug(2, "parse_overview_line: mutt_bcache_del %s\n", buf);
+          mutt_debug(2, "mutt_bcache_del %s\n", buf);
           mutt_bcache_del(nntp_data->bcache, buf);
         }
         save = false;
@@ -1198,7 +1195,7 @@ static int parse_overview_line(char *line, void *data)
     /* not cached yet, store header */
     else
     {
-      mutt_debug(2, "parse_overview_line: mutt_hcache_store %s\n", buf);
+      mutt_debug(2, "mutt_hcache_store %s\n", buf);
       mutt_hcache_store(fc->hc, buf, strlen(buf), hdr, 0);
     }
   }
@@ -1289,14 +1286,14 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
         snprintf(buf, sizeof(buf), "%d", current);
         if (nntp_data->bcache)
         {
-          mutt_debug(2, "nntp_fetch_headers: mutt_bcache_del %s\n", buf);
+          mutt_debug(2, "#1 mutt_bcache_del %s\n", buf);
           mutt_bcache_del(nntp_data->bcache, buf);
         }
 
 #ifdef USE_HCACHE
         if (fc.hc)
         {
-          mutt_debug(2, "nntp_fetch_headers: mutt_hcache_delete %s\n", buf);
+          mutt_debug(2, "mutt_hcache_delete %s\n", buf);
           mutt_hcache_delete(fc.hc, buf, strlen(buf));
         }
 #endif
@@ -1333,7 +1330,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
     hdata = mutt_hcache_fetch(fc.hc, buf, strlen(buf));
     if (hdata)
     {
-      mutt_debug(2, "nntp_fetch_headers: mutt_hcache_fetch %s\n", buf);
+      mutt_debug(2, "mutt_hcache_fetch %s\n", buf);
       ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata);
       mutt_hcache_free(fc.hc, &hdata);
       hdr->data = 0;
@@ -1344,7 +1341,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
         mutt_free_header(&hdr);
         if (nntp_data->bcache)
         {
-          mutt_debug(2, "nntp_fetch_headers: mutt_bcache_del %s\n", buf);
+          mutt_debug(2, "#2 mutt_bcache_del %s\n", buf);
           mutt_bcache_del(nntp_data->bcache, buf);
         }
         continue;
@@ -1405,7 +1402,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
         if (nntp_data->bcache)
         {
           snprintf(buf, sizeof(buf), "%d", current);
-          mutt_debug(2, "nntp_fetch_headers: mutt_bcache_del %s\n", buf);
+          mutt_debug(2, "#3 mutt_bcache_del %s\n", buf);
           mutt_bcache_del(nntp_data->bcache, buf);
         }
         rc = 0;
@@ -1944,7 +1941,7 @@ static int check_mailbox(struct Context *ctx)
         {
           bool deleted;
 
-          mutt_debug(2, "nntp_check_mailbox: mutt_hcache_fetch %s\n", buf);
+          mutt_debug(2, "#1 mutt_hcache_fetch %s\n", buf);
           hdr = mutt_hcache_restore(hdata);
           mutt_hcache_free(hc, &hdata);
           hdr->data = 0;
@@ -1988,7 +1985,7 @@ static int check_mailbox(struct Context *ctx)
       hdata = mutt_hcache_fetch(hc, buf, strlen(buf));
       if (hdata)
       {
-        mutt_debug(2, "nntp_check_mailbox: mutt_hcache_fetch %s\n", buf);
+        mutt_debug(2, "#2 mutt_hcache_fetch %s\n", buf);
         if (ctx->msgcount >= ctx->hdrmax)
           mx_alloc_memory(ctx);
 
@@ -2000,7 +1997,7 @@ static int check_mailbox(struct Context *ctx)
           mutt_free_header(&hdr);
           if (nntp_data->bcache)
           {
-            mutt_debug(2, "nntp_check_mailbox: mutt_bcache_del %s\n", buf);
+            mutt_debug(2, "mutt_bcache_del %s\n", buf);
             mutt_bcache_del(nntp_data->bcache, buf);
           }
           continue;
@@ -2122,7 +2119,7 @@ static int nntp_sync_mailbox(struct Context *ctx, int *index_hint)
     snprintf(buf, sizeof(buf), "%d", NHDR(hdr)->article_num);
     if (nntp_data->bcache && hdr->deleted)
     {
-      mutt_debug(2, "nntp_sync_mailbox: mutt_bcache_del %s\n", buf);
+      mutt_debug(2, "mutt_bcache_del %s\n", buf);
       mutt_bcache_del(nntp_data->bcache, buf);
     }
 
@@ -2131,7 +2128,7 @@ static int nntp_sync_mailbox(struct Context *ctx, int *index_hint)
     {
       if (hdr->deleted && !hdr->read)
         nntp_data->unread--;
-      mutt_debug(2, "nntp_sync_mailbox: mutt_hcache_store %s\n", buf);
+      mutt_debug(2, "mutt_hcache_store %s\n", buf);
       mutt_hcache_store(hc, buf, strlen(buf), hdr, 0);
     }
 #endif
@@ -2200,7 +2197,7 @@ static int nntp_date(struct NntpServer *nserv, time_t *now)
       *now = timegm(&tm);
       if (*now >= 0)
       {
-        mutt_debug(1, "nntp_date: server time is %lu\n", *now);
+        mutt_debug(1, "server time is %lu\n", *now);
         return 0;
       }
     }
diff --git a/pager.c b/pager.c
index 230af5e0cf41db37aa58c626a5e713dcab972b9a..183ef3cb858db76a623a044fed4d9368ee37cca4 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1196,7 +1196,7 @@ static int fill_buffer(FILE *f, LOFF_T *last_pos, LOFF_T offset, unsigned char *
       }
       else if (*p == '\033' && *(p + 1) == ']' && check_attachment_marker((char *) p) == 0)
       {
-        mutt_debug(2, "fill_buffer: Seen attachment marker.\n");
+        mutt_debug(2, "Seen attachment marker.\n");
         while (*p++ != '\a') /* skip pseudo-ANSI sequence */
           ;
       }
@@ -1250,8 +1250,7 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, int f
     {
       if (k == (size_t)(-1))
         memset(&mbstate, 0, sizeof(mbstate));
-      mutt_debug(1, "%s:%d: mbrtowc returned %lu; errno = %d.\n", __FILE__,
-                 __LINE__, k, errno);
+      mutt_debug(1, "mbrtowc returned %lu; errno = %d.\n", k, errno);
       if (col + 4 > wrap_cols)
         break;
       col += 4;
diff --git a/parse.c b/parse.c
index a555ce7c3aa151b86a1f6c450cfedba95c4ef540..e6ca1678a191af8e9513fa131e24a20403be01d4 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -158,14 +158,14 @@ static struct Parameter *parse_parameters(const char *s)
   const char *p = NULL;
   size_t i;
 
-  mutt_debug(2, "parse_parameters: `%s'\n", s);
+  mutt_debug(2, "`%s'\n", s);
 
   while (*s)
   {
     p = strpbrk(s, "=;");
     if (!p)
     {
-      mutt_debug(1, "parse_parameters: malformed parameter: %s\n", s);
+      mutt_debug(1, "malformed parameter: %s\n", s);
       goto bail;
     }
 
@@ -182,7 +182,7 @@ static struct Parameter *parse_parameters(const char *s)
        */
       if (i == 0)
       {
-        mutt_debug(1, "parse_parameters: missing attribute: %s\n", s);
+        mutt_debug(1, "missing attribute: %s\n", s);
         new = NULL;
       }
       else
@@ -254,7 +254,7 @@ static struct Parameter *parse_parameters(const char *s)
     }
     else
     {
-      mutt_debug(1, "parse_parameters(): parameter with no value: %s\n", s);
+      mutt_debug(1, "parameter with no value: %s\n", s);
       s = p;
     }
 
@@ -445,14 +445,13 @@ struct Body *mutt_read_mime_header(FILE *fp, int digest)
       c = mutt_str_skip_email_wsp(c + 1);
       if (!*c)
       {
-        mutt_debug(1,
-                   "mutt_read_mime_header(): skipping empty header field: %s\n", line);
+        mutt_debug(1, "skipping empty header field: %s\n", line);
         continue;
       }
     }
     else
     {
-      mutt_debug(1, "read_mime_header: bogus MIME header: %s\n", line);
+      mutt_debug(1, "bogus MIME header: %s\n", line);
       break;
     }
 
@@ -1243,7 +1242,7 @@ struct Envelope *mutt_read_rfc822_header(FILE *f, struct Header *hdr,
         }
 
         if (e->spam && e->spam->data)
-          mutt_debug(5, "p822: spam = %s\n", e->spam->data);
+          mutt_debug(5, "spam = %s\n", e->spam->data);
       }
     }
 
@@ -1287,16 +1286,14 @@ struct Envelope *mutt_read_rfc822_header(FILE *f, struct Header *hdr,
 
     if (hdr->received < 0)
     {
-      mutt_debug(
-          1, "read_rfc822_header(): resetting invalid received time to 0\n");
+      mutt_debug(1, "resetting invalid received time to 0\n");
       hdr->received = 0;
     }
 
     /* check for missing or invalid date */
     if (hdr->date_sent <= 0)
     {
-      mutt_debug(1, "read_rfc822_header(): no date found, using received time "
-                    "from msg separator\n");
+      mutt_debug(1, "no date found, using received time from msg separator\n");
       hdr->date_sent = hdr->received;
     }
   }
@@ -1354,8 +1351,7 @@ static bool count_body_parts_check(struct ListHead *checklist, struct Body *b, b
   STAILQ_FOREACH(np, checklist, entries)
   {
     a = (struct AttachMatch *) np->data;
-    mutt_debug(5, "cbpc: %s %d/%s ?? %s/%s [%d]... ",
-               dflt ? "[OK]   " : "[EXCL] ", b->type,
+    mutt_debug(5, "%s %d/%s ?? %s/%s [%d]... ", dflt ? "[OK]   " : "[EXCL] ", b->type,
                b->subtype ? b->subtype : "*", a->major, a->minor, a->major_int);
     if ((a->major_int == TYPEANY || a->major_int == b->type) &&
         (!b->subtype || !regexec(&a->minor_regex, b->subtype, 0, NULL, 0)))
@@ -1387,7 +1383,7 @@ static int count_body_parts(struct Body *body, int flags)
     shallcount = true; /* default */
     shallrecurse = false;
 
-    mutt_debug(5, "bp: desc=\"%s\"; fn=\"%s\", type=\"%d/%s\"\n",
+    mutt_debug(5, "desc=\"%s\"; fn=\"%s\", type=\"%d/%s\"\n",
                bp->description ? bp->description : ("none"),
                bp->filename ? bp->filename : bp->d_filename ? bp->d_filename : "(none)",
                bp->type, bp->subtype ? bp->subtype : "*");
@@ -1452,18 +1448,18 @@ static int count_body_parts(struct Body *body, int flags)
       count++;
     bp->attach_qualifies = shallcount ? true : false;
 
-    mutt_debug(5, "cbp: %p shallcount = %d\n", (void *) bp, shallcount);
+    mutt_debug(5, "%p shallcount = %d\n", (void *) bp, shallcount);
 
     if (shallrecurse)
     {
-      mutt_debug(5, "cbp: %p pre count = %d\n", (void *) bp, count);
+      mutt_debug(5, "%p pre count = %d\n", (void *) bp, count);
       bp->attach_count = count_body_parts(bp->parts, flags & ~MUTT_PARTS_TOPLEVEL);
       count += bp->attach_count;
-      mutt_debug(5, "cbp: %p post count = %d\n", (void *) bp, count);
+      mutt_debug(5, "%p post count = %d\n", (void *) bp, count);
     }
   }
 
-  mutt_debug(5, "bp: return %d\n", count < 0 ? 0 : count);
+  mutt_debug(5, "return %d\n", count < 0 ? 0 : count);
   return count < 0 ? 0 : count;
 }
 
diff --git a/pop.c b/pop.c
index aa7564638b9b690ed6697756b5f165788908447f..1d7ba8453c08acb0bf1045ca726242c4ab962815 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -110,14 +110,14 @@ static int pop_read_header(struct PopData *pop_data, struct Header *h)
       {
         pop_data->cmd_top = 1;
 
-        mutt_debug(1, "pop_read_header: set TOP capability\n");
+        mutt_debug(1, "set TOP capability\n");
       }
 
       if (rc == -2)
       {
         pop_data->cmd_top = 0;
 
-        mutt_debug(1, "pop_read_header: unset TOP capability\n");
+        mutt_debug(1, "unset TOP capability\n");
         snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s",
                  _("Command TOP is not supported by server."));
       }
@@ -180,7 +180,7 @@ static int fetch_uidl(char *line, void *data)
 
   if (i == ctx->msgcount)
   {
-    mutt_debug(1, "pop_fetch_headers: new header %d %s\n", index, line);
+    mutt_debug(1, "new header %d %s\n", index, line);
 
     if (i >= ctx->hdrmax)
       mx_alloc_memory(ctx);
@@ -289,14 +289,14 @@ static int pop_fetch_headers(struct Context *ctx)
     {
       pop_data->cmd_uidl = 1;
 
-      mutt_debug(1, "pop_fetch_headers: set UIDL capability\n");
+      mutt_debug(1, "set UIDL capability\n");
     }
 
     if (ret == -2 && pop_data->cmd_uidl == 2)
     {
       pop_data->cmd_uidl = 0;
 
-      mutt_debug(1, "pop_fetch_headers: unset UIDL capability\n");
+      mutt_debug(1, "unset UIDL capability\n");
       snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s",
                _("Command UIDL is not supported by server."));
     }
@@ -501,7 +501,7 @@ static void pop_clear_cache(struct PopData *pop_data)
   if (!pop_data->clear_cache)
     return;
 
-  mutt_debug(1, "pop_clear_cache: delete cached messages\n");
+  mutt_debug(1, "delete cached messages\n");
 
   for (int i = 0; i < POP_CACHE_LEN; i++)
   {
index 9b354d9458dcfb669a7be79e753a9cefadb9987c..3f4e1022787e586d8c4e7727a0ae9b396965796f 100644 (file)
@@ -57,7 +57,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopData *pop_data, const char *metho
 
   if (mutt_sasl_client_new(pop_data->conn, &saslconn) < 0)
   {
-    mutt_debug(1, "pop_auth_sasl: Error allocating SASL connection.\n");
+    mutt_debug(1, "Error allocating SASL connection.\n");
     return POP_A_FAILURE;
   }
 
@@ -74,8 +74,8 @@ static enum PopAuthRes pop_auth_sasl(struct PopData *pop_data, const char *metho
 
   if (rc != SASL_OK && rc != SASL_CONTINUE)
   {
-    mutt_debug(1, "pop_auth_sasl: Failure starting authentication exchange. "
-                  "No shared mechanisms?\n");
+    mutt_debug(
+        1, "Failure starting authentication exchange. No shared mechanisms?\n");
 
     /* SASL doesn't support suggested mechanisms, so fall back */
     return POP_A_UNAVAIL;
@@ -119,7 +119,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopData *pop_data, const char *metho
     if ((mutt_str_strncmp(inbuf, "+ ", 2) == 0) &&
         sasl_decode64(inbuf + 2, strlen(inbuf + 2), buf, bufsize - 1, &len) != SASL_OK)
     {
-      mutt_debug(1, "pop_auth_sasl: error base64-decoding server response.\n");
+      mutt_debug(1, "error base64-decoding server response.\n");
       goto bail;
     }
 
@@ -153,8 +153,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopData *pop_data, const char *metho
       }
       if (sasl_encode64(pc, olen, buf, bufsize, &olen) != SASL_OK)
       {
-        mutt_debug(1,
-                   "pop_auth_sasl: error base64-encoding client response.\n");
+        mutt_debug(1, "error base64-encoding client response.\n");
         goto bail;
       }
     }
@@ -279,14 +278,14 @@ static enum PopAuthRes pop_auth_user(struct PopData *pop_data, const char *metho
     {
       pop_data->cmd_user = 1;
 
-      mutt_debug(1, "pop_auth_user: set USER capability\n");
+      mutt_debug(1, "set USER capability\n");
     }
 
     if (ret == -2)
     {
       pop_data->cmd_user = 0;
 
-      mutt_debug(1, "pop_auth_user: unset USER capability\n");
+      mutt_debug(1, "unset USER capability\n");
       snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s",
                _("Command USER is not supported by server."));
     }
@@ -360,7 +359,7 @@ int pop_authenticate(struct PopData *pop_data)
       comma = strchr(method, ':');
       if (comma)
         *comma++ = '\0';
-      mutt_debug(2, "pop_authenticate: Trying method %s\n", method);
+      mutt_debug(2, "Trying method %s\n", method);
       authenticator = pop_authenticators;
 
       while (authenticator->authenticate)
@@ -401,7 +400,7 @@ int pop_authenticate(struct PopData *pop_data)
   else
   {
     /* Fall back to default: any authenticator */
-    mutt_debug(2, "pop_authenticate: Using any available method.\n");
+    mutt_debug(2, "Using any available method.\n");
     authenticator = pop_authenticators;
 
     while (authenticator->authenticate)
index 6035fca3c905ffe159393b4b8fdb9d5c984c1c27..685705df82484dc49a48a8a565d7270420b690ee 100644 (file)
@@ -109,10 +109,10 @@ int mutt_num_postponed(int force)
       if (newpc >= 0)
       {
         PostCount = newpc;
-        mutt_debug(3, "mutt_num_postponed: %d postponed IMAP messages found.\n", PostCount);
+        mutt_debug(3, "%d postponed IMAP messages found.\n", PostCount);
       }
       else
-        mutt_debug(3, "mutt_num_postponed: using old IMAP postponed count.\n");
+        mutt_debug(3, "using old IMAP postponed count.\n");
     }
     return PostCount;
   }
diff --git a/send.c b/send.c
index f353dc9b17c9fa10a7e0339671c7aabb2c0c2696..d3d320fb6b432101e1d08aaacf92ca7dd60ac273 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1474,8 +1474,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
 
     if (!tempfp)
     {
-      mutt_debug(1, "newsend_message: can't create tempfile %s (errno=%d)\n",
-                 msg->content->filename, errno);
+      mutt_debug(1, "can't create tempfile %s (errno=%d)\n", msg->content->filename, errno);
       mutt_perror(msg->content->filename);
       goto cleanup;
     }
@@ -1497,9 +1496,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
      */
 
     if (msg->env->from)
-      mutt_debug(
-          5, "ci_send_message: msg->env->from before set_reverse_name: %s\n",
-          msg->env->from->mailbox);
+      mutt_debug(5, "msg->env->from before set_reverse_name: %s\n",
+                 msg->env->from->mailbox);
     msg->env->from = set_reverse_name(cur->env);
   }
   if (cur && option(OPT_REPLY_WITH_XORIG) &&
@@ -1519,8 +1517,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       msg->env->from = cur->env->x_original_to;
       /* Not more than one from address */
       msg->env->from->next = NULL;
-      mutt_debug(5, "ci_send_message: msg->env->from extracted from "
-                    "X-Original-To: header: %s\n",
+      mutt_debug(5, "msg->env->from extracted from X-Original-To: header: %s\n",
                  msg->env->from->mailbox);
     }
   }
index da06f938e0014bcc91774398436d2f9e2f27ebcd..70e18a0f5d0c851393e0635172fce5d4ebe39afa 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -440,7 +440,7 @@ int mutt_write_mime_body(struct Body *a, FILE *f)
     p = mutt_get_parameter("boundary", a->parameter);
     if (!p)
     {
-      mutt_debug(1, "mutt_write_mime_body(): no boundary parameter found!\n");
+      mutt_debug(1, "no boundary parameter found!\n");
       mutt_error(_("No boundary parameter found! [report this error]"));
       return -1;
     }
@@ -470,7 +470,7 @@ int mutt_write_mime_body(struct Body *a, FILE *f)
   fpin = fopen(a->filename, "r");
   if (!fpin)
   {
-    mutt_debug(1, "write_mime_body: %s no longer exists!\n", a->filename);
+    mutt_debug(1, "%s no longer exists!\n", a->filename);
     mutt_error(_("%s no longer exists!"), a->filename);
     return -1;
   }
@@ -932,8 +932,7 @@ struct Content *mutt_get_content_info(const char *fname, struct Body *b)
   fp = fopen(fname, "r");
   if (!fp)
   {
-    mutt_debug(1, "mutt_get_content_info: %s: %s (errno %d).\n", fname,
-               strerror(errno), errno);
+    mutt_debug(1, "%s: %s (errno %d).\n", fname, strerror(errno), errno);
     return NULL;
   }
 
@@ -1033,7 +1032,7 @@ int mutt_lookup_mime_type(struct Body *att, const char *path)
         snprintf(buf, sizeof(buf), "%s/.mime.types", NONULL(HomeDir));
         break;
       default:
-        mutt_debug(1, "mutt_lookup_mime_type: Internal error, count = %d.\n", count);
+        mutt_debug(1, "Internal error, count = %d.\n", count);
         goto bye; /* shouldn't happen */
     }
 
@@ -1738,8 +1737,7 @@ static int fold_one_header(FILE *fp, const char *tag, const char *value,
   int first = 1, enc, col = 0, w, l = 0, fold;
   bool display = (flags & CH_DISPLAY);
 
-  mutt_debug(4, "mwoh: pfx=[%s], tag=[%s], flags=%d value=[%s]\n", pfx, tag,
-             flags, NONULL(value));
+  mutt_debug(4, "pfx=[%s], tag=[%s], flags=%d value=[%s]\n", pfx, tag, flags, NONULL(value));
 
   if (tag && *tag && fprintf(fp, "%s%s: ", NONULL(pfx), tag) < 0)
     return -1;
@@ -1761,7 +1759,7 @@ static int fold_one_header(FILE *fp, const char *tag, const char *value,
     w = mutt_mb_width(buf, col, display);
     enc = (mutt_str_strncmp(buf, "=?", 2) == 0);
 
-    mutt_debug(5, "mwoh: word=[%s], col=%d, w=%d, next=[0x0%x]\n", buf, col, w, *next);
+    mutt_debug(5, "word=[%s], col=%d, w=%d, next=[0x0%x]\n", buf, col, w, *next);
 
     /* insert a folding \n before the current word's lwsp except for
      * header name, first word on a line (word longer than wrap width)
@@ -1862,9 +1860,8 @@ static int write_one_header(FILE *fp, int pfxw, int max, int wraplen, const char
   if (!(flags & CH_DISPLAY) && (pfxw + max <= wraplen || is_from))
   {
     valbuf = mutt_str_substr_dup(start, end);
-    mutt_debug(4, "mwoh: buf[%s%s] short enough, "
-                  "max width = %d <= %d\n",
-               NONULL(pfx), valbuf, max, wraplen);
+    mutt_debug(4, "buf[%s%s] short enough, max width = %d <= %d\n", NONULL(pfx),
+               valbuf, max, wraplen);
     if (pfx && *pfx)
     {
       if (fputs(pfx, fp) == EOF)
@@ -1877,7 +1874,7 @@ static int write_one_header(FILE *fp, int pfxw, int max, int wraplen, const char
     t = strchr(valbuf, ':');
     if (!t)
     {
-      mutt_debug(1, "mwoh: warning: header not in 'key: value' format!\n");
+      mutt_debug(1, "#1 warning: header not in 'key: value' format!\n");
       FREE(&valbuf);
       return 0;
     }
@@ -1893,7 +1890,7 @@ static int write_one_header(FILE *fp, int pfxw, int max, int wraplen, const char
     t = strchr(start, ':');
     if (!t || t > end)
     {
-      mutt_debug(1, "mwoh: warning: header not in 'key: value' format!\n");
+      mutt_debug(1, "#2 warning: header not in 'key: value' format!\n");
       return 0;
     }
     if (is_from)
@@ -1915,8 +1912,8 @@ static int write_one_header(FILE *fp, int pfxw, int max, int wraplen, const char
 
       valbuf = mutt_str_substr_dup(t, end);
     }
-    mutt_debug(4, "mwoh: buf[%s%s] too long, max width = %d > %d\n",
-               NONULL(pfx), NONULL(valbuf), max, wraplen);
+    mutt_debug(4, "buf[%s%s] too long, max width = %d > %d\n", NONULL(pfx),
+               NONULL(valbuf), max, wraplen);
     if (fold_one_header(fp, tagbuf, valbuf, pfx, wraplen, flags) < 0)
     {
       FREE(&valbuf);
@@ -1963,7 +1960,7 @@ int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
     /* if header is short enough, simply print it */
     if (!display && mutt_strwidth(tag) + 2 + pfxw + mutt_strwidth(v) <= wraplen)
     {
-      mutt_debug(4, "mwoh: buf[%s%s: %s] is short enough\n", NONULL(pfx), tag, v);
+      mutt_debug(4, "buf[%s%s: %s] is short enough\n", NONULL(pfx), tag, v);
       if (fprintf(fp, "%s%s: %s\n", NONULL(pfx), tag, v) <= 0)
         goto out;
       rc = 0;
@@ -2864,7 +2861,7 @@ struct Address *mutt_remove_duplicates(struct Address *addr)
 
     if (dup)
     {
-      mutt_debug(2, "mutt_remove_duplicates: Removing %s\n", addr->mailbox);
+      mutt_debug(2, "Removing %s\n", addr->mailbox);
 
       *last = addr->next;
 
@@ -2959,9 +2956,7 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid,
   mutt_folder_hook(path);
   if (mx_open_mailbox(path, MUTT_APPEND | MUTT_QUIET, &f) == NULL)
   {
-    mutt_debug(1, "mutt_write_fcc(): unable to open mailbox %s in append-mode, "
-                  "aborting.\n",
-               path);
+    mutt_debug(1, "unable to open mailbox %s in append-mode, aborting.\n", path);
     return -1;
   }
 
@@ -3104,7 +3099,7 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid,
     fflush(tempfp);
     if (ferror(tempfp))
     {
-      mutt_debug(1, "mutt_write_fcc(): %s: write failed.\n", tempfile);
+      mutt_debug(1, "%s: write failed.\n", tempfile);
       mutt_file_fclose(&tempfp);
       unlink(tempfile);
       mx_commit_message(msg, &f); /* XXX - really? */
diff --git a/smtp.c b/smtp.c
index 5919b59ec906e3237cd0e7406562a5e4e5420271..fc1f5ebaf13c4866b7c3c06eb9d62ee9fd6f9863 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -380,7 +380,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist)
 
   if (rc != SASL_OK && rc != SASL_CONTINUE)
   {
-    mutt_debug(2, "smtp_auth_sasl: %s unavailable\n", mech);
+    mutt_debug(2, "%s unavailable\n", mech);
     sasl_dispose(&saslconn);
     return SMTP_AUTH_UNAVAIL;
   }
@@ -398,7 +398,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist)
     if (sasl_encode64(data, len, buf + mutt_str_strlen(buf),
                       bufsize - mutt_str_strlen(buf), &len) != SASL_OK)
     {
-      mutt_debug(1, "smtp_auth_sasl: error base64-encoding client response.\n");
+      mutt_debug(1, "#1 error base64-encoding client response.\n");
       goto fail;
     }
   }
@@ -419,7 +419,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist)
 
     if (sasl_decode64(buf + 4, strlen(buf + 4), buf, bufsize - 1, &len) != SASL_OK)
     {
-      mutt_debug(1, "smtp_auth_sasl: error base64-decoding server response.\n");
+      mutt_debug(1, "error base64-decoding server response.\n");
       goto fail;
     }
 
@@ -439,8 +439,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist)
       }
       if (sasl_encode64(data, len, buf, bufsize, &len) != SASL_OK)
       {
-        mutt_debug(1,
-                   "smtp_auth_sasl: error base64-encoding client response.\n");
+        mutt_debug(1, "#2 error base64-encoding client response.\n");
         goto fail;
       }
     }
@@ -478,7 +477,7 @@ static int smtp_auth(struct Connection *conn)
       if (!method[0])
         continue;
 
-      mutt_debug(2, "smtp_authenticate: Trying method %s\n", method);
+      mutt_debug(2, "Trying method %s\n", method);
 
       r = smtp_auth_sasl(conn, method);