From a8a167046e8a35c6b212caf96829421e615e718a Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 5 Apr 2019 22:56:48 +0100 Subject: [PATCH] mutt_debug Tidy lots of debugging messages --- alias.c | 6 +++--- commands.c | 2 +- complete.c | 2 +- config/set.c | 2 +- conn/conn_raw.c | 2 +- conn/sasl.c | 16 ++++++++-------- conn/socket.c | 4 ++-- conn/ssl.c | 6 +++--- email/body.c | 2 +- email/from.c | 2 +- email/group.c | 2 +- email/idna.c | 10 +++++----- handler.c | 12 ++++++------ imap/auth.c | 4 ++-- imap/auth_anon.c | 4 ++-- imap/auth_cram.c | 4 ++-- imap/auth_gss.c | 10 +++++----- imap/auth_login.c | 3 +-- imap/auth_sasl.c | 8 ++++---- imap/command.c | 14 +++++++------- imap/imap.c | 4 ++-- imap/util.c | 2 +- init.c | 4 ++-- maildir/maildir.c | 4 ++-- maildir/shared.c | 4 ++-- mbox/mbox.c | 8 ++++---- mutt/file.c | 8 ++++---- mutt_attach.c | 8 ++++---- mutt_header.c | 2 +- mutt_lua.c | 4 ++-- muttlib.c | 4 ++-- mx.c | 7 +++---- ncrypt/crypt_gpgme.c | 10 +++++----- ncrypt/pgp.c | 24 ++++++++++++------------ ncrypt/pgpinvoke.c | 4 ++-- ncrypt/pgpkey.c | 2 +- ncrypt/pgpmicalg.c | 14 +++++++------- nntp/nntp.c | 8 ++++---- notmuch/mutt_notmuch.c | 2 +- pager.c | 4 ++-- pop/pop_auth.c | 8 ++++---- postpone.c | 4 ++-- sendlib.c | 8 ++++---- smtp.c | 6 +++--- 44 files changed, 133 insertions(+), 135 deletions(-) diff --git a/alias.c b/alias.c index c059eff8a..162978d8e 100644 --- a/alias.c +++ b/alias.c @@ -722,14 +722,14 @@ bool mutt_addr_is_user(struct Address *addr) if (mutt_regexlist_match(&Alternates, addr->mailbox)) { - mutt_debug(5, "yes, %s matched by alternates.\n", addr->mailbox); + mutt_debug(5, "yes, %s matched by alternates\n", addr->mailbox); if (mutt_regexlist_match(&UnAlternates, addr->mailbox)) - mutt_debug(5, "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, "no, all failed.\n"); + mutt_debug(5, "no, all failed\n"); return false; } diff --git a/commands.c b/commands.c index 6c438d99e..5e35547ea 100644 --- a/commands.c +++ b/commands.c @@ -802,7 +802,7 @@ void mutt_shell_escape(void) fflush(stdout); int rc = mutt_system(buf); if (rc == -1) - mutt_debug(LL_DEBUG1, "Error running \"%s\"!", buf); + mutt_debug(LL_DEBUG1, "Error running \"%s\"", buf); if ((rc != 0) || C_WaitKey) mutt_any_key_to_continue(NULL); diff --git a/complete.c b/complete.c index 3742261b7..b779c1677 100644 --- a/complete.c +++ b/complete.c @@ -150,7 +150,7 @@ int mutt_complete(char *buf, size_t buflen) if (!dirp) { - mutt_debug(LL_DEBUG1, "%s: %s (errno %d).\n", exp_dirpart, strerror(errno), errno); + mutt_debug(LL_DEBUG1, "%s: %s (errno %d)\n", exp_dirpart, strerror(errno), errno); return -1; } diff --git a/config/set.c b/config/set.c index 7536bbfea..d017f8c3d 100644 --- a/config/set.c +++ b/config/set.c @@ -478,7 +478,7 @@ int cs_he_initial_set(const struct ConfigSet *cs, struct HashElem *he, { struct Inheritance *i = he->data; cdef = i->parent->data; - mutt_debug(LL_DEBUG1, "Variable '%s' is inherited type.\n", cdef->name); + mutt_debug(LL_DEBUG1, "Variable '%s' is inherited type\n", cdef->name); return CSR_ERR_CODE; } diff --git a/conn/conn_raw.c b/conn/conn_raw.c index a6e055757..40206a389 100644 --- a/conn/conn_raw.c +++ b/conn/conn_raw.c @@ -99,7 +99,7 @@ static int socket_connect(int fd, struct sockaddr *sa) if (connect(fd, sa, sa_size) < 0) { save_errno = errno; - mutt_debug(LL_DEBUG2, "Connection failed. errno: %d...\n", errno); + mutt_debug(LL_DEBUG2, "Connection failed. errno: %d\n", errno); SigInt = 0; /* reset in case we caught SIGINTR while in connect() */ } diff --git a/conn/sasl.c b/conn/sasl.c index 1d26fec5a..aab934c80 100644 --- a/conn/sasl.c +++ b/conn/sasl.c @@ -79,25 +79,25 @@ static int getnameinfo_err(int ret) case EAI_AGAIN: mutt_debug(LL_DEBUG1, "The name could not be resolved at this time. Future " - "attempts may succeed.\n"); + "attempts may succeed\n"); err = SASL_TRYAGAIN; break; case EAI_BADFLAGS: - mutt_debug(LL_DEBUG1, "The flags had an invalid value.\n"); + mutt_debug(LL_DEBUG1, "The flags had an invalid value\n"); err = SASL_BADPARAM; break; case EAI_FAIL: - mutt_debug(LL_DEBUG1, "A non-recoverable error occurred.\n"); + mutt_debug(LL_DEBUG1, "A non-recoverable error occurred\n"); err = SASL_FAIL; break; case EAI_FAMILY: mutt_debug(LL_DEBUG1, "The address family was not recognized or the address " - "length was invalid for the specified family.\n"); + "length was invalid for the specified family\n"); err = SASL_BADPROT; break; case EAI_MEMORY: - mutt_debug(LL_DEBUG1, "There was a memory allocation failure.\n"); + mutt_debug(LL_DEBUG1, "There was a memory allocation failure\n"); err = SASL_NOMEM; break; case EAI_NONAME: @@ -110,7 +110,7 @@ static int getnameinfo_err(int ret) case EAI_SYSTEM: mutt_debug(LL_DEBUG1, "A system error occurred. The error code can be found in " - "errno(%d,%s)).\n", + "errno(%d,%s))\n", errno, strerror(errno)); err = SASL_FAIL; /* no real equivalent */ break; @@ -225,7 +225,7 @@ static int mutt_sasl_start(void) if (rc != SASL_OK) { - mutt_debug(LL_DEBUG1, "libsasl initialisation failed.\n"); + mutt_debug(LL_DEBUG1, "libsasl initialisation failed\n"); return SASL_FAIL; } @@ -647,7 +647,7 @@ int mutt_sasl_interact(sasl_interact_t *interaction) while (interaction->id != SASL_CB_LIST_END) { - mutt_debug(LL_DEBUG2, "filling in SASL interaction %ld.\n", interaction->id); + mutt_debug(LL_DEBUG2, "filling in SASL interaction %ld\n", interaction->id); snprintf(prompt, sizeof(prompt), "%s: ", interaction->prompt); resp[0] = '\0'; diff --git a/conn/socket.c b/conn/socket.c index f4f65e6e1..f9830196a 100644 --- a/conn/socket.c +++ b/conn/socket.c @@ -100,7 +100,7 @@ int mutt_socket_close(struct Connection *conn) int rc = -1; if (conn->fd < 0) - mutt_debug(LL_DEBUG1, "Attempt to close closed connection.\n"); + mutt_debug(LL_DEBUG1, "Attempt to close closed connection\n"); else rc = conn->conn_close(conn); @@ -211,7 +211,7 @@ int mutt_socket_readchar(struct Connection *conn, char *c) conn->available = conn->conn_read(conn, conn->inbuf, sizeof(conn->inbuf)); else { - mutt_debug(LL_DEBUG1, "attempt to read from closed connection.\n"); + mutt_debug(LL_DEBUG1, "attempt to read from closed connection\n"); return -1; } conn->bufpos = 0; diff --git a/conn/ssl.c b/conn/ssl.c index ff29de5d3..2ce3506a8 100644 --- a/conn/ssl.c +++ b/conn/ssl.c @@ -196,14 +196,14 @@ static int ssl_set_verify_partial(SSL_CTX *ctx) X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_PARTIAL_CHAIN); if (SSL_CTX_set1_param(ctx, param) == 0) { - mutt_debug(LL_DEBUG2, "SSL_CTX_set1_param() failed.\n"); + mutt_debug(LL_DEBUG2, "SSL_CTX_set1_param() failed\n"); rc = -1; } X509_VERIFY_PARAM_free(param); } else { - mutt_debug(LL_DEBUG2, "X509_VERIFY_PARAM_new() failed.\n"); + mutt_debug(LL_DEBUG2, "X509_VERIFY_PARAM_new() failed\n"); rc = -1; } } @@ -1101,7 +1101,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(LL_DEBUG2, "ignoring duplicate skipped certificate.\n"); + mutt_debug(LL_DEBUG2, "ignoring duplicate skipped certificate\n"); return true; } } diff --git a/email/body.c b/email/body.c index 42c61b32a..abdbf9292 100644 --- a/email/body.c +++ b/email/body.c @@ -71,7 +71,7 @@ void mutt_body_free(struct Body **p) { if (b->unlink) unlink(b->filename); - mutt_debug(LL_DEBUG1, "%sunlinking %s.\n", b->unlink ? "" : "not ", b->filename); + mutt_debug(LL_DEBUG1, "%sunlinking %s\n", b->unlink ? "" : "not ", b->filename); } FREE(&b->filename); diff --git a/email/from.c b/email/from.c index 5ac3b1932..54ee0d67f 100644 --- a/email/from.c +++ b/email/from.c @@ -197,7 +197,7 @@ bool is_from(const char *s, char *path, size_t pathlen, time_t *tp) return false; tm.tm_year = (yr > 1900) ? (yr - 1900) : ((yr < 70) ? (yr + 100) : yr); - mutt_debug(LL_DEBUG3, "month=%d, day=%d, hr=%d, min=%d, sec=%d, yr=%d.\n", + mutt_debug(LL_DEBUG3, "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/email/group.c b/email/group.c index 3399df098..c1ab2295f 100644 --- a/email/group.c +++ b/email/group.c @@ -71,7 +71,7 @@ struct Group *mutt_pattern_group(const char *k) p = mutt_hash_find(Groups, k); if (!p) { - mutt_debug(LL_DEBUG2, "Creating group %s.\n", k); + mutt_debug(LL_DEBUG2, "Creating group %s\n", k); p = mutt_mem_calloc(1, sizeof(struct Group)); p->name = mutt_str_strdup(k); STAILQ_INIT(&p->rs); diff --git a/email/idna.c b/email/idna.c index 6206362d7..83ef80111 100644 --- a/email/idna.c +++ b/email/idna.c @@ -163,14 +163,14 @@ char *mutt_idna_intl_to_local(const char *user, const char *domain, int flags) if (mutt_ch_convert_string(&reversed_user, C_Charset, "utf-8", 0) != 0) { - mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for user = '%s'.\n", + mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for user = '%s'\n", reversed_user); goto cleanup; } if (mutt_str_strcasecmp(user, reversed_user) != 0) { - mutt_debug(LL_DEBUG1, "#1 Not reversible. orig = '%s', reversed = '%s'.\n", + mutt_debug(LL_DEBUG1, "#1 Not reversible. orig = '%s', reversed = '%s'\n", user, reversed_user); goto cleanup; } @@ -179,7 +179,7 @@ char *mutt_idna_intl_to_local(const char *user, const char *domain, int flags) if (mutt_ch_convert_string(&reversed_domain, C_Charset, "utf-8", 0) != 0) { - mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for domain = '%s'.\n", + mutt_debug(LL_DEBUG1, "Not reversible. Charset conv to utf-8 failed for domain = '%s'\n", reversed_domain); goto cleanup; } @@ -192,7 +192,7 @@ char *mutt_idna_intl_to_local(const char *user, const char *domain, int flags) { if (idna_to_ascii_8z(reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS) { - mutt_debug(LL_DEBUG1, "Not reversible. idna_to_ascii_8z failed for domain = '%s'.\n", + mutt_debug(LL_DEBUG1, "Not reversible. idna_to_ascii_8z failed for domain = '%s'\n", reversed_domain); goto cleanup; } @@ -202,7 +202,7 @@ char *mutt_idna_intl_to_local(const char *user, const char *domain, int flags) if (mutt_str_strcasecmp(domain, reversed_domain) != 0) { - mutt_debug(LL_DEBUG1, "#2 Not reversible. orig = '%s', reversed = '%s'.\n", + mutt_debug(LL_DEBUG1, "#2 Not reversible. orig = '%s', reversed = '%s'\n", domain, reversed_domain); goto cleanup; } diff --git a/handler.c b/handler.c index abd159652..0bbf62267 100644 --- a/handler.c +++ b/handler.c @@ -1232,7 +1232,7 @@ static int multipart_handler(struct Body *a, struct State *s) if (rc != 0) { mutt_error(_("One or more parts of this message could not be displayed")); - mutt_debug(LL_DEBUG1, "Failed on attachment #%d, type %s/%s.\n", count, + mutt_debug(LL_DEBUG1, "Failed on attachment #%d, type %s/%s\n", count, TYPE(p), NONULL(p->subtype)); } @@ -1298,7 +1298,7 @@ static int run_decode_and_handler(struct Body *b, struct State *s, if (!s->fp_out) { mutt_error(_("Unable to open 'memory stream'")); - mutt_debug(LL_DEBUG1, "Can't open 'memory stream'.\n"); + mutt_debug(LL_DEBUG1, "Can't open 'memory stream'\n"); return -1; } #else @@ -1307,7 +1307,7 @@ static int run_decode_and_handler(struct Body *b, struct State *s, if (!s->fp_out) { mutt_error(_("Unable to open temporary file")); - mutt_debug(LL_DEBUG1, "Can't open %s.\n", tempfile); + mutt_debug(LL_DEBUG1, "Can't open %s\n", tempfile); return -1; } #endif @@ -1374,7 +1374,7 @@ static int run_decode_and_handler(struct Body *b, struct State *s, rc = handler(b, s); if (rc != 0) { - mutt_debug(LL_DEBUG1, "Failed on attachment of type %s/%s.\n", TYPE(b), + mutt_debug(LL_DEBUG1, "Failed on attachment of type %s/%s\n", TYPE(b), NONULL(b->subtype)); } @@ -1483,7 +1483,7 @@ void mutt_decode_base64(struct State *s, size_t len, bool istext, iconv_t cd) { /* "i" may be zero if there is trailing whitespace, which is not an error */ if (i != 0) - mutt_debug(LL_DEBUG2, "didn't get a multiple of 4 chars.\n"); + mutt_debug(LL_DEBUG2, "didn't get a multiple of 4 chars\n"); break; } @@ -1692,7 +1692,7 @@ int mutt_body_handler(struct Body *b, struct State *s) s->flags = oflags | (s->flags & MUTT_FIRSTDONE); if (rc != 0) { - mutt_debug(LL_DEBUG1, "Bailing on attachment of type %s/%s.\n", TYPE(b), + mutt_debug(LL_DEBUG1, "Bailing on attachment of type %s/%s\n", TYPE(b), NONULL(b->subtype)); } diff --git a/imap/auth.c b/imap/auth.c index d370634db..7fe279844 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -70,7 +70,7 @@ int imap_authenticate(struct ImapAccountData *adata) if (C_ImapAuthenticators && *C_ImapAuthenticators) { - mutt_debug(LL_DEBUG2, "Trying user-defined imap_authenticators.\n"); + mutt_debug(LL_DEBUG2, "Trying user-defined imap_authenticators\n"); /* Try user-specified list of authentication methods */ char *methods = mutt_str_strdup(C_ImapAuthenticators); @@ -106,7 +106,7 @@ int imap_authenticate(struct ImapAccountData *adata) else { /* Fall back to default: any authenticator */ - mutt_debug(LL_DEBUG2, "Trying pre-defined imap_authenticators.\n"); + mutt_debug(LL_DEBUG2, "Trying pre-defined imap_authenticators\n"); for (size_t i = 0; i < mutt_array_size(imap_authenticators); i++) { diff --git a/imap/auth_anon.c b/imap/auth_anon.c index 6c34f18d3..c49223ca6 100644 --- a/imap/auth_anon.c +++ b/imap/auth_anon.c @@ -65,7 +65,7 @@ enum ImapAuthRes imap_auth_anon(struct ImapAccountData *adata, const char *metho if (rc != IMAP_CMD_RESPOND) { - mutt_debug(LL_DEBUG1, "Invalid response from server.\n"); + mutt_debug(LL_DEBUG1, "Invalid response from server\n"); goto bail; } @@ -77,7 +77,7 @@ enum ImapAuthRes imap_auth_anon(struct ImapAccountData *adata, const char *metho if (rc != IMAP_CMD_OK) { - mutt_debug(LL_DEBUG1, "Error receiving server response.\n"); + mutt_debug(LL_DEBUG1, "Error receiving server response\n"); goto bail; } diff --git a/imap/auth_cram.c b/imap/auth_cram.c index 90bbe3708..61f4e815f 100644 --- a/imap/auth_cram.c +++ b/imap/auth_cram.c @@ -133,7 +133,7 @@ enum ImapAuthRes imap_auth_cram_md5(struct ImapAccountData *adata, const char *m len = mutt_b64_decode(adata->buf + 2, obuf, sizeof(obuf)); if (len == -1) { - mutt_debug(LL_DEBUG1, "Error decoding base64 response.\n"); + mutt_debug(LL_DEBUG1, "Error decoding base64 response\n"); goto bail; } @@ -168,7 +168,7 @@ enum ImapAuthRes imap_auth_cram_md5(struct ImapAccountData *adata, const char *m if (rc != IMAP_CMD_OK) { - mutt_debug(LL_DEBUG1, "Error receiving server response.\n"); + mutt_debug(LL_DEBUG1, "Error receiving server response\n"); goto bail; } diff --git a/imap/auth_gss.c b/imap/auth_gss.c index 2ec021169..b85f484ab 100644 --- a/imap/auth_gss.c +++ b/imap/auth_gss.c @@ -197,14 +197,14 @@ enum ImapAuthRes imap_auth_gss(struct ImapAccountData *adata, const char *method if (rc != IMAP_CMD_RESPOND) { - mutt_debug(LL_DEBUG1, "#1 Error receiving server response.\n"); + mutt_debug(LL_DEBUG1, "#1 Error receiving server response\n"); gss_release_name(&min_stat, &target_name); goto bail; } if (mutt_b64_buffer_decode(buf2, adata->buf + 2) < 0) { - mutt_debug(LL_DEBUG1, "Invalid base64 server response.\n"); + mutt_debug(LL_DEBUG1, "Invalid base64 server response\n"); gss_release_name(&min_stat, &target_name); goto err_abort_cmd; } @@ -240,12 +240,12 @@ enum ImapAuthRes imap_auth_gss(struct ImapAccountData *adata, const char *method if (rc != IMAP_CMD_RESPOND) { - mutt_debug(LL_DEBUG1, "#2 Error receiving server response.\n"); + mutt_debug(LL_DEBUG1, "#2 Error receiving server response\n"); goto bail; } if (mutt_b64_buffer_decode(buf2, adata->buf + 2) < 0) { - mutt_debug(LL_DEBUG1, "Invalid base64 server response.\n"); + mutt_debug(LL_DEBUG1, "Invalid base64 server response\n"); goto err_abort_cmd; } request_buf.value = buf2->data; @@ -308,7 +308,7 @@ enum ImapAuthRes imap_auth_gss(struct ImapAccountData *adata, const char *method while (rc == IMAP_CMD_CONTINUE); if (rc == IMAP_CMD_RESPOND) { - mutt_debug(LL_DEBUG1, "Unexpected server continuation request.\n"); + mutt_debug(LL_DEBUG1, "Unexpected server continuation request\n"); goto err_abort_cmd; } if (imap_code(adata->buf)) diff --git a/imap/auth_login.c b/imap/auth_login.c index 10c212ac2..3b7058f46 100644 --- a/imap/auth_login.c +++ b/imap/auth_login.c @@ -67,8 +67,7 @@ enum ImapAuthRes imap_auth_login(struct ImapAccountData *adata, const char *meth * of 5 or higher */ if (C_DebugLevel < IMAP_LOG_PASS) - mutt_debug(LL_DEBUG2, "Sending LOGIN command for %s...\n", - adata->conn->account.user); + mutt_debug(LL_DEBUG2, "Sending LOGIN command for %s\n", adata->conn->account.user); snprintf(buf, sizeof(buf), "LOGIN %s %s", q_user, q_pass); if (imap_exec(adata, buf, IMAP_CMD_PASS) != IMAP_EXEC_SUCCESS) diff --git a/imap/auth_sasl.c b/imap/auth_sasl.c index 975e6a847..a7aafb6c2 100644 --- a/imap/auth_sasl.c +++ b/imap/auth_sasl.c @@ -60,7 +60,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapAccountData *adata, const char *metho if (mutt_sasl_client_new(adata->conn, &saslconn) < 0) { - mutt_debug(LL_DEBUG1, "Error allocating SASL connection.\n"); + mutt_debug(LL_DEBUG1, "Error allocating SASL connection\n"); return IMAP_AUTH_FAILURE; } @@ -137,7 +137,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapAccountData *adata, const char *metho buf[len++] = ' '; if (sasl_encode64(pc, olen, buf + len, bufsize - len, &olen) != SASL_OK) { - mutt_debug(LL_DEBUG1, "#1 error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "#1 error base64-encoding client response\n"); goto bail; } client_start = false; @@ -176,7 +176,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapAccountData *adata, const char *metho * include space for the trailing null */ if (sasl_decode64(adata->buf + 2, len, buf, bufsize - 1, &len) != SASL_OK) { - mutt_debug(LL_DEBUG1, "error base64-decoding server response.\n"); + mutt_debug(LL_DEBUG1, "error base64-decoding server response\n"); goto bail; } } @@ -207,7 +207,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapAccountData *adata, const char *metho } if (sasl_encode64(pc, olen, buf, bufsize, &olen) != SASL_OK) { - mutt_debug(LL_DEBUG1, "#2 error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "#2 error base64-encoding client response\n"); goto bail; } } diff --git a/imap/command.c b/imap/command.c index 4f6b6c074..fba3f985f 100644 --- a/imap/command.c +++ b/imap/command.c @@ -335,12 +335,12 @@ static void cmd_parse_vanished(struct ImapAccountData *adata, char *s) if ((exp_msn < 1) || (exp_msn > mdata->max_msn)) { - mutt_debug(LL_DEBUG1, "VANISHED: msn for UID %u is incorrect.\n", uid); + mutt_debug(LL_DEBUG1, "VANISHED: msn for UID %u is incorrect\n", uid); continue; } if (mdata->msn_index[exp_msn - 1] != e) { - mutt_debug(LL_DEBUG1, "VANISHED: msn_index for UID %u is incorrect.\n", uid); + mutt_debug(LL_DEBUG1, "VANISHED: msn_index for UID %u is incorrect\n", uid); continue; } @@ -456,12 +456,12 @@ static void cmd_parse_fetch(struct ImapAccountData *adata, char *s) SKIPWS(s); if (mutt_str_atoui(s, &uid) < 0) { - mutt_debug(LL_DEBUG1, "Illegal UID. Skipping update.\n"); + mutt_debug(LL_DEBUG1, "Illegal UID. Skipping update\n"); return; } if (uid != imap_edata_get(e)->uid) { - mutt_debug(LL_DEBUG1, "UID vs MSN mismatch. Skipping update.\n"); + mutt_debug(LL_DEBUG1, "UID vs MSN mismatch. Skipping update\n"); return; } uid_checked = 1; @@ -945,10 +945,10 @@ static void cmd_parse_exists(struct ImapAccountData *adata, const char *pn) /* at least the InterChange server sends EXISTS messages freely, * even when there is no new mail */ else if (count == mdata->max_msn) - mutt_debug(LL_DEBUG3, "superfluous EXISTS message.\n"); + mutt_debug(LL_DEBUG3, "superfluous EXISTS message\n"); else { - mutt_debug(LL_DEBUG2, "New mail in %s - %d messages total.\n", mdata->name, count); + mutt_debug(LL_DEBUG2, "New mail in %s - %d messages total\n", mdata->name, count); mdata->reopen |= IMAP_NEWMAIL_PENDING; mdata->new_mail_count = count; } @@ -1083,7 +1083,7 @@ int imap_cmd_step(struct ImapAccountData *adata) c = mutt_socket_readln_d(adata->buf + len, adata->blen - len, adata->conn, MUTT_SOCK_LOG_FULL); if (c <= 0) { - mutt_debug(LL_DEBUG1, "Error reading server response.\n"); + mutt_debug(LL_DEBUG1, "Error reading server response\n"); cmd_handle_fatal(adata); return IMAP_CMD_BAD; } diff --git a/imap/imap.c b/imap/imap.c index 3185bb538..fdce9463e 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -796,7 +796,7 @@ void imap_expunge_mailbox(struct Mailbox *m) if (e->index == INT_MAX) { - mutt_debug(LL_DEBUG2, "Expunging message UID %u.\n", imap_edata_get(e)->uid); + mutt_debug(LL_DEBUG2, "Expunging message UID %u\n", imap_edata_get(e)->uid); e->deleted = true; @@ -2112,7 +2112,7 @@ static int imap_mbox_open(struct Mailbox *m) if (mutt_str_startswith(imap_get_qualifier(adata->buf), "[READ-ONLY]", CASE_IGNORE) && !(adata->capabilities & IMAP_CAP_ACL)) { - mutt_debug(LL_DEBUG2, "Mailbox is read-only.\n"); + mutt_debug(LL_DEBUG2, "Mailbox is read-only\n"); m->readonly = true; } diff --git a/imap/util.c b/imap/util.c index c9b1b9e4c..6cc68a1bd 100644 --- a/imap/util.c +++ b/imap/util.c @@ -764,7 +764,7 @@ enum QuadOption imap_continue(const char *msg, const char *resp) */ void imap_error(const char *where, const char *msg) { - mutt_error("%s [%s]\n", where, msg); + mutt_error("%s [%s]", where, msg); } /** diff --git a/init.c b/init.c index 3c6b06db1..899015830 100644 --- a/init.c +++ b/init.c @@ -797,7 +797,7 @@ static int source_rc(const char *rcfile_path, struct Buffer *err) } } - mutt_debug(LL_DEBUG2, "Reading configuration file '%s'.\n", rcfile); + mutt_debug(LL_DEBUG2, "Reading configuration file '%s'\n", rcfile); FILE *fp = mutt_open_read(rcfile, &pid); if (!fp) @@ -932,7 +932,7 @@ static enum CommandResult parse_alias(struct Buffer *buf, struct Buffer *s, } mutt_extract_token(buf, s, MUTT_TOKEN_QUOTE | MUTT_TOKEN_SPACE | MUTT_TOKEN_SEMICOLON); - mutt_debug(5, "Second token is '%s'.\n", buf->data); + mutt_debug(5, "Second token is '%s'\n", buf->data); tmp->addr = mutt_addr_parse_list2(tmp->addr, buf->data); diff --git a/maildir/maildir.c b/maildir/maildir.c index 90b4cb4e6..c61adf4e9 100644 --- a/maildir/maildir.c +++ b/maildir/maildir.c @@ -596,7 +596,7 @@ int maildir_msg_open_new(struct Mailbox *m, struct Message *msg, struct Email *e snprintf(path, sizeof(path), "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s", m->path, subdir, (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix); - mutt_debug(LL_DEBUG2, "Trying %s.\n", path); + mutt_debug(LL_DEBUG2, "Trying %s\n", path); fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666); if (fd == -1) @@ -610,7 +610,7 @@ int maildir_msg_open_new(struct Mailbox *m, struct Message *msg, struct Email *e } else { - mutt_debug(LL_DEBUG2, "Success.\n"); + mutt_debug(LL_DEBUG2, "Success\n"); msg->path = mutt_str_strdup(path); break; } diff --git a/maildir/shared.c b/maildir/shared.c index ef17177ff..5189c9170 100644 --- a/maildir/shared.c +++ b/maildir/shared.c @@ -881,7 +881,7 @@ int maildir_mh_open_message(struct Mailbox *m, struct Message *msg, int msgno, b if (!msg->fp) { mutt_perror(path); - mutt_debug(LL_DEBUG1, "fopen: %s: %s (errno %d).\n", path, strerror(errno), errno); + mutt_debug(LL_DEBUG1, "fopen: %s: %s (errno %d)\n", path, strerror(errno), errno); return -1; } @@ -1027,7 +1027,7 @@ int md_commit_message(struct Mailbox *m, struct Message *msg, struct Email *e) mutt_rand64(), NONULL(ShortHostname), suffix); mutt_buffer_printf(full, "%s/%s", m->path, mutt_b2s(path)); - mutt_debug(LL_DEBUG2, "renaming %s to %s.\n", msg->path, mutt_b2s(full)); + mutt_debug(LL_DEBUG2, "renaming %s to %s\n", msg->path, mutt_b2s(full)); if (mutt_file_safe_rename(msg->path, mutt_b2s(full)) == 0) { diff --git a/mbox/mbox.c b/mbox/mbox.c index a6826bcf2..82dc69ab8 100644 --- a/mbox/mbox.c +++ b/mbox/mbox.c @@ -1075,7 +1075,7 @@ static int mbox_mbox_check(struct Mailbox *m, int *index_hint) } else { - mutt_debug(LL_DEBUG1, "fgets returned NULL.\n"); + mutt_debug(LL_DEBUG1, "fgets returned NULL\n"); modified = true; } } @@ -1204,7 +1204,7 @@ static int mbox_mbox_sync(struct Mailbox *m, int *index_hint) * never happen, is we presume it is a bug in neomutt. */ mutt_error( _("sync: mbox modified, but no modified messages (report this bug)")); - mutt_debug(LL_DEBUG1, "no modified messages.\n"); + mutt_debug(LL_DEBUG1, "no modified messages\n"); unlink(tempfile); goto bail; } @@ -1301,7 +1301,7 @@ static int mbox_mbox_sync(struct Mailbox *m, int *index_hint) if (fclose(fp) != 0) { fp = NULL; - mutt_debug(LL_DEBUG1, "mutt_file_fclose (&) returned non-zero.\n"); + mutt_debug(LL_DEBUG1, "mutt_file_fclose (&) returned non-zero\n"); unlink(tempfile); mutt_perror(tempfile); goto bail; @@ -1334,7 +1334,7 @@ static int mbox_mbox_sync(struct Mailbox *m, int *index_hint) ((m->magic == MUTT_MBOX) && !mutt_str_startswith(buf, "From ", CASE_MATCH)) || ((m->magic == MUTT_MMDF) && (mutt_str_strcmp(MMDF_SEP, buf) != 0))) { - mutt_debug(LL_DEBUG1, "message not in expected position.\n"); + mutt_debug(LL_DEBUG1, "message not in expected position\n"); mutt_debug(LL_DEBUG1, "\tLINE: %s\n", buf); i = -1; } diff --git a/mutt/file.c b/mutt/file.c index 01fdf066f..e2fd5bae3 100644 --- a/mutt/file.c +++ b/mutt/file.c @@ -386,14 +386,14 @@ int mutt_file_safe_rename(const char *src, const char *target) #endif ) { - mutt_debug(LL_DEBUG1, "trying rename...\n"); + mutt_debug(LL_DEBUG1, "trying rename\n"); if (rename(src, target) == -1) { mutt_debug(LL_DEBUG1, "rename (%s, %s) failed: %s (%d)\n", src, target, strerror(errno), errno); return -1; } - mutt_debug(LL_DEBUG1, "rename succeeded.\n"); + mutt_debug(LL_DEBUG1, "rename succeeded\n"); return 0; } @@ -424,7 +424,7 @@ int mutt_file_safe_rename(const char *src, const char *target) if (!compare_stat(&ssb, &tsb)) { - mutt_debug(LL_DEBUG1, "stat blocks for %s and %s diverge; pretending EEXIST.\n", src, target); + mutt_debug(LL_DEBUG1, "stat blocks for %s and %s diverge; pretending EEXIST\n", src, target); errno = EEXIST; return -1; } @@ -1078,7 +1078,7 @@ int mutt_file_lock(int fd, bool excl, bool timeout) while (fcntl(fd, F_SETLK, &lck) == -1) { - mutt_debug(LL_DEBUG1, "fcntl errno %d.\n", errno); + mutt_debug(LL_DEBUG1, "fcntl errno %d\n", errno); if ((errno != EAGAIN) && (errno != EACCES)) { mutt_perror("fcntl"); diff --git a/mutt_attach.c b/mutt_attach.c index c45c76959..37772dc4c 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -546,7 +546,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, /* interactive cmd */ int rv = mutt_system(cmd); if (rv == -1) - mutt_debug(LL_DEBUG1, "Error running \"%s\"!", cmd); + mutt_debug(LL_DEBUG1, "Error running \"%s\"", cmd); if ((rv != 0) || (entry->needsterminal && C_WaitKey)) mutt_any_key_to_continue(NULL); @@ -1025,7 +1025,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) char cmd[STR_COMMAND]; int piped = false; - mutt_debug(LL_DEBUG2, "Using mailcap...\n"); + mutt_debug(LL_DEBUG2, "Using mailcap\n"); struct Rfc1524MailcapEntry *entry = rfc1524_new_entry(); rfc1524_mailcap_lookup(a, type, entry, MUTT_MC_PRINT); @@ -1085,7 +1085,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) { int rc = mutt_system(cmd); if (rc == -1) - mutt_debug(LL_DEBUG1, "Error running \"%s\"!", cmd); + mutt_debug(LL_DEBUG1, "Error running \"%s\"", cmd); if ((rc != 0) || C_WaitKey) mutt_any_key_to_continue(NULL); @@ -1136,7 +1136,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a) goto bail0; } - mutt_debug(LL_DEBUG2, "Filter created.\n"); + mutt_debug(LL_DEBUG2, "Filter created\n"); mutt_file_copy_stream(fp_in, fp_out); diff --git a/mutt_header.c b/mutt_header.c index 9c388cb77..76475d418 100644 --- a/mutt_header.c +++ b/mutt_header.c @@ -217,7 +217,7 @@ void mutt_edit_headers(const char *editor, const char *body, struct Email *msg, stat(path, &st); if (mtime == st.st_mtime) { - mutt_debug(LL_DEBUG1, "temp file was not modified.\n"); + mutt_debug(LL_DEBUG1, "temp file was not modified\n"); /* the file has not changed! */ mutt_file_unlink(path); return; diff --git a/mutt_lua.c b/mutt_lua.c index 6e222ff08..d0121a940 100644 --- a/mutt_lua.c +++ b/mutt_lua.c @@ -54,7 +54,7 @@ static int handle_panic(lua_State *l) { mutt_debug(LL_DEBUG1, "lua runtime panic: %s\n", lua_tostring(l, -1)); - mutt_error("Lua runtime panic: %s\n", lua_tostring(l, -1)); + mutt_error("Lua runtime panic: %s", lua_tostring(l, -1)); lua_pop(l, 1); return -1; } @@ -67,7 +67,7 @@ static int handle_panic(lua_State *l) static int handle_error(lua_State *l) { mutt_debug(LL_DEBUG1, "lua runtime error: %s\n", lua_tostring(l, -1)); - mutt_error("Lua runtime error: %s\n", lua_tostring(l, -1)); + mutt_error("Lua runtime error: %s", lua_tostring(l, -1)); lua_pop(l, 1); return -1; } diff --git a/muttlib.c b/muttlib.c index b36197915..77f813b8f 100644 --- a/muttlib.c +++ b/muttlib.c @@ -554,7 +554,7 @@ void mutt_buffer_mktemp_full(struct Buffer *buf, const char *prefix, mutt_buffer_printf(buf, "%s/%s-%s-%d-%d-%ld%ld%s%s", NONULL(C_Tmpdir), NONULL(prefix), NONULL(C_Hostname), (int) getuid(), (int) getpid(), random(), random(), suffix ? "." : "", NONULL(suffix)); - mutt_debug(LL_DEBUG3, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, mutt_b2s(buf)); + mutt_debug(LL_DEBUG3, "%s:%d: mutt_mktemp returns \"%s\"\n", src, line, mutt_b2s(buf)); if (unlink(mutt_b2s(buf)) && (errno != ENOENT)) { mutt_debug(LL_DEBUG1, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, @@ -587,7 +587,7 @@ void mutt_mktemp_full(char *buf, size_t buflen, const char *prefix, "filename! buflen=%zu but need %zu\n", src, line, buflen, n); } - mutt_debug(LL_DEBUG3, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, buf); + mutt_debug(LL_DEBUG3, "%s:%d: mutt_mktemp returns \"%s\"\n", src, line, buf); if (unlink(buf) && (errno != ENOENT)) { mutt_debug(LL_DEBUG1, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, diff --git a/mx.c b/mx.c index 3b1b65be5..e343fa52b 100644 --- a/mx.c +++ b/mx.c @@ -935,7 +935,7 @@ struct Message *mx_msg_open_new(struct Mailbox *m, struct Email *e, MsgOpenFlags if (!m->mx_ops || !m->mx_ops->msg_open_new) { - mutt_debug(LL_DEBUG1, "function unimplemented for mailbox type %d.\n", m->magic); + mutt_debug(LL_DEBUG1, "function unimplemented for mailbox type %d\n", m->magic); return NULL; } @@ -1017,7 +1017,7 @@ struct Message *mx_msg_open(struct Mailbox *m, int msgno) if (!m->mx_ops || !m->mx_ops->msg_open) { - mutt_debug(LL_DEBUG1, "function not implemented for mailbox type %d.\n", m->magic); + mutt_debug(LL_DEBUG1, "function not implemented for mailbox type %d\n", m->magic); return NULL; } @@ -1247,8 +1247,7 @@ enum MailboxType mx_path_probe(const char *path, struct stat *st) if (stat(path, st) != 0) { - mutt_debug(LL_DEBUG1, "unable to stat %s: %s (errno %d).\n", path, - strerror(errno), errno); + mutt_debug(LL_DEBUG1, "unable to stat %s: %s (errno %d)\n", path, strerror(errno), errno); return MUTT_UNKNOWN; } diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 785a274d3..754a8457f 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -1052,7 +1052,7 @@ static gpgme_key_t *create_recipient_set(const char *keylist, gpgme_protocol_t p rset[rset_n++] = key; else { - mutt_error(_("error adding recipient '%s': %s\n"), buf, gpgme_strerror(err)); + mutt_error(_("error adding recipient '%s': %s"), buf, gpgme_strerror(err)); rset[rset_n] = NULL; free_recipient_set(&rset); gpgme_release(context); @@ -2042,7 +2042,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(LL_DEBUG1, "returning %d.\n", badsig); + mutt_debug(LL_DEBUG1, "returning %d\n", badsig); return badsig ? 1 : anywarn ? 2 : 0; } @@ -4837,7 +4837,7 @@ static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a, if (!keys) return NULL; - mutt_debug(5, "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) { @@ -4968,7 +4968,7 @@ static struct CryptKeyInfo *crypt_getkeybystr(char *p, KeyFlags abilities, (ps && (mutt_str_strcasecmp(ps, crypt_short_keyid(k)) == 0)) || mutt_str_stristr(k->uid, p)) { - mutt_debug(5, "match.\n"); + mutt_debug(5, "match\n"); struct CryptKeyInfo *tmp = crypt_copy_key(k); *matches_endp = tmp; @@ -4976,7 +4976,7 @@ static struct CryptKeyInfo *crypt_getkeybystr(char *p, KeyFlags abilities, } else { - mutt_debug(5, "no match.\n"); + mutt_debug(5, "no match\n"); } } diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index d63b80563..6c7728d19 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -263,11 +263,11 @@ static int pgp_copy_checksig(FILE *fp_in, FILE *fp_out) { if (regexec(C_PgpGoodSign->regex, line, 0, NULL, 0) == 0) { - mutt_debug(LL_DEBUG2, "\"%s\" matches regex.\n", line); + mutt_debug(LL_DEBUG2, "\"%s\" matches regex\n", line); rc = 0; } else - mutt_debug(LL_DEBUG2, "\"%s\" doesn't match regex.\n", line); + mutt_debug(LL_DEBUG2, "\"%s\" doesn't match regex\n", line); if (strncmp(line, "[GNUPG:] ", 9) == 0) continue; @@ -278,7 +278,7 @@ static int pgp_copy_checksig(FILE *fp_in, FILE *fp_out) } else { - mutt_debug(LL_DEBUG2, "No pattern.\n"); + mutt_debug(LL_DEBUG2, "No pattern\n"); mutt_file_copy_stream(fp_in, fp_out); rc = 1; } @@ -310,18 +310,18 @@ static int pgp_check_pgp_decryption_okay_regex(FILE *fp_in) { if (regexec(C_PgpDecryptionOkay->regex, line, 0, NULL, 0) == 0) { - mutt_debug(LL_DEBUG2, "\"%s\" matches regex.\n", line); + mutt_debug(LL_DEBUG2, "\"%s\" matches regex\n", line); rc = 0; break; } else - mutt_debug(LL_DEBUG2, "\"%s\" doesn't match regex.\n", line); + mutt_debug(LL_DEBUG2, "\"%s\" doesn't match regex\n", line); } FREE(&line); } else { - mutt_debug(LL_DEBUG2, "No pattern.\n"); + mutt_debug(LL_DEBUG2, "No pattern\n"); rc = 1; } @@ -365,7 +365,7 @@ static int pgp_check_decryption_okay(FILE *fp_in) if (plen == 0) continue; s = line + plen; - mutt_debug(LL_DEBUG2, "checking \"%s\".\n", line); + mutt_debug(LL_DEBUG2, "checking \"%s\"\n", line); if (mutt_str_startswith(s, "BEGIN_DECRYPTION", CASE_MATCH)) inside_decrypt = 1; else if (mutt_str_startswith(s, "END_DECRYPTION", CASE_MATCH)) @@ -375,14 +375,14 @@ static int pgp_check_decryption_okay(FILE *fp_in) if (!inside_decrypt) { mutt_debug(LL_DEBUG2, - "\tPLAINTEXT encountered outside of DECRYPTION.\n"); + "\tPLAINTEXT encountered outside of DECRYPTION\n"); rc = -2; break; } } else if (mutt_str_startswith(s, "DECRYPTION_FAILED", CASE_MATCH)) { - mutt_debug(LL_DEBUG2, "\tDECRYPTION_FAILED encountered. Failure.\n"); + mutt_debug(LL_DEBUG2, "\tDECRYPTION_FAILED encountered. Failure\n"); rc = -3; break; } @@ -390,7 +390,7 @@ static int pgp_check_decryption_okay(FILE *fp_in) { /* Don't break out because we still have to check for * PLAINTEXT outside of the decryption boundaries. */ - mutt_debug(LL_DEBUG2, "\tDECRYPTION_OKAY encountered.\n"); + mutt_debug(LL_DEBUG2, "\tDECRYPTION_OKAY encountered\n"); rc = 0; } } @@ -917,7 +917,7 @@ int pgp_class_verify_one(struct Body *sigbdy, struct State *s, const char *tempf if (rv) badsig = -1; - mutt_debug(LL_DEBUG1, "mutt_wait_filter returned %d.\n", rv); + mutt_debug(LL_DEBUG1, "mutt_wait_filter returned %d\n", rv); } mutt_file_fclose(&fp_pgp_err); @@ -926,7 +926,7 @@ int pgp_class_verify_one(struct Body *sigbdy, struct State *s, const char *tempf mutt_file_unlink(sigfile); - mutt_debug(LL_DEBUG1, "returning %d.\n", badsig); + mutt_debug(LL_DEBUG1, "returning %d\n", badsig); return badsig; } diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index 95fabc9fa..0120bcfe6 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -414,7 +414,7 @@ void pgp_class_invoke_import(const char *fname) mutt_pgp_command(cmd, sizeof(cmd), &cctx, C_PgpImportCommand); if (mutt_system(cmd) != 0) - mutt_debug(LL_DEBUG1, "Error running \"%s\"!", cmd); + mutt_debug(LL_DEBUG1, "Error running \"%s\"", cmd); } /** @@ -454,7 +454,7 @@ void pgp_class_invoke_getkeys(struct Address *addr) mutt_message(_("Fetching PGP key...")); if (mutt_system(cmd) != 0) - mutt_debug(LL_DEBUG1, "Error running \"%s\"!", cmd); + mutt_debug(LL_DEBUG1, "Error running \"%s\"", cmd); if (!isendwin()) mutt_clear_error(); diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 40748d96d..f5924676a 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -1013,7 +1013,7 @@ struct PgpKeyInfo *pgp_getkeybyaddr(struct Address *a, KeyFlags abilities, if (!keys) return NULL; - mutt_debug(5, "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) { diff --git a/ncrypt/pgpmicalg.c b/ncrypt/pgpmicalg.c index 2985baed8..a6b126578 100644 --- a/ncrypt/pgpmicalg.c +++ b/ncrypt/pgpmicalg.c @@ -88,7 +88,7 @@ static void pgp_dearmor(FILE *fp_in, FILE *fp_out) } if (!r) { - mutt_debug(LL_DEBUG1, "Can't find begin of ASCII armor.\n"); + mutt_debug(LL_DEBUG1, "Can't find begin of ASCII armor\n"); return; } @@ -102,7 +102,7 @@ static void pgp_dearmor(FILE *fp_in, FILE *fp_out) } if (!r) { - mutt_debug(LL_DEBUG1, "Armor header doesn't end.\n"); + mutt_debug(LL_DEBUG1, "Armor header doesn't end\n"); return; } @@ -120,7 +120,7 @@ static void pgp_dearmor(FILE *fp_in, FILE *fp_out) } if (!r) { - mutt_debug(LL_DEBUG1, "Can't find end of ASCII armor.\n"); + mutt_debug(LL_DEBUG1, "Can't find end of ASCII armor\n"); return; } @@ -133,7 +133,7 @@ static void pgp_dearmor(FILE *fp_in, FILE *fp_out) if (fseeko(fp_in, start, SEEK_SET) == -1) { - mutt_debug(LL_DEBUG1, "Can't seekto start.\n"); + mutt_debug(LL_DEBUG1, "Can't seekto start\n"); return; } @@ -151,7 +151,7 @@ static short pgp_mic_from_packet(unsigned char *p, size_t len) /* is signature? */ if ((p[0] & 0x3f) != PT_SIG) { - mutt_debug(LL_DEBUG1, "tag = %d, want %d.\n", p[0] & 0x3f, PT_SIG); + mutt_debug(LL_DEBUG1, "tag = %d, want %d\n", p[0] & 0x3f, PT_SIG); return -1; } @@ -167,7 +167,7 @@ static short pgp_mic_from_packet(unsigned char *p, size_t len) } else { - mutt_debug(LL_DEBUG1, "Bad signature packet.\n"); + mutt_debug(LL_DEBUG1, "Bad signature packet\n"); return -1; } } @@ -206,7 +206,7 @@ static short pgp_find_hash(const char *fname) } else { - mutt_debug(LL_DEBUG1, "No packet.\n"); + mutt_debug(LL_DEBUG1, "No packet\n"); } bye: diff --git a/nntp/nntp.c b/nntp/nntp.c index 3f51f86e6..3d8ee66f7 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -639,7 +639,7 @@ static int nntp_auth(struct NntpAccountData *adata) if (mutt_sasl_client_new(conn, &saslconn) < 0) { - mutt_debug(LL_DEBUG1, "error allocating SASL connection.\n"); + mutt_debug(LL_DEBUG1, "error allocating SASL connection\n"); continue; } @@ -655,7 +655,7 @@ static int nntp_auth(struct NntpAccountData *adata) { sasl_dispose(&saslconn); mutt_debug(LL_DEBUG1, - "error starting SASL authentication exchange.\n"); + "error starting SASL authentication exchange\n"); continue; } @@ -675,7 +675,7 @@ static int nntp_auth(struct NntpAccountData *adata) if (sasl_encode64(client_out, client_len, buf + len, sizeof(buf) - len, &len) != SASL_OK) { - mutt_debug(LL_DEBUG1, "error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "error base64-encoding client response\n"); break; } } @@ -708,7 +708,7 @@ static int nntp_auth(struct NntpAccountData *adata) else if (sasl_decode64(inbuf + 4, strlen(inbuf + 4), buf, sizeof(buf) - 1, &len) != SASL_OK) { - mutt_debug(LL_DEBUG1, "error base64-decoding server response.\n"); + mutt_debug(LL_DEBUG1, "error base64-decoding server response\n"); break; } else diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index d6b0a441e..d85fb4ec5 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -2376,7 +2376,7 @@ static int nm_mbox_sync(struct Mailbox *m, int *index_hint) bool changed = false; char msgbuf[PATH_MAX + 64]; - mutt_debug(LL_DEBUG1, "nm: sync start ...\n"); + mutt_debug(LL_DEBUG1, "nm: sync start\n"); if (!m->quiet) { diff --git a/pager.c b/pager.c index 9dc14bf77..af3b11b89 100644 --- a/pager.c +++ b/pager.c @@ -1339,7 +1339,7 @@ static int fill_buffer(FILE *fp, LOFF_T *last_pos, LOFF_T offset, unsigned char ((check_attachment_marker((char *) p) == 0) || (check_protected_header_marker((char *) p) == 0))) { - mutt_debug(LL_DEBUG2, "Seen attachment marker.\n"); + mutt_debug(LL_DEBUG2, "Seen attachment marker\n"); while (*p++ != '\a') /* skip pseudo-ANSI sequence */ ; } @@ -1410,7 +1410,7 @@ static int format_line(struct Line **line_info, int n, unsigned char *buf, { if (k == (size_t)(-1)) memset(&mbstate, 0, sizeof(mbstate)); - mutt_debug(LL_DEBUG1, "mbrtowc returned %lu; errno = %d.\n", k, errno); + mutt_debug(LL_DEBUG1, "mbrtowc returned %lu; errno = %d\n", k, errno); if (col + 4 > wrap_cols) break; col += 4; diff --git a/pop/pop_auth.c b/pop/pop_auth.c index 6dd250593..7e9a47155 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -69,7 +69,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopAccountData *adata, const char *m if (mutt_sasl_client_new(adata->conn, &saslconn) < 0) { - mutt_debug(LL_DEBUG1, "Error allocating SASL connection.\n"); + mutt_debug(LL_DEBUG1, "Error allocating SASL connection\n"); return POP_A_FAILURE; } @@ -131,7 +131,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopAccountData *adata, const char *m if (mutt_str_startswith(inbuf, "+ ", CASE_MATCH) && (sasl_decode64(inbuf + 2, strlen(inbuf + 2), buf, bufsize - 1, &len) != SASL_OK)) { - mutt_debug(LL_DEBUG1, "error base64-decoding server response.\n"); + mutt_debug(LL_DEBUG1, "error base64-decoding server response\n"); goto bail; } @@ -166,7 +166,7 @@ static enum PopAuthRes pop_auth_sasl(struct PopAccountData *adata, const char *m } if (sasl_encode64(pc, olen, buf, bufsize, &olen) != SASL_OK) { - mutt_debug(LL_DEBUG1, "error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "error base64-encoding client response\n"); goto bail; } } @@ -470,7 +470,7 @@ int pop_authenticate(struct PopAccountData *adata) else { /* Fall back to default: any authenticator */ - mutt_debug(LL_DEBUG2, "Using any available method.\n"); + mutt_debug(LL_DEBUG2, "Using any available method\n"); authenticator = pop_authenticators; while (authenticator->authenticate) diff --git a/postpone.c b/postpone.c index 9dd3d8ee7..4ced1bc1e 100644 --- a/postpone.c +++ b/postpone.c @@ -125,10 +125,10 @@ int mutt_num_postponed(struct Mailbox *m, bool force) if (newpc >= 0) { PostCount = newpc; - mutt_debug(LL_DEBUG3, "%d postponed IMAP messages found.\n", PostCount); + mutt_debug(LL_DEBUG3, "%d postponed IMAP messages found\n", PostCount); } else - mutt_debug(LL_DEBUG3, "using old IMAP postponed count.\n"); + mutt_debug(LL_DEBUG3, "using old IMAP postponed count\n"); } return PostCount; } diff --git a/sendlib.c b/sendlib.c index 14b00d5c1..752ef940a 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1006,7 +1006,7 @@ struct Content *mutt_get_content_info(const char *fname, struct Body *b) fp = fopen(fname, "r"); if (!fp) { - mutt_debug(LL_DEBUG1, "%s: %s (errno %d).\n", fname, strerror(errno), errno); + mutt_debug(LL_DEBUG1, "%s: %s (errno %d)\n", fname, strerror(errno), errno); return NULL; } @@ -1104,7 +1104,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(LL_DEBUG1, "Internal error, count = %d.\n", count); + mutt_debug(LL_DEBUG1, "Internal error, count = %d\n", count); goto bye; /* shouldn't happen */ } @@ -3149,7 +3149,7 @@ int mutt_write_fcc(const char *path, struct Email *e, const char *msgid, struct Context *ctx_fcc = mx_mbox_open(m_fcc, MUTT_APPEND | MUTT_QUIET); if (!ctx_fcc) { - mutt_debug(LL_DEBUG1, "unable to open mailbox %s in append-mode, aborting.\n", path); + mutt_debug(LL_DEBUG1, "unable to open mailbox %s in append-mode, aborting\n", path); mailbox_free(&m_fcc); goto done; } @@ -3288,7 +3288,7 @@ int mutt_write_fcc(const char *path, struct Email *e, const char *msgid, fflush(fp_tmp); if (ferror(fp_tmp)) { - mutt_debug(LL_DEBUG1, "%s: write failed.\n", tempfile); + mutt_debug(LL_DEBUG1, "%s: write failed\n", tempfile); mutt_file_fclose(&fp_tmp); unlink(tempfile); mx_msg_commit(ctx_fcc->mailbox, msg); /* XXX really? */ diff --git a/smtp.c b/smtp.c index 329fdeb5d..6b35be232 100644 --- a/smtp.c +++ b/smtp.c @@ -444,7 +444,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(LL_DEBUG1, "#1 error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "#1 error base64-encoding client response\n"); goto fail; } } @@ -465,7 +465,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(LL_DEBUG1, "error base64-decoding server response.\n"); + mutt_debug(LL_DEBUG1, "error base64-decoding server response\n"); goto fail; } @@ -485,7 +485,7 @@ static int smtp_auth_sasl(struct Connection *conn, const char *mechlist) } if (sasl_encode64(data, len, buf, bufsize, &len) != SASL_OK) { - mutt_debug(LL_DEBUG1, "#2 error base64-encoding client response.\n"); + mutt_debug(LL_DEBUG1, "#2 error base64-encoding client response\n"); goto fail; } } -- 2.40.0