]> granicus.if.org Git - mutt/commitdiff
Clean up code indentation.
authorKevin McCarthy <kevin@8t8.us>
Fri, 4 Jan 2019 03:58:18 +0000 (19:58 -0800)
committerKevin McCarthy <kevin@8t8.us>
Fri, 4 Jan 2019 21:59:27 +0000 (13:59 -0800)
These are mostly automated changes corresponding to the emacs
settings:
  (c-set-style "linux")
  (setq c-basic-offset 2)
  (c-set-offset 'case-label '+)

Most of the code follows the convention:
  (add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.

Also, I personally dislike tabs, so I have:
  (setq-default indent-tabs-mode nil)
in my own configuration.  However I have no desire to change every line
just for that effect.  So this cleanup does nothing about the mix issue.

Some of the secondary files (e.g. regex.c) have been skipped.

I've also skipped crypt-gpgme.c, because I need to think about that
file.  Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings.  It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.

I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.

107 files changed:
account.c
addrbook.c
alias.c
attach.c
bcache.c
browser.c
buffer.c
buffy.c
color.c
commands.c
complete.c
compose.c
compress.c
copy.c
crypt-mod-pgp-classic.c
crypt-mod-pgp-gpgme.c
crypt-mod-smime-classic.c
crypt-mod-smime-gpgme.c
crypt.c
cryptglue.c
curs_lib.c
curs_main.c
date.c
doc/makedoc.c
dotlock.c
edit.c
editmsg.c
enter.c
gnupgparse.c
handler.c
hash.c
hash.h
hcache.c
hcache.h
hdrline.c
headers.c
help.c
hook.c
imap/auth_anon.c
imap/auth_cram.c
imap/auth_gss.c
imap/auth_login.c
imap/auth_sasl.c
imap/browse.c
imap/command.c
imap/imap.c
imap/imap_private.h
imap/message.c
imap/utf7.c
imap/util.c
init.c
init.h
keymap.c
lib.c
main.c
mbox.c
mbyte.c
menu.c
mh.c
mime.h
mkdtemp.c
mutt.h
mutt_crypt.h
mutt_idna.c
mutt_sasl.c
mutt_socket.c
mutt_ssl.c
mutt_ssl_gnutls.c
muttlib.c
mx.c
pager.c
parse.c
pattern.c
pgp.c
pgp.h
pgpewrap.c
pgpinvoke.c
pgpkey.c
pgplib.c
pgpmicalg.c
pgppacket.c
pgppubring.c
pop.c
pop_auth.c
pop_lib.c
postpone.c
protos.h
query.c
recvattach.c
recvcmd.c
remailer.c
rfc1524.c
rfc2047.c
rfc2047.h
rfc2231.c
rfc822.c
send.c
sendlib.c
setenv.c
sidebar.c
smime.c
smtp.c
sort.c
status.c
thread.c
txt2c.c
utf8.c

index 31636adc6253dfda7eddf8e1a6da54a58bd14037..a005fa86b795174c5f0cf7b3bf73ef86467e6a40 100644 (file)
--- a/account.c
+++ b/account.c
@@ -280,7 +280,7 @@ char* mutt_account_getoauthbearer (ACCOUNT* account)
        one of your $*_authenticators and (2) you do not have the corresponding
        $*_oauth_refresh_command defined. So the message does not mean "None of
        your $*_oauth_refresh_command's are defined."
-     */
+    */
     mutt_error (_("mutt_account_getoauthbearer: No OAUTH refresh command defined"));
     return NULL;
   }
@@ -310,8 +310,8 @@ char* mutt_account_getoauthbearer (ACCOUNT* account)
   oauthbearer = safe_malloc (oalen);
 
   snprintf (oauthbearer, oalen,
-    "n,a=%s,\001host=%s\001port=%d\001auth=Bearer %s\001\001",
-    account->login, account->host, account->port, token);
+            "n,a=%s,\001host=%s\001port=%d\001auth=Bearer %s\001\001",
+            account->login, account->host, account->port, token);
 
   FREE (&token);
 
index 12bcaa115ab830e12bb7504fbaa3c471e8a186d9..da0d6e200c1f95dcb7094839836dc5b974828097 100644 (file)
@@ -177,7 +177,7 @@ new_aliases:
   if ((SortAlias & SORT_MASK) != SORT_ORDER)
   {
     qsort (AliasTable, i, sizeof (ALIAS *),
-        (SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_SortAddress : alias_SortAlias);
+           (SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_SortAddress : alias_SortAlias);
   }
 
   for (i=0; i<menu->max; i++) AliasTable[i]->num = i;
diff --git a/alias.c b/alias.c
index 62b54edc502675688daa1460069e9b0dee72d1be..4e4e89a62cece957bf3dcac2738e1afce4bbe022 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -388,7 +388,7 @@ retry_name:
 
   return;
 
-  fseek_err:
+fseek_err:
   mutt_perror (_("Error seeking in alias file"));
   safe_fclose (&rc);
   return;
@@ -411,7 +411,7 @@ int mutt_check_alias_name (const char *s, char *dest, size_t destlen)
   if (!dry)
     destlen--;
   for (; s && *s && (dry || destlen) &&
-       (l = mbrtowc (&wc, s, MB_CUR_MAX, &mb)) != 0;
+         (l = mbrtowc (&wc, s, MB_CUR_MAX, &mb)) != 0;
        s += l, destlen -= l)
   {
     bad = l == (size_t)(-1) || l == (size_t)(-2); /* conversion error */
@@ -447,7 +447,7 @@ int mutt_check_alias_name (const char *s, char *dest, size_t destlen)
 ADDRESS *alias_reverse_lookup (ADDRESS *a)
 {
   if (!a || !a->mailbox)
-      return NULL;
+    return NULL;
 
   return hash_find (ReverseAlias, a->mailbox);
 }
index 004da1d140b6c073c09eac2aedda56fe63daf0dc..62190820bb9e9c87cbb696b8f2815a6d783a1485 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -202,7 +202,7 @@ int mutt_compose_attachment (BODY *a)
   else
   {
     mutt_message (_("No mailcap compose entry for %s, creating empty file."),
-                  type);
+                  type);
     rc = 1;
     goto bailout;
   }
@@ -295,7 +295,7 @@ int mutt_edit_attachment (BODY *a)
 
   rc = 1;
 
-  bailout:
+bailout:
 
   if(unlink_newfile)
     unlink(mutt_b2s (newfile));
@@ -313,32 +313,34 @@ void mutt_check_lookup_list (BODY *b, char *type, int len)
   LIST *t = MimeLookupList;
   int i;
 
-  for (; t; t = t->next) {
+  for (; t; t = t->next)
+  {
     i = mutt_strlen (t->data) - 1;
     if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' &&
         ascii_strncasecmp (type, t->data, i) == 0) ||
-       ascii_strcasecmp (type, t->data) == 0) {
-
-    BODY tmp = {0};
-    int n;
-    if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER) {
-      snprintf (type, len, "%s/%s",
-                n == TYPEAUDIO ? "audio" :
-                n == TYPEAPPLICATION ? "application" :
-                n == TYPEIMAGE ? "image" :
-                n == TYPEMESSAGE ? "message" :
-                n == TYPEMODEL ? "model" :
-                n == TYPEMULTIPART ? "multipart" :
-                n == TYPETEXT ? "text" :
-                n == TYPEVIDEO ? "video" : "other",
-                tmp.subtype);
-      dprint(1, (debugfile, "mutt_check_lookup_list: \"%s\" -> %s\n",
-        b->filename, type));
-    }
-    if (tmp.subtype)
-      FREE (&tmp.subtype);
-    if (tmp.xtype)
-      FREE (&tmp.xtype);
+       ascii_strcasecmp (type, t->data) == 0)
+    {
+      BODY tmp = {0};
+      int n;
+      if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER)
+      {
+        snprintf (type, len, "%s/%s",
+                  n == TYPEAUDIO ? "audio" :
+                  n == TYPEAPPLICATION ? "application" :
+                  n == TYPEIMAGE ? "image" :
+                  n == TYPEMESSAGE ? "message" :
+                  n == TYPEMODEL ? "model" :
+                  n == TYPEMULTIPART ? "multipart" :
+                  n == TYPETEXT ? "text" :
+                  n == TYPEVIDEO ? "video" : "other",
+                  tmp.subtype);
+        dprint(1, (debugfile, "mutt_check_lookup_list: \"%s\" -> %s\n",
+                   b->filename, type));
+      }
+      if (tmp.subtype)
+        FREE (&tmp.subtype);
+      if (tmp.xtype)
+        FREE (&tmp.xtype);
     }
   }
 }
@@ -371,7 +373,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
   command = mutt_buffer_pool_get ();
 
   use_mailcap = (flag == MUTT_MAILCAP ||
-               (flag == MUTT_REGULAR && mutt_needs_mailcap (a)));
+                 (flag == MUTT_REGULAR && mutt_needs_mailcap (a)));
   snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
 
   if (use_mailcap)
@@ -582,7 +584,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
       strfcpy (descrip, a->description, sizeof (descrip));
     else if (a->filename)
       snprintf (descrip, sizeof (descrip), _("---Attachment: %s: %s"),
-         a->filename, type);
+                a->filename, type);
     else
       snprintf (descrip, sizeof (descrip), _("---Attachment: %s"), type);
   }
@@ -607,7 +609,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr,
   else
     rc = 0;
 
-  return_error:
+return_error:
 
   if (entry)
     rfc1524_free_entry (&entry);
@@ -739,10 +741,10 @@ int mutt_save_attachment (FILE *fp, BODY *m, const char *path, int flags, HEADER
     /* recv mode */
 
     if(hdr &&
-       m->hdr &&
-       m->encoding != ENCBASE64 &&
-       m->encoding != ENCQUOTEDPRINTABLE &&
-       mutt_is_message_type(m->type, m->subtype))
+       m->hdr &&
+       m->encoding != ENCBASE64 &&
+       m->encoding != ENCQUOTEDPRINTABLE &&
+       mutt_is_message_type(m->type, m->subtype))
     {
       /* message type attachments are written to mail folders. */
 
index 9e0a527a65295ebef47de9d64222ec70c41bfea3..62838fd40c3e9c7f21082aa7d41f874a272840e7 100644 (file)
--- a/bcache.c
+++ b/bcache.c
@@ -157,7 +157,7 @@ FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp)
     s = strchr (s + 1, '/');
   }
 
-  out:
+out:
   dprint (3, (debugfile, "bcache: put: '%s'\n", path));
 
   return fp;
index bd878910340321bbecb884540b5023ab9383b12d..42287b07af54a90d323618d01ad3a4cb37c1b3a4 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -226,9 +226,15 @@ folder_format_str (char *dest, size_t destlen, size_t col, int cols, char op, co
        s = NONULL (folder->ff->name);
 
       snprintf (fn, sizeof (fn), "%s%s", s,
-               folder->ff->local ? (S_ISLNK (folder->ff->mode) ? "@" :
-                                 (S_ISDIR (folder->ff->mode) ? "/" :
-                                  ((folder->ff->mode & S_IXUSR) != 0 ? "*" : ""))) : "");
+               folder->ff->local ?
+                  (S_ISLNK (folder->ff->mode) ?
+                     "@" :
+                     (S_ISDIR (folder->ff->mode) ?
+                        "/" :
+                        ((folder->ff->mode & S_IXUSR) != 0 ?
+                           "*" :
+                           ""))) :
+                  "");
 
       mutt_format_s (dest, destlen, fmt, fn);
       break;
@@ -580,7 +586,7 @@ static void folder_entry (char *s, size_t slen, MUTTMENU *menu, int num)
   folder.num = num;
 
   mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL(FolderFormat), folder_format_str,
-      (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
+                     (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR);
 }
 
 static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
@@ -606,13 +612,13 @@ static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
     strfcpy (path, LastDir, sizeof (path));
     mutt_pretty_mailbox (path, sizeof (path));
 #ifdef USE_IMAP
-  if (state->imap_browse && option (OPTIMAPLSUB))
-    snprintf (title, titlelen, _("Subscribed [%s], File mask: %s"),
-             path, NONULL (Mask.pattern));
-  else
+    if (state->imap_browse && option (OPTIMAPLSUB))
+      snprintf (title, titlelen, _("Subscribed [%s], File mask: %s"),
+                path, NONULL (Mask.pattern));
+    else
 #endif
-    snprintf (title, titlelen, _("Directory [%s], File mask: %s"),
-             path, NONULL(Mask.pattern));
+      snprintf (title, titlelen, _("Directory [%s], File mask: %s"),
+                path, NONULL(Mask.pattern));
   }
   menu->redraw = REDRAW_FULL;
 }
@@ -668,35 +674,35 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
     else
     {
 #endif
-    for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/' ; i--);
-    if (i > 0)
-    {
-      if (f[0] == '/')
+      for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/' ; i--);
+      if (i > 0)
       {
-       if (i > sizeof (LastDir) - 1) i = sizeof (LastDir) - 1;
-       strncpy (LastDir, f, i);
-       LastDir[i] = 0;
+        if (f[0] == '/')
+        {
+          if (i > sizeof (LastDir) - 1) i = sizeof (LastDir) - 1;
+          strncpy (LastDir, f, i);
+          LastDir[i] = 0;
+        }
+        else
+        {
+          getcwd (LastDir, sizeof (LastDir));
+          safe_strcat (LastDir, sizeof (LastDir), "/");
+          safe_strncat (LastDir, sizeof (LastDir), f, i);
+        }
       }
       else
       {
-       getcwd (LastDir, sizeof (LastDir));
-       safe_strcat (LastDir, sizeof (LastDir), "/");
-       safe_strncat (LastDir, sizeof (LastDir), f, i);
+        if (f[0] == '/')
+          strcpy (LastDir, "/");               /* __STRCPY_CHECKED__ */
+        else
+          getcwd (LastDir, sizeof (LastDir));
       }
-    }
-    else
-    {
-      if (f[0] == '/')
-       strcpy (LastDir, "/");          /* __STRCPY_CHECKED__ */
-      else
-       getcwd (LastDir, sizeof (LastDir));
-    }
 
-    if (i <= 0 && f[0] != '/')
-      strfcpy (prefix, f, sizeof (prefix));
-    else
-      strfcpy (prefix, f + i + 1, sizeof (prefix));
-    killPrefix = 1;
+      if (i <= 0 && f[0] != '/')
+        strfcpy (prefix, f, sizeof (prefix));
+      else
+        strfcpy (prefix, f + i + 1, sizeof (prefix));
+      killPrefix = 1;
 #ifdef USE_IMAP
     }
 #endif
@@ -736,10 +742,10 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
   }
   else
 #ifdef USE_IMAP
-  if (!state.imap_browse)
+    if (!state.imap_browse)
 #endif
-  if (examine_directory (NULL, &state, LastDir, prefix) == -1)
-    goto bail;
+      if (examine_directory (NULL, &state, LastDir, prefix) == -1)
+        goto bail;
 
   menu = mutt_new_menu (MENU_FOLDER);
   menu->make_entry = folder_entry;
@@ -750,7 +756,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
     menu->tag = file_tag;
 
   menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER,
-    FolderHelp);
+                                  FolderHelp);
   mutt_push_current_menu (menu);
 
   init_menu (&state, menu, title, sizeof (title), buffy);
@@ -769,11 +775,11 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
 
         if (S_ISDIR (state.entry[menu->current].mode) ||
            (S_ISLNK (state.entry[menu->current].mode) &&
-           link_is_dir (LastDir, state.entry[menu->current].name))
+             link_is_dir (LastDir, state.entry[menu->current].name))
 #ifdef USE_IMAP
            || state.entry[menu->current].inferiors
 #endif
-           )
+          )
        {
          /* make sure this isn't a MH or maildir mailbox */
          if (buffy)
@@ -792,7 +798,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
 
          if ((mx_get_magic (buf) <= 0)
 #ifdef USE_IMAP
-           || state.entry[menu->current].inferiors
+              || state.entry[menu->current].inferiors
 #endif
            )
          {
@@ -832,7 +838,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
              ciss_url_t url;
 
               strfcpy (LastDir, state.entry[menu->current].name,
-                sizeof (LastDir));
+                       sizeof (LastDir));
              /* tack on delimiter here */
              n = strlen (LastDir)+1;
 
@@ -872,16 +878,16 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
            }
            else
 #endif
-           if (examine_directory (menu, &state, LastDir, prefix) == -1)
-           {
-             /* try to restore the old values */
-             strfcpy (LastDir, OldLastDir, sizeof (LastDir));
-             if (examine_directory (menu, &state, LastDir, prefix) == -1)
-             {
-               strfcpy (LastDir, NONULL(Homedir), sizeof (LastDir));
-               goto bail;
-             }
-           }
+              if (examine_directory (menu, &state, LastDir, prefix) == -1)
+              {
+                /* try to restore the old values */
+                strfcpy (LastDir, OldLastDir, sizeof (LastDir));
+                if (examine_directory (menu, &state, LastDir, prefix) == -1)
+                {
+                  strfcpy (LastDir, NONULL(Homedir), sizeof (LastDir));
+                  goto bail;
+                }
+              }
            menu->current = 0;
            menu->top = 0;
            init_menu (&state, menu, title, sizeof (title), buffy);
@@ -1009,7 +1015,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
        }
        break;
 
-    case OP_DELETE_MAILBOX:
+      case OP_DELETE_MAILBOX:
        if (!state.entry[menu->current].imap)
          mutt_error (_("Delete is only supported for IMAP mailboxes"));
        else
@@ -1025,7 +1031,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
            break;
          }
          snprintf (msg, sizeof (msg), _("Really delete mailbox \"%s\"?"),
-            mx.mbox);
+                    mx.mbox);
          if (mutt_yesorno (msg, MUTT_NO) == MUTT_YES)
           {
            if (!imap_delete_mailbox (Context, mx))
@@ -1036,7 +1042,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
              /* and move all other entries up */
              if (nentry+1 < state.entrylen)
                memmove (state.entry + nentry, state.entry + nentry + 1,
-                  sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
+                         sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
               memset (&state.entry[state.entrylen - 1], 0,
                       sizeof (struct folder_file));
              state.entrylen--;
@@ -1172,13 +1178,13 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
            }
            else
 #endif
-           if (examine_directory (menu, &state, LastDir, NULL) == 0)
-             init_menu (&state, menu, title, sizeof (title), buffy);
-           else
-           {
-             mutt_error _("Error scanning directory.");
-             goto bail;
-           }
+              if (examine_directory (menu, &state, LastDir, NULL) == 0)
+                init_menu (&state, menu, title, sizeof (title), buffy);
+              else
+              {
+                mutt_error _("Error scanning directory.");
+                goto bail;
+              }
            killPrefix = 0;
            if (!state.entrylen)
            {
@@ -1192,52 +1198,52 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
       case OP_SORT:
       case OP_SORT_REVERSE:
 
-        {
-         int resort = 1;
-         int reverse = (i == OP_SORT_REVERSE);
-
-         switch (mutt_multi_choice ((reverse) ?
-             _("Reverse sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? ") :
-             _("Sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? "),
-             _("dazcun")))
-         {
-           case -1: /* abort */
-             resort = 0;
-             break;
-
-            case 1: /* (d)ate */
-             BrowserSort = SORT_DATE;
-             break;
-
-            case 2: /* (a)lpha */
-             BrowserSort = SORT_SUBJECT;
-             break;
-
-            case 3: /* si(z)e */
-             BrowserSort = SORT_SIZE;
-             break;
-
-            case 4: /* (c)ount */
-             BrowserSort = SORT_COUNT;
-             break;
-
-            case 5: /* (u)nread */
-             BrowserSort = SORT_UNREAD;
-             break;
+      {
+        int resort = 1;
+        int reverse = (i == OP_SORT_REVERSE);
 
-            case 6: /* do(n)'t sort */
-             BrowserSort = SORT_ORDER;
-             resort = 0;
-             break;
-         }
-         if (resort)
-         {
-           BrowserSort |= reverse ? SORT_REVERSE : 0;
-           browser_sort (&state);
-           menu->redraw = REDRAW_FULL;
-         }
-         break;
-       }
+        switch (mutt_multi_choice ((reverse) ?
+            _("Reverse sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? ") :
+            _("Sort by (d)ate, (a)lpha, si(z)e, (c)ount, (u)nread, or do(n)'t sort? "),
+            _("dazcun")))
+        {
+          case -1: /* abort */
+            resort = 0;
+            break;
+
+          case 1: /* (d)ate */
+            BrowserSort = SORT_DATE;
+            break;
+
+          case 2: /* (a)lpha */
+            BrowserSort = SORT_SUBJECT;
+            break;
+
+          case 3: /* si(z)e */
+            BrowserSort = SORT_SIZE;
+            break;
+
+          case 4: /* (c)ount */
+            BrowserSort = SORT_COUNT;
+            break;
+
+          case 5: /* (u)nread */
+            BrowserSort = SORT_UNREAD;
+            break;
+
+          case 6: /* do(n)'t sort */
+            BrowserSort = SORT_ORDER;
+            resort = 0;
+            break;
+        }
+        if (resort)
+        {
+          BrowserSort |= reverse ? SORT_REVERSE : 0;
+          browser_sort (&state);
+          menu->redraw = REDRAW_FULL;
+        }
+        break;
+      }
 
       case OP_TOGGLE_MAILBOXES:
        buffy = 1 - buffy;
@@ -1298,33 +1304,33 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
        }
        else
 #endif
-        if (S_ISDIR (state.entry[menu->current].mode) ||
-           (S_ISLNK (state.entry[menu->current].mode) &&
-           link_is_dir (LastDir, state.entry[menu->current].name)))
-       {
-         mutt_error _("Can't view a directory");
-         break;
-       }
-       else
-       {
-         BODY *b;
-         char buf[_POSIX_PATH_MAX];
+          if (S_ISDIR (state.entry[menu->current].mode) ||
+              (S_ISLNK (state.entry[menu->current].mode) &&
+               link_is_dir (LastDir, state.entry[menu->current].name)))
+          {
+            mutt_error _("Can't view a directory");
+            break;
+          }
+          else
+          {
+            BODY *b;
+            char buf[_POSIX_PATH_MAX];
 
-         mutt_concat_path (buf, LastDir, state.entry[menu->current].name, sizeof (buf));
-         b = mutt_make_file_attach (buf);
-         if (b != NULL)
-         {
-           mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL);
-           mutt_free_body (&b);
-           menu->redraw = REDRAW_FULL;
-         }
-         else
-           mutt_error _("Error trying to view file");
-       }
+            mutt_concat_path (buf, LastDir, state.entry[menu->current].name, sizeof (buf));
+            b = mutt_make_file_attach (buf);
+            if (b != NULL)
+            {
+              mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL);
+              mutt_free_body (&b);
+              menu->redraw = REDRAW_FULL;
+            }
+            else
+              mutt_error _("Error trying to view file");
+          }
     }
   }
 
-  bail:
+bail:
 
   if (menu)
   {
index 3e0b78f47e20f20cb5fcc506500d455c1f59ccfe..b560b79c5fd225fc71323e426256f5d7e25dcdd7 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -55,9 +55,9 @@ void mutt_buffer_free (BUFFER **p)
   if (!p || !*p)
     return;
 
-   FREE (&(*p)->data);
-   /* dptr is just an offset to data and shouldn't be freed */
-   FREE (p);           /* __FREE_CHECKED__ */
+  FREE (&(*p)->data);
+  /* dptr is just an offset to data and shouldn't be freed */
+  FREE (p);            /* __FREE_CHECKED__ */
 }
 
 void mutt_buffer_clear (BUFFER *b)
diff --git a/buffy.c b/buffy.c
index d658612194ee293bb7466342dc4eb59486b2af84..1e922c947a2eaea4379aa4d3b4785da1d1338b49 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -586,16 +586,16 @@ int mutt_buffy_check (int force)
        tmp->magic = MUTT_POP;
       else
 #endif
-      if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
-         (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
-      {
-       /* if the mailbox still doesn't exist, set the newly created flag to
-        * be ready for when it does. */
-       tmp->newly_created = 1;
-       tmp->magic = 0;
-       tmp->size = 0;
-       continue;
-      }
+        if (stat (tmp->path, &sb) != 0 || (S_ISREG(sb.st_mode) && sb.st_size == 0) ||
+            (!tmp->magic && (tmp->magic = mx_get_magic (tmp->path)) <= 0))
+        {
+          /* if the mailbox still doesn't exist, set the newly created flag to
+           * be ready for when it does. */
+          tmp->newly_created = 1;
+          tmp->magic = 0;
+          tmp->size = 0;
+          continue;
+        }
     }
 
     /* check to see if the folder is the currently selected folder
diff --git a/color.c b/color.c
index 836f7c8e43c8c60e7fcdf378c9955c03dbd68898..a408aca2c741fff23af6f7fe33bc590644202525 100644 (file)
--- a/color.c
+++ b/color.c
@@ -269,8 +269,8 @@ int mutt_alloc_color (int fg, int bg)
     SLtt_set_color (i, NULL, get_color_name (fgc, sizeof (fgc), fg), get_color_name (bgc, sizeof (bgc), bg));
   else
 #elif defined (HAVE_USE_DEFAULT_COLORS)
-  if (fg == COLOR_DEFAULT)
-    fg = -1;
+    if (fg == COLOR_DEFAULT)
+      fg = -1;
   if (bg == COLOR_DEFAULT)
     bg = -1;
 #endif
@@ -297,7 +297,7 @@ void mutt_free_color (int fg, int bg)
 
       UserColors--;
       dprint(1,(debugfile,"mutt_free_color(): Color pairs used so far: %d\n",
-                           UserColors));
+                UserColors));
 
       if (p == ColorList)
       {
@@ -404,7 +404,7 @@ parse_color_name (const char *s, int *col, int *attr, int is_fg, BUFFER *err)
 
 static int
 _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err,
-                        short parse_uncolor);
+                     short parse_uncolor);
 
 
 #ifdef HAVE_COLOR
@@ -462,19 +462,19 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data,
     return (-1);
   }
 
-  if(
+  if (
 #ifdef HAVE_COLOR
-     /* we're running without curses */
-     option (OPTNOCURSES)
-     || /* we're parsing an uncolor command, and have no colors */
-     (parse_uncolor && !has_colors())
-     /* we're parsing an unmono command, and have colors */
-     || (!parse_uncolor && has_colors())
+    /* we're running without curses */
+    option (OPTNOCURSES)
+    || /* we're parsing an uncolor command, and have no colors */
+    (parse_uncolor && !has_colors())
+    /* we're parsing an unmono command, and have colors */
+    || (!parse_uncolor && has_colors())
 #else
-     /* We don't even have colors compiled in */
-     parse_uncolor
+    /* We don't even have colors compiled in */
+    parse_uncolor
 #endif
-     )
+    )
   {
     /* just eat the command, but don't do anything real about it */
     do
@@ -508,7 +508,7 @@ static int _mutt_parse_uncolor (BUFFER *buf, BUFFER *s, unsigned long data,
           if (!do_cache)
            do_cache = 1;
          dprint(1,(debugfile,"Freeing pattern \"%s\" from color list\n",
-                              tmp->pattern));
+                    tmp->pattern));
          if (last)
            last->next = tmp->next;
          else
@@ -805,9 +805,9 @@ _mutt_parse_color (BUFFER *buf, BUFFER *s, BUFFER *err,
 #ifdef HAVE_COLOR
 # ifdef HAVE_USE_DEFAULT_COLORS
   if (!option (OPTNOCURSES) && has_colors()
-    /* delay use_default_colors() until needed, since it initializes things */
-    && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
-    && use_default_colors () != OK)
+      /* delay use_default_colors() until needed, since it initializes things */
+      && (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
+      && use_default_colors () != OK)
   {
     strfcpy (err->data, _("default colors not supported"), err->dsize);
     return (-1);
index 7683d18434d6528abf2d767811530585d8027500..11e69033378474f4b04d4c769ecf2af0904fdee8 100644 (file)
@@ -223,7 +223,8 @@ int mutt_display_message (HEADER *cur)
   }
 
   res = mutt_copy_message (fpout, Context, cur, cmflags,
-               (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY);
+                           (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |
+                           CH_DECODE | CH_FROM | CH_DISPLAY);
   if ((safe_fclose (&fpout) != 0 && errno != EPIPE) || res < 0)
   {
     mutt_error (_("Could not copy message"));
@@ -326,8 +327,8 @@ void ci_bounce_message (HEADER *h)
   char *err = NULL;
   int rc;
 
- /* RfC 5322 mandates a From: header, so warn before bouncing
-  * messages without one */
 /* RfC 5322 mandates a From: header, so warn before bouncing
+   * messages without one */
   if (h)
   {
     if (!h->env->from)
@@ -379,7 +380,7 @@ void ci_bounce_message (HEADER *h)
 
 #define extra_space (15 + 7 + 2)
   snprintf (scratch, sizeof (scratch),
-           (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf);
+            (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf);
 
   if (mutt_strwidth (prompt) > MuttMessageWindow->cols - extra_space)
   {
@@ -591,7 +592,7 @@ void mutt_print_message (HEADER *h)
 
   if (query_quadoption (OPT_PRINT,
                        h ? _("Print message?") : _("Print tagged messages?"))
-                       != MUTT_YES)
+      != MUTT_YES)
     return;
 
   if (_mutt_pipe_message (h, PrintCmd,
@@ -620,52 +621,52 @@ int mutt_select_sort (int reverse)
        _("Sort Date/Frm/Recv/Subj/tO/Thread/Unsort/siZe/sCore/sPam/Label?: "),
        _("dfrsotuzcpl")))
   {
-  case -1: /* abort - don't resort */
-    return -1;
+    case -1: /* abort - don't resort */
+      return -1;
 
-  case 1: /* (d)ate */
-    Sort = SORT_DATE;
-    break;
+    case 1: /* (d)ate */
+      Sort = SORT_DATE;
+      break;
 
-  case 2: /* (f)rm */
-    Sort = SORT_FROM;
-    break;
+    case 2: /* (f)rm */
+      Sort = SORT_FROM;
+      break;
 
-  case 3: /* (r)ecv */
-    Sort = SORT_RECEIVED;
-    break;
+    case 3: /* (r)ecv */
+      Sort = SORT_RECEIVED;
+      break;
 
-  case 4: /* (s)ubj */
-    Sort = SORT_SUBJECT;
-    break;
+    case 4: /* (s)ubj */
+      Sort = SORT_SUBJECT;
+      break;
 
-  case 5: /* t(o) */
-    Sort = SORT_TO;
-    break;
+    case 5: /* t(o) */
+      Sort = SORT_TO;
+      break;
 
-  case 6: /* (t)hread */
-    Sort = SORT_THREADS;
-    break;
+    case 6: /* (t)hread */
+      Sort = SORT_THREADS;
+      break;
 
-  case 7: /* (u)nsort */
-    Sort = SORT_ORDER;
-    break;
+    case 7: /* (u)nsort */
+      Sort = SORT_ORDER;
+      break;
 
-  case 8: /* si(z)e */
-    Sort = SORT_SIZE;
-    break;
+    case 8: /* si(z)e */
+      Sort = SORT_SIZE;
+      break;
 
-  case 9: /* s(c)ore */
-    Sort = SORT_SCORE;
-    break;
+    case 9: /* s(c)ore */
+      Sort = SORT_SCORE;
+      break;
 
-  case 10: /* s(p)am */
-    Sort = SORT_SPAM;
-    break;
+    case 10: /* s(p)am */
+      Sort = SORT_SPAM;
+      break;
 
-  case 11: /* (l)abel */
-    Sort = SORT_LABEL;
-    break;
+    case 11: /* (l)abel */
+      Sort = SORT_LABEL;
+      break;
   }
   if (reverse)
     Sort |= SORT_REVERSE;
@@ -760,7 +761,7 @@ static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags,
       *cmflags = MUTT_CM_DECODE_PGP;
     }
     else if ((WithCrypto & APPLICATION_PGP)
-              && mutt_is_application_pgp (hdr->content) & ENCRYPT)
+             && mutt_is_application_pgp (hdr->content) & ENCRYPT)
       decode = 1;
     else if ((WithCrypto & APPLICATION_SMIME)
              && mutt_is_application_smime(hdr->content) & ENCRYPT)
@@ -928,7 +929,7 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt)
        {
          mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK);
          if (_mutt_save_message(Context->hdrs[Context->v2r[i]],
-                            &ctx, delete, decode, decrypt) != 0)
+                                 &ctx, delete, decode, decrypt) != 0)
           {
             mx_close_mailbox (&ctx, NULL);
             return -1;
index dd598faabd758302723bdb956b79913cbeab8225..5ec5459924982826cea217abd1271f92dd3c65e6 100644 (file)
@@ -79,8 +79,10 @@ int mutt_complete (char *s, size_t slen)
     if ((p = strrchr (s, '/')))
     {
       char buf[_POSIX_PATH_MAX];
-      if (mutt_concatn_path (buf, sizeof(buf), exp_dirpart, strlen(exp_dirpart), s + 1, (size_t)(p - s - 1)) == NULL) {
-             return -1;
+      if (mutt_concatn_path (buf, sizeof(buf), exp_dirpart, strlen(exp_dirpart),
+                             s + 1, (size_t)(p - s - 1)) == NULL)
+      {
+        return -1;
       }
       strfcpy (exp_dirpart, buf, sizeof (exp_dirpart));
       mutt_substrcpy(dirpart, s, p+1, sizeof(dirpart));
index 917b7fa6a4d43b50e275445efdd1b2e9662b2d25..a3d25511541a1adb6046d6c6cafce35084fe22c9 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -174,8 +174,8 @@ static void snd_entry (char *b, size_t blen, MUTTMENU *menu, int num)
   ATTACH_CONTEXT *actx = (ATTACH_CONTEXT *)menu->data;
 
   mutt_FormatString (b, blen, 0, MuttIndexWindow->cols, NONULL (AttachFormat), mutt_attach_fmt,
-           (unsigned long)(actx->idx[actx->v2r[num]]),
-           MUTT_FORMAT_STAT_FILE | MUTT_FORMAT_ARROWCURSOR);
+                     (unsigned long)(actx->idx[actx->v2r[num]]),
+                     MUTT_FORMAT_STAT_FILE | MUTT_FORMAT_ARROWCURSOR);
 }
 
 
@@ -232,7 +232,7 @@ static void redraw_crypt_lines (HEADER *msg)
   }
 
   if (option (OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT))
-      addstr (_(" (OppEnc mode)"));
+    addstr (_(" (OppEnc mode)"));
 
   mutt_window_clrtoeol (MuttIndexWindow);
   mutt_window_move (MuttIndexWindow, HDR_CRYPTINFO, 0);
@@ -463,7 +463,7 @@ static void mutt_gen_compose_attach_list (ATTACH_CONTEXT *actx,
   {
     if (m->type == TYPEMULTIPART && m->parts
         && (!(WithCrypto & APPLICATION_PGP) || !mutt_is_multipart_encrypted(m))
-       )
+      )
     {
       mutt_gen_compose_attach_list (actx, m->parts, m->type, level);
     }
@@ -563,7 +563,7 @@ static unsigned long cum_attachs_size (MUTTMENU *menu)
 
 /* prototype for use below */
 static void compose_status_line (char *buf, size_t buflen, size_t col, int cols, MUTTMENU *menu,
-      const char *p);
+                                 const char *p);
 
 /*
  * compose_format_str()
@@ -579,9 +579,9 @@ static void compose_status_line (char *buf, size_t buflen, size_t col, int cols,
 
 static const char *
 compose_format_str (char *buf, size_t buflen, size_t col, int cols, char op, const char *src,
-                  const char *prefix, const char *ifstring,
-                  const char *elsestring,
-                  unsigned long data, format_flag flags)
+                    const char *prefix, const char *ifstring,
+                    const char *elsestring,
+                    unsigned long data, format_flag flags)
 {
   char fmt[SHORT_STRING], tmp[SHORT_STRING];
   int optional = (flags & MUTT_FORMAT_OPTIONAL);
@@ -591,8 +591,8 @@ compose_format_str (char *buf, size_t buflen, size_t col, int cols, char op, con
   switch (op)
   {
     case 'a': /* total number of attachments */
-       snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
-       snprintf (buf, buflen, fmt, menu->max);
+      snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
+      snprintf (buf, buflen, fmt, menu->max);
       break;
 
     case 'h':  /* hostname */
@@ -601,9 +601,9 @@ compose_format_str (char *buf, size_t buflen, size_t col, int cols, char op, con
       break;
 
     case 'l': /* approx length of current message in bytes */
-       snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-       mutt_pretty_size (tmp, sizeof (tmp), menu ? cum_attachs_size(menu) : 0);
-       snprintf (buf, buflen, fmt, tmp);
+      snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
+      mutt_pretty_size (tmp, sizeof (tmp), menu ? cum_attachs_size(menu) : 0);
+      snprintf (buf, buflen, fmt, tmp);
       break;
 
     case 'v':
@@ -632,7 +632,7 @@ static void compose_status_line (char *buf, size_t buflen, size_t col, int cols,
                                  MUTTMENU *menu, const char *p)
 {
   mutt_FormatString (buf, buflen, col, cols, p, compose_format_str,
-        (unsigned long) menu, 0);
+                     (unsigned long) menu, 0);
 }
 
 typedef struct
@@ -811,7 +811,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
       case OP_COMPOSE_EDIT_HEADERS:
        if (mutt_strcmp ("builtin", Editor) != 0 &&
            (op == OP_COMPOSE_EDIT_HEADERS ||
-           (op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS))))
+             (op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS))))
        {
          char *tag = NULL, *err = NULL;
          mutt_env_to_local (msg->env);
@@ -868,147 +868,147 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
 
 
       case OP_COMPOSE_ATTACH_FILE:
-       {
-         char *prompt, **files;
-         int error, numfiles;
+      {
+        char *prompt, **files;
+        int error, numfiles;
 
-         fname[0] = 0;
-         prompt = _("Attach file");
-         numfiles = 0;
-         files = NULL;
+        fname[0] = 0;
+        prompt = _("Attach file");
+        numfiles = 0;
+        files = NULL;
 
-         if (_mutt_enter_fname (prompt, fname, sizeof (fname), 0, 1, &files, &numfiles) == -1 ||
-             *fname == '\0')
-           break;
+        if (_mutt_enter_fname (prompt, fname, sizeof (fname), 0, 1, &files, &numfiles) == -1 ||
+            *fname == '\0')
+          break;
 
-         error = 0;
-         if (numfiles > 1)
-           mutt_message _("Attaching selected files...");
-         for (i = 0; i < numfiles; i++)
-         {
-           char *att = files[i];
-           new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
-            new->unowned = 1;
-           new->content = mutt_make_file_attach (att);
-           if (new->content != NULL)
-             update_idx (menu, actx, new);
-           else
-           {
-             error = 1;
-             mutt_error (_("Unable to attach %s!"), att);
-             FREE (&new);
-           }
-            FREE (&files[i]);
-         }
+        error = 0;
+        if (numfiles > 1)
+          mutt_message _("Attaching selected files...");
+        for (i = 0; i < numfiles; i++)
+        {
+          char *att = files[i];
+          new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
+          new->unowned = 1;
+          new->content = mutt_make_file_attach (att);
+          if (new->content != NULL)
+            update_idx (menu, actx, new);
+          else
+          {
+            error = 1;
+            mutt_error (_("Unable to attach %s!"), att);
+            FREE (&new);
+          }
+          FREE (&files[i]);
+        }
 
-         FREE (&files);
-         if (!error) mutt_clear_error ();
+        FREE (&files);
+        if (!error) mutt_clear_error ();
 
-         menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
-       }
-        mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
-        break;
+        menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
+      }
+      mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
+      break;
 
       case OP_COMPOSE_ATTACH_MESSAGE:
-       {
-         char *prompt;
-         HEADER *h;
+      {
+        char *prompt;
+        HEADER *h;
 
-         fname[0] = 0;
-         prompt = _("Open mailbox to attach message from");
+        fname[0] = 0;
+        prompt = _("Open mailbox to attach message from");
 
-         if (Context)
-         {
-           strfcpy (fname, NONULL (Context->path), sizeof (fname));
-           mutt_pretty_mailbox (fname, sizeof (fname));
-         }
+        if (Context)
+        {
+          strfcpy (fname, NONULL (Context->path), sizeof (fname));
+          mutt_pretty_mailbox (fname, sizeof (fname));
+        }
 
-         if (mutt_enter_fname (prompt, fname, sizeof (fname), 1) == -1 || !fname[0])
-           break;
+        if (mutt_enter_fname (prompt, fname, sizeof (fname), 1) == -1 || !fname[0])
+          break;
 
-         mutt_expand_path (fname, sizeof (fname));
+        mutt_expand_path (fname, sizeof (fname));
 #ifdef USE_IMAP
-          if (!mx_is_imap (fname))
+        if (!mx_is_imap (fname))
 #endif
 #ifdef USE_POP
           if (!mx_is_pop (fname))
 #endif
-         /* check to make sure the file exists and is readable */
-         if (access (fname, R_OK) == -1)
-         {
-           mutt_perror (fname);
-           break;
-         }
+            /* check to make sure the file exists and is readable */
+            if (access (fname, R_OK) == -1)
+            {
+              mutt_perror (fname);
+              break;
+            }
 
-         menu->redraw = REDRAW_FULL;
+        menu->redraw = REDRAW_FULL;
 
-         ctx = mx_open_mailbox (fname, MUTT_READONLY, NULL);
-         if (ctx == NULL)
-         {
-           mutt_error (_("Unable to open mailbox %s"), fname);
-           break;
-         }
+        ctx = mx_open_mailbox (fname, MUTT_READONLY, NULL);
+        if (ctx == NULL)
+        {
+          mutt_error (_("Unable to open mailbox %s"), fname);
+          break;
+        }
 
-         if (!ctx->msgcount)
-         {
-           mx_close_mailbox (ctx, NULL);
-           FREE (&ctx);
-           mutt_error _("No messages in that folder.");
-           break;
-         }
+        if (!ctx->msgcount)
+        {
+          mx_close_mailbox (ctx, NULL);
+          FREE (&ctx);
+          mutt_error _("No messages in that folder.");
+          break;
+        }
 
-         this = Context; /* remember current folder and sort methods*/
-         oldSort = Sort; oldSortAux = SortAux;
+        this = Context; /* remember current folder and sort methods*/
+        oldSort = Sort; oldSortAux = SortAux;
 
-         Context = ctx;
-         set_option(OPTATTACHMSG);
-         mutt_message _("Tag the messages you want to attach!");
-         close = mutt_index_menu ();
-         unset_option(OPTATTACHMSG);
+        Context = ctx;
+        set_option(OPTATTACHMSG);
+        mutt_message _("Tag the messages you want to attach!");
+        close = mutt_index_menu ();
+        unset_option(OPTATTACHMSG);
 
-         if (!Context)
-         {
-           /* go back to the folder we started from */
-           Context = this;
-           /* Restore old $sort and $sort_aux */
-           Sort = oldSort;
-           SortAux = oldSortAux;
-           menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
-           break;
-         }
+        if (!Context)
+        {
+          /* go back to the folder we started from */
+          Context = this;
+          /* Restore old $sort and $sort_aux */
+          Sort = oldSort;
+          SortAux = oldSortAux;
+          menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
+          break;
+        }
 
-         for (i = 0; i < Context->msgcount; i++)
-         {
-           h = Context->hdrs[i];
-           if (h->tagged)
-           {
-             new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
-             new->content = mutt_make_message_attach (Context, h, 1);
-             if (new->content != NULL)
-               update_idx (menu, actx, new);
-             else
-             {
-               mutt_error _("Unable to attach!");
-               FREE (&new);
-             }
-           }
-         }
-         menu->redraw |= REDRAW_FULL;
+        for (i = 0; i < Context->msgcount; i++)
+        {
+          h = Context->hdrs[i];
+          if (h->tagged)
+          {
+            new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
+            new->content = mutt_make_message_attach (Context, h, 1);
+            if (new->content != NULL)
+              update_idx (menu, actx, new);
+            else
+            {
+              mutt_error _("Unable to attach!");
+              FREE (&new);
+            }
+          }
+        }
+        menu->redraw |= REDRAW_FULL;
 
-         if (close == OP_QUIT)
-           mx_close_mailbox (Context, NULL);
-         else
-           mx_fastclose_mailbox (Context);
-         FREE (&Context);
-
-         /* go back to the folder we started from */
-         Context = this;
-         /* Restore old $sort and $sort_aux */
-         Sort = oldSort;
-         SortAux = oldSortAux;
-       }
-        mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
-        break;
+        if (close == OP_QUIT)
+          mx_close_mailbox (Context, NULL);
+        else
+          mx_fastclose_mailbox (Context);
+        FREE (&Context);
+
+        /* go back to the folder we started from */
+        Context = this;
+        /* Restore old $sort and $sort_aux */
+        Sort = oldSort;
+        SortAux = oldSortAux;
+      }
+      mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
+      break;
 
       case OP_DELETE:
        CHECK_COUNT;
@@ -1098,9 +1098,9 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
       case OP_COMPOSE_EDIT_ENCODING:
        CHECK_COUNT;
        strfcpy (buf, ENCODING (CURATTACH->content->encoding),
-                                                             sizeof (buf));
+                 sizeof (buf));
        if (mutt_get_field ("Content-Transfer-Encoding: ", buf,
-                                           sizeof (buf), 0) == 0 && buf[0])
+                            sizeof (buf), 0) == 0 && buf[0])
        {
          if ((i = mutt_check_encoding (buf)) != ENCOTHER && i != ENCUUENCODED)
          {
@@ -1135,7 +1135,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
        if (!fccSet && *fcc)
        {
          if ((i = query_quadoption (OPT_COPY,
-                               _("Save a copy of this message?"))) == -1)
+                                     _("Save a copy of this message?"))) == -1)
            break;
          else if (i == MUTT_NO)
            *fcc = 0;
@@ -1179,36 +1179,36 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
         break;
 
       case OP_COMPOSE_RENAME_ATTACHMENT:
-        {
-          char *src;
-          int ret;
+      {
+        char *src;
+        int ret;
 
-          CHECK_COUNT;
-          if (CURATTACH->content->d_filename)
-            src = CURATTACH->content->d_filename;
-          else
-            src = CURATTACH->content->filename;
-          strfcpy (fname, mutt_basename (NONULL (src)), sizeof (fname));
-          ret = mutt_get_field (_("Send attachment with name: "),
-                                fname, sizeof (fname), MUTT_FILE);
-          if (ret == 0)
-          {
-            /*
-             * As opposed to RENAME_FILE, we don't check fname[0] because it's
-             * valid to set an empty string here, to erase what was set
-             */
-            mutt_str_replace (&CURATTACH->content->d_filename, fname);
-            menu->redraw = REDRAW_CURRENT;
-          }
+        CHECK_COUNT;
+        if (CURATTACH->content->d_filename)
+          src = CURATTACH->content->d_filename;
+        else
+          src = CURATTACH->content->filename;
+        strfcpy (fname, mutt_basename (NONULL (src)), sizeof (fname));
+        ret = mutt_get_field (_("Send attachment with name: "),
+                              fname, sizeof (fname), MUTT_FILE);
+        if (ret == 0)
+        {
+          /*
+           * As opposed to RENAME_FILE, we don't check fname[0] because it's
+           * valid to set an empty string here, to erase what was set
+           */
+          mutt_str_replace (&CURATTACH->content->d_filename, fname);
+          menu->redraw = REDRAW_CURRENT;
         }
-        break;
+      }
+      break;
 
       case OP_COMPOSE_RENAME_FILE:
        CHECK_COUNT;
        strfcpy (fname, CURATTACH->content->filename, sizeof (fname));
        mutt_pretty_mailbox (fname, sizeof (fname));
-       if (mutt_get_field (_("Rename to: "), fname, sizeof (fname), MUTT_FILE)
-                                                       == 0 && fname[0])
+       if ((mutt_get_field (_("Rename to: "), fname, sizeof (fname), MUTT_FILE) == 0)
+            && fname[0])
        {
          if (stat(CURATTACH->content->filename, &st) == -1)
          {
@@ -1233,68 +1233,68 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
         break;
 
       case OP_COMPOSE_NEW_MIME:
-       {
-         char type[STRING];
-         char *p;
-         int itype;
-         FILE *fp;
-
-          mutt_window_clearline (MuttMessageWindow, 0);
-         fname[0] = 0;
-         if (mutt_get_field (_("New file: "), fname, sizeof (fname), MUTT_FILE)
-             != 0 || !fname[0])
-           continue;
-         mutt_expand_path (fname, sizeof (fname));
-
-         /* Call to lookup_mime_type () ?  maybe later */
-         type[0] = 0;
-         if (mutt_get_field ("Content-Type: ", type, sizeof (type), 0) != 0
-             || !type[0])
-           continue;
-
-         if (!(p = strchr (type, '/')))
-         {
-           mutt_error _("Content-Type is of the form base/sub");
-           continue;
-         }
-         *p++ = 0;
-         if ((itype = mutt_check_mime_type (type)) == TYPEOTHER)
-         {
-           mutt_error (_("Unknown Content-Type %s"), type);
-           continue;
-         }
+      {
+        char type[STRING];
+        char *p;
+        int itype;
+        FILE *fp;
+
+        mutt_window_clearline (MuttMessageWindow, 0);
+        fname[0] = 0;
+        if (mutt_get_field (_("New file: "), fname, sizeof (fname), MUTT_FILE)
+            != 0 || !fname[0])
+          continue;
+        mutt_expand_path (fname, sizeof (fname));
+
+        /* Call to lookup_mime_type () ?  maybe later */
+        type[0] = 0;
+        if (mutt_get_field ("Content-Type: ", type, sizeof (type), 0) != 0
+            || !type[0])
+          continue;
+
+        if (!(p = strchr (type, '/')))
+        {
+          mutt_error _("Content-Type is of the form base/sub");
+          continue;
+        }
+        *p++ = 0;
+        if ((itype = mutt_check_mime_type (type)) == TYPEOTHER)
+        {
+          mutt_error (_("Unknown Content-Type %s"), type);
+          continue;
+        }
 
-         new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
-         /* Touch the file */
-         if (!(fp = safe_fopen (fname, "w")))
-         {
-           mutt_error (_("Can't create file %s"), fname);
-           FREE (&new);
-           continue;
-         }
-         safe_fclose (&fp);
+        new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
+        /* Touch the file */
+        if (!(fp = safe_fopen (fname, "w")))
+        {
+          mutt_error (_("Can't create file %s"), fname);
+          FREE (&new);
+          continue;
+        }
+        safe_fclose (&fp);
 
-         if ((new->content = mutt_make_file_attach (fname)) == NULL)
-         {
-           mutt_error _("What we have here is a failure to make an attachment");
-            FREE (&new);
-           continue;
-         }
-         update_idx (menu, actx, new);
+        if ((new->content = mutt_make_file_attach (fname)) == NULL)
+        {
+          mutt_error _("What we have here is a failure to make an attachment");
+          FREE (&new);
+          continue;
+        }
+        update_idx (menu, actx, new);
 
-         CURATTACH->content->type = itype;
-         mutt_str_replace (&CURATTACH->content->subtype, p);
-         CURATTACH->content->unlink = 1;
-         menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
+        CURATTACH->content->type = itype;
+        mutt_str_replace (&CURATTACH->content->subtype, p);
+        CURATTACH->content->unlink = 1;
+        menu->redraw |= REDRAW_INDEX | REDRAW_STATUS;
 
-         if (mutt_compose_attachment (CURATTACH->content))
-         {
-           mutt_update_encoding (CURATTACH->content);
-           menu->redraw = REDRAW_FULL;
-         }
-       }
-        mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
-        break;
+        if (mutt_compose_attachment (CURATTACH->content))
+        {
+          mutt_update_encoding (CURATTACH->content);
+          menu->redraw = REDRAW_FULL;
+        }
+      }
+      mutt_message_hook (NULL, msg, MUTT_SEND2HOOK);
+      break;
 
       case OP_COMPOSE_EDIT_MIME:
        CHECK_COUNT;
@@ -1388,29 +1388,29 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
 
       case OP_COMPOSE_WRITE_MESSAGE:
 
-       fname[0] = '\0';
-       if (Context)
-       {
-        strfcpy (fname, NONULL (Context->path), sizeof (fname));
-        mutt_pretty_mailbox (fname, sizeof (fname));
-       }
-       if (actx->idxlen)
-         msg->content = actx->idx[0]->content;
-       if (mutt_enter_fname (_("Write message to mailbox"), fname, sizeof (fname),
-                             1) != -1 && fname[0])
-       {
-         mutt_message (_("Writing message to %s ..."), fname);
-         mutt_expand_path (fname, sizeof (fname));
+        fname[0] = '\0';
+        if (Context)
+        {
+          strfcpy (fname, NONULL (Context->path), sizeof (fname));
+          mutt_pretty_mailbox (fname, sizeof (fname));
+        }
+        if (actx->idxlen)
+          msg->content = actx->idx[0]->content;
+        if (mutt_enter_fname (_("Write message to mailbox"), fname, sizeof (fname),
+                              1) != -1 && fname[0])
+        {
+          mutt_message (_("Writing message to %s ..."), fname);
+          mutt_expand_path (fname, sizeof (fname));
 
-         if (msg->content->next)
-           msg->content = mutt_make_multipart (msg->content);
+          if (msg->content->next)
+            msg->content = mutt_make_multipart (msg->content);
 
-         if (mutt_write_fcc (fname, msg, NULL, 0, NULL) < 0)
-           msg->content = mutt_remove_multipart (msg->content);
-         else
-           mutt_message _("Message written.");
-       }
-       break;
+          if (mutt_write_fcc (fname, msg, NULL, 0, NULL) < 0)
+            msg->content = mutt_remove_multipart (msg->content);
+          else
+            mutt_message _("Message written.");
+        }
+        break;
 
 
 
@@ -1466,7 +1466,7 @@ int mutt_compose_menu (HEADER *msg,   /* structure for new message */
           if (msg->security & (ENCRYPT | SIGN))
           {
             if (mutt_yesorno (_("PGP already selected. Clear & continue ? "),
-                                MUTT_YES) != MUTT_YES)
+                              MUTT_YES) != MUTT_YES)
             {
               mutt_clear_error ();
               break;
index 90ff4b4b935d5fa5b9d7f02679ac2aca8408f0a5..7e6ba75cac4f07645ab0677811d95f18b40dc70e 100644 (file)
@@ -359,8 +359,8 @@ escape_path (char *src)
  */
 static const char *
 cb_format_str (char *dest, size_t destlen, size_t col, int cols, char op, const char *src,
-  const char *fmt, const char *ifstring, const char *elsestring,
-  unsigned long data, format_flag flags)
+               const char *fmt, const char *ifstring, const char *elsestring,
+               unsigned long data, format_flag flags)
 {
   if (!dest || (data == 0))
     return src;
diff --git a/copy.c b/copy.c
index 047fd4331c7e34d275b5097d08d5041f0399eb40..774fe215cb809758b988d8259fe79577cc132534 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -88,8 +88,8 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end, int flags,
          from = 1;
        }
        else if (flags & (CH_NOQFROM) &&
-                       ascii_strncasecmp (">From ", buf, 6) == 0)
-               continue;
+                 ascii_strncasecmp (">From ", buf, 6) == 0)
+          continue;
 
        else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
          break; /* end of header */
@@ -325,29 +325,29 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end, int flags,
   return (0);
 }
 
-/* flags
-       CH_DECODE       RFC2047 header decoding
-       CH_FROM         retain the "From " message separator
-        CH_FORCE_FROM  give CH_FROM precedence over CH_WEED
-       CH_MIME         ignore MIME fields
-       CH_NOLEN        don't write Content-Length: and Lines:
-       CH_NONEWLINE    don't output a newline after the header
-       CH_NOSTATUS     ignore the Status: and X-Status:
-       CH_PREFIX       quote header with $indent_str
-       CH_REORDER      output header in order specified by `hdr_order'
-       CH_TXTPLAIN     generate text/plain MIME headers [hack alert.]
-       CH_UPDATE       write new Status: and X-Status:
-       CH_UPDATE_LEN   write new Content-Length: and Lines:
-       CH_XMIT         ignore Lines: and Content-Length:
-       CH_WEED         do header weeding
-       CH_NOQFROM      ignore ">From " line
-       CH_UPDATE_IRT   update the In-Reply-To: header
-       CH_UPDATE_REFS  update the References: header
-        CH_UPDATE_LABEL update the X-Label: header
-
-   prefix
-       string to use if CH_PREFIX is set
- */
+/* flags:
+   CH_DECODE            RFC2047 header decoding
+   CH_FROM              retain the "From " message separator
+   CH_FORCE_FROM        give CH_FROM precedence over CH_WEED
+   CH_MIME              ignore MIME fields
+   CH_NOLEN             don't write Content-Length: and Lines:
+   CH_NONEWLINE         don't output a newline after the header
+   CH_NOSTATUS          ignore the Status: and X-Status:
+   CH_PREFIX            quote header with $indent_str
+   CH_REORDER           output header in order specified by `hdr_order'
+   CH_TXTPLAIN          generate text/plain MIME headers [hack alert.]
+   CH_UPDATE            write new Status: and X-Status:
+   CH_UPDATE_LEN        write new Content-Length: and Lines:
+   CH_XMIT              ignore Lines: and Content-Length:
+   CH_WEED              do header weeding
+   CH_NOQFROM           ignore ">From " line
+   CH_UPDATE_IRT        update the In-Reply-To: header
+   CH_UPDATE_REFS       update the References: header
+   CH_UPDATE_LABEL      update the X-Label: header
+
+   prefix:
+   string to use if CH_PREFIX is set
+*/
 
 int
 mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix)
@@ -668,7 +668,7 @@ _mutt_copy_message (FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body,
 
     if ((WithCrypto & APPLICATION_SMIME)
         && (flags & MUTT_CM_DECODE_SMIME) && (hdr->security & APPLICATION_SMIME)
-            && hdr->content->type == TYPEAPPLICATION)
+        && hdr->content->type == TYPEAPPLICATION)
     {
       if (crypt_smime_decrypt_mime (fpin, &fp, hdr->content, &cur))
        return (-1);
index 41c59d994f70f9047aba3bb67e3ed89759fc345c..8aaaef859d982336d268dd8b6858fa01297bee61 100644 (file)
@@ -17,8 +17,8 @@
  */
 
 /*
-    This is a crytpo module wrapping the classic pgp code.
- */
+  This is a crytpo module wrapping the classic pgp code.
+*/
 
 #if HAVE_CONFIG_H
 # include "config.h"
@@ -107,31 +107,31 @@ static void crypt_mod_pgp_extract_keys_from_attachment_list (FILE *fp, int tag,
 }
 
 struct crypt_module_specs crypt_mod_pgp_classic =
-  { APPLICATION_PGP,
-    {
-      NULL,                    /* init */
-      crypt_mod_pgp_void_passphrase,
-      crypt_mod_pgp_valid_passphrase,
-      crypt_mod_pgp_decrypt_mime,
-      crypt_mod_pgp_application_handler,
-      crypt_mod_pgp_encrypted_handler,
-      crypt_mod_pgp_findkeys,
-      crypt_mod_pgp_sign_message,
-      crypt_mod_pgp_verify_one,
-      crypt_mod_pgp_send_menu,
-      NULL, /* (set_sender) */
-
-      crypt_mod_pgp_encrypt_message,
-      crypt_mod_pgp_make_key_attachment,
-      crypt_mod_pgp_check_traditional,
-      crypt_mod_pgp_traditional_encryptsign,
-      crypt_mod_pgp_invoke_getkeys,
-      crypt_mod_pgp_invoke_import,
-      crypt_mod_pgp_extract_keys_from_attachment_list,
-
-      NULL,                    /* smime_getkeys */
-      NULL,                    /* smime_verify_sender */
-      NULL,                    /* smime_build_smime_entity */
-      NULL,                    /* smime_invoke_import */
-    }
-  };
+{ APPLICATION_PGP,
+  {
+    NULL,                      /* init */
+    crypt_mod_pgp_void_passphrase,
+    crypt_mod_pgp_valid_passphrase,
+    crypt_mod_pgp_decrypt_mime,
+    crypt_mod_pgp_application_handler,
+    crypt_mod_pgp_encrypted_handler,
+    crypt_mod_pgp_findkeys,
+    crypt_mod_pgp_sign_message,
+    crypt_mod_pgp_verify_one,
+    crypt_mod_pgp_send_menu,
+    NULL, /* (set_sender) */
+
+    crypt_mod_pgp_encrypt_message,
+    crypt_mod_pgp_make_key_attachment,
+    crypt_mod_pgp_check_traditional,
+    crypt_mod_pgp_traditional_encryptsign,
+    crypt_mod_pgp_invoke_getkeys,
+    crypt_mod_pgp_invoke_import,
+    crypt_mod_pgp_extract_keys_from_attachment_list,
+
+    NULL,                      /* smime_getkeys */
+    NULL,                      /* smime_verify_sender */
+    NULL,                      /* smime_build_smime_entity */
+    NULL,                      /* smime_invoke_import */
+  }
+};
index a6b44d2539152b07cfddab144635abc757a9aaf5..b10a6e0e0e9afff0d279b4b00571042ca48a6954 100644 (file)
@@ -17,8 +17,8 @@
  */
 
 /*
-    This is a crytpo module wrapping the gpgme based pgp code.
- */
+  This is a crytpo module wrapping the gpgme based pgp code.
+*/
 
 #if HAVE_CONFIG_H
 # include "config.h"
@@ -106,35 +106,35 @@ static void crypt_mod_pgp_set_sender (const char *sender)
 }
 
 struct crypt_module_specs crypt_mod_pgp_gpgme =
-  { APPLICATION_PGP,
-    {
-      /* Common.  */
-      crypt_mod_pgp_init,
-      crypt_mod_pgp_void_passphrase,
-      crypt_mod_pgp_valid_passphrase,
-      crypt_mod_pgp_decrypt_mime,
-      crypt_mod_pgp_application_handler,
-      crypt_mod_pgp_encrypted_handler,
-      crypt_mod_pgp_findkeys,
-      crypt_mod_pgp_sign_message,
-      crypt_mod_pgp_verify_one,
-      crypt_mod_pgp_send_menu,
-      crypt_mod_pgp_set_sender,
-
-      /* PGP specific.  */
-      crypt_mod_pgp_encrypt_message,
-      crypt_mod_pgp_make_key_attachment,
-      crypt_mod_pgp_check_traditional,
-      NULL,                    /* pgp_traditional_encryptsign  */
-      NULL, /* pgp_invoke_getkeys  */
-      crypt_mod_pgp_invoke_import,
-      NULL, /* pgp_extract_keys_from_attachment_list  */
-
-      NULL,                    /* smime_getkeys */
-      NULL,                    /* smime_verify_sender */
-      NULL,                    /* smime_build_smime_entity */
-      NULL,                    /* smime_invoke_import */
-    }
-  };
+{ APPLICATION_PGP,
+  {
+    /* Common.  */
+    crypt_mod_pgp_init,
+    crypt_mod_pgp_void_passphrase,
+    crypt_mod_pgp_valid_passphrase,
+    crypt_mod_pgp_decrypt_mime,
+    crypt_mod_pgp_application_handler,
+    crypt_mod_pgp_encrypted_handler,
+    crypt_mod_pgp_findkeys,
+    crypt_mod_pgp_sign_message,
+    crypt_mod_pgp_verify_one,
+    crypt_mod_pgp_send_menu,
+    crypt_mod_pgp_set_sender,
+
+    /* PGP specific.  */
+    crypt_mod_pgp_encrypt_message,
+    crypt_mod_pgp_make_key_attachment,
+    crypt_mod_pgp_check_traditional,
+    NULL,                      /* pgp_traditional_encryptsign  */
+    NULL, /* pgp_invoke_getkeys  */
+    crypt_mod_pgp_invoke_import,
+    NULL, /* pgp_extract_keys_from_attachment_list  */
+
+    NULL,                      /* smime_getkeys */
+    NULL,                      /* smime_verify_sender */
+    NULL,                      /* smime_build_smime_entity */
+    NULL,                      /* smime_invoke_import */
+  }
+};
 
 #endif
index 99952d40b961070959698a6249ea9426a0455fe7..f906690c02aecb2dc9522dda1cce01f5534339f9 100644 (file)
@@ -17,8 +17,8 @@
  */
 
 /*
-    This is a crytpo module wrapping the classic smime code.
- */
+  This is a crytpo module wrapping the classic smime code.
+*/
 
 #if HAVE_CONFIG_H
 # include "config.h"
@@ -88,31 +88,31 @@ static void crypt_mod_smime_invoke_import (char *infile, char *mailbox)
 
 
 struct crypt_module_specs crypt_mod_smime_classic =
-  { APPLICATION_SMIME,
-    {
-      NULL,                    /* init */
-      crypt_mod_smime_void_passphrase,
-      crypt_mod_smime_valid_passphrase,
-      crypt_mod_smime_decrypt_mime,
-      crypt_mod_smime_application_handler,
-      NULL,                    /* encrypted_handler */
-      crypt_mod_smime_findkeys,
-      crypt_mod_smime_sign_message,
-      crypt_mod_smime_verify_one,
-      crypt_mod_smime_send_menu,
-      NULL,
-
-      NULL,                    /* pgp_encrypt_message */
-      NULL,                    /* pgp_make_key_attachment */
-      NULL,                    /* pgp_check_traditional */
-      NULL,                    /* pgp_traditional_encryptsign */
-      NULL,                    /* pgp_invoke_getkeys */
-      NULL,                    /* pgp_invoke_import */
-      NULL,                    /* pgp_extract_keys_from_attachment_list */
-
-      crypt_mod_smime_getkeys,
-      crypt_mod_smime_verify_sender,
-      crypt_mod_smime_build_smime_entity,
-      crypt_mod_smime_invoke_import,
-    }
-  };
+{ APPLICATION_SMIME,
+  {
+    NULL,                      /* init */
+    crypt_mod_smime_void_passphrase,
+    crypt_mod_smime_valid_passphrase,
+    crypt_mod_smime_decrypt_mime,
+    crypt_mod_smime_application_handler,
+    NULL,                      /* encrypted_handler */
+    crypt_mod_smime_findkeys,
+    crypt_mod_smime_sign_message,
+    crypt_mod_smime_verify_one,
+    crypt_mod_smime_send_menu,
+    NULL,
+
+    NULL,                      /* pgp_encrypt_message */
+    NULL,                      /* pgp_make_key_attachment */
+    NULL,                      /* pgp_check_traditional */
+    NULL,                      /* pgp_traditional_encryptsign */
+    NULL,                      /* pgp_invoke_getkeys */
+    NULL,                      /* pgp_invoke_import */
+    NULL,                      /* pgp_extract_keys_from_attachment_list */
+
+    crypt_mod_smime_getkeys,
+    crypt_mod_smime_verify_sender,
+    crypt_mod_smime_build_smime_entity,
+    crypt_mod_smime_invoke_import,
+  }
+};
index e8fda3e7eaaeb2ff3e4a8f4bf299c1c99c0bacee..006a5c2f3bb8821e81bc90986657b40cf98e3f38 100644 (file)
@@ -17,8 +17,8 @@
  */
 
 /*
-    This is a crytpo module wrapping the gpgme based smime code.
- */
+  This is a crytpo module wrapping the gpgme based smime code.
+*/
 
 #if HAVE_CONFIG_H
 # include "config.h"
@@ -86,33 +86,33 @@ static int crypt_mod_smime_verify_sender (HEADER *h)
 }
 
 struct crypt_module_specs crypt_mod_smime_gpgme =
-  { APPLICATION_SMIME,
-    {
-      crypt_mod_smime_init,
-      crypt_mod_smime_void_passphrase,
-      crypt_mod_smime_valid_passphrase,
-      crypt_mod_smime_decrypt_mime,
-      crypt_mod_smime_application_handler,
-      NULL,                    /* encrypted_handler */
-      crypt_mod_smime_findkeys,
-      crypt_mod_smime_sign_message,
-      crypt_mod_smime_verify_one,
-      crypt_mod_smime_send_menu,
-      NULL,
-
-      NULL,                    /* pgp_encrypt_message */
-      NULL,                    /* pgp_make_key_attachment */
-      NULL,                    /* pgp_check_traditional */
-      NULL,                    /* pgp_traditional_encryptsign */
-      NULL,                    /* pgp_invoke_getkeys */
-      NULL,                    /* pgp_invoke_import */
-      NULL,                    /* pgp_extract_keys_from_attachment_list */
-
-      NULL,                    /* smime_getkeys */
-      crypt_mod_smime_verify_sender,
-      crypt_mod_smime_build_smime_entity,
-      NULL,                    /* smime_invoke_import */
-    }
-  };
+{ APPLICATION_SMIME,
+  {
+    crypt_mod_smime_init,
+    crypt_mod_smime_void_passphrase,
+    crypt_mod_smime_valid_passphrase,
+    crypt_mod_smime_decrypt_mime,
+    crypt_mod_smime_application_handler,
+    NULL,                      /* encrypted_handler */
+    crypt_mod_smime_findkeys,
+    crypt_mod_smime_sign_message,
+    crypt_mod_smime_verify_one,
+    crypt_mod_smime_send_menu,
+    NULL,
+
+    NULL,                      /* pgp_encrypt_message */
+    NULL,                      /* pgp_make_key_attachment */
+    NULL,                      /* pgp_check_traditional */
+    NULL,                      /* pgp_traditional_encryptsign */
+    NULL,                      /* pgp_invoke_getkeys */
+    NULL,                      /* pgp_invoke_import */
+    NULL,                      /* pgp_extract_keys_from_attachment_list */
+
+    NULL,                      /* smime_getkeys */
+    crypt_mod_smime_verify_sender,
+    crypt_mod_smime_build_smime_entity,
+    NULL,                      /* smime_invoke_import */
+  }
+};
 
 #endif
diff --git a/crypt.c b/crypt.c
index a0a490d554bdbbe8ecc9e9bf5200c688c5f23c30..cc951940221453b6a1870b0013cd61f5fb114a76 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -194,16 +194,16 @@ int mutt_protect (HEADER *msg, char *keylist)
     tmp_pgp_pbody   = msg->content;
 
   if (option (OPTCRYPTUSEPKA) && (msg->security & SIGN))
-    {
-      /* Set sender (necessary for e.g. PKA).  */
+  {
+    /* Set sender (necessary for e.g. PKA).  */
 
-      if ((WithCrypto & APPLICATION_SMIME)
-         && (msg->security & APPLICATION_SMIME))
-       crypt_smime_set_sender (msg->env->from->mailbox);
-      else if ((WithCrypto & APPLICATION_PGP)
-         && (msg->security & APPLICATION_PGP))
-       crypt_pgp_set_sender (msg->env->from->mailbox);
-    }
+    if ((WithCrypto & APPLICATION_SMIME)
+        && (msg->security & APPLICATION_SMIME))
+      crypt_smime_set_sender (msg->env->from->mailbox);
+    else if ((WithCrypto & APPLICATION_PGP)
+             && (msg->security & APPLICATION_PGP))
+      crypt_pgp_set_sender (msg->env->from->mailbox);
+  }
 
   if (option (OPTCRYPTPROTHDRSWRITE))
   {
@@ -242,7 +242,7 @@ int mutt_protect (HEADER *msg, char *keylist)
         && (msg->security & APPLICATION_SMIME)
        && (msg->security & APPLICATION_PGP))
     {
-       /* here comes the draft ;-) */
+      /* here comes the draft ;-) */
     }
   }
 
@@ -403,7 +403,7 @@ int mutt_is_malformed_multipart_pgp_encrypted (BODY *b)
   b = b->parts;
   if (!b || b->type != TYPETEXT ||
       !b->subtype || ascii_strcasecmp (b->subtype, "plain") ||
-       b->length != 0)
+      b->length != 0)
     return 0;
 
   b = b->next;
@@ -455,7 +455,7 @@ int mutt_is_application_pgp (BODY *m)
     if (((p = mutt_get_parameter ("x-mutt-action", m->parameter))
         || (p = mutt_get_parameter ("x-action", m->parameter))
         || (p = mutt_get_parameter ("action", m->parameter)))
-        && !ascii_strncasecmp ("pgp-sign", p, 8))
+        && !ascii_strncasecmp ("pgp-sign", p, 8))
       t |= PGPSIGN;
     else if (p && !ascii_strncasecmp ("pgp-encrypt", p, 11))
       t |= PGPENCRYPT;
@@ -519,9 +519,9 @@ int mutt_is_application_smime (BODY *m)
     {
       len++;
       if (!ascii_strcasecmp ((t+len), "p7m"))
-      /* Not sure if this is the correct thing to do, but
-         it's required for compatibility with Outlook */
-       return (SMIMESIGN|SMIMEOPAQUE);
+        /* Not sure if this is the correct thing to do, but
+           it's required for compatibility with Outlook */
+        return (SMIMESIGN|SMIMEOPAQUE);
       else if (!ascii_strcasecmp ((t+len), "p7s"))
        return (SMIMESIGN|SMIMEOPAQUE);
     }
@@ -743,8 +743,7 @@ void crypt_extract_keys_from_messages (HEADER * h)
           if (Context->hdrs[Context->v2r[i]]->env->from)
            tmp = mutt_expand_aliases (Context->hdrs[Context->v2r[i]]->env->from);
          else if (Context->hdrs[Context->v2r[i]]->env->sender)
-           tmp = mutt_expand_aliases (Context->hdrs[Context->v2r[i]]
-                                                    ->env->sender);
+           tmp = mutt_expand_aliases (Context->hdrs[Context->v2r[i]]->env->sender);
           mbox = tmp ? tmp->mailbox : NULL;
          if (mbox)
          {
@@ -776,9 +775,9 @@ void crypt_extract_keys_from_messages (HEADER * h)
           && (h->security & APPLICATION_SMIME))
       {
        if (h->security & ENCRYPT)
-         mutt_copy_message (fpout, Context, h, MUTT_CM_NOHEADER
-                                                |MUTT_CM_DECODE_CRYPT
-                                                |MUTT_CM_DECODE_SMIME, 0);
+         mutt_copy_message (fpout, Context, h,
+                             MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
+                             0);
        else
          mutt_copy_message (fpout, Context, h, 0, 0);
 
@@ -836,29 +835,29 @@ int crypt_get_keys (HEADER *msg, char **keylist, int oppenc_mode)
 
   if (oppenc_mode || (msg->security & ENCRYPT))
   {
-     if ((WithCrypto & APPLICATION_PGP)
-         && (msg->security & APPLICATION_PGP))
-     {
-       if ((*keylist = crypt_pgp_findkeys (adrlist, oppenc_mode)) == NULL)
-       {
-           rfc822_free_address (&adrlist);
-           return (-1);
-       }
-       unset_option (OPTPGPCHECKTRUST);
-       if (option (OPTPGPSELFENCRYPT))
-         self_encrypt = PgpDefaultKey;
-     }
-     if ((WithCrypto & APPLICATION_SMIME)
-         && (msg->security & APPLICATION_SMIME))
-     {
-       if ((*keylist = crypt_smime_findkeys (adrlist, oppenc_mode)) == NULL)
-       {
-           rfc822_free_address (&adrlist);
-           return (-1);
-       }
-       if (option (OPTSMIMESELFENCRYPT))
-         self_encrypt = SmimeDefaultKey;
-     }
+    if ((WithCrypto & APPLICATION_PGP)
+        && (msg->security & APPLICATION_PGP))
+    {
+      if ((*keylist = crypt_pgp_findkeys (adrlist, oppenc_mode)) == NULL)
+      {
+        rfc822_free_address (&adrlist);
+        return (-1);
+      }
+      unset_option (OPTPGPCHECKTRUST);
+      if (option (OPTPGPSELFENCRYPT))
+        self_encrypt = PgpDefaultKey;
+    }
+    if ((WithCrypto & APPLICATION_SMIME)
+        && (msg->security & APPLICATION_SMIME))
+    {
+      if ((*keylist = crypt_smime_findkeys (adrlist, oppenc_mode)) == NULL)
+      {
+        rfc822_free_address (&adrlist);
+        return (-1);
+      }
+      if (option (OPTSMIMESELFENCRYPT))
+        self_encrypt = SmimeDefaultKey;
+    }
   }
 
   if (!oppenc_mode && self_encrypt && *self_encrypt)
@@ -1057,7 +1056,7 @@ int mutt_signed_handler (BODY *a, STATE *s)
 
          state_printf (s, _("[-- Warning: "
                              "We can't verify %s/%s signatures. --]\n\n"),
-                         TYPE(signatures[i]), signatures[i]->subtype);
+                        TYPE(signatures[i]), signatures[i]->subtype);
        }
       }
 
@@ -1090,7 +1089,7 @@ int mutt_signed_handler (BODY *a, STATE *s)
  * See mutt_crypt.h for details.
  */
 const char* crypt_get_fingerprint_or_id (char *p, const char **pphint,
-    const char **ppl, const char **pps)
+                                         const char **ppl, const char **pps)
 {
   const char *ps, *pl, *phint;
   char *pfcopy, *pf, *s1, *s2;
index 6d549f9ff4a9c6b49cdd60c204d966a1967a9103..e2af8bba144c2f0278fa4d80b7a08c5cbfd71c7a 100644 (file)
@@ -18,9 +18,9 @@
  */
 
 /*
-   This file dispatches the generic crypto functions to the
-   implemented backend or provides dummy stubs.  Note, that some
-   generic functions are handled in crypt.c.
+  This file dispatches the generic crypto functions to the
+  implemented backend or provides dummy stubs.  Note, that some
+  generic functions are handled in crypt.c.
 */
 
 /* Note: This file has been changed to make use of the new module
@@ -39,7 +39,7 @@
 
 /*
 
-    Generic
+  Generic
 
 */
 
@@ -81,17 +81,17 @@ void crypt_init (void)
 #endif
 
   if (option (OPTCRYPTUSEGPGME))
-    {
+  {
 #ifdef CRYPT_BACKEND_GPGME
-      crypto_module_register (&crypt_mod_pgp_gpgme);
-      crypto_module_register (&crypt_mod_smime_gpgme);
+    crypto_module_register (&crypt_mod_pgp_gpgme);
+    crypto_module_register (&crypt_mod_smime_gpgme);
 #else
-      mutt_message (_("\"crypt_use_gpgme\" set"
-                      " but not built with GPGME support."));
-      if (mutt_any_key_to_continue (NULL) == -1)
-       mutt_exit(1);
+    mutt_message (_("\"crypt_use_gpgme\" set"
+                    " but not built with GPGME support."));
+    if (mutt_any_key_to_continue (NULL) == -1)
+      mutt_exit(1);
 #endif
-    }
+  }
 
 #if defined CRYPT_BACKEND_CLASSIC_PGP || defined CRYPT_BACKEND_CLASSIC_SMIME || defined CRYPT_BACKEND_GPGME
   if (CRYPT_MOD_CALL_CHECK (PGP, init))
@@ -132,7 +132,7 @@ int crypt_has_module_backend (int type)
 \f
 /*
 
-    PGP
+  PGP
 
 */
 
@@ -289,7 +289,7 @@ void crypt_pgp_set_sender (const char *sender)
 
 /*
 
-   S/MIME
+  S/MIME
 
 */
 
index 2435b8e09db9d4a6e42b71010a4d7905b4186ddb..a84b81681a8ba55a8c415f3fec82b354895fd9cf 100644 (file)
@@ -298,9 +298,9 @@ int mutt_yesorno (const char *msg, int def)
   answer[1] = 0;
 
   reyes_ok = (expr = nl_langinfo (YESEXPR)) && expr[0] == '^' &&
-            !REGCOMP (&reyes, expr, REG_NOSUB);
+    !REGCOMP (&reyes, expr, REG_NOSUB);
   reno_ok = (expr = nl_langinfo (NOEXPR)) && expr[0] == '^' &&
-            !REGCOMP (&reno, expr, REG_NOSUB);
+    !REGCOMP (&reno, expr, REG_NOSUB);
 #endif
 
   /*
@@ -608,7 +608,7 @@ void mutt_progress_init (progress_t* progress, const char *msg,
   /* if timestamp is 0 no time-based suppression is done */
   if (TimeInc)
     progress->timestamp = ((unsigned int) tv.tv_sec * 1000)
-        + (unsigned int) (tv.tv_usec / 1000);
+      + (unsigned int) (tv.tv_usec / 1000);
   mutt_progress_update (progress, 0, 0);
 }
 
@@ -635,7 +635,7 @@ void mutt_progress_update (progress_t* progress, long pos, int percent)
   /* skip refresh if not enough time has passed */
   if (update && progress->timestamp && !gettimeofday (&tv, NULL)) {
     now = ((unsigned int) tv.tv_sec * 1000)
-          + (unsigned int) (tv.tv_usec / 1000);
+      + (unsigned int) (tv.tv_usec / 1000);
     if (now && now - progress->timestamp < TimeInc)
       update = 0;
   }
@@ -664,7 +664,7 @@ void mutt_progress_update (progress_t* progress, long pos, int percent)
     {
       mutt_message ("%s %s/%s (%d%%)", progress->msg, posstr, progress->sizestr,
                    percent > 0 ? percent :
-                       (int) (100.0 * (double) progress->pos / progress->size));
+                    (int) (100.0 * (double) progress->pos / progress->size));
     }
     else
     {
@@ -891,7 +891,7 @@ void mutt_perror (const char *s)
   char *p = strerror (errno);
 
   dprint (1, (debugfile, "%s: %s (errno = %d)\n", s,
-      p ? p : "unknown error", errno));
+              p ? p : "unknown error", errno));
   mutt_error ("%s: %s (errno = %d)", s, p ? p : _("unknown error"), errno);
 }
 
@@ -1228,8 +1228,8 @@ void mutt_format_string (char *dest, size_t destlen,
        wc = ' ';
       else
 #endif
-      if (!IsWPrint (wc))
-       wc = '?';
+        if (!IsWPrint (wc))
+          wc = '?';
       w = wcwidth (wc);
     }
     if (w >= 0)
index c7077f1e964da92c77f26cbfb241afbd21500227..185afbfeea4a8931e1856d5040bfc4fe129349b2 100644 (file)
@@ -64,55 +64,61 @@ static const char *Mailbox_is_read_only = N_("Mailbox is read-only.");
 static const char *Function_not_permitted_in_attach_message_mode = N_("Function not permitted in attach-message mode.");
 static const char *No_visible = N_("No visible messages.");
 
-#define CHECK_IN_MAILBOX if (!Context) \
-       { \
-               mutt_flushinp (); \
-               mutt_error _(No_mailbox_is_open); \
-               break; \
-       }
-
-#define CHECK_MSGCOUNT if (!Context) \
-       { \
-               mutt_flushinp (); \
-               mutt_error _(No_mailbox_is_open); \
-               break; \
-       } \
-       else if (!Context->msgcount) \
-       { \
-               mutt_flushinp (); \
-               mutt_error _(There_are_no_messages); \
-               break; \
-       }
-
-#define CHECK_VISIBLE if (Context && menu->current >= Context->vcount) \
-       {\
-               mutt_flushinp (); \
-               mutt_error _(No_visible); \
-               break; \
-       }
-
-
-#define CHECK_READONLY if (Context->readonly) \
-                       { \
-                               mutt_flushinp (); \
-                               mutt_error _(Mailbox_is_read_only); \
-                               break; \
-                       }
-
-#define CHECK_ACL(aclbit,action) \
-               if (!mutt_bit_isset(Context->rights,aclbit)) { \
-                       mutt_flushinp(); \
-        /* L10N: %s is one of the CHECK_ACL entries below. */ \
-                       mutt_error (_("%s: Operation not permitted by ACL"), action); \
-                       break; \
-               }
+#define CHECK_IN_MAILBOX                        \
+  if (!Context)                                 \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(No_mailbox_is_open);           \
+    break;                                      \
+  }
+
+#define CHECK_MSGCOUNT                          \
+  if (!Context)                                 \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(No_mailbox_is_open);           \
+    break;                                      \
+  }                                             \
+  else if (!Context->msgcount)                  \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(There_are_no_messages);        \
+    break;                                      \
+  }
+
+#define CHECK_VISIBLE                                   \
+  if (Context && menu->current >= Context->vcount)      \
+  {                                                     \
+    mutt_flushinp ();                                   \
+    mutt_error _(No_visible);                           \
+    break;                                              \
+  }
 
-#define CHECK_ATTACH if(option(OPTATTACHMSG)) \
-                    {\
-                       mutt_flushinp (); \
-                       mutt_error _(Function_not_permitted_in_attach_message_mode); \
-                       break; \
-                    }
+
+#define CHECK_READONLY                          \
+  if (Context->readonly)                        \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(Mailbox_is_read_only);         \
+    break;                                      \
+  }
+
+#define CHECK_ACL(aclbit,action)                                        \
+  if (!mutt_bit_isset(Context->rights,aclbit))                          \
+  {                                                                     \
+    mutt_flushinp();                                                    \
+    /* L10N: %s is one of the CHECK_ACL entries below. */               \
+    mutt_error (_("%s: Operation not permitted by ACL"), action);       \
+    break;                                                              \
+  }
+
+#define CHECK_ATTACH                                                    \
+  if (option(OPTATTACHMSG))                                             \
+  {                                                                     \
+    mutt_flushinp ();                                                   \
+    mutt_error _(Function_not_permitted_in_attach_message_mode);        \
+    break;                                                              \
+  }
 
 #define CURHDR Context->hdrs[Context->v2r[menu->current]]
 #define OLDHDR Context->hdrs[Context->v2r[menu->oldcurrent]]
@@ -455,7 +461,7 @@ static void update_index_unthreaded (CONTEXT *ctx, int check, int oldcount)
        ctx->hdrs[j]->limited = 1;
        ctx->vcount++;
        ctx->vsize += this_body->length + this_body->offset -
-                      this_body->hdr_offset + padding;
+          this_body->hdr_offset + padding;
       }
     }
   }
@@ -708,27 +714,27 @@ int mutt_index_menu (void)
 
     if (!attach_msg)
     {
-     /* check for new mail in the incoming folders */
-     oldcount = newcount;
-     if ((newcount = mutt_buffy_check (0)) != oldcount)
-       menu->redraw |= REDRAW_STATUS;
-     if (do_buffy_notify)
-     {
-       if (mutt_buffy_notify())
-       {
-         menu->redraw |= REDRAW_STATUS;
-         if (option (OPTBEEPNEW))
-           beep();
-        if (NewMailCmd)
-        {
-          char cmd[LONG_STRING];
-          menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
-          mutt_system(cmd);
-        }
-       }
-     }
-     else
-       do_buffy_notify = 1;
+      /* check for new mail in the incoming folders */
+      oldcount = newcount;
+      if ((newcount = mutt_buffy_check (0)) != oldcount)
+        menu->redraw |= REDRAW_STATUS;
+      if (do_buffy_notify)
+      {
+        if (mutt_buffy_notify())
+        {
+          menu->redraw |= REDRAW_STATUS;
+          if (option (OPTBEEPNEW))
+            beep();
+          if (NewMailCmd)
+          {
+            char cmd[LONG_STRING];
+            menu_status_line(cmd, sizeof(cmd), menu, NONULL(NewMailCmd));
+            mutt_system(cmd);
+          }
+        }
+      }
+      else
+        do_buffy_notify = 1;
     }
 
     if (op >= 0)
@@ -935,7 +941,7 @@ int mutt_index_menu (void)
              continue;
            }
            else
-           menu->redraw = REDRAW_MOTION;
+              menu->redraw = REDRAW_MOTION;
          }
          else
            mutt_error _("That message is not visible.");
@@ -986,13 +992,13 @@ int mutt_index_menu (void)
       case OP_MAIN_SHOW_LIMIT:
        CHECK_IN_MAILBOX;
        if (!Context->pattern)
-          mutt_message _("No limit pattern is in effect.");
+          mutt_message _("No limit pattern is in effect.");
        else
        {
-          char buf[STRING];
-          /* L10N: ask for a limit to apply */
-          snprintf (buf, sizeof(buf), _("Limit: %s"),Context->pattern);
-           mutt_message ("%s", buf);
+          char buf[STRING];
+          /* L10N: ask for a limit to apply */
+          snprintf (buf, sizeof(buf), _("Limit: %s"),Context->pattern);
+          mutt_message ("%s", buf);
        }
         break;
 
@@ -1000,7 +1006,7 @@ int mutt_index_menu (void)
 
        CHECK_IN_MAILBOX;
        menu->oldcurrent = (Context->vcount && menu->current >= 0 && menu->current < Context->vcount) ?
-               CURHDR->index : -1;
+          CURHDR->index : -1;
        if (mutt_pattern_func (MUTT_LIMIT, _("Limit to messages matching: ")) == 0)
        {
          if (menu->oldcurrent >= 0)
@@ -1030,8 +1036,8 @@ int mutt_index_menu (void)
        close = op;
        if (attach_msg)
        {
-        done = 1;
-        break;
+          done = 1;
+          break;
        }
 
        if (query_quadoption (OPT_QUIT, _("Quit Mutt?")) == MUTT_YES)
@@ -1335,7 +1341,7 @@ int mutt_index_menu (void)
            new_last_folder = safe_strdup (Context->realpath);
          else
 #endif
-         new_last_folder = safe_strdup (Context->path);
+            new_last_folder = safe_strdup (Context->path);
          oldcount = Context ? Context->msgcount : 0;
 
          if ((check = mx_close_mailbox (Context, &index_hint)) != 0)
@@ -1442,8 +1448,8 @@ int mutt_index_menu (void)
        close = op;
        if (menu->menu == MENU_MAIN && attach_msg)
        {
-        done = 1;
-        break;
+          done = 1;
+          break;
        }
 
        if ((menu->menu == MENU_MAIN)
@@ -1655,8 +1661,8 @@ int mutt_index_menu (void)
                               (op == OP_DECODE_SAVE) || (op == OP_DECODE_COPY),
                               (op == OP_DECRYPT_SAVE) || (op == OP_DECRYPT_COPY) ||
                               0) == 0 &&
-            (op == OP_SAVE || op == OP_DECODE_SAVE || op == OP_DECRYPT_SAVE)
-           )
+            (op == OP_SAVE || op == OP_DECODE_SAVE || op == OP_DECRYPT_SAVE)
+          )
        {
           menu->redraw |= REDRAW_STATUS;
          if (tag)
@@ -1986,7 +1992,7 @@ int mutt_index_menu (void)
 
        menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
 
-       break;
+        break;
 
       case OP_MAIN_COLLAPSE_ALL:
         CHECK_MSGCOUNT;
diff --git a/date.c b/date.c
index 4080b6475211855faa244bd7a6f7a5c76aa5ae98..b956cc5bd1489dba81e5b5f0b3208c29650b9487 100644 (file)
--- a/date.c
+++ b/date.c
@@ -204,7 +204,7 @@ void mutt_normalize_time (struct tm *tm)
     tm->tm_mday += DaysPerMonth[tm->tm_mon] + isLeapYearFeb (tm);
   }
   while (tm->tm_mday > (DaysPerMonth[tm->tm_mon] +
-       (nLeap = isLeapYearFeb (tm))))
+                        (nLeap = isLeapYearFeb (tm))))
   {
     tm->tm_mday -= DaysPerMonth[tm->tm_mon] + nLeap;
     if (tm->tm_mon < 11)
index b45502ed197099f4fb828d0c1a7d806c3fb17dff..c146b287c8190642495a7a9cb1762132896c838e 100644 (file)
@@ -194,7 +194,7 @@ static void makedoc (FILE *in, FILE *out)
     if ((p = strchr (buffer, '\n')) == NULL)
     {
       fprintf (stderr, "%s: Line %d too long.  Ask a wizard to enlarge\n"
-                      "%s: my buffer size.\n", Progname, line, Progname);
+               "%s: my buffer size.\n", Progname, line, Progname);
       exit (1);
     }
     else
@@ -249,8 +249,8 @@ static char *get_token (char *d, size_t l, char *s)
   char *dd = d;
 
   if (Debug)
-     fprintf (stderr, "%s: get_token called for `%s'.\n",
-             Progname, s);
+    fprintf (stderr, "%s: get_token called for `%s'.\n",
+             Progname, s);
 
   s = skip_ws (s);
 
@@ -368,23 +368,23 @@ struct
   char *machine;
   char *human;
 }
-types[] =
-{
-  { "DT_NONE", "-none-"        },
-  { "DT_BOOL",  "boolean"      },
-  { "DT_NUM",   "number"       },
-  { "DT_LNUM",  "number (long)"        },
-  { "DT_STR",  "string"        },
-  { "DT_PATH", "path"          },
-  { "DT_QUAD", "quadoption"    },
-  { "DT_SORT", "sort order"    },
-  { "DT_RX",   "regular expression" },
-  { "DT_MAGIC",        "folder magic" },
-  { "DT_SYN",  NULL },
-  { "DT_ADDR", "e-mail address" },
-  { "DT_MBCHARTBL", "string"   },
-  { NULL, NULL }
-};
+  types[] =
+  {
+    { "DT_NONE",       "-none-"        },
+    { "DT_BOOL",  "boolean"    },
+    { "DT_NUM",   "number"     },
+    { "DT_LNUM",  "number (long)"      },
+    { "DT_STR",        "string"        },
+    { "DT_PATH",       "path"          },
+    { "DT_QUAD",       "quadoption"    },
+    { "DT_SORT",       "sort order"    },
+    { "DT_RX", "regular expression" },
+    { "DT_MAGIC",      "folder magic" },
+    { "DT_SYN",        NULL },
+    { "DT_ADDR",       "e-mail address" },
+    { "DT_MBCHARTBL", "string" },
+    { NULL, NULL }
+  };
 
 
 static int buff2type (const char *s)
@@ -393,7 +393,7 @@ static int buff2type (const char *s)
 
   for (type = DT_NONE; types[type].machine; type++)
     if (!strcmp (types[type].machine, s))
-       return type;
+      return type;
 
   fprintf (stderr, "%s: Unknown type %s.  Please update makedoc.c\n",
            Progname, s);
@@ -1265,25 +1265,25 @@ void print_ref (FILE *out, int output_dollar, const char *ref)
 {
   switch (OutputFormat)
   {
-  case F_CONF:
-  case F_MAN:
-    if (output_dollar)
-      putc ('$', out);
-    fputs (ref, out);
-    break;
-
-  case F_SGML:
-    fputs ("<link linkend=\"", out);
-    sgml_id_fputs (ref, out);
-    fputs ("\">", out);
-    if (output_dollar)
-      fputc ('$', out);
-    sgml_fputs (ref, out);
-    fputs ("</link>", out);
-    break;
-
-  default:
-    break;
+    case F_CONF:
+    case F_MAN:
+      if (output_dollar)
+        putc ('$', out);
+      fputs (ref, out);
+      break;
+
+    case F_SGML:
+      fputs ("<link linkend=\"", out);
+      sgml_id_fputs (ref, out);
+      fputs ("\">", out);
+      if (output_dollar)
+        fputc ('$', out);
+      sgml_fputs (ref, out);
+      fputs ("</link>", out);
+      break;
+
+    default:
+      break;
   }
 }
 
index 584c8a16fb305b1490feda87d2b902822360dd4e..5eeb368a50d5b2c82984874c851174be49570c4f 100644 (file)
--- a/dotlock.c
+++ b/dotlock.c
@@ -341,19 +341,19 @@ usage (const char *av0)
 {
   fprintf (stderr, "dotlock [Mutt %s (%s)]\n", MUTT_VERSION, ReleaseDate);
   fprintf (stderr, "usage: %s [-t|-f|-u|-d] [-p] [-r <retries>] file\n",
-         av0);
+           av0);
 
   fputs ("\noptions:"
-       "\n  -t\t\ttry"
-       "\n  -f\t\tforce"
-       "\n  -u\t\tunlock"
-       "\n  -d\t\tunlink"
-       "\n  -p\t\tprivileged"
+         "\n  -t\t\ttry"
+         "\n  -f\t\tforce"
+         "\n  -u\t\tunlock"
+         "\n  -d\t\tunlink"
+         "\n  -p\t\tprivileged"
 #ifndef USE_SETGID
-       " (ignored)"
+         " (ignored)"
 #endif
-       "\n  -r <retries>\tRetry locking"
-       "\n", stderr);
+         "\n  -r <retries>\tRetry locking"
+         "\n", stderr);
 
   exit (DL_EX_ERROR);
 }
@@ -420,13 +420,13 @@ dotlock_check_stats (struct stat *fsb, struct stat *lsb)
     return -1;
 
   if ((lsb->st_dev != fsb->st_dev) ||
-     (lsb->st_ino != fsb->st_ino) ||
-     (lsb->st_mode != fsb->st_mode) ||
-     (lsb->st_nlink != fsb->st_nlink) ||
-     (lsb->st_uid != fsb->st_uid) ||
-     (lsb->st_gid != fsb->st_gid) ||
-     (lsb->st_rdev != fsb->st_rdev) ||
-     (lsb->st_size != fsb->st_size))
+      (lsb->st_ino != fsb->st_ino) ||
+      (lsb->st_mode != fsb->st_mode) ||
+      (lsb->st_nlink != fsb->st_nlink) ||
+      (lsb->st_uid != fsb->st_uid) ||
+      (lsb->st_gid != fsb->st_gid) ||
+      (lsb->st_rdev != fsb->st_rdev) ||
+      (lsb->st_size != fsb->st_size))
   {
     /* something's fishy */
     return -1;
@@ -596,7 +596,7 @@ dotlock_lock (const char *realpath)
   time_t t;
 
   snprintf (nfslockfile, sizeof (nfslockfile), "%s.%s.%d",
-          realpath, Hostname, (int) getpid ());
+            realpath, Hostname, (int) getpid ());
   snprintf (lockfile, sizeof (lockfile), "%s.lock", realpath);
 
 
@@ -697,7 +697,7 @@ dotlock_unlock (const char *realpath)
   int i;
 
   snprintf (lockfile, sizeof (lockfile), "%s.lock",
-          realpath);
+            realpath);
 
   BEGIN_PRIVILEGED ();
   i = unlink (lockfile);
diff --git a/edit.c b/edit.c
index 772bccea1ba221a1d972b35a13f79ab9e30f1fa6..f7f2970b58b9acd906c1f27169e29d2c959b036c 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -381,7 +381,7 @@ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur)
              /* include the current message */
              p = tmp + mutt_strlen (tmp) + 1;
              snprintf (tmp + mutt_strlen (tmp), sizeof (tmp) - mutt_strlen (tmp), " %d",
-                                                               cur->msgno + 1);
+                        cur->msgno + 1);
            }
            buf = be_include_messages (p, buf, &bufmax, &buflen,
                                       (ascii_tolower (tmp[1]) == 'm'),
index 2db86835c15d0195b988834752c38b4a25224ea0..4c9b317ca479b0618b7e47b17fc6742a20c12d13 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -80,7 +80,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur)
   }
 
   rc = mutt_append_message (&tmpctx, ctx, cur, 0, CH_NOLEN |
-       ((ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS));
+                            ((ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS));
   oerrno = errno;
 
   mx_close_mailbox (&tmpctx, NULL);
@@ -191,7 +191,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur)
 
   mx_close_mailbox (&tmpctx, NULL);
 
-  bail:
+bail:
   if (fp) safe_fclose (&fp);
 
   if (rc >= 0)
diff --git a/enter.c b/enter.c
index 83b47b4ad0808ead92fbefd7cac29c82fac186dd..ef7c4df57e005b9738b71692bf0459b3c23d7bb0 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -134,7 +134,7 @@ static size_t my_mbstowcs (wchar_t **pwbuf, size_t *pwbuflen, size_t i, char *bu
   {
     memset (&st, 0, sizeof (st));
     for (; (k = mbrtowc (&wc, buf, MB_LEN_MAX, &st)) &&
-        k != (size_t)(-1) && k != (size_t)(-2); buf += k)
+           k != (size_t)(-1) && k != (size_t)(-2); buf += k)
     {
       if (i >= wbuflen)
       {
@@ -311,7 +311,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int col,
       }
       mutt_window_clrtoeol (MuttMessageWindow);
       mutt_window_move (MuttMessageWindow, 0,
-          col + my_wcswidth (state->wbuf + state->begin, state->curpos - state->begin));
+                        col + my_wcswidth (state->wbuf + state->begin, state->curpos - state->begin));
     }
     mutt_refresh ();
 
@@ -579,8 +579,9 @@ int _mutt_enter_string (char *buf, size_t buflen, int col,
          else if (flags & MUTT_ALIAS && ch == OP_EDITOR_COMPLETE)
          {
            /* invoke the alias-menu to get more addresses */
-           for (i = state->curpos; i && state->wbuf[i-1] != ',' &&
-                state->wbuf[i-1] != ':'; i--)
+           for (i = state->curpos;
+                 i && state->wbuf[i-1] != ',' && state->wbuf[i-1] != ':';
+                 i--)
              ;
            for (; i < state->lastchar && state->wbuf[i] == ' '; i++)
              ;
@@ -596,8 +597,9 @@ int _mutt_enter_string (char *buf, size_t buflen, int col,
          }
          else if (flags & MUTT_LABEL && ch == OP_EDITOR_COMPLETE)
          {
-           for (i = state->curpos; i && state->wbuf[i-1] != ',' &&
-                state->wbuf[i-1] != ':'; i--)
+           for (i = state->curpos;
+                 i && state->wbuf[i-1] != ',' && state->wbuf[i-1] != ':';
+                 i--)
              ;
            for (; i < state->lastchar && state->wbuf[i] == ' '; i++)
              ;
@@ -665,8 +667,9 @@ int _mutt_enter_string (char *buf, size_t buflen, int col,
            my_wcstombs (buf, buflen, state->wbuf, state->curpos);
 
            /* see if the path has changed from the last time */
-           if ((!tempbuf && !state->lastchar) || (tempbuf && templen == state->lastchar &&
-               !memcmp (tempbuf, state->wbuf, state->lastchar * sizeof (wchar_t))))
+           if ((!tempbuf && !state->lastchar) ||
+                (tempbuf && templen == state->lastchar &&
+                 !memcmp (tempbuf, state->wbuf, state->lastchar * sizeof (wchar_t))))
            {
              _mutt_select_file (buf, buflen,
                                 ((flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0) | (multiple ? MUTT_SEL_MULTI : 0),
@@ -700,25 +703,25 @@ int _mutt_enter_string (char *buf, size_t buflen, int col,
          break;
 
        case OP_EDITOR_QUOTE_CHAR:
-         {
-           event_t event;
-           /*ADDCH (LastKey);*/
-            do
-            {
-              event = mutt_getch ();
-            } while (event.ch == -2);
-           if (event.ch >= 0)
-           {
-             LastKey = event.ch;
-             goto self_insert;
-           }
-         }
+        {
+          event_t event;
+          /*ADDCH (LastKey);*/
+          do
+          {
+            event = mutt_getch ();
+          } while (event.ch == -2);
+          if (event.ch >= 0)
+          {
+            LastKey = event.ch;
+            goto self_insert;
+          }
+        }
 
        case OP_EDITOR_TRANSPOSE_CHARS:
          if (state->lastchar < 2)
            BEEP ();
          else
-       {
+          {
            wchar_t t;
 
            if (state->curpos == 0)
@@ -816,7 +819,7 @@ self_insert:
     }
   }
 
-  bye:
+bye:
 
   mutt_reset_history_state (hclass);
   FREE (&tempbuf);
index 2218ed53ad786ca7399093e6de4cb071833519e9..121f4cf2e1c4fe18e3a2000d4c0515278d3e7a66 100644 (file)
@@ -340,22 +340,22 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
        dprint (2, (debugfile, "capabilities info: %s\n", p));
 
        while(*p)
-         {
-           switch(*p++)
-             {
-             case 'D':
-               flags |= KEYFLAG_DISABLED;
-               break;
-
-             case 'e':
-               flags |= KEYFLAG_CANENCRYPT;
-               break;
-
-             case 's':
-               flags |= KEYFLAG_CANSIGN;
-               break;
-             }
-         }
+        {
+          switch(*p++)
+          {
+            case 'D':
+              flags |= KEYFLAG_DISABLED;
+              break;
+
+            case 'e':
+              flags |= KEYFLAG_CANENCRYPT;
+              break;
+
+            case 's':
+              flags |= KEYFLAG_CANSIGN;
+              break;
+          }
+        }
 
         if (!is_uid &&
            (!*is_subkey || !option (OPTPGPIGNORESUB)
index 5621c142f4a8f915fa163be9859e25fa78cbd02d..66413b2d220d39acb8eeb781957eeebde8fdde45 100644 (file)
--- a/handler.c
+++ b/handler.c
 typedef int (*handler_t) (BODY *, STATE *);
 
 const int Index_hex[128] = {
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-     0, 1, 2, 3,  4, 5, 6, 7,  8, 9,-1,-1, -1,-1,-1,-1,
-    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  0, 1, 2, 3,  4, 5, 6, 7,  8, 9,-1,-1, -1,-1,-1,-1,
+  -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1
 };
 
 const int Index_64[128] = {
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
-    52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
-    -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
-    15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
-    -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
-    41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
+  52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
+  -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
+  15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
+  -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+  41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
 };
 
 static void state_prefix_put (const char *d, size_t dlen, STATE *s)
@@ -269,7 +269,7 @@ static void mutt_decode_quoted (STATE *s, long len, int istext, iconv_t cd)
     if (last == '\n')
     {
       while (linelen > 0 && ISSPACE (line[linelen-1]))
-       linelen--;
+        linelen--;
       line[linelen]=0;
     }
 
@@ -309,7 +309,7 @@ void mutt_decode_base64 (STATE *s, long len, int istext, iconv_t cd)
       /* "i" may be zero if there is trailing whitespace, which is not an error */
       if (i != 0)
        dprint (2, (debugfile, "%s:%d [mutt_decode_base64()]: "
-             "didn't get a multiple of 4 chars.\n", __FILE__, __LINE__));
+                    "didn't get a multiple of 4 chars.\n", __FILE__, __LINE__));
       break;
     }
 
@@ -433,8 +433,8 @@ static void mutt_decode_uuencoded (STATE *s, long len, int istext, iconv_t cd)
 #define IndentSize (4)
 
 enum { RICH_PARAM=0, RICH_BOLD, RICH_UNDERLINE, RICH_ITALIC, RICH_NOFILL,
-  RICH_INDENT, RICH_INDENT_RIGHT, RICH_EXCERPT, RICH_CENTER, RICH_FLUSHLEFT,
-  RICH_FLUSHRIGHT, RICH_COLOR, RICH_LAST_TAG };
+       RICH_INDENT, RICH_INDENT_RIGHT, RICH_EXCERPT, RICH_CENTER, RICH_FLUSHLEFT,
+       RICH_FLUSHRIGHT, RICH_COLOR, RICH_LAST_TAG };
 
 static const struct {
   const wchar_t *tag_name;
@@ -562,7 +562,7 @@ static void enriched_wrap (struct enriched_state *stte)
       if (stte->s->prefix)
       {
        state_puts (stte->s->prefix, stte->s);
-           stte->indent_len += mutt_strlen (stte->s->prefix);
+        stte->indent_len += mutt_strlen (stte->s->prefix);
       }
       else
       {
@@ -974,7 +974,7 @@ static int mutt_is_autoview (BODY *b)
     for (; t; t = t->next) {
       int i = mutt_strlen (t->data) - 1;
       if ((i > 0 && t->data[i-1] == '/' && t->data[i] == '*' &&
-            ascii_strncasecmp (type, t->data, i) == 0) ||
+           ascii_strncasecmp (type, t->data, i) == 0) ||
           ascii_strcasecmp (type, t->data) == 0)
         is_autoview = 1;
     }
@@ -1014,8 +1014,9 @@ static int alternative_handler (BODY *a, STATE *s)
     b = mutt_new_body ();
     b->length = (long) st.st_size;
     b->parts = mutt_parse_multipart (s->fpin,
-                 mutt_get_parameter ("boundary", a->parameter),
-                 (long) st.st_size, ascii_strcasecmp ("digest", a->subtype) == 0);
+                                     mutt_get_parameter ("boundary", a->parameter),
+                                     (long) st.st_size,
+                                     ascii_strcasecmp ("digest", a->subtype) == 0);
   }
   else
     b = a;
@@ -1240,8 +1241,9 @@ static int multipart_handler (BODY *a, STATE *s)
     b = mutt_new_body ();
     b->length = (long) st.st_size;
     b->parts = mutt_parse_multipart (s->fpin,
-                 mutt_get_parameter ("boundary", a->parameter),
-                 (long) st.st_size, ascii_strcasecmp ("digest", a->subtype) == 0);
+                                     mutt_get_parameter ("boundary", a->parameter),
+                                     (long) st.st_size,
+                                     ascii_strcasecmp ("digest", a->subtype) == 0);
   }
   else
     b = a;
@@ -1465,7 +1467,7 @@ static int external_body_handler (BODY *b, STATE *s)
 
       state_mark_attach (s);
       state_printf (s, _("[-- This %s/%s attachment "),
-              TYPE(b->parts), b->parts->subtype);
+                    TYPE(b->parts), b->parts->subtype);
       length = mutt_get_parameter ("length", b->parameter);
       if (length)
       {
@@ -1608,10 +1610,10 @@ static int run_decode_and_handler (BODY *b, STATE *s, handler_t handler, int pla
   if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE ||
       b->encoding == ENCUUENCODED || plaintext ||
       mutt_is_text_part (b))                           /* text subtypes may
-                                                        * require character
-                                                        * set conversion even
-                                                        * with 8bit encoding.
-                                                        */
+                                                         * require character
+                                                         * set conversion even
+                                                         * with 8bit encoding.
+                                                         */
   {
     origType = b->type;
 
@@ -1627,14 +1629,14 @@ static int run_decode_and_handler (BODY *b, STATE *s, handler_t handler, int pla
         return -1;
       }
       /* decoding the attachment changes the size and offset, so save a copy
-        * of the "real" values now, and restore them after processing
-        */
+       * of the "real" values now, and restore them after processing
+       */
       tmplength = b->length;
       tmpoffset = b->offset;
 
       /* if we are decoding binary bodies, we don't want to prefix each
-        * line with the prefix or else the data will get corrupted.
-        */
+       * line with the prefix or else the data will get corrupted.
+       */
       savePrefix = s->prefix;
       s->prefix = NULL;
 
@@ -1836,16 +1838,16 @@ int mutt_body_handler (BODY *b, STATE *s)
      displaying from the attachment menu (i.e. pager) */
   if ((!option (OPTHONORDISP) || (b->disposition != DISPATTACH ||
                                  option(OPTVIEWATTACH))) &&
-       (plaintext || handler))
+      (plaintext || handler))
   {
     rc = run_decode_and_handler (b, s, handler, plaintext);
   }
   /* print hint to use attachment menu for disposition == attachment
      if we're not already being called from there */
   else if ((s->flags & MUTT_DISPLAY) || (b->disposition == DISPATTACH &&
-                                     !option (OPTVIEWATTACH) &&
-                                     option (OPTHONORDISP) &&
-                                     (plaintext || handler)))
+                                         !option (OPTVIEWATTACH) &&
+                                         option (OPTHONORDISP) &&
+                                         (plaintext || handler)))
   {
     state_mark_attach (s);
     if (option (OPTHONORDISP) && b->disposition == DISPATTACH)
@@ -1857,7 +1859,7 @@ int mutt_body_handler (BODY *b, STATE *s)
       char keystroke[SHORT_STRING];
 
       if (km_expand_key (keystroke, sizeof(keystroke),
-                       km_find_func (MENU_PAGER, OP_VIEW_ATTACHMENTS)))
+                         km_find_func (MENU_PAGER, OP_VIEW_ATTACHMENTS)))
        fprintf (s->fpout, _("(use '%s' to view this part)"), keystroke);
       else
        fputs (_("(need 'view-attachments' bound to key!)"), s->fpout);
diff --git a/hash.c b/hash.c
index e9d6cb15f4e906a54c3fb64030304b5ddb17e1ef..53d37d63f37fb466ffe4c28ad06924579407866a 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -238,7 +238,7 @@ struct hash_elem *hash_find_bucket (const HASH *table, const char *strkey)
 }
 
 static void union_hash_delete (HASH *table, union hash_key key, const void *data,
-                      void (*destroy) (void *))
+                               void (*destroy) (void *))
 {
   int hash;
   struct hash_elem *ptr, **last;
@@ -281,7 +281,7 @@ void hash_delete (HASH *table, const char *strkey, const void *data,
 }
 
 void int_hash_delete (HASH *table, unsigned int intkey, const void *data,
-                  void (*destroy) (void *))
+                      void (*destroy) (void *))
 {
   union hash_key key;
   key.intkey = intkey;
diff --git a/hash.h b/hash.h
index f143c57cdc18a5701930d348823204d0e74ba532..7d7d9ffbeb4e379cb1b3c31fc08c1be11f69e4b1 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -63,7 +63,7 @@ struct hash_elem *hash_find_bucket (const HASH *table, const char *key);
 void hash_delete (HASH * table, const char *key, const void *data,
                   void (*destroy) (void *));
 void int_hash_delete (HASH * table, unsigned int key, const void *data,
-                  void (*destroy) (void *));
+                      void (*destroy) (void *));
 
 void hash_destroy (HASH ** hash, void (*destroy) (void *));
 
index 160d5f3057ae87c7795040fcc202f1c697013a71..929d1818ece06b052c5f5810ba690598de22038f 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -602,7 +602,7 @@ mutt_hcache_per_folder(const char *path, const char *folder,
   int ret, plen;
 #ifndef HAVE_ICONV
   const char *chs = Charset && *Charset ? Charset :
-                   mutt_get_default_charset ();
+    mutt_get_default_charset ();
 #endif
 
   plen = mutt_strlen (path);
@@ -656,7 +656,7 @@ mutt_hcache_per_folder(const char *path, const char *folder,
                    md5sum[9], md5sum[10], md5sum[11], md5sum[12],
                    md5sum[13], md5sum[14], md5sum[15]
                   ,chs
-                  );
+      );
 #else
     ret = snprintf(hcpath, _POSIX_PATH_MAX,
                    "%s/%02x%02x%02x%02x%02x%02x%02x%02x"
@@ -666,7 +666,7 @@ mutt_hcache_per_folder(const char *path, const char *folder,
                    md5sum[4], md5sum[5], md5sum[6], md5sum[7], md5sum[8],
                    md5sum[9], md5sum[10], md5sum[11], md5sum[12],
                    md5sum[13], md5sum[14], md5sum[15]
-                  );
+      );
 #endif
   }
 
@@ -1060,7 +1060,7 @@ hcache_open_tc (struct header_cache* h, const char* path)
 {
   h->db = tcbdbnew();
   if (!h->db)
-      return -1;
+    return -1;
   if (option(OPTHCACHECOMPRESS))
     tcbdbtune(h->db, 0, 0, 0, -1, -1, BDBTDEFLATE);
   if (tcbdbopen(h->db, path, BDBOWRITER | BDBOCREAT))
@@ -1129,7 +1129,7 @@ hcache_open_kc (struct header_cache* h, const char* path)
             option(OPTHCACHECOMPRESS) ? "#opts=c" : "");
   h->db = kcdbnew();
   if (!h->db)
-      return -1;
+    return -1;
   if (kcdbopen(h->db, fullpath, KCOWRITER | KCOCREATE))
     return 0;
   else
@@ -1267,7 +1267,7 @@ hcache_open_db4 (struct header_cache* h, const char* path)
     goto fail_unlock;
 
   ret = (*h->env->open)(h->env, NULL, DB_INIT_MPOOL | DB_CREATE | DB_PRIVATE,
-       0600);
+                        0600);
   if (ret)
     goto fail_env;
 
@@ -1288,13 +1288,13 @@ hcache_open_db4 (struct header_cache* h, const char* path)
 
   return 0;
 
-  fail_db:
+fail_db:
   h->db->close (h->db, 0);
-  fail_env:
+fail_env:
   h->env->close (h->env, 0);
-  fail_unlock:
+fail_unlock:
   mx_unlock_file (h->lockfile, h->fd, 0);
-  fail_close:
+fail_close:
   close (h->fd);
   unlink (h->lockfile);
 
index 1b7d1994122328684fd927c0fc0da2bdcb6b07ea..09c4c547d8fe54ceae9c1789b10e5077a1976b8f 100644 (file)
--- a/hcache.h
+++ b/hcache.h
@@ -27,7 +27,7 @@ typedef struct header_cache header_cache_t;
 typedef int (*hcache_namer_t)(const char* path, char* dest, size_t dlen);
 
 header_cache_t *mutt_hcache_open(const char *path, const char *folder,
-  hcache_namer_t namer);
+                                 hcache_namer_t namer);
 void mutt_hcache_close(header_cache_t *h);
 HEADER *mutt_hcache_restore(const unsigned char *d, HEADER **oh);
 void *mutt_hcache_fetch(header_cache_t *h, const char *filename, size_t (*keylen)(const char *fn));
index 9b37f2fd9ef2899041f401734879c2f9023254a6..dbb3e8e7b44c662f4d00875e82168c9bc4c94439 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -339,97 +339,97 @@ hdr_format_str (char *dest,
     case '(':
     case '<':
 
-      /* preprocess $date_format to handle %Z */
-      {
-       const char *cp;
-       struct tm *tm;
-       time_t T;
-
-       p = dest;
-
-       cp = (op == 'd' || op == 'D') ? (NONULL (DateFmt)) : src;
-       if (*cp == '!')
-       {
-         do_locales = 0;
-         cp++;
-       }
-       else
-         do_locales = 1;
-
-       len = destlen - 1;
-       while (len > 0 && (((op == 'd' || op == 'D') && *cp) ||
-                          (op == '{' && *cp != '}') ||
-                          (op == '[' && *cp != ']') ||
-                          (op == '(' && *cp != ')') ||
-                          (op == '<' && *cp != '>')))
-       {
-         if (*cp == '%')
-         {
-           cp++;
-           if ((*cp == 'Z' || *cp == 'z') && (op == 'd' || op == '{'))
-           {
-             if (len >= 5)
-             {
-               sprintf (p, "%c%02u%02u", hdr->zoccident ? '-' : '+',
-                        hdr->zhours, hdr->zminutes);
-               p += 5;
-               len -= 5;
-             }
-             else
-               break; /* not enough space left */
-           }
-           else
-           {
-             if (len >= 2)
-             {
-               *p++ = '%';
-               *p++ = *cp;
-               len -= 2;
-             }
-             else
-               break; /* not enough space */
-           }
-           cp++;
-         }
-         else
-         {
-           *p++ = *cp++;
-           len--;
-         }
-       }
-       *p = 0;
+    /* preprocess $date_format to handle %Z */
+    {
+      const char *cp;
+      struct tm *tm;
+      time_t T;
 
-       if (op == '[' || op == 'D')
-         tm = localtime (&hdr->date_sent);
-       else if (op == '(')
-         tm = localtime (&hdr->received);
-       else if (op == '<')
-       {
-         T = time (NULL);
-         tm = localtime (&T);
-       }
-       else
-       {
-         /* restore sender's time zone */
-         T = hdr->date_sent;
-         if (hdr->zoccident)
-           T -= (hdr->zhours * 3600 + hdr->zminutes * 60);
-         else
-           T += (hdr->zhours * 3600 + hdr->zminutes * 60);
-         tm = gmtime (&T);
-       }
-
-        if (!do_locales)
-          setlocale (LC_TIME, "C");
-        strftime (buf2, sizeof (buf2), dest, tm);
-        if (!do_locales)
-          setlocale (LC_TIME, "");
+      p = dest;
 
-       mutt_format_s (dest, destlen, prefix, buf2);
-       if (len > 0 && op != 'd' && op != 'D') /* Skip ending op */
-         src = cp + 1;
+      cp = (op == 'd' || op == 'D') ? (NONULL (DateFmt)) : src;
+      if (*cp == '!')
+      {
+        do_locales = 0;
+        cp++;
       }
-      break;
+      else
+        do_locales = 1;
+
+      len = destlen - 1;
+      while (len > 0 && (((op == 'd' || op == 'D') && *cp) ||
+                         (op == '{' && *cp != '}') ||
+                         (op == '[' && *cp != ']') ||
+                         (op == '(' && *cp != ')') ||
+                         (op == '<' && *cp != '>')))
+      {
+        if (*cp == '%')
+        {
+          cp++;
+          if ((*cp == 'Z' || *cp == 'z') && (op == 'd' || op == '{'))
+          {
+            if (len >= 5)
+            {
+              sprintf (p, "%c%02u%02u", hdr->zoccident ? '-' : '+',
+                       hdr->zhours, hdr->zminutes);
+              p += 5;
+              len -= 5;
+            }
+            else
+              break; /* not enough space left */
+          }
+          else
+          {
+            if (len >= 2)
+            {
+              *p++ = '%';
+              *p++ = *cp;
+              len -= 2;
+            }
+            else
+              break; /* not enough space */
+          }
+          cp++;
+        }
+        else
+        {
+          *p++ = *cp++;
+          len--;
+        }
+      }
+      *p = 0;
+
+      if (op == '[' || op == 'D')
+        tm = localtime (&hdr->date_sent);
+      else if (op == '(')
+        tm = localtime (&hdr->received);
+      else if (op == '<')
+      {
+        T = time (NULL);
+        tm = localtime (&T);
+      }
+      else
+      {
+        /* restore sender's time zone */
+        T = hdr->date_sent;
+        if (hdr->zoccident)
+          T -= (hdr->zhours * 3600 + hdr->zminutes * 60);
+        else
+          T += (hdr->zhours * 3600 + hdr->zminutes * 60);
+        tm = gmtime (&T);
+      }
+
+      if (!do_locales)
+        setlocale (LC_TIME, "C");
+      strftime (buf2, sizeof (buf2), dest, tm);
+      if (!do_locales)
+        setlocale (LC_TIME, "");
+
+      mutt_format_s (dest, destlen, prefix, buf2);
+      if (len > 0 && op != 'd' && op != 'D') /* Skip ending op */
+        src = cp + 1;
+    }
+    break;
 
     case 'e':
       snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
@@ -465,12 +465,14 @@ hdr_format_str (char *dest,
     case 'H':
       /* (Hormel) spam score */
       if (optional)
+      {
        optional = hdr->env->spam ? 1 : 0;
+      }
 
-       if (hdr->env->spam)
-         mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->spam->data));
-       else
-         mutt_format_s (dest, destlen, prefix, "");
+      if (hdr->env->spam)
+        mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->spam->data));
+      else
+        mutt_format_s (dest, destlen, prefix, "");
 
       break;
 
@@ -582,29 +584,29 @@ hdr_format_str (char *dest,
       break;
 
     case 's':
+    {
+      char *subj;
+      if (hdr->env->disp_subj)
+        subj = hdr->env->disp_subj;
+      else if (SubjectRxList)
+        subj = apply_subject_mods(hdr->env);
+      else
+        subj = hdr->env->subject;
+      if (flags & MUTT_FORMAT_TREE && !hdr->collapsed)
       {
-       char *subj;
-        if (hdr->env->disp_subj)
-         subj = hdr->env->disp_subj;
-       else if (SubjectRxList)
-         subj = apply_subject_mods(hdr->env);
-       else
-         subj = hdr->env->subject;
-       if (flags & MUTT_FORMAT_TREE && !hdr->collapsed)
-       {
-         if (flags & MUTT_FORMAT_FORCESUBJ)
-         {
-           mutt_format_s (dest, destlen, "", NONULL (subj));
-           snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, dest);
-           mutt_format_s_tree (dest, destlen, prefix, buf2);
-         }
-         else
-           mutt_format_s_tree (dest, destlen, prefix, hdr->tree);
-       }
-       else
-         mutt_format_s (dest, destlen, prefix, NONULL (subj));
+        if (flags & MUTT_FORMAT_FORCESUBJ)
+        {
+          mutt_format_s (dest, destlen, "", NONULL (subj));
+          snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, dest);
+          mutt_format_s_tree (dest, destlen, prefix, buf2);
+        }
+        else
+          mutt_format_s_tree (dest, destlen, prefix, hdr->tree);
       }
-      break;
+      else
+        mutt_format_s (dest, destlen, prefix, NONULL (subj));
+    }
+    break;
 
     case 'S':
       if (hdr->deleted)
@@ -704,24 +706,24 @@ hdr_format_str (char *dest,
       break;
 
     case 'X':
-      {
-       int count = mutt_count_body_parts (ctx, hdr);
+    {
+      int count = mutt_count_body_parts (ctx, hdr);
 
-       /* The recursion allows messages without depth to return 0. */
-       if (optional)
-          optional = count != 0;
+      /* The recursion allows messages without depth to return 0. */
+      if (optional)
+        optional = count != 0;
 
-        snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
-        snprintf (dest, destlen, fmt, count);
-      }
-      break;
+      snprintf (fmt, sizeof (fmt), "%%%sd", prefix);
+      snprintf (dest, destlen, fmt, count);
+    }
+    break;
 
-     case 'y':
-       if (optional)
-        optional = hdr->env->x_label ? 1 : 0;
+    case 'y':
+      if (optional)
+        optional = hdr->env->x_label ? 1 : 0;
 
-       mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->x_label));
-       break;
+      mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->x_label));
+      break;
 
     case 'Y':
       if (hdr->env->x_label)
index 0a67fe505dbca4a375c7b784fc9bd66ee638100b..433d5d932cdc2e77fb8a025844f2cee9b09faf6f 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -309,7 +309,7 @@ int mutt_label_message(HEADER *hdr)
         if (label_message(Context, HDR_OF(i), new)) {
           ++changed;
           mutt_set_flag(Context, HDR_OF(i),
-            MUTT_TAG, 0);
+                        MUTT_TAG, 0);
           /* mutt_set_flag re-evals the header color */
         }
     }
diff --git a/help.c b/help.c
index 64c9bd8f3ec41018c0c57cddda318de4ca835242..7041c62ee3415554604c8a5f9ae128fffd6bbccb 100644 (file)
--- a/help.c
+++ b/help.c
@@ -307,7 +307,7 @@ static void dump_menu (FILE *f, int menu)
       {
        b = help_lookupFunction (map->op, menu);
        format_line (f, 0, buf, b ? b->name : "UNKNOWN",
-             b ? _(HelpStrings[b->op]) : _("ERROR: please report this bug"));
+                     b ? _(HelpStrings[b->op]) : _("ERROR: please report this bug"));
       }
     }
   }
diff --git a/hook.c b/hook.c
index 0d1c43b511f8fd8ddcf0425872bcdecc1f3a6f60..b674790a1be06fcae6566070a0da5f5c922ad0d8 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -124,7 +124,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
 #endif
   else if (DefaultHook && !(data & (MUTT_CHARSETHOOK | MUTT_ICONVHOOK | MUTT_ACCOUNTHOOK))
            && (!WithCrypto || !(data & MUTT_CRYPTHOOK))
-      )
+    )
   {
     char tmp[HUGE_STRING];
 
@@ -187,7 +187,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
   if (data & (MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_SAVEHOOK | MUTT_FCCHOOK | MUTT_MESSAGEHOOK | MUTT_REPLYHOOK))
   {
     if ((pat = mutt_pattern_comp (pattern.data,
-          (data & (MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_FCCHOOK)) ? 0 : MUTT_FULL_MSG,
+                                  (data & (MUTT_SENDHOOK | MUTT_SEND2HOOK | MUTT_FCCHOOK)) ? 0 : MUTT_FULL_MSG,
                                  err)) == NULL)
       goto error;
   }
@@ -198,13 +198,13 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
 #ifdef MUTT_CRYPTHOOK
     if ((rc = REGCOMP (rx, NONULL(pattern.data), ((data & (MUTT_CRYPTHOOK|MUTT_CHARSETHOOK|MUTT_ICONVHOOK)) ? REG_ICASE : 0))) != 0)
 #else
-    if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & (MUTT_CHARSETHOOK|MUTT_ICONVHOOK)) ? REG_ICASE : 0)) != 0)
+      if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & (MUTT_CHARSETHOOK|MUTT_ICONVHOOK)) ? REG_ICASE : 0)) != 0)
 #endif /* MUTT_CRYPTHOOK */
-    {
-      regerror (rc, rx, err->data, err->dsize);
-      FREE (&rx);
-      goto error;
-    }
+      {
+        regerror (rc, rx, err->data, err->dsize);
+        FREE (&rx);
+        goto error;
+      }
   }
 
   if (ptr)
@@ -358,7 +358,7 @@ int mutt_parse_idxfmt_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *
   if ((pat = mutt_pattern_comp (pattern->data,
                                 MUTT_FULL_MSG | MUTT_PATTERN_DYNAMIC,
                                 err)) == NULL)
-      goto out;
+    goto out;
 
   if (ptr)
   {
@@ -410,7 +410,7 @@ int mutt_parse_unhook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
       if (!type)
       {
        snprintf (err->data, err->dsize,
-                _("unhook: unknown hook type: %s"), buf->data);
+                  _("unhook: unknown hook type: %s"), buf->data);
        return (-1);
       }
       if (current_hook_type == type)
@@ -604,8 +604,8 @@ static char *_mutt_string_hook (const char *match, int hook)
 
   for (; tmp; tmp = tmp->next)
   {
-    if ((tmp->type & hook) && ((match &&
-        regexec (tmp->rx.rx, match, 0, NULL, 0) == 0) ^ tmp->rx.not))
+    if ((tmp->type & hook) &&
+        ((match && regexec (tmp->rx.rx, match, 0, NULL, 0) == 0) ^ tmp->rx.not))
       return (tmp->command);
   }
   return (NULL);
index 163146b362c3fc6b6a2bf220fdd94cef82bf9eb7..31268bc62b4a9d27ac30297b65889e09415e3d41 100644 (file)
@@ -69,7 +69,7 @@ imap_auth_res_t imap_auth_anon (IMAP_DATA* idata, const char* method)
   if (imap_code (idata->buf))
     return IMAP_AUTH_SUCCESS;
 
- bail:
+bail:
   mutt_error _("Anonymous authentication failed.");
   mutt_sleep (2);
   return IMAP_AUTH_FAILURE;
index 1996cdc351445b3f12dae57dcfe7f99ed2a3cffb..f27ef5dc9449993c6bacb7d176674b9263e12eeb 100644 (file)
@@ -32,7 +32,7 @@
 
 /* forward declarations */
 static void hmac_md5 (const char* password, char* challenge,
-  unsigned char* response);
+                      unsigned char* response);
 
 /* imap_auth_cram_md5: AUTH=CRAM-MD5 support. */
 imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method)
@@ -94,12 +94,12 @@ imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method)
   hmac_md5 (idata->conn->account.pass, obuf, hmac_response);
   /* dubious optimisation I saw elsewhere: make the whole string in one call */
   snprintf (obuf, sizeof (obuf),
-    "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
-    idata->conn->account.user,
-    hmac_response[0], hmac_response[1], hmac_response[2], hmac_response[3],
-    hmac_response[4], hmac_response[5], hmac_response[6], hmac_response[7],
-    hmac_response[8], hmac_response[9], hmac_response[10], hmac_response[11],
-    hmac_response[12], hmac_response[13], hmac_response[14], hmac_response[15]);
+            "%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
+            idata->conn->account.user,
+            hmac_response[0], hmac_response[1], hmac_response[2], hmac_response[3],
+            hmac_response[4], hmac_response[5], hmac_response[6], hmac_response[7],
+            hmac_response[8], hmac_response[9], hmac_response[10], hmac_response[11],
+            hmac_response[12], hmac_response[13], hmac_response[14], hmac_response[15]);
   dprint(2, (debugfile, "CRAM response: %s\n", obuf));
 
   /* XXX - ibuf must be long enough to store the base64 encoding of obuf,
@@ -124,7 +124,7 @@ imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method)
   if (imap_code (idata->buf))
     return IMAP_AUTH_SUCCESS;
 
- bail:
+bail:
   mutt_error _("CRAM-MD5 authentication failed.");
   mutt_sleep (2);
   return IMAP_AUTH_FAILURE;
@@ -132,7 +132,7 @@ imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method)
 
 /* hmac_md5: produce CRAM-MD5 challenge response. */
 static void hmac_md5 (const char* password, char* challenge,
-  unsigned char* response)
+                      unsigned char* response)
 {
   struct md5_ctx ctx;
   unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN];
index 8376e5a073a5ff015ad05d300254abee7390d8eb..772411a4ac1136f62ebf3ea25cadd03b95ac3149 100644 (file)
 #define GSS_AUTH_P_PRIVACY   4
 static void print_gss_error(OM_uint32 err_maj, OM_uint32 err_min)
 {
-       OM_uint32 maj_stat, min_stat;
-       OM_uint32 msg_ctx = 0;
-       gss_buffer_desc status_string;
-       char buf_maj[512];
-       char buf_min[512];
-        size_t status_len;
-
-       do
-       {
-               maj_stat = gss_display_status (&min_stat,
-                                              err_maj,
-                                              GSS_C_GSS_CODE,
-                                              GSS_C_NO_OID,
-                                              &msg_ctx,
-                                              &status_string);
-               if (GSS_ERROR(maj_stat))
-                       break;
-                status_len = status_string.length;
-                if (status_len >= sizeof(buf_maj))
-                        status_len = sizeof(buf_maj) - 1;
-               strncpy(buf_maj, (char*) status_string.value, status_len);
-                buf_maj[status_len] = '\0';
-               gss_release_buffer(&min_stat, &status_string);
-
-               maj_stat = gss_display_status (&min_stat,
-                                              err_min,
-                                              GSS_C_MECH_CODE,
-                                              GSS_C_NULL_OID,
-                                              &msg_ctx,
-                                              &status_string);
-               if (!GSS_ERROR(maj_stat))
-               {
-                        status_len = status_string.length;
-                        if (status_len >= sizeof(buf_min))
-                                status_len = sizeof(buf_min) - 1;
-                       strncpy(buf_min, (char*) status_string.value, status_len);
-                        buf_min[status_len] = '\0';
-                       gss_release_buffer(&min_stat, &status_string);
-               }
-       } while (!GSS_ERROR(maj_stat) && msg_ctx != 0);
-
-       dprint (2, (debugfile, "((%s:%d )(%s:%d))", buf_maj, err_maj, buf_min, err_min));
+  OM_uint32 maj_stat, min_stat;
+  OM_uint32 msg_ctx = 0;
+  gss_buffer_desc status_string;
+  char buf_maj[512];
+  char buf_min[512];
+  size_t status_len;
+
+  do
+  {
+    maj_stat = gss_display_status (&min_stat,
+                                   err_maj,
+                                   GSS_C_GSS_CODE,
+                                   GSS_C_NO_OID,
+                                   &msg_ctx,
+                                   &status_string);
+    if (GSS_ERROR(maj_stat))
+      break;
+    status_len = status_string.length;
+    if (status_len >= sizeof(buf_maj))
+      status_len = sizeof(buf_maj) - 1;
+    strncpy(buf_maj, (char*) status_string.value, status_len);
+    buf_maj[status_len] = '\0';
+    gss_release_buffer(&min_stat, &status_string);
+
+    maj_stat = gss_display_status (&min_stat,
+                                   err_min,
+                                   GSS_C_MECH_CODE,
+                                   GSS_C_NULL_OID,
+                                   &msg_ctx,
+                                   &status_string);
+    if (!GSS_ERROR(maj_stat))
+    {
+      status_len = status_string.length;
+      if (status_len >= sizeof(buf_min))
+        status_len = sizeof(buf_min) - 1;
+      strncpy(buf_min, (char*) status_string.value, status_len);
+      buf_min[status_len] = '\0';
+      gss_release_buffer(&min_stat, &status_string);
+    }
+  } while (!GSS_ERROR(maj_stat) && msg_ctx != 0);
+
+  dprint (2, (debugfile, "((%s:%d )(%s:%d))", buf_maj, err_maj, buf_min, err_min));
 }
 
 /* imap_auth_gss: AUTH=GSSAPI support. */
@@ -124,7 +124,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   request_buf.value = buf1;
   request_buf.length = strlen (buf1);
   maj_stat = gss_import_name (&min_stat, &request_buf, gss_nt_service_name,
-    &target_name);
+                              &target_name);
   if (maj_stat != GSS_S_COMPLETE)
   {
     dprint (2, (debugfile, "Couldn't get service name for [%s]\n", buf1));
@@ -134,9 +134,9 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   else if (debuglevel >= 2)
   {
     maj_stat = gss_display_name (&min_stat, target_name, &request_buf,
-      &mech_name);
+                                 &mech_name);
     dprint (2, (debugfile, "Using service name [%s]\n",
-      (char*) request_buf.value));
+                (char*) request_buf.value));
     maj_stat = gss_release_buffer (&min_stat, &request_buf);
   }
 #endif
@@ -146,9 +146,9 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
 
   /* build token */
   maj_stat = gss_init_sec_context (&min_stat, GSS_C_NO_CREDENTIAL, &context,
-    target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
-    GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
-    (unsigned int*) &cflags, NULL);
+                                   target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
+                                   GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
+                                   (unsigned int*) &cflags, NULL);
   if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
   {
     print_gss_error(maj_stat, min_stat);
@@ -178,7 +178,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   /* now start the security context initialisation loop... */
   dprint (2, (debugfile, "Sending credentials\n"));
   mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length,
-    sizeof (buf1) - 2);
+                  sizeof (buf1) - 2);
   gss_release_buffer (&min_stat, &send_token);
   safe_strcat (buf1, sizeof (buf1), "\r\n");
   mutt_socket_write (idata->conn, buf1);
@@ -203,9 +203,9 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
 
     /* Write client data */
     maj_stat = gss_init_sec_context (&min_stat, GSS_C_NO_CREDENTIAL, &context,
-      target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
-      GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
-      (unsigned int*) &cflags, NULL);
+                                     target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
+                                     GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
+                                     (unsigned int*) &cflags, NULL);
     if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
     {
       print_gss_error(maj_stat, min_stat);
@@ -215,7 +215,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
       goto err_abort_cmd;
     }
     mutt_to_base64 ((unsigned char*) buf1, send_token.value,
-      send_token.length, sizeof (buf1) - 2);
+                    send_token.length, sizeof (buf1) - 2);
     gss_release_buffer (&min_stat, &send_token);
     safe_strcat (buf1, sizeof (buf1), "\r\n");
     mutt_socket_write (idata->conn, buf1);
@@ -237,7 +237,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   request_buf.value = buf2;
 
   maj_stat = gss_unwrap (&min_stat, context, &request_buf, &send_token,
-    &cflags, &quality);
+                         &cflags, &quality);
   if (maj_stat != GSS_S_COMPLETE)
   {
     print_gss_error(maj_stat, min_stat);
@@ -263,9 +263,9 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   buf_size = ntohl (*((long *) send_token.value));
   gss_release_buffer (&min_stat, &send_token);
   dprint (2, (debugfile, "Unwrapped security level flags: %c%c%c\n",
-    server_conf_flags & GSS_AUTH_P_NONE      ? 'N' : '-',
-    server_conf_flags & GSS_AUTH_P_INTEGRITY ? 'I' : '-',
-    server_conf_flags & GSS_AUTH_P_PRIVACY   ? 'P' : '-'));
+              server_conf_flags & GSS_AUTH_P_NONE      ? 'N' : '-',
+              server_conf_flags & GSS_AUTH_P_INTEGRITY ? 'I' : '-',
+              server_conf_flags & GSS_AUTH_P_PRIVACY   ? 'P' : '-'));
   dprint (2, (debugfile, "Maximum GSS token size is %ld\n", buf_size));
 
   /* agree to terms (hack!) */
@@ -277,7 +277,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   request_buf.value = buf1;
   request_buf.length = 4 + strlen (idata->conn->account.user);
   maj_stat = gss_wrap (&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf,
-    &cflags, &send_token);
+                       &cflags, &send_token);
   if (maj_stat != GSS_S_COMPLETE)
   {
     dprint (2, (debugfile, "Error creating login request\n"));
@@ -287,7 +287,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length,
                  sizeof (buf1) - 2);
   dprint (2, (debugfile, "Requesting authorisation as %s\n",
-    idata->conn->account.user));
+              idata->conn->account.user));
   safe_strcat (buf1, sizeof (buf1), "\r\n");
   mutt_socket_write (idata->conn, buf1);
 
@@ -319,13 +319,13 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
   else
     goto bail;
 
- err_abort_cmd:
+err_abort_cmd:
   mutt_socket_write (idata->conn, "*\r\n");
   do
     rc = imap_cmd_step (idata);
   while (rc == IMAP_CMD_CONTINUE);
 
- bail:
+bail:
   mutt_error _("GSSAPI authentication failed.");
   mutt_sleep (2);
   return IMAP_AUTH_FAILURE;
index b56a59172d33e1fbe914e3d4ca67b00dde617996..9c98405b2cced085d9df15381492213801b28801 100644 (file)
@@ -55,7 +55,7 @@ imap_auth_res_t imap_auth_login (IMAP_DATA* idata, const char* method)
 
   if (debuglevel < IMAP_LOG_PASS)
     dprint (2, (debugfile, "Sending LOGIN command for %s...\n",
-      idata->conn->account.user));
+                idata->conn->account.user));
 #endif
 
   snprintf (buf, sizeof (buf), "LOGIN %s %s", q_user, q_pass);
index ef6d2e92d3189a5adde9bc0d7f46c43b8298f4f5..ae976c1c85e2adbc001bd631b5a6cb1ce420de13 100644 (file)
@@ -46,7 +46,7 @@ imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
   if (mutt_sasl_client_new (idata->conn, &saslconn) < 0)
   {
     dprint (1, (debugfile,
-      "imap_auth_sasl: Error allocating SASL connection.\n"));
+                "imap_auth_sasl: Error allocating SASL connection.\n"));
     return IMAP_AUTH_FAILURE;
   }
 
@@ -73,7 +73,7 @@ imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
       rc = sasl_client_start (saslconn, "AUTH=ANONYMOUS", NULL, &pc, &olen,
                               &mech);
   } else if (!ascii_strcasecmp ("login", method) &&
-       !strstr (NONULL (idata->capstr), "AUTH=LOGIN")) {
+             !strstr (NONULL (idata->capstr), "AUTH=LOGIN")) {
     /* do not use SASL login for regular IMAP login (#3556) */
     sasl_dispose (&saslconn);
     return IMAP_AUTH_UNAVAIL;
@@ -83,7 +83,7 @@ imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
     do
     {
       rc = sasl_client_start (saslconn, method, &interaction,
-        &pc, &olen, &mech);
+                              &pc, &olen, &mech);
       if (rc == SASL_INTERACT)
        mutt_sasl_interact (interaction);
     }
@@ -220,7 +220,7 @@ imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
     return IMAP_AUTH_SUCCESS;
   }
 
- bail:
+bail:
   sasl_dispose (&saslconn);
   FREE (&buf);
 
index ab62f5767717b203e6bf281379e4165b16278312..7e132aaf9cdd4b778adf063c22a560a6eebcf442 100644 (file)
@@ -32,9 +32,9 @@
 
 /* -- forward declarations -- */
 static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
-  struct browser_state* state, short isparent);
+                                   struct browser_state* state, short isparent);
 static void imap_add_folder (char delim, char *folder, int noselect,
-  int noinferiors, struct browser_state *state, short isparent);
+                             int noinferiors, struct browser_state *state, short isparent);
 static int compare_names(struct folder_file *a, struct folder_file *b);
 
 /* imap_browse: IMAP hook into the folder browser, fills out browser_state,
@@ -202,7 +202,7 @@ int imap_browse (char* path, struct browser_state* state)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   if (save_lsub)
     set_option (OPTIMAPCHECKSUBSCRIBED);
   FREE (&mx.mbox);
@@ -220,7 +220,7 @@ int imap_mailbox_create (const char* folder)
   if (imap_parse_path (folder, &mx) < 0)
   {
     dprint (1, (debugfile, "imap_mailbox_create: Bad starting path %s\n",
-      folder));
+                folder));
     return -1;
   }
 
@@ -259,7 +259,7 @@ int imap_mailbox_create (const char* folder)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   FREE (&mx.mbox);
   return -1;
 }
@@ -274,7 +274,7 @@ int imap_mailbox_rename(const char* mailbox)
   if (imap_parse_path (mailbox, &mx) < 0)
   {
     dprint (1, (debugfile, "imap_mailbox_rename: Bad source mailbox %s\n",
-      mailbox));
+                mailbox));
     return -1;
   }
 
@@ -293,7 +293,7 @@ int imap_mailbox_rename(const char* mailbox)
   snprintf(buf, sizeof (buf), _("Rename mailbox %s to: "), mx.mbox);
   strfcpy (newname, mx.mbox, sizeof (newname));
 
- if (mutt_get_field (buf, newname, sizeof (newname), MUTT_FILE) < 0)
 if (mutt_get_field (buf, newname, sizeof (newname), MUTT_FILE) < 0)
     goto fail;
 
   if (!mutt_strlen (newname))
@@ -317,13 +317,13 @@ int imap_mailbox_rename(const char* mailbox)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   FREE (&mx.mbox);
   return -1;
 }
 
 static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
-  struct browser_state* state, short isparent)
+                                   struct browser_state* state, short isparent)
 {
   IMAP_LIST list;
   IMAP_MBOX mx;
@@ -332,7 +332,7 @@ static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
   if (imap_parse_path (state->folder, &mx))
   {
     dprint (2, (debugfile,
-      "browse_add_list_result: current folder %s makes no sense\n", state->folder));
+                "browse_add_list_result: current folder %s makes no sense\n", state->folder));
     return -1;
   }
 
@@ -369,7 +369,7 @@ static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
  * imap_unmunge_mbox_name().
  */
 static void imap_add_folder (char delim, char *folder, int noselect,
-  int noinferiors, struct browser_state *state, short isparent)
+                             int noinferiors, struct browser_state *state, short isparent)
 {
   char tmp[LONG_STRING];
   char relpath[LONG_STRING];
@@ -382,9 +382,9 @@ static void imap_add_folder (char delim, char *folder, int noselect,
   if (state->entrylen + 1 == state->entrymax)
   {
     safe_realloc (&state->entry,
-      sizeof (struct folder_file) * (state->entrymax += 256));
+                  sizeof (struct folder_file) * (state->entrymax += 256));
     memset (state->entry + state->entrylen, 0,
-      (sizeof (struct folder_file) * (state->entrymax - state->entrylen)));
+            (sizeof (struct folder_file) * (state->entrymax - state->entrylen)));
   }
 
   /* render superiors as unix-standard ".." */
index 8c985927c8b7816ae13a8b9a4cc836fea014a3aa..2302d8ac29565d3ed6b61db2fa7a029329f5e164 100644 (file)
@@ -485,7 +485,7 @@ static void cmd_handle_fatal (IMAP_DATA* idata)
     mx_fastclose_mailbox (idata->ctx);
     mutt_socket_close (idata->conn);
     mutt_error (_("Mailbox %s@%s closed"),
-       idata->conn->account.login, idata->conn->account.host);
+                idata->conn->account.login, idata->conn->account.host);
     mutt_sleep (1);
     idata->state = IMAP_DISCONNECTED;
   }
@@ -531,14 +531,14 @@ static int cmd_handle_untagged (IMAP_DATA* idata)
        * even when there is no new mail */
       else if (count == idata->max_msn)
        dprint (3, (debugfile,
-          "cmd_handle_untagged: superfluous EXISTS message.\n"));
+                    "cmd_handle_untagged: superfluous EXISTS message.\n"));
       else
       {
        if (!(idata->reopen & IMAP_EXPUNGE_PENDING))
         {
           dprint (2, (debugfile,
-            "cmd_handle_untagged: New mail in %s - %d messages total.\n",
-            idata->mailbox, count));
+                      "cmd_handle_untagged: New mail in %s - %d messages total.\n",
+                      idata->mailbox, count));
          idata->reopen |= IMAP_NEWMAIL_PENDING;
         }
        idata->newMailCount = count;
index 95be76148fecb62311b4d3dc492d3c1af2272e2c..9fdea5c03a3c495db4859a90e4ad1c9a5a847554 100644 (file)
@@ -68,7 +68,7 @@ int imap_access (const char* path)
     return -1;
 
   if (!(idata = imap_conn_find (&mx.account,
-    option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+                                option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
   {
     FREE (&mx.mbox);
     return -1;
@@ -157,7 +157,7 @@ int imap_delete_mailbox (CONTEXT* ctx, IMAP_MBOX mx)
 
   if (!ctx || !ctx->data) {
     if (!(idata = imap_conn_find (&mx.account,
-          option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
+                                  option (OPTIMAPPASSIVE) ? MUTT_IMAP_CONN_NONEW : 0)))
     {
       FREE (&mx.mbox);
       return -1;
@@ -336,8 +336,8 @@ static int imap_check_capabilities (IMAP_DATA* idata)
     return -1;
   }
 
-  if (!(mutt_bit_isset(idata->capabilities,IMAP4)
-      ||mutt_bit_isset(idata->capabilities,IMAP4REV1)))
+  if (!(mutt_bit_isset(idata->capabilities,IMAP4) ||
+        mutt_bit_isset(idata->capabilities,IMAP4REV1)))
   {
     mutt_error _("This IMAP server is ancient. Mutt does not work with it.");
     mutt_sleep (2);    /* pause a moment to let the user see the error */
@@ -482,7 +482,7 @@ int imap_open_connection (IMAP_DATA* idata)
       if (option(OPTSSLFORCETLS))
         rc = MUTT_YES;
       else if ((rc = query_quadoption (OPT_SSLSTARTTLS,
-        _("Secure connection with TLS?"))) == -1)
+                                       _("Secure connection with TLS?"))) == -1)
        goto err_close_conn;
       if (rc == MUTT_YES) {
        if ((rc = imap_exec (idata, "STARTTLS", IMAP_CMD_FAIL_OK)) == -1)
@@ -529,10 +529,10 @@ int imap_open_connection (IMAP_DATA* idata)
   return 0;
 
 #if defined(USE_SSL)
- err_close_conn:
+err_close_conn:
   imap_close_connection (idata);
 #endif
- bail:
+bail:
   FREE (&idata->capstr);
   return -1;
 }
@@ -560,7 +560,7 @@ static char* imap_get_flags (LIST** hflags, char* s)
   if (ascii_strncasecmp ("FLAGS", s, 5) != 0)
   {
     dprint (1, (debugfile, "imap_get_flags: not a FLAGS response: %s\n",
-      s));
+                s));
     return NULL;
   }
   s += 5;
@@ -568,7 +568,7 @@ static char* imap_get_flags (LIST** hflags, char* s)
   if (*s != '(')
   {
     dprint (1, (debugfile, "imap_get_flags: bogus FLAGS response: %s\n",
-      s));
+                s));
     return NULL;
   }
 
@@ -594,7 +594,7 @@ static char* imap_get_flags (LIST** hflags, char* s)
   if (*s != ')')
   {
     dprint (1, (debugfile,
-      "imap_get_flags: Unterminated FLAGS response: %s\n", s));
+                "imap_get_flags: Unterminated FLAGS response: %s\n", s));
     mutt_free_list (hflags);
 
     return NULL;
@@ -787,8 +787,8 @@ static int imap_open_mailbox (CONTEXT* ctx)
     goto fail;
 
   /* check for READ-ONLY notification */
-  if (!ascii_strncasecmp (imap_get_qualifier (idata->buf), "[READ-ONLY]", 11)  \
-  && !mutt_bit_isset (idata->capabilities, ACL))
+  if (!ascii_strncasecmp (imap_get_qualifier (idata->buf), "[READ-ONLY]", 11) &&
+      !mutt_bit_isset (idata->capabilities, ACL))
   {
     dprint (2, (debugfile, "Mailbox is read-only.\n"));
     ctx->readonly = 1;
@@ -821,7 +821,7 @@ static int imap_open_mailbox (CONTEXT* ctx)
         mutt_bit_isset(idata->ctx->rights, MUTT_ACL_SEEN) ||
         mutt_bit_isset(idata->ctx->rights, MUTT_ACL_WRITE) ||
         mutt_bit_isset(idata->ctx->rights, MUTT_ACL_INSERT)))
-     ctx->readonly = 1;
+    ctx->readonly = 1;
 
   ctx->hdrmax = count;
   ctx->hdrs = safe_calloc (count, sizeof (HEADER *));
@@ -839,10 +839,10 @@ static int imap_open_mailbox (CONTEXT* ctx)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   if (idata->state == IMAP_SELECTED)
     idata->state = IMAP_AUTHENTICATED;
- fail_noidata:
+fail_noidata:
   FREE (&mx.mbox);
   return -1;
 }
@@ -925,7 +925,7 @@ static int imap_open_new_message (MESSAGE *msg, CONTEXT *dest, HEADER *hdr)
 /* imap_set_flag: append str to flags if we currently have permission
  *   according to aclbit */
 static void imap_set_flag (IMAP_DATA* idata, int aclbit, int flag,
-  const char *str, char *flags, size_t flsize)
+                           const char *str, char *flags, size_t flsize)
 {
   if (mutt_bit_isset (idata->ctx->rights, aclbit))
     if (flag && imap_has_flag (idata->flags, str))
@@ -1064,8 +1064,8 @@ int imap_exec_msgset (IMAP_DATA* idata, const char* pre, const char* post,
   cmd = mutt_buffer_new ();
 
   /* We make a copy of the headers just in case resorting doesn't give
-   exactly the original order (duplicate messages?), because other parts of
-   the ctx are tied to the header order. This may be overkill. */
+     exactly the original order (duplicate messages?), because other parts of
+     the ctx are tied to the header order. This may be overkill. */
   oldsort = Sort;
   if (Sort != SORT_ORDER)
   {
@@ -1136,7 +1136,7 @@ static int compare_flags_for_copy (HEADER* h)
  *       desirable to propagate that flag into the copy.
  */
 int imap_sync_message_for_copy (IMAP_DATA *idata, HEADER *hdr, BUFFER *cmd,
-                      int *err_continue)
+                                int *err_continue)
 {
   char flags[LONG_STRING];
   char uid[11];
@@ -1164,7 +1164,7 @@ int imap_sync_message_for_copy (IMAP_DATA *idata, HEADER *hdr, BUFFER *cmd,
   imap_set_flag (idata, MUTT_ACL_WRITE, hdr->replied,
                 "\\Answered ", flags, sizeof (flags));
   imap_set_flag (idata, MUTT_ACL_DELETE, HEADER_DATA(hdr)->deleted,
-                "\\Deleted ", flags, sizeof (flags));
+                 "\\Deleted ", flags, sizeof (flags));
 
   /* now make sure we don't lose custom tags */
   if (mutt_bit_isset (idata->ctx->rights, MUTT_ACL_WRITE))
@@ -1464,7 +1464,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
 
   rc = 0;
 
- out:
+out:
   if (appendctx)
   {
     mx_fastclose_mailbox (appendctx);
@@ -1714,10 +1714,10 @@ int imap_buffy_check (int force, int check_stats)
     imap_munge_mbox_name (idata, munged, sizeof (munged), name);
     if (check_stats)
       snprintf (command, sizeof (command),
-             "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged);
+                "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged);
     else
       snprintf (command, sizeof (command),
-             "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged);
+                "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged);
 
     if (imap_exec (idata, command, IMAP_CMD_QUEUE | IMAP_CMD_POLL) < 0)
     {
@@ -2072,7 +2072,7 @@ int imap_subscribe (char *path, int subscribe)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   FREE (&mx.mbox);
   return -1;
 }
@@ -2182,7 +2182,7 @@ int imap_complete(char* dest, size_t dlen, char* path) {
 
   /* fire off command */
   snprintf (buf, sizeof(buf), "%s \"\" \"%s%%\"",
-    option (OPTIMAPLSUB) ? "LSUB" : "LIST", list);
+            option (OPTIMAPLSUB) ? "LSUB" : "LIST", list);
 
   imap_cmd_start (idata, buf);
 
@@ -2264,7 +2264,7 @@ int imap_fast_trash (CONTEXT* ctx, char* dest)
   if (!mutt_account_match (&(CTX_DATA->conn->account), &(mx.account)))
   {
     dprint (3, (debugfile, "imap_fast_trash: %s not same server as %s\n",
-      dest, ctx->path));
+                dest, ctx->path));
     return 1;
   }
 
@@ -2340,7 +2340,7 @@ int imap_fast_trash (CONTEXT* ctx, char* dest)
 
   rc = 0;
 
- out:
+out:
   mutt_buffer_free (&sync_cmd);
   FREE (&mx.mbox);
 
index 654fd77ee13f548c3325704e609ac4c528dfe8fe..075236722eb3116aae3c25f5cfec8b3024a0752e 100644 (file)
@@ -267,7 +267,7 @@ int imap_read_literal (FILE* fp, IMAP_DATA* idata, unsigned int bytes, progress_
 void imap_expunge_mailbox (IMAP_DATA* idata);
 void imap_logout (IMAP_DATA** idata);
 int imap_sync_message_for_copy (IMAP_DATA *idata, HEADER *hdr, BUFFER *cmd,
-  int *err_continue);
+                                int *err_continue);
 int imap_has_flag (LIST* flag_list, const char* flag);
 
 /* auth.c */
@@ -312,7 +312,7 @@ void imap_error (const char* where, const char* msg);
 IMAP_DATA* imap_new_idata (void);
 void imap_free_idata (IMAP_DATA** idata);
 char* imap_fix_path (IMAP_DATA* idata, const char* mailbox, char* path,
-  size_t plen);
+                     size_t plen);
 void imap_cachepath(IMAP_DATA* idata, const char* mailbox, char* dest,
                     size_t dlen);
 int imap_get_literal_count (const char* buf, unsigned int* bytes);
index faf2c1467e9ae68423df177f31887d97962d0433..bc992915334475243a0fe7908d969a0c91370e06 100644 (file)
@@ -68,7 +68,7 @@ static int msg_cache_commit (IMAP_DATA* idata, HEADER* h);
 
 static void flush_buffer(char* buf, size_t* len, CONNECTION* conn);
 static int msg_fetch_header (CONTEXT* ctx, IMAP_HEADER* h, char* buf,
-  FILE* fp);
+                             FILE* fp);
 static int msg_parse_fetch (IMAP_HEADER* h, char* s);
 static char* msg_parse_flags (IMAP_HEADER* h, char* s);
 
@@ -695,12 +695,12 @@ static int read_headers_fetch_new (IMAP_DATA *idata, unsigned int msn_begin,
   if (mutt_bit_isset (idata->capabilities,IMAP4REV1))
   {
     safe_asprintf (&hdrreq, "BODY.PEEK[HEADER.FIELDS (%s%s%s)]",
-                           want_headers, ImapHeaders ? " " : "", NONULL (ImapHeaders));
+                   want_headers, ImapHeaders ? " " : "", NONULL (ImapHeaders));
   }
   else if (mutt_bit_isset (idata->capabilities,IMAP4))
   {
     safe_asprintf (&hdrreq, "RFC822.HEADER.LINES (%s%s%s)",
-                           want_headers, ImapHeaders ? " " : "", NONULL (ImapHeaders));
+                   want_headers, ImapHeaders ? " " : "", NONULL (ImapHeaders));
   }
   else
   {    /* Unable to fetch headers for lower versions */
@@ -1027,7 +1027,7 @@ int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno)
 
   msg_cache_commit (idata, h);
 
-  parsemsg:
+parsemsg:
   /* Update the header information.  Previously, we only downloaded a
    * portion of the headers, those required for the main display.
    */
@@ -1228,7 +1228,7 @@ int imap_append_message (CONTEXT *ctx, MESSAGE *msg)
   FREE (&mx.mbox);
   return 0;
 
- fail:
+fail:
   FREE (&mx.mbox);
   return -1;
 }
@@ -1264,7 +1264,7 @@ int imap_copy_messages (CONTEXT* ctx, HEADER* h, char* dest, int delete)
   if (!mutt_account_match (&(CTX_DATA->conn->account), &(mx.account)))
   {
     dprint (3, (debugfile, "imap_copy_messages: %s not same server as %s\n",
-      dest, ctx->path));
+                dest, ctx->path));
     return 1;
   }
 
@@ -1404,7 +1404,7 @@ int imap_copy_messages (CONTEXT* ctx, HEADER* h, char* dest, int delete)
 
   rc = 0;
 
- out:
+out:
   if (cmd.data)
     FREE (&cmd.data);
   if (sync_cmd.data)
@@ -1755,7 +1755,7 @@ static int msg_parse_fetch (IMAP_HEADER *h, char *s)
         return -1;
     }
     else if (!ascii_strncasecmp ("BODY", s, 4) ||
-      !ascii_strncasecmp ("RFC822.HEADER", s, 13))
+             !ascii_strncasecmp ("RFC822.HEADER", s, 13))
     {
       /* handle above, in msg_fetch_header */
       return -2;
@@ -1804,7 +1804,7 @@ static char* msg_parse_flags (IMAP_HEADER* h, char* s)
   if (ascii_strncasecmp ("FLAGS", s, 5) != 0)
   {
     dprint (1, (debugfile, "msg_parse_flags: not a FLAGS response: %s\n",
-      s));
+                s));
     return NULL;
   }
   s += 5;
@@ -1812,7 +1812,7 @@ static char* msg_parse_flags (IMAP_HEADER* h, char* s)
   if (*s != '(')
   {
     dprint (1, (debugfile, "msg_parse_flags: bogus FLAGS response: %s\n",
-      s));
+                s));
     return NULL;
   }
   s++;
@@ -1875,7 +1875,7 @@ static char* msg_parse_flags (IMAP_HEADER* h, char* s)
   else
   {
     dprint (1, (debugfile,
-      "msg_parse_flags: Unterminated FLAGS response: %s\n", s));
+                "msg_parse_flags: Unterminated FLAGS response: %s\n", s));
     return NULL;
   }
 
index 495823654836a9f45bac1219617bbe039cae0a2d..c8d44e882a7903a498323e4bcdbda8b03c5db03f 100644 (file)
 #include "imap_private.h"
 
 static const int Index_64[128] = {
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, 63,-1,-1,-1,
-    52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
-    -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
-    15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
-    -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
-    41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+  -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, 63,-1,-1,-1,
+  52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
+  -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
+  15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
+  -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+  41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
 };
 
 static const char B64Chars[64] = {
@@ -54,7 +54,7 @@ static const char B64Chars[64] = {
  * of &AMAAwA-).
  */
 static char *utf7_to_utf8 (const char *u7, size_t u7len, char **u8,
-  size_t *u8len)
+                           size_t *u8len)
 {
   char *buf, *p;
   int b, ch, k;
@@ -134,7 +134,7 @@ static char *utf7_to_utf8 (const char *u7, size_t u7len, char **u8,
     *u8 = buf;
   return buf;
 
- bail:
+bail:
   FREE (&buf);
   return 0;
 }
@@ -147,7 +147,7 @@ static char *utf7_to_utf8 (const char *u7, size_t u7len, char **u8,
  * If input data is invalid, return 0 and don't store anything.
  */
 static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7,
-  size_t *u7len)
+                           size_t *u7len)
 {
   char *buf, *p;
   int ch;
@@ -247,7 +247,7 @@ static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7,
   if (u7)  *u7 = buf;
   return buf;
 
- bail:
+bail:
   FREE (&buf);
   return 0;
 }
index b4397541290e9a15fc864fed69a59b58bb5b4c5b..6fdb0de3c0865ba66af9d06d5892b30d158e52ee 100644 (file)
@@ -243,8 +243,8 @@ int imap_hcache_store_uid_seqset (IMAP_DATA *idata)
     b->data[0] = '\0';
 
   rc = mutt_hcache_store_raw (idata->hcache, "/UIDSEQSET",
-                               b->data, seqset_size + 1,
-                               imap_hcache_keylen);
+                              b->data, seqset_size + 1,
+                              imap_hcache_keylen);
   dprint (5, (debugfile, "Stored /UIDSEQSET %s\n", b->data));
   mutt_buffer_free (&b);
   return rc;
@@ -516,7 +516,7 @@ void imap_free_idata (IMAP_DATA** idata)
  * Moreover, IMAP servers may dislike the path ending with the delimiter.
  */
 char *imap_fix_path (IMAP_DATA *idata, const char *mailbox, char *path,
-    size_t plen)
+                     size_t plen)
 {
   int i = 0;
   char delim = '\0';
@@ -695,9 +695,9 @@ void imap_make_date (char *buf, time_t timestamp)
   tz /= 60;
 
   snprintf (buf, IMAP_DATELEN, "%02d-%s-%d %02d:%02d:%02d %+03d%02d",
-      tm->tm_mday, Months[tm->tm_mon], tm->tm_year + 1900,
-      tm->tm_hour, tm->tm_min, tm->tm_sec,
-      (int) tz / 60, (int) abs ((int) tz) % 60);
+            tm->tm_mday, Months[tm->tm_mon], tm->tm_year + 1900,
+            tm->tm_hour, tm->tm_min, tm->tm_sec,
+            (int) tz / 60, (int) abs ((int) tz) % 60);
 }
 
 /* imap_qualify_path: make an absolute IMAP folder target, given IMAP_MBOX
diff --git a/init.c b/init.c
index 880a913976493dc0d6c4054f1245e095498d858e..671e444a0dbeb50ca7985a9a122916346ec50340 100644 (file)
--- a/init.c
+++ b/init.c
 #include <sys/wait.h>
 #include <sys/time.h>
 
-#define CHECK_PAGER \
+#define CHECK_PAGER                                     \
   if ((CurrentMenu == MENU_PAGER) && (idx >= 0) &&     \
-           (MuttVars[idx].flags & R_RESORT)) \
-       { \
-         snprintf (err->data, err->dsize, "%s", \
-           _("Not available in this menu.")); \
-         return (-1); \
-       }
+      (MuttVars[idx].flags & R_RESORT))                 \
+  {                                                     \
+    snprintf (err->data, err->dsize, "%s",              \
+              _("Not available in this menu."));        \
+    return (-1);                                        \
+  }
 
 typedef struct myvar
 {
@@ -164,14 +164,14 @@ int mutt_extract_token (BUFFER *dest, BUFFER *tok, int flags)
       qc = ch;
     else if (ch == '\\' && qc != '\'')
     {
-       if (!*tok->dptr)
-           return -1; /* premature end of token */
+      if (!*tok->dptr)
+        return -1; /* premature end of token */
       switch (ch = *tok->dptr++)
       {
        case 'c':
        case 'C':
-           if (!*tok->dptr)
-               return -1; /* premature end of token */
+          if (!*tok->dptr)
+            return -1; /* premature end of token */
          mutt_buffer_addch (dest, (toupper ((unsigned char) *tok->dptr)
                                     - '@') & 0x7f);
          tok->dptr++;
@@ -206,8 +206,8 @@ int mutt_extract_token (BUFFER *dest, BUFFER *tok, int flags)
     }
     else if (ch == '^' && (flags & MUTT_TOKEN_CONDENSE))
     {
-       if (!*tok->dptr)
-           return -1; /* premature end of token */
+      if (!*tok->dptr)
+        return -1; /* premature end of token */
       ch = *tok->dptr++;
       if (ch == '^')
        mutt_buffer_addch (dest, ch);
@@ -337,22 +337,22 @@ static void mutt_free_opt (struct option_t* p)
 
   switch (p->type & DT_MASK)
   {
-  case DT_ADDR:
-    rfc822_free_address ((ADDRESS**)p->data);
-    break;
-  case DT_RX:
-    pp = (REGEXP*)p->data;
-    FREE (&pp->pattern);
-    if (pp->rx)
-    {
-      regfree (pp->rx);
-      FREE (&pp->rx);
-    }
-    break;
-  case DT_PATH:
-  case DT_STR:
-    FREE ((char**)p->data);            /* __FREE_CHECKED__ */
-    break;
+    case DT_ADDR:
+      rfc822_free_address ((ADDRESS**)p->data);
+      break;
+    case DT_RX:
+      pp = (REGEXP*)p->data;
+      FREE (&pp->pattern);
+      if (pp->rx)
+      {
+        regfree (pp->rx);
+        FREE (&pp->rx);
+      }
+      break;
+    case DT_PATH:
+    case DT_STR:
+      FREE ((char**)p->data);          /* __FREE_CHECKED__ */
+      break;
   }
 }
 
@@ -506,20 +506,20 @@ static int add_to_replace_list (REPLACE_LIST **list, const char *pat, const char
   {
     if (*p == '%')
     {
-        n = atoi(++p);
-        if (n > t->nmatch)
-          t->nmatch = n;
-        while (*p && isdigit((int)*p))
-          ++p;
+      n = atoi(++p);
+      if (n > t->nmatch)
+        t->nmatch = n;
+      while (*p && isdigit((int)*p))
+        ++p;
     }
     else
-        ++p;
+      ++p;
   }
 
   if (t->nmatch > t->rx->rx->re_nsub)
   {
     snprintf (err->data, err->dsize, "%s", _("Not enough subexpressions for "
-                                       "template"));
+                                             "template"));
     remove_from_replace_list(list, pat);
     return -1;
   }
@@ -744,7 +744,7 @@ static int parse_alternates (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER
   mutt_group_context_destroy (&gc);
   return 0;
 
- bail:
+bail:
   mutt_group_context_destroy (&gc);
   return -1;
 }
@@ -886,8 +886,8 @@ static int parse_spam_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *
 
       /* Add to the spam list. */
       if (add_to_replace_list (&SpamList, buf->data, templ.data, err) != 0) {
-         FREE(&templ.data);
-          return -1;
+        FREE(&templ.data);
+        return -1;
       }
       FREE(&templ.data);
     }
@@ -1022,7 +1022,7 @@ static int parse_lists (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
   mutt_group_context_destroy (&gc);
   return 0;
 
- bail:
+bail:
   mutt_group_context_destroy (&gc);
   return -1;
 }
@@ -1061,7 +1061,7 @@ static int parse_group (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
       {
        case NONE:
          snprintf (err->data, err->dsize, _("%sgroup: missing -rx or -addr."),
-                  data == MUTT_UNGROUP ? "un" : "");
+                    data == MUTT_UNGROUP ? "un" : "");
          goto bail;
 
        case RX:
@@ -1126,12 +1126,12 @@ static int parse_attach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *err)
   /* Find the last item in the list that data points to. */
   lastp = NULL;
   dprint(5, (debugfile, "parse_attach_list: ldata = %p, *ldata = %p\n",
-             (void *)ldata, (void *)*ldata));
+             (void *)ldata, (void *)*ldata));
   for (listp = *ldata; listp; listp = listp->next)
   {
     a = (ATTACH_MATCH *)listp->data;
     dprint(5, (debugfile, "parse_attach_list: skipping %s/%s\n",
-               a->major, a->minor));
+               a->major, a->minor));
     lastp = listp;
   }
 
@@ -1184,7 +1184,7 @@ static int parse_attach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *err)
     }
 
     dprint(5, (debugfile, "parse_attach_list: added %s/%s [%d]\n",
-               a->major, a->minor, a->major_int));
+               a->major, a->minor, a->major_int));
 
     listp = safe_malloc(sizeof(LIST));
     listp->data = (char *)a;
@@ -1242,11 +1242,11 @@ static int parse_unattach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *er
     {
       a = (ATTACH_MATCH *)lp->data;
       dprint(5, (debugfile, "parse_unattach_list: check %s/%s [%d] : %s/%s [%d]\n",
-                 a->major, a->minor, a->major_int, tmp, minor, major));
+                 a->major, a->minor, a->major_int, tmp, minor, major));
       if (a->major_int == major && !mutt_strcasecmp(minor, a->minor))
       {
        dprint(5, (debugfile, "parse_unattach_list: removed %s/%s [%d]\n",
-                   a->major, a->minor, a->major_int));
+                   a->major, a->minor, a->major_int));
        regfree(&a->minor_rx);
        FREE(&a->major);
 
@@ -1419,7 +1419,7 @@ static int parse_subscribe (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *
   mutt_group_context_destroy (&gc);
   return 0;
 
- bail:
+bail:
   mutt_group_context_destroy (&gc);
   return -1;
 }
@@ -1573,7 +1573,7 @@ static int parse_alias (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
   mutt_group_context_destroy (&gc);
   return 0;
 
-  bail:
+bail:
   mutt_group_context_destroy (&gc);
   return -1;
 }
@@ -1775,40 +1775,40 @@ static void mutt_restore_default (struct option_t *p)
       *((long *) p->data) = p->init;
       break;
     case DT_RX:
-      {
-       REGEXP *pp = (REGEXP *) p->data;
-       int flags = 0;
+    {
+      REGEXP *pp = (REGEXP *) p->data;
+      int flags = 0;
 
-       FREE (&pp->pattern);
-       if (pp->rx)
-       {
-         regfree (pp->rx);
-         FREE (&pp->rx);
-       }
+      FREE (&pp->pattern);
+      if (pp->rx)
+      {
+        regfree (pp->rx);
+        FREE (&pp->rx);
+      }
 
-       if (p->init)
-       {
-         char *s = (char *) p->init;
+      if (p->init)
+      {
+        char *s = (char *) p->init;
 
-         pp->rx = safe_calloc (1, sizeof (regex_t));
-         pp->pattern = safe_strdup ((char *) p->init);
-         if (mutt_strcmp (p->option, "mask") != 0)
-           flags |= mutt_which_case ((const char *) p->init);
-         if (mutt_strcmp (p->option, "mask") == 0 && *s == '!')
-         {
-           s++;
-           pp->not = 1;
-         }
-         if (REGCOMP (pp->rx, s, flags) != 0)
-         {
-           fprintf (stderr, _("mutt_restore_default(%s): error in regexp: %s\n"),
-                    p->option, pp->pattern);
-           FREE (&pp->pattern);
-           FREE (&pp->rx);
-         }
-       }
+        pp->rx = safe_calloc (1, sizeof (regex_t));
+        pp->pattern = safe_strdup ((char *) p->init);
+        if (mutt_strcmp (p->option, "mask") != 0)
+          flags |= mutt_which_case ((const char *) p->init);
+        if (mutt_strcmp (p->option, "mask") == 0 && *s == '!')
+        {
+          s++;
+          pp->not = 1;
+        }
+        if (REGCOMP (pp->rx, s, flags) != 0)
+        {
+          fprintf (stderr, _("mutt_restore_default(%s): error in regexp: %s\n"),
+                   p->option, pp->pattern);
+          FREE (&pp->pattern);
+          FREE (&pp->rx);
+        }
       }
-      break;
+    }
+    break;
   }
 
   if (p->flags & R_INDEX)
@@ -1850,19 +1850,19 @@ static size_t escape_string (char *dst, size_t len, const char* src)
   {
     switch (*src)
     {
-    case '\n':
-      ESC_CHAR('n');
-      break;
-    case '\r':
-      ESC_CHAR('r');
-      break;
-    case '\t':
-      ESC_CHAR('t');
-      break;
-    default:
-      if ((*src == '\\' || *src == '"') && p - dst < len - 1)
-       *p++ = '\\';
-      *p++ = *src;
+      case '\n':
+        ESC_CHAR('n');
+        break;
+      case '\r':
+        ESC_CHAR('r');
+        break;
+      case '\t':
+        ESC_CHAR('t');
+        break;
+      default:
+        if ((*src == '\\' || *src == '"') && p - dst < len - 1)
+          *p++ = '\\';
+        *p++ = *src;
     }
     src++;
   }
@@ -2116,7 +2116,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
     if (!mutt_strncmp ("my_", tmp->data, 3))
       myvar = tmp->data;
     else if ((idx = mutt_option_index (tmp->data)) == -1 &&
-       !(reset && !mutt_strcmp ("all", tmp->data)))
+             !(reset && !mutt_strcmp ("all", tmp->data)))
     {
       snprintf (err->data, err->dsize, _("%s: unknown variable"), tmp->data);
       return (-1);
@@ -2188,7 +2188,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
       if (query)
       {
        snprintf (err->data, err->dsize, option (MuttVars[idx].data)
-                       ? _("%s is set") : _("%s is unset"), tmp->data);
+                  ? _("%s is set") : _("%s is unset"), tmp->data);
        return 0;
       }
 
@@ -2396,10 +2396,10 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
          {
            if (CUR_ENV && CUR_ENV->subject)
            {
-             CUR_ENV->real_subj = (regexec (ReplyRegexp.rx,
-                                   CUR_ENV->subject, 1, pmatch, 0)) ?
-                                   CUR_ENV->subject :
-                                   CUR_ENV->subject + pmatch[0].rm_eo;
+             CUR_ENV->real_subj =
+                (regexec (ReplyRegexp.rx, CUR_ENV->subject, 1, pmatch, 0)) ?
+                CUR_ENV->subject :
+                CUR_ENV->subject + pmatch[0].rm_eo;
            }
          }
 #undef CUR_ENV
@@ -2692,7 +2692,7 @@ static int source_rc (const char *rcfile, BUFFER *err)
   pid_t pid;
 
   dprint (2, (debugfile, "Reading configuration file '%s'.\n",
-         rcfile));
+              rcfile));
 
   if ((f = mutt_open_read (rcfile, &pid)) == NULL)
   {
@@ -2739,7 +2739,7 @@ static int source_rc (const char *rcfile, BUFFER *err)
   {
     /* the muttrc source keyword */
     snprintf (err->data, err->dsize, rc >= -MAXERRS ? _("source: errors in %s")
-      : _("source: reading aborted due to too many errors in %s"), rcfile);
+              : _("source: reading aborted due to too many errors in %s"), rcfile);
     rc = -1;
   }
   return (rc);
@@ -2914,8 +2914,8 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs)
     if (Completed[0] == 0 && User_typed[0])
       return 0;
 
-     /* Num_matched will _always_ be at least 1 since the initial
-      * user-typed string is always stored */
+    /* Num_matched will _always_ be at least 1 since the initial
+     * user-typed string is always stored */
     if (numtabs == 1 && Num_matched == 2)
       snprintf(Completed, sizeof(Completed),"%s", Matches[0]);
     else if (numtabs > 1 && Num_matched > 2)
@@ -2975,7 +2975,7 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs)
     if (numtabs == 1 && Num_matched == 2)
       snprintf(Completed, sizeof(Completed),"%s", Matches[0]);
     else if (numtabs > 1 && Num_matched > 2)
-    /* cycle thru all the matches */
+      /* cycle thru all the matches */
       snprintf(Completed, sizeof(Completed), "%s",
               Matches[(numtabs - 2) % Num_matched]);
 
@@ -3022,7 +3022,7 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs)
     if (numtabs == 1 && Num_matched == 2)
       snprintf(Completed, sizeof(Completed),"%s", Matches[0]);
     else if (numtabs > 1 && Num_matched > 2)
-    /* cycle thru all the matches */
+      /* cycle thru all the matches */
       snprintf(Completed, sizeof(Completed), "%s",
               Matches[(numtabs - 2) % Num_matched]);
 
@@ -3344,19 +3344,19 @@ static void mutt_srandom (void)
 static char* mutt_find_cfg (const char *home, const char *xdg_cfg_home)
 {
   const char* names[] =
-  {
-    "muttrc-" MUTT_VERSION,
-    "muttrc",
-    NULL,
-  };
+    {
+      "muttrc-" MUTT_VERSION,
+      "muttrc",
+      NULL,
+    };
 
   const char* locations[][2] =
-  {
-    { home, ".", },
-    { home, ".mutt/" },
-    { xdg_cfg_home, "mutt/", },
-    { NULL, NULL },
-  };
+    {
+      { home, ".", },
+      { home, ".mutt/" },
+      { xdg_cfg_home, "mutt/", },
+      { NULL, NULL },
+    };
 
   int i;
 
@@ -3715,7 +3715,7 @@ static int parse_group_context (group_context_t **ctx, BUFFER *buf, BUFFER *s, u
 
   return 0;
 
-  bail:
+bail:
   mutt_group_context_destroy (ctx);
   return -1;
 }
@@ -3805,8 +3805,8 @@ int mutt_label_complete (char *buffer, size_t len, int numtabs)
   if (Completed[0] == 0 && User_typed[0])
     return 0;
 
-   /* Num_matched will _always_ be atleast 1 since the initial
-    * user-typed string is always stored */
+  /* Num_matched will _always_ be atleast 1 since the initial
+   * user-typed string is always stored */
   if (numtabs == 1 && Num_matched == 2)
     snprintf(Completed, sizeof(Completed), "%s", Matches[0]);
   else if (numtabs > 1 && Num_matched > 2)
diff --git a/init.h b/init.h
index b049d1b2f6636fe42355f5b90af1b48a5c64eef4..a22f254256405323b64bc7c5ab853551b5541818 100644 (file)
--- a/init.h
+++ b/init.h
@@ -1335,24 +1335,24 @@ struct option_t MuttVars[] = {
   */
   { "imap_check_subscribed",  DT_BOOL, R_NONE, OPTIMAPCHECKSUBSCRIBED, 0 },
   /*
-   ** .pp
-   ** When \fIset\fP, mutt will fetch the set of subscribed folders from
-   ** your server on connection, and add them to the set of mailboxes
-   ** it polls for new mail just as if you had issued individual ``$mailboxes''
-   ** commands.
-   */
+  ** .pp
+  ** When \fIset\fP, mutt will fetch the set of subscribed folders from
+  ** your server on connection, and add them to the set of mailboxes
+  ** it polls for new mail just as if you had issued individual ``$mailboxes''
+  ** commands.
+  */
   { "imap_condstore",  DT_BOOL, R_NONE, OPTIMAPCONDSTORE, 0 },
   /*
-   ** .pp
-   ** When \fIset\fP, mutt will use the CONDSTORE extension (RFC 7162)
-   ** if advertised by the server.  Mutt's current implementation is basic,
-   ** used only for initial message fetching and flag updates.
-   ** .pp
-   ** For some IMAP servers, enabling this will slightly speed up
-   ** downloading initial messages.  Unfortunately, Gmail is not one
-   ** those, and displays worse performance when enabled.  Your
-   ** mileage may vary.
-   */
+  ** .pp
+  ** When \fIset\fP, mutt will use the CONDSTORE extension (RFC 7162)
+  ** if advertised by the server.  Mutt's current implementation is basic,
+  ** used only for initial message fetching and flag updates.
+  ** .pp
+  ** For some IMAP servers, enabling this will slightly speed up
+  ** downloading initial messages.  Unfortunately, Gmail is not one
+  ** those, and displays worse performance when enabled.  Your
+  ** mileage may vary.
+  */
   { "imap_delim_chars",                DT_STR, R_NONE, UL &ImapDelimChars, UL "/." },
   /*
   ** .pp
@@ -1465,15 +1465,15 @@ struct option_t MuttVars[] = {
   */
   { "imap_qresync",  DT_BOOL, R_NONE, OPTIMAPQRESYNC, 0 },
   /*
-   ** .pp
-   ** When \fIset\fP, mutt will use the QRESYNC extension (RFC 7162)
-   ** if advertised by the server.  Mutt's current implementation is basic,
-   ** used only for initial message fetching and flag updates.
-   ** .pp
-   ** Note: this feature is currently experimental.  If you experience
-   ** strange behavior, such as duplicate or missing messages please
-   ** file a bug report to let us know.
-   */
+  ** .pp
+  ** When \fIset\fP, mutt will use the QRESYNC extension (RFC 7162)
+  ** if advertised by the server.  Mutt's current implementation is basic,
+  ** used only for initial message fetching and flag updates.
+  ** .pp
+  ** Note: this feature is currently experimental.  If you experience
+  ** strange behavior, such as duplicate or missing messages please
+  ** file a bug report to let us know.
+  */
   { "imap_servernoise",                DT_BOOL, R_NONE, OPTIMAPSERVERNOISE, 1 },
   /*
   ** .pp
@@ -1953,13 +1953,13 @@ struct option_t MuttVars[] = {
 #ifdef USE_SOCKET
   { "net_inc", DT_NUM,  R_NONE, UL &NetInc, 10 },
   /*
-   ** .pp
-   ** Operations that expect to transfer a large amount of data over the
-   ** network will update their progress every $$net_inc kilobytes.
-   ** If set to 0, no progress messages will be displayed.
-   ** .pp
-   ** See also $$read_inc, $$write_inc and $$net_inc.
-   */
+  ** .pp
+  ** Operations that expect to transfer a large amount of data over the
+  ** network will update their progress every $$net_inc kilobytes.
+  ** If set to 0, no progress messages will be displayed.
+  ** .pp
+  ** See also $$read_inc, $$write_inc and $$net_inc.
+  */
 #endif
   { "new_mail_command",        DT_PATH, R_NONE, UL &NewMailCmd, 0 },
   /*
@@ -3640,13 +3640,13 @@ struct option_t MuttVars[] = {
   */
   { "ssl_force_tls",           DT_BOOL, R_NONE, OPTSSLFORCETLS, 0 },
   /*
-   ** .pp
-   ** If this variable is \fIset\fP, Mutt will require that all connections
-   ** to remote servers be encrypted. Furthermore it will attempt to
-   ** negotiate TLS even if the server does not advertise the capability,
-   ** since it would otherwise have to abort the connection anyway. This
-   ** option supersedes $$ssl_starttls.
-   */
+  ** .pp
+  ** If this variable is \fIset\fP, Mutt will require that all connections
+  ** to remote servers be encrypted. Furthermore it will attempt to
+  ** negotiate TLS even if the server does not advertise the capability,
+  ** since it would otherwise have to abort the connection anyway. This
+  ** option supersedes $$ssl_starttls.
+  */
 # ifdef USE_SSL_GNUTLS
   { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 },
   /*
@@ -4037,17 +4037,17 @@ struct option_t MuttVars[] = {
   */
   { "use_envelope_from",       DT_BOOL, R_NONE, OPTENVFROM, 0 },
   /*
-   ** .pp
-   ** When \fIset\fP, mutt will set the \fIenvelope\fP sender of the message.
-   ** If $$envelope_from_address is \fIset\fP, it will be used as the sender
-   ** address. If \fIunset\fP, mutt will attempt to derive the sender from the
-   ** ``From:'' header.
-   ** .pp
-   ** Note that this information is passed to sendmail command using the
-   ** \fC-f\fP command line switch. Therefore setting this option is not useful
-   ** if the $$sendmail variable already contains \fC-f\fP or if the
-   ** executable pointed to by $$sendmail doesn't support the \fC-f\fP switch.
-   */
+  ** .pp
+  ** When \fIset\fP, mutt will set the \fIenvelope\fP sender of the message.
+  ** If $$envelope_from_address is \fIset\fP, it will be used as the sender
+  ** address. If \fIunset\fP, mutt will attempt to derive the sender from the
+  ** ``From:'' header.
+  ** .pp
+  ** Note that this information is passed to sendmail command using the
+  ** \fC-f\fP command line switch. Therefore setting this option is not useful
+  ** if the $$sendmail variable already contains \fC-f\fP or if the
+  ** executable pointed to by $$sendmail doesn't support the \fC-f\fP switch.
+  */
   { "envelope_from",   DT_SYN,  R_NONE, UL "use_envelope_from", 0 },
   /*
   */
index ec86a4968ca157e81d1a5b584093d141a5f27bbf..af5ce4fe6c39540ca597907c7e3707e93e8c87b1 100644 (file)
--- a/keymap.c
+++ b/keymap.c
 #include "functions.h"
 
 const struct mapping_t Menus[] = {
{ "alias",    MENU_ALIAS },
{ "attach",   MENU_ATTACH },
{ "browser",  MENU_FOLDER },
{ "compose",  MENU_COMPOSE },
{ "editor",   MENU_EDITOR },
{ "index",    MENU_MAIN },
{ "pager",    MENU_PAGER },
{ "postpone", MENU_POST },
{ "pgp",      MENU_PGP },
{ "smime",    MENU_SMIME },
 { "alias",   MENU_ALIAS },
 { "attach",  MENU_ATTACH },
 { "browser", MENU_FOLDER },
 { "compose", MENU_COMPOSE },
 { "editor",  MENU_EDITOR },
 { "index",   MENU_MAIN },
 { "pager",   MENU_PAGER },
 { "postpone",        MENU_POST },
 { "pgp",     MENU_PGP },
 { "smime",   MENU_SMIME },
 #ifdef CRYPT_BACKEND_GPGME
{ "key_select_pgp",   MENU_KEY_SELECT_PGP },
{ "key_select_smime", MENU_KEY_SELECT_SMIME },
 { "key_select_pgp",  MENU_KEY_SELECT_PGP },
 { "key_select_smime",        MENU_KEY_SELECT_SMIME },
 #endif
 
 #ifdef MIXMASTER
@@ -60,9 +60,9 @@ const struct mapping_t Menus[] = {
 #endif
 
 
{ "query",    MENU_QUERY },
{ "generic",  MENU_GENERIC },
{ NULL,       0 }
 { "query",   MENU_QUERY },
 { "generic", MENU_GENERIC },
 { NULL,      0 }
 };
 
 #define mutt_check_menu(s) mutt_getvaluebyname(s, Menus)
@@ -933,8 +933,8 @@ static char *parse_keymap (int *menu, BUFFER *s, int maxmenus, int *nummenus, BU
 
       if ((menu[i] = mutt_check_menu (p)) == -1)
       {
-         snprintf (err->data, err->dsize, _("%s: no such menu"), p);
-         goto error;
+        snprintf (err->data, err->dsize, _("%s: no such menu"), p);
+        goto error;
       }
       ++i;
       if (q)
@@ -1051,7 +1051,7 @@ int mutt_parse_bind (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
     {
       /* First check the "generic" list of commands */
       if (menu[i] == MENU_PAGER || menu[i] == MENU_EDITOR ||
-      menu[i] == MENU_GENERIC ||
+          menu[i] == MENU_GENERIC ||
          try_bind (key, menu[i], buf->data, OpGeneric) != 0)
       {
         /* Now check the menu-specific list of commands (if they exist) */
@@ -1176,7 +1176,7 @@ void mutt_what_key (void)
     if (ch != ERR && ch != ctrl ('G'))
     {
       mutt_message(_("Char = %s, Octal = %o, Decimal = %d"),
-              km_keyname(ch), ch, ch);
+                   km_keyname(ch), ch, ch);
     }
   }
   while (ch != ERR && ch != ctrl ('G'));
diff --git a/lib.c b/lib.c
index 01dcd51a16f6c03a5008cfe3b5f5066605c79c4c..33d279a6306a6c096b978788aca4a8d3ae80175c 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -417,7 +417,7 @@ int safe_symlink(const char *oldpath, const char *newpath)
 
     if ((getcwd (abs_oldpath, sizeof abs_oldpath) == NULL) ||
        (strlen (abs_oldpath) + 1 + strlen (oldpath) + 1 > sizeof abs_oldpath))
-    return -1;
+      return -1;
 
     strcat (abs_oldpath, "/");         /* __STRCAT_CHECKED__ */
     strcat (abs_oldpath, oldpath);     /* __STRCAT_CHECKED__ */
@@ -503,7 +503,7 @@ int safe_rename (const char *src, const char *target)
 #ifdef EOPNOTSUPP
        || errno == EOPNOTSUPP
 #endif
-       )
+      )
     {
       dprint (1, (debugfile, "safe_rename: trying rename...\n"));
       if (rename (src, target) == -1)
@@ -575,7 +575,7 @@ success:
 /* Create a temporary directory next to a file name */
 
 static int mutt_mkwrapdir (const char *path, char *newfile, size_t nflen,
-                   char *newdir, size_t ndlen)
+                           char *newdir, size_t ndlen)
 {
   const char *basename;
   char parent[_POSIX_PATH_MAX];
@@ -597,15 +597,15 @@ static int mutt_mkwrapdir (const char *path, char *newfile, size_t nflen,
   snprintf (newdir, ndlen, "%s/%s", parent, ".muttXXXXXX");
   if (mkdtemp(newdir) == NULL)
   {
-      dprint(1, (debugfile, "mutt_mkwrapdir: mkdtemp() failed\n"));
-      return -1;
+    dprint(1, (debugfile, "mutt_mkwrapdir: mkdtemp() failed\n"));
+    return -1;
   }
 
   if (snprintf (newfile, nflen, "%s/%s", newdir, NONULL(basename)) >= nflen)
   {
-      rmdir(newdir);
-      dprint(1, (debugfile, "mutt_mkwrapdir: string was truncated\n"));
-      return -1;
+    rmdir(newdir);
+    dprint(1, (debugfile, "mutt_mkwrapdir: string was truncated\n"));
+    return -1;
   }
   return 0;
 }
@@ -971,7 +971,7 @@ void mutt_remove_trailing_ws (char *s)
  * Returns NULL on error or a pointer to dst otherwise.
  */
 char *mutt_concatn_path (char *dst, size_t dstlen,
-    const char *dir, size_t dirlen, const char *fname, size_t fnamelen)
+                         const char *dir, size_t dirlen, const char *fname, size_t fnamelen)
 {
   size_t req;
   size_t offset = 0;
diff --git a/main.c b/main.c
index ed03a75b702a3cddca69960d801a49330a5921b2..188ff40344d428cf548743bc6ea04cc1dd809d96 100644 (file)
--- a/main.c
+++ b/main.c
@@ -260,280 +260,280 @@ static void show_version (void)
   puts (
 
 #ifdef HOMESPOOL
-       "+HOMESPOOL  "
+    "+HOMESPOOL  "
 #else
-       "-HOMESPOOL  "
+    "-HOMESPOOL  "
 #endif
 
 #ifdef USE_SETGID
-       "+USE_SETGID  "
+    "+USE_SETGID  "
 #else
-       "-USE_SETGID  "
+    "-USE_SETGID  "
 #endif
 
 #ifdef USE_DOTLOCK
-       "+USE_DOTLOCK  "
+    "+USE_DOTLOCK  "
 #else
-       "-USE_DOTLOCK  "
+    "-USE_DOTLOCK  "
 #endif
 
 #ifdef DL_STANDALONE
-       "+DL_STANDALONE  "
+    "+DL_STANDALONE  "
 #else
-       "-DL_STANDALONE  "
+    "-DL_STANDALONE  "
 #endif
 
 #ifdef USE_FCNTL
-       "+USE_FCNTL  "
+    "+USE_FCNTL  "
 #else
-       "-USE_FCNTL  "
+    "-USE_FCNTL  "
 #endif
 
 #ifdef USE_FLOCK
-       "+USE_FLOCK   "
+    "+USE_FLOCK   "
 #else
-       "-USE_FLOCK   "
+    "-USE_FLOCK   "
 #endif
     );
   puts (
 #ifdef USE_POP
-       "+USE_POP  "
+    "+USE_POP  "
 #else
-       "-USE_POP  "
+    "-USE_POP  "
 #endif
 
 #ifdef USE_IMAP
-        "+USE_IMAP  "
+    "+USE_IMAP  "
 #else
-        "-USE_IMAP  "
+    "-USE_IMAP  "
 #endif
 
 #ifdef USE_SMTP
-       "+USE_SMTP  "
+    "+USE_SMTP  "
 #else
-       "-USE_SMTP  "
+    "-USE_SMTP  "
 #endif
-       "\n"
+    "\n"
 
 #ifdef USE_SSL_OPENSSL
-       "+USE_SSL_OPENSSL  "
+    "+USE_SSL_OPENSSL  "
 #else
-       "-USE_SSL_OPENSSL  "
+    "-USE_SSL_OPENSSL  "
 #endif
 
 #ifdef USE_SSL_GNUTLS
-       "+USE_SSL_GNUTLS  "
+    "+USE_SSL_GNUTLS  "
 #else
-       "-USE_SSL_GNUTLS  "
+    "-USE_SSL_GNUTLS  "
 #endif
 
 #ifdef USE_SASL
-       "+USE_SASL  "
+    "+USE_SASL  "
 #else
-       "-USE_SASL  "
+    "-USE_SASL  "
 #endif
 #ifdef USE_GSS
-       "+USE_GSS  "
+    "+USE_GSS  "
 #else
-       "-USE_GSS  "
+    "-USE_GSS  "
 #endif
 
 #if HAVE_GETADDRINFO
-       "+HAVE_GETADDRINFO  "
+    "+HAVE_GETADDRINFO  "
 #else
-       "-HAVE_GETADDRINFO  "
+    "-HAVE_GETADDRINFO  "
 #endif
-        );
+    );
 
   puts (
 #ifdef HAVE_REGCOMP
-       "+HAVE_REGCOMP  "
+    "+HAVE_REGCOMP  "
 #else
-       "-HAVE_REGCOMP  "
+    "-HAVE_REGCOMP  "
 #endif
 
 #ifdef USE_GNU_REGEX
-       "+USE_GNU_REGEX  "
+    "+USE_GNU_REGEX  "
 #else
-       "-USE_GNU_REGEX  "
+    "-USE_GNU_REGEX  "
 #endif
 
-       "\n"
+    "\n"
 
 #ifdef HAVE_COLOR
-       "+HAVE_COLOR  "
+    "+HAVE_COLOR  "
 #else
-       "-HAVE_COLOR  "
+    "-HAVE_COLOR  "
 #endif
 
 #ifdef HAVE_START_COLOR
-       "+HAVE_START_COLOR  "
+    "+HAVE_START_COLOR  "
 #else
-       "-HAVE_START_COLOR  "
+    "-HAVE_START_COLOR  "
 #endif
 
 #ifdef HAVE_TYPEAHEAD
-       "+HAVE_TYPEAHEAD  "
+    "+HAVE_TYPEAHEAD  "
 #else
-       "-HAVE_TYPEAHEAD  "
+    "-HAVE_TYPEAHEAD  "
 #endif
 
 #ifdef HAVE_BKGDSET
-       "+HAVE_BKGDSET  "
+    "+HAVE_BKGDSET  "
 #else
-       "-HAVE_BKGDSET  "
+    "-HAVE_BKGDSET  "
 #endif
 
-       "\n"
+    "\n"
 
 #ifdef HAVE_CURS_SET
-       "+HAVE_CURS_SET  "
+    "+HAVE_CURS_SET  "
 #else
-       "-HAVE_CURS_SET  "
+    "-HAVE_CURS_SET  "
 #endif
 
 #ifdef HAVE_META
-       "+HAVE_META  "
+    "+HAVE_META  "
 #else
-       "-HAVE_META  "
+    "-HAVE_META  "
 #endif
 
 #ifdef HAVE_RESIZETERM
-       "+HAVE_RESIZETERM  "
+    "+HAVE_RESIZETERM  "
 #else
-       "-HAVE_RESIZETERM  "
+    "-HAVE_RESIZETERM  "
 #endif
 
 #ifdef HAVE_FUTIMENS
-       "+HAVE_FUTIMENS  "
+    "+HAVE_FUTIMENS  "
 #else
-       "-HAVE_FUTIMENS  "
+    "-HAVE_FUTIMENS  "
 #endif
-        );
+    );
 
   puts (
 #ifdef CRYPT_BACKEND_CLASSIC_PGP
-        "+CRYPT_BACKEND_CLASSIC_PGP  "
+    "+CRYPT_BACKEND_CLASSIC_PGP  "
 #else
-        "-CRYPT_BACKEND_CLASSIC_PGP  "
+    "-CRYPT_BACKEND_CLASSIC_PGP  "
 #endif
 #ifdef CRYPT_BACKEND_CLASSIC_SMIME
-        "+CRYPT_BACKEND_CLASSIC_SMIME  "
+    "+CRYPT_BACKEND_CLASSIC_SMIME  "
 #else
-        "-CRYPT_BACKEND_CLASSIC_SMIME  "
+    "-CRYPT_BACKEND_CLASSIC_SMIME  "
 #endif
 #ifdef CRYPT_BACKEND_GPGME
-        "+CRYPT_BACKEND_GPGME  "
+    "+CRYPT_BACKEND_GPGME  "
 #else
-        "-CRYPT_BACKEND_GPGME  "
+    "-CRYPT_BACKEND_GPGME  "
 #endif
-        );
+    );
 
   puts (
 #ifdef EXACT_ADDRESS
-       "+EXACT_ADDRESS  "
+    "+EXACT_ADDRESS  "
 #else
-       "-EXACT_ADDRESS  "
+    "-EXACT_ADDRESS  "
 #endif
 
 #ifdef SUN_ATTACHMENT
-       "+SUN_ATTACHMENT  "
+    "+SUN_ATTACHMENT  "
 #else
-       "-SUN_ATTACHMENT  "
+    "-SUN_ATTACHMENT  "
 #endif
 
-       "\n"
+    "\n"
 
 #ifdef ENABLE_NLS
-       "+ENABLE_NLS  "
+    "+ENABLE_NLS  "
 #else
-       "-ENABLE_NLS  "
+    "-ENABLE_NLS  "
 #endif
 
 #ifdef LOCALES_HACK
-       "+LOCALES_HACK  "
+    "+LOCALES_HACK  "
 #else
-       "-LOCALES_HACK  "
+    "-LOCALES_HACK  "
 #endif
 
 #ifdef HAVE_WC_FUNCS
-       "+HAVE_WC_FUNCS  "
+    "+HAVE_WC_FUNCS  "
 #else
-       "-HAVE_WC_FUNCS  "
+    "-HAVE_WC_FUNCS  "
 #endif
 
 #ifdef HAVE_LANGINFO_CODESET
-       "+HAVE_LANGINFO_CODESET  "
+    "+HAVE_LANGINFO_CODESET  "
 #else
-       "-HAVE_LANGINFO_CODESET  "
+    "-HAVE_LANGINFO_CODESET  "
 #endif
 
 
 #ifdef HAVE_LANGINFO_YESEXPR
-       "+HAVE_LANGINFO_YESEXPR  "
+    "+HAVE_LANGINFO_YESEXPR  "
 #else
-       "-HAVE_LANGINFO_YESEXPR  "
+    "-HAVE_LANGINFO_YESEXPR  "
 #endif
 
-       "\n"
+    "\n"
 
 #if HAVE_ICONV
-       "+HAVE_ICONV  "
+    "+HAVE_ICONV  "
 #else
-       "-HAVE_ICONV  "
+    "-HAVE_ICONV  "
 #endif
 
 #if ICONV_NONTRANS
-       "+ICONV_NONTRANS  "
+    "+ICONV_NONTRANS  "
 #else
-       "-ICONV_NONTRANS  "
+    "-ICONV_NONTRANS  "
 #endif
 
 #if HAVE_LIBIDN
-       "+HAVE_LIBIDN  "
+    "+HAVE_LIBIDN  "
 #else
-       "-HAVE_LIBIDN  "
+    "-HAVE_LIBIDN  "
 #endif
 
 #if HAVE_LIBIDN2
-       "+HAVE_LIBIDN2  "
+    "+HAVE_LIBIDN2  "
 #else
-       "-HAVE_LIBIDN2  "
+    "-HAVE_LIBIDN2  "
 #endif
 
 #if HAVE_GETSID
-       "+HAVE_GETSID  "
+    "+HAVE_GETSID  "
 #else
-       "-HAVE_GETSID  "
+    "-HAVE_GETSID  "
 #endif
 
 #if USE_HCACHE
-       "+USE_HCACHE  "
+    "+USE_HCACHE  "
 #else
-       "-USE_HCACHE  "
+    "-USE_HCACHE  "
 #endif
 
-       "\n"
+    "\n"
 
 #ifdef USE_SIDEBAR
-       "+USE_SIDEBAR  "
+    "+USE_SIDEBAR  "
 #else
-       "-USE_SIDEBAR  "
+    "-USE_SIDEBAR  "
 #endif
 
 #ifdef USE_COMPRESSED
-       "+USE_COMPRESSED  "
+    "+USE_COMPRESSED  "
 #else
-       "-USE_COMPRESSED  "
+    "-USE_COMPRESSED  "
 #endif
 
 #ifdef USE_INOTIFY
-       "+USE_INOTIFY  "
+    "+USE_INOTIFY  "
 #else
-       "-USE_INOTIFY  "
+    "-USE_INOTIFY  "
 #endif
 
-       );
+    );
 
 #ifdef ISPELL
   printf ("ISPELL=\"%s\"\n", ISPELL);
@@ -596,7 +596,7 @@ static void start_curses (void)
 #if HAVE_META
   meta (stdscr, TRUE);
 #endif
-init_extended_keys();
+  init_extended_keys();
   mutt_reflow_windows ();
 }
 
@@ -699,114 +699,114 @@ int main (int argc, char **argv, char **environ)
     if ((i = getopt (argc, argv, "+A:a:b:F:f:c:Dd:Ee:H:s:i:hm:npQ:RvxyzZ")) != EOF)
       switch (i)
       {
-      case 'A':
-        alias_queries = mutt_add_list (alias_queries, optarg);
-        break;
-      case 'a':
-       attach = mutt_add_list (attach, optarg);
-       break;
-
-      case 'F':
-       mutt_str_replace (&Muttrc, optarg);
-       break;
-
-      case 'f':
-       strfcpy (folder, optarg, sizeof (folder));
-        explicit_folder = 1;
-       break;
-
-      case 'b':
-      case 'c':
-       if (!msg)
-         msg = mutt_new_header ();
-       if (!msg->env)
-         msg->env = mutt_new_envelope ();
-       if (i == 'b')
-         msg->env->bcc = rfc822_parse_adrlist (msg->env->bcc, optarg);
-       else
-         msg->env->cc = rfc822_parse_adrlist (msg->env->cc, optarg);
-       break;
+        case 'A':
+          alias_queries = mutt_add_list (alias_queries, optarg);
+          break;
+        case 'a':
+          attach = mutt_add_list (attach, optarg);
+          break;
+
+        case 'F':
+          mutt_str_replace (&Muttrc, optarg);
+          break;
+
+        case 'f':
+          strfcpy (folder, optarg, sizeof (folder));
+          explicit_folder = 1;
+          break;
+
+        case 'b':
+        case 'c':
+          if (!msg)
+            msg = mutt_new_header ();
+          if (!msg->env)
+            msg->env = mutt_new_envelope ();
+          if (i == 'b')
+            msg->env->bcc = rfc822_parse_adrlist (msg->env->bcc, optarg);
+          else
+            msg->env->cc = rfc822_parse_adrlist (msg->env->cc, optarg);
+          break;
 
-      case 'D':
-       dump_variables = 1;
-       break;
+        case 'D':
+          dump_variables = 1;
+          break;
 
-      case 'd':
+        case 'd':
 #ifdef DEBUG
-       if (mutt_atoi (optarg, &debuglevel) < 0 || debuglevel <= 0)
-       {
-         fprintf (stderr, _("Error: value '%s' is invalid for -d.\n"), optarg);
-         return 1;
-       }
-       printf (_("Debugging at level %d.\n"), debuglevel);
+          if (mutt_atoi (optarg, &debuglevel) < 0 || debuglevel <= 0)
+          {
+            fprintf (stderr, _("Error: value '%s' is invalid for -d.\n"), optarg);
+            return 1;
+          }
+          printf (_("Debugging at level %d.\n"), debuglevel);
 #else
-       printf ("%s", _("DEBUG was not defined during compilation.  Ignored.\n"));
+          printf ("%s", _("DEBUG was not defined during compilation.  Ignored.\n"));
 #endif
-       break;
+          break;
 
-      case 'E':
-        edit_infile = 1;
-        break;
+        case 'E':
+          edit_infile = 1;
+          break;
 
-      case 'e':
-       commands = mutt_add_list (commands, optarg);
-       break;
+        case 'e':
+          commands = mutt_add_list (commands, optarg);
+          break;
 
-      case 'H':
-       draftFile = optarg;
-       break;
+        case 'H':
+          draftFile = optarg;
+          break;
 
-      case 'i':
-       includeFile = optarg;
-       break;
+        case 'i':
+          includeFile = optarg;
+          break;
 
-      case 'm':
-       /* should take precedence over .muttrc setting, so save it for later */
-       newMagic = optarg;
-       break;
+        case 'm':
+          /* should take precedence over .muttrc setting, so save it for later */
+          newMagic = optarg;
+          break;
 
-      case 'n':
-       flags |= MUTT_NOSYSRC;
-       break;
+        case 'n':
+          flags |= MUTT_NOSYSRC;
+          break;
 
-      case 'p':
-       sendflags |= SENDPOSTPONED;
-       break;
+        case 'p':
+          sendflags |= SENDPOSTPONED;
+          break;
 
-      case 'Q':
-        queries = mutt_add_list (queries, optarg);
-        break;
+        case 'Q':
+          queries = mutt_add_list (queries, optarg);
+          break;
 
-      case 'R':
-       flags |= MUTT_RO; /* read-only mode */
-       break;
+        case 'R':
+          flags |= MUTT_RO; /* read-only mode */
+          break;
 
-      case 's':
-       subject = optarg;
-       break;
+        case 's':
+          subject = optarg;
+          break;
 
-      case 'v':
-       version++;
-       break;
+        case 'v':
+          version++;
+          break;
 
-      case 'x': /* mailx compatible send mode */
-       sendflags |= SENDMAILX;
-       break;
+        case 'x': /* mailx compatible send mode */
+          sendflags |= SENDMAILX;
+          break;
 
-      case 'y': /* My special hack mode */
-       flags |= MUTT_SELECT;
-       break;
+        case 'y': /* My special hack mode */
+          flags |= MUTT_SELECT;
+          break;
 
-      case 'z':
-       flags |= MUTT_IGNORE;
-       break;
+        case 'z':
+          flags |= MUTT_IGNORE;
+          break;
 
-      case 'Z':
-       flags |= MUTT_BUFFY | MUTT_IGNORE;
-       break;
+        case 'Z':
+          flags |= MUTT_BUFFY | MUTT_IGNORE;
+          break;
 
-      default:
-       mutt_usage ();
+        default:
+          mutt_usage ();
       }
   }
 
@@ -924,15 +924,15 @@ int main (int argc, char **argv, char **environ)
     /* we're not connected yet - skip mail folder creation */
     if (!mx_is_imap (fpath))
 #endif
-    if (stat (fpath, &sb) == -1 && errno == ENOENT)
-    {
-      snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"), Maildir);
-      if (mutt_yesorno (msg, MUTT_YES) == MUTT_YES)
+      if (stat (fpath, &sb) == -1 && errno == ENOENT)
       {
-       if (mkdir (fpath, 0700) == -1 && errno != EEXIST)
-         mutt_error ( _("Can't create %s: %s."), Maildir, strerror (errno));
+        snprintf (msg, sizeof (msg), _("%s does not exist. Create it?"), Maildir);
+        if (mutt_yesorno (msg, MUTT_YES) == MUTT_YES)
+        {
+          if (mkdir (fpath, 0700) == -1 && errno != EEXIST)
+            mutt_error ( _("Can't create %s: %s."), Maildir, strerror (errno));
+        }
       }
-    }
   }
 
   if (sendflags & SENDPOSTPONED)
diff --git a/mbox.c b/mbox.c
index 6793d8e2e520c9b60364975cd5dc824692cb0577..be9abfb1e32a11e567611c635e8e9169205bf298 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -921,7 +921,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     goto bail;
   }
 
-    /* save the index of the first changed/deleted message */
+  /* save the index of the first changed/deleted message */
   first = i;
   /* where to start overwriting */
   offset = ctx->hdrs[i]->offset;
@@ -1236,7 +1236,7 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
   }
   else
   {
-      /* save the old headers */
+    /* save the old headers */
     old_msgcount = ctx->msgcount;
     old_hdrs = ctx->hdrs;
     ctx->hdrs = NULL;
@@ -1265,8 +1265,8 @@ int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
       if (!(ctx->fp = safe_fopen (ctx->path, "r")))
        rc = -1;
       else
-       rc = ((ctx->magic == MUTT_MBOX) ? mbox_parse_mailbox
-                                      : mmdf_parse_mailbox) (ctx);
+       rc = (ctx->magic == MUTT_MBOX) ? mbox_parse_mailbox (ctx) :
+          mmdf_parse_mailbox (ctx);
       break;
 
     default:
diff --git a/mbyte.c b/mbyte.c
index 6556d24da2015fb3979b102d0088cddb0353eaab..5aa7fc4084f192642fe3318d7260f190a81c6f74 100644 (file)
--- a/mbyte.c
+++ b/mbyte.c
@@ -68,7 +68,7 @@ void mutt_set_charset (char *charset)
     Charset_is_utf8 = 1;
 #ifndef HAVE_WC_FUNCS
   else if (!ascii_strcasecmp(buffer, "euc-jp") || !ascii_strcasecmp(buffer, "shift_jis")
-       || !ascii_strcasecmp(buffer, "cp932") || !ascii_strcasecmp(buffer, "eucJP-ms"))
+           || !ascii_strcasecmp(buffer, "cp932") || !ascii_strcasecmp(buffer, "eucJP-ms"))
   {
     charset_is_ja = 1;
 
diff --git a/menu.c b/menu.c
index 86f4a8706df1fd8d95df4d08661e623f2a1b0483..320645b200f7f8d8f8ceb89fe4d47589afbb8b9d 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -269,15 +269,15 @@ void menu_redraw_index (MUTTMENU *menu)
 
       if (i == menu->current)
       {
-         SETCOLOR(MT_COLOR_INDICATOR);
-         if (option(OPTARROWCURSOR))
-         {
-           addstr ("->");
-           ATTRSET(attr);
-           addch (' ');
-         }
-         else
-           do_color = 0;
+        SETCOLOR(MT_COLOR_INDICATOR);
+        if (option(OPTARROWCURSOR))
+        {
+          addstr ("->");
+          ATTRSET(attr);
+          addch (' ');
+        }
+        else
+          do_color = 0;
       }
       else if (option(OPTARROWCURSOR))
        addstr("   ");
@@ -461,8 +461,9 @@ void menu_next_line (MUTTMENU *menu)
   {
     int c = MIN (MenuContext, menu->pagelen / 2);
 
-    if (menu->top + 1 < menu->max - c
-      && (option(OPTMENUMOVEOFF) || (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
+    if ((menu->top + 1 < menu->max - c) &&
+        (option(OPTMENUMOVEOFF) ||
+         (menu->max > menu->pagelen && menu->top < menu->max - menu->pagelen)))
     {
       menu->top++;
       if (menu->current < menu->top + c && menu->current < menu->max - 1)
@@ -520,7 +521,7 @@ static void menu_length_jump (MUTTMENU *menu, int jumplen)
       if ((DIRECTION *
           (tmp = (menu->current -
                   (menu->top + (neg ? (menu->pagelen - 1) - c : c))
-         ))) < 0)
+             ))) < 0)
        menu->current -= tmp;
 
       menu->redraw = REDRAW_INDEX;
@@ -532,7 +533,7 @@ static void menu_length_jump (MUTTMENU *menu, int jumplen)
     }
     else
       mutt_error (neg ? _("You are on the first page.")
-                     : _("You are on the last page."));
+                  : _("You are on the last page."));
 
     menu->current = MIN (menu->current, menu->max - 1);
     menu->current = MAX (menu->current, 0);
@@ -683,7 +684,7 @@ static void menu_prev_entry (MUTTMENU *menu)
 
 static int default_color (int i)
 {
-   return ColorDefs[MT_COLOR_NORMAL];
+  return ColorDefs[MT_COLOR_NORMAL];
 }
 
 static int menu_search_generic (MUTTMENU *m, regex_t *re, int n)
@@ -819,11 +820,11 @@ void mutt_current_menu_redraw ()
   if (current_menu)
   {
     if (menu_redraw (current_menu) == OP_REDRAW)
-    /* On a REDRAW_FULL with a non-customized redraw, menu_redraw()
-     * will return OP_REDRAW to give the calling menu-loop a chance to
-     * customize output.
-     */
-       menu_redraw (current_menu);
+      /* On a REDRAW_FULL with a non-customized redraw, menu_redraw()
+       * will return OP_REDRAW to give the calling menu-loop a chance to
+       * customize output.
+       */
+      menu_redraw (current_menu);
   }
 }
 
@@ -838,7 +839,7 @@ static int menu_search (MUTTMENU *menu, int op)
   regex_t re;
   char buf[SHORT_STRING];
   char* searchBuf = menu->menu >= 0 && menu->menu < MENU_MAX ?
-                    SearchBuffers[menu->menu] : NULL;
+    SearchBuffers[menu->menu] : NULL;
 
   if (!(searchBuf && *searchBuf) ||
       (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE))
@@ -854,7 +855,7 @@ static int menu_search (MUTTMENU *menu, int op)
       searchBuf = SearchBuffers[menu->menu];
     }
     menu->searchDir = (op == OP_SEARCH || op == OP_SEARCH_NEXT) ?
-                      MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
+      MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
   }
 
   searchDir = (menu->searchDir == MUTT_SEARCH_UP) ? -1 : 1;
diff --git a/mh.c b/mh.c
index bf403114a4237d26c51e3581ebf13a36cd035ed1..1f59ba8756d31655ae067c07d8b982cb03468ac7 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -368,7 +368,7 @@ static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
   FOREVER
   {
     mutt_buffer_printf (path, "%s/.mutt-%s-%d-%d",
-             dest->path, NONULL (Hostname), (int) getpid (), Counter++);
+                        dest->path, NONULL (Hostname), (int) getpid (), Counter++);
     if ((fd = open (mutt_b2s (path), O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
     {
       if (errno != EEXIST)
@@ -701,32 +701,32 @@ static void maildir_parse_flags (HEADER * h, const char *path)
     {
       switch (*p)
       {
-      case 'F':
+        case 'F':
 
-       h->flagged = 1;
-       break;
+          h->flagged = 1;
+          break;
 
-      case 'S':                /* seen */
+        case 'S':              /* seen */
 
-       h->read = 1;
-       break;
+          h->read = 1;
+          break;
 
-      case 'R':                /* replied */
+        case 'R':              /* replied */
 
-       h->replied = 1;
-       break;
+          h->replied = 1;
+          break;
 
-      case 'T':                /* trashed */
-       if (!h->flagged || !option(OPTFLAGSAFE))
-       {
-         h->trash = 1;
-         h->deleted = 1;
-       }
-       break;
+        case 'T':              /* trashed */
+          if (!h->flagged || !option(OPTFLAGSAFE))
+          {
+            h->trash = 1;
+            h->deleted = 1;
+          }
+          break;
 
-      default:
-       *q++ = *p;
-       break;
+        default:
+          *q++ = *p;
+          break;
       }
       p++;
     }
@@ -1133,7 +1133,7 @@ static struct maildir *skip_duplicates (struct maildir *p, struct maildir **last
  * This function does the second parsing pass
  */
 static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir **md,
-                             progress_t *progress)
+                                     progress_t *progress)
 {
   struct maildir *p, *last = NULL;
   BUFFER *fn = NULL;
@@ -1150,20 +1150,20 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir **md,
 #endif
 
 #if HAVE_DIRENT_D_INO
-#define DO_SORT()      do { \
-  if (!sort) \
-  { \
-    dprint (4, (debugfile, "maildir: need to sort %s by inode\n", ctx->path)); \
-    p = maildir_sort (p, (size_t) -1, md_cmp_inode); \
-    if (!last) \
-      *md = p; \
-    else \
-      last->next = p; \
-    sort = 1; \
-    p = skip_duplicates (p, &last); \
-    mutt_buffer_printf (fn, "%s/%s", ctx->path, p->h->path); \
-  } \
-} while(0)
+#define DO_SORT()      do {                                            \
+    if (!sort)                                                          \
+    {                                                                   \
+      dprint (4, (debugfile, "maildir: need to sort %s by inode\n", ctx->path)); \
+      p = maildir_sort (p, (size_t) -1, md_cmp_inode);                  \
+      if (!last)                                                        \
+        *md = p;                                                        \
+      else                                                              \
+        last->next = p;                                                 \
+      sort = 1;                                                         \
+      p = skip_duplicates (p, &last);                                   \
+      mutt_buffer_printf (fn, "%s/%s", ctx->path, p->h->path);          \
+    }                                                                   \
+  } while(0)
 #else
 #define DO_SORT()      /* nothing */
 #endif
@@ -1175,9 +1175,9 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir **md,
   fn = mutt_buffer_pool_get ();
 
   for (p = *md, count = 0; p; p = p->next, count++)
-   {
+  {
     if (! (p && p->h && !p->header_parsed))
-     {
+    {
       last = p;
       continue;
     }
@@ -1216,23 +1216,24 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir **md,
     {
 #endif /* USE_HCACHE */
 
-    if (maildir_parse_message (ctx->magic, mutt_b2s (fn), p->h->old, p->h))
-    {
-      p->header_parsed = 1;
+      if (maildir_parse_message (ctx->magic, mutt_b2s (fn), p->h->old, p->h))
+      {
+        p->header_parsed = 1;
 #if USE_HCACHE
-      if (ctx->magic == MUTT_MH)
-       mutt_hcache_store (hc, p->h->path, p->h, 0, strlen, MUTT_GENERATE_UIDVALIDITY);
-      else
-       mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen, MUTT_GENERATE_UIDVALIDITY);
+        if (ctx->magic == MUTT_MH)
+          mutt_hcache_store (hc, p->h->path, p->h, 0, strlen, MUTT_GENERATE_UIDVALIDITY);
+        else
+          mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen, MUTT_GENERATE_UIDVALIDITY);
 #endif
-    } else
-      mutt_free_header (&p->h);
+      }
+      else
+        mutt_free_header (&p->h);
 #if USE_HCACHE
     }
     mutt_hcache_free (&data);
 #endif
     last = p;
-   }
+  }
 #if USE_HCACHE
   mutt_hcache_close (hc);
 #endif
@@ -1543,8 +1544,8 @@ static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr
   FOREVER
   {
     mutt_buffer_printf (path, "%s/tmp/%s.%lld.%u_%d.%s%s",
-             dest->path, subdir, (long long)time (NULL), (unsigned int)getpid (),
-             Counter++, NONULL (Hostname), suffix);
+                        dest->path, subdir, (long long)time (NULL), (unsigned int)getpid (),
+                        Counter++, NONULL (Hostname), suffix);
 
     dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
                mutt_b2s (path)));
@@ -1636,8 +1637,8 @@ static int _maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr)
   FOREVER
   {
     mutt_buffer_printf (path, "%s/%lld.%u_%d.%s%s", subdir,
-             (long long)time (NULL), (unsigned int)getpid (), Counter++,
-             NONULL (Hostname), suffix);
+                        (long long)time (NULL), (unsigned int)getpid (), Counter++,
+                        NONULL (Hostname), suffix);
     mutt_buffer_printf (full, "%s/%s", ctx->path, mutt_b2s (path));
 
     dprint (2, (debugfile, "_maildir_commit_message (): renaming %s to %s.\n",
@@ -2033,7 +2034,7 @@ int mh_sync_mailbox (CONTEXT * ctx, int *index_hint)
        if (*ctx->hdrs[i]->path != ',')
        {
          mutt_buffer_printf (tmp, "%s/,%s", ctx->path,
-                   ctx->hdrs[i]->path);
+                              ctx->hdrs[i]->path);
          unlink (mutt_b2s (tmp));
          rename (mutt_b2s (path), mutt_b2s (tmp));
        }
@@ -2551,7 +2552,7 @@ static int mh_save_to_header_cache (CONTEXT *ctx, HEADER *h)
  */
 
 static FILE *_maildir_open_find_message (const char *folder, const char *unique,
-                                 const char *subfolder)
+                                         const char *subfolder)
 {
   BUFFER *dir = mutt_buffer_pool_get ();
   BUFFER *tunique = mutt_buffer_pool_get ();
@@ -2578,7 +2579,7 @@ static FILE *_maildir_open_find_message (const char *folder, const char *unique,
     if (!mutt_strcmp (mutt_b2s (tunique), unique))
     {
       mutt_buffer_printf (fname, "%s/%s/%s", folder, subfolder,
-               de->d_name);
+                          de->d_name);
       fp = fopen (mutt_b2s (fname), "r");      /* __FOPEN_CHECKED__ */
       oe = errno;
       break;
@@ -2607,10 +2608,8 @@ FILE *maildir_open_find_message (const char *folder, const char *msg)
   unique = mutt_buffer_pool_get ();
   maildir_canon_filename (unique, msg);
 
-  if (
-      (fp =
-       _maildir_open_find_message (folder, mutt_b2s (unique),
-                                  new_hits > cur_hits ? "new" : "cur"))
+  if ((fp = _maildir_open_find_message (folder, mutt_b2s (unique),
+                                        new_hits > cur_hits ? "new" : "cur"))
       || errno != ENOENT)
   {
     if (new_hits < UINT_MAX && cur_hits < UINT_MAX)
@@ -2621,10 +2620,8 @@ FILE *maildir_open_find_message (const char *folder, const char *msg)
 
     goto cleanup;
   }
-  if (
-      (fp =
-       _maildir_open_find_message (folder, mutt_b2s (unique),
-                                  new_hits > cur_hits ? "cur" : "new"))
+  if ((fp = _maildir_open_find_message (folder, mutt_b2s (unique),
+                                        new_hits > cur_hits ? "cur" : "new"))
       || errno != ENOENT)
   {
     if (new_hits < UINT_MAX && cur_hits < UINT_MAX)
@@ -2668,7 +2665,7 @@ int maildir_check_empty (const char *path)
      * find old messages without having to scan both subdirs
      */
     mutt_buffer_printf (realpath, "%s/%s", path,
-             iter == 0 ? "cur" : "new");
+                        iter == 0 ? "cur" : "new");
     if ((dp = opendir (mutt_b2s (realpath))) == NULL)
     {
       r = -1;
diff --git a/mime.h b/mime.h
index 379133d22b98ca128001458e5b4284010f20a2bc..dd8655f3a17efff55a382c1d4fe2bc4677635e56 100644 (file)
--- a/mime.h
+++ b/mime.h
@@ -63,10 +63,10 @@ extern const char B64Chars[];
 #define hexval(c) Index_hex[(unsigned int)(c)]
 #define base64val(c) Index_64[(unsigned int)(c)]
 
-#define is_multipart(x) \
-    ((x)->type == TYPEMULTIPART \
-     || ((x)->type == TYPEMESSAGE && (!strcasecmp((x)->subtype, "rfc822") \
-                                     || !strcasecmp((x)->subtype, "news"))))
+#define is_multipart(x)                                                 \
+  ((x)->type == TYPEMULTIPART                                           \
+    || ((x)->type == TYPEMESSAGE && (!strcasecmp((x)->subtype, "rfc822") \
+    || !strcasecmp((x)->subtype, "news"))))
 
 extern const char *BodyTypes[];
 extern const char *BodyEncodings[];
index 55d907f0bd6573d56de6cbfa98c42533afd7157a..d576bdadf61868d49ca567a48b6983c0c7207bef 100644 (file)
--- a/mkdtemp.c
+++ b/mkdtemp.c
@@ -9,37 +9,37 @@
 /* mkdtemp function for systems which don't have one */
 char *mkdtemp (char *tmpl)
 {
-    static const char LETTERS[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-    static long       value = 0;
-    long              v;
-    int               len;
-    int               i, j;
+  static const char LETTERS[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+  static long       value = 0;
+  long              v;
+  int               len;
+  int               i, j;
 
-    len = strlen (tmpl);
-    if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX") != 0)
-    {
-        errno = EINVAL;
-        return NULL;
-    }
+  len = strlen (tmpl);
+  if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX") != 0)
+  {
+    errno = EINVAL;
+    return NULL;
+  }
 
-    value += ((long) time (NULL)) ^ getpid ();
+  value += ((long) time (NULL)) ^ getpid ();
 
-    for (i = 0; i < 7 ; ++i, value += 7777)
+  for (i = 0; i < 7 ; ++i, value += 7777)
+  {
+    /* fill in the random bits */
+    for (j = 0, v = value; j < 6; ++j)
     {
-        /* fill in the random bits */
-        for (j = 0, v = value; j < 6; ++j)
-        {
-            tmpl[(len - 6) + j] = LETTERS[v % 62];
-            v /= 62;
-        }
-
-        /* try to create the directory */
-        if (mkdir (tmpl, 0700) == 0)
-            return tmpl;
-        else if (errno != EEXIST)
-            return NULL;
+      tmpl[(len - 6) + j] = LETTERS[v % 62];
+      v /= 62;
     }
 
-    errno = EEXIST;
-    return NULL;
+    /* try to create the directory */
+    if (mkdir (tmpl, 0700) == 0)
+      return tmpl;
+    else if (errno != EEXIST)
+      return NULL;
+  }
+
+  errno = EEXIST;
+  return NULL;
 }
diff --git a/mutt.h b/mutt.h
index 8dcf0a81c2b9a8458e0afb5b1bd56acee65afafe..004f4b485edd2939fe6ee30837443c470853fb75 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -762,10 +762,9 @@ typedef struct body
   unsigned int deleted : 1;    /* attachment marked for deletion */
 
   unsigned int noconv : 1;     /* don't do character set conversion */
-  unsigned int force_charset : 1;
-                               /* send mode: don't adjust the character
-                                * set when in send-mode.
-                                */
+  unsigned int force_charset : 1;  /* send mode: don't adjust the character
+                                    * set when in send-mode.
+                                    */
   unsigned int is_signed_data : 1; /* A lot of MUAs don't indicate
                                       S/MIME signed-data correctly,
                                       e.g. they use foo.p7m even for
@@ -793,7 +792,7 @@ typedef struct mutt_thread THREAD;
 typedef struct header
 {
   unsigned int security : 12;  /* bit 0-8: flags, bit 9,10: application.
-                                see: mutt_crypt.h pgplib.h, smime.h */
+                                  see: mutt_crypt.h pgplib.h, smime.h */
 
   unsigned int mime : 1;               /* has a MIME-Version header? */
   unsigned int flagged : 1;            /* marked important? */
index 76ace46514fa87249fd0c90c8abe43389f4212a8..6b11b3246cf5579feeb1d7aab5c288f7f4835479 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 /*
-   Common definitions and prototypes for the crypt functions. They are
-   all defined in crypt.c and cryptglue.c
+  Common definitions and prototypes for the crypt functions. They are
+  all defined in crypt.c and cryptglue.c
 */
 
 #ifndef MUTT_CRYPT_H
@@ -180,7 +180,7 @@ int crypt_write_signed(BODY *a, STATE *s, const char *tempf);
    *ppl     Start of long key ID if detected, else NULL.
    *pps     Start of short key ID if detected, else NULL. */
 const char* crypt_get_fingerprint_or_id (char *p, const char **pphint,
-    const char **ppl, const char **pps);
+                                         const char **ppl, const char **pps);
 
 /* Check if a string contains a numerical key */
 short crypt_is_numerical_keyid (const char *s);
index d4b2d327ccafa5a40408714a901902740d22e4ee..119a49279500373da89c0e9e12a2f5c554fe442c 100644 (file)
@@ -320,10 +320,10 @@ void mutt_env_to_local (ENVELOPE *e)
  * by preprocessor at the macro-expansion time.
  * Note that #a escapes and double quotes the argument.
  */
-#define H_TO_INTL(a)   \
-  if (mutt_addrlist_to_intl (env->a, err) && !e) \
-  { \
-     if (tag) *tag = #a; e = 1; err = NULL; \
+#define H_TO_INTL(a)                                    \
+  if (mutt_addrlist_to_intl (env->a, err) && !e)        \
+  {                                                     \
+    if (tag) *tag = #a; e = 1; err = NULL;              \
   }
 
 int mutt_env_to_intl (ENVELOPE *env, char **tag, char **err)
index 3980cc41f02e9c1ca7022e11e9198b45edc11e78..806fefecbd125c68ce06dad4974c0cb300d9877c 100644 (file)
@@ -39,38 +39,38 @@ static int getnameinfo_err(int ret)
   dprint (1, (debugfile, "getnameinfo: "));
   switch(ret)
   {
-     case EAI_AGAIN:
-       dprint (1, (debugfile, "The name could not be resolved at this time.  Future attempts may succeed.\n"));
-       err=SASL_TRYAGAIN;
-       break;
-     case EAI_BADFLAGS:
-       dprint (1, (debugfile, "The flags had an invalid value.\n"));
-       err=SASL_BADPARAM;
-       break;
-     case EAI_FAIL:
-       dprint (1, (debugfile, "A non-recoverable error occurred.\n"));
-       err=SASL_FAIL;
-       break;
-     case EAI_FAMILY:
-       dprint (1, (debugfile, "The address family was not recognized or the address length was invalid for the specified family.\n"));
-       err=SASL_BADPROT;
-       break;
-     case EAI_MEMORY:
-       dprint (1, (debugfile, "There was a memory allocation failure.\n"));
-       err=SASL_NOMEM;
-       break;
-     case EAI_NONAME:
-       dprint (1, (debugfile, "The name does not resolve for the supplied parameters.  NI_NAMEREQD is set and the host's name cannot be located, or both nodename and servname were null.\n"));
-       err=SASL_FAIL; /* no real equivalent */
-       break;
-     case EAI_SYSTEM:
-       dprint (1, (debugfile, "A system error occurred.  The error code can be found in errno(%d,%s)).\n",errno,strerror(errno)));
-       err=SASL_FAIL; /* no real equivalent */
-       break;
-     default:
-       dprint (1, (debugfile, "Unknown error %d\n",ret));
-       err=SASL_FAIL; /* no real equivalent */
-       break;
+    case EAI_AGAIN:
+      dprint (1, (debugfile, "The name could not be resolved at this time.  Future attempts may succeed.\n"));
+      err=SASL_TRYAGAIN;
+      break;
+    case EAI_BADFLAGS:
+      dprint (1, (debugfile, "The flags had an invalid value.\n"));
+      err=SASL_BADPARAM;
+      break;
+    case EAI_FAIL:
+      dprint (1, (debugfile, "A non-recoverable error occurred.\n"));
+      err=SASL_FAIL;
+      break;
+    case EAI_FAMILY:
+      dprint (1, (debugfile, "The address family was not recognized or the address length was invalid for the specified family.\n"));
+      err=SASL_BADPROT;
+      break;
+    case EAI_MEMORY:
+      dprint (1, (debugfile, "There was a memory allocation failure.\n"));
+      err=SASL_NOMEM;
+      break;
+    case EAI_NONAME:
+      dprint (1, (debugfile, "The name does not resolve for the supplied parameters.  NI_NAMEREQD is set and the host's name cannot be located, or both nodename and servname were null.\n"));
+      err=SASL_FAIL; /* no real equivalent */
+      break;
+    case EAI_SYSTEM:
+      dprint (1, (debugfile, "A system error occurred.  The error code can be found in errno(%d,%s)).\n",errno,strerror(errno)));
+      err=SASL_FAIL; /* no real equivalent */
+      break;
+    default:
+      dprint (1, (debugfile, "Unknown error %d\n",ret));
+      err=SASL_FAIL; /* no real equivalent */
+      break;
   }
   return err;
 }
@@ -91,16 +91,16 @@ static int mutt_sasl_start (void);
 /* callbacks */
 static int mutt_sasl_cb_log (void* context, int priority, const char* message);
 static int mutt_sasl_cb_authname (void* context, int id, const char** result,
-  unsigned int* len);
+                                  unsigned int* len);
 static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* context, int id,
-  sasl_secret_t** psecret);
+                              sasl_secret_t** psecret);
 
 /* socket wrappers for a SASL security layer */
 static int mutt_sasl_conn_open (CONNECTION* conn);
 static int mutt_sasl_conn_close (CONNECTION* conn);
 static int mutt_sasl_conn_read (CONNECTION* conn, char* buf, size_t len);
 static int mutt_sasl_conn_write (CONNECTION* conn, const char* buf,
-  size_t count);
+                                 size_t count);
 static int mutt_sasl_conn_poll (CONNECTION* conn, time_t wait_secs);
 
 /* utility function, stolen from sasl2 sample code */
@@ -223,7 +223,7 @@ int mutt_sasl_client_new (CONNECTION* conn, sasl_conn_t** saslconn)
              NONULL(prp)));
 
   rc = sasl_client_new (service, conn->account.host, plp, prp,
-    mutt_sasl_get_callbacks (&conn->account), 0, saslconn);
+                        mutt_sasl_get_callbacks (&conn->account), 0, saslconn);
 
   if (rc != SASL_OK)
   {
@@ -395,7 +395,7 @@ void mutt_sasl_done (void)
 
 /* mutt_sasl_cb_authname: callback to retrieve authname or user from ACCOUNT */
 static int mutt_sasl_cb_authname (void* context, int id, const char** result,
-  unsigned* len)
+                                  unsigned* len)
 {
   ACCOUNT* account = (ACCOUNT*) context;
 
@@ -433,7 +433,7 @@ static int mutt_sasl_cb_authname (void* context, int id, const char** result,
 }
 
 static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* context, int id,
-  sasl_secret_t** psecret)
+                              sasl_secret_t** psecret)
 {
   ACCOUNT* account = (ACCOUNT*) context;
   int len;
@@ -442,8 +442,8 @@ static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* context, int id,
     return SASL_BADPARAM;
 
   dprint (2, (debugfile,
-    "mutt_sasl_cb_pass: getting password for %s@%s:%u\n", account->login,
-    account->host, account->port));
+              "mutt_sasl_cb_pass: getting password for %s@%s:%u\n", account->login,
+              account->host, account->port));
 
   if (mutt_account_getpass (account))
     return SASL_FAIL;
@@ -539,11 +539,11 @@ static int mutt_sasl_conn_read (CONNECTION* conn, char* buf, size_t len)
        goto out;
 
       rc = sasl_decode (sasldata->saslconn, buf, rc, &sasldata->buf,
-        &sasldata->blen);
+                        &sasldata->blen);
       if (rc != SASL_OK)
       {
        dprint (1, (debugfile, "SASL decode failed: %s\n",
-          sasl_errstring (rc, NULL, NULL)));
+                    sasl_errstring (rc, NULL, NULL)));
        goto out;
       }
     }
@@ -560,14 +560,14 @@ static int mutt_sasl_conn_read (CONNECTION* conn, char* buf, size_t len)
   else
     rc = (sasldata->msasl_read) (conn, buf, len);
 
-  out:
-    conn->sockdata = sasldata;
+out:
+  conn->sockdata = sasldata;
 
-    return rc;
+  return rc;
 }
 
 static int mutt_sasl_conn_write (CONNECTION* conn, const char* buf,
-  size_t len)
+                                 size_t len)
 {
   SASL_DATA* sasldata;
   int rc;
@@ -590,7 +590,7 @@ static int mutt_sasl_conn_write (CONNECTION* conn, const char* buf,
       if (rc != SASL_OK)
       {
        dprint (1, (debugfile, "SASL encoding failed: %s\n",
-          sasl_errstring (rc, NULL, NULL)));
+                    sasl_errstring (rc, NULL, NULL)));
        goto fail;
       }
 
@@ -604,14 +604,14 @@ static int mutt_sasl_conn_write (CONNECTION* conn, const char* buf,
     while (len > *sasldata->pbufsize);
   }
   else
-  /* just write using the underlying socket function */
+    /* just write using the underlying socket function */
     rc = (sasldata->msasl_write) (conn, buf, len);
 
   conn->sockdata = sasldata;
 
   return rc;
 
- fail:
+fail:
   conn->sockdata = sasldata;
   return -1;
 }
index 5312d382b9bb21003bd87e6da4f020d867c07661..4e189bb7ea9e3ce81cf12ef354fd58e271fa38e3 100644 (file)
@@ -361,7 +361,7 @@ static int socket_connect (int fd, struct sockaddr* sa)
   }
 
   if (ConnectTimeout > 0)
-      alarm (ConnectTimeout);
+    alarm (ConnectTimeout);
 
   mutt_allow_interrupt (1);
 
@@ -375,13 +375,13 @@ static int socket_connect (int fd, struct sockaddr* sa)
 
   if (connect (fd, sa, sa_size) < 0)
   {
-      save_errno = errno;
-      dprint (2, (debugfile, "Connection failed. errno: %d...\n", errno));
-      SigInt = 0;      /* reset in case we caught SIGINTR while in connect() */
+    save_errno = errno;
+    dprint (2, (debugfile, "Connection failed. errno: %d...\n", errno));
+    SigInt = 0;        /* reset in case we caught SIGINTR while in connect() */
   }
 
   if (ConnectTimeout > 0)
-      alarm (0);
+    alarm (0);
   mutt_allow_interrupt (0);
   sigprocmask (SIG_UNBLOCK, &set, NULL);
 
@@ -574,7 +574,7 @@ int raw_socket_open (CONNECTION* conn)
   he = gethostbyname (host_idna);
 
 # if defined(HAVE_LIBIDN) || defined(HAVE_LIBIDN2)
-    FREE (&host_idna);
+  FREE (&host_idna);
 # endif
 
   if (! he) {
@@ -609,7 +609,7 @@ int raw_socket_open (CONNECTION* conn)
   if (rc)
   {
     mutt_error (_("Could not connect to %s (%s)."), conn->account.host,
-           (rc > 0) ? strerror (rc) : _("unknown error"));
+                (rc > 0) ? strerror (rc) : _("unknown error"));
     mutt_sleep (2);
     return -1;
   }
index 37e5471c1768fd72cee2c4467c73dab072d5a825..8525e9d8a902e58f241df08dbe824177fbecb22c 100644 (file)
@@ -133,7 +133,7 @@ static int ssl_load_certificates (SSL_CTX *ctx)
         (X509_cmp_current_time (X509_get0_notAfter (cert)) <= 0))
     {
       dprint (2, (debugfile, "ssl_load_certificates: filtering expired cert: %s\n",
-              X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf))));
+                  X509_NAME_oneline (X509_get_subject_name (cert), buf, sizeof (buf))));
     }
     else
     {
@@ -280,19 +280,19 @@ int mutt_ssl_starttls (CONNECTION* conn)
   conn->conn_close = tls_close;
 
   conn->ssf = SSL_CIPHER_get_bits (SSL_get_current_cipher (ssldata->ssl),
-    &maxbits);
+                                   &maxbits);
 
   return 0;
 
- bail_ssl:
+bail_ssl:
   SSL_free (ssldata->ssl);
   ssldata->ssl = 0;
- bail_ctx:
+bail_ctx:
   SSL_CTX_free (ssldata->ctx);
   ssldata->ctx = 0;
- bail_ssldata:
+bail_ssldata:
   FREE (&ssldata);
- bail:
+bail:
   return -1;
 }
 
@@ -525,7 +525,7 @@ static int ssl_socket_open (CONNECTION * conn)
   data->isopen = 1;
 
   conn->ssf = SSL_CIPHER_get_bits (SSL_get_current_cipher (data->ssl),
-    &maxbits);
+                                   &maxbits);
 
   return 0;
 }
@@ -579,14 +579,14 @@ static int ssl_negotiate (CONNECTION *conn, sslsockdata* ssldata)
   {
     switch (SSL_get_error (ssldata->ssl, err))
     {
-    case SSL_ERROR_SYSCALL:
-      errmsg = _("I/O error");
-      break;
-    case SSL_ERROR_SSL:
-      errmsg = ERR_error_string (ERR_get_error (), NULL);
-      break;
-    default:
-      errmsg = _("unknown error");
+      case SSL_ERROR_SYSCALL:
+        errmsg = _("I/O error");
+        break;
+      case SSL_ERROR_SSL:
+        errmsg = ERR_error_string (ERR_get_error (), NULL);
+        break;
+      default:
+        errmsg = _("unknown error");
     }
 
     mutt_error (_("SSL failed: %s"), errmsg);
@@ -600,7 +600,9 @@ static int ssl_negotiate (CONNECTION *conn, sslsockdata* ssldata)
      %2$s is cipher_version (e.g. "TLSv1/SSLv3")
      %3$s is cipher_name (e.g. "ECDHE-RSA-AES128-GCM-SHA256") */
   mutt_message (_("%s connection using %s (%s)"),
-    SSL_get_version(ssldata->ssl), SSL_get_cipher_version (ssldata->ssl), SSL_get_cipher_name (ssldata->ssl));
+                SSL_get_version(ssldata->ssl),
+                SSL_get_cipher_version (ssldata->ssl),
+                SSL_get_cipher_name (ssldata->ssl));
   mutt_sleep (0);
 
   return 0;
@@ -646,51 +648,51 @@ static void ssl_err (sslsockdata *data, int err)
 
   switch (SSL_get_error (data->ssl, err))
   {
-  case SSL_ERROR_NONE:
-    return;
-  case SSL_ERROR_ZERO_RETURN:
-    errmsg = "SSL connection closed";
-    data->isopen = 0;
-    break;
-  case SSL_ERROR_WANT_READ:
-    errmsg = "retry read";
-    break;
-  case SSL_ERROR_WANT_WRITE:
-    errmsg = "retry write";
-    break;
-  case SSL_ERROR_WANT_CONNECT:
-    errmsg = "retry connect";
-    break;
-  case SSL_ERROR_WANT_ACCEPT:
-    errmsg = "retry accept";
-    break;
-  case SSL_ERROR_WANT_X509_LOOKUP:
-    errmsg = "retry x509 lookup";
-    break;
-  case SSL_ERROR_SYSCALL:
-    errmsg = "I/O error";
-    data->isopen = 0;
-    break;
-  case SSL_ERROR_SSL:
-    sslerr = ERR_get_error ();
-    switch (sslerr)
-    {
-    case 0:
-      switch (err)
+    case SSL_ERROR_NONE:
+      return;
+    case SSL_ERROR_ZERO_RETURN:
+      errmsg = "SSL connection closed";
+      data->isopen = 0;
+      break;
+    case SSL_ERROR_WANT_READ:
+      errmsg = "retry read";
+      break;
+    case SSL_ERROR_WANT_WRITE:
+      errmsg = "retry write";
+      break;
+    case SSL_ERROR_WANT_CONNECT:
+      errmsg = "retry connect";
+      break;
+    case SSL_ERROR_WANT_ACCEPT:
+      errmsg = "retry accept";
+      break;
+    case SSL_ERROR_WANT_X509_LOOKUP:
+      errmsg = "retry x509 lookup";
+      break;
+    case SSL_ERROR_SYSCALL:
+      errmsg = "I/O error";
+      data->isopen = 0;
+      break;
+    case SSL_ERROR_SSL:
+      sslerr = ERR_get_error ();
+      switch (sslerr)
       {
-      case 0:
-       errmsg = "EOF";
-       break;
-      default:
-       errmsg = strerror(errno);
+        case 0:
+          switch (err)
+          {
+            case 0:
+              errmsg = "EOF";
+              break;
+            default:
+              errmsg = strerror(errno);
+          }
+          break;
+        default:
+          errmsg = ERR_error_string (sslerr, NULL);
       }
       break;
     default:
-      errmsg = ERR_error_string (sslerr, NULL);
-    }
-    break;
-  default:
-    errmsg = "unknown error";
+      errmsg = "unknown error";
   }
 
   dprint (1, (debugfile, "SSL error: %s\n", errmsg));
@@ -771,14 +773,14 @@ static char *asn1time_to_string (ASN1_UTCTIME *tm)
 }
 
 static int compare_certificates (X509 *cert, X509 *peercert,
-  unsigned char *peermd, unsigned int peermdlen)
+                                 unsigned char *peermd, unsigned int peermdlen)
 {
   unsigned char md[EVP_MAX_MD_SIZE];
   unsigned int mdlen;
 
   /* Avoid CPU-intensive digest calculation if the certificates are
-    * not even remotely equal.
-    */
+   * not even remotely equal.
+   */
   if (X509_subject_name_cmp (cert, peercert) != 0 ||
       X509_issuer_name_cmp (cert, peercert) != 0)
     return -1;
@@ -1149,12 +1151,12 @@ static int ssl_verify_callback (int preverify_ok, X509_STORE_CTX *ctx)
     {
       int err = X509_STORE_CTX_get_error (ctx);
       snprintf (buf, sizeof (buf), "%s (%d)",
-         X509_verify_cert_error_string (err), err);
+                X509_verify_cert_error_string (err), err);
       dprint (2, (debugfile, "X509_verify_cert: %s\n", buf));
     }
 #endif
 
-   /* prompt user */
+    /* prompt user */
     return interactive_check_cert (cert, pos, len, ssl, 1);
   }
 
@@ -1208,9 +1210,9 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a
   row++;
   snprintf (menu->dialog[row++], SHORT_STRING, "%s", _("This certificate is valid"));
   snprintf (menu->dialog[row++], SHORT_STRING, _("   from %s"),
-      asn1time_to_string (X509_getm_notBefore (cert)));
+            asn1time_to_string (X509_getm_notBefore (cert)));
   snprintf (menu->dialog[row++], SHORT_STRING, _("     to %s"),
-      asn1time_to_string (X509_getm_notAfter (cert)));
+            asn1time_to_string (X509_getm_notAfter (cert)));
 
   row++;
   buf[0] = '\0';
@@ -1243,8 +1245,8 @@ static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int a
    * to also scan the certificate file here.
    */
   allow_always = allow_always &&
-                 SslCertFile &&
-                 check_certificate_expiration (cert, 1);
+    SslCertFile &&
+    check_certificate_expiration (cert, 1);
 
   /* L10N:
    * These four letters correspond to the choices in the next four strings:
index bc9460d9a07e3ede9f91b8853b96050e0a67235b..0f9fde57ef087fc0ec2379c5e9dbdf6acb753c51 100644 (file)
@@ -480,7 +480,7 @@ static int tls_negotiate (CONNECTION * conn)
 
   return 0;
 
- fail:
+fail:
   gnutls_certificate_free_credentials (data->xcred);
   gnutls_deinit (data->state);
   FREE(&conn->sockdata);
@@ -815,7 +815,7 @@ static int tls_check_one_certificate (const gnutls_datum_t *certdata,
   int i, row, done, ret;
 
   if (!tls_check_preauth (certdata, certstat, hostname, idx, &certerr,
-      &savedcert))
+                          &savedcert))
     return 1;
 
   /* interactive check from user */
@@ -980,29 +980,29 @@ static int tls_check_one_certificate (const gnutls_datum_t *certdata,
             len - idx, len);
   menu->title = title;
   /* certificates with bad dates, or that are revoked, must be
-   accepted manually each and every time */
+     accepted manually each and every time */
   if (SslCertFile && !savedcert
-        && !(certerr & (CERTERR_EXPIRED | CERTERR_NOTYETVALID
-                        | CERTERR_REVOKED)))
+      && !(certerr & (CERTERR_EXPIRED | CERTERR_NOTYETVALID
+                      | CERTERR_REVOKED)))
   {
     menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always");
-  /* L10N:
-   * These three letters correspond to the choices in the string:
-   * (r)eject, accept (o)nce, (a)ccept always.
-   * This is an interactive certificate confirmation prompt for
-   * a GNUTLS connection.
-   */
+    /* L10N:
+     * These three letters correspond to the choices in the string:
+     * (r)eject, accept (o)nce, (a)ccept always.
+     * This is an interactive certificate confirmation prompt for
+     * a GNUTLS connection.
+     */
     menu->keys = _("roa");
   }
   else
   {
     menu->prompt = _("(r)eject, accept (o)nce");
-  /* L10N:
-   * These two letters correspond to the choices in the string:
-   * (r)eject, accept (o)nce.
-   * These is an interactive certificate confirmation prompt for
-   * a GNUTLS connection.
-   */
+    /* L10N:
+     * These two letters correspond to the choices in the string:
+     * (r)eject, accept (o)nce.
+     * These is an interactive certificate confirmation prompt for
+     * a GNUTLS connection.
+     */
     menu->keys = _("ro");
   }
 
index 0418d4523837945928198b6534cdc6b057e8f5bc..7f844331445d36211a5f621090088aa2ad644ad8 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -81,7 +81,7 @@ void mutt_buffer_adv_mktemp (BUFFER *buf)
     }
     mutt_buffer_mktemp_pfx_sfx (buf, mutt_b2s (prefix), suffix);
 
-out:
+  out:
     mutt_buffer_pool_release (&prefix);
   }
 }
@@ -207,7 +207,7 @@ void mutt_free_body (BODY **p)
       if (b->unlink)
        unlink (b->filename);
       dprint (1, (debugfile, "mutt_free_body: %sunlinking %s.\n",
-           b->unlink ? "" : "not ", b->filename));
+                  b->unlink ? "" : "not ", b->filename));
     }
 
     FREE (&b->filename);
@@ -497,10 +497,10 @@ char *_mutt_expand_path (char *s, size_t slen, int rx)
          strfcpy (p, NONULL (Maildir), sizeof (p));
        else
 #endif
-       if (Maildir && *Maildir && Maildir[strlen (Maildir) - 1] == '/')
-         strfcpy (p, NONULL (Maildir), sizeof (p));
-       else
-         snprintf (p, sizeof (p), "%s/", NONULL (Maildir));
+          if (Maildir && *Maildir && Maildir[strlen (Maildir) - 1] == '/')
+            strfcpy (p, NONULL (Maildir), sizeof (p));
+          else
+            snprintf (p, sizeof (p), "%s/", NONULL (Maildir));
 
        tail = s + 1;
       }
@@ -785,8 +785,8 @@ void mutt_free_envelope (ENVELOPE **p)
 void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra)
 {
   /* copies each existing element if necessary, and sets the element
-  * to NULL in the source so that mutt_free_envelope doesn't leave us
-  * with dangling pointers. */
+   * to NULL in the source so that mutt_free_envelope doesn't leave us
+   * with dangling pointers. */
 #define MOVE_ELEM(h) if (!base->h) { base->h = (*extra)->h; (*extra)->h = NULL; }
   MOVE_ELEM(return_path);
   MOVE_ELEM(from);
@@ -824,7 +824,7 @@ void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra)
     (*extra)->disp_subj = NULL;
   }
   /* spam and user headers should never be hashed, and the new envelope may
-    * have better values. Use new versions regardless. */
+   * have better values. Use new versions regardless. */
   mutt_buffer_free (&base->spam);
   mutt_free_list (&base->userhdrs);
   MOVE_ELEM(spam);
@@ -838,9 +838,9 @@ void _mutt_buffer_mktemp (BUFFER *buf, const char *prefix, const char *suffix,
                           const char *src, int line)
 {
   mutt_buffer_printf (buf, "%s/%s-%s-%d-%d-%ld%ld%s%s",
-      NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
-      (int) getuid (), (int) getpid (), random (), random (),
-      suffix ? "." : "", NONULL (suffix));
+                      NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
+                      (int) getuid (), (int) getpid (), random (), random (),
+                      suffix ? "." : "", NONULL (suffix));
   dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, mutt_b2s (buf)));
   if (unlink (mutt_b2s (buf)) && errno != ENOENT)
     dprint (1, (debugfile, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n",
@@ -851,12 +851,12 @@ 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-%ld%ld%s%s",
-      NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
-      (int) getuid (), (int) getpid (), random (), random (),
-      suffix ? "." : "", NONULL (suffix));
+                       NONULL (Tempdir), NONULL (prefix), NONULL (Hostname),
+                       (int) getuid (), (int) getpid (), random (), random (),
+                       suffix ? "." : "", NONULL (suffix));
   if (n >= slen)
     dprint (1, (debugfile, "%s:%d: ERROR: insufficient buffer space to hold temporary filename! slen=%zu but need %zu\n",
-           src, line, slen, n));
+                src, line, slen, n));
   dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s));
   if (unlink (s) && errno != ENOENT)
     dprint (1, (debugfile, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, line, s, strerror (errno), errno));
@@ -1032,7 +1032,7 @@ void mutt_expand_fmt (char *dest, size_t destlen, const char *fmt, const char *s
 
 /* return 0 on success, -1 on abort, 1 on error */
 int mutt_check_overwrite (const char *attname, const char *path,
-                               char *fname, size_t flen, int *append, char **directory)
+                          char *fname, size_t flen, int *append, char **directory)
 {
   int rc = 0;
   char tmp[_POSIX_PATH_MAX];
@@ -1048,9 +1048,9 @@ int mutt_check_overwrite (const char *attname, const char *path,
     if (directory)
     {
       switch (mutt_multi_choice
-      /* L10N:
-         Means "The path you specified as the destination file is a directory."
-         See the msgid "Save to file: " (alias.c, recvattach.c) */
+              /* L10N:
+                 Means "The path you specified as the destination file is a directory."
+                 See the msgid "Save to file: " (alias.c, recvattach.c) */
              (_("File is a directory, save under it? [(y)es, (n)o, (a)ll]"), _("yna")))
       {
        case 3:         /* all */
@@ -1075,7 +1075,7 @@ int mutt_check_overwrite (const char *attname, const char *path,
 
     strfcpy (tmp, mutt_basename (NONULL (attname)), sizeof (tmp));
     if (mutt_get_field (_("File under directory: "), tmp, sizeof (tmp),
-                                    MUTT_FILE | MUTT_CLEAR) != 0 || !tmp[0])
+                        MUTT_FILE | MUTT_CLEAR) != 0 || !tmp[0])
       return (-1);
     mutt_concat_path (fname, path, tmp, flen);
   }
@@ -1571,7 +1571,7 @@ void mutt_FormatString (char *dest,               /* output buffer */
          char *p = buf;
          for (; *p; p++)
            if (*p == '.')
-               *p = '_';
+              *p = '_';
        }
 
        if ((len = mutt_strlen (buf)) + wlen > destlen)
diff --git a/mx.c b/mx.c
index 6a9c189acaec357c52b48856b3d803c7a6568495..11e0d365f4b6eff21fe2f9ed164a4f9b6ffa31d9 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -672,9 +672,9 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
 {
   int i;
 #ifdef HAVE_UTIMENSAT
-    struct timespec ts[2];
+  struct timespec ts[2];
 #else
-    struct utimbuf ut;
+  struct utimbuf ut;
 #endif /* HAVE_UTIMENSAT */
 
   if(!ctx)
@@ -879,7 +879,7 @@ int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
   if (ctx->deleted && !(ctx->magic == MUTT_MAILDIR && option (OPTMAILDIRTRASH)))
   {
     snprintf (buf, sizeof (buf), ctx->deleted == 1
-            ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
+              ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
              ctx->deleted);
     if ((purge = query_quadoption (OPT_DELETE, buf)) < 0)
     {
@@ -1015,10 +1015,10 @@ int mx_close_mailbox (CONTEXT *ctx, int *index_hint)
   {
     if (move_messages)
       mutt_message (_("%d kept, %d moved, %d deleted."),
-       ctx->msgcount - ctx->deleted, read_msgs, ctx->deleted);
+                    ctx->msgcount - ctx->deleted, read_msgs, ctx->deleted);
     else
       mutt_message (_("%d kept, %d deleted."),
-       ctx->msgcount - ctx->deleted, ctx->deleted);
+                    ctx->msgcount - ctx->deleted, ctx->deleted);
   }
 
   if (ctx->msgcount == ctx->deleted &&
@@ -1084,7 +1084,7 @@ void mx_update_tables(CONTEXT *ctx, int committing)
        ctx->v2r[ctx->vcount] = j;
        ctx->hdrs[j]->virtual = ctx->vcount++;
        ctx->vsize += this_body->length + this_body->offset -
-                     this_body->hdr_offset + padding;
+          this_body->hdr_offset + padding;
       }
 
       if (committing)
@@ -1183,7 +1183,7 @@ int mx_sync_mailbox (CONTEXT *ctx, int *index_hint)
     char buf[SHORT_STRING];
 
     snprintf (buf, sizeof (buf), ctx->deleted == 1
-            ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
+              ? _("Purge %d deleted message?") : _("Purge %d deleted messages?"),
              ctx->deleted);
     if ((purge = query_quadoption (OPT_DELETE, buf)) < 0)
       return (-1);
@@ -1283,9 +1283,9 @@ MESSAGE *mx_open_new_message (CONTEXT *dest, HEADER *hdr, int flags)
 
   if (!dest->mx_ops || !dest->mx_ops->open_new_msg)
   {
-      dprint (1, (debugfile, "mx_open_new_message(): function unimplemented for mailbox type %d.\n",
-              dest->magic));
-      return NULL;
+    dprint (1, (debugfile, "mx_open_new_message(): function unimplemented for mailbox type %d.\n",
+                dest->magic));
+    return NULL;
   }
 
   msg = safe_calloc (1, sizeof (MESSAGE));
@@ -1388,7 +1388,7 @@ int mx_close_message (CONTEXT *ctx, MESSAGE **msg)
   if ((*msg)->path)
   {
     dprint (1, (debugfile, "mx_close_message (): unlinking %s\n",
-            (*msg)->path));
+                (*msg)->path));
     unlink ((*msg)->path);
     FREE (&(*msg)->path);
   }
diff --git a/pager.c b/pager.c
index 248bf1a3d713475263b66be60439926a62dfc358..1258a16c134ef9c013d69ae3929f52015d1ccea2 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -59,34 +59,38 @@ static const char *Function_not_permitted_in_attach_message_mode = N_("Function
 static int TopLine = 0;
 static HEADER *OldHdr = NULL;
 
-#define CHECK_MODE(x)  if (!(x)) \
-                       { \
-                               mutt_flushinp (); \
-                               mutt_error _(Not_available_in_this_menu); \
-                               break; \
-                       }
-
-#define CHECK_READONLY if (Context->readonly) \
-                       { \
-                               mutt_flushinp (); \
-                               mutt_error _(Mailbox_is_read_only);     \
-                               break; \
-                       }
-
-#define CHECK_ATTACH if(option(OPTATTACHMSG)) \
-                    {\
-                       mutt_flushinp (); \
-                       mutt_error _(Function_not_permitted_in_attach_message_mode); \
-                       break; \
-                    }
-
-#define CHECK_ACL(aclbit,action) \
-               if (!mutt_bit_isset(Context->rights,aclbit)) { \
-                       mutt_flushinp(); \
-        /* L10N: %s is one of the CHECK_ACL entries below. */ \
-                       mutt_error (_("%s: Operation not permitted by ACL"), action); \
-                       break; \
-               }
+#define CHECK_MODE(x)                           \
+  if (!(x))                                     \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(Not_available_in_this_menu);   \
+    break;                                      \
+  }
+
+#define CHECK_READONLY                          \
+  if (Context->readonly)                        \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(Mailbox_is_read_only);         \
+    break;                                      \
+  }
+
+#define CHECK_ATTACH                                                    \
+  if(option(OPTATTACHMSG))                                              \
+  {                                                                     \
+    mutt_flushinp ();                                                   \
+    mutt_error _(Function_not_permitted_in_attach_message_mode);        \
+    break;                                                              \
+  }
+
+#define CHECK_ACL(aclbit,action)                                        \
+  if (!mutt_bit_isset(Context->rights,aclbit))                          \
+  {                                                                     \
+    mutt_flushinp();                                                    \
+    /* L10N: %s is one of the CHECK_ACL entries below. */               \
+    mutt_error (_("%s: Operation not permitted by ACL"), action);       \
+    break;                                                              \
+  }
 
 struct q_class_t
 {
@@ -190,7 +194,7 @@ comp_syntax_t (const void *m1, const void *m2)
 
 static void
 resolve_color (struct line_t *lineInfo, int n, int cnt, int flags, int special,
-    ansi_attr *a)
+               ansi_attr *a)
 {
   int def_color;               /* color without syntax highlight */
   int color;                   /* final color */
@@ -271,17 +275,17 @@ resolve_color (struct line_t *lineInfo, int n, int cnt, int flags, int special,
        a->pair = mutt_alloc_color (a->fg, a->bg);
       color = a->pair;
       if (a->attr & ANSI_BOLD)
-         color |= A_BOLD;
+        color |= A_BOLD;
     }
     else
 #endif
       if ((special & A_BOLD) || (a->attr & ANSI_BOLD))
-    {
-      if (ColorDefs[MT_COLOR_BOLD] && !search)
-       color = ColorDefs[MT_COLOR_BOLD];
-      else
-       color ^= A_BOLD;
-    }
+      {
+        if (ColorDefs[MT_COLOR_BOLD] && !search)
+          color = ColorDefs[MT_COLOR_BOLD];
+        else
+          color ^= A_BOLD;
+      }
     if ((special & A_UNDERLINE) || (a->attr & ANSI_UNDERLINE))
     {
       if (ColorDefs[MT_COLOR_UNDERLINE] && !search)
@@ -337,7 +341,7 @@ new_class_color (struct q_class_t *class, int *q_level)
 
 static void
 shift_class_colors (struct q_class_t *QuoteList, struct q_class_t *new_class,
-                     int index, int *q_level)
+                    int index, int *q_level)
 {
   struct q_class_t * q_list;
 
@@ -543,8 +547,8 @@ classify_quote (struct q_class_t **QuoteList, const char *qptr,
              if (tmp == NULL)
              {
                /* add a node above q_list */
-               tmp = (struct q_class_t *) safe_calloc (1,
-                                           sizeof (struct q_class_t));
+               tmp = (struct q_class_t *)
+                  safe_calloc (1, sizeof (struct q_class_t));
                tmp->prefix = (char *) safe_calloc (1, length + 1);
                strncpy (tmp->prefix, qptr, length);
                tmp->length = length;
@@ -622,7 +626,7 @@ classify_quote (struct q_class_t **QuoteList, const char *qptr,
          {
            /* longer than the current prefix: try subclassing it */
            if (tmp == NULL && mutt_strncmp (tail_qptr, (q_list->prefix) + offset,
-                         q_list->length - offset) == 0)
+                                             q_list->length - offset) == 0)
            {
              /* still a subclass: go down one level */
              ptr = q_list;
@@ -749,8 +753,8 @@ mutt_is_quote_line (char *buf, regmatch_t *pmatch)
 
 static void
 resolve_types (char *buf, char *raw, struct line_t *lineInfo, int n, int last,
-               struct q_class_t **QuoteList, int *q_level, int *force_redraw,
-               int q_classify)
+               struct q_class_t **QuoteList, int *q_level, int *force_redraw,
+               int q_classify)
 {
   COLOR_LINE *color_line, *color_list;
   regmatch_t pmatch[1];
@@ -830,16 +834,16 @@ resolve_types (char *buf, char *raw, struct line_t *lineInfo, int n, int last,
           (lineInfo[i].type == MT_COLOR_NORMAL ||
            lineInfo[i].type == MT_COLOR_QUOTED ||
            lineInfo[i].type == MT_COLOR_HEADER))
+    {
+      /* oops... */
+      if (lineInfo[i].chunks)
       {
-       /* oops... */
-       if (lineInfo[i].chunks)
-       {
-         lineInfo[i].chunks = 0;
-         safe_realloc (&(lineInfo[n].syntax),
-                       sizeof (struct syntax_t));
-       }
-       lineInfo[i++].type = MT_COLOR_SIGNATURE;
+        lineInfo[i].chunks = 0;
+        safe_realloc (&(lineInfo[n].syntax),
+                      sizeof (struct syntax_t));
       }
+      lineInfo[i++].type = MT_COLOR_SIGNATURE;
+    }
   }
   else if (check_sig (buf, lineInfo, n - 1) == 0)
     lineInfo[n].type = MT_COLOR_SIGNATURE;
@@ -1360,7 +1364,7 @@ display_line (FILE *f, LOFF_T *last_pos, struct line_t **lineInfo, int n,
       }
 
       resolve_types ((char *) fmt, (char *) buf, *lineInfo, n, *last,
-                     QuoteList, q_level, force_redraw, flags & MUTT_SHOWCOLOR);
+                     QuoteList, q_level, force_redraw, flags & MUTT_SHOWCOLOR);
 
       /* avoid race condition for continuation lines when scrolling up */
       for (m = n + 1; m < *last && (*lineInfo)[m].offset && (*lineInfo)[m].continuation; m++)
@@ -1388,10 +1392,11 @@ display_line (FILE *f, LOFF_T *last_pos, struct line_t **lineInfo, int n,
       goto out;
     }
     regexec ((regex_t *) QuoteRegexp.rx, (char *) fmt, 1, pmatch, 0);
-    (*lineInfo)[n].quote = classify_quote (QuoteList,
-                           (char *) fmt + pmatch[0].rm_so,
-                           pmatch[0].rm_eo - pmatch[0].rm_so,
-                           force_redraw, q_level);
+    (*lineInfo)[n].quote =
+      classify_quote (QuoteList,
+                      (char *) fmt + pmatch[0].rm_so,
+                      pmatch[0].rm_eo - pmatch[0].rm_so,
+                      force_redraw, q_level);
   }
 
   if ((flags & MUTT_SEARCH) && !(*lineInfo)[n].continuation && (*lineInfo)[n].search_cnt == -1)
@@ -2175,7 +2180,7 @@ search_next:
            for (i = wrapped ? 0 : rd.topline + searchctx + 1; i < rd.lastLine; i++)
            {
              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                   !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
                break;
            }
 
@@ -2196,8 +2201,8 @@ search_next:
            for (i = wrapped ? rd.lastLine : rd.topline + searchctx - 1; i >= 0; i--)
            {
              if ((!rd.hideQuoted || (rd.has_types &&
-                   rd.lineInfo[i].type != MT_COLOR_QUOTED)) &&
-                   !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+                                      rd.lineInfo[i].type != MT_COLOR_QUOTED)) &&
+                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
                break;
            }
 
@@ -2291,8 +2296,8 @@ search_next:
          /* update the search pointers */
          i = 0;
          while (display_line (rd.fp, &rd.last_pos, &rd.lineInfo, i, &rd.lastLine,
-                               &rd.maxLine, MUTT_SEARCH | (flags & MUTT_PAGER_NSKIP) | (flags & MUTT_PAGER_NOWRAP),
-                               &rd.QuoteList, &rd.q_level,
+                               &rd.maxLine, MUTT_SEARCH | (flags & MUTT_PAGER_NSKIP) | (flags & MUTT_PAGER_NOWRAP),
+                               &rd.QuoteList, &rd.q_level,
                                &rd.force_redraw, &rd.SearchRE, rd.pager_window) == 0)
            i++;
 
@@ -2302,7 +2307,7 @@ search_next:
            for (i = rd.topline; i < rd.lastLine; i++)
            {
              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                   !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
                break;
            }
 
@@ -2314,7 +2319,7 @@ search_next:
            for (i = rd.topline; i >= 0; i--)
            {
              if ((!rd.hideQuoted || rd.lineInfo[i].type != MT_COLOR_QUOTED) &&
-                   !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
+                  !rd.lineInfo[i].continuation && rd.lineInfo[i].search_cnt > 0)
                break;
            }
 
@@ -2352,7 +2357,7 @@ search_next:
 
       case OP_SORT:
       case OP_SORT_REVERSE:
-        CHECK_MODE(IsHeader (extra))
+        CHECK_MODE(IsHeader (extra));
         if (mutt_select_sort ((ch == OP_SORT_REVERSE)) == 0)
         {
           set_option (OPTNEEDRESORT);
@@ -2431,8 +2436,8 @@ search_next:
          i = rd.curline;
          /* make sure the types are defined to the end of file */
          while (display_line (rd.fp, &rd.last_pos, &rd.lineInfo, i, &rd.lastLine,
-                               &rd.maxLine, rd.has_types | (flags & MUTT_PAGER_NOWRAP),
-                               &rd.QuoteList, &rd.q_level, &rd.force_redraw,
+                               &rd.maxLine, rd.has_types | (flags & MUTT_PAGER_NOWRAP),
+                               &rd.QuoteList, &rd.q_level, &rd.force_redraw,
                                &rd.SearchRE, rd.pager_window) == 0)
            i++;
          rd.topline = upNLines (rd.pager_window->rows, rd.lineInfo, rd.lastLine, rd.hideQuoted);
@@ -2456,7 +2461,7 @@ search_next:
         */
 
       case OP_BOUNCE_MESSAGE:
-       CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra))
+       CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
         CHECK_ATTACH;
         if (IsMsgAttach (extra))
          mutt_attach_bounce (extra->fp, extra->hdr,
@@ -2466,7 +2471,7 @@ search_next:
        break;
 
       case OP_RESEND:
-        CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra))
+        CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
         CHECK_ATTACH;
         if (IsMsgAttach (extra))
          mutt_attach_resend (extra->fp, extra->hdr,
@@ -2723,9 +2728,9 @@ search_next:
                               (ch == OP_SAVE) || (ch == OP_DECODE_SAVE),
                               (ch == OP_DECODE_SAVE) || (ch == OP_DECODE_COPY),
                               (ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) ||
-                              0) == 0 && (ch == OP_SAVE || ch == OP_DECODE_SAVE
-                                                || ch == OP_DECRYPT_SAVE
-                                                ))
+                              0) == 0 &&
+            (ch == OP_SAVE || ch == OP_DECODE_SAVE || ch == OP_DECRYPT_SAVE)
+          )
        {
          if (option (OPTRESOLVE))
          {
@@ -2810,7 +2815,7 @@ search_next:
          if (option (OPTRESOLVE))
          {
            rc = (ch == OP_DELETE_THREAD) ?
-                                 OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
+              OP_MAIN_NEXT_THREAD : OP_MAIN_NEXT_SUBTHREAD;
            ch = -1;
          }
 
@@ -2843,7 +2848,7 @@ search_next:
        pager_menu->redraw = REDRAW_FULL;
        break;
 
-     case OP_EDIT_LABEL:
+      case OP_EDIT_LABEL:
         CHECK_MODE(IsHeader (extra));
         rc = mutt_label_message(extra->hdr);
         if (rc > 0) {
diff --git a/parse.c b/parse.c
index 6cf22cbdb56c4b97628f49a3f7f3ceca0e51d0d3..ef9879d7d3c98e2ad34d1251d80066634c21746b 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -223,8 +223,8 @@ static PARAMETER *parse_parameters (const char *s)
        new->value = safe_strdup (buffer);
 
        dprint (2, (debugfile, "parse_parameter: `%s' = `%s'\n",
-             new->attribute ? new->attribute : "",
-             new->value ? new->value : ""));
+                    new->attribute ? new->attribute : "",
+                    new->value ? new->value : ""));
 
        /* Add this parameter to the list */
        if (head)
@@ -335,7 +335,7 @@ void mutt_parse_content_type (char *s, BODY *ct)
 
 #ifdef SUN_ATTACHMENT
   if (ascii_strcasecmp ("x-sun-attachment", s) == 0)
-      ct->subtype = safe_strdup ("x-sun-attachment");
+    ct->subtype = safe_strdup ("x-sun-attachment");
 #endif
 
   if (ct->type == TYPEOTHER)
@@ -371,8 +371,8 @@ void mutt_parse_content_type (char *s, BODY *ct)
   {
     if (!(pc = mutt_get_parameter ("charset", ct->parameter)))
       mutt_set_parameter ("charset", (AssumedCharset && *AssumedCharset) ?
-                         (const char *) mutt_get_default_charset ()
-                         : "us-ascii", &ct->parameter);
+                          (const char *) mutt_get_default_charset ()
+                          : "us-ascii", &ct->parameter);
   }
 
 }
@@ -501,10 +501,10 @@ void mutt_parse_part (FILE *fp, BODY *b)
     case TYPEMULTIPART:
 #ifdef SUN_ATTACHMENT
       if ( !ascii_strcasecmp (b->subtype, "x-sun-attachment") )
-          bound = "--------";
+        bound = "--------";
       else
 #endif
-          bound = mutt_get_parameter ("boundary", b->parameter);
+        bound = mutt_get_parameter ("boundary", b->parameter);
 
       fseeko (fp, b->offset, SEEK_SET);
       b->parts =  mutt_parse_multipart (fp, bound,
@@ -638,8 +638,8 @@ BODY *mutt_parse_multipart (FILE *fp, const char *boundary, LOFF_T end_off, int
         if (mutt_get_parameter ("content-lines", new->parameter)) {
          mutt_atoi (mutt_get_parameter ("content-lines", new->parameter), &lines);
          for ( ; lines; lines-- )
-            if (ftello (fp) >= end_off || fgets (buffer, LONG_STRING, fp) == NULL)
-              break;
+            if (ftello (fp) >= end_off || fgets (buffer, LONG_STRING, fp) == NULL)
+              break;
        }
 #endif
 
@@ -1030,294 +1030,294 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short
   switch (ascii_tolower (line[0]))
   {
     case 'a':
-    if (ascii_strcasecmp (line+1, "pparently-to") == 0)
-    {
-      e->to = rfc822_parse_adrlist (e->to, p);
-      matched = 1;
-    }
-    else if (ascii_strcasecmp (line+1, "pparently-from") == 0)
-    {
-      e->from = rfc822_parse_adrlist (e->from, p);
-      matched = 1;
-    }
-    break;
-
-    case 'b':
-    if (ascii_strcasecmp (line+1, "cc") == 0)
-    {
-      e->bcc = rfc822_parse_adrlist (e->bcc, p);
-      matched = 1;
-    }
-    break;
-
-    case 'c':
-    if (ascii_strcasecmp (line+1, "c") == 0)
-    {
-      e->cc = rfc822_parse_adrlist (e->cc, p);
-      matched = 1;
-    }
-    else if (ascii_strncasecmp (line + 1, "ontent-", 7) == 0)
-    {
-      if (ascii_strcasecmp (line+8, "type") == 0)
+      if (ascii_strcasecmp (line+1, "pparently-to") == 0)
       {
-       if (hdr)
-         mutt_parse_content_type (p, hdr->content);
-       matched = 1;
+        e->to = rfc822_parse_adrlist (e->to, p);
+        matched = 1;
       }
-      else if (ascii_strcasecmp (line+8, "transfer-encoding") == 0)
+      else if (ascii_strcasecmp (line+1, "pparently-from") == 0)
       {
-       if (hdr)
-         hdr->content->encoding = mutt_check_encoding (p);
-       matched = 1;
+        e->from = rfc822_parse_adrlist (e->from, p);
+        matched = 1;
       }
-      else if (ascii_strcasecmp (line+8, "length") == 0)
+      break;
+
+    case 'b':
+      if (ascii_strcasecmp (line+1, "cc") == 0)
       {
-       if (hdr)
-       {
-         if ((hdr->content->length = atol (p)) < 0)
-           hdr->content->length = -1;
-       }
-       matched = 1;
+        e->bcc = rfc822_parse_adrlist (e->bcc, p);
+        matched = 1;
       }
-      else if (ascii_strcasecmp (line+8, "description") == 0)
+      break;
+
+    case 'c':
+      if (ascii_strcasecmp (line+1, "c") == 0)
       {
-       if (hdr)
-       {
-         mutt_str_replace (&hdr->content->description, p);
-         rfc2047_decode (&hdr->content->description);
-       }
-       matched = 1;
+        e->cc = rfc822_parse_adrlist (e->cc, p);
+        matched = 1;
       }
-      else if (ascii_strcasecmp (line+8, "disposition") == 0)
+      else if (ascii_strncasecmp (line + 1, "ontent-", 7) == 0)
       {
-       if (hdr)
-         parse_content_disposition (p, hdr->content);
-       matched = 1;
+        if (ascii_strcasecmp (line+8, "type") == 0)
+        {
+          if (hdr)
+            mutt_parse_content_type (p, hdr->content);
+          matched = 1;
+        }
+        else if (ascii_strcasecmp (line+8, "transfer-encoding") == 0)
+        {
+          if (hdr)
+            hdr->content->encoding = mutt_check_encoding (p);
+          matched = 1;
+        }
+        else if (ascii_strcasecmp (line+8, "length") == 0)
+        {
+          if (hdr)
+          {
+            if ((hdr->content->length = atol (p)) < 0)
+              hdr->content->length = -1;
+          }
+          matched = 1;
+        }
+        else if (ascii_strcasecmp (line+8, "description") == 0)
+        {
+          if (hdr)
+          {
+            mutt_str_replace (&hdr->content->description, p);
+            rfc2047_decode (&hdr->content->description);
+          }
+          matched = 1;
+        }
+        else if (ascii_strcasecmp (line+8, "disposition") == 0)
+        {
+          if (hdr)
+            parse_content_disposition (p, hdr->content);
+          matched = 1;
+        }
       }
-    }
-    break;
+      break;
 
     case 'd':
-    if (!ascii_strcasecmp ("ate", line + 1))
-    {
-      mutt_str_replace (&e->date, p);
-      if (hdr)
-       hdr->date_sent = mutt_parse_date (p, hdr);
-      matched = 1;
-    }
-    break;
+      if (!ascii_strcasecmp ("ate", line + 1))
+      {
+        mutt_str_replace (&e->date, p);
+        if (hdr)
+          hdr->date_sent = mutt_parse_date (p, hdr);
+        matched = 1;
+      }
+      break;
 
     case 'e':
-    if (!ascii_strcasecmp ("xpires", line + 1) &&
-       hdr && mutt_parse_date (p, NULL) < time (NULL))
-      hdr->expired = 1;
-    break;
+      if (!ascii_strcasecmp ("xpires", line + 1) &&
+          hdr && mutt_parse_date (p, NULL) < time (NULL))
+        hdr->expired = 1;
+      break;
 
     case 'f':
-    if (!ascii_strcasecmp ("rom", line + 1))
-    {
-      e->from = rfc822_parse_adrlist (e->from, p);
-      matched = 1;
-    }
-    break;
+      if (!ascii_strcasecmp ("rom", line + 1))
+      {
+        e->from = rfc822_parse_adrlist (e->from, p);
+        matched = 1;
+      }
+      break;
 
     case 'i':
-    if (!ascii_strcasecmp (line+1, "n-reply-to"))
-    {
-      mutt_free_list (&e->in_reply_to);
-      e->in_reply_to = mutt_parse_references (p, 1);
-      matched = 1;
-    }
-    break;
+      if (!ascii_strcasecmp (line+1, "n-reply-to"))
+      {
+        mutt_free_list (&e->in_reply_to);
+        e->in_reply_to = mutt_parse_references (p, 1);
+        matched = 1;
+      }
+      break;
 
     case 'l':
-    if (!ascii_strcasecmp (line + 1, "ines"))
-    {
-      if (hdr)
+      if (!ascii_strcasecmp (line + 1, "ines"))
       {
-       /*
-        * HACK - mutt has, for a very short time, produced negative
-        * Lines header values.  Ignore them.
-        */
-       if (mutt_atoi (p, &hdr->lines) < 0 || hdr->lines < 0)
-         hdr->lines = 0;
+        if (hdr)
+        {
+          /*
+           * HACK - mutt has, for a very short time, produced negative
+           * Lines header values.  Ignore them.
+           */
+          if (mutt_atoi (p, &hdr->lines) < 0 || hdr->lines < 0)
+            hdr->lines = 0;
+        }
+
+        matched = 1;
       }
-
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "ist-Post"))
-    {
-      /* RFC 2369.  FIXME: We should ignore whitespace, but don't. */
-      if (strncmp (p, "NO", 2))
+      else if (!ascii_strcasecmp (line + 1, "ist-Post"))
       {
-       char *beg, *end;
-       for (beg = strchr (p, '<'); beg; beg = strchr (end, ','))
-       {
-         ++beg;
-         if (!(end = strchr (beg, '>')))
-           break;
-
-         /* Take the first mailto URL */
-         if (url_check_scheme (beg) == U_MAILTO)
-         {
-           FREE (&e->list_post);
-           e->list_post = mutt_substrdup (beg, end);
-            if (option (OPTAUTOSUBSCRIBE))
-              mutt_auto_subscribe (e->list_post);
-           break;
-         }
-       }
+        /* RFC 2369.  FIXME: We should ignore whitespace, but don't. */
+        if (strncmp (p, "NO", 2))
+        {
+          char *beg, *end;
+          for (beg = strchr (p, '<'); beg; beg = strchr (end, ','))
+          {
+            ++beg;
+            if (!(end = strchr (beg, '>')))
+              break;
+
+            /* Take the first mailto URL */
+            if (url_check_scheme (beg) == U_MAILTO)
+            {
+              FREE (&e->list_post);
+              e->list_post = mutt_substrdup (beg, end);
+              if (option (OPTAUTOSUBSCRIBE))
+                mutt_auto_subscribe (e->list_post);
+              break;
+            }
+          }
+        }
+        matched = 1;
       }
-      matched = 1;
-    }
-    break;
+      break;
 
     case 'm':
-    if (!ascii_strcasecmp (line + 1, "ime-version"))
-    {
-      if (hdr)
-       hdr->mime = 1;
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "essage-id"))
-    {
-      /* We add a new "Message-ID:" when building a message */
-      FREE (&e->message_id);
-      e->message_id = mutt_extract_message_id (p, NULL);
-      matched = 1;
-    }
-    else if (!ascii_strncasecmp (line + 1, "ail-", 4))
-    {
-      if (!ascii_strcasecmp (line + 5, "reply-to"))
+      if (!ascii_strcasecmp (line + 1, "ime-version"))
       {
-       /* override the Reply-To: field */
-       rfc822_free_address (&e->reply_to);
-       e->reply_to = rfc822_parse_adrlist (e->reply_to, p);
-       matched = 1;
+        if (hdr)
+          hdr->mime = 1;
+        matched = 1;
       }
-      else if (!ascii_strcasecmp (line + 5, "followup-to"))
+      else if (!ascii_strcasecmp (line + 1, "essage-id"))
       {
-       e->mail_followup_to = rfc822_parse_adrlist (e->mail_followup_to, p);
-       matched = 1;
+        /* We add a new "Message-ID:" when building a message */
+        FREE (&e->message_id);
+        e->message_id = mutt_extract_message_id (p, NULL);
+        matched = 1;
       }
-    }
-    break;
+      else if (!ascii_strncasecmp (line + 1, "ail-", 4))
+      {
+        if (!ascii_strcasecmp (line + 5, "reply-to"))
+        {
+          /* override the Reply-To: field */
+          rfc822_free_address (&e->reply_to);
+          e->reply_to = rfc822_parse_adrlist (e->reply_to, p);
+          matched = 1;
+        }
+        else if (!ascii_strcasecmp (line + 5, "followup-to"))
+        {
+          e->mail_followup_to = rfc822_parse_adrlist (e->mail_followup_to, p);
+          matched = 1;
+        }
+      }
+      break;
 
     case 'r':
-    if (!ascii_strcasecmp (line + 1, "eferences"))
-    {
-      mutt_free_list (&e->references);
-      e->references = mutt_parse_references (p, 0);
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "eply-to"))
-    {
-      e->reply_to = rfc822_parse_adrlist (e->reply_to, p);
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "eturn-path"))
-    {
-      e->return_path = rfc822_parse_adrlist (e->return_path, p);
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "eceived"))
-    {
-      if (hdr && !hdr->received)
+      if (!ascii_strcasecmp (line + 1, "eferences"))
+      {
+        mutt_free_list (&e->references);
+        e->references = mutt_parse_references (p, 0);
+        matched = 1;
+      }
+      else if (!ascii_strcasecmp (line + 1, "eply-to"))
       {
-       char *d = strrchr (p, ';');
+        e->reply_to = rfc822_parse_adrlist (e->reply_to, p);
+        matched = 1;
+      }
+      else if (!ascii_strcasecmp (line + 1, "eturn-path"))
+      {
+        e->return_path = rfc822_parse_adrlist (e->return_path, p);
+        matched = 1;
+      }
+      else if (!ascii_strcasecmp (line + 1, "eceived"))
+      {
+        if (hdr && !hdr->received)
+        {
+          char *d = strrchr (p, ';');
 
-       if (d)
-         hdr->received = mutt_parse_date (d + 1, NULL);
+          if (d)
+            hdr->received = mutt_parse_date (d + 1, NULL);
+        }
       }
-    }
-    break;
+      break;
 
     case 's':
-    if (!ascii_strcasecmp (line + 1, "ubject"))
-    {
-      if (!e->subject)
-       e->subject = safe_strdup (p);
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "ender"))
-    {
-      e->sender = rfc822_parse_adrlist (e->sender, p);
-      matched = 1;
-    }
-    else if (!ascii_strcasecmp (line + 1, "tatus"))
-    {
-      if (hdr)
+      if (!ascii_strcasecmp (line + 1, "ubject"))
       {
-       while (*p)
-       {
-         switch(*p)
-         {
-           case 'r':
-           hdr->replied = 1;
-           break;
-           case 'O':
-             hdr->old = 1;
-           break;
-           case 'R':
-           hdr->read = 1;
-           break;
-         }
-         p++;
-       }
+        if (!e->subject)
+          e->subject = safe_strdup (p);
+        matched = 1;
       }
-      matched = 1;
-    }
-    else if ((!ascii_strcasecmp ("upersedes", line + 1) ||
-             !ascii_strcasecmp ("upercedes", line + 1)) && hdr)
-    {
-      FREE(&e->supersedes);
-      e->supersedes = safe_strdup (p);
-    }
-    break;
+      else if (!ascii_strcasecmp (line + 1, "ender"))
+      {
+        e->sender = rfc822_parse_adrlist (e->sender, p);
+        matched = 1;
+      }
+      else if (!ascii_strcasecmp (line + 1, "tatus"))
+      {
+        if (hdr)
+        {
+          while (*p)
+          {
+            switch(*p)
+            {
+              case 'r':
+                hdr->replied = 1;
+                break;
+              case 'O':
+                hdr->old = 1;
+                break;
+              case 'R':
+                hdr->read = 1;
+                break;
+            }
+            p++;
+          }
+        }
+        matched = 1;
+      }
+      else if ((!ascii_strcasecmp ("upersedes", line + 1) ||
+                !ascii_strcasecmp ("upercedes", line + 1)) && hdr)
+      {
+        FREE(&e->supersedes);
+        e->supersedes = safe_strdup (p);
+      }
+      break;
 
     case 't':
-    if (ascii_strcasecmp (line+1, "o") == 0)
-    {
-      e->to = rfc822_parse_adrlist (e->to, p);
-      matched = 1;
-    }
-    break;
+      if (ascii_strcasecmp (line+1, "o") == 0)
+      {
+        e->to = rfc822_parse_adrlist (e->to, p);
+        matched = 1;
+      }
+      break;
 
     case 'x':
-    if (ascii_strcasecmp (line+1, "-status") == 0)
-    {
-      if (hdr)
+      if (ascii_strcasecmp (line+1, "-status") == 0)
       {
-       while (*p)
-       {
-         switch (*p)
-         {
-           case 'A':
-           hdr->replied = 1;
-           break;
-           case 'D':
-           hdr->deleted = 1;
-           break;
-           case 'F':
-           hdr->flagged = 1;
-           break;
-           default:
-           break;
-         }
-         p++;
-       }
+        if (hdr)
+        {
+          while (*p)
+          {
+            switch (*p)
+            {
+              case 'A':
+                hdr->replied = 1;
+                break;
+              case 'D':
+                hdr->deleted = 1;
+                break;
+              case 'F':
+                hdr->flagged = 1;
+                break;
+              default:
+                break;
+            }
+            p++;
+          }
+        }
+        matched = 1;
+      }
+      else if (ascii_strcasecmp (line+1, "-label") == 0)
+      {
+        FREE(&e->x_label);
+        e->x_label = safe_strdup(p);
+        matched = 1;
       }
-      matched = 1;
-    }
-    else if (ascii_strcasecmp (line+1, "-label") == 0)
-    {
-      FREE(&e->x_label);
-      e->x_label = safe_strdup(p);
-      matched = 1;
-    }
 
     default:
-    break;
+      break;
   }
 
   /* Keep track of the user-defined headers */
@@ -1350,7 +1350,7 @@ int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p, short
       *lastp = last;
   }
 
-  done:
+done:
   return matched;
 }
 
@@ -1402,7 +1402,7 @@ ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr, short user_hdrs,
   }
 
   while ((loc = ftello (f)),
-         *(line = mutt_read_rfc822_line (f, line, &linelen)) != 0)
+         *(line = mutt_read_rfc822_line (f, line, &linelen)) != 0)
   {
     if ((p = strpbrk (line, ": \t")) == NULL || *p != ':')
     {
@@ -1552,8 +1552,8 @@ static int count_body_parts_check(LIST **checklist, BODY *b, int dflt)
   {
     a = (ATTACH_MATCH *)type->data;
     dprint(5, (debugfile, "cbpc: %s %d/%s ?? %s/%s [%d]... ",
-               dflt ? "[OK]   " : "[EXCL] ",
-               b->type, b->subtype, a->major, a->minor, a->major_int));
+               dflt ? "[OK]   " : "[EXCL] ",
+               b->type, b->subtype, a->major, a->minor, a->major_int));
     if ((a->major_int == TYPEANY || a->major_int == b->type) &&
        !regexec(&a->minor_rx, b->subtype, 0, NULL, 0))
     {
@@ -1588,10 +1588,10 @@ static int count_body_parts (BODY *body, int flags)
     shallrecurse = 0;
 
     dprint(5, (debugfile, "bp: desc=\"%s\"; fn=\"%s\", type=\"%d/%s\"\n",
-          bp->description ? bp->description : ("none"),
-          bp->filename ? bp->filename :
-                       bp->d_filename ? bp->d_filename : "(none)",
-          bp->type, bp->subtype ? bp->subtype : "*"));
+               bp->description ? bp->description : ("none"),
+               bp->filename ? bp->filename :
+               bp->d_filename ? bp->d_filename : "(none)",
+               bp->type, bp->subtype ? bp->subtype : "*"));
 
     if (bp->type == TYPEMESSAGE)
     {
index 1f47e476d6b6c69389a5e3b2e51e04941ab37fc8..5fc505d8c768e04c418be768b408af30ef715efc 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -476,7 +476,7 @@ static void adjust_date_range (struct tm *min, struct tm *max)
   if (min->tm_year > max->tm_year
       || (min->tm_year == max->tm_year && min->tm_mon > max->tm_mon)
       || (min->tm_year == max->tm_year && min->tm_mon == max->tm_mon
-       && min->tm_mday > max->tm_mday))
+          && min->tm_mday > max->tm_mday))
   {
     int tmp;
 
@@ -499,7 +499,8 @@ static void adjust_date_range (struct tm *min, struct tm *max)
 }
 
 static const char * parse_date_range (const char* pc, struct tm *min,
-    struct tm *max, int haveMin, struct tm *baseMin, BUFFER *err)
+                                      struct tm *max, int haveMin,
+                                      struct tm *baseMin, BUFFER *err)
 {
   int flag = MUTT_PDR_NONE;
   while (*pc && ((flag & MUTT_PDR_DONE) == 0))
@@ -743,7 +744,7 @@ static int patmatch (const pattern_t* pat, const char* buf)
 {
   if (pat->stringmatch)
     return pat->ign_case ? !strcasestr (buf, pat->p.str) :
-                          !strstr (buf, pat->p.str);
+      !strstr (buf, pat->p.str);
   else if (pat->groupmatch)
     return !mutt_group_match (pat->p.g, buf);
   else
@@ -1269,7 +1270,7 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
       return (pat->not ^ h->deleted);
     case MUTT_MESSAGE:
       return (pat->not ^ (h->msgno >= pat->min - 1 && (pat->max == MUTT_MAXRANGE ||
-                                                  h->msgno <= pat->max - 1)));
+                                                       h->msgno <= pat->max - 1)));
     case MUTT_DATE:
       if (pat->dynamic)
         match_update_dynamic_date (pat);
@@ -1287,7 +1288,7 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
        * This is also the case when message scoring.
        */
       if (!ctx)
-             return 0;
+        return 0;
 #ifdef USE_IMAP
       /* IMAP search sets h->matched at search compile time */
       if (ctx->magic == MUTT_IMAP && pat->stringmatch)
@@ -1323,8 +1324,8 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
                                         h->env->from, h->env->sender,
                                         h->env->to, h->env->cc));
     case MUTT_RECIPIENT:
-           return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS,
-                                             2, h->env->to, h->env->cc));
+      return (pat->not ^ match_adrlist (pat, flags & MUTT_MATCH_FULL_ADDRESS,
+                                        2, h->env->to, h->env->cc));
     case MUTT_LIST:    /* known list, subscribed or not */
       if (cache)
       {
@@ -1375,22 +1376,22 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
       return (pat->not ^ result);
     case MUTT_COLLAPSED:
       return (pat->not ^ (h->collapsed && h->num_hidden > 1));
-   case MUTT_CRYPT_SIGN:
-     if (!WithCrypto)
-       break;
-     return (pat->not ^ ((h->security & SIGN) ? 1 : 0));
-   case MUTT_CRYPT_VERIFIED:
-     if (!WithCrypto)
-       break;
-     return (pat->not ^ ((h->security & GOODSIGN) ? 1 : 0));
-   case MUTT_CRYPT_ENCRYPT:
-     if (!WithCrypto)
-       break;
-     return (pat->not ^ ((h->security & ENCRYPT) ? 1 : 0));
-   case MUTT_PGP_KEY:
-     if (!(WithCrypto & APPLICATION_PGP))
-       break;
-     return (pat->not ^ ((h->security & PGPKEY) == PGPKEY));
+    case MUTT_CRYPT_SIGN:
+      if (!WithCrypto)
+        break;
+      return (pat->not ^ ((h->security & SIGN) ? 1 : 0));
+    case MUTT_CRYPT_VERIFIED:
+      if (!WithCrypto)
+        break;
+      return (pat->not ^ ((h->security & GOODSIGN) ? 1 : 0));
+    case MUTT_CRYPT_ENCRYPT:
+      if (!WithCrypto)
+        break;
+      return (pat->not ^ ((h->security & ENCRYPT) ? 1 : 0));
+    case MUTT_PGP_KEY:
+      if (!(WithCrypto & APPLICATION_PGP))
+        break;
+      return (pat->not ^ ((h->security & PGPKEY) == PGPKEY));
     case MUTT_XLABEL:
       return (pat->not ^ (h->env->x_label && patmatch (pat, h->env->x_label) == 0));
     case MUTT_HORMEL:
@@ -1401,9 +1402,9 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
       if (!ctx)
         return 0;
       {
-      int count = mutt_count_body_parts (ctx, h);
-      return (pat->not ^ (count >= pat->min && (pat->max == MUTT_MAXRANGE ||
-                                                count <= pat->max)));
+        int count = mutt_count_body_parts (ctx, h);
+        return (pat->not ^ (count >= pat->min && (pat->max == MUTT_MAXRANGE ||
+                                                  count <= pat->max)));
       }
     case MUTT_MIMETYPE:
       if (!ctx)
@@ -1542,7 +1543,7 @@ int mutt_pattern_func (int op, char *prompt)
        Context->v2r[Context->vcount] = i;
        Context->vcount++;
        Context->vsize += this_body->length + this_body->offset -
-                         this_body->hdr_offset + padding;
+          this_body->hdr_offset + padding;
       }
     }
   }
@@ -1560,7 +1561,7 @@ int mutt_pattern_func (int op, char *prompt)
                            0);
          case MUTT_DELETE:
            mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], MUTT_DELETE,
-                         (op == MUTT_DELETE));
+                           (op == MUTT_DELETE));
            break;
          case MUTT_TAG:
          case MUTT_UNTAG:
@@ -1624,7 +1625,7 @@ int mutt_search_command (int cur, int op)
     if (mutt_get_field ((op == OP_SEARCH || op == OP_SEARCH_NEXT) ?
                        _("Search for: ") : _("Reverse search for: "),
                        buf, sizeof (buf),
-                     MUTT_CLEAR | MUTT_PATTERN) != 0 || !buf[0])
+                        MUTT_CLEAR | MUTT_PATTERN) != 0 || !buf[0])
       return (-1);
 
     if (op == OP_SEARCH || op == OP_SEARCH_NEXT)
diff --git a/pgp.c b/pgp.c
index 73a6c79eaf7c36bcb7c480cac59d66d6490156f7..7d4a5a3fd137f5fb3b0297179eb2d66c6683fcd1 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -77,10 +77,10 @@ int pgp_valid_passphrase (void)
   time_t now = time (NULL);
 
   if (pgp_use_gpg_agent())
-    {
-      *PgpPass = 0;
-      return 1; /* handled by gpg-agent */
-    }
+  {
+    *PgpPass = 0;
+    return 1; /* handled by gpg-agent */
+  }
 
   if (now < PgpExptime)
     /* Use cached copy.  */
@@ -89,10 +89,10 @@ int pgp_valid_passphrase (void)
   pgp_void_passphrase ();
 
   if (mutt_get_password (_("Enter PGP passphrase:"), PgpPass, sizeof (PgpPass)) == 0)
-    {
-      PgpExptime = mutt_add_timeout (time (NULL), PgpTimeout);
-      return (1);
-    }
+  {
+    PgpExptime = mutt_add_timeout (time (NULL), PgpTimeout);
+    return (1);
+  }
   else
     PgpExptime = 0;
 
@@ -300,7 +300,7 @@ static int pgp_check_decryption_okay (FILE *fpin)
       continue;
     s = line + 9;
     dprint (2, (debugfile, "pgp_check_decryption_okay: checking \"%s\".\n",
-                  line));
+                line));
     if (mutt_strncmp (s, "BEGIN_DECRYPTION", 16) == 0)
       inside_decrypt = 1;
     else if (mutt_strncmp (s, "END_DECRYPTION", 14) == 0)
@@ -825,8 +825,8 @@ int pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempfile)
   crypt_current_time (s, "PGP");
 
   if((thepid = pgp_invoke_verify (NULL, &pgpout, NULL,
-                                  -1, -1, fileno(pgperr),
-                                  tempfile, sigfile)) != -1)
+                                  -1, -1, fileno(pgperr),
+                                  tempfile, sigfile)) != -1)
   {
     if (pgp_copy_checksig (pgpout, s->fpout) >= 0)
       badsig = 0;
@@ -842,7 +842,7 @@ int pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempfile)
     if ((rv = mutt_wait_filter (thepid)))
       badsig = -1;
 
-     dprint (1, (debugfile, "pgp_verify_one: mutt_wait_filter returned %d.\n", rv));
+    dprint (1, (debugfile, "pgp_verify_one: mutt_wait_filter returned %d.\n", rv));
   }
 
   safe_fclose (&pgperr);
@@ -1251,7 +1251,7 @@ BODY *pgp_sign_message (BODY *a)
   }
 
   if (!pgp_use_gpg_agent())
-     fputs(PgpPass, pgpin);
+    fputs(PgpPass, pgpin);
   fputc('\n', pgpin);
   safe_fclose (&pgpin);
 
@@ -1416,7 +1416,7 @@ char *pgp_findKeys (ADDRESS *adrlist, int oppenc_mode)
       {
         snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
         k_info = pgp_ask_for_key (buf, q->mailbox,
-                              KEYFLAG_CANENCRYPT, PGP_PUBRING);
+                                  KEYFLAG_CANENCRYPT, PGP_PUBRING);
       }
 
       if (k_info == NULL)
@@ -1433,7 +1433,7 @@ char *pgp_findKeys (ADDRESS *adrlist, int oppenc_mode)
       keylist_size += mutt_strlen (keyID) + 4;
       safe_realloc (&keylist, keylist_size);
       sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "",      /* __SPRINTF_CHECKED__ */
-              keyID);
+               keyID);
       keylist_used = mutt_strlen (keylist);
 
       key_selected = 1;
@@ -1512,7 +1512,7 @@ BODY *pgp_encrypt_message (BODY *a, char *keylist, int sign)
   if (sign)
   {
     if (!pgp_use_gpg_agent())
-       fputs (PgpPass, pgpin);
+      fputs (PgpPass, pgpin);
     fputc ('\n', pgpin);
   }
   safe_fclose (&pgpin);
@@ -1781,8 +1781,8 @@ int pgp_send_menu (HEADER *msg)
     if (msg->security & (ENCRYPT | SIGN))
     {
       snprintf (promptbuf, sizeof (promptbuf),
-          _("PGP (s)ign, sign (a)s, %s format, (c)lear, or (o)ppenc mode off? "),
-          (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
+                _("PGP (s)ign, sign (a)s, %s format, (c)lear, or (o)ppenc mode off? "),
+                (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
       prompt = promptbuf;
       /* L10N: The 'f' is from "forget it", an old undocumented synonym of
          'clear'.  Please use a corresponding letter in your language.
@@ -1805,14 +1805,14 @@ int pgp_send_menu (HEADER *msg)
   else if (option (OPTCRYPTOPPORTUNISTICENCRYPT))
   {
     /* When the message is not selected for signing or encryption, the toggle
-    * between PGP/MIME and Traditional doesn't make sense.
-    */
+     * between PGP/MIME and Traditional doesn't make sense.
+     */
     if (msg->security & (ENCRYPT | SIGN))
     {
 
       snprintf (promptbuf, sizeof (promptbuf),
-          _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s format, (c)lear, or (o)ppenc mode? "),
-          (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
+                _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s format, (c)lear, or (o)ppenc mode? "),
+                (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
       prompt = promptbuf;
       letters = _("esabfcoi");
       choices = "esabfcOi";
@@ -1833,8 +1833,8 @@ int pgp_send_menu (HEADER *msg)
     {
 
       snprintf (promptbuf, sizeof (promptbuf),
-          _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s format, or (c)lear? "),
-          (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
+                _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s format, or (c)lear? "),
+                (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
       prompt = promptbuf;
       letters = _("esabfci");
       choices = "esabfci";
@@ -1852,62 +1852,62 @@ int pgp_send_menu (HEADER *msg)
   {
     switch (choices[choice - 1])
     {
-    case 'e': /* (e)ncrypt */
-      msg->security |= ENCRYPT;
-      msg->security &= ~SIGN;
-      break;
+      case 'e': /* (e)ncrypt */
+        msg->security |= ENCRYPT;
+        msg->security &= ~SIGN;
+        break;
 
-    case 's': /* (s)ign */
-      msg->security &= ~ENCRYPT;
-      msg->security |= SIGN;
-      break;
+      case 's': /* (s)ign */
+        msg->security &= ~ENCRYPT;
+        msg->security |= SIGN;
+        break;
 
-    case 'S': /* (s)ign in oppenc mode */
-      msg->security |= SIGN;
-      break;
+      case 'S': /* (s)ign in oppenc mode */
+        msg->security |= SIGN;
+        break;
 
-    case 'a': /* sign (a)s */
-      unset_option(OPTPGPCHECKTRUST);
+      case 'a': /* sign (a)s */
+        unset_option(OPTPGPCHECKTRUST);
 
-      if ((p = pgp_ask_for_key (_("Sign as: "), NULL, 0, PGP_SECRING)))
-      {
-        snprintf (input_signas, sizeof (input_signas), "0x%s",
-            pgp_fpr_or_lkeyid (p));
-        mutt_str_replace (&PgpSignAs, input_signas);
-        pgp_free_key (&p);
+        if ((p = pgp_ask_for_key (_("Sign as: "), NULL, 0, PGP_SECRING)))
+        {
+          snprintf (input_signas, sizeof (input_signas), "0x%s",
+                    pgp_fpr_or_lkeyid (p));
+          mutt_str_replace (&PgpSignAs, input_signas);
+          pgp_free_key (&p);
 
-        msg->security |= SIGN;
+          msg->security |= SIGN;
 
-        crypt_pgp_void_passphrase ();  /* probably need a different passphrase */
-      }
-      break;
+          crypt_pgp_void_passphrase ();  /* probably need a different passphrase */
+        }
+        break;
 
-    case 'b': /* (b)oth */
-      msg->security |= (ENCRYPT | SIGN);
-      break;
+      case 'b': /* (b)oth */
+        msg->security |= (ENCRYPT | SIGN);
+        break;
 
-    case 'f': /* (f)orget it: kept for backward compatibility. */
-    case 'c': /* (c)lear     */
-      msg->security &= ~(ENCRYPT | SIGN);
-      break;
+      case 'f': /* (f)orget it: kept for backward compatibility. */
+      case 'c': /* (c)lear     */
+        msg->security &= ~(ENCRYPT | SIGN);
+        break;
 
-    case 'F': /* (f)orget it or (c)lear in oppenc mode */
-    case 'C':
-      msg->security &= ~SIGN;
-      break;
+      case 'F': /* (f)orget it or (c)lear in oppenc mode */
+      case 'C':
+        msg->security &= ~SIGN;
+        break;
 
-    case 'O': /* oppenc mode on */
-      msg->security |= OPPENCRYPT;
-      crypt_opportunistic_encrypt (msg);
-      break;
+      case 'O': /* oppenc mode on */
+        msg->security |= OPPENCRYPT;
+        crypt_opportunistic_encrypt (msg);
+        break;
 
-    case 'o': /* oppenc mode off */
-      msg->security &= ~OPPENCRYPT;
-      break;
+      case 'o': /* oppenc mode off */
+        msg->security &= ~OPPENCRYPT;
+        break;
 
-    case 'i': /* toggle (i)nline */
-      msg->security ^= INLINE;
-      break;
+      case 'i': /* toggle (i)nline */
+        msg->security ^= INLINE;
+        break;
     }
   }
 
diff --git a/pgp.h b/pgp.h
index 32076ff86a74b9738a950e332e06855159b0eec3..223e5c2083692f88bdbdacdc4e0d73505c2ea6e3 100644 (file)
--- a/pgp.h
+++ b/pgp.h
@@ -90,8 +90,8 @@ pid_t pgp_invoke_list_keys (FILE **pgpin, FILE **pgpout, FILE **pgperr,
                            int pgpinfd, int pgpoutfd, int pgperrfd,
                            pgp_ring_t keyring, LIST *hints);
 pid_t pgp_invoke_traditional (FILE **pgpin, FILE **pgpout, FILE **pgperr,
-                         int pgpinfd, int pgpoutfd, int pgperrfd,
-                         const char *fname, const char *uids, int flags);
+                              int pgpinfd, int pgpoutfd, int pgperrfd,
+                              const char *fname, const char *uids, int flags);
 
 
 void pgp_invoke_import (const char *fname);
index 14b2e0a134ce214d18e19761b1fea40d61078e61..8ec11f094a4372d07175d02e0e2a325c228689ab 100644 (file)
 #include <string.h>
 
 void print_usage(const char *progname) {
-       fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", progname);
-       exit(1);
+  fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", progname);
+  exit(1);
 }
 
 int main(int argc, char **argv) {
-       char **opts, **opt, *pfx;
-       int i;
+  char **opts, **opt, *pfx;
+  int i;
 
-       if (argc <= 1) {
-               print_usage(argv[0]);
-        }
+  if (argc <= 1) {
+    print_usage(argv[0]);
+  }
 
-       opts = malloc((2 * argc + 1) * sizeof (* opts));        /* __MEM_CHECKED__ */
-       if(!opts) {
-               perror(argv[0]);
-               exit(2);
-       }
+  opts = malloc((2 * argc + 1) * sizeof (* opts));     /* __MEM_CHECKED__ */
+  if(!opts) {
+    perror(argv[0]);
+    exit(2);
+  }
 
-       if (argc < 2)
-       {
-         fprintf (stderr,
-                  "Command line usage: %s [flags] -- prefix [recipients]\n",
-                  argv[0]);
-         return 1;
-       }
+  if (argc < 2)
+  {
+    fprintf (stderr,
+             "Command line usage: %s [flags] -- prefix [recipients]\n",
+             argv[0]);
+    return 1;
+  }
 
-       opt = opts;
-       *opt++ = argv[1];
-       pfx = NULL;
+  opt = opts;
+  *opt++ = argv[1];
+  pfx = NULL;
 
-       for(i = 2; i < argc; ) {
-               if(!strcmp(argv[i], "--")) {
-                       i += 2;
-                       if(i > argc) {
-                               print_usage(argv[0]);
-                       }
-                       pfx = argv[i-1];
-               }
-               if(pfx)
-                       *opt++ = pfx;
-               *opt++ = argv[i++];
-       }
-       *opt = NULL;
+  for(i = 2; i < argc; ) {
+    if(!strcmp(argv[i], "--")) {
+      i += 2;
+      if(i > argc) {
+        print_usage(argv[0]);
+      }
+      pfx = argv[i-1];
+    }
+    if(pfx)
+      *opt++ = pfx;
+    *opt++ = argv[i++];
+  }
+  *opt = NULL;
 
-       execvp(opts[0], opts);
-       perror(argv[0]);
-       return 2;
+  execvp(opts[0], opts);
+  perror(argv[0]);
+  return 2;
 }
index 4671b1b479f472ea31a33498787be3f53c7b5df3..bbfb927bdc05745501b7d627220a48711a2eb010 100644 (file)
@@ -187,7 +187,7 @@ static pid_t pgp_invoke (FILE **pgpin, FILE **pgpout, FILE **pgperr,
   mutt_pgp_command (cmd, sizeof (cmd), &cctx, format);
 
   return mutt_create_filter_fd (cmd, pgpin, pgpout, pgperr,
-                              pgpinfd, pgpoutfd, pgperrfd);
+                                pgpinfd, pgpoutfd, pgperrfd);
 }
 
 
@@ -358,8 +358,8 @@ pid_t pgp_invoke_list_keys (FILE **pgpin, FILE **pgpout, FILE **pgperr,
 
   rc = pgp_invoke (pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd,
                    0, NULL, NULL, mutt_b2s (uids),
-                    keyring == PGP_SECRING ? PgpListSecringCommand :
-                    PgpListPubringCommand);
+                   keyring == PGP_SECRING ? PgpListSecringCommand :
+                   PgpListPubringCommand);
 
   mutt_buffer_pool_release (&uids);
   return rc;
index e497508dc60eba76d926b35ebc5701fb5c8f8985..adbd8a1be81a69af7556263a0b561c6ae2ab093f 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -153,63 +153,63 @@ static const char *pgp_entry_fmt (char *dest,
   {
     case '[':
 
+    {
+      const char *cp;
+      char buf2[SHORT_STRING], *p;
+      int do_locales;
+      struct tm *tm;
+      size_t len;
+
+      p = dest;
+
+      cp = src;
+      if (*cp == '!')
       {
-       const char *cp;
-       char buf2[SHORT_STRING], *p;
-       int do_locales;
-       struct tm *tm;
-       size_t len;
-
-       p = dest;
-
-       cp = src;
-       if (*cp == '!')
-       {
-         do_locales = 0;
-         cp++;
-       }
-       else
-         do_locales = 1;
-
-       len = destlen - 1;
-       while (len > 0 && *cp != ']')
-       {
-         if (*cp == '%')
-         {
-           cp++;
-           if (len >= 2)
-           {
-             *p++ = '%';
-             *p++ = *cp;
-             len -= 2;
-           }
-           else
-             break; /* not enough space */
-           cp++;
-         }
-         else
-         {
-           *p++ = *cp++;
-           len--;
-         }
-       }
-       *p = 0;
-
-
-       tm = localtime (&key->gen_time);
-
-        if (!do_locales)
-          setlocale (LC_TIME, "C");
-        strftime (buf2, sizeof (buf2), dest, tm);
-        if (!do_locales)
-          setlocale (LC_TIME, "");
+        do_locales = 0;
+        cp++;
+      }
+      else
+        do_locales = 1;
 
-       snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-       snprintf (dest, destlen, fmt, buf2);
-       if (len > 0)
-         src = cp + 1;
+      len = destlen - 1;
+      while (len > 0 && *cp != ']')
+      {
+        if (*cp == '%')
+        {
+          cp++;
+          if (len >= 2)
+          {
+            *p++ = '%';
+            *p++ = *cp;
+            len -= 2;
+          }
+          else
+            break; /* not enough space */
+          cp++;
+        }
+        else
+        {
+          *p++ = *cp++;
+          len--;
+        }
       }
-      break;
+      *p = 0;
+
+
+      tm = localtime (&key->gen_time);
+
+      if (!do_locales)
+        setlocale (LC_TIME, "C");
+      strftime (buf2, sizeof (buf2), dest, tm);
+      if (!do_locales)
+        setlocale (LC_TIME, "");
+
+      snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
+      snprintf (dest, destlen, fmt, buf2);
+      if (len > 0)
+        src = cp + 1;
+    }
+    break;
     case 'n':
       if (!optional)
       {
@@ -313,7 +313,7 @@ static int _pgp_compare_address (const void *a, const void *b)
 static int pgp_compare_address (const void *a, const void *b)
 {
   return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_address (a, b)
-                                      : _pgp_compare_address (a, b));
+          : _pgp_compare_address (a, b));
 }
 
 
@@ -335,7 +335,7 @@ static int _pgp_compare_keyid (const void *a, const void *b)
 static int pgp_compare_keyid (const void *a, const void *b)
 {
   return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_keyid (a, b)
-                                      : _pgp_compare_keyid (a, b));
+          : _pgp_compare_keyid (a, b));
 }
 
 static int _pgp_compare_date (const void *a, const void *b)
@@ -352,7 +352,7 @@ static int _pgp_compare_date (const void *a, const void *b)
 static int pgp_compare_date (const void *a, const void *b)
 {
   return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_date (a, b)
-                                      : _pgp_compare_date (a, b));
+          : _pgp_compare_date (a, b));
 }
 
 static int _pgp_compare_trust (const void *a, const void *b)
@@ -380,7 +380,7 @@ static int _pgp_compare_trust (const void *a, const void *b)
 static int pgp_compare_trust (const void *a, const void *b)
 {
   return ((PgpSortKeys & SORT_REVERSE) ? !_pgp_compare_trust (a, b)
-                                      : _pgp_compare_trust (a, b));
+          : _pgp_compare_trust (a, b));
 }
 
 static int pgp_key_is_valid (pgp_key_t k)
@@ -546,108 +546,108 @@ static pgp_key_t pgp_select_key (pgp_key_t keys,
     switch (mutt_menuLoop (menu))
     {
 
-    case OP_VERIFY_KEY:
+      case OP_VERIFY_KEY:
 
-      mutt_mktemp (tempfile, sizeof (tempfile));
-      if ((devnull = fopen ("/dev/null", "w")) == NULL)        /* __FOPEN_CHECKED__ */
-      {
-       mutt_perror _("Can't open /dev/null");
-       break;
-      }
-      if ((fp = safe_fopen (tempfile, "w")) == NULL)
-      {
-       safe_fclose (&devnull);
-       mutt_perror _("Can't create temporary file");
-       break;
-      }
+        mutt_mktemp (tempfile, sizeof (tempfile));
+        if ((devnull = fopen ("/dev/null", "w")) == NULL)      /* __FOPEN_CHECKED__ */
+        {
+          mutt_perror _("Can't open /dev/null");
+          break;
+        }
+        if ((fp = safe_fopen (tempfile, "w")) == NULL)
+        {
+          safe_fclose (&devnull);
+          mutt_perror _("Can't create temporary file");
+          break;
+        }
 
-      mutt_message _("Invoking PGP...");
+        mutt_message _("Invoking PGP...");
 
-      snprintf (tmpbuf, sizeof (tmpbuf), "0x%s",
-          pgp_fpr_or_lkeyid (pgp_principal_key (KeyTable[menu->current]->parent)));
+        snprintf (tmpbuf, sizeof (tmpbuf), "0x%s",
+                  pgp_fpr_or_lkeyid (pgp_principal_key (KeyTable[menu->current]->parent)));
 
-      if ((thepid = pgp_invoke_verify_key (NULL, NULL, NULL, -1,
-                   fileno (fp), fileno (devnull), tmpbuf)) == -1)
-      {
-       mutt_perror _("Can't create filter");
-       unlink (tempfile);
-       safe_fclose (&fp);
-       safe_fclose (&devnull);
-      }
+        if ((thepid = pgp_invoke_verify_key (NULL, NULL, NULL, -1,
+                                             fileno (fp), fileno (devnull), tmpbuf)) == -1)
+        {
+          mutt_perror _("Can't create filter");
+          unlink (tempfile);
+          safe_fclose (&fp);
+          safe_fclose (&devnull);
+        }
 
-      mutt_wait_filter (thepid);
-      safe_fclose (&fp);
-      safe_fclose (&devnull);
-      mutt_clear_error ();
-      snprintf (cmd, sizeof (cmd), _("Key ID: 0x%s"),
-               pgp_keyid (pgp_principal_key (KeyTable[menu->current]->parent)));
-      mutt_do_pager (cmd, tempfile, 0, NULL);
-      menu->redraw = REDRAW_FULL;
+        mutt_wait_filter (thepid);
+        safe_fclose (&fp);
+        safe_fclose (&devnull);
+        mutt_clear_error ();
+        snprintf (cmd, sizeof (cmd), _("Key ID: 0x%s"),
+                  pgp_keyid (pgp_principal_key (KeyTable[menu->current]->parent)));
+        mutt_do_pager (cmd, tempfile, 0, NULL);
+        menu->redraw = REDRAW_FULL;
 
-      break;
+        break;
 
-    case OP_VIEW_ID:
+      case OP_VIEW_ID:
 
-      mutt_message ("%s", NONULL (KeyTable[menu->current]->addr));
-      break;
+        mutt_message ("%s", NONULL (KeyTable[menu->current]->addr));
+        break;
 
-    case OP_GENERIC_SELECT_ENTRY:
+      case OP_GENERIC_SELECT_ENTRY:
 
 
-      /* XXX make error reporting more verbose */
+        /* XXX make error reporting more verbose */
 
-      if (option (OPTPGPCHECKTRUST))
-       if (!pgp_key_is_valid (KeyTable[menu->current]->parent))
-       {
-         mutt_error _("This key can't be used: expired/disabled/revoked.");
-         break;
-       }
+        if (option (OPTPGPCHECKTRUST))
+          if (!pgp_key_is_valid (KeyTable[menu->current]->parent))
+          {
+            mutt_error _("This key can't be used: expired/disabled/revoked.");
+            break;
+          }
 
-      if (option (OPTPGPCHECKTRUST) &&
-         (!pgp_id_is_valid (KeyTable[menu->current])
-          || !pgp_id_is_strong (KeyTable[menu->current])))
-      {
-       char *s = "";
-       char buff[LONG_STRING];
-
-       if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE)
-         s = N_("ID is expired/disabled/revoked.");
-       else switch (KeyTable[menu->current]->trust & 0x03)
-       {
-         case 0:
-           s = N_("ID has undefined validity.");
-           break;
-         case 1:
-           s = N_("ID is not valid.");
-           break;
-         case 2:
-           s = N_("ID is only marginally valid.");
-           break;
-       }
-
-       snprintf (buff, sizeof (buff), _("%s Do you really want to use the key?"),
-                 _(s));
-
-       if (mutt_yesorno (buff, MUTT_NO) != MUTT_YES)
-       {
-         mutt_clear_error ();
-         break;
-       }
-      }
+        if (option (OPTPGPCHECKTRUST) &&
+            (!pgp_id_is_valid (KeyTable[menu->current])
+             || !pgp_id_is_strong (KeyTable[menu->current])))
+        {
+          char *s = "";
+          char buff[LONG_STRING];
+
+          if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE)
+            s = N_("ID is expired/disabled/revoked.");
+          else switch (KeyTable[menu->current]->trust & 0x03)
+               {
+                 case 0:
+                   s = N_("ID has undefined validity.");
+                   break;
+                 case 1:
+                   s = N_("ID is not valid.");
+                   break;
+                 case 2:
+                   s = N_("ID is only marginally valid.");
+                   break;
+               }
+
+          snprintf (buff, sizeof (buff), _("%s Do you really want to use the key?"),
+                    _(s));
+
+          if (mutt_yesorno (buff, MUTT_NO) != MUTT_YES)
+          {
+            mutt_clear_error ();
+            break;
+          }
+        }
 
 # if 0
-      kp = pgp_principal_key (KeyTable[menu->current]->parent);
+        kp = pgp_principal_key (KeyTable[menu->current]->parent);
 # else
-      kp = KeyTable[menu->current]->parent;
+        kp = KeyTable[menu->current]->parent;
 # endif
-      done = 1;
-      break;
+        done = 1;
+        break;
 
-    case OP_EXIT:
+      case OP_EXIT:
 
-      kp = NULL;
-      done = 1;
-      break;
+        kp = NULL;
+        done = 1;
+        break;
     }
   }
 
@@ -755,7 +755,7 @@ BODY *pgp_make_key_attachment (char *tempf)
 
   if ((thepid =
        pgp_invoke_export (NULL, NULL, NULL, -1,
-                          fileno (tempfp), fileno (devnull), tmp)) == -1)
+                          fileno (tempfp), fileno (devnull), tmp)) == -1)
   {
     mutt_perror _("Can't create filter");
     unlink (tempf);
@@ -794,7 +794,7 @@ static LIST *pgp_add_string_to_hints (LIST *hints, const char *str)
     return hints;
 
   for (t = strtok (scratch, " ,.:\"()<>\n"); t;
-                       t = strtok (NULL, " ,.:\"()<>\n"))
+       t = strtok (NULL, " ,.:\"()<>\n"))
   {
     if (strlen (t) > 3)
       hints = mutt_add_list (hints, t);
index 512d8a52a074e070a304ec5216da008e3cfb30fb..3e000b5ac04e25f0eaf052fa513580cc689b6428 100644 (file)
--- a/pgplib.c
+++ b/pgplib.c
@@ -39,20 +39,20 @@ const char *pgp_pkalgbytype (unsigned char type)
 {
   switch (type)
   {
-  case 1:
-    return "RSA";
-  case 2:
-    return "RSA";
-  case 3:
-    return "RSA";
-  case 16:
-    return "ElG";
-  case 17:
-    return "DSA";
-  case 20:
-    return "ElG";
-  default:
-    return "unk";
+    case 1:
+      return "RSA";
+    case 2:
+      return "RSA";
+    case 3:
+      return "RSA";
+    case 16:
+      return "ElG";
+    case 17:
+      return "DSA";
+    case 20:
+      return "ElG";
+    default:
+      return "unk";
   }
 }
 
@@ -66,16 +66,16 @@ static const char *hashalgbytype (unsigned char type)
 {
   switch (type)
   {
-  case 1:
-    return "MD5";
-  case 2:
-    return "SHA1";
-  case 3:
-    return "RIPE-MD/160";
-  case 4:
-    return "HAVAL";
-  default:
-    return "unknown";
+    case 1:
+      return "MD5";
+    case 2:
+      return "SHA1";
+    case 3:
+      return "RIPE-MD/160";
+    case 4:
+      return "HAVAL";
+    default:
+      return "unknown";
   }
 }
 
@@ -85,13 +85,13 @@ short pgp_canencrypt (unsigned char type)
 {
   switch (type)
   {
-  case 1:
-  case 2:
-  case 16:
-  case 20:
-    return 1;
-  default:
-    return 0;
+    case 1:
+    case 2:
+    case 16:
+    case 20:
+      return 1;
+    default:
+      return 0;
   }
 }
 
@@ -99,13 +99,13 @@ short pgp_cansign (unsigned char type)
 {
   switch (type)
   {
-  case 1:
-  case 3:
-  case 17:
-  case 20:
-    return 1;
-  default:
-    return 0;
+    case 1:
+    case 3:
+    case 17:
+    case 20:
+      return 1;
+    default:
+      return 0;
   }
 }
 
index 51884571765ad5bb24df6127425c2385b5a0d967..2c7019d41c8b9c80a2deeed1f48417c0bd2c9ad3 100644 (file)
@@ -196,7 +196,7 @@ static short pgp_find_hash (const char *fname)
     dprint (1, (debugfile, "pgp_find_hash: No packet.\n"));
   }
 
-  bye:
+bye:
 
   safe_fclose (&in);
   safe_fclose (&out);
index a77f53e790aeecb0b3cbc5563e4acbf62f69585f..556700c0f6493242525e9e848fa4109984377400 100644 (file)
@@ -180,7 +180,7 @@ unsigned char *pgp_read_packet (FILE * fp, size_t * len)
       }
 
       case 1:
-      bytes = 2;
+        bytes = 2;
 
       case 2:
       {
@@ -205,7 +205,7 @@ unsigned char *pgp_read_packet (FILE * fp, size_t * len)
       }
 
       default:
-      goto bail;
+        goto bail;
     }
 
     if (read_material (material, &used, fp) == -1)
index 879df12f2ae1f03a1e00ec3042c4e67ee99a93fa..0333c9b5caab0e063b3ca2436adb45ec00798340 100644 (file)
@@ -378,13 +378,13 @@ static pgp_key_t pgp_parse_keyinfo (unsigned char *buff, size_t l)
 
   switch (buff[1])
   {
-  case 2:
-  case 3:
-    return pgp_parse_pgp2_key (buff, l);
-  case 4:
-    return pgp_parse_pgp3_key (buff, l);
-  default:
-    return NULL;
+    case 2:
+    case 3:
+      return pgp_parse_pgp2_key (buff, l);
+    case 4:
+      return pgp_parse_pgp3_key (buff, l);
+    default:
+      return NULL;
   }
 }
 
@@ -529,7 +529,7 @@ static int pgp_parse_pgp3_sig (unsigned char *buff, size_t l,
          break;
        }
        case 10:                        /* CMR key */
-       break;
+          break;
        case 4:                         /* exportable */
        case 5:                         /* trust */
        case 6:                         /* regexp */
@@ -579,13 +579,13 @@ static int pgp_parse_sig (unsigned char *buff, size_t l,
 
   switch (buff[1])
   {
-  case 2:
-  case 3:
-    return pgp_parse_pgp2_sig (buff, l, p, sig);
-  case 4:
-    return pgp_parse_pgp3_sig (buff, l, p, sig);
-  default:
-    return -1;
+    case 2:
+    case 3:
+      return pgp_parse_pgp2_sig (buff, l, p, sig);
+    case 4:
+      return pgp_parse_pgp3_sig (buff, l, p, sig);
+    default:
+      return -1;
   }
 }
 
diff --git a/pop.c b/pop.c
index b3d187b09f6a707b0acc769b14d48c737cc4c366..813942f7343065cec3832b4538f8fbc7a4a808ce 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -118,7 +118,7 @@ static int pop_read_header (POP_DATA *pop_data, HEADER *h)
 
        dprint (1, (debugfile, "pop_read_header: unset TOP capability\n"));
        snprintf (pop_data->err_msg, sizeof (pop_data->err_msg), "%s",
-               _("Command TOP is not supported by server."));
+                  _("Command TOP is not supported by server."));
       }
     }
   }
@@ -166,9 +166,9 @@ static int fetch_uidl (char *line, void *data)
   errno = 0;
   index = strtol(line, &endp, 10);
   if (errno)
-      return -1;
+    return -1;
   while (*endp == ' ')
-      endp++;
+    endp++;
   memmove(line, endp, strlen(endp) + 1);
 
   /* uid must be at least be 1 byte */
@@ -296,7 +296,7 @@ static int pop_fetch_headers (CONTEXT *ctx)
 
       dprint (1, (debugfile, "pop_fetch_headers: unset UIDL capability\n"));
       snprintf (pop_data->err_msg, sizeof (pop_data->err_msg), "%s",
-             _("Command UIDL is not supported by server."));
+                _("Command UIDL is not supported by server."));
     }
   }
 
@@ -351,13 +351,13 @@ static int pop_fetch_headers (CONTEXT *ctx)
       }
       else
 #endif
-      if ((ret = pop_read_header (pop_data, ctx->hdrs[i])) < 0)
-       break;
+        if ((ret = pop_read_header (pop_data, ctx->hdrs[i])) < 0)
+          break;
 #if USE_HCACHE
-      else
-      {
-       mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY);
-      }
+        else
+        {
+          mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY);
+        }
 
       mutt_hcache_free (&data);
 #endif
@@ -398,7 +398,7 @@ static int pop_fetch_headers (CONTEXT *ctx)
   }
 
 #if USE_HCACHE
-    mutt_hcache_close (hc);
+  mutt_hcache_close (hc);
 #endif
 
   if (ret < 0)
index 945c9454c16996cfd048e551a266634d30e33986..a7fadbab926d22d3dd298d198e3d9ad248118acf 100644 (file)
@@ -288,7 +288,7 @@ static pop_auth_res_t pop_auth_user (POP_DATA *pop_data, const char *method)
 
       dprint (1, (debugfile, "pop_auth_user: unset USER capability\n"));
       snprintf (pop_data->err_msg, sizeof (pop_data->err_msg), "%s",
-              _("Command USER is not supported by server."));
+                _("Command USER is not supported by server."));
     }
   }
 
@@ -297,10 +297,10 @@ static pop_auth_res_t pop_auth_user (POP_DATA *pop_data, const char *method)
     snprintf (buf, sizeof (buf), "PASS %s\r\n", pop_data->conn->account.pass);
     ret = pop_query_d (pop_data, buf, sizeof (buf),
 #ifdef DEBUG
-       /* don't print the password unless we're at the ungodly debugging level */
-       debuglevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" :
+                       /* don't print the password unless we're at the ungodly debugging level */
+                       debuglevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" :
 #endif
-       NULL);
+                       NULL);
   }
 
   switch (ret)
@@ -340,10 +340,10 @@ static pop_auth_res_t pop_auth_oauth (POP_DATA *pop_data, const char *method)
 
   ret = pop_query_d (pop_data, auth_cmd, strlen (auth_cmd),
 #ifdef DEBUG
-       /* don't print the bearer token unless we're at the ungodly debugging level */
-       debuglevel < MUTT_SOCK_LOG_FULL ? "AUTH OAUTHBEARER *\r\n" :
+                     /* don't print the bearer token unless we're at the ungodly debugging level */
+                     debuglevel < MUTT_SOCK_LOG_FULL ? "AUTH OAUTHBEARER *\r\n" :
 #endif
-       NULL);
+                     NULL);
   FREE (&auth_cmd);
 
   switch (ret)
@@ -388,7 +388,7 @@ static const pop_auth_t pop_authenticators[] = {
  * -1 - connection lost,
  * -2 - login failed,
  * -3 - authentication canceled.
-*/
+ */
 int pop_authenticate (POP_DATA* pop_data)
 {
   ACCOUNT *acct = &pop_data->conn->account;
index afb70ef6ceb886babc3ba98a45a5a3cef707f94e..eb2da4b2769b646592266294c99089f0896069e6 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -135,7 +135,7 @@ static int fetch_auth (char *line, void *data)
   else
   {
     safe_realloc (&pop_data->auth_list,
-           strlen (pop_data->auth_list) + strlen (line) + 2);
+                  strlen (pop_data->auth_list) + strlen (line) + 2);
     strcat (pop_data->auth_list, " "); /* __STRCAT_CHECKED__ */
   }
   strcat (pop_data->auth_list, line);  /* __STRCAT_CHECKED__ */
@@ -148,7 +148,7 @@ static int fetch_auth (char *line, void *data)
  *  0 - successful,
  * -1 - connection lost,
  * -2 - execution error.
-*/
+ */
 static int pop_capabilities (POP_DATA *pop_data, int mode)
 {
   char buf[LONG_STRING];
@@ -226,7 +226,7 @@ static int pop_capabilities (POP_DATA *pop_data, int mode)
  *  0 - successful,
  * -1 - connection lost,
  * -2 - invalid response.
-*/
+ */
 int pop_connect (POP_DATA *pop_data)
 {
   char buf[LONG_STRING];
@@ -260,7 +260,7 @@ int pop_connect (POP_DATA *pop_data)
  * -1 - connection lost,
  * -2 - invalid command or execution error,
  * -3 - authentication canceled.
-*/
+ */
 int pop_open_connection (POP_DATA *pop_data)
 {
   int ret;
@@ -292,7 +292,7 @@ int pop_open_connection (POP_DATA *pop_data)
     if (pop_data->use_stls == 0)
     {
       ret = query_quadoption (OPT_SSLSTARTTLS,
-           _("Secure connection with TLS?"));
+                              _("Secure connection with TLS?"));
       if (ret == -1)
        return -2;
       pop_data->use_stls = 1;
@@ -415,7 +415,7 @@ void pop_logout (CONTEXT *ctx)
  *  0 - successful,
  * -1 - connection lost,
  * -2 - invalid command or execution error.
-*/
+ */
 int pop_query_d (POP_DATA *pop_data, char *buf, size_t buflen, char *msg)
 {
   int dbg = MUTT_SOCK_LOG_CMD;
@@ -425,12 +425,12 @@ int pop_query_d (POP_DATA *pop_data, char *buf, size_t buflen, char *msg)
     return -1;
 
 #ifdef DEBUG
-    /* print msg instead of real command */
-    if (msg)
-    {
-      dbg = MUTT_SOCK_LOG_FULL;
-      dprint (MUTT_SOCK_LOG_CMD, (debugfile, "> %s", msg));
-    }
+  /* print msg instead of real command */
+  if (msg)
+  {
+    dbg = MUTT_SOCK_LOG_FULL;
+    dprint (MUTT_SOCK_LOG_CMD, (debugfile, "> %s", msg));
+  }
 #endif
 
   mutt_socket_write_d (pop_data->conn, buf, -1, dbg);
@@ -530,9 +530,9 @@ static int check_uidl (char *line, void *data)
   errno = 0;
   index = strtoul(line, &endp, 10);
   if (errno)
-      return -1;
+    return -1;
   while (*endp == ' ')
-      endp++;
+    endp++;
   memmove(line, endp, strlen(endp) + 1);
 
   for (i = 0; i < ctx->msgcount; i++)
@@ -590,7 +590,7 @@ int pop_reconnect (CONTEXT *ctx)
       return -1;
 
     if (query_quadoption (OPT_POPRECONNECT,
-               _("Connection lost. Reconnect to POP server?")) != MUTT_YES)
+                          _("Connection lost. Reconnect to POP server?")) != MUTT_YES)
       return -1;
   }
 }
index 63db387cbc2b4cb63574baeace3c9672987d8a81..3f86791aa068b29c1de287e5ccbd3d6802483735 100644 (file)
@@ -103,9 +103,9 @@ int mutt_num_postponed (int force)
 
   if (stat (Postponed, &st) == -1)
   {
-     PostCount = 0;
-     LastModify = 0;
-     return (0);
+    PostCount = 0;
+    LastModify = 0;
+    return (0);
   }
 
   if (S_ISDIR (st.st_mode))
@@ -333,17 +333,17 @@ int mutt_get_postponed (CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size
       tmp->next = NULL;
       mutt_free_list (&tmp);
       tmp = next;
-     /* note that x-mutt-fcc was present.  we do this because we want to add a
-      * default fcc if the header was missing, but preserve the request of the
-      * user to not make a copy if the header field is present, but empty.
-      * see http://dev.mutt.org/trac/ticket/3653
-      */
+      /* note that x-mutt-fcc was present.  we do this because we want to add a
+       * default fcc if the header was missing, but preserve the request of the
+       * user to not make a copy if the header field is present, but empty.
+       * see http://dev.mutt.org/trac/ticket/3653
+       */
       code |= SENDPOSTPONEDFCC;
     }
     else if ((WithCrypto & APPLICATION_PGP)
              && (mutt_strncmp ("Pgp:", tmp->data, 4) == 0 /* this is generated
-                                                      * by old mutt versions
-                                                      */
+                                                           * by old mutt versions
+                                                           */
                  || mutt_strncmp ("X-Mutt-PGP:", tmp->data, 11) == 0))
     {
       hdr->security = mutt_parse_crypt_hdr (strchr (tmp->data, ':') + 1, 1,
@@ -464,11 +464,11 @@ int mutt_parse_crypt_hdr (const char *p, int set_empty_signas, int crypt_app)
         *q = '\0';
         break;
 
-      /* This used to be the micalg parameter.
-       *
-       * It's no longer needed, so we just skip the parameter in order
-       * to be able to recall old messages.
-       */
+        /* This used to be the micalg parameter.
+         *
+         * It's no longer needed, so we just skip the parameter in order
+         * to be able to recall old messages.
+         */
       case 'm':
       case 'M':
         if(*(p+1) == '<')
@@ -792,7 +792,7 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr,
 
   rv = 0;
 
-  bail:
+bail:
 
   /* that's it. */
   if (bfp != fp) safe_fclose (&bfp);
index 6b2f3a6bc7a3abf91e8f7adc46b50346b47d8c7f..18798f80deebabc12bc868eb7cfb33ec430bc807 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -27,7 +27,7 @@
 
 #define mutt_make_string(A,B,C,D,E) _mutt_make_string(A,B,C,D,E,0)
 void _mutt_make_string (char *, size_t, const char *, CONTEXT *,
-       HEADER *, format_flag);
+                        HEADER *, format_flag);
 
 struct hdr_format_info
 {
@@ -123,17 +123,17 @@ int mutt_stat_compare (struct stat *sba, mutt_stat_type sba_type, struct stat *s
 
 
 const char *mutt_attach_fmt (
-       char *dest,
-       size_t destlen,
-       size_t col,
-        int cols,
-       char op,
-       const char *src,
-       const char *prefix,
-       const char *ifstring,
-       const char *elsestring,
-       unsigned long data,
-       format_flag flags);
+  char *dest,
+  size_t destlen,
+  size_t col,
+  int cols,
+  char op,
+  const char *src,
+  const char *prefix,
+  const char *ifstring,
+  const char *elsestring,
+  unsigned long data,
+  format_flag flags);
 
 
 char *mutt_charset_hook (const char *);
@@ -358,7 +358,7 @@ int mutt_parse_unmono (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_push (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_rc_line (/* const */ char *, BUFFER *, BUFFER *);
 int mutt_parse_rfc822_line (ENVELOPE *e, HEADER *hdr, char *line, char *p,
-  short user_hdrs, short weed, short do_2047, LIST **lastp);
+                            short user_hdrs, short weed, short do_2047, LIST **lastp);
 int mutt_parse_score (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_unscore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
 int mutt_parse_unhook (BUFFER *, BUFFER *, unsigned long, BUFFER *);
@@ -411,15 +411,15 @@ int mutt_from_base64 (char*, const char*, size_t);
 int mutt_wctoutf8 (char *s, unsigned int c, size_t buflen);
 
 #ifdef LOCALES_HACK
-#define IsPrint(c) (isprint((unsigned char)(c)) || \
-       ((unsigned char)(c) >= 0xa0))
+#define IsPrint(c) (isprint((unsigned char)(c)) ||      \
+                    ((unsigned char)(c) >= 0xa0))
 #define IsWPrint(wc) (iswprint(wc) || wc >= 0xa0)
 #else
-#define IsPrint(c) (isprint((unsigned char)(c)) || \
-       (option (OPTLOCALES) ? 0 : \
-       ((unsigned char)(c) >= 0xa0)))
-#define IsWPrint(wc) (iswprint(wc) || \
-       (option (OPTLOCALES) ? 0 : (wc >= 0xa0)))
+#define IsPrint(c) (isprint((unsigned char)(c)) ||      \
+                    (option (OPTLOCALES) ? 0 :          \
+                     ((unsigned char)(c) >= 0xa0)))
+#define IsWPrint(wc) (iswprint(wc) ||                           \
+                      (option (OPTLOCALES) ? 0 : (wc >= 0xa0)))
 #endif
 
 #define new_pattern() safe_calloc(1, sizeof (pattern_t))
diff --git a/query.c b/query.c
index 457f60bddd0105fc8aafdffca1d4db28b6c1bc02..dcd87f39471fe00f940dc01fe634517910381de2 100644 (file)
--- a/query.c
+++ b/query.c
@@ -197,31 +197,31 @@ static const char * query_format_str (char *dest, size_t destlen, size_t col, in
 
   switch (op)
   {
-  case 'a':
-    rfc822_write_address (buf2, sizeof (buf2), query->addr, 1);
-    mutt_format_s (dest, destlen, fmt, buf2);
-    break;
-  case 'c':
-    snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
-    snprintf (dest, destlen, tmp, query->num + 1);
-    break;
-  case 'e':
-    if (!optional)
-      mutt_format_s (dest, destlen, fmt, NONULL (query->other));
-    else if (!query->other || !*query->other)
-      optional = 0;
-    break;
-  case 'n':
-    mutt_format_s (dest, destlen, fmt, NONULL (query->name));
-    break;
-  case 't':
-    snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
-    snprintf (dest, destlen, tmp, entry->tagged ? '*' : ' ');
-    break;
-  default:
-    snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
-    snprintf (dest, destlen, tmp, op);
-    break;
+    case 'a':
+      rfc822_write_address (buf2, sizeof (buf2), query->addr, 1);
+      mutt_format_s (dest, destlen, fmt, buf2);
+      break;
+    case 'c':
+      snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
+      snprintf (dest, destlen, tmp, query->num + 1);
+      break;
+    case 'e':
+      if (!optional)
+        mutt_format_s (dest, destlen, fmt, NONULL (query->other));
+      else if (!query->other || !*query->other)
+        optional = 0;
+      break;
+    case 'n':
+      mutt_format_s (dest, destlen, fmt, NONULL (query->name));
+      break;
+    case 't':
+      snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
+      snprintf (dest, destlen, tmp, entry->tagged ? '*' : ' ');
+      break;
+    default:
+      snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
+      snprintf (dest, destlen, tmp, op);
+      break;
   }
 
   if (optional)
index e37c6db38bb3b7cc735a46ce5a81e879a9c78f5f..ff3ad4195aea14f1a9ed3e60688628b57d0a2fd2 100644 (file)
@@ -44,12 +44,13 @@ static void mutt_update_recvattach_menu (ATTACH_CONTEXT *actx, MUTTMENU *menu, i
 
 static const char *Mailbox_is_read_only = N_("Mailbox is read-only.");
 
-#define CHECK_READONLY if (Context->readonly) \
-{\
-    mutt_flushinp (); \
-    mutt_error _(Mailbox_is_read_only); \
-    break; \
-}
+#define CHECK_READONLY                          \
+  if (Context->readonly)                        \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(Mailbox_is_read_only);         \
+    break;                                      \
+  }
 
 #define CURATTACH actx->idx[actx->v2r[menu->current]]
 
@@ -146,16 +147,16 @@ void mutt_update_tree (ATTACH_CONTEXT *actx)
  * %u = unlink
  */
 const char *mutt_attach_fmt (char *dest,
-    size_t destlen,
-    size_t col,
-    int cols,
-    char op,
-    const char *src,
-    const char *prefix,
-    const char *ifstring,
-    const char *elsestring,
-    unsigned long data,
-    format_flag flags)
+                             size_t destlen,
+                             size_t col,
+                             int cols,
+                             char op,
+                             const char *src,
+                             const char *prefix,
+                             const char *ifstring,
+                             const char *elsestring,
+                             unsigned long data,
+                             format_flag flags)
 {
   char fmt[16];
   char tmp[SHORT_STRING];
@@ -218,9 +219,9 @@ const char *mutt_attach_fmt (char *dest,
       }
       else if(aptr->content->description ||
              (mutt_is_message_type (aptr->content->type, aptr->content->subtype)
-             && MsgFmt && aptr->content->hdr))
+               && MsgFmt && aptr->content->hdr))
         break;
-    /* FALLS THROUGH TO 'F' */
+      /* FALLS THROUGH TO 'F' */
     case 'F':
       if (!optional)
       {
@@ -235,7 +236,7 @@ const char *mutt_attach_fmt (char *dest,
         optional = 0;
         break;
       }
-    /* FALLS THROUGH TO 'f' */
+      /* FALLS THROUGH TO 'f' */
     case 'f':
       if(!optional)
       {
@@ -262,7 +263,7 @@ const char *mutt_attach_fmt (char *dest,
     case 'e':
       if(!optional)
        mutt_format_s (dest, destlen, prefix,
-                     ENCODING (aptr->content->encoding));
+                       ENCODING (aptr->content->encoding));
       break;
     case 'I':
       if (!optional)
@@ -300,8 +301,9 @@ const char *mutt_attach_fmt (char *dest,
     case 'Q':
       if (optional)
         optional = aptr->content->attach_qualifies;
-      else {
-           snprintf (fmt, sizeof (fmt), "%%%sc", prefix);
+      else
+      {
+        snprintf (fmt, sizeof (fmt), "%%%sc", prefix);
         mutt_format_s (dest, destlen, fmt, "Q");
       }
       break;
@@ -520,7 +522,7 @@ void mutt_save_attachment_list (ATTACH_CONTEXT *actx, FILE *fp, int tag, BODY *t
          prepend_curdir (buf, sizeof (buf));
 
          if (mutt_get_field (_("Save to file: "), buf, sizeof (buf),
-                                   MUTT_FILE | MUTT_CLEAR) != 0 || !buf[0])
+                              MUTT_FILE | MUTT_CLEAR) != 0 || !buf[0])
            return;
          mutt_expand_path (buf, sizeof (buf));
          if (mutt_check_overwrite (top->filename, buf, tfile,
@@ -678,7 +680,7 @@ void mutt_pipe_attachment_list (ATTACH_CONTEXT *actx, FILE *fp, int tag, BODY *t
   state.flags = MUTT_CHARCONV;
 
   if (mutt_get_field ((filter ? _("Filter through: ") : _("Pipe to: ")),
-                                 buf, sizeof (buf), MUTT_CMD) != 0 || !buf[0])
+                      buf, sizeof (buf), MUTT_CMD) != 0 || !buf[0])
     return;
 
   mutt_expand_path (buf, sizeof (buf));
@@ -960,7 +962,7 @@ static void mutt_generate_recvattach_list (ATTACH_CONTEXT *actx,
         new_fp = NULL;
 
         secured = !crypt_smime_decrypt_mime (outer_fp, &new_fp, outer_new_body,
-                                               &new_body);
+                                             &new_body);
 
         mutt_free_body (&outer_new_body);
         safe_fclose (&outer_fp);
@@ -1092,12 +1094,13 @@ static void attach_collapse (ATTACH_CONTEXT *actx, MUTTMENU *menu)
 
 static const char *Function_not_permitted = N_("Function not permitted in attach-message mode.");
 
-#define CHECK_ATTACH if(option(OPTATTACHMSG)) \
-                    {\
-                       mutt_flushinp (); \
-                       mutt_error _(Function_not_permitted); \
-                       break; \
-                    }
+#define CHECK_ATTACH                            \
+  if (option(OPTATTACHMSG))                     \
+  {                                             \
+    mutt_flushinp ();                           \
+    mutt_error _(Function_not_permitted);       \
+    break;                                      \
+  }
 
 
 
@@ -1270,32 +1273,32 @@ void mutt_view_attachments (HEADER *hdr)
         break;
 
       case OP_UNDELETE:
-       CHECK_READONLY;
-       if (!menu->tagprefix)
-       {
-        CURATTACH->content->deleted = 0;
-        if (option (OPTRESOLVE) && menu->current < menu->max - 1)
-        {
-          menu->current++;
-          menu->redraw = REDRAW_MOTION_RESYNCH;
-        }
-        else
-          menu->redraw = REDRAW_CURRENT;
-       }
-       else
-       {
-        int x;
-
-        for (x = 0; x < menu->max; x++)
-        {
-          if (actx->idx[x]->content->tagged)
-          {
-            actx->idx[x]->content->deleted = 0;
-            menu->redraw = REDRAW_INDEX;
-          }
-        }
-       }
-       break;
+        CHECK_READONLY;
+        if (!menu->tagprefix)
+        {
+          CURATTACH->content->deleted = 0;
+          if (option (OPTRESOLVE) && menu->current < menu->max - 1)
+          {
+            menu->current++;
+            menu->redraw = REDRAW_MOTION_RESYNCH;
+          }
+          else
+            menu->redraw = REDRAW_CURRENT;
+        }
+        else
+        {
+          int x;
+
+          for (x = 0; x < menu->max; x++)
+          {
+            if (actx->idx[x]->content->tagged)
+            {
+              actx->idx[x]->content->deleted = 0;
+              menu->redraw = REDRAW_INDEX;
+            }
+          }
+        }
+        break;
 
       case OP_RESEND:
         CHECK_ATTACH;
index 3859bfcf4b5c2b765b4a540061ba479a66f64900..90e9f668133edcaf435230c9daf9223e88757ebe 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -121,7 +121,7 @@ static short count_tagged_children (ATTACH_CONTEXT *actx, short i)
  **/
 
 void mutt_attach_bounce (FILE * fp, HEADER * hdr,
-          ATTACH_CONTEXT *actx, BODY * cur)
+                         ATTACH_CONTEXT *actx, BODY * cur)
 {
   short i;
   char prompt[STRING];
@@ -199,7 +199,7 @@ void mutt_attach_bounce (FILE * fp, HEADER * hdr,
    * See commands.c.
    */
   snprintf (prompt, sizeof (prompt) - 4,
-   (p ? _("Bounce message to %s") : _("Bounce messages to %s")), buf);
+            (p ? _("Bounce message to %s") : _("Bounce messages to %s")), buf);
 
   if (mutt_strwidth (prompt) > MuttMessageWindow->cols - extra_space)
   {
@@ -489,7 +489,7 @@ static void attach_forward_bodies (FILE * fp, HEADER * hdr,
       && !check_can_decode (actx, cur))
   {
     if ((rc = query_quadoption (OPT_MIMEFWDREST,
-_("Can't decode all tagged attachments.  MIME-forward the others?"))) == -1)
+                                _("Can't decode all tagged attachments.  MIME-forward the others?"))) == -1)
       goto bail;
     else if (rc == MUTT_NO)
       mime_fwd_any = 0;
@@ -557,7 +557,7 @@ _("Can't decode all tagged attachments.  MIME-forward the others?"))) == -1)
   ci_send_message (0, tmphdr, tmpbody, NULL, parent_hdr);
   return;
 
-  bail:
+bail:
 
   if (tmpfp)
   {
@@ -581,7 +581,7 @@ _("Can't decode all tagged attachments.  MIME-forward the others?"))) == -1)
  */
 
 static void attach_forward_msgs (FILE * fp, HEADER * hdr,
-              ATTACH_CONTEXT *actx, BODY * cur)
+                                 ATTACH_CONTEXT *actx, BODY * cur)
 {
   HEADER *curhdr = NULL;
   HEADER *tmphdr;
@@ -615,7 +615,7 @@ static void attach_forward_msgs (FILE * fp, HEADER * hdr,
   tmpbody[0] = '\0';
 
   if ((rc = query_quadoption (OPT_MIMEFWD,
-                _("Forward MIME encapsulated?"))) == MUTT_NO)
+                              _("Forward MIME encapsulated?"))) == MUTT_NO)
   {
 
     /* no MIME encapsulation */
@@ -716,7 +716,7 @@ void mutt_attach_mail_sender (FILE *fp, HEADER *hdr, ATTACH_CONTEXT *actx,
   {
     /* L10N: You will see this error message if you invoke <compose-to-sender>
        when you are on a normal attachment.
-     */
+    */
     mutt_error _("You may only compose to sender with message/rfc822 parts.");
     return;
   }
@@ -897,7 +897,7 @@ void mutt_attach_reply (FILE * fp, HEADER * hdr,
   if (nattach > 1 && !check_can_decode (actx, cur))
   {
     if ((rc = query_quadoption (OPT_MIMEFWDREST,
-      _("Can't decode all tagged attachments.  MIME-encapsulate the others?"))) == -1)
+                                _("Can't decode all tagged attachments.  MIME-encapsulate the others?"))) == -1)
       return;
     else if (rc == MUTT_YES)
       mime_reply_any = 1;
@@ -996,6 +996,6 @@ void mutt_attach_reply (FILE * fp, HEADER * hdr,
   safe_fclose (&tmpfp);
 
   if (ci_send_message (flags, tmphdr, tmpbody, NULL,
-                         parent_hdr ? parent_hdr : (cur ? cur->hdr : NULL)) == 0)
+                       parent_hdr ? parent_hdr : (cur ? cur->hdr : NULL)) == 0)
     mutt_set_flag (Context, hdr, MUTT_REPLIED, 1);
 }
index 02a926a29f84e4def8aeff10531aad88666e70e9..0306fa502e4461ebbd09fdd4783b1dd396c53577 100644 (file)
@@ -194,7 +194,7 @@ static REMAILER **mix_type2_list (size_t *l)
     mix_add_entry (&type2_list, p, &slots, &used);
     continue;
 
-    problem:
+  problem:
     mix_free_remailer (&p);
   }
 
@@ -593,7 +593,7 @@ void mix_make_chain (LIST **chainp)
            (type2_list[chain->ch[chain->cl-1]]->caps & MIX_CAP_MIDDLEMAN))
        {
          mutt_error ( _("Error: %s can't be used as the final remailer of a chain."),
-                   type2_list[chain->ch[chain->cl - 1]]->shortname);
+                       type2_list[chain->ch[chain->cl - 1]]->shortname);
        }
        else
        {
@@ -623,7 +623,7 @@ void mix_make_chain (LIST **chainp)
        }
        else
          mutt_error ( _("Mixmaster chains are limited to %d elements."),
-                   MAXMIXES);
+                       MAXMIXES);
 
        break;
       }
index 06feb7e28ad3ed1d2619cc45396167567b3cc970..005bb551b4ffe1622df15dea3053133b942ff1d1 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -68,7 +68,7 @@ int mutt_buffer_rfc1524_expand_command (BODY *a, const char *filename, const cha
  * and 1 if the command works on a pipe.
  */
 int rfc1524_expand_command (BODY *a, const char *filename, const char *_type,
-    char *command, int clen)
+                            char *command, int clen)
 {
   int x=0,y=0;
   int needspipe = TRUE;
index f67fe652c9bc7344605bccd602e6d09755ccf7cd..f2f333d304ab3b046e26c3390dd42a5c86950383 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -119,13 +119,13 @@ int convert_nonmime_string (char **ps)
     }
   }
   mutt_convert_string (ps,
-      (const char *)mutt_get_default_charset (),
-      Charset, MUTT_ICONV_HOOK_FROM);
+                       (const char *)mutt_get_default_charset (),
+                       Charset, MUTT_ICONV_HOOK_FROM);
   return -1;
 }
 
 char *mutt_choose_charset (const char *fromcode, const char *charsets,
-                     char *u, size_t ulen, char **d, size_t *dlen)
+                           char *u, size_t ulen, char **d, size_t *dlen)
 {
   char canonical_buff[LONG_STRING];
   char *e = 0, *tocode = 0;
@@ -656,7 +656,7 @@ static int rfc2047_decode_word (BUFFER *d, const char *s, char **charset)
       while (pp1 && *(pp1 + 1) != '=')
        pp1 = strchr(pp1 + 1, '?');
       if (!pp1)
-         goto error_out_0;
+        goto error_out_0;
     }
 
     switch (count)
index 0194bf987b4db7bfd8eec8c9de41d8b770b3f766..4ccb1c3c6ed47157de84688494204acb4f0105ad 100644 (file)
--- a/rfc2047.h
+++ b/rfc2047.h
@@ -17,7 +17,7 @@
  */
 
 char *mutt_choose_charset (const char *fromcode, const char *charsets,
-                     char *u, size_t ulen, char **d, size_t *dlen);
+                           char *u, size_t ulen, char **d, size_t *dlen);
 int convert_nonmime_string (char **);
 
 void _rfc2047_encode_string (char **, int, int);
index 4891939149817591bc1a8d85d8a731dbc79f3ea7..437fdfa1a65598abfb1766b8b8f0f804b341de5e 100644 (file)
--- a/rfc2231.c
+++ b/rfc2231.c
@@ -49,8 +49,7 @@ struct rfc2231_parameter
   char *value;
   int  index;
   int  encoded;
-  struct rfc2231_parameter
-       *next;
+  struct rfc2231_parameter *next;
 };
 
 static char *rfc2231_get_charset (char *, char *, size_t);
@@ -333,7 +332,7 @@ int rfc2231_encode_string (char **pd)
 
   if (!Charset || !SendCharset ||
       !(charset = mutt_choose_charset (Charset, SendCharset,
-                                 *pd, strlen (*pd), &d, &dlen)))
+                                       *pd, strlen (*pd), &d, &dlen)))
   {
     charset = safe_strdup (Charset ? Charset : "unknown-8bit");
     d = *pd;
index 40370701a471605a7cce265e9f2d31d75b268bb8..d55da09cf28ac08b4aa8db7d7d9028e3b81ca4b7 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
 
 #include "mutt_idna.h"
 
-#define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \
-       a[(c)] = 0; } while (0)
+#define terminate_string(a, b, c)               \
+  do                                            \
+  {                                             \
+    if ((b) < (c))                              \
+      a[(b)] = 0;                               \
+    else                                        \
+      a[(c)] = 0;                               \
+  } while (0)
 
 #define terminate_buffer(a, b) terminate_string(a, b, sizeof (a) - 1)
 
diff --git a/send.c b/send.c
index d4b608b396d308e2931dcae9feaa4831cddc25f1..4a1f884f48745b821d377aed393acb1c298eadcb 100644 (file)
--- a/send.c
+++ b/send.c
@@ -471,9 +471,9 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto)
     if ((mutt_addrcmp (env->from, env->reply_to) && !env->reply_to->next &&
          !env->reply_to->personal) ||
        (option (OPTIGNORELISTREPLYTO) &&
-       mutt_is_mail_list (env->reply_to) &&
-       (mutt_addrsrc (env->reply_to, env->to) ||
-       mutt_addrsrc (env->reply_to, env->cc))))
+         mutt_is_mail_list (env->reply_to) &&
+         (mutt_addrsrc (env->reply_to, env->to) ||
+          mutt_addrsrc (env->reply_to, env->cc))))
     {
       /* If the Reply-To: address is a mailing list, assume that it was
        * put there by the mailing list, and use the From: address
@@ -502,16 +502,16 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto)
                env->reply_to->next?",...":"");
       switch (query_quadoption (OPT_REPLYTO, prompt))
       {
-      case MUTT_YES:
-       rfc822_append (to, env->reply_to, 0);
-       break;
+        case MUTT_YES:
+          rfc822_append (to, env->reply_to, 0);
+          break;
 
-      case MUTT_NO:
-       rfc822_append (to, env->from, 0);
-       break;
+        case MUTT_NO:
+          rfc822_append (to, env->from, 0);
+          break;
 
-      default:
-       return (-1); /* abort */
+        default:
+          return (-1); /* abort */
       }
     }
     else
@@ -619,7 +619,7 @@ void mutt_make_forward_subject (ENVELOPE *env, CONTEXT *ctx, HEADER *cur)
 }
 
 void mutt_make_misc_reply_headers (ENVELOPE *env, CONTEXT *ctx,
-                                   HEADER *cur, ENVELOPE *curenv)
+                                   HEADER *cur, ENVELOPE *curenv)
 {
   /* This takes precedence over a subject that might have
    * been taken from a List-Post header.  Is that correct?
@@ -1036,9 +1036,9 @@ static int send_message (HEADER *msg)
 
 #if USE_SMTP
   if (SmtpUrl)
-      return mutt_smtp_send (msg->env->from, msg->env->to, msg->env->cc,
-                             msg->env->bcc, tempfile,
-                             (msg->content->encoding == ENC8BIT));
+    return mutt_smtp_send (msg->env->from, msg->env->to, msg->env->cc,
+                           msg->env->bcc, tempfile,
+                           (msg->content->encoding == ENC8BIT));
 #endif /* USE_SMTP */
 
   i = mutt_invoke_sendmail (msg->env->from, msg->env->to, msg->env->cc,
@@ -1282,7 +1282,7 @@ int mutt_resend_message (FILE *fp, CONTEXT *ctx, HEADER *cur)
 static int is_reply (HEADER *reply, HEADER *orig)
 {
   return mutt_find_list (orig->env->references, reply->env->message_id) ||
-         mutt_find_list (orig->env->in_reply_to, reply->env->message_id);
+    mutt_find_list (orig->env->in_reply_to, reply->env->message_id);
 }
 
 static int has_recips (ADDRESS *a)
@@ -1643,7 +1643,7 @@ ci_send_message (int flags,               /* send mode */
       process_user_header (msg->env);
 
     if (flags & SENDBATCH)
-       mutt_copy_stream (stdin, tempfp);
+      mutt_copy_stream (stdin, tempfp);
 
     if (option (OPTSIGONTOP) && ! (flags & (SENDMAILX|SENDKEY|SENDBATCH))
        && Editor && mutt_strcmp (Editor, "builtin") != 0)
@@ -1810,7 +1810,7 @@ ci_send_message (int flags,               /* send mode */
            && (cur->security & APPLICATION_PGP))
          msg->security |= APPLICATION_PGP;
        else if ((WithCrypto & APPLICATION_SMIME) && option (OPTCRYPTAUTOSMIME)
-           && (cur->security & APPLICATION_SMIME))
+                 && (cur->security & APPLICATION_SMIME))
          msg->security |= APPLICATION_SMIME;
       }
 
index 75947ca1fe16409aa4a56b85e80190c4de52f84a..5a8724d402d4352604515deadb59359d862bbbff 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -407,9 +407,9 @@ int mutt_write_mime_header (BODY *a, FILE *f)
   return (ferror (f) ? -1 : 0);
 }
 
-# define write_as_text_part(a)  (mutt_is_text_part(a) \
-                                 || ((WithCrypto & APPLICATION_PGP)\
-                                      && mutt_is_application_pgp(a)))
+#define write_as_text_part(a)                                           \
+  (mutt_is_text_part(a) ||                                              \
+   ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(a)))
 
 int mutt_write_mime_body (BODY *a, FILE *f)
 {
@@ -1032,7 +1032,7 @@ int mutt_lookup_mime_type (BODY *att, const char *path)
     }
   }
 
- bye:
+bye:
 
   if (type != TYPEOTHER || *xtype != '\0')
   {
@@ -1090,7 +1090,7 @@ void mutt_message_to_7bit (BODY *a, FILE *fp)
   fputc ('\n', fpout);
   mutt_write_mime_body (a->parts, fpout);
 
- cleanup:
+cleanup:
   FREE (&line);
 
   if (fpin && fpin != fp)
@@ -1204,7 +1204,7 @@ static void mutt_set_encoding (BODY *b, CONTENT *info)
   {
     /* Determine which encoding is smaller  */
     if (1.33 * (float)(info->lobin+info->hibin+info->ascii) <
-        3.0 * (float)(info->lobin + info->hibin) + (float)info->ascii)
+        3.0 * (float)(info->lobin + info->hibin) + (float)info->ascii)
       b->encoding = ENCBASE64;
     else
       b->encoding = ENCQUOTEDPRINTABLE;
@@ -1672,7 +1672,7 @@ static int print_val (FILE *fp, const char *pfx, const char *value,
 }
 
 static int fold_one_header (FILE *fp, const char *tag, const char *value,
-                             const char *pfx, int wraplen, int flags)
+                            const char *pfx, int wraplen, int flags)
 {
   const char *p = value, *next, *sp;
   char buf[HUGE_STRING] = "";
@@ -2324,7 +2324,7 @@ send_msg (const char *path, char **args, const char *msg, char **tempfile)
     else
     {
       st = (SendmailWait > 0 && errno == EINTR && SigAlrm) ?
-             S_BKG : S_ERR;
+        S_BKG : S_ERR;
       if (SendmailWait > 0 && tempfile && *tempfile)
       {
        unlink (*tempfile);
@@ -2385,9 +2385,9 @@ add_option (char **args, size_t *argslen, size_t *argsmax, char *s)
 
 int
 mutt_invoke_sendmail (ADDRESS *from,   /* the sender */
-                ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
-                const char *msg, /* file containing message */
-                int eightbit) /* message contains 8bit chars */
+                      ADDRESS *to, ADDRESS *cc, ADDRESS *bcc, /* recips */
+                      const char *msg, /* file containing message */
+                      int eightbit) /* message contains 8bit chars */
 {
   char *ps = NULL, *path = NULL, *s = safe_strdup (Sendmail), *childout = NULL;
   char **args = NULL;
@@ -2575,7 +2575,7 @@ void mutt_unprepare_envelope (ENVELOPE *env)
 }
 
 static int _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *resent_from,
-                                 ADDRESS *env_from)
+                                 ADDRESS *env_from)
 {
   int i, ret = 0;
   FILE *f;
@@ -2584,7 +2584,7 @@ static int _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *r
 
   if (!h)
   {
-         /* Try to bounce each message out, aborting if we get any failures. */
+    /* Try to bounce each message out, aborting if we get any failures. */
     for (i=0; i<Context->msgcount; i++)
       if (Context->hdrs[i]->tagged)
         ret |= _mutt_bounce_message (fp, Context->hdrs[i], to, resent_from, env_from);
@@ -2625,8 +2625,8 @@ static int _mutt_bounce_message (FILE *fp, HEADER *h, ADDRESS *to, const char *r
                             h->content->encoding == ENC8BIT);
     else
 #endif /* USE_SMTP */
-    ret = mutt_invoke_sendmail (env_from, to, NULL, NULL, tempfile,
-                               h->content->encoding == ENC8BIT);
+      ret = mutt_invoke_sendmail (env_from, to, NULL, NULL, tempfile,
+                                  h->content->encoding == ENC8BIT);
   }
 
   if (msg)
@@ -2850,17 +2850,19 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post,
       && post && (hdr->security & APPLICATION_SMIME))
   {
     fputs ("X-Mutt-SMIME: ", msg->fp);
-    if (hdr->security & ENCRYPT) {
-       fputc ('E', msg->fp);
-       if (SmimeCryptAlg && *SmimeCryptAlg)
-           fprintf (msg->fp, "C<%s>", SmimeCryptAlg);
+    if (hdr->security & ENCRYPT)
+    {
+      fputc ('E', msg->fp);
+      if (SmimeCryptAlg && *SmimeCryptAlg)
+        fprintf (msg->fp, "C<%s>", SmimeCryptAlg);
     }
     if (hdr->security & OPPENCRYPT)
       fputc ('O', msg->fp);
-    if (hdr->security & SIGN) {
-       fputc ('S', msg->fp);
-       if (SmimeSignAs && *SmimeSignAs)
-           fprintf (msg->fp, "<%s>", SmimeSignAs);
+    if (hdr->security & SIGN)
+    {
+      fputc ('S', msg->fp);
+      if (SmimeSignAs && *SmimeSignAs)
+        fprintf (msg->fp, "<%s>", SmimeSignAs);
     }
     if (hdr->security & INLINE)
       fputc ('I', msg->fp);
index 36fe7def447fd2b127e9d4a670c99371a19f24d0..cb2c7ffeeb4c130b49cc0cd84bb85bd1983dc0cb 100644 (file)
--- a/setenv.c
+++ b/setenv.c
 int
 setenv(const char *name, const char *value, int overwrite)
 {
-    char *envstring;
+  char *envstring;
 
-    if (!overwrite && getenv(name) != NULL)
-        return 0;
+  if (!overwrite && getenv(name) != NULL)
+    return 0;
 
-    /* Allocate memory for the environment string.  We intentionally don't
-       use concat here, or the xmalloc family of allocation routines, since
-       the intention is to provide a replacement for the standard library
-       function which sets errno and returns in the event of a memory
-       allocation failure. */
-    envstring = malloc(strlen(name) + 1 + strlen(value) + 1); /* __MEM_CHECKED__ */
-    if (envstring == NULL)
-        return -1;
+  /* Allocate memory for the environment string.  We intentionally don't
+     use concat here, or the xmalloc family of allocation routines, since
+     the intention is to provide a replacement for the standard library
+     function which sets errno and returns in the event of a memory
+     allocation failure. */
+  envstring = malloc(strlen(name) + 1 + strlen(value) + 1); /* __MEM_CHECKED__ */
+  if (envstring == NULL)
+    return -1;
 
-    /* Build the environment string and add it to the environment using
-       putenv.  Systems without putenv lose, but XPG4 requires it. */
-    strcpy(envstring, name);  /* __STRCPY_CHECKED__ */
-    strcat(envstring, "=");   /* __STRCAT_CHECKED__ */
-    strcat(envstring, value); /* __STRCAT_CHECKED__ */
-    return putenv(envstring);
+  /* Build the environment string and add it to the environment using
+     putenv.  Systems without putenv lose, but XPG4 requires it. */
+  strcpy(envstring, name);  /* __STRCPY_CHECKED__ */
+  strcat(envstring, "=");   /* __STRCAT_CHECKED__ */
+  strcat(envstring, value); /* __STRCAT_CHECKED__ */
+  return putenv(envstring);
 
-    /* Note that the memory allocated is not freed.  This is intentional;
-       many implementations of putenv assume that the string passed to
-       putenv will never be freed and don't make a copy of it.  Repeated use
-       of this function will therefore leak memory, since most
-       implementations of putenv also don't free strings removed from the
-       environment (due to being overwritten). */
+  /* Note that the memory allocated is not freed.  This is intentional;
+     many implementations of putenv assume that the string passed to
+     putenv will never be freed and don't make a copy of it.  Repeated use
+     of this function will therefore leak memory, since most
+     implementations of putenv also don't free strings removed from the
+     environment (due to being overwritten). */
 }
index a88da83e382307694bcc8906ab5c5079d8b50cf8..c43dcb0c4f9bd0068228f9104aa9cee4e38d3f75 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -572,7 +572,7 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
     else if (b->msg_flagged > 0)
       SETCOLOR(MT_COLOR_FLAGGED);
     else if ((ColorDefs[MT_COLOR_SB_SPOOLFILE] != 0) &&
-               (mutt_strcmp (b->path, Spoolfile) == 0))
+             (mutt_strcmp (b->path, Spoolfile) == 0))
       SETCOLOR(MT_COLOR_SB_SPOOLFILE);
     else
       SETCOLOR(MT_COLOR_NORMAL);
@@ -641,7 +641,7 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
         if (option (OPTSIDEBARSHORTPATH))
           tmp_folder_name += lastsep;  /* basename */
         int sfn_len = mutt_strlen (tmp_folder_name) +
-                      sidebar_folder_depth*mutt_strlen (SidebarIndentString) + 1;
+          sidebar_folder_depth*mutt_strlen (SidebarIndentString) + 1;
         sidebar_folder_name = safe_malloc (sfn_len);
         sidebar_folder_name[0]=0;
         for (i=0; i < sidebar_folder_depth; i++)
diff --git a/smime.c b/smime.c
index cd1a7c872cc6697d78bb40ecd456896ebb72883b..f14b295cde55976bd5ac0fb0d02c0ec52a26953f 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -139,10 +139,10 @@ int smime_valid_passphrase (void)
   smime_void_passphrase();
 
   if (mutt_get_password (_("Enter S/MIME passphrase:"), SmimePass, sizeof (SmimePass)) == 0)
-    {
-      SmimeExptime = mutt_add_timeout (time (NULL), SmimeTimeout);
-      return (1);
-    }
+  {
+    SmimeExptime = mutt_add_timeout (time (NULL), SmimeTimeout);
+    return (1);
+  }
   else
     SmimeExptime = 0;
 
@@ -300,7 +300,7 @@ static void mutt_smime_command (char *d, size_t dlen,
                                struct smime_command_context *cctx, const char *fmt)
 {
   mutt_FormatString (d, dlen, 0, MuttIndexWindow->cols, NONULL(fmt), _mutt_fmt_smime_command,
-                   (unsigned long) cctx, 0);
+                     (unsigned long) cctx, 0);
   dprint (2,(debugfile, "mutt_smime_command: %s\n", d));
 }
 
@@ -428,14 +428,14 @@ static smime_key_t *smime_select_key (smime_key_t *keys, char *query)
   }
 
   snprintf(title, sizeof(title), _("S/MIME certificates matching \"%s\"."),
-    query);
+           query);
 
   /* Make Helpstring */
   helpstr[0] = 0;
   mutt_make_help (buf, sizeof (buf), _("Exit  "), MENU_SMIME, OP_EXIT);
   strcat (helpstr, buf);       /* __STRCAT_CHECKED__ */
   mutt_make_help (buf, sizeof (buf), _("Select  "), MENU_SMIME,
-      OP_GENERIC_SELECT_ENTRY);
+                  OP_GENERIC_SELECT_ENTRY);
   strcat (helpstr, buf);       /* __STRCAT_CHECKED__ */
   mutt_make_help (buf, sizeof(buf), _("Help"), MENU_SMIME, OP_HELP);
   strcat (helpstr, buf);       /* __STRCAT_CHECKED__ */
@@ -593,7 +593,7 @@ static smime_key_t *smime_get_candidates(char *search, short public)
   results_end = &results;
 
   snprintf(index_file, sizeof (index_file), "%s/.index",
-    public ? NONULL(SmimeCertificates) : NONULL(SmimeKeys));
+           public ? NONULL(SmimeCertificates) : NONULL(SmimeKeys));
 
   if ((fp = safe_fopen (index_file, "r")) == NULL)
   {
@@ -780,8 +780,8 @@ smime_key_t *smime_ask_for_key(char *prompt, short abilities, short public)
 
 
 /*
-   This sets the '*ToUse' variables for an upcoming decryption, where
-   the required key is different from SmimeDefaultKey.
+  This sets the '*ToUse' variables for an upcoming decryption, where
+  the required key is different from SmimeDefaultKey.
 */
 
 void _smime_getkeys (char *mailbox)
@@ -929,7 +929,7 @@ char *smime_findKeys (ADDRESS *adrlist, int oppenc_mode)
 
 
 static int smime_handle_cert_email (char *certificate, char *mailbox,
-                                  int copy, char ***buffer, int *num)
+                                    int copy, char ***buffer, int *num)
 {
   FILE *fpout = NULL, *fperr = NULL;
   char tmpfname[_POSIX_PATH_MAX];
@@ -1311,18 +1311,18 @@ int smime_verify_sender(HEADER *h)
       if (smime_handle_cert_email (certfile, mbox, 0, NULL, NULL))
       {
        if(isendwin())
-         mutt_any_key_to_continue(NULL);
+          mutt_any_key_to_continue(NULL);
       }
       else
        retval = 0;
       mutt_unlink(certfile);
       FREE (&certfile);
     }
-  else
-       mutt_any_key_to_continue(_("no certfile"));
+    else
+      mutt_any_key_to_continue(_("no certfile"));
   }
   else
-       mutt_any_key_to_continue(_("no mbox"));
+    mutt_any_key_to_continue(_("no mbox"));
 
   mutt_unlink(tempfname);
   return retval;
@@ -1565,10 +1565,10 @@ BODY *smime_sign_message (BODY *a )
 
 
   snprintf (SmimeKeyToUse, sizeof (SmimeKeyToUse), "%s/%s",
-          NONULL(SmimeKeys), signas);
+            NONULL(SmimeKeys), signas);
 
   snprintf (SmimeCertToUse, sizeof (SmimeCertToUse), "%s/%s",
-          NONULL(SmimeCertificates), signas);
+            NONULL(SmimeCertificates), signas);
 
   signas_key = smime_get_key_by_hash (signas, 1);
   if ((! signas_key) ||
@@ -1578,14 +1578,14 @@ BODY *smime_sign_message (BODY *a )
     intermediates = signas_key->issuer;
 
   snprintf (SmimeIntermediateToUse, sizeof (SmimeIntermediateToUse), "%s/%s",
-          NONULL(SmimeCertificates), intermediates);
+            NONULL(SmimeCertificates), intermediates);
 
   smime_free_key (&signas_key);
 
 
 
   if ((thepid = smime_invoke_sign (&smimein, NULL, &smimeerr,
-                                -1, fileno (smimeout), -1, filetosign)) == -1)
+                                   -1, fileno (smimeout), -1, filetosign)) == -1)
   {
     mutt_perror _("Can't open OpenSSL subprocess!");
     safe_fclose (&smimeout);
@@ -1644,7 +1644,7 @@ BODY *smime_sign_message (BODY *a )
   FREE (&micalg);
 
   mutt_set_parameter ("protocol", "application/x-pkcs7-signature",
-                    &t->parameter);
+                      &t->parameter);
 
   t->parts = a;
   a = t;
@@ -1763,8 +1763,8 @@ int smime_verify_one (BODY *sigbdy, STATE *s, const char *tempfile)
   crypt_current_time (s, "OpenSSL");
 
   if ((thepid = smime_invoke_verify (NULL, &smimeout, NULL,
-                                  -1, -1, fileno (smimeerr),
-                                  tempfile, signedfile, 0)) != -1)
+                                     -1, -1, fileno (smimeerr),
+                                     tempfile, signedfile, 0)) != -1)
   {
     fflush (smimeout);
     safe_fclose (&smimeout);
@@ -2191,124 +2191,124 @@ int smime_send_menu (HEADER *msg)
   {
     switch (choices[choice - 1])
     {
-    case 'e': /* (e)ncrypt */
-      msg->security |= ENCRYPT;
-      msg->security &= ~SIGN;
-      break;
+      case 'e': /* (e)ncrypt */
+        msg->security |= ENCRYPT;
+        msg->security &= ~SIGN;
+        break;
 
-    case 'w': /* encrypt (w)ith */
+      case 'w': /* encrypt (w)ith */
       {
         msg->security |= ENCRYPT;
         do
         {
           /* I use "dra" because "123" is recognized anyway */
           switch (mutt_multi_choice (_("Choose algorithm family:"
-                                      " 1: DES, 2: RC2, 3: AES,"
-                                      " or (c)lear? "),
-                                    _("drac")))
+                                       " 1: DES, 2: RC2, 3: AES,"
+                                       " or (c)lear? "),
+                                     _("drac")))
           {
-          case 1:
-            switch (choice = mutt_multi_choice (_("1: DES, 2: Triple-DES "),
-                                                _("dt")))
-            {
             case 1:
-              mutt_str_replace (&SmimeCryptAlg, "des");
+              switch (choice = mutt_multi_choice (_("1: DES, 2: Triple-DES "),
+                                                  _("dt")))
+              {
+                case 1:
+                  mutt_str_replace (&SmimeCryptAlg, "des");
+                  break;
+                case 2:
+                  mutt_str_replace (&SmimeCryptAlg, "des3");
+                  break;
+              }
               break;
-            case 2:
-              mutt_str_replace (&SmimeCryptAlg, "des3");
-              break;
-            }
-            break;
 
-          case 2:
-            switch (choice = mutt_multi_choice (_("1: RC2-40, 2: RC2-64, 3: RC2-128 "),
-                                                _("468")))
-            {
-            case 1:
-              mutt_str_replace (&SmimeCryptAlg, "rc2-40");
-              break;
             case 2:
-              mutt_str_replace (&SmimeCryptAlg, "rc2-64");
-              break;
-            case 3:
-              mutt_str_replace (&SmimeCryptAlg, "rc2-128");
+              switch (choice = mutt_multi_choice (_("1: RC2-40, 2: RC2-64, 3: RC2-128 "),
+                                                  _("468")))
+              {
+                case 1:
+                  mutt_str_replace (&SmimeCryptAlg, "rc2-40");
+                  break;
+                case 2:
+                  mutt_str_replace (&SmimeCryptAlg, "rc2-64");
+                  break;
+                case 3:
+                  mutt_str_replace (&SmimeCryptAlg, "rc2-128");
+                  break;
+              }
               break;
-            }
-            break;
 
-          case 3:
-            switch (choice = mutt_multi_choice (_("1: AES128, 2: AES192, 3: AES256 "),
-                                                _("895")))
-            {
-            case 1:
-              mutt_str_replace (&SmimeCryptAlg, "aes128");
-              break;
-            case 2:
-              mutt_str_replace (&SmimeCryptAlg, "aes192");
-              break;
             case 3:
-              mutt_str_replace (&SmimeCryptAlg, "aes256");
+              switch (choice = mutt_multi_choice (_("1: AES128, 2: AES192, 3: AES256 "),
+                                                  _("895")))
+              {
+                case 1:
+                  mutt_str_replace (&SmimeCryptAlg, "aes128");
+                  break;
+                case 2:
+                  mutt_str_replace (&SmimeCryptAlg, "aes192");
+                  break;
+                case 3:
+                  mutt_str_replace (&SmimeCryptAlg, "aes256");
+                  break;
+              }
               break;
-            }
-            break;
 
-          case 4: /* (c)lear */
-            FREE (&SmimeCryptAlg);
-            /* fallback */
-          case -1: /* Ctrl-G or Enter */
-            choice = 0;
-            break;
+            case 4: /* (c)lear */
+              FREE (&SmimeCryptAlg);
+              /* fallback */
+            case -1: /* Ctrl-G or Enter */
+              choice = 0;
+              break;
           }
         } while (choice == -1);
       }
       break;
 
-    case 's': /* (s)ign */
-      msg->security &= ~ENCRYPT;
-      msg->security |= SIGN;
-      break;
+      case 's': /* (s)ign */
+        msg->security &= ~ENCRYPT;
+        msg->security |= SIGN;
+        break;
 
-    case 'S': /* (s)ign in oppenc mode */
-      msg->security |= SIGN;
-      break;
+      case 'S': /* (s)ign in oppenc mode */
+        msg->security |= SIGN;
+        break;
 
-    case 'a': /* sign (a)s */
+      case 'a': /* sign (a)s */
 
-      if ((key = smime_ask_for_key (_("Sign as: "), KEYFLAG_CANSIGN, 0)))
-      {
-        mutt_str_replace (&SmimeSignAs, key->hash);
-        smime_free_key (&key);
+        if ((key = smime_ask_for_key (_("Sign as: "), KEYFLAG_CANSIGN, 0)))
+        {
+          mutt_str_replace (&SmimeSignAs, key->hash);
+          smime_free_key (&key);
 
-        msg->security |= SIGN;
+          msg->security |= SIGN;
 
-        /* probably need a different passphrase */
-        crypt_smime_void_passphrase ();
-      }
+          /* probably need a different passphrase */
+          crypt_smime_void_passphrase ();
+        }
 
-      break;
+        break;
 
-    case 'b': /* (b)oth */
-      msg->security |= (ENCRYPT | SIGN);
-      break;
+      case 'b': /* (b)oth */
+        msg->security |= (ENCRYPT | SIGN);
+        break;
 
-    case 'f': /* (f)orget it: kept for backward compatibility. */
-    case 'c': /* (c)lear */
-      msg->security &= ~(ENCRYPT | SIGN);
-      break;
+      case 'f': /* (f)orget it: kept for backward compatibility. */
+      case 'c': /* (c)lear */
+        msg->security &= ~(ENCRYPT | SIGN);
+        break;
 
-    case 'F': /* (f)orget it or (c)lear in oppenc mode */
-    case 'C':
-      msg->security &= ~SIGN;
-      break;
+      case 'F': /* (f)orget it or (c)lear in oppenc mode */
+      case 'C':
+        msg->security &= ~SIGN;
+        break;
 
-    case 'O': /* oppenc mode on */
-      msg->security |= OPPENCRYPT;
-      crypt_opportunistic_encrypt (msg);
-      break;
+      case 'O': /* oppenc mode on */
+        msg->security |= OPPENCRYPT;
+        crypt_opportunistic_encrypt (msg);
+        break;
 
-    case 'o': /* oppenc mode off */
-      msg->security &= ~OPPENCRYPT;
-      break;
+      case 'o': /* oppenc mode off */
+        msg->security &= ~OPPENCRYPT;
+        break;
     }
   }
 
diff --git a/smtp.c b/smtp.c
index afd906595c9475569d6c97852378de7a5266fc0b..dd69f8270dddf07f73de52eadc287b6b2377cc71 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -136,7 +136,7 @@ smtp_get_resp (CONNECTION * conn)
     return 0;
 
   mutt_error (_("SMTP session failed: %s"), buf);
-    return -1;
+  return -1;
 }
 
 static int
@@ -435,9 +435,9 @@ static int smtp_helo (CONNECTION* conn)
 
   snprintf (buf, sizeof (buf), "%s %s\r\n", Esmtp ? "EHLO" : "HELO", fqdn);
   /* XXX there should probably be a wrapper in mutt_socket.c that
-    * repeatedly calls conn->write until all data is sent.  This
-    * currently doesn't check for a short write.
-    */
+   * repeatedly calls conn->write until all data is sent.  This
+   * currently doesn't check for a short write.
+   */
   if (mutt_socket_write (conn, buf) == -1)
     return smtp_err_write;
   return smtp_get_resp (conn);
diff --git a/sort.c b/sort.c
index 47dada8a821b7b859cbbe6cafbb8ec0faaf811ea..721a600e32cd1849293484fb305af789214f6694 100644 (file)
--- a/sort.c
+++ b/sort.c
 /* function to use as discriminator when normal sort method is equal */
 static sort_t *AuxSort = NULL;
 
-#define AUXSORT(code,a,b) if (!code && AuxSort && !option(OPTAUXSORT)) { \
-  set_option(OPTAUXSORT); \
-  code = AuxSort(a,b); \
-  unset_option(OPTAUXSORT); \
-  if (code) \
-    return (code); \
-} \
-if (!code) \
-  code = (*((HEADER **)a))->index - (*((HEADER **)b))->index;
+#define AUXSORT(code,a,b)                                       \
+  if (!code && AuxSort && !option(OPTAUXSORT))                  \
+  {                                                             \
+    set_option(OPTAUXSORT);                                     \
+    code = AuxSort(a,b);                                        \
+    unset_option(OPTAUXSORT);                                   \
+    if (code)                                                   \
+      return (code);                                            \
+  }                                                             \
+  if (!code)                                                    \
+    code = (*((HEADER **)a))->index - (*((HEADER **)b))->index;
 
 static int compare_score (const void *a, const void *b)
 {
index 364c3fa75ad83beb3e3daac16de9e0b80e979274..ac59fdce9fbeef7beab80f2123407a7bc5a486d9 100644 (file)
--- a/status.c
+++ b/status.c
@@ -98,18 +98,20 @@ status_format_str (char *buf, size_t buflen, size_t col, int cols, char op, cons
     case 'f':
       snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
 #ifdef USE_COMPRESSED
-      if (Context && Context->compress_info && Context->realpath) {
-        strfcpy (tmp, Context->realpath, sizeof (tmp));
-        mutt_pretty_mailbox (tmp, sizeof (tmp));
-      } else
-#endif
-      if (Context && Context->path)
+      if (Context && Context->compress_info && Context->realpath)
       {
-       strfcpy (tmp, Context->path, sizeof (tmp));
-       mutt_pretty_mailbox (tmp, sizeof (tmp));
+        strfcpy (tmp, Context->realpath, sizeof (tmp));
+        mutt_pretty_mailbox (tmp, sizeof (tmp));
       }
       else
-       strfcpy (tmp, _("(no mailbox)"), sizeof (tmp));
+#endif
+        if (Context && Context->path)
+        {
+          strfcpy (tmp, Context->path, sizeof (tmp));
+          mutt_pretty_mailbox (tmp, sizeof (tmp));
+        }
+        else
+          strfcpy (tmp, _("(no mailbox)"), sizeof (tmp));
       snprintf (buf, buflen, fmt, tmp);
       break;
 
index c8c767544c26b7adb071f3976347ffd82ccfd606..5c6adda2d0272af44ee50114bc1e53ab0b1bfb0b 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -261,7 +261,7 @@ void mutt_draw_tree (CONTEXT *ctx)
        myarrow[0] = vtee;
       if (width == 2)
        myarrow[1] = pseudo ?  MUTT_TREE_STAR
-                            : (tree->duplicate_thread ? MUTT_TREE_EQUALS : MUTT_TREE_HLINE);
+          : (tree->duplicate_thread ? MUTT_TREE_EQUALS : MUTT_TREE_HLINE);
       if (tree->visible)
       {
        myarrow[width] = MUTT_TREE_RARROW;
@@ -1131,7 +1131,7 @@ void mutt_set_virtual (CONTEXT *ctx)
       ctx->v2r[ctx->vcount] = i;
       ctx->vcount++;
       ctx->vsize += cur->content->length + cur->content->offset -
-                    cur->content->hdr_offset + padding;
+        cur->content->hdr_offset + padding;
       cur->num_hidden = mutt_get_hidden (ctx, cur);
     }
   }
diff --git a/txt2c.c b/txt2c.c
index a9164a3cd48c58a7eb3f86d43cb8d55dfc2bf6b9..5a74cc98bc459a3401fc11bb0b7e3e5af199c62b 100644 (file)
--- a/txt2c.c
+++ b/txt2c.c
@@ -5,33 +5,35 @@
 void
 txt2c(char *sym, FILE *fp)
 {
-       unsigned char buf[per_line];
-       int i;
-       int sz = 0;
+  unsigned char buf[per_line];
+  int i;
+  int sz = 0;
 
-       printf("unsigned char %s[] = {\n", sym);
-       while (1) {
-               sz = fread(buf, sizeof(unsigned char), per_line, fp);
-               if (sz == 0)
-                       break;
-               printf("\t");
-               for (i = 0; i < sz; i++)
-                       printf("0x%02x, ", buf[i]);
-               printf("\n");
-       }
+  printf("unsigned char %s[] = {\n", sym);
+  while (1)
+  {
+    sz = fread(buf, sizeof(unsigned char), per_line, fp);
+    if (sz == 0)
+      break;
+    printf("\t");
+    for (i = 0; i < sz; i++)
+      printf("0x%02x, ", buf[i]);
+    printf("\n");
+  }
 
-       printf("\t0x00\n};\n");
+  printf("\t0x00\n};\n");
 }
 
 
 int
 main(int argc, char *argv[])
 {
-       if (argc != 2) {
-               fprintf(stderr, "usage: %s symbol <textfile >textfile.c\n", argv[0]);
-               return 2;
-       }
+  if (argc != 2)
+  {
+    fprintf(stderr, "usage: %s symbol <textfile >textfile.c\n", argv[0]);
+    return 2;
+  }
 
-       txt2c(argv[1], stdin);
-       return 0;
+  txt2c(argv[1], stdin);
+  return 0;
 }
diff --git a/utf8.c b/utf8.c
index d1d06770459160a5d0c6ddea42ba92aa01ee7cba..a06f03bea87ffa413b4125456fc9d0801bf84477 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -22,7 +22,7 @@ int mutt_wctoutf8 (char *s, unsigned int c, size_t buflen)
   else if (c < (1 << 11))
   {
     if (s && buflen >= 2)
-     {
+    {
       *s++ = 0xc0 | (c >> 6);
       *s++ = 0x80 | (c & 0x3f);
     }