]> granicus.if.org Git - neomutt/commitdiff
Align numeric log level arguments
authorIan Zimmerman <itz@no-use.mooo.com>
Fri, 8 Feb 2019 17:34:39 +0000 (09:34 -0800)
committerRichard Russon <rich@flatcap.org>
Wed, 20 Feb 2019 13:09:39 +0000 (13:09 +0000)
18 files changed:
browser.c
email/from.c
imap/command.c
imap/util.c
index.c
init.c
maildir/shared.c
monitor.c
mutt_parse.c
muttlib.c
ncrypt/crypt_gpgme.c
ncrypt/gnupgparse.c
ncrypt/pgp.c
ncrypt/pgpkey.c
nntp/newsrc.c
progress.c
rfc3676.c
sendlib.c

index 1fe0bb6c6416d9c2ce8574232cc621ef6d405125..36e427fc92e880cf7a5d070513ee756ddb7593c6 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1827,7 +1827,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
           /* When in mailboxes mode, disables this feature */
           if (Folder)
           {
-            mutt_debug(5, "= hit! Folder: %s, LastDir: %s\n", Folder, LastDir);
+            mutt_debug(3, "= hit! Folder: %s, LastDir: %s\n", Folder, LastDir);
             if (GotoSwapper[0] == '\0')
             {
               if (mutt_str_strcmp(LastDir, Folder) != 0)
index dc9b12b4e50a24907198008d6ff393cab11674b2..1cd44f32681ae7ae1b95b8c357f4b71be5907b88 100644 (file)
@@ -61,7 +61,7 @@ bool is_from(const char *s, char *path, size_t pathlen, time_t *tp)
   if (!*s)
     return false;
 
-  mutt_debug(3, "\nis_from(): parsing: %s\n", s);
+  mutt_debug(5, "\nis_from(): parsing: %s\n", s);
 
   if (!mutt_date_is_day_name(s))
   {
@@ -106,7 +106,7 @@ bool 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, "got return path: %s\n", path);
+      mutt_debug(5, "got return path: %s\n", path);
     }
 
     s = p + 1;
index a642b444be6148f048b183b0280b5a346cb487ca..675dbaed05cde37b755a186a6342d747156b8425 100644 (file)
@@ -539,7 +539,7 @@ static void cmd_parse_capability(struct ImapAccountData *adata, char *s)
       if (mutt_str_word_casecmp(Capabilities[i], s) == 0)
       {
         adata->capabilities |= (1 << i);
-        mutt_debug(4, " Found capability \"%s\": %d\n", Capabilities[i], i);
+        mutt_debug(3, " Found capability \"%s\": %d\n", Capabilities[i], i);
         break;
       }
     }
index 6550645ef6388406fd5eeaa1d76bac91c30b805c..b5f51958f73722dcd819da0305adc743c11a7114 100644 (file)
@@ -540,7 +540,7 @@ int imap_hcache_store_uid_seqset(struct ImapMboxData *mdata)
     b->data[0] = '\0';
 
   int rc = mutt_hcache_store_raw(mdata->hcache, "/UIDSEQSET", 10, b->data, seqset_size + 1);
-  mutt_debug(5, "Stored /UIDSEQSET %s\n", b->data);
+  mutt_debug(3, "Stored /UIDSEQSET %s\n", b->data);
   mutt_buffer_free(&b);
   return rc;
 }
@@ -573,7 +573,7 @@ char *imap_hcache_get_uid_seqset(struct ImapMboxData *mdata)
   char *hc_seqset = mutt_hcache_fetch_raw(mdata->hcache, "/UIDSEQSET", 10);
   char *seqset = mutt_str_strdup(hc_seqset);
   mutt_hcache_free(mdata->hcache, (void **) &hc_seqset);
-  mutt_debug(5, "Retrieved /UIDSEQSET %s\n", NONULL(seqset));
+  mutt_debug(3, "Retrieved /UIDSEQSET %s\n", NONULL(seqset));
 
   return seqset;
 }
diff --git a/index.c b/index.c
index c02675d33871a4ae5b2c7d015de05503ac860da1..b93a0bf443f4d661ddc2e4808b96b0b10d39157b 100644 (file)
--- a/index.c
+++ b/index.c
@@ -1224,7 +1224,7 @@ int mutt_index_menu(void)
 
       op = km_dokey(MENU_MAIN);
 
-      mutt_debug(4, "[%d]: Got op %d\n", __LINE__, op);
+      mutt_debug(3, "[%d]: Got op %d\n", __LINE__, op);
 
       /* either user abort or timeout */
       if (op < 0)
diff --git a/init.c b/init.c
index 50e26f385a3a410b6bba1198747b29d04f58fac8..40f367d69606bc5f60347ee5ae35c0fdd3150f99 100644 (file)
--- a/init.c
+++ b/init.c
@@ -521,7 +521,7 @@ static enum CommandResult parse_attach_list(struct Buffer *buf, struct Buffer *s
       return MUTT_CMD_ERROR;
     }
 
-    mutt_debug(5, "added %s/%s [%d]\n", a->major, a->minor, a->major_int);
+    mutt_debug(3, "added %s/%s [%d]\n", a->major, a->minor, a->major_int);
 
     mutt_list_insert_tail(head, (char *) a);
   } while (MoreArgs(s));
@@ -648,11 +648,11 @@ static enum CommandResult parse_unattach_list(struct Buffer *buf, struct Buffer
     STAILQ_FOREACH_SAFE(np, head, entries, tmp2)
     {
       a = (struct AttachMatch *) np->data;
-      mutt_debug(5, "check %s/%s [%d] : %s/%s [%d]\n", a->major, a->minor,
+      mutt_debug(3, "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, "removed %s/%s [%d]\n", a->major, a->minor, a->major_int);
+        mutt_debug(3, "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);
@@ -934,7 +934,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(3, "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);
 
@@ -954,9 +954,9 @@ static enum CommandResult parse_alias(struct Buffer *buf, struct Buffer *s,
     for (struct Address *a = tmp->addr; a && a->mailbox; a = a->next)
     {
       if (!a->group)
-        mutt_debug(3, "  %s\n", a->mailbox);
+        mutt_debug(5, "  %s\n", a->mailbox);
       else
-        mutt_debug(3, "  Group %s\n", a->mailbox);
+        mutt_debug(5, "  Group %s\n", a->mailbox);
     }
   }
   mutt_grouplist_destroy(&gc);
@@ -2128,7 +2128,7 @@ static enum CommandResult parse_subscribe_to(struct Buffer *buf, struct Buffer *
     }
     else
     {
-      mutt_debug(5, "Corrupted buffer");
+      mutt_debug(1, "Corrupted buffer");
       return MUTT_CMD_ERROR;
     }
   }
@@ -2582,7 +2582,7 @@ static enum CommandResult parse_unsubscribe_from(struct Buffer *buf, struct Buff
     }
     else
     {
-      mutt_debug(5, "Corrupted buffer");
+      mutt_debug(1, "Corrupted buffer");
       return MUTT_CMD_ERROR;
     }
   }
index dba0218b85609e59bce47cf805bf28d6d38328ff..78e75432ddfd0d7c9d83d8847f8445802133d59c 100644 (file)
@@ -668,7 +668,7 @@ static void mh_sort_natural(struct Mailbox *m, struct Maildir **md)
 {
   if (!m || !md || !*md || (m->magic != MUTT_MH) || (Sort != SORT_ORDER))
     return;
-  mutt_debug(4, "maildir: sorting %s into natural order\n", m->path);
+  mutt_debug(3, "maildir: sorting %s into natural order\n", m->path);
   *md = maildir_sort(*md, (size_t) -1, md_cmp_path);
 }
 
@@ -733,7 +733,7 @@ void maildir_delayed_parsing(struct Mailbox *m, struct Maildir **md, struct Prog
 
     if (!sort)
     {
-      mutt_debug(4, "maildir: need to sort %s by inode\n", m->path);
+      mutt_debug(3, "maildir: need to sort %s by inode\n", m->path);
       p = maildir_sort(p, (size_t) -1, md_cmp_inode);
       if (!last)
         *md = p;
index 1034adfd740328aa96bcef444980384533f37a48..b082faa6739a5a2f130e9e1087b038ee4b3649a4 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -409,7 +409,7 @@ int mutt_monitor_poll(void)
               while (ptr < (buf + len))
               {
                 event = (const struct inotify_event *) ptr;
-                mutt_debug(5, "+ detail: descriptor=%d mask=0x%x\n", event->wd,
+                mutt_debug(3, "+ detail: descriptor=%d mask=0x%x\n", event->wd,
                            event->mask);
                 if (event->mask & IN_IGNORED)
                   monitor_handle_ignore(event->wd);
index cc130afce721b1db6b950bc3844f903d44e20686..87c839b0e980a3bb731ef8965f7aba49eac692ca 100644 (file)
@@ -93,17 +93,17 @@ 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, "%s %d/%s ?? %s/%s [%d]... ", dflt ? "[OK]   " : "[EXCL] ", b->type,
+    mutt_debug(3, "%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 == TYPE_ANY || a->major_int == b->type) &&
         (!b->subtype || !regexec(&a->minor_regex, b->subtype, 0, NULL, 0)))
     {
-      mutt_debug(5, "yes\n");
+      mutt_debug(3, "yes\n");
       return true;
     }
     else
     {
-      mutt_debug(5, "no\n");
+      mutt_debug(3, "no\n");
     }
   }
 
@@ -194,18 +194,18 @@ static int count_body_parts(struct Body *body, int flags)
       count++;
     bp->attach_qualifies = shallcount ? true : false;
 
-    mutt_debug(5, "%p shallcount = %d\n", (void *) bp, shallcount);
+    mutt_debug(3, "%p shallcount = %d\n", (void *) bp, shallcount);
 
     if (shallrecurse)
     {
-      mutt_debug(5, "%p pre count = %d\n", (void *) bp, count);
+      mutt_debug(3, "%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, "%p post count = %d\n", (void *) bp, count);
+      mutt_debug(3, "%p post count = %d\n", (void *) bp, count);
     }
   }
 
-  mutt_debug(5, "return %d\n", count < 0 ? 0 : count);
+  mutt_debug(3, "return %d\n", count < 0 ? 0 : count);
   return (count < 0) ? 0 : count;
 }
 
index ce5370eb1ab1bb5201c17ae834ead1025fac8599..aea69cb41c1b58a2206640eee81f79ba702ddf30 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -911,7 +911,7 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c
           buf[n] = 0;
           while ((n > 0) && (buf[n - 1] == '\n' || buf[n - 1] == '\r'))
             buf[--n] = '\0';
-          mutt_debug(3, "fmtpipe < %s\n", buf);
+          mutt_debug(5, "fmtpipe < %s\n", buf);
 
           /* If the result ends with '%', this indicates that the filter
            * generated %-tokens that neomutt can expand.  Eliminate the '%'
index f04a97ca3ab9c15835a640ead28194fc1d872452..54235b3ba2d4a7828ecc621191c3e8981e340066 100644 (file)
@@ -4875,7 +4875,7 @@ static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a,
 
     if (abilities && !(k->flags & abilities))
     {
-      mutt_debug(5, "  insufficient abilities: Has %x, want %x\n", k->flags, abilities);
+      mutt_debug(2, "  insufficient abilities: Has %x, want %x\n", k->flags, abilities);
       continue;
     }
 
index fb70e6f58ae310df0876f23d0bc931135fd4f878..01a50391d72a00689a6c65800ace488388dc8a00 100644 (file)
@@ -398,7 +398,7 @@ static struct PgpKeyInfo *parse_pub_line(char *buf, int *is_subkey, struct PgpKe
   return k;
 
 bail:
-  mutt_debug(5, "invalid number: '%s'\n", p);
+  mutt_debug(1, "invalid number: '%s'\n", p);
   return NULL;
 }
 
index a5ddce897f188ab52db6a60916a41cc08f6969b2..f2ae2a6a2650d652bcdca9b5447e36967c37ee6f 100644 (file)
@@ -698,7 +698,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s)
         int ch;
         char *expected_charset = gpgcharset && *gpgcharset ? gpgcharset : "utf-8";
 
-        mutt_debug(4, "pgp: recoding inline from [%s] to [%s]\n", expected_charset, Charset);
+        mutt_debug(3, "pgp: recoding inline from [%s] to [%s]\n", expected_charset, Charset);
 
         rewind(pgpout);
         state_set_prefix(s);
index eaaf638730bb5076a84b474ed97261534fba59fb..4118ab40d58bc69ab3620de7e7fd693fb18dbb55 100644 (file)
@@ -1027,7 +1027,7 @@ struct PgpKeyInfo *pgp_getkeybyaddr(struct Address *a, short abilities,
 
     if (abilities && !(k->flags & abilities))
     {
-      mutt_debug(5, "  insufficient abilities: Has %x, want %x\n", k->flags, abilities);
+      mutt_debug(3, "  insufficient abilities: Has %x, want %x\n", k->flags, abilities);
       continue;
     }
 
index 95bccfeaab49907911f5f1381517a975d2b007de..a9987c7806aea0d8299790ea5b9e52c861abb68a 100644 (file)
@@ -584,7 +584,7 @@ int nntp_add_group(char *line, void *data)
   if (sscanf(line, "%1023s " ANUM " " ANUM " %c %8191[^\n]", group, &last,
              &first, &mod, desc) < 4)
   {
-    mutt_debug(4, "Cannot parse server line: %s\n", line);
+    mutt_debug(2, "Cannot parse server line: %s\n", line);
     return 0;
   }
 
index 1dc91737e8a51654844302f3d87e3d117c128b3b..e6f7a20cd41660e086368a55107f940c545b1cfc 100644 (file)
@@ -211,7 +211,7 @@ void mutt_progress_update(struct Progress *progress, long pos, int percent)
     else
       snprintf(posstr, sizeof(posstr), "%ld", pos);
 
-    mutt_debug(5, "updating progress: %s\n", posstr);
+    mutt_debug(4, "updating progress: %s\n", posstr);
 
     progress->pos = pos;
     if (now)
index ff61aad9bff6ad3dda0f89a1c49441ef2bd5b60d..a97623096ed1756c9b5de505a1712813e5ffb44a 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
@@ -241,17 +241,17 @@ static void print_flowed_line(char *line, struct State *s, int ql,
   width = quote_width(s, ql);
   last = line[mutt_str_strlen(line) - 1];
 
-  mutt_debug(4, "f=f: line [%s], width = %ld, spaces = %lu\n", line,
+  mutt_debug(5, "f=f: line [%s], width = %ld, spaces = %lu\n", line,
              (long) width, fst->spaces);
 
   for (words = 0; (p = strsep(&line, " "));)
   {
-    mutt_debug(4, "f=f: word [%s], width: %lu, remaining = [%s]\n", p, fst->width, line);
+    mutt_debug(5, "f=f: word [%s], width: %lu, remaining = [%s]\n", p, fst->width, line);
 
     /* remember number of spaces */
     if (!*p)
     {
-      mutt_debug(4, "f=f: additional space\n");
+      mutt_debug(3, "f=f: additional space\n");
       fst->spaces++;
       continue;
     }
@@ -268,7 +268,7 @@ static void print_flowed_line(char *line, struct State *s, int ql,
     if (!(!fst->spaces && fst->delsp && last != ' ') && w < width &&
         w + fst->width + fst->spaces > width)
     {
-      mutt_debug(4, "f=f: break line at %lu, %lu spaces left\n", fst->width, fst->spaces);
+      mutt_debug(3, "f=f: break line at %lu, %lu spaces left\n", fst->width, fst->spaces);
       /* only honor trailing spaces for format=flowed replies */
       if (TextFlowed)
         for (; fst->spaces; fst->spaces--)
@@ -331,7 +331,7 @@ int rfc3676_handler(struct Body *a, struct State *s)
     fst.delsp = 1;
   }
 
-  mutt_debug(4, "f=f: DelSp: %s\n", delsp ? "yes" : "no");
+  mutt_debug(3, "f=f: DelSp: %s\n", delsp ? "yes" : "no");
 
   while ((buf = mutt_file_read_line(buf, &sz, s->fpin, NULL, 0)))
   {
@@ -435,7 +435,7 @@ void rfc3676_space_stuff(struct Email *e)
         c = buf[len - 1];
         buf[len - 1] = '\0';
       }
-      mutt_debug(4, "f=f: line %d needs space-stuffing: '%s'\n", lc, buf);
+      mutt_debug(5, "f=f: line %d needs space-stuffing: '%s'\n", lc, buf);
       if (len > 0)
         buf[len - 1] = c;
     }
index 5d5ed5a898896054a4e63c67efd1587cfcb61ba9..0d57dfd2787b440709d74ea7ee1e49742a6374b6 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1884,7 +1884,7 @@ static int fold_one_header(FILE *fp, const char *tag, const char *value,
   int first = 1, col = 0, l = 0;
   const bool display = (flags & CH_DISPLAY);
 
-  mutt_debug(4, "pfx=[%s], tag=[%s], flags=%d value=[%s]\n", pfx, tag, flags, NONULL(value));
+  mutt_debug(5, "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;
@@ -2027,7 +2027,7 @@ 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, "buf[%s%s] short enough, max width = %d <= %d\n", NONULL(pfx),
+    mutt_debug(5, "buf[%s%s] short enough, max width = %d <= %d\n", NONULL(pfx),
                valbuf, max, wraplen);
     if (pfx && *pfx)
     {
@@ -2079,7 +2079,7 @@ 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, "buf[%s%s] too long, max width = %d > %d\n", NONULL(pfx),
+    mutt_debug(2, "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)
     {
@@ -2135,7 +2135,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, "buf[%s%s: %s] is short enough\n", NONULL(pfx), tag, v);
+      mutt_debug(5, "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;