]> granicus.if.org Git - neomutt/commitdiff
clang-format
authorRichard Russon <rich@flatcap.org>
Wed, 6 Sep 2017 18:40:12 +0000 (19:40 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 7 Sep 2017 00:40:33 +0000 (01:40 +0100)
111 files changed:
.clang-format
account.c
addrbook.c
alias.c
attach.c
bcache.c
body.c
browser.c
buffy.c
charset.c
color.c
commands.c
complete.c
compose.c
compress.c
copy.c
curs_lib.c
curs_main.c
edit.c
editmsg.c
enter.c
envelope.c
flags.c
from.c
group.c
handler.c
hcache/bdb.c
hcache/gdbm.c
hcache/hcache.c
hcache/kc.c
hcache/lmdb.c
hcache/qdbm.c
hcache/tc.c
hdrline.c
headers.c
help.c
history.c
hook.c
imap/auth.c
imap/auth_anon.c
imap/auth_cram.c
imap/auth_gss.c
imap/auth_login.c
imap/auth_plain.c
imap/auth_sasl.c
imap/browse.c
imap/command.c
imap/imap.c
imap/message.c
imap/utf7.c
imap/util.c
init.c
init.h
keymap.c
lib/mapping.c
main.c
mbox.c
mbyte.c
menu.c
mh.c
mutt_idna.c
mutt_lua.c
mutt_notmuch.c
mutt_sasl.c
mutt_sasl_plain.c
mutt_ssl.c
mutt_ssl_gnutls.c
mutt_tunnel.c
muttlib.c
mx.c
ncrypt/crypt.c
ncrypt/crypt_gpgme.c
ncrypt/crypt_mod.c
ncrypt/cryptglue.c
ncrypt/gnupgparse.c
ncrypt/pgp.c
ncrypt/pgpinvoke.c
ncrypt/pgpkey.c
ncrypt/pgplib.c
ncrypt/pgpmicalg.c
ncrypt/smime.c
newsrc.c
nntp.c
pager.c
parameter.c
parse.c
pattern.c
pop.c
pop_auth.c
pop_lib.c
postpone.c
query.c
recvattach.c
recvcmd.c
remailer.c
rfc1524.c
rfc2047.c
rfc2231.c
rfc3676.c
rfc822.c
score.c
send.c
sendlib.c
sidebar.c
signal.c
smtp.c
sort.c
state.c
status.c
thread.c
url.c

index 46d57ff5ab00774ae0888b781d77b0b607e21aeb..a1e7be2a82e1d8ce5da88b3410aba690279c2af0 100644 (file)
@@ -8,15 +8,17 @@ ColumnLimit:       80
 BreakBeforeBraces: Allman
 
 IncludeCategories:
-  - Regex:      '"config.h"'
+  - Regex:      '"config\.h"'
     Priority:   -10
-  - Regex:      '<stddef.h>'
-    Priority:   -5
+  - Regex:      '<stddef\.h>'
+    Priority:   -8
   - Regex:      '<.*>'
+    Priority:   -7
+  - Regex:      '".*_private\.h"'
+    Priority:   -6
+  - Regex:      '"lib/.*\.h"'
     Priority:   -4
-  - Regex:      '".*_private.h"'
-    Priority:   -3
-  - Regex:      '"mutt.h"'
+  - Regex:      '"mutt\.h"'
     Priority:   -2
   # Main Header 0
   - Regex:      '".*"'
index c8fc17bb53cd893551f0d7778b7e54594bba96a9..ed82ed7fbabaa8afc3349019e00f85bb36dedddc 100644 (file)
--- a/account.c
+++ b/account.c
 #include "config.h"
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "options.h"
 #include "protos.h"
 #include "url.h"
index dc3d56c42cc3d6ce5ac27483c2f94df20e19a443..3723ac8bd36983c071d5d15030952beb6e5ff64e 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include "lib/lib.h"
+#include "mutt.h"
 #include "address.h"
 #include "alias.h"
 #include "format_flags.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
-#include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "opcodes.h"
@@ -86,8 +86,8 @@ static const char *alias_format_str(char *dest, size_t destlen, size_t col, int
 static void alias_entry(char *s, size_t slen, struct Menu *m, int num)
 {
   mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(AliasFormat), alias_format_str,
-                    (unsigned long) ((struct Alias **) m->data)[num],
-                    MUTT_FORMAT_ARROWCURSOR);
+                      (unsigned long) ((struct Alias **) m->data)[num],
+                      MUTT_FORMAT_ARROWCURSOR);
 }
 
 static int alias_tag(struct Menu *menu, int n, int m)
diff --git a/alias.c b/alias.c
index 5d42ae537a487bc9e014cf354fbeeb2d8d38e00f..b9f1415c80f2462e4249a2942f0a64db078c6864 100644 (file)
--- a/alias.c
+++ b/alias.c
 #include <string.h>
 #include <wchar.h>
 #include <wctype.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "alias.h"
 #include "address.h"
+#include "alias.h"
 #include "charset.h"
 #include "envelope.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
@@ -647,7 +647,8 @@ bool mutt_addr_is_user(struct Address *addr)
   }
   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, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox,
+               Username, ShortHostname);
     return true;
   }
   fqdn = mutt_fqdn(0);
index a76c73af09a5f622b8365117907421fc2d000806..faef0b1db49b71d50a73fb85e742421acf05015c 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "attach.h"
 #include "body.h"
@@ -36,7 +37,6 @@
 #include "filter.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
@@ -1091,7 +1091,7 @@ int mutt_print_attachment(FILE *fp, struct Body *a)
         mutt_any_key_to_continue(NULL);
       rc = 1;
     }
-bail0:
+  bail0:
     safe_fclose(&ifp);
     safe_fclose(&fpout);
     mutt_unlink(newfile);
index 51029c971bc27374a4e171b1934eba8cd755d7ab..2699c82064c5baa049c6f9c162dad431388d8b80 100644 (file)
--- a/bcache.c
+++ b/bcache.c
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "bcache.h"
 #include "account.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "protos.h"
 #include "url.h"
 
diff --git a/body.c b/body.c
index 4551735ea3b570d1ca2c00bef3f9deb465fccd46..8e0941217abcda4e93251e296fb8f8df30dcb43d 100644 (file)
--- a/body.c
+++ b/body.c
 #include <limits.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/debug.h"
+#include "lib/memory.h"
+#include "lib/string2.h"
 #include "body.h"
 #include "header.h"
 #include "mime.h"
 #include "parameter.h"
 #include "protos.h"
-#include "lib/debug.h"
-#include "lib/memory.h"
-#include "lib/string2.h"
 
 struct Body *mutt_new_body(void)
 {
@@ -160,4 +160,3 @@ void mutt_free_body(struct Body **p)
 
   *p = 0;
 }
-
index 750ea90f2830dd1b2fd3d336ee27538f602350e5..fa01c9c38fa8b7e2e5c00361ff758ee49d190581 100644 (file)
--- a/browser.c
+++ b/browser.c
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "browser.h"
 #include "account.h"
 #include "attach.h"
 #include "body.h"
+#include "browser.h"
 #include "buffy.h"
 #include "charset.h"
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
@@ -538,10 +538,10 @@ static const char *newsgroup_format_str(char *dest, size_t destlen, size_t col,
       {
         if (folder->ff->nd->unread != 0)
           mutt_expando_format(dest, destlen, col, cols, ifstring,
-                            newsgroup_format_str, data, flags);
+                              newsgroup_format_str, data, flags);
         else
           mutt_expando_format(dest, destlen, col, cols, elsestring,
-                            newsgroup_format_str, data, flags);
+                              newsgroup_format_str, data, flags);
       }
       else if (Context && Context->data == folder->ff->nd)
       {
@@ -902,12 +902,13 @@ static void folder_entry(char *s, size_t slen, struct Menu *menu, int num)
 
 #ifdef USE_NNTP
   if (option(OPT_NEWS))
-    mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(GroupIndexFormat), newsgroup_format_str,
-                      (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+    mutt_expando_format(s, slen, 0, MuttIndexWindow->cols,
+                        NONULL(GroupIndexFormat), newsgroup_format_str,
+                        (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
   else
 #endif
     mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(FolderFormat),
-                      folder_format_str, (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+                        folder_format_str, (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
 }
 
 #ifdef USE_NOTMUCH
@@ -919,7 +920,7 @@ static void vfolder_entry(char *s, size_t slen, struct Menu *menu, int num)
   folder.num = num;
 
   mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(VfolderFormat),
-                    folder_format_str, (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+                      folder_format_str, (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
 }
 #endif
 
@@ -1307,7 +1308,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
 #ifdef USE_NNTP
                                  option(OPT_NEWS) ? FolderNewsHelp :
 #endif
-                                                   FolderHelp);
+                                                    FolderHelp);
   mutt_push_current_menu(menu);
 
   init_menu(&state, menu, title, sizeof(title), buffy);
diff --git a/buffy.c b/buffy.c
index 4a4b0be6edff40217de6df4cb4674539dcd75d3a..f894929a0d1319a899833a159868105c9dc2164d 100644 (file)
--- a/buffy.c
+++ b/buffy.c
 #include <string.h>
 #include <sys/stat.h>
 #include <utime.h>
+#include "lib/lib.h"
+#include "mutt.h"
 #include "buffy.h"
 #include "context.h"
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
-#include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mx.h"
index 0a2d9a617abc104a0229efe3841d677a624af05f..5f4adc8711a733117b5d9bfe6c32b0c2991ea544 100644 (file)
--- a/charset.c
+++ b/charset.c
 #include <limits.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "charset.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "protos.h"
 
 #ifndef EILSEQ
diff --git a/color.c b/color.c
index a3b6f18afc752dbaeb9dc419083e2bec5d348a46..f9baf4ce72a10c04c81a55bdde8d904a4a55f54a 100644 (file)
--- a/color.c
+++ b/color.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "context.h"
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
@@ -408,7 +408,8 @@ static int parse_color_name(const char *s, int *col, int *attr, int is_fg, struc
   {
     s += 5;
     *col = strtol(s, &eptr, 10);
-    if (!*s || *eptr || *col < 0 || (*col >= COLORS && !option(OPT_NO_CURSES) && has_colors()))
+    if (!*s || *eptr || *col < 0 ||
+        (*col >= COLORS && !option(OPT_NO_CURSES) && has_colors()))
     {
       snprintf(err->data, err->dsize, _("%s: color not supported by term"), s);
       return -1;
@@ -878,9 +879,9 @@ static int _mutt_parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer
 #ifdef HAVE_USE_DEFAULT_COLORS
   if (!option(OPT_NO_CURSES) && has_colors()
       /* delay use_default_colors() until needed, since it initializes things */
-      && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT || object == MT_COLOR_TREE)
-      && use_default_colors() != OK)
-      /* the case of the tree object is special, because a non-default
+      && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT || object == MT_COLOR_TREE) &&
+      use_default_colors() != OK)
+  /* the case of the tree object is special, because a non-default
        * fg color of the tree element may be combined dynamically with
        * the default bg color of an index line, not necessarily defined in
        * a rc file.
index 981eb21a4d8c0c14587efaa218a3a4d57b006ccd..4063b6b64004434bd9a102a3037f027d3f7e489c 100644 (file)
@@ -34,6 +34,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "body.h"
@@ -46,7 +47,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -985,8 +985,7 @@ int mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp)
 
   snprintf(tmp, sizeof(tmp), "%s/%s", TYPE(b), NONULL(b->subtype));
   type_changed = mutt_strcasecmp(tmp, obuf);
-  charset_changed =
-      mutt_strcasecmp(charset, mutt_get_parameter("charset", b->parameter));
+  charset_changed = mutt_strcasecmp(charset, mutt_get_parameter("charset", b->parameter));
 
   /* if in send mode, check for conversion - current setting is default. */
 
index 45e63beb88f9c87520209d3289114cfd84628092..d392399ec72e76bd7cb1bb020475a41a0c1406d3 100644 (file)
@@ -26,8 +26,8 @@
 #include <limits.h>
 #include <string.h>
 #include <sys/stat.h>
-#include "globals.h"
 #include "lib/lib.h"
+#include "globals.h"
 #include "options.h"
 #include "protos.h"
 #ifdef USE_IMAP
index 1ac1afff1846579aa0f1652fd86d9141bd3d3fd0..32585e9cc700d228995152ffff0214cdf7bb049b 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -32,6 +32,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "attach.h"
@@ -43,7 +44,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
@@ -746,7 +746,8 @@ static const char *compose_format_str(char *buf, size_t buflen, size_t col, int
 static void compose_status_line(char *buf, size_t buflen, size_t col, int cols,
                                 struct Menu *menu, const char *p)
 {
-  mutt_expando_format(buf, buflen, col, cols, p, compose_format_str, (unsigned long) menu, 0);
+  mutt_expando_format(buf, buflen, col, cols, p, compose_format_str,
+                      (unsigned long) menu, 0);
 }
 
 /**
index 0f7b0636b35303376217a21197af04cce30cf143..6e5b4763c95195eb6c0f0bef1c1473d85ca94e31 100644 (file)
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "compress.h"
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "mx.h"
diff --git a/copy.c b/copy.c
index ac6f59b0dbbeca21dbc8b80805b809b7eb058250..e84a124157b528be7217a4d1c1c2194dec09d05e 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -25,6 +25,7 @@
 #include <inttypes.h>
 #include <stdbool.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "copy.h"
 #include "address.h"
@@ -33,7 +34,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
index cc37a06a7a0138b09f742da9deaa9a2e1f07a57b..441f66ce92f09de02b87403bb3583027c45b374c 100644 (file)
 #include <termios.h>
 #include <unistd.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "enter_state.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
@@ -740,7 +740,7 @@ int mutt_window_mvprintw(struct MuttWindow *win, int row, int col, const char *f
   va_list ap;
   int rv;
 
-  if ((rv = mutt_window_move (win, row, col)) != ERR)
+  if ((rv = mutt_window_move(win, row, col)) != ERR)
   {
     va_start(ap, fmt);
     rv = vw_printw(stdscr, fmt, ap);
index e3161d98b885a6d8dd17f049d953f3746321c7fe..358ee823457bf747b3d9d9d91bf6ebf9ac0cdfae 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "body.h"
@@ -41,7 +42,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
@@ -133,7 +133,7 @@ static const char *No_visible = N_("No visible messages.");
   }
 
 #define CHECK_ATTACH                                                           \
-  if (option(OPT_ATTACH_MSG))                                                    \
+  if (option(OPT_ATTACH_MSG))                                                  \
   {                                                                            \
     mutt_flushinp();                                                           \
     mutt_error(_(Function_not_permitted_in_attach_message_mode));              \
@@ -145,7 +145,7 @@ static const char *No_visible = N_("No visible messages.");
 #define FLAGGED(h) mutt_thread_contains_flagged(Context, h)
 
 #define CAN_COLLAPSE(header)                                                   \
-  ((option(OPT_COLLAPSE_UNREAD) || !UNREAD(header)) &&                           \
+  ((option(OPT_COLLAPSE_UNREAD) || !UNREAD(header)) &&                         \
    (option(OPT_COLLAPSE_FLAGGED) || !FLAGGED(header)))
 
 /* de facto standard escapes for tsl/fsl */
@@ -2139,7 +2139,8 @@ int mutt_index_menu(void)
             menu->current = mutt_thread_next_unread(Context, CURHDR);
         }
 
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         int hint = Context->hdrs[Context->v2r[menu->current]]->index;
 
@@ -2858,7 +2859,8 @@ int mutt_index_menu(void)
         /* L10N: CHECK_ACL */
         CHECK_ACL(MUTT_ACL_INSERT, _("Cannot edit message"));
 
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         mutt_edit_message(Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2870,7 +2872,8 @@ int mutt_index_menu(void)
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
         CHECK_ATTACH;
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDFORWARD, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2885,7 +2888,8 @@ int mutt_index_menu(void)
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
         CHECK_ATTACH;
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY | SENDGROUPREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -2919,7 +2923,8 @@ int mutt_index_menu(void)
         CHECK_ATTACH;
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY | SENDLISTREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
@@ -3128,7 +3133,8 @@ int mutt_index_menu(void)
         CHECK_ATTACH;
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
-        if (option(OPT_PGP_AUTO_DECODE) && (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
+        if (option(OPT_PGP_AUTO_DECODE) &&
+            (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)))
           mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw);
         ci_send_message(SENDREPLY, NULL, NULL, Context, tag ? NULL : CURHDR);
         menu->redraw = REDRAW_FULL;
diff --git a/edit.c b/edit.c
index 2711009c0f0d72b1f27daf6d30bd2f9bea55a5dc..b9ca127af82f96d9b0a2f78b66c877031a5db9d0 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/stat.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "body.h"
@@ -40,7 +41,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 #include "options.h"
index 0afa426286f2e4cd483ff38434e3536e8b3a10da..daa435d91162159fc1fb041e71ff455423900299 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "context.h"
 #include "copy.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mx.h"
 #include "options.h"
diff --git a/enter.c b/enter.c
index ad51625910fba34b9dd9583ed057a5e5f279ae4e..0e86642a23c6adfe001843be994724ffffafdfd3 100644 (file)
--- a/enter.c
+++ b/enter.c
 #include <string.h>
 #include <wchar.h>
 #include <wctype.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "enter_state.h"
 #include "globals.h"
 #include "history.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "opcodes.h"
index 1960195554250ad86f6831f1968662235556cfcb..7001bcb80a06781670e33d1413149548ef5da50e 100644 (file)
  */
 
 #include "config.h"
-#include "envelope.h"
 #include <stddef.h>
 #include "lib/buffer.h"
 #include "lib/memory.h"
+#include "envelope.h"
 #include "queue.h"
 #include "rfc822.h"
 
@@ -94,7 +94,7 @@ void mutt_merge_envelopes(struct Envelope *base, struct Envelope **extra)
 #define MOVE_STAILQ(h)                                                         \
   if (STAILQ_EMPTY(&base->h))                                                  \
   {                                                                            \
-    STAILQ_SWAP(&base->h, &((*extra))->h, ListNode);                         \
+    STAILQ_SWAP(&base->h, &((*extra))->h, ListNode);                           \
   }
 
   MOVE_ELEM(return_path);
@@ -140,4 +140,3 @@ void mutt_merge_envelopes(struct Envelope *base, struct Envelope **extra)
 
   mutt_free_envelope(extra);
 }
-
diff --git a/flags.c b/flags.c
index ceb7a2fb3ede92aa6d55fb3db3bac1c4b056ec76..20ad291ece3745706ad0addd7c8007a3294bbc6b 100644 (file)
--- a/flags.c
+++ b/flags.c
 #include "config.h"
 #include <stddef.h>
 #include <stdbool.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "context.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mx.h"
@@ -131,7 +131,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
           update = true;
           h->old = false;
           if (upd_ctx)
-            ctx->new++;
+            ctx->new ++;
           if (h->read)
           {
             h->read = false;
@@ -148,7 +148,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
         update = true;
         if (!h->old)
           if (upd_ctx)
-            ctx->new--;
+            ctx->new --;
         h->read = true;
         if (upd_ctx)
           ctx->unread--;
@@ -171,7 +171,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
           h->old = true;
           if (!h->read)
             if (upd_ctx)
-              ctx->new--;
+              ctx->new --;
           h->changed = true;
           if (upd_ctx)
             ctx->changed = true;
@@ -183,7 +183,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
         h->old = false;
         if (!h->read)
           if (upd_ctx)
-            ctx->new++;
+            ctx->new ++;
         h->changed = true;
         if (upd_ctx)
           ctx->changed = true;
@@ -205,7 +205,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
             ctx->unread--;
           if (!h->old)
             if (upd_ctx)
-              ctx->new--;
+              ctx->new --;
           h->changed = true;
           if (upd_ctx)
             ctx->changed = true;
@@ -219,7 +219,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
           ctx->unread++;
         if (!h->old)
           if (upd_ctx)
-            ctx->new++;
+            ctx->new ++;
         h->changed = true;
         if (upd_ctx)
           ctx->changed = true;
@@ -244,7 +244,7 @@ void _mutt_set_flag(struct Context *ctx, struct Header *h, int flag, int bf, int
               ctx->unread--;
             if (!h->old)
               if (upd_ctx)
-                ctx->new--;
+                ctx->new --;
           }
           h->changed = true;
           if (upd_ctx)
diff --git a/from.c b/from.c
index 34be455d1b3e50dc0c6073d375b6e3d7af2bc421..17c09bc4aad0adf4b58e687d84af5dd7cfd10089 100644 (file)
--- a/from.c
+++ b/from.c
@@ -26,8 +26,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
-#include "globals.h"
 #include "lib/lib.h"
+#include "globals.h"
 #include "protos.h"
 
 /*
diff --git a/group.c b/group.c
index 19e0f37ccd3eac9ec6accccb2a6e433152810327..e5e7f6f0593eed44d93fbcf2c66a7af92d995873 100644 (file)
--- a/group.c
+++ b/group.c
 
 #include "config.h"
 #include <stdlib.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "group.h"
 #include "address.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "protos.h"
 #include "rfc822.h"
@@ -165,7 +165,7 @@ int mutt_group_context_remove_adrlist(struct GroupContext *ctx, struct Address *
 }
 
 int mutt_group_context_add_regex(struct GroupContext *ctx, const char *s,
-                              int flags, struct Buffer *err)
+                                 int flags, struct Buffer *err)
 {
   int rv = 0;
 
index 55fc74d221adb9b58f4ae43b28ea29d415801622..a4bbc712606dc29ef9cdaca5eb33e79a7adb93d5 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -37,6 +37,7 @@
 #include <unistd.h>
 #include <wchar.h>
 #include <wctype.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "body.h"
 #include "charset.h"
@@ -44,7 +45,6 @@
 #include "filter.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -1366,7 +1366,8 @@ static int multipart_handler(struct Body *a, struct State *s)
                  NONULL(p->subtype));
     }
 
-    if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLYFIRST)) && (s->flags & MUTT_FIRSTDONE))
+    if ((s->flags & MUTT_REPLYING) && (option(OPT_INCLUDE_ONLYFIRST)) &&
+        (s->flags & MUTT_FIRSTDONE))
       break;
   }
 
@@ -1492,7 +1493,7 @@ static int autoview_handler(struct Body *a, struct State *s)
       }
     }
 
-bail:
+  bail:
     safe_fclose(&fpout);
     safe_fclose(&fperr);
 
@@ -1937,7 +1938,8 @@ int mutt_body_handler(struct Body *b, struct State *s)
 
   /* only respect disposition == attachment if we're not
      displaying from the attachment menu (i.e. pager) */
-  if ((!option(OPT_HONOR_DISPOSITION) || (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) &&
+  if ((!option(OPT_HONOR_DISPOSITION) ||
+       (b->disposition != DISPATTACH || option(OPT_VIEW_ATTACH))) &&
       (plaintext || handler))
   {
     rc = run_decode_and_handler(b, s, handler, plaintext);
index 8554210163f89eaa5477681f9f85c6a310327edc..5518c08861be89b775e3c83114f98b2791b86d59 100644 (file)
@@ -39,9 +39,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "backend.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mx.h"
 
 /**
index cc572314505cb35b274f90175fc2238da5df9792..34c81e773c02f94f2de3206947a49f77c6e92f82 100644 (file)
@@ -33,9 +33,9 @@
 #include "config.h"
 #include <stddef.h>
 #include <gdbm.h>
+#include "lib/lib.h"
 #include "backend.h"
 #include "globals.h"
-#include "lib/lib.h"
 
 static void *hcache_gdbm_open(const char *path)
 {
index 5f5795db62336c4caaabb19031e66c66d8a17a81..4f20cd5ab58c4c6d697986f00f13939034d94113 100644 (file)
@@ -47,6 +47,7 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "address.h"
 #include "backend.h"
 #include "body.h"
@@ -56,7 +57,6 @@
 #include "hcache.h"
 #include "hcversion.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mbyte.h"
 #include "mutt_regex.h"
@@ -320,7 +320,6 @@ static void restore_stailq(struct ListHead *l, const unsigned char *d, int *off,
   }
 }
 
-
 static unsigned char *dump_buffer(struct Buffer *b, unsigned char *d, int *off, int convert)
 {
   if (!b)
index 466889abe7d70524d6001f63c71dbee1ee18b86a..6a6e2116c8cda11623379d55630b7ef9d6c45326 100644 (file)
@@ -34,8 +34,8 @@
 #include <kclangc.h>
 #include <limits.h>
 #include <stdio.h>
-#include "backend.h"
 #include "lib/lib.h"
+#include "backend.h"
 #include "options.h"
 
 static void *hcache_kyotocabinet_open(const char *path)
index abbf35408137be0e8dc878c31568bb5c0bb99efb..f0aa0cd50c68e3c0476afd1235d62d5828b5ed6d 100644 (file)
@@ -33,8 +33,8 @@
 #include "config.h"
 #include <stddef.h>
 #include <lmdb.h>
-#include "backend.h"
 #include "lib/lib.h"
+#include "backend.h"
 
 /** The maximum size of the database file (2GiB).
  * The file is mmap(2)'d into memory. */
index 0848970f2214ec745155221d03e67c4674b4e39d..7370915aebdfdf1013a6a33e7bb0d5a76e31d10b 100644 (file)
@@ -34,8 +34,8 @@
 #include <stddef.h>
 #include <depot.h>
 #include <villa.h>
-#include "backend.h"
 #include "lib/lib.h"
+#include "backend.h"
 #include "options.h"
 
 static void *hcache_qdbm_open(const char *path)
index 414c94fd4c33b94f1f9af67947bb25a84d23853e..350ab6781715d0f4807ecd71c5273eef31e0a151 100644 (file)
@@ -34,8 +34,8 @@
 #include <stddef.h>
 #include <tcbdb.h>
 #include <tcutil.h>
-#include "backend.h"
 #include "lib/lib.h"
+#include "backend.h"
 #include "options.h"
 
 static void *hcache_tokyocabinet_open(const char *path)
index a864fcc1b82000a4f126f3f5da079c3321fd5645..cfc2c2ebb7f7a3b22022bf572ebf24f55f75362d 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "body.h"
@@ -38,7 +39,6 @@
 #include "format_flags.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mbtable.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
@@ -1336,10 +1336,10 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
 
   if (optional)
     mutt_expando_format(dest, destlen, col, cols, ifstring, hdr_format_str,
-                      (unsigned long) hfi, flags);
+                        (unsigned long) hfi, flags);
   else if (flags & MUTT_FORMAT_OPTIONAL)
     mutt_expando_format(dest, destlen, col, cols, elsestring, hdr_format_str,
-                      (unsigned long) hfi, flags);
+                        (unsigned long) hfi, flags);
 
   return src;
 #undef THREAD_NEW
@@ -1355,8 +1355,8 @@ void _mutt_make_string(char *dest, size_t destlen, const char *s,
   hfi.ctx = ctx;
   hfi.pager_progress = 0;
 
-  mutt_expando_format(dest, destlen, 0, MuttIndexWindow->cols, s, hdr_format_str,
-                    (unsigned long) &hfi, flags);
+  mutt_expando_format(dest, destlen, 0, MuttIndexWindow->cols, s,
+                      hdr_format_str, (unsigned long) &hfi, flags);
 }
 
 void mutt_make_string_info(char *dst, size_t dstlen, int cols, const char *s,
index 58faeaa8f637eaea77f388d0edaa0bc3b5687f02..ab43b38246b422d09981d8ff87cb032190ee3f5a 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <sys/stat.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "body.h"
@@ -35,7 +36,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mutt_idna.h"
 #include "ncrypt/ncrypt.h"
@@ -203,8 +203,7 @@ void mutt_edit_headers(const char *editor, const char *body, struct Header *msg,
       }
       keep = false;
     }
-    else if ((WithCrypto & APPLICATION_PGP) &&
-             (mutt_strncasecmp("pgp:", np->data, 4) == 0))
+    else if ((WithCrypto & APPLICATION_PGP) && (mutt_strncasecmp("pgp:", np->data, 4) == 0))
     {
       msg->security = mutt_parse_crypt_hdr(np->data + 4, 0, APPLICATION_PGP);
       if (msg->security)
diff --git a/help.c b/help.c
index 57626b4dd39e8a5d058e30e291c2da3879d6ba2d..7686e08ec039504a77716779552d1dcc58c5f71a 100644 (file)
--- a/help.c
+++ b/help.c
@@ -28,9 +28,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "opcodes.h"
@@ -42,7 +42,7 @@ static const char *HelpStrings[] = {
 #define DEFINE_HELP_MESSAGE(opcode, help_string) help_string,
   OPS(DEFINE_HELP_MESSAGE)
 #undef DEFINE_HELP_MESSAGE
-  NULL,
+      NULL,
 };
 
 static const struct Binding *help_lookup_function(int op, int menu)
index d5d344f035880a2bb4f04e4ab4e71b5ff6b65fc7..a06be53fe53c11c735f0ba3eafe9eba2e78585a2 100644 (file)
--- a/history.c
+++ b/history.c
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "history.h"
 #include "charset.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "protos.h"
 
 /* This history ring grows from 0..History, with last marking the
@@ -216,7 +216,8 @@ static void shrink_histfile(void)
     if (hclass >= HC_LAST)
       continue;
     *p = '\0';
-    if (option(OPT_HISTORY_REMOVE_DUPS) && (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
+    if (option(OPT_HISTORY_REMOVE_DUPS) &&
+        (dup_hash_inc(dup_hashes[hclass], linebuf + read) > 1))
     {
       regen_file = true;
       continue;
diff --git a/hook.c b/hook.c
index 75937bd5aa7dc5a834b6262865d12dca5e10add5..a9a4b1363a4c9cac91227c9608a576e1757b2625 100644 (file)
--- a/hook.c
+++ b/hook.c
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "context.h"
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
-#include "mutt.h"
 #include "mutt_regex.h"
 #include "ncrypt/ncrypt.h"
 #include "options.h"
@@ -403,7 +402,8 @@ void mutt_message_hook(struct Context *ctx, struct Header *hdr, int type)
       continue;
 
     if (hook->type & type)
-      if ((mutt_pattern_exec(hook->pattern, 0, ctx, hdr, &cache) > 0) ^ hook->regex.not)
+      if ((mutt_pattern_exec(hook->pattern, 0, ctx, hdr, &cache) > 0) ^
+          hook->regex.not)
       {
         if (mutt_parse_rc_line(hook->command, &token, &err) == -1)
         {
@@ -440,7 +440,8 @@ static int addr_hook(char *path, size_t pathlen, int type, struct Context *ctx,
       continue;
 
     if (hook->type & type)
-      if ((mutt_pattern_exec(hook->pattern, 0, ctx, hdr, &cache) > 0) ^ hook->regex.not)
+      if ((mutt_pattern_exec(hook->pattern, 0, ctx, hdr, &cache) > 0) ^
+          hook->regex.not)
       {
         mutt_make_string(path, pathlen, hook->command, ctx, hdr);
         return 0;
@@ -506,8 +507,8 @@ static char *_mutt_string_hook(const char *match, int hook)
 
   TAILQ_FOREACH(tmp, &Hooks, entries)
   {
-    if ((tmp->type & hook) &&
-        ((match && regexec(tmp->regex.regex, match, 0, NULL, 0) == 0) ^ tmp->regex.not))
+    if ((tmp->type & hook) && ((match && regexec(tmp->regex.regex, match, 0, NULL, 0) == 0) ^
+                               tmp->regex.not))
       return tmp->command;
   }
   return NULL;
@@ -519,8 +520,8 @@ static void _mutt_list_hook(struct ListHead *matches, const char *match, int hoo
 
   TAILQ_FOREACH(tmp, &Hooks, entries)
   {
-    if ((tmp->type & hook) &&
-        ((match && regexec(tmp->regex.regex, match, 0, NULL, 0) == 0) ^ tmp->regex.not))
+    if ((tmp->type & hook) && ((match && regexec(tmp->regex.regex, match, 0, NULL, 0) == 0) ^
+                               tmp->regex.not))
       mutt_list_insert_tail(matches, safe_strdup(tmp->command));
   }
 }
index 5157503262d7b18c2d8968386a170d3f2a27103a..bd1bc99d78891adea90134b3b9ba324d291c1a1c 100644 (file)
@@ -26,9 +26,9 @@
 
 #include "config.h"
 #include <string.h>
+#include "lib/lib.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "protos.h"
 
 static const struct ImapAuth imap_authenticators[] = {
index 527964b107b46367cf13c9ab910006f51aec8d88..2645037e9d95746811f893cde929e3254a58ec5a 100644 (file)
 
 #include "config.h"
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "protos.h"
index 61142e9da3577e303e2defa03d0f2fe8466fd6b4..df322287e35e8c4ad59d3c654dd86ccac6ab1aea 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "protos.h"
index 8191d9d0b89fc3040a9b99ffb3e541b8c213eb8e..3a9866d0703d3604cafd55169577761f4891d300 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include "imap_private.h"
+#include "lib/lib.h"
+#include "mutt.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "protos.h"
-#include "mutt.h"
 #ifdef HAVE_HEIMDAL
 #include <gssapi/gssapi.h>
 #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
index 8ae9014cb081e06fc43053f58fb3eeb30006bc72..9627d94e2a0a59dd085e6b12b499f592e1c21cba 100644 (file)
 #include "config.h"
 #include <stdio.h>
 #include "imap_private.h"
+#include "lib/lib.h"
+#include "mutt.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "protos.h"
-#include "mutt.h"
 
 /**
  * imap_auth_login - Plain LOGIN support
index 4bd13eff57e6788a64e3663aa1e7723f2c294f5e..4e218540e6ce051578a5968588ccf9ff4d75565f 100644 (file)
 
 #include "config.h"
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_sasl_plain.h"
 #include "mutt_socket.h"
 #include "protos.h"
index 16856ffe8fe1fc04d33d89f0113d99bd64a72221..fe922de5dc66b140fec918f1068d501306fc1450 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "account.h"
 #include "auth.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_sasl.h"
 #include "mutt_socket.h"
 #include "options.h"
index a86c58c843f693ebeaeb9ad835eee1e788de401d..06783a54279535f554e37f435145f38da0e8ed9c 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "browser.h"
@@ -39,7 +40,6 @@
 #include "context.h"
 #include "globals.h"
 #include "imap/imap.h"
-#include "lib/lib.h"
 #include "mutt_regex.h"
 #include "options.h"
 #include "protos.h"
index 1364a0bcf8e7abc910ee44cb3b04ed20fc9d7847..97720c9a31b08f98e1b4450a3906fef4b14fd13d 100644 (file)
 #include <string.h>
 #include <time.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "account.h"
 #include "buffy.h"
 #include "context.h"
 #include "globals.h"
 #include "header.h"
 #include "imap/imap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "message.h"
 #include "mutt_menu.h"
index ceecbc8a546964f35ef30d25ac891d05d5d8b6c7..22bd9586d30077472f99a1cdc5319c066f42807c 100644 (file)
@@ -34,6 +34,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "mutt.h"
 #include "imap.h"
 #include "account.h"
@@ -45,7 +46,6 @@
 #include "globals.h"
 #include "header.h"
 #include "imap/imap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "message.h"
@@ -1760,7 +1760,7 @@ struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox,
   {
     struct ImapStatus *scache = safe_calloc(1, sizeof(struct ImapStatus));
     scache->name = (char *) mbox;
-    mutt_list_insert_tail(&idata->mboxcache, (char *)scache);
+    mutt_list_insert_tail(&idata->mboxcache, (char *) scache);
     status = imap_mboxcache_get(idata, mbox, 0);
     status->name = safe_strdup(mbox);
   }
@@ -2150,7 +2150,8 @@ int imap_complete(char *dest, size_t dlen, char *path)
     list[0] = '\0';
 
   /* fire off command */
-  snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"", option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST", list);
+  snprintf(buf, sizeof(buf), "%s \"\" \"%s%%\"",
+           option(OPT_IMAP_LIST_SUBSCRIBED) ? "LSUB" : "LIST", list);
 
   imap_cmd_start(idata, buf);
 
index c84086cfad8525bd4c57a3c77d6fdc91dd786da0..a4e3e5fef28d63a05051b9628b94959f5eee5669 100644 (file)
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <unistd.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "mutt.h"
 #include "message.h"
 #include "account.h"
@@ -41,7 +42,6 @@
 #include "globals.h"
 #include "header.h"
 #include "imap/imap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "hcache/hcache.h"
 #endif
 
-static struct ImapHeaderDataimap_new_header_data(void)
+static struct ImapHeaderData *imap_new_header_data(void)
 {
-    struct ImapHeaderData *d = safe_calloc(1, sizeof(struct ImapHeaderData));
-    STAILQ_INIT(&d->keywords);
-    return d;
+  struct ImapHeaderData *d = safe_calloc(1, sizeof(struct ImapHeaderData));
+  STAILQ_INIT(&d->keywords);
+  return d;
 }
 
 static void imap_update_context(struct ImapData *idata, int oldmsgcount)
index 05cc264a679cd45bb0c540d1016f02e1b211a4eb..b86ea16aa83d41f7ba34b8bf65ed72aacd86078f 100644 (file)
@@ -23,9 +23,9 @@
 #include "config.h"
 #include <string.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "charset.h"
 #include "globals.h"
-#include "lib/lib.h"
 
 // clang-format off
 /* This is very similar to the table in lib/lib_base64.c
index 299cc496df27ed95035dbe7be36b435cb15c2c73..2e8614911f2563725787de85b98b1addc0ae22f7 100644 (file)
@@ -37,6 +37,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "imap_private.h"
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "bcache.h"
@@ -44,7 +45,6 @@
 #include "globals.h"
 #include "header.h"
 #include "imap/imap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "message.h"
@@ -404,8 +404,7 @@ int imap_mxcmp(const char *mx1, const char *mx2)
     mx1 = "INBOX";
   if (!mx2 || !*mx2)
     mx2 = "INBOX";
-  if ((mutt_strcasecmp(mx1, "INBOX") == 0) &&
-      (mutt_strcasecmp(mx2, "INBOX") == 0))
+  if ((mutt_strcasecmp(mx1, "INBOX") == 0) && (mutt_strcasecmp(mx2, "INBOX") == 0))
     return 0;
 
   b1 = safe_malloc(strlen(mx1) + 1);
diff --git a/init.c b/init.c
index 11da787e6f12e3705f279a9c0eb5262fc7605c63..78b434331981480a356f92e85aea4a4e59c982a3 100644 (file)
--- a/init.c
+++ b/init.c
@@ -37,6 +37,7 @@
 #include <sys/utsname.h>
 #include <unistd.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "init.h"
 #include "address.h"
 #include "header.h"
 #include "history.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
-#include "mbyte.h"
 #include "mbtable.h"
-#include "mutt.h"
+#include "mbyte.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
@@ -317,9 +316,8 @@ 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",
-          (k == (size_t)(-1)) ? -1 : -2, s, t->orig_str);
+      mutt_debug(1, "parse_mbtable: 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));
       k = (k == (size_t)(-1)) ? 1 : slen;
@@ -770,7 +768,8 @@ static struct RegexList *new_regex_list(void)
   return safe_calloc(1, sizeof(struct RegexList));
 }
 
-int mutt_add_to_regex_list(struct RegexList **list, const char *s, int flags, struct Buffer *err)
+int mutt_add_to_regex_list(struct RegexList **list, const char *s, int flags,
+                           struct Buffer *err)
 {
   struct RegexList *t = NULL, *last = NULL;
   struct Regex *rx = NULL;
@@ -1109,21 +1108,20 @@ static int parse_ignore(struct Buffer *buf, struct Buffer *s,
   return 0;
 }
 
-static int parse_stailq(struct Buffer *buf, struct Buffer *s, unsigned long data,
-                      struct Buffer *err)
+static int parse_stailq(struct Buffer *buf, struct Buffer *s,
+                        unsigned long data, struct Buffer *err)
 {
-
   do
   {
     mutt_extract_token(buf, s, 0);
-    add_to_stailq((struct ListHead *)data, buf->data);
+    add_to_stailq((struct ListHead *) data, buf->data);
   } while (MoreArgs(s));
 
   return 0;
 }
 
 static int parse_unstailq(struct Buffer *buf, struct Buffer *s,
-                        unsigned long data, struct Buffer *err)
+                          unsigned long data, struct Buffer *err)
 {
   do
   {
@@ -1133,10 +1131,10 @@ static int parse_unstailq(struct Buffer *buf, struct Buffer *s,
      */
     if (mutt_strcmp(buf->data, "*") == 0)
     {
-      mutt_list_free((struct ListHead *)data);
+      mutt_list_free((struct ListHead *) data);
       break;
     }
-    remove_from_stailq((struct ListHead *)data, buf->data);
+    remove_from_stailq((struct ListHead *) data, buf->data);
   } while (MoreArgs(s));
 
   return 0;
@@ -1486,7 +1484,8 @@ static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
           if (data == MUTT_GROUP &&
               mutt_group_context_add_regex(gc, buf->data, REG_ICASE, err) != 0)
             goto bail;
-          else if (data == MUTT_UNGROUP && mutt_group_context_remove_regex(gc, buf->data) < 0)
+          else if (data == MUTT_UNGROUP &&
+                   mutt_group_context_remove_regex(gc, buf->data) < 0)
             goto bail;
           break;
 
@@ -1592,7 +1591,7 @@ static int parse_attach_list(struct Buffer *buf, struct Buffer *s,
 
     mutt_debug(5, "parse_attach_list: added %s/%s [%d]\n", a->major, a->minor, a->major_int);
 
-    mutt_list_insert_tail(head, (char *)a);
+    mutt_list_insert_tail(head, (char *) a);
   } while (MoreArgs(s));
 
   _attachments_clean();
@@ -4089,7 +4088,8 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands)
 
   Groups = hash_create(1031, 0);
   /* reverse alias keys need to be strdup'ed because of idna conversions */
-  ReverseAliases = hash_create(1031, MUTT_HASH_STRCASECMP | MUTT_HASH_STRDUP_KEYS | MUTT_HASH_ALLOW_DUPS);
+  ReverseAliases =
+      hash_create(1031, MUTT_HASH_STRCASECMP | MUTT_HASH_STRDUP_KEYS | MUTT_HASH_ALLOW_DUPS);
 #ifdef USE_NOTMUCH
   TagTransforms = hash_create(64, 1);
   TagFormats = hash_create(64, 0);
diff --git a/init.h b/init.h
index 34ee1dc56a2b2d9179d964885e5f8a0288a28852..eb683f7bef91f150d0748caf070ac6b154227870 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1125,7 +1125,7 @@ struct Option MuttVars[] = {
   ** caching will be used.
   ** .pp
   ** Header caching can greatly improve speed when opening POP, IMAP
-  ** MH or Folder folders, see ``$caching'' for details.
+  ** MH or Maildir folders, see ``$caching'' for details.
   */
   { "header_cache_backend", DT_HCACHE, R_NONE, UL &HeaderCacheBackend, UL 0 },
   /*
@@ -1742,7 +1742,7 @@ struct Option MuttVars[] = {
   { "mark_macro_prefix",DT_STRING, R_NONE, UL &MarkMacroPrefix, UL "'" },
   /*
   ** .pp
-  ** IndentString for macros created using mark-message.  A new macro
+  ** Prefix for macros created using mark-message.  A new macro
   ** automatically generated with \fI<mark-message>a\fP will be composed
   ** from this prefix and the letter \fIa\fP.
   */
@@ -1782,7 +1782,7 @@ struct Option MuttVars[] = {
   /*
   ** .pp
   ** The default mailbox type used when creating new folders. May be any of
-  ** ``mbox'', ``MMDF'', ``MH'' and ``Folder''. This is overridden by the
+  ** ``mbox'', ``MMDF'', ``MH'' and ``Maildir''. This is overridden by the
   ** \fC-m\fP command-line option.
   */
   { "menu_context",     DT_NUMBER,  R_NONE, UL &MenuContext, 0 },
index ac272f0e7d38191dcbccb8ecddee5c9daf6e38ed..6e47a011d44dddb244cb336b4e6e157081da8bf4 100644 (file)
--- a/keymap.c
+++ b/keymap.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
+#include "mutt.h"
 #include "keymap.h"
 #include "functions.h"
 #include "globals.h"
-#include "lib/lib.h"
-#include "mutt.h"
 #include "mutt_curses.h"
 #include "ncrypt/ncrypt.h"
 #include "opcodes.h"
@@ -509,7 +509,7 @@ int km_dokey(int menu)
     timeout(-1);
 
 #ifdef USE_IMAP
-gotkey:
+  gotkey:
 #endif
     /* hide timeouts, but not window resizes, from the line editor. */
     if (menu == MENU_EDITOR && tmp.ch == -2 && !SigWinch)
index c9fecee4ef6174f92799aacfd5a8c4a4fad0ad40..94cea01a6da15c6847e07135ab4fb7fdf3c42334 100644 (file)
@@ -32,8 +32,8 @@
  * | mutt_getvaluebyname() | Lookup the constant for a string
  */
 
-#include "string2.h"
 #include "mapping.h"
+#include "string2.h"
 
 /**
  * mutt_getnamebyvalue - Lookup a string for a constant
@@ -64,4 +64,3 @@ int mutt_getvaluebyname(const char *name, const struct Mapping *map)
       return map[i].value;
   return -1;
 }
-
diff --git a/main.c b/main.c
index 4b81462f7dc5d91c0ae9b5660d408435797690a3..5610c6cd4d8b0b096f23febac68b040e3b32051f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -37,6 +37,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
@@ -46,7 +47,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
@@ -559,7 +559,7 @@ int main(int argc, char **argv, char **env)
     mutt_endwin(NULL);
   }
   else if (subject || msg || sendflags || draftFile || includeFile ||
-          !STAILQ_EMPTY(&attach) || optind < argc)
+           !STAILQ_EMPTY(&attach) || optind < argc)
   {
     FILE *fin = NULL;
     FILE *fout = NULL;
diff --git a/mbox.c b/mbox.c
index 4c6d8148e45efbd95b41ba95b487cfa2e8447258..beaf128eceedbf206d4e24e1aaa1b9e81ccf6836 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -32,6 +32,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <utime.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "body.h"
@@ -41,7 +42,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
@@ -1003,7 +1003,8 @@ void mbox_reset_atime(struct Context *ctx, struct stat *st)
    * When $mbox_check_recent is set, existing new mail is ignored, so do not
    * reset the atime to mtime-1 to signal new mail.
    */
-  if (!option(OPT_MAIL_CHECK_RECENT) && utimebuf.actime >= utimebuf.modtime && mbox_has_new(ctx))
+  if (!option(OPT_MAIL_CHECK_RECENT) && utimebuf.actime >= utimebuf.modtime &&
+      mbox_has_new(ctx))
     utimebuf.actime = utimebuf.modtime - 1;
 
   utime(ctx->path, &utimebuf);
diff --git a/mbyte.c b/mbyte.c
index 5b427ff14da1563afaaa7c2d0047c4e3c09038bf..f3ef3d7b2f436d4808253b55254ca1084db80e98 100644 (file)
--- a/mbyte.c
+++ b/mbyte.c
@@ -30,9 +30,9 @@
 #include <stdbool.h>
 #include <string.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mbyte.h"
 #include "charset.h"
-#include "lib/lib.h"
 #include "options.h"
 #include "protos.h"
 
diff --git a/menu.c b/menu.c
index a9324c116b635492aae3bf2e6bca40927d78f044..9569d462825e8f69f04763149477907fb62ed5fd 100644 (file)
--- a/menu.c
+++ b/menu.c
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "context.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
@@ -432,7 +432,7 @@ void menu_redraw_motion(struct Menu *menu)
     print_enriched_string(menu->oldcurrent, old_color, (unsigned char *) buf, 1);
 
     /* now draw the new one to reflect the change */
-    cur_color = menu->color (menu->current);
+    cur_color = menu->color(menu->current);
     menu_make_entry(buf, sizeof(buf), menu, menu->current);
     menu_pad_string(menu, buf, sizeof(buf));
     SETCOLOR(MT_COLOR_INDICATOR);
diff --git a/mh.c b/mh.c
index 1b63da614fed66c078cd39ef3febc7c22151bf40..5b384d00e97456f4646b590b208426f4078de331 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -43,6 +43,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <utime.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "body.h"
 #include "buffy.h"
@@ -51,7 +52,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "mx.h"
@@ -1513,8 +1513,8 @@ static int maildir_open_new_message(struct Message *msg, struct Context *dest,
   omask = umask(mh_umask(dest));
   while (true)
   {
-    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);
+    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);
 
index 0a80fedd404fbf970851e929fe8c4c425c7c2ce8..2923444f7545758f1f400b8fee518ecc10fad06d 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt_idna.h"
 #include "address.h"
 #include "charset.h"
 #include "envelope.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "options.h"
 
 #ifdef HAVE_LIBIDN
index 7c7d6166d5a629b48ec79a28f0e3df55be9ae11a..fcd8b5be8e0f60ee26e0e96d7b70b9e5b7830dda 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "mutt_lua.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mbtable.h"
 #include "mutt_commands.h"
index a72bd72d396735e40128daa43df3c4455486a179..0e3ee70288e12be3ae022f065d5ce488b3883847 100644 (file)
@@ -46,6 +46,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "mutt_notmuch.h"
 #include "body.h"
@@ -54,7 +55,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "mx.h"
@@ -556,8 +556,7 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz
   }
 
   /* if the query has changed, reset the window position */
-  if (NmQueryWindowCurrentSearch == NULL ||
-      (strcmp(query, NmQueryWindowCurrentSearch) != 0))
+  if (NmQueryWindowCurrentSearch == NULL || (strcmp(query, NmQueryWindowCurrentSearch) != 0))
     query_window_reset();
 
   if (!query_window_check_timebase(NmQueryWindowTimebase))
@@ -569,8 +568,8 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufsz
   }
 
   if (end == 0)
-    snprintf(buf, bufsz, "date:%d%s..now and %s", beg,
-             NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
+    snprintf(buf, bufsz, "date:%d%s..now and %s", beg, NmQueryWindowTimebase,
+             NmQueryWindowCurrentSearch);
   else
     snprintf(buf, bufsz, "date:%d%s..%d%s and %s", beg, NmQueryWindowTimebase,
              end, NmQueryWindowTimebase, NmQueryWindowCurrentSearch);
index 7750869815c68c9f680e506b3f143a7a7a717301..c7e22e472b98a7a8f8acf4338f349f0cb3c62051 100644 (file)
@@ -29,9 +29,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/socket.h>
+#include "lib/lib.h"
 #include "mutt_sasl.h"
 #include "account.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "protos.h"
index 011a15bb6b059e25c1f8f6afd337e9d6f013837b..d3c71d6a5acabb2db9ecfc94978b5288c6a78db9 100644 (file)
@@ -22,8 +22,8 @@
 
 #include "config.h"
 #include <stdio.h>
-#include "mutt_sasl_plain.h"
 #include "lib/lib.h"
+#include "mutt_sasl_plain.h"
 #include "protos.h"
 
 size_t mutt_sasl_plain_msg(char *buf, size_t buflen, const char *cmd,
index 7a7215393739a955a84d702c5ea77877fb452ccb..db10fb402f57eb3a860b23d359f4465ba7bcd712 100644 (file)
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "mutt_ssl.h"
 #include "account.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
 #include "mutt_socket.h"
@@ -855,7 +855,8 @@ static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int al
    * true, then check_certificate_file() must be false.  Therefore we don't need
    * to also scan the certificate file here.
    */
-  allow_always = allow_always && CertificateFile && check_certificate_expiration(cert, true);
+  allow_always =
+      allow_always && CertificateFile && check_certificate_expiration(cert, true);
 
   /* L10N:
    * These four letters correspond to the choices in the next four strings:
index 8c3293ab7e8943c20b5ae6c2869d10b408c932ed..2076fbb40e6ee2bf820df8a6435e4758e0864020 100644 (file)
 #include <string.h>
 #include <sys/stat.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "globals.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
 #include "mutt_socket.h"
@@ -1045,7 +1045,8 @@ static int tls_negotiate(struct Connection *conn)
 
   if (SslCaCertificatesFile)
   {
-    gnutls_certificate_set_x509_trust_file(data->xcred, SslCaCertificatesFile, GNUTLS_X509_FMT_PEM);
+    gnutls_certificate_set_x509_trust_file(data->xcred, SslCaCertificatesFile,
+                                           GNUTLS_X509_FMT_PEM);
   }
 
   if (SslClientCert)
index 99d49e977fce2e57fbeac30fd68c951c0601ac4b..e7994072d0d220c34a1a505ba543f3f07ca9c752 100644 (file)
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "mutt_tunnel.h"
 #include "account.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "protos.h"
 
index 1f3e4280440d1dc021d8d5936ddf35e8989af17a..f186208455b4771efb605fe707a5c3c8bab52b9e 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -44,6 +44,7 @@
 #include <unistd.h>
 #include <utime.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
 #include "format_flags.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
-#include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_regex.h"
 #include "mx.h"
@@ -247,8 +246,8 @@ char *_mutt_expand_path(char *s, size_t slen, int regex)
       {
 #ifdef USE_IMAP
         /* if folder = {host} or imap[s]://host/: don't append slash */
-        if (mx_is_imap(NONULL(Folder)) && (Folder[strlen(Folder) - 1] == '}' ||
-                                            Folder[strlen(Folder) - 1] == '/'))
+        if (mx_is_imap(NONULL(Folder)) &&
+            (Folder[strlen(Folder) - 1] == '}' || Folder[strlen(Folder) - 1] == '/'))
           strfcpy(p, NONULL(Folder), sizeof(p));
         else
 #endif
@@ -531,8 +530,8 @@ void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
                   const char *src, int line)
 {
   size_t n = snprintf(s, slen, "%s/%s-%s-%d-%d-%" PRIu64 "%s%s", NONULL(Tmpdir),
-                      NONULL(prefix), NONULL(ShortHostname), (int) getuid(), (int) getpid(),
-                      mutt_rand64(), suffix ? "." : "", NONULL(suffix));
+                      NONULL(prefix), NONULL(ShortHostname), (int) getuid(),
+                      (int) getpid(), mutt_rand64(), suffix ? "." : "", NONULL(suffix));
   if (n >= slen)
     mutt_debug(1, "%s:%d: ERROR: insufficient buffer space to hold temporary "
                   "filename! slen=%zu but need %zu\n",
@@ -992,8 +991,8 @@ void mutt_expando_format(char *dest, size_t destlen, size_t col, int cols,
         mutt_extract_token(word, srcbuf, 0);
         mutt_debug(3, "fmtpipe %2d: %s\n", i++, word->data);
         mutt_buffer_addch(command, '\'');
-        mutt_expando_format(buf, sizeof(buf), 0, cols, word->data, callback, data,
-                          flags | MUTT_FORMAT_NOFILTER);
+        mutt_expando_format(buf, sizeof(buf), 0, cols, word->data, callback,
+                            data, flags | MUTT_FORMAT_NOFILTER);
         for (p = buf; p && *p; p++)
         {
           if (*p == '\'')
@@ -1049,7 +1048,7 @@ void mutt_expando_format(char *dest, size_t destlen, size_t col, int cols,
                  * format pipes does not try to append a nul itself.
                  */
                 mutt_expando_format(dest, destlen + 1, col, cols, recycler,
-                                  callback, data, flags);
+                                    callback, data, flags);
                 FREE(&recycler);
               }
             }
@@ -1994,4 +1993,3 @@ int mutt_inbox_cmp(const char *a, const char *b)
 
   return 0;
 }
-
diff --git a/mx.c b/mx.c
index 675a48094c31c75a983ea1255f9af9da8b08eca6..285d86f26c50c109589fb07974c52311835681cc 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -32,6 +32,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <utime.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "mx.h"
 #include "address.h"
@@ -43,7 +44,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "ncrypt/ncrypt.h"
 #include "opcodes.h"
@@ -662,7 +662,8 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
 
     if (nntp_data && nntp_data->nserv && nntp_data->group)
     {
-      int rc = query_quadoption(OPT_CATCHUP_NEWSGROUP, _("Mark all articles read?"));
+      int rc =
+          query_quadoption(OPT_CATCHUP_NEWSGROUP, _("Mark all articles read?"));
       if (rc == MUTT_ABORT)
       {
         ctx->closing = false;
@@ -945,7 +946,7 @@ void mx_update_tables(struct Context *ctx, int committing)
       {
         ctx->unread++;
         if (!ctx->hdrs[j]->old)
-          ctx->new++;
+          ctx->new ++;
       }
 
       j++;
@@ -1337,7 +1338,7 @@ void mx_update_context(struct Context *ctx, int new_messages)
     {
       ctx->unread++;
       if (!h->old)
-        ctx->new++;
+        ctx->new ++;
     }
   }
 }
index 1d7f35590f4dc940d5b86d197c4e691c842e0a82..252706db512477cb1a7e22947b0f963da2565602 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
@@ -43,7 +44,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "ncrypt.h"
@@ -160,13 +160,15 @@ int mutt_protect(struct Header *msg, char *keylist)
         return -1;
       }
     }
-    else if (!mutt_strcasecmp ("flowed",
-                               mutt_get_parameter ("format", msg->content->parameter)))
+    else if (!mutt_strcasecmp("flowed",
+                              mutt_get_parameter("format", msg->content->parameter)))
     {
-      if ((query_quadoption (OPT_PGP_MIME_AUTO,
-              _("Inline PGP can't be used with format=flowed.  Revert to PGP/MIME?"))) != MUTT_YES)
+      if ((query_quadoption(OPT_PGP_MIME_AUTO,
+                            _("Inline PGP can't be used with format=flowed.  "
+                              "Revert to PGP/MIME?"))) != MUTT_YES)
       {
-        mutt_error(_("Mail not sent: inline PGP can't be used with format=flowed."));
+        mutt_error(
+            _("Mail not sent: inline PGP can't be used with format=flowed."));
         return -1;
       }
     }
index 1f3719a576e0d1b7f6867560d7827e23ffdc85e0..a60418a73a803c0b74c755a8e146f4a6cbb45165 100644 (file)
@@ -45,6 +45,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
@@ -56,7 +57,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -901,8 +901,8 @@ static char *encrypt_gpgme_object(gpgme_data_t plaintext, gpgme_key_t *rset,
 
 static void strlower(char *s)
 {
-    for (; *s; ++s)
-        *s = tolower(*s);
+  for (; *s; ++s)
+    *s = tolower(*s);
 }
 
 /**
@@ -3091,7 +3091,7 @@ static void crypt_entry(char *s, size_t l, struct Menu *menu, int num)
   entry.num = num + 1;
 
   mutt_expando_format(s, l, 0, MuttIndexWindow->cols, NONULL(PgpEntryFormat),
-                    crypt_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
+                      crypt_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
 }
 
 /**
@@ -4232,8 +4232,9 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
           }
         }
 
-        if (option(OPT_PGP_CHECK_TRUST) && (!crypt_id_is_valid(key_table[menu->current]) ||
-                                         !crypt_id_is_strong(key_table[menu->current])))
+        if (option(OPT_PGP_CHECK_TRUST) &&
+            (!crypt_id_is_valid(key_table[menu->current]) ||
+             !crypt_id_is_strong(key_table[menu->current])))
         {
           const char *warn_s = NULL;
           char buff[LONG_STRING];
@@ -4325,7 +4326,7 @@ static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a,
     return NULL;
 
   mutt_debug(5, "crypt_getkeybyaddr: looking for %s <%s>.\n",
-            a ? a->personal : "", a ? a->mailbox : "");
+             a ? a->personal : "", a ? a->mailbox : "");
 
   for (k = keys; k; k = k->next)
   {
index 45e74f2bfed68cd2a40917751acf455fa89c653c..b62cdec7be224404a5d1a7301a2d9f9376403bed 100644 (file)
@@ -21,8 +21,8 @@
  */
 
 #include "config.h"
-#include "crypt_mod.h"
 #include "lib/lib.h"
+#include "crypt_mod.h"
 
 /**
  * struct CryptModule - A crypto plugin module
index 1381087071b264eb19be027e27d7f54d30cdcdac..fa729d8743082750b3f51a8d67053e6daf9a885f 100644 (file)
@@ -34,9 +34,9 @@
 
 #include "config.h"
 #include <stdio.h>
+#include "lib/lib.h"
 #include "crypt_mod.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "ncrypt.h"
 #include "options.h"
 #include "protos.h"
index 8ba3a2086d73a90f91f4f66d5e663cd15fded29d..f5daa70db081b6bbd1c3994330e95ffa0c723b6c 100644 (file)
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "charset.h"
 #include "filter.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mime.h"
 #include "ncrypt.h"
 #include "options.h"
index fa2d6948c7df4124237455ba83f97780044e3146..285e5dac8ae99ee6618e361a5a9e87800d0cf949 100644 (file)
@@ -43,8 +43,8 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "pgp.h"
 #include "address.h"
 #include "body.h"
 #include "charset.h"
@@ -53,7 +53,6 @@
 #include "filter.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -61,6 +60,7 @@
 #include "ncrypt.h"
 #include "options.h"
 #include "parameter.h"
+#include "pgp.h"
 #include "pgpinvoke.h"
 #include "pgplib.h"
 #include "pgpmicalg.h"
index 0cdb02dd7e27a144c03e5b49cbd99169957cddd8..f03bb3349e9f632ebb97ef7efeb972074f19f271 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "address.h"
 #include "filter.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
@@ -139,7 +139,8 @@ static const char *_mutt_fmt_pgp_command(char *dest, size_t destlen, size_t col,
   if (optional)
     mutt_expando_format(dest, destlen, col, cols, ifstring, _mutt_fmt_pgp_command, data, 0);
   else if (flags & MUTT_FORMAT_OPTIONAL)
-    mutt_expando_format(dest, destlen, col, cols, elsestring, _mutt_fmt_pgp_command, data, 0);
+    mutt_expando_format(dest, destlen, col, cols, elsestring,
+                        _mutt_fmt_pgp_command, data, 0);
 
   return src;
 }
@@ -148,7 +149,7 @@ static void mutt_pgp_command(char *d, size_t dlen,
                              struct PgpCommandContext *cctx, const char *fmt)
 {
   mutt_expando_format(d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt),
-                    _mutt_fmt_pgp_command, (unsigned long) cctx, 0);
+                      _mutt_fmt_pgp_command, (unsigned long) cctx, 0);
   mutt_debug(2, "mutt_pgp_command: %s\n", d);
 }
 
@@ -315,7 +316,7 @@ pid_t pgp_invoke_verify_key(FILE **pgpin, FILE **pgpout, FILE **pgperr, int pgpi
 
 pid_t pgp_invoke_list_keys(FILE **pgpin, FILE **pgpout, FILE **pgperr,
                            int pgpinfd, int pgpoutfd, int pgperrfd,
-                          enum PgpRing keyring, struct ListHead *hints)
+                           enum PgpRing keyring, struct ListHead *hints)
 {
   char uids[HUGE_STRING];
   char tmpuids[HUGE_STRING];
index 83fff289ecca8cf0d6ba21d3fb2b19bb0df5d3e7..c44795ced21ba4390375a985e971366c020615d2 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "pgpkey.h"
 #include "address.h"
@@ -42,7 +43,6 @@
 #include "globals.h"
 #include "gnupgparse.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -305,7 +305,7 @@ static void pgp_entry(char *s, size_t l, struct Menu *menu, int num)
   entry.num = num + 1;
 
   mutt_expando_format(s, l, 0, MuttIndexWindow->cols, NONULL(PgpEntryFormat),
-                    pgp_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
+                      pgp_entry_fmt, (unsigned long) &entry, MUTT_FORMAT_ARROWCURSOR);
 }
 
 static int _pgp_compare_address(const void *a, const void *b)
@@ -610,7 +610,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
           }
 
         if (option(OPT_PGP_CHECK_TRUST) && (!pgp_id_is_valid(KeyTable[menu->current]) ||
-                                         !pgp_id_is_strong(KeyTable[menu->current])))
+                                            !pgp_id_is_strong(KeyTable[menu->current])))
         {
           char *str = "";
           char buff[LONG_STRING];
index d6e23c53f52ee7ee816e69303e76bd973ddde727..54f191dd3ad1c186a7b642014f731aa70d63f2f6 100644 (file)
@@ -24,8 +24,8 @@
 
 #include "config.h"
 #include <stdbool.h>
-#include "pgplib.h"
 #include "lib/lib.h"
+#include "pgplib.h"
 
 const char *pgp_pkalgbytype(unsigned char type)
 {
index 33ed5bc1af9c7adfc7daf6766431a9fd2e03b548..b10edfbd87a7b0944a91cffee24a41fe901f2b8b 100644 (file)
@@ -31,8 +31,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#include "mutt.h"
 #include "lib/lib.h"
+#include "mutt.h"
 #include "pgppacket.h"
 #include "protos.h"
 #include "state.h"
index 4f533ae113f412ce42b652e336dfc3f7c557eed0..f25aff8f8aadfac7b1a34ea0002448546558d130 100644 (file)
@@ -32,8 +32,8 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "smime.h"
 #include "address.h"
 #include "alias.h"
 #include "body.h"
@@ -46,7 +46,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
@@ -56,6 +55,7 @@
 #include "parameter.h"
 #include "protos.h"
 #include "rfc822.h"
+#include "smime.h"
 #include "state.h"
 
 /**
@@ -286,10 +286,11 @@ static const char *_mutt_fmt_smime_command(char *dest, size_t destlen, size_t co
   }
 
   if (optional)
-    mutt_expando_format(dest, destlen, col, cols, ifstring, _mutt_fmt_smime_command, data, 0);
+    mutt_expando_format(dest, destlen, col, cols, ifstring,
+                        _mutt_fmt_smime_command, data, 0);
   else if (flags & MUTT_FORMAT_OPTIONAL)
     mutt_expando_format(dest, destlen, col, cols, elsestring,
-                      _mutt_fmt_smime_command, data, 0);
+                        _mutt_fmt_smime_command, data, 0);
 
   return src;
 }
@@ -298,7 +299,7 @@ static void smime_command(char *d, size_t dlen,
                           struct SmimeCommandContext *cctx, const char *fmt)
 {
   mutt_expando_format(d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt),
-                    _mutt_fmt_smime_command, (unsigned long) cctx, 0);
+                      _mutt_fmt_smime_command, (unsigned long) cctx, 0);
   mutt_debug(2, "smime_command: %s\n", d);
 }
 
@@ -1293,15 +1294,15 @@ static pid_t smime_invoke_encrypt(FILE **smimein, FILE **smimeout, FILE **smimee
                                   const char *fname, const char *uids)
 {
   return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
-                      smimeerrfd, fname, NULL, SmimeEncryptWith, NULL, NULL, uids,
-                      NULL, SmimeEncryptCommand);
+                      smimeerrfd, fname, NULL, SmimeEncryptWith, NULL, NULL,
+                      uids, NULL, SmimeEncryptCommand);
 }
 
 static pid_t smime_invoke_sign(FILE **smimein, FILE **smimeout, FILE **smimeerr, int smimeinfd,
                                int smimeoutfd, int smimeerrfd, const char *fname)
 {
-  return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd,
-                      smimeerrfd, fname, NULL, NULL, SmimeSignDigestAlg, SmimeKeyToUse,
+  return smime_invoke(smimein, smimeout, smimeerr, smimeinfd, smimeoutfd, smimeerrfd,
+                      fname, NULL, NULL, SmimeSignDigestAlg, SmimeKeyToUse,
                       SmimeCertToUse, SmimeIntermediateToUse, SmimeSignCommand);
 }
 
index 489fb561b7c3f15bbd5d7d98c8916a9d9a97c0b0..4874cbe08914a3f7ed532e8dab69c227ddf6003f 100644 (file)
--- a/newsrc.c
+++ b/newsrc.c
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "bcache.h"
@@ -39,7 +40,6 @@
 #include "format_flags.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_socket.h"
 #include "mx.h"
@@ -1029,7 +1029,7 @@ struct NntpServer *nntp_select_server(char *server, int leave_lock)
   if (rc >= 0)
   {
     mutt_expando_format(file, sizeof(file), 0, MuttIndexWindow->cols,
-                      NONULL(NewsRc), nntp_format_str, (unsigned long) nserv, 0);
+                        NONULL(NewsRc), nntp_format_str, (unsigned long) nserv, 0);
     mutt_expand_path(file, sizeof(file));
     nserv->newsrc_file = safe_strdup(file);
     rc = nntp_newsrc_parse(nserv);
diff --git a/nntp.c b/nntp.c
index 06a79bc4a0567f384a2b73b6a9fb9dbfbf36e9b4..91cf9d7966ee233ddbd15bab08241e073a980a5b 100644 (file)
--- a/nntp.c
+++ b/nntp.c
@@ -27,6 +27,7 @@
 #include <limits.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "nntp.h"
 #include "account.h"
@@ -36,7 +37,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "mutt_socket.h"
@@ -1453,8 +1453,7 @@ static int nntp_open_mailbox(struct Context *ctx)
   struct Url url;
 
   strfcpy(buf, ctx->path, sizeof(buf));
-  if (url_parse(&url, buf) < 0 || !url.path ||
-      !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
+  if (url_parse(&url, buf) < 0 || !url.path || !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
   {
     mutt_error(_("%s is an invalid newsgroup specification!"), ctx->path);
     mutt_sleep(2);
@@ -1540,8 +1539,8 @@ static int nntp_open_mailbox(struct Context *ctx)
 
   time(&nserv->check_time);
   ctx->data = nntp_data;
-  if (!nntp_data->bcache &&
-      (nntp_data->newsrc_ent || nntp_data->subscribed || option(OPT_SAVE_UNSUBSCRIBED)))
+  if (!nntp_data->bcache && (nntp_data->newsrc_ent || nntp_data->subscribed ||
+                             option(OPT_SAVE_UNSUBSCRIBED)))
     nntp_data->bcache = mutt_bcache_open(&nserv->conn->account, nntp_data->group);
 
   /* strip off extra articles if adding context is greater than $nntp_context */
diff --git a/pager.c b/pager.c
index dfb96f3fd352fc69110072ef50312ab7d4633abd..e7c807e7ff30c515629d4723e6443082e1bdb186 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -35,8 +35,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "pager.h"
 #include "alias.h"
 #include "attach.h"
 #include "body.h"
@@ -46,7 +46,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
@@ -56,6 +55,7 @@
 #include "ncrypt/ncrypt.h"
 #include "opcodes.h"
 #include "options.h"
+#include "pager.h"
 #include "pattern.h"
 #include "protos.h"
 #include "sort.h"
@@ -99,7 +99,7 @@ static struct Header *OldHdr = NULL;
   }
 
 #define CHECK_ATTACH                                                           \
-  if (option(OPT_ATTACH_MSG))                                                    \
+  if (option(OPT_ATTACH_MSG))                                                  \
   {                                                                            \
     mutt_flushinp();                                                           \
     mutt_error(_(Function_not_permitted_in_attach_message_mode));              \
@@ -914,7 +914,8 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
         color_line = ColorBodyList;
       while (color_line)
       {
-        if (regexec(&color_line->regex, buf + offset, 1, pmatch, (offset ? REG_NOTBOL : 0)) == 0)
+        if (regexec(&color_line->regex, buf + offset, 1, pmatch,
+                    (offset ? REG_NOTBOL : 0)) == 0)
         {
           if (pmatch[0].rm_eo != pmatch[0].rm_so)
           {
@@ -982,7 +983,8 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
       null_rx = false;
       for (color_line = ColorAttachList; color_line; color_line = color_line->next)
       {
-        if (regexec(&color_line->regex, buf + offset, 1, pmatch, (offset ? REG_NOTBOL : 0)) == 0)
+        if (regexec(&color_line->regex, buf + offset, 1, pmatch,
+                    (offset ? REG_NOTBOL : 0)) == 0)
         {
           if (pmatch[0].rm_eo != pmatch[0].rm_so)
           {
@@ -2921,7 +2923,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
               !((struct NntpData *) extra->ctx->data)->allowed && query_quadoption(OPT_POST_MODERATED, _("Posting to this group not allowed, may be moderated. Continue?")) != MUTT_YES)
             break;
           if (IsMsgAttach(extra))
-            mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy, SENDNEWS | SENDREPLY);
+            mutt_attach_reply(extra->fp, extra->hdr, extra->actx, extra->bdy,
+                              SENDNEWS | SENDREPLY);
           else
             ci_send_message(SENDNEWS | SENDREPLY, NULL, NULL, extra->ctx, extra->hdr);
           pager_menu->redraw = REDRAW_FULL;
index da96b92b85d4abefe258feb574472204455e19f7..8d2346141658bb4f9567c103a4b3e67be2ad96b2 100644 (file)
@@ -89,4 +89,3 @@ void mutt_delete_parameter(const char *attribute, struct Parameter **p)
     }
   }
 }
-
diff --git a/parse.c b/parse.c
index e8e5d146a5e531931d365782ec4011ee0f36a7bf..24db10308f5082a13cbe5301125d46373f0d72a2 100644 (file)
--- a/parse.c
+++ b/parse.c
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "body.h"
 #include "charset.h"
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
index 8411b36573fb34950e74322fe6429137c8fef04e..613ce916ae944257f008c950fb910afcab05daa7 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -38,8 +38,8 @@
 #include <unistd.h>
 #include <wchar.h>
 #include <wctype.h>
+#include "lib/lib.h"
 #include "mutt.h"
-#include "pattern.h"
 #include "address.h"
 #include "body.h"
 #include "context.h"
 #include "globals.h"
 #include "group.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
-#include "mutt.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
 #include "ncrypt/ncrypt.h"
 #include "opcodes.h"
 #include "options.h"
+#include "pattern.h"
 #include "protos.h"
 #include "state.h"
 #include "thread.h"
@@ -113,7 +112,8 @@ static bool eat_regexp(struct Pattern *pat, struct Buffer *s, struct Buffer *err
   else
   {
     pat->p.regex = safe_malloc(sizeof(regex_t));
-    r = REGCOMP(pat->p.regex, buf.data, REG_NEWLINE | REG_NOSUB | mutt_which_case(buf.data));
+    r = REGCOMP(pat->p.regex, buf.data,
+                REG_NEWLINE | REG_NOSUB | mutt_which_case(buf.data));
     if (r)
     {
       regerror(r, pat->p.regex, errmsg, sizeof(errmsg));
diff --git a/pop.c b/pop.c
index ee9ac2c1aaf227298185760f6a66279b3836b85f..4e00ef9c5a99f2e299c28ab239bd3a18cf9b8309 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "pop.h"
 #include "account.h"
@@ -37,7 +38,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mutt_curses.h"
 #include "mutt_socket.h"
index f97447645f825785cf68d6c8a2f738a614421ada..9b8c200fc686a40f06f8650a111054fdf20141f1 100644 (file)
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
+#include "mutt.h"
 #include "account.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_socket.h"
 #include "options.h"
 #include "pop.h"
 #include "protos.h"
 #include "rfc822.h"
-#include "mutt.h"
 #ifdef USE_SASL
 #include <sasl/sasl.h>
 #include <sasl/saslutil.h>
index 3753bad865d451ecfbb71e67d40a4835cd967d44..4f9937ab692aaefb51d50aa2f888cf57ef2a40f6 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "context.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_socket.h"
 #include "options.h"
@@ -326,7 +326,8 @@ int pop_open_connection(struct PopData *pop_data)
       pop_data->use_stls = 2;
     if (pop_data->use_stls == 0)
     {
-      ret = query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?"));
+      ret =
+          query_quadoption(OPT_SSL_STARTTLS, _("Secure connection with TLS?"));
       if (ret == MUTT_ABORT)
         return -2;
       pop_data->use_stls = 1;
index 6eeaa337a6d6549c8478c84f09fcd73e67129f97..da1d583356f72795987d328bb625a92e61df373b 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "body.h"
 #include "context.h"
@@ -37,7 +38,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
@@ -573,7 +573,7 @@ int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr,
     mutt_message(_("Decrypting message..."));
     if ((crypt_pgp_decrypt_mime(fp, &bfp, newhdr->content, &b) == -1) || b == NULL)
     {
-err:
+    err:
       mx_close_message(ctx, &msg);
       mutt_free_envelope(&newhdr->env);
       mutt_free_body(&newhdr->content);
@@ -597,7 +597,7 @@ err:
     newhdr->security |= SIGN;
     if ((WithCrypto & APPLICATION_PGP) &&
         (mutt_strcasecmp(mutt_get_parameter("protocol", newhdr->content->parameter),
-                          "application/pgp-signature") == 0))
+                         "application/pgp-signature") == 0))
       newhdr->security |= APPLICATION_PGP;
     else if ((WithCrypto & APPLICATION_SMIME))
       newhdr->security |= APPLICATION_SMIME;
diff --git a/query.c b/query.c
index 9d49ae5c7ff410f6265cc14a7e72bb0828baf007..82e482c47c7d5f08acdf11cc54fca5b28b2a6675 100644 (file)
--- a/query.c
+++ b/query.c
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
@@ -39,7 +40,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
@@ -259,7 +259,7 @@ static void query_entry(char *s, size_t slen, struct Menu *m, int num)
 
   entry->data->num = num;
   mutt_expando_format(s, slen, 0, MuttIndexWindow->cols, NONULL(QueryFormat),
-                    query_format_str, (unsigned long) entry, MUTT_FORMAT_ARROWCURSOR);
+                      query_format_str, (unsigned long) entry, MUTT_FORMAT_ARROWCURSOR);
 }
 
 static int query_tag(struct Menu *menu, int n, int m)
index 4d50919ed4bba6df4929531bd503d272377aa5d7..56a7b5ee0396894ccdcf3d4ecd0a66a9893567b2 100644 (file)
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "attach.h"
 #include "body.h"
@@ -41,7 +42,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mailbox.h"
 #include "mime.h"
 #include "mutt_curses.h"
@@ -1311,26 +1311,30 @@ void mutt_view_attachments(struct Header *hdr)
 
       case OP_RESEND:
         CHECK_ATTACH;
-        mutt_attach_resend(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content);
+        mutt_attach_resend(CURATTACH->fp, hdr, actx,
+                           menu->tagprefix ? NULL : CURATTACH->content);
         menu->redraw = REDRAW_FULL;
         break;
 
       case OP_BOUNCE_MESSAGE:
         CHECK_ATTACH;
-        mutt_attach_bounce(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content);
+        mutt_attach_bounce(CURATTACH->fp, hdr, actx,
+                           menu->tagprefix ? NULL : CURATTACH->content);
         menu->redraw = REDRAW_FULL;
         break;
 
       case OP_FORWARD_MESSAGE:
         CHECK_ATTACH;
-        mutt_attach_forward(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content, 0);
+        mutt_attach_forward(CURATTACH->fp, hdr, actx,
+                            menu->tagprefix ? NULL : CURATTACH->content, 0);
         menu->redraw = REDRAW_FULL;
         break;
 
 #ifdef USE_NNTP
       case OP_FORWARD_TO_GROUP:
         CHECK_ATTACH;
-        mutt_attach_forward(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content, SENDNEWS);
+        mutt_attach_forward(CURATTACH->fp, hdr, actx,
+                            menu->tagprefix ? NULL : CURATTACH->content, SENDNEWS);
         menu->redraw = REDRAW_FULL;
         break;
 
@@ -1338,11 +1342,13 @@ void mutt_view_attachments(struct Header *hdr)
         CHECK_ATTACH;
 
         if (!CURATTACH->content->hdr->env->followup_to ||
-            (mutt_strcasecmp(CURATTACH->content->hdr->env->followup_to, "poster") != 0) ||
+            (mutt_strcasecmp(CURATTACH->content->hdr->env->followup_to,
+                             "poster") != 0) ||
             query_quadoption(OPT_FOLLOWUP_TO_POSTER,
                              _("Reply by mail as poster prefers?")) != MUTT_YES)
         {
-          mutt_attach_reply(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content,
+          mutt_attach_reply(CURATTACH->fp, hdr, actx,
+                            menu->tagprefix ? NULL : CURATTACH->content,
                             SENDNEWS | SENDREPLY);
           menu->redraw = REDRAW_FULL;
           break;
@@ -1357,7 +1363,8 @@ void mutt_view_attachments(struct Header *hdr)
 
         flags = SENDREPLY | (op == OP_GROUP_REPLY ? SENDGROUPREPLY : 0) |
                 (op == OP_LIST_REPLY ? SENDLISTREPLY : 0);
-        mutt_attach_reply(CURATTACH->fp, hdr, actx, menu->tagprefix ? NULL : CURATTACH->content, flags);
+        mutt_attach_reply(CURATTACH->fp, hdr, actx,
+                          menu->tagprefix ? NULL : CURATTACH->content, flags);
         menu->redraw = REDRAW_FULL;
         break;
 
index ec39e52965f371096d54d1c1ce5635db30a38183..c1c0ce3551372ee0949f98feee32a9da61737a4a 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -25,6 +25,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "alias.h"
 #include "attach.h"
@@ -33,7 +34,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 #include "options.h"
@@ -431,7 +431,8 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx
   if (option(OPT_FORWARD_QUOTE))
   {
     if (!option(OPT_TEXT_FLOWED))
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0);
+      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
+                        parent_hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
   }
@@ -581,7 +582,8 @@ static void attach_forward_msgs(FILE *fp, struct Header *hdr,
 
   tmpbody[0] = '\0';
 
-  if ((rc = query_quadoption(OPT_MIME_FORWARD, _("Forward MIME encapsulated?"))) == MUTT_NO)
+  if ((rc = query_quadoption(OPT_MIME_FORWARD,
+                             _("Forward MIME encapsulated?"))) == MUTT_NO)
   {
     /* no MIME encapsulation */
 
@@ -875,7 +877,8 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx,
     st.fpout = tmpfp;
 
     if (!option(OPT_TEXT_FLOWED))
-      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context, parent_hdr, 0);
+      _mutt_make_string(prefix, sizeof(prefix), NONULL(IndentString), Context,
+                        parent_hdr, 0);
     else
       strfcpy(prefix, ">", sizeof(prefix));
 
index 6873f38e5869b74eddd3cc9e9ecabea82e8fc038..dfad703f5c21e77393e3dfe4625dbf8fcbd1eedb 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "remailer.h"
 #include "address.h"
@@ -39,7 +40,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
@@ -189,7 +189,7 @@ static struct Remailer **mix_type2_list(size_t *l)
     mix_add_entry(&type2_list, p, &slots, &used);
     continue;
 
-problem:
+  problem:
     mix_free_remailer(&p);
   }
 
@@ -412,7 +412,7 @@ static void mix_entry(char *b, size_t blen, struct Menu *menu, int num)
 {
   struct Remailer **type2_list = (struct Remailer **) menu->data;
   mutt_expando_format(b, blen, 0, MuttIndexWindow->cols, NONULL(MixEntryFormat), mix_entry_fmt,
-                    (unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
+                      (unsigned long) type2_list[num], MUTT_FORMAT_ARROWCURSOR);
 }
 
 static int mix_chain_add(struct MixChain *chain, const char *s, struct Remailer **type2_list)
@@ -724,7 +724,7 @@ int mix_send_message(struct ListHead *chain, const char *tempfile)
     strfcpy(tmp, cmd, sizeof(tmp));
     mutt_quote_filename(cd_quoted, sizeof(cd_quoted), np->data);
     snprintf(cmd, sizeof(cmd), "%s%s%s", tmp,
-        (np == STAILQ_FIRST(chain)) ? " -l " : ",", cd_quoted);
+             (np == STAILQ_FIRST(chain)) ? " -l " : ",", cd_quoted);
   }
 
   if (!option(OPT_NO_CURSES))
index 242bd01027e2eeee9bfba4361dfb280a83c034a8..9cc16e9a85ab1d106abd9820b86b765712395e19 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "rfc1524.h"
 #include "body.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
index 239dce73d12625c484c625c92cc7f0d2e7b6b8fe..feedb182d53ec1b190c1dc9f5705a2278d1895f4 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
 #include <errno.h>
 #include <iconv.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "rfc2047.h"
 #include "address.h"
 #include "charset.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mime.h"
 #include "options.h"
index 5760c6c97e872d50436d8dda3941dc2189912985..2092bd228a062c12030bc9dd22e49320183b5044 100644 (file)
--- a/rfc2231.c
+++ b/rfc2231.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "rfc2231.h"
 #include "charset.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mbyte.h"
 #include "mime.h"
 #include "options.h"
index 729107cb995e5a38b8446fa19b35d0b50837ca1d..582d444882964edb3c4bcd673f4694951e46a4ea 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "body.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "options.h"
 #include "parameter.h"
index fc8835d1b58a9c9621bf9a055a2d2553d1c9b56d..71388e8253d19be48dcf5de04cf06dc00753e4f0 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -23,8 +23,8 @@
 #include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "rfc822.h"
 #include "lib/lib.h"
+#include "rfc822.h"
 #include "mutt_idna.h"
 
 const char RFC822Specials[] = "@.,:;<>[]\\\"()";
diff --git a/score.c b/score.c
index ab51ae98200ef42e55cf8778416374f20f46bc1f..98362a24d98d7c80cd1d05751407ca185bdd41bd 100644 (file)
--- a/score.c
+++ b/score.c
 #include "config.h"
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "context.h"
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "lib/lib.h"
 #include "mutt_menu.h"
 #include "options.h"
 #include "pattern.h"
diff --git a/send.c b/send.c
index e8e2421b8df3f573bf6de2f0b66f7cf035771ce8..8301ebc385c24c5a77fb010e69eb343d35e02dcb 100644 (file)
--- a/send.c
+++ b/send.c
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "alias.h"
@@ -42,7 +43,6 @@
 #include "filter.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
@@ -267,7 +267,8 @@ static int edit_envelope(struct Envelope *en, int flags)
       strfcpy(buf, en->followup_to, sizeof(buf));
     else
       buf[0] = 0;
-    if (option(OPT_ASK_FOLLOW_UP) && mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
+    if (option(OPT_ASK_FOLLOW_UP) &&
+        mutt_get_field("Followup-To: ", buf, sizeof(buf), 0) != 0)
       return -1;
     FREE(&en->followup_to);
     en->followup_to = safe_strdup(buf);
@@ -291,7 +292,8 @@ static int edit_envelope(struct Envelope *en, int flags)
       return -1;
     if (option(OPT_ASKBCC) && edit_address(&en->bcc, _("Bcc: ")) == -1)
       return -1;
-    if (option(OPT_REPLY_WITH_XORIG) && (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
+    if (option(OPT_REPLY_WITH_XORIG) &&
+        (flags & (SENDREPLY | SENDLISTREPLY | SENDGROUPREPLY)) &&
         (edit_address(&en->from, "From: ") == -1))
       return -1;
   }
@@ -320,7 +322,8 @@ static int edit_envelope(struct Envelope *en, int flags)
   }
 
   if (mutt_get_field(_("Subject: "), buf, sizeof(buf), 0) != 0 ||
-      (!buf[0] && query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort?")) != MUTT_NO))
+      (!buf[0] &&
+       query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort?")) != MUTT_NO))
   {
     mutt_message(_("No subject, aborting."));
     return -1;
@@ -1472,7 +1475,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
           msg->env->from->mailbox);
     msg->env->from = set_reverse_name(cur->env);
   }
-  if (cur && option(OPT_REPLY_WITH_XORIG) && !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
+  if (cur && option(OPT_REPLY_WITH_XORIG) &&
+      !(flags & (SENDPOSTPONED | SENDRESEND | SENDFORWARD)))
   {
     /* We shouldn't have to worry about freeing `msg->env->from' before
      * setting it here since this code will only execute when doing some
@@ -1515,7 +1519,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       msg->env->newsgroups = safe_strdup(((struct NntpData *) ctx->data)->group);
 #endif
 
-    if (!(flags & (SENDMAILX | SENDBATCH)) && !(option(OPT_AUTOEDIT) && option(OPT_EDIT_HEADERS)) &&
+    if (!(flags & (SENDMAILX | SENDBATCH)) &&
+        !(option(OPT_AUTOEDIT) && option(OPT_EDIT_HEADERS)) &&
         !((flags & SENDREPLY) && option(OPT_FAST_REPLY)))
     {
       if (edit_envelope(msg->env, flags) == -1)
@@ -1683,7 +1688,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       {
         /* if the file was not modified, bail out now */
         if (mtime == st.st_mtime && !msg->content->next &&
-            query_quadoption(OPT_ABORT_UNMODIFIED, _("Abort unmodified message?")) == MUTT_YES)
+            query_quadoption(OPT_ABORT_UNMODIFIED,
+                             _("Abort unmodified message?")) == MUTT_YES)
         {
           mutt_message(_("Aborted unmodified message."));
           goto cleanup;
@@ -1922,7 +1928,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
   }
 
   if (!msg->env->subject && !(flags & SENDBATCH) &&
-      (i = query_quadoption(OPT_ABORT_NOSUBJECT, _("No subject, abort sending?"))) != MUTT_NO)
+      (i = query_quadoption(OPT_ABORT_NOSUBJECT,
+                            _("No subject, abort sending?"))) != MUTT_NO)
   {
     /* if the abort is automatic, print an error message */
     if (quadoption(OPT_ABORT_NOSUBJECT) == MUTT_YES)
@@ -1945,7 +1952,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
 
   if (quadoption(OPT_ABORT_NOATTACH) != MUTT_NO && !msg->content->next &&
       search_attach_keyword(msg->content->filename) &&
-      query_quadoption(OPT_ABORT_NOATTACH, _("No attachments, cancel sending?")) != MUTT_NO)
+      query_quadoption(OPT_ABORT_NOATTACH,
+                       _("No attachments, cancel sending?")) != MUTT_NO)
   {
     /* if the abort is automatic, print an error message */
     if (quadoption(OPT_ABORT_NOATTACH) == MUTT_YES)
index 2800761e5d59cc47c23ac1cdd338a31df1c276af..cd662c99533eda02f54902051d6a3a5ec306304e 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -38,6 +38,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <wchar.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "address.h"
 #include "body.h"
@@ -51,7 +52,6 @@
 #include "format_flags.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
 #include "mime.h"
@@ -1337,7 +1337,8 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i
 
   if (WithCrypto)
   {
-    if ((option(OPT_MIME_FORWARD_DECODE) || option(OPT_FORWARD_DECRYPT)) && (hdr->security & ENCRYPT))
+    if ((option(OPT_MIME_FORWARD_DECODE) || option(OPT_FORWARD_DECRYPT)) &&
+        (hdr->security & ENCRYPT))
     {
       if (!crypt_valid_passphrase(hdr->security))
         return NULL;
@@ -1461,7 +1462,8 @@ struct Body *mutt_make_file_attach(const char *path)
   if (!att->subtype)
     mutt_lookup_mime_type(att, path);
 
-  if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand && !option(OPT_MIME_TYPE_QUERY_FIRST))
+  if (!att->subtype && MimeTypeQueryCommand && *MimeTypeQueryCommand &&
+      !option(OPT_MIME_TYPE_QUERY_FIRST))
     run_mime_type_query(att);
 
   if ((info = mutt_get_content_info(path, att)) == NULL)
@@ -1633,7 +1635,7 @@ void mutt_write_references(const struct ListHead *r, FILE *f, size_t trim)
       break;
   }
 
-  struct ListNode **ref = safe_calloc(length, sizeof(struct ListNode*));
+  struct ListNode **ref = safe_calloc(length, sizeof(struct ListNode *));
 
   // store in reverse order
   size_t tmp = length;
@@ -2495,8 +2497,8 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
   {
     char cmd[LONG_STRING];
 
-    mutt_expando_format(cmd, sizeof(cmd), 0, MuttIndexWindow->cols, NONULL(Inews),
-                      nntp_format_str, 0, 0);
+    mutt_expando_format(cmd, sizeof(cmd), 0, MuttIndexWindow->cols,
+                        NONULL(Inews), nntp_format_str, 0, 0);
     if (!*cmd)
     {
       i = nntp_post(msg);
@@ -2612,7 +2614,8 @@ int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Addres
   if (!option(OPT_NO_CURSES))
     mutt_need_hard_redraw();
 
-  if ((i = send_msg(path, args, msg, option(OPT_NO_CURSES) ? NULL : &childout)) != (EX_OK & 0xff))
+  if ((i = send_msg(path, args, msg, option(OPT_NO_CURSES) ? NULL : &childout)) !=
+      (EX_OK & 0xff))
   {
     if (i != S_BKG)
     {
index 510522afa3d59c6aae73141e10d1b4ab9312fd91..29f72bf337c19c7179b33748cb9affeee904d74f 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "sidebar.h"
 #include "buffy.h"
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mx.h"
@@ -222,11 +222,11 @@ static const char *cb_format_str(char *dest, size_t destlen, size_t col, int col
   }
 
   if (optional)
-    mutt_expando_format(dest, destlen, col, SidebarWidth, ifstring, cb_format_str,
-                      (unsigned long) sbe, flags);
+    mutt_expando_format(dest, destlen, col, SidebarWidth, ifstring,
+                        cb_format_str, (unsigned long) sbe, flags);
   else if (flags & MUTT_FORMAT_OPTIONAL)
     mutt_expando_format(dest, destlen, col, SidebarWidth, elsestring,
-                      cb_format_str, (unsigned long) sbe, flags);
+                        cb_format_str, (unsigned long) sbe, flags);
 
   /* We return the format string, unchanged */
   return src;
@@ -252,8 +252,8 @@ static void make_sidebar_entry(char *buf, unsigned int buflen, int width,
 
   strfcpy(sbe->box, box, sizeof(sbe->box));
 
-  mutt_expando_format(buf, buflen, 0, width, NONULL(SidebarFormat), cb_format_str,
-                    (unsigned long) sbe, 0);
+  mutt_expando_format(buf, buflen, 0, width, NONULL(SidebarFormat),
+                      cb_format_str, (unsigned long) sbe, 0);
 
   /* Force string to be exactly the right width */
   int w = mutt_strwidth(buf);
@@ -859,15 +859,14 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
 
     /* compute length of Folder without trailing separator */
     size_t maildirlen = mutt_strlen(Folder);
-    if (maildirlen && SidebarDelimChars &&
-        strchr(SidebarDelimChars, Folder[maildirlen - 1]))
+    if (maildirlen && SidebarDelimChars && strchr(SidebarDelimChars, Folder[maildirlen - 1]))
       maildirlen--;
 
     /* check whether Folder is a prefix of the current folder's path */
     bool maildir_is_prefix = false;
     if ((mutt_strlen(b->path) > maildirlen) &&
-        (mutt_strncmp(Folder, b->path, maildirlen) == 0) &&
-        SidebarDelimChars && strchr(SidebarDelimChars, b->path[maildirlen]))
+        (mutt_strncmp(Folder, b->path, maildirlen) == 0) && SidebarDelimChars &&
+        strchr(SidebarDelimChars, b->path[maildirlen]))
       maildir_is_prefix = true;
 
     /* calculate depth of current folder and generate its display name with indented spaces */
index 0ad1788ace0283d8c13894f8a6c2f934376c9953..e6fb416419469d8efaff414d88e42eaa1a0aab3e 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -26,8 +26,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "globals.h"
 #include "lib/lib.h"
+#include "globals.h"
 #include "mutt_curses.h"
 #include "options.h"
 
diff --git a/smtp.c b/smtp.c
index 506957c52e6c5a2ca36dbe1d2f3d3f5409363f5a..2df073377c2ca1e102a604dc9fc6338ba4f56276 100644 (file)
--- a/smtp.c
+++ b/smtp.c
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "account.h"
 #include "address.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_socket.h"
 #include "options.h"
diff --git a/sort.c b/sort.c
index e41c5bb3cad46a73aac3858898f6232e236a237f..b76a66ff0dbdf9848f3e5902a2c230ea99daf00d 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -23,6 +23,7 @@
 #include "config.h"
 #include <stdlib.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "sort.h"
 #include "address.h"
@@ -31,7 +32,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "mutt_idna.h"
 #include "options.h"
 #include "protos.h"
 static sort_t *AuxSort = NULL;
 
 #define AUXSORT(code, a, b)                                                    \
-  if (!code && AuxSort && !option(OPT_AUX_SORT))                                 \
+  if (!code && AuxSort && !option(OPT_AUX_SORT))                               \
   {                                                                            \
-    set_option(OPT_AUX_SORT);                                                    \
+    set_option(OPT_AUX_SORT);                                                  \
     code = AuxSort(a, b);                                                      \
-    unset_option(OPT_AUX_SORT);                                                  \
+    unset_option(OPT_AUX_SORT);                                                \
   }                                                                            \
   if (!code)                                                                   \
     code = (*((struct Header **) a))->index - (*((struct Header **) b))->index;
diff --git a/state.c b/state.c
index 49a575165931661faa552952f3c745a6fd2839cb..108b6e9ef95a78edf0bf11e01b3236689e20efe1 100644 (file)
--- a/state.c
+++ b/state.c
@@ -111,4 +111,3 @@ void state_prefix_put(const char *d, size_t dlen, struct State *s)
   else
     fwrite(d, dlen, 1, s->fpout);
 }
-
index 3ee336e7b53b35d3298a15e376f6e0d4a80967d2..01b9174fd907c51191f4b836b5536af9723ecebb 100644 (file)
--- a/status.c
+++ b/status.c
 
 #include "config.h"
 #include <stdio.h>
+#include "lib/lib.h"
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mbtable.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
@@ -327,12 +327,13 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c
 static void _menu_status_line(char *buf, size_t buflen, size_t col, int cols,
                               struct Menu *menu, const char *p)
 {
-  mutt_expando_format(buf, buflen, col, cols, p, status_format_str, (unsigned long) menu, 0);
+  mutt_expando_format(buf, buflen, col, cols, p, status_format_str,
+                      (unsigned long) menu, 0);
 }
 
 void menu_status_line(char *buf, size_t buflen, struct Menu *menu, const char *p)
 {
   mutt_expando_format(buf, buflen, 0,
-                    menu ? menu->statuswin->cols : MuttStatusWindow->cols, p,
-                    status_format_str, (unsigned long) menu, 0);
+                      menu ? menu->statuswin->cols : MuttStatusWindow->cols, p,
+                      status_format_str, (unsigned long) menu, 0);
 }
index b090e22c8251727f1911837a507f84bb911b7930..306c37e291ace04121b981f2c4206f8e631a9029 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "thread.h"
 #include "body.h"
@@ -32,7 +33,6 @@
 #include "envelope.h"
 #include "globals.h"
 #include "header.h"
-#include "lib/lib.h"
 #include "list.h"
 #include "options.h"
 #include "protos.h"
@@ -388,7 +388,7 @@ static void make_subject_list(struct ListHead *subjects, struct MuttThread *cur,
     if (dateptr)
     {
       thisdate = option(OPT_THREAD_RECEIVED) ? cur->message->received :
-                                             cur->message->date_sent;
+                                               cur->message->date_sent;
       if (!*dateptr || thisdate < *dateptr)
         *dateptr = thisdate;
     }
@@ -404,9 +404,9 @@ static void make_subject_list(struct ListHead *subjects, struct MuttThread *cur,
           break;
       }
       if (!np)
-          mutt_list_insert_head(subjects, env->real_subj);
+        mutt_list_insert_head(subjects, env->real_subj);
       else if (rc > 0)
-          mutt_list_insert_after(subjects, np, env->real_subj);
+        mutt_list_insert_after(subjects, np, env->real_subj);
     }
 
     while (!cur->next && cur != start)
@@ -445,7 +445,7 @@ static struct MuttThread *find_subject(struct Context *ctx, struct MuttThread *c
           tmp->message->subject_changed && /* only match interesting replies */
           !is_descendant(tmp, cur) &&      /* don't match in the same thread */
           (date >= (option(OPT_THREAD_RECEIVED) ? tmp->message->received :
-                                                tmp->message->date_sent)) &&
+                                                  tmp->message->date_sent)) &&
           (!last || (option(OPT_THREAD_RECEIVED) ?
                          (last->message->received < tmp->message->received) :
                          (last->message->date_sent < tmp->message->date_sent))) &&
@@ -1411,8 +1411,7 @@ static void clean_references(struct MuttThread *brk, struct MuttThread *cur)
     for (p = brk; !done && p; p = p->parent)
     {
       for (ref = STAILQ_FIRST(&cur->message->env->references);
-           p->message && ref;
-           ref = STAILQ_NEXT(ref, entries))
+           p->message && ref; ref = STAILQ_NEXT(ref, entries))
       {
         if (mutt_strcasecmp(ref->data, p->message->env->message_id) == 0)
         {
diff --git a/url.c b/url.c
index 6b4cc44f077d9cbd61c804f613aa9b0985897a65..1d01483d8c0d877ef1bc8b787d75721d4e80c2be 100644 (file)
--- a/url.c
+++ b/url.c
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
+#include "lib/lib.h"
 #include "mutt.h"
 #include "url.h"
 #include "envelope.h"
 #include "globals.h"
-#include "lib/lib.h"
 #include "mime.h"
 #include "protos.h"
 #include "rfc2047.h"