Make the asterix more consistently be next to the variable.  That is,
change "int* foo" to "int *foo".

This was done by a script that looked for basic C types (int, short,
char, float, etc) along with struct, xxx_t, and all caps words,
immediately followed by one or more "*", whitespace, and a word.

So, there is a chance it missed a few cases, but seems to have gotten
them all.
---
 account.c            |  18 +++---
 account.h            |  18 +++---
 ascii.h              |   4 +-
 bcache.c             |  14 ++---
 bcache.h             |   6 +-
 buffer.c             |  12 ++--
 buffy.c              |  14 ++---
 compose.c            |   2 +-
 crypt-gpgme.c        |  12 ++--
 crypt-gpgme.h        |   2 +-
 crypt.c              |   2 +-
 curs_lib.c           |   4 +-
 edit.c               |   4 +-
 hcache.c             |  26 ++++----
 hcache.h             |   4 +-
 hook.c               |   4 +-
 imap/auth.c          |  10 +--
 imap/auth.h          |  20 +++---
 imap/auth_anon.c     |   2 +-
 imap/auth_cram.c     |  10 +--
 imap/auth_gss.c      |   2 +-
 imap/auth_login.c    |   2 +-
 imap/auth_oauth.c    |   6 +-
 imap/auth_sasl.c     |   8 +--
 imap/auth_sasl_gnu.c |   2 +-
 imap/browse.c        |  20 +++---
 imap/command.c       | 104 +++++++++++++++---------------
 imap/imap.c          | 146 +++++++++++++++++++++----------------------
 imap/imap.h          |  28 ++++-----
 imap/imap_private.h  | 112 ++++++++++++++++-----------------
 imap/message.c       |  76 +++++++++++-----------
 imap/message.h       |   2 +-
 imap/util.c          |  56 ++++++++---------
 init.c               |  36 +++++------
 menu.c               |   4 +-
 mh.c                 |  18 +++---
 mutt_crypt.h         |   2 +-
 mutt_curses.h        |   6 +-
 mutt_sasl.c          |  74 +++++++++++-----------
 mutt_sasl.h          |  20 +++---
 mutt_sasl_gnu.c      |   2 +-
 mutt_socket.c        |  44 ++++++-------
 mutt_socket.h        |  20 +++---
 mutt_ssl.c           |  20 +++---
 mutt_ssl.h           |   2 +-
 mutt_ssl_gnutls.c    |  60 +++++++++---------
 mutt_tunnel.c        |  24 +++----
 mutt_zstrm.c         |  16 ++---
 mutt_zstrm.h         |   2 +-
 muttlib.c            |  10 +--
 mx.c                 |   4 +-
 mx.h                 |   2 +-
 pattern.c            |  10 +--
 pop.c                |   2 +-
 pop.h                |   2 +-
 pop_auth.c           |  12 ++--
 pop_lib.c            |   2 +-
 protos.h             |   6 +-
 sendlib.c            |   6 +-
 sha1.c               |   8 +--
 sha1.h               |   6 +-
 smime.c              |   4 +-
 smime.h              |   6 +-
 smtp.c               |  54 ++++++++--------
 url.c                |   4 +-
 url.h                |   4 +-
 66 files changed, 622 insertions(+), 622 deletions(-)

diff --git a/account.c b/account.c
index da099f58..6b31129a 100644
--- a/account.c
+++ b/account.c
@@ -28,9 +28,9 @@
 #include "mutt_curses.h"
 
 /* mutt_account_match: compare account info (host/port/user) */
-int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
+int mutt_account_match (const ACCOUNT *a1, const ACCOUNT *a2)
 {
-  const char* user = NONULL (Username);
+  const char *user = NONULL (Username);
 
   if (a1->type != a2->type)
     return 0;
@@ -63,7 +63,7 @@ int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
 }
 
 /* mutt_account_fromurl: fill account with information from url. */
-int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url)
+int mutt_account_fromurl (ACCOUNT *account, ciss_url_t *url)
 {
   /* must be present */
   if (url->host)
@@ -105,7 +105,7 @@ int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url)
  * to prevent cross-muttrc name collisions.  For that case, pass 1 to
  * force_users
  */
-void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url, int force_user)
+void mutt_account_tourl (ACCOUNT *account, ciss_url_t *url, int force_user)
 {
   url->scheme = U_UNKNOWN;
   url->user = NULL;
@@ -158,7 +158,7 @@ void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url, 
int force_user)
 }
 
 /* mutt_account_getuser: retrieve username into ACCOUNT, if necessary */
-int mutt_account_getuser (ACCOUNT* account)
+int mutt_account_getuser (ACCOUNT *account)
 {
   char prompt[SHORT_STRING];
 
@@ -189,7 +189,7 @@ int mutt_account_getuser (ACCOUNT* account)
   return 0;
 }
 
-int mutt_account_getlogin (ACCOUNT* account)
+int mutt_account_getlogin (ACCOUNT *account)
 {
   /* already set */
   if (account->flags & MUTT_ACCT_LOGIN)
@@ -227,7 +227,7 @@ static void getpass_prompt (char *prompt, size_t 
prompt_size, ACCOUNT *account)
             account->host);
 }
 
-int _mutt_account_getpass (ACCOUNT* account,
+int _mutt_account_getpass (ACCOUNT *account,
                            void (*prompt_func) (char *, size_t, ACCOUNT *))
 {
   char prompt[SHORT_STRING];
@@ -267,7 +267,7 @@ int mutt_account_getpass (ACCOUNT *account)
   return _mutt_account_getpass (account, getpass_prompt);
 }
 
-void mutt_account_unsetpass (ACCOUNT* account)
+void mutt_account_unsetpass (ACCOUNT *account)
 {
   account->flags &= ~MUTT_ACCT_PASS;
   account->flags &= ~MUTT_ACCT_PASS_FROM_URL;
@@ -281,7 +281,7 @@ void mutt_account_unsetpass (ACCOUNT* account)
  *
  * If xoauth2 is set, a deprecated XOAUTH2 token will be generated instead.
  */
-int mutt_account_getoauthbearer (ACCOUNT* account, BUFFER *authbearer, int 
xoauth2)
+int mutt_account_getoauthbearer (ACCOUNT *account, BUFFER *authbearer, int 
xoauth2)
 {
   FILE  *fp;
   char *cmd = NULL;
diff --git a/account.h b/account.h
index 8e56f2dc..c2c1bcbc 100644
--- a/account.h
+++ b/account.h
@@ -53,15 +53,15 @@ typedef struct
   unsigned char flags;
 } ACCOUNT;
 
-int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* m2);
-int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url);
-void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url, int force_user);
-int mutt_account_getuser (ACCOUNT* account);
-int mutt_account_getlogin (ACCOUNT* account);
-int _mutt_account_getpass (ACCOUNT* account,
+int mutt_account_match (const ACCOUNT *a1, const ACCOUNT *m2);
+int mutt_account_fromurl (ACCOUNT *account, ciss_url_t *url);
+void mutt_account_tourl (ACCOUNT *account, ciss_url_t *url, int force_user);
+int mutt_account_getuser (ACCOUNT *account);
+int mutt_account_getlogin (ACCOUNT *account);
+int _mutt_account_getpass (ACCOUNT *account,
                            void (*prompt_func) (char *, size_t, ACCOUNT *));
-int mutt_account_getpass (ACCOUNT* account);
-void mutt_account_unsetpass (ACCOUNT* account);
-int mutt_account_getoauthbearer (ACCOUNT* account, BUFFER *authbearer, int 
xoauth2);
+int mutt_account_getpass (ACCOUNT *account);
+void mutt_account_unsetpass (ACCOUNT *account);
+int mutt_account_getoauthbearer (ACCOUNT *account, BUFFER *authbearer, int 
xoauth2);
 
 #endif /* _MUTT_ACCOUNT_H_ */
diff --git a/ascii.h b/ascii.h
index fe756298..e54b6c18 100644
--- a/ascii.h
+++ b/ascii.h
@@ -39,7 +39,7 @@ int ascii_strncasecmp (const char *a, const char *b, int n);
 #define ascii_strcmp(a,b) mutt_strcmp(a,b)
 #define ascii_strncmp(a,b,c) mutt_strncmp(a,b,c)
 
-static inline char* ascii_strlower (char *s)
+static inline char *ascii_strlower (char *s)
 {
   char *p = s;
 
@@ -52,7 +52,7 @@ static inline char* ascii_strlower (char *s)
   return s;
 }
 
-static inline char* ascii_strupper (char *s)
+static inline char *ascii_strupper (char *s)
 {
   char *p = s;
 
diff --git a/bcache.c b/bcache.c
index d8692d46..71f2ace9 100644
--- a/bcache.c
+++ b/bcache.c
@@ -103,10 +103,10 @@ void mutt_bcache_close (body_cache_t **bcache)
   FREE(bcache);                 /* __FREE_CHECKED__ */
 }
 
-FILE* mutt_bcache_get(body_cache_t *bcache, const char *id)
+FILE *mutt_bcache_get(body_cache_t *bcache, const char *id)
 {
   BUFFER *path;
-  FILE* fp = NULL;
+  FILE *fp = NULL;
 
   if (!id || !*id || !bcache)
     return NULL;
@@ -124,11 +124,11 @@ FILE* mutt_bcache_get(body_cache_t *bcache, const char 
*id)
   return fp;
 }
 
-FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp)
+FILE *mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp)
 {
   BUFFER *path = NULL;
-  FILE* fp = NULL;
-  char* s = NULL;
+  FILE *fp = NULL;
+  char *s = NULL;
   struct stat sb;
 
   if (!id || !*id || !bcache)
@@ -164,7 +164,7 @@ out:
   return fp;
 }
 
-int mutt_bcache_commit(body_cache_t* bcache, const char* id)
+int mutt_bcache_commit(body_cache_t *bcache, const char *id)
 {
   BUFFER *tmpid;
   int rv;
@@ -178,7 +178,7 @@ int mutt_bcache_commit(body_cache_t* bcache, const char* id)
   return rv;
 }
 
-int mutt_bcache_move(body_cache_t* bcache, const char* id, const char* newid)
+int mutt_bcache_move(body_cache_t *bcache, const char *id, const char *newid)
 {
   BUFFER *path, *newpath;
   int rv;
diff --git a/bcache.h b/bcache.h
index bde647d6..27ccf150 100644
--- a/bcache.h
+++ b/bcache.h
@@ -47,10 +47,10 @@ void mutt_bcache_close (body_cache_t **bcache);
  * These return NULL/-1 on failure and FILE pointer/0 on success.
  */
 
-FILE* mutt_bcache_get(body_cache_t *bcache, const char *id);
-/* tmp: the returned FILE* is in a temporary location.
+FILE *mutt_bcache_get(body_cache_t *bcache, const char *id);
+/* tmp: the returned FILE * is in a temporary location.
  *      if set, use mutt_bcache_commit to put it into place */
-FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp);
+FILE *mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp);
 int mutt_bcache_commit(body_cache_t *bcache, const char *id);
 int mutt_bcache_move(body_cache_t *bcache, const char *id, const char *newid);
 int mutt_bcache_del(body_cache_t *bcache, const char *id);
diff --git a/buffer.c b/buffer.c
index 72ef0c4e..5dbc49d0 100644
--- a/buffer.c
+++ b/buffer.c
@@ -124,7 +124,7 @@ void mutt_buffer_fix_dptr (BUFFER *buf)
   }
 }
 
-static int _mutt_buffer_add_printf (BUFFER* buf, const char* fmt, va_list ap)
+static int _mutt_buffer_add_printf (BUFFER *buf, const char *fmt, va_list ap)
 {
   va_list ap_retry;
   int len, blen, doff;
@@ -158,7 +158,7 @@ static int _mutt_buffer_add_printf (BUFFER* buf, const 
char* fmt, va_list ap)
   return len;
 }
 
-int mutt_buffer_printf (BUFFER* buf, const char* fmt, ...)
+int mutt_buffer_printf (BUFFER *buf, const char *fmt, ...)
 {
   va_list ap;
   int rv;
@@ -171,7 +171,7 @@ int mutt_buffer_printf (BUFFER* buf, const char* fmt, ...)
   return rv;
 }
 
-int mutt_buffer_add_printf (BUFFER* buf, const char* fmt, ...)
+int mutt_buffer_add_printf (BUFFER *buf, const char *fmt, ...)
 {
   va_list ap;
   int rv;
@@ -186,7 +186,7 @@ int mutt_buffer_add_printf (BUFFER* buf, const char* fmt, 
...)
 /* Dynamically grows a BUFFER to accommodate s, in increments of 128 bytes.
  * Always one byte bigger than necessary for the null terminator, and
  * the buffer is always null-terminated */
-void mutt_buffer_addstr_n (BUFFER* buf, const char* s, size_t len)
+void mutt_buffer_addstr_n (BUFFER *buf, const char *s, size_t len)
 {
   if (!buf->data ||
       (buf->dptr + len + 1 > buf->data + buf->dsize))
@@ -196,12 +196,12 @@ void mutt_buffer_addstr_n (BUFFER* buf, const char* s, 
size_t len)
   *(buf->dptr) = '\0';
 }
 
-void mutt_buffer_addstr (BUFFER* buf, const char* s)
+void mutt_buffer_addstr (BUFFER *buf, const char *s)
 {
   mutt_buffer_addstr_n (buf, s, mutt_strlen (s));
 }
 
-void mutt_buffer_addch (BUFFER* buf, char c)
+void mutt_buffer_addch (BUFFER *buf, char c)
 {
   mutt_buffer_addstr_n (buf, &c, 1);
 }
diff --git a/buffy.c b/buffy.c
index 98186018..028dfb09 100644
--- a/buffy.c
+++ b/buffy.c
@@ -57,7 +57,7 @@ time_t BuffyDoneTime = 0;       /* last time we knew for sure 
how much mail ther
 static short BuffyCount = 0;    /* how many boxes with new mail */
 static short BuffyNotify = 0;   /* # of unnotified new boxes */
 
-static BUFFY* buffy_get (const char *path);
+static BUFFY *buffy_get (const char *path);
 
 /* Find the last message in the file.
  * upon success return 0. If no message found - return -1 */
@@ -111,7 +111,7 @@ static int fseek_last_message (FILE * f)
 static int test_last_status_new (FILE * f)
 {
   HEADER *hdr;
-  ENVELOPE* tmp_envelope;
+  ENVELOPE *tmp_envelope;
   int result = 0;
 
   if (fseek_last_message (f) == -1)
@@ -229,7 +229,7 @@ void mutt_update_mailbox (BUFFY * b)
 
 static BUFFY *buffy_new (const char *path)
 {
-  BUFFY* buffy;
+  BUFFY *buffy;
   char rp[PATH_MAX] = "";
   char *r = NULL;
 
@@ -478,7 +478,7 @@ int mutt_parse_unmailboxes (BUFFER *path, BUFFER *s, union 
pointer_long_t udata,
  * check_stats: if true, count total, new, and flagged messages.
  * Returns 1 if the dir has new mail.
  */
-static int buffy_maildir_check_dir (BUFFY* mailbox, const char *dir_name, int 
check_new,
+static int buffy_maildir_check_dir (BUFFY *mailbox, const char *dir_name, int 
check_new,
                                     int check_stats)
 {
   BUFFER *path = NULL;
@@ -567,7 +567,7 @@ cleanup:
  * check_stats: if true, also count total, new, and flagged messages.
  * Returns 1 if the mailbox has new mail.
  */
-static int buffy_maildir_check (BUFFY* mailbox, int check_stats)
+static int buffy_maildir_check (BUFFY *mailbox, int check_stats)
 {
   int rc, check_new = 1;
 
@@ -592,7 +592,7 @@ static int buffy_maildir_check (BUFFY* mailbox, int 
check_stats)
  * check_stats: if true, also count total, new, and flagged messages.
  * Returns 1 if the mailbox has new mail.
  */
-static int buffy_mbox_check (BUFFY* mailbox, struct stat *sb, int check_stats)
+static int buffy_mbox_check (BUFFY *mailbox, struct stat *sb, int check_stats)
 {
   int rc = 0;
   int new_or_changed;
@@ -927,7 +927,7 @@ void mutt_buffer_buffy (BUFFER *s)
 }
 
 /* fetch buffy object for given path, if present */
-static BUFFY* buffy_get (const char *path)
+static BUFFY *buffy_get (const char *path)
 {
   BUFFY *cur;
   BUFFER *epath;
diff --git a/compose.c b/compose.c
index 6039e940..dc59fd66 100644
--- a/compose.c
+++ b/compose.c
@@ -52,7 +52,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 
-static const char* There_are_no_attachments = N_("There are no attachments.");
+static const char *There_are_no_attachments = N_("There are no attachments.");
 
 #define CHECK_COUNT if (actx->idxlen == 0) { mutt_error 
_(There_are_no_attachments); break; }
 
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 441159e1..4fd2cf08 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -1618,7 +1618,7 @@ static void show_one_sig_validity (gpgme_ctx_t ctx, int 
idx, STATE *s)
     state_puts (txt, s);
 }
 
-static void print_smime_keyinfo (const char* msg, gpgme_signature_t sig,
+static void print_smime_keyinfo (const char *msg, gpgme_signature_t sig,
                                  gpgme_key_t key, STATE *s)
 {
   int msgwid;
@@ -2331,7 +2331,7 @@ bail:
   return -1;
 }
 
-static int pgp_gpgme_extract_keys (gpgme_data_t keydata, FILE** fp)
+static int pgp_gpgme_extract_keys (gpgme_data_t keydata, FILE **fp)
 {
   /* Before gpgme 1.9.0 and gpg 2.1.14 there was no side-effect free
    * way to view key data in GPGME, so we import the key into a
@@ -2345,7 +2345,7 @@ static int pgp_gpgme_extract_keys (gpgme_data_t keydata, 
FILE** fp)
   gpgme_key_t key;
   gpgme_user_id_t uid;
   gpgme_subkey_t subkey;
-  const char* shortid;
+  const char *shortid;
   size_t len;
   char date[STRING];
   int more;
@@ -5506,7 +5506,7 @@ static int verify_sender (HEADER *h, gpgme_protocol_t 
protocol)
             && (uid->email[uid_length - 1] == '>')
             && (uid_length == sender_length + 2))
         {
-          const char* at_sign = strchr(uid->email + 1, '@');
+          const char *at_sign = strchr(uid->email + 1, '@');
           if (at_sign == NULL)
           {
             if (! strncmp (uid->email + 1, sender->mailbox, sender_length))
@@ -5519,8 +5519,8 @@ static int verify_sender (HEADER *h, gpgme_protocol_t 
protocol)
              * The mailbox part is case-sensitive,
              * the domainname is not. (RFC 2821)
              */
-            const char* tmp_email = uid->email + 1;
-            const char* tmp_sender = sender->mailbox;
+            const char *tmp_email = uid->email + 1;
+            const char *tmp_sender = sender->mailbox;
             /* length of mailbox part including '@' */
             int mailbox_length = at_sign - tmp_email + 1;
             int domainname_length = sender_length - mailbox_length;
diff --git a/crypt-gpgme.h b/crypt-gpgme.h
index ba95d338..bcdb86e2 100644
--- a/crypt-gpgme.h
+++ b/crypt-gpgme.h
@@ -34,7 +34,7 @@ int pgp_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY 
*b, BODY **cur);
 int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
 
 int pgp_gpgme_check_traditional (FILE *fp, BODY *b, int just_one);
-void pgp_gpgme_invoke_import (const char* fname);
+void pgp_gpgme_invoke_import (const char *fname);
 
 int pgp_gpgme_application_handler (BODY *m, STATE *s);
 int smime_gpgme_application_handler (BODY *a, STATE *s);
diff --git a/crypt.c b/crypt.c
index 4adf436c..60b4fef7 100644
--- a/crypt.c
+++ b/crypt.c
@@ -1205,7 +1205,7 @@ int mutt_signed_handler (BODY *a, STATE *s)
 /* Obtain pointers to fingerprint or short or long key ID, if any.
  * See mutt_crypt.h for details.
  */
-const char* crypt_get_fingerprint_or_id (char *p, const char **pphint,
+const char *crypt_get_fingerprint_or_id (char *p, const char **pphint,
                                          const char **ppl, const char **pps)
 {
   const char *ps, *pl, *phint;
diff --git a/curs_lib.c b/curs_lib.c
index d2b9b058..25fa19e5 100644
--- a/curs_lib.c
+++ b/curs_lib.c
@@ -678,7 +678,7 @@ void mutt_curses_message (const char *fmt, ...)
   va_end (ap);
 }
 
-void mutt_progress_init (progress_t* progress, const char *msg,
+void mutt_progress_init (progress_t *progress, const char *msg,
                          unsigned short flags, unsigned short inc,
                          long size)
 {
@@ -720,7 +720,7 @@ void mutt_progress_init (progress_t* progress, const char 
*msg,
   mutt_progress_update (progress, 0, 0);
 }
 
-void mutt_progress_update (progress_t* progress, long pos, int percent)
+void mutt_progress_update (progress_t *progress, long pos, int percent)
 {
   char posstr[SHORT_STRING];
   short update = 0;
diff --git a/edit.c b/edit.c
index b8db756e..381dfe1f 100644
--- a/edit.c
+++ b/edit.c
@@ -39,7 +39,7 @@
  * SLcurses_waddnstr() can't take a "const char *", so this is only
  * declared "static" (sigh)
  */
-static char* EditorHelp1 = N_("\
+static char *EditorHelp1 = N_("\
 ~~              insert a line beginning with a single ~\n\
 ~b addresses    add addresses to the Bcc: field\n\
 ~c addresses    add addresses to the Cc: field\n\
@@ -50,7 +50,7 @@ static char* EditorHelp1 = N_("\
 ~M messages     same as ~m, except include headers\n\
 ~p              print the message\n");
 
-static char* EditorHelp2 = N_("\
+static char *EditorHelp2 = N_("\
 ~q              write file and quit editor\n\
 ~r file         read a file into the editor\n\
 ~t users        add users to the To: field\n\
diff --git a/hcache.c b/hcache.c
index 784bff1c..e3664847 100644
--- a/hcache.c
+++ b/hcache.c
@@ -601,7 +601,7 @@ mutt_hcache_per_folder(BUFFER *hcpath, const char *path, 
const char *folder,
   BUFFER *hcfile = NULL;
   struct stat sb;
   unsigned char md5sum[16];
-  char* s;
+  char *s;
   int ret;
   size_t plen;
 #ifndef HAVE_ICONV
@@ -777,7 +777,7 @@ void *
 mutt_hcache_fetch(header_cache_t *h, const char *filename,
                   size_t(*keylen) (const char *fn))
 {
-  void* data;
+  void *data;
 
   data = mutt_hcache_fetch_raw (h, filename, keylen);
 
@@ -876,7 +876,7 @@ mutt_hcache_store(header_cache_t *h, const char *filename, 
HEADER * header,
                   size_t(*keylen) (const char *fn),
                   mutt_hcache_store_flags_t flags)
 {
-  char* data;
+  char *data;
   int dlen;
   int ret;
 
@@ -892,8 +892,8 @@ mutt_hcache_store(header_cache_t *h, const char *filename, 
HEADER * header,
 }
 
 int
-mutt_hcache_store_raw (header_cache_t* h, const char* filename, void* data,
-                       size_t dlen, size_t(*keylen) (const char* fn))
+mutt_hcache_store_raw (header_cache_t *h, const char *filename, void *data,
+                       size_t dlen, size_t(*keylen) (const char *fn))
 {
 #ifndef HAVE_DB4
   BUFFER *path = NULL;
@@ -971,7 +971,7 @@ mutt_hcache_store_raw (header_cache_t* h, const char* 
filename, void* data,
 #endif
 }
 
-static char* get_foldername (const char *folder)
+static char *get_foldername (const char *folder)
 {
   char *p = NULL;
   BUFFER *path;
@@ -997,7 +997,7 @@ static char* get_foldername (const char *folder)
 
 #if HAVE_QDBM
 static int
-hcache_open_qdbm (struct header_cache* h, const char* path)
+hcache_open_qdbm (struct header_cache *h, const char *path)
 {
   int    flags = VL_OWRITER | VL_OCREAT;
 
@@ -1046,7 +1046,7 @@ mutt_hcache_delete(header_cache_t *h, const char 
*filename,
 
 #elif HAVE_TC
 static int
-hcache_open_tc (struct header_cache* h, const char* path)
+hcache_open_tc (struct header_cache *h, const char *path)
 {
   h->db = tcbdbnew();
   if (!h->db)
@@ -1108,7 +1108,7 @@ mutt_hcache_delete(header_cache_t *h, const char 
*filename,
 
 #elif HAVE_KC
 static int
-hcache_open_kc (struct header_cache* h, const char* path)
+hcache_open_kc (struct header_cache *h, const char *path)
 {
   BUFFER *fullpath = NULL;
   int rc = -1;
@@ -1181,7 +1181,7 @@ mutt_hcache_delete(header_cache_t *h, const char 
*filename,
 
 #elif HAVE_GDBM
 static int
-hcache_open_gdbm (struct header_cache* h, const char* path)
+hcache_open_gdbm (struct header_cache *h, const char *path)
 {
   int pagesize;
 
@@ -1255,7 +1255,7 @@ mutt_hcache_dbt_empty_init(DBT * dbt)
 }
 
 static int
-hcache_open_db4 (struct header_cache* h, const char* path)
+hcache_open_db4 (struct header_cache *h, const char *path)
 {
   struct stat sb;
   int ret;
@@ -1350,7 +1350,7 @@ mutt_hcache_delete(header_cache_t *h, const char 
*filename,
 #elif HAVE_LMDB
 
 static int
-hcache_open_lmdb (struct header_cache* h, const char* path)
+hcache_open_lmdb (struct header_cache *h, const char *path)
 {
   int rc;
 
@@ -1468,7 +1468,7 @@ header_cache_t *
 mutt_hcache_open(const char *path, const char *folder, hcache_namer_t namer)
 {
   struct header_cache *h = safe_calloc(1, sizeof (struct header_cache));
-  int (*hcache_open) (struct header_cache* h, const char* path);
+  int (*hcache_open) (struct header_cache *h, const char *path);
   struct stat sb;
   BUFFER *hcpath = NULL;
 
diff --git a/hcache.h b/hcache.h
index d2cb8265..253dd3d0 100644
--- a/hcache.h
+++ b/hcache.h
@@ -42,8 +42,8 @@ typedef enum {
 /* uidvalidity is an IMAP-specific unsigned 32 bit number */
 int mutt_hcache_store(header_cache_t *h, const char *filename, HEADER *header,
                       unsigned int uidvalidity, size_t (*keylen)(const char 
*fn), mutt_hcache_store_flags_t flags_t);
-int mutt_hcache_store_raw (header_cache_t *h, const char* filename, void* data,
-                           size_t dlen, size_t(*keylen) (const char* fn));
+int mutt_hcache_store_raw (header_cache_t *h, const char *filename, void *data,
+                           size_t dlen, size_t(*keylen) (const char *fn));
 int mutt_hcache_delete(header_cache_t *h, const char *filename, size_t 
(*keylen)(const char *fn));
 
 const char *mutt_hcache_backend (void);
diff --git a/hook.c b/hook.c
index 5db5b307..07e0eef3 100644
--- a/hook.c
+++ b/hook.c
@@ -676,14 +676,14 @@ LIST *mutt_crypt_hook (ADDRESS *adr)
 }
 
 #ifdef USE_SOCKET
-void mutt_account_hook (const char* url)
+void mutt_account_hook (const char *url)
 {
   /* parsing commands with URLs in an account hook can cause a recursive
    * call. We just skip processing if this occurs. Typically such commands
    * belong in a folder-hook -- perhaps we should warn the user. */
   static int inhook = 0;
 
-  HOOK* hook;
+  HOOK *hook;
   BUFFER err;
 
   if (inhook)
diff --git a/imap/auth.c b/imap/auth.c
index b628e526..e9bf9c82 100644
--- a/imap/auth.c
+++ b/imap/auth.c
@@ -55,12 +55,12 @@ static const imap_auth_t imap_authenticators[] = {
 
 /* imap_authenticate: Attempt to authenticate using either user-specified
  *   authentication method if specified, or any. */
-int imap_authenticate (IMAP_DATA* idata)
+int imap_authenticate (IMAP_DATA *idata)
 {
-  const imap_auth_t* authenticator;
-  char* methods;
-  char* method;
-  char* delim;
+  const imap_auth_t *authenticator;
+  char *methods;
+  char *method;
+  char *delim;
   int r = IMAP_AUTH_UNAVAIL;
 
   if (ImapAuthenticators)
diff --git a/imap/auth.h b/imap/auth.h
index b6bb0603..8d9150b3 100644
--- a/imap/auth.h
+++ b/imap/auth.h
@@ -33,28 +33,28 @@ typedef enum
 typedef struct
 {
   /* do authentication, using named method or any available if method is NULL 
*/
-  imap_auth_res_t (*authenticate) (IMAP_DATA* idata, const char* method);
+  imap_auth_res_t (*authenticate) (IMAP_DATA *idata, const char *method);
   /* name of authentication method supported, NULL means variable. If this
    * is not null, authenticate may ignore the second parameter. */
-  const char* method;
+  const char *method;
 } imap_auth_t;
 
 /* external authenticator prototypes */
 #ifndef USE_SASL
-imap_auth_res_t imap_auth_anon (IMAP_DATA* idata, const char* method);
-imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_anon (IMAP_DATA *idata, const char *method);
+imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA *idata, const char *method);
 #endif
-imap_auth_res_t imap_auth_login (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_login (IMAP_DATA *idata, const char *method);
 #ifdef USE_GSS
-imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_gss (IMAP_DATA *idata, const char *method);
 #endif
 #ifdef USE_SASL_CYRUS
-imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_sasl (IMAP_DATA *idata, const char *method);
 #endif
 #ifdef USE_SASL_GNU
-imap_auth_res_t imap_auth_gsasl (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_gsasl (IMAP_DATA *idata, const char *method);
 #endif
-imap_auth_res_t imap_auth_oauthbearer (IMAP_DATA* idata, const char* method);
-imap_auth_res_t imap_auth_xoauth2 (IMAP_DATA* idata, const char* method);
+imap_auth_res_t imap_auth_oauthbearer (IMAP_DATA *idata, const char *method);
+imap_auth_res_t imap_auth_xoauth2 (IMAP_DATA *idata, const char *method);
 
 #endif /* _IMAP_AUTH_H */
diff --git a/imap/auth_anon.c b/imap/auth_anon.c
index d4e4b918..9e171e88 100644
--- a/imap/auth_anon.c
+++ b/imap/auth_anon.c
@@ -27,7 +27,7 @@
 #include "auth.h"
 
 /* this is basically a stripped-down version of the cram-md5 method. */
-imap_auth_res_t imap_auth_anon (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_anon (IMAP_DATA *idata, const char *method)
 {
   int rc;
 
diff --git a/imap/auth_cram.c b/imap/auth_cram.c
index 317ea938..3be6ae9a 100644
--- a/imap/auth_cram.c
+++ b/imap/auth_cram.c
@@ -31,11 +31,11 @@
 #define MD5_DIGEST_LEN 16
 
 /* forward declarations */
-static void hmac_md5 (const char* password, char* challenge,
-                      unsigned char* response);
+static void hmac_md5 (const char *password, char *challenge,
+                      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)
+imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA *idata, const char *method)
 {
   char ibuf[LONG_STRING*2], obuf[LONG_STRING];
   unsigned char hmac_response[MD5_DIGEST_LEN];
@@ -131,8 +131,8 @@ bail:
 }
 
 /* hmac_md5: produce CRAM-MD5 challenge response. */
-static void hmac_md5 (const char* password, char* challenge,
-                      unsigned char* response)
+static void hmac_md5 (const char *password, char *challenge,
+                      unsigned char *response)
 {
   struct md5_ctx ctx;
   unsigned char ipad[MD5_BLOCK_LEN], opad[MD5_BLOCK_LEN];
diff --git a/imap/auth_gss.c b/imap/auth_gss.c
index 7a686522..e3a0aec7 100644
--- a/imap/auth_gss.c
+++ b/imap/auth_gss.c
@@ -94,7 +94,7 @@ static void print_gss_error(OM_uint32 err_maj, OM_uint32 
err_min)
 }
 
 /* imap_auth_gss: AUTH=GSSAPI support. */
-imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_gss (IMAP_DATA *idata, const char *method)
 {
   gss_buffer_desc request_buf, send_token;
   gss_buffer_t sec_token;
diff --git a/imap/auth_login.c b/imap/auth_login.c
index b1e283b7..221b5173 100644
--- a/imap/auth_login.c
+++ b/imap/auth_login.c
@@ -27,7 +27,7 @@
 #include "auth.h"
 
 /* imap_auth_login: Plain LOGIN support */
-imap_auth_res_t imap_auth_login (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_login (IMAP_DATA *idata, const char *method)
 {
   char q_user[STRING], q_pass[STRING];
   char buf[LONG_STRING];
diff --git a/imap/auth_oauth.c b/imap/auth_oauth.c
index b7f01e4f..bfe24b2b 100644
--- a/imap/auth_oauth.c
+++ b/imap/auth_oauth.c
@@ -28,7 +28,7 @@
 #include "auth.h"
 
 /* imap_auth_oauth: AUTH=OAUTHBEARER support. See RFC 7628 */
-static imap_auth_res_t imap_auth_oauth (IMAP_DATA* idata, int xoauth2)
+static imap_auth_res_t imap_auth_oauth (IMAP_DATA *idata, int xoauth2)
 {
   int rc = IMAP_AUTH_FAILURE, steprc;
   BUFFER *bearertoken = NULL, *authline = NULL;
@@ -80,7 +80,7 @@ cleanup:
 }
 
 /* AUTH=OAUTHBEARER support. See RFC 7628 */
-imap_auth_res_t imap_auth_oauthbearer (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_oauthbearer (IMAP_DATA *idata, const char *method)
 {
   /* For now, we only support SASL_IR also and over TLS */
   if (!mutt_bit_isset (idata->capabilities, SASL_IR) ||
@@ -97,7 +97,7 @@ imap_auth_res_t imap_auth_oauthbearer (IMAP_DATA* idata, 
const char* method)
 }
 
 /* AUTH=XOAUTH2 support. */
-imap_auth_res_t imap_auth_xoauth2 (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_xoauth2 (IMAP_DATA *idata, const char *method)
 {
   /* For now, we only support SASL_IR also and over TLS */
   if (!mutt_bit_isset (idata->capabilities, SASL_IR) ||
diff --git a/imap/auth_sasl.c b/imap/auth_sasl.c
index c7e6f284..afd2ddc3 100644
--- a/imap/auth_sasl.c
+++ b/imap/auth_sasl.c
@@ -31,14 +31,14 @@
 #include <sasl/saslutil.h>
 
 /* imap_auth_sasl: Default authenticator if available. */
-imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_sasl (IMAP_DATA *idata, const char *method)
 {
-  sasl_conn_t* saslconn;
-  sasl_interact_t* interaction = NULL;
+  sasl_conn_t *saslconn;
+  sasl_interact_t *interaction = NULL;
   int rc, irc;
   char *buf = NULL;
   size_t bufsize = 0;
-  const char* mech;
+  const char *mech;
   const char *pc = NULL;
   unsigned int len, olen;
   unsigned char client_start;
diff --git a/imap/auth_sasl_gnu.c b/imap/auth_sasl_gnu.c
index 490602ae..4682fb17 100644
--- a/imap/auth_sasl_gnu.c
+++ b/imap/auth_sasl_gnu.c
@@ -27,7 +27,7 @@
 
 #include <gsasl.h>
 
-imap_auth_res_t imap_auth_gsasl (IMAP_DATA* idata, const char* method)
+imap_auth_res_t imap_auth_gsasl (IMAP_DATA *idata, const char *method)
 {
   Gsasl_session *gsasl_session = NULL;
   const char *chosen_mech;
diff --git a/imap/browse.c b/imap/browse.c
index 0733e053..bd7b4d63 100644
--- a/imap/browse.c
+++ b/imap/browse.c
@@ -31,17 +31,17 @@
 #include "imap_private.h"
 
 /* -- forward declarations -- */
-static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
-                                   struct browser_state* state, short 
isparent);
+static int browse_add_list_result (IMAP_DATA *idata, const char *cmd,
+                                   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);
 static int compare_names(struct folder_file *a, struct folder_file *b);
 
 /* imap_browse: IMAP hook into the folder browser, fills out browser_state,
  *   given a current folder to browse */
-int imap_browse (const char* path, struct browser_state* state)
+int imap_browse (const char *path, struct browser_state *state)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   IMAP_LIST list;
   char buf[LONG_STRING*2];
   char mbox[LONG_STRING];
@@ -229,9 +229,9 @@ fail:
 }
 
 /* imap_mailbox_create: Prompt for a new mailbox name, and try to create it */
-int imap_mailbox_create (const char* folder, BUFFER *result)
+int imap_mailbox_create (const char *folder, BUFFER *result)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   IMAP_MBOX mx;
   char buf[LONG_STRING];
   short n;
@@ -284,9 +284,9 @@ fail:
   return -1;
 }
 
-int imap_mailbox_rename(const char* mailbox, BUFFER *result)
+int imap_mailbox_rename(const char *mailbox, BUFFER *result)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   IMAP_MBOX mx;
   char buf[LONG_STRING];
   char newname[SHORT_STRING];
@@ -344,8 +344,8 @@ fail:
   return -1;
 }
 
-static int browse_add_list_result (IMAP_DATA* idata, const char* cmd,
-                                   struct browser_state* state, short isparent)
+static int browse_add_list_result (IMAP_DATA *idata, const char *cmd,
+                                   struct browser_state *state, short isparent)
 {
   IMAP_LIST list;
   IMAP_MBOX mx;
diff --git a/imap/command.c b/imap/command.c
index e9b632b2..30c3a3ca 100644
--- a/imap/command.c
+++ b/imap/command.c
@@ -38,23 +38,23 @@
 #define IMAP_CMD_BUFSIZE 512
 
 /* forward declarations */
-static int cmd_start (IMAP_DATA* idata, const char* cmdstr, int flags);
-static int cmd_queue_full (IMAP_DATA* idata);
-static int cmd_queue (IMAP_DATA* idata, const char* cmdstr, int flags);
-static IMAP_COMMAND* cmd_new (IMAP_DATA* idata);
+static int cmd_start (IMAP_DATA *idata, const char *cmdstr, int flags);
+static int cmd_queue_full (IMAP_DATA *idata);
+static int cmd_queue (IMAP_DATA *idata, const char *cmdstr, int flags);
+static IMAP_COMMAND *cmd_new (IMAP_DATA *idata);
 static int cmd_status (const char *s);
-static void cmd_handle_fatal (IMAP_DATA* idata);
-static int cmd_handle_untagged (IMAP_DATA* idata);
-static void cmd_parse_capability (IMAP_DATA* idata, char* s);
-static void cmd_parse_vanished (IMAP_DATA* idata, char* s);
-static void cmd_parse_expunge (IMAP_DATA* idata, const char* s);
-static void cmd_parse_list (IMAP_DATA* idata, char* s);
-static void cmd_parse_lsub (IMAP_DATA* idata, char* s);
-static void cmd_parse_fetch (IMAP_DATA* idata, char* s);
-static void cmd_parse_myrights (IMAP_DATA* idata, const char* s);
-static void cmd_parse_search (IMAP_DATA* idata, const char* s);
-static void cmd_parse_status (IMAP_DATA* idata, char* s);
-static void cmd_parse_enabled (IMAP_DATA* idata, const char* s);
+static void cmd_handle_fatal (IMAP_DATA *idata);
+static int cmd_handle_untagged (IMAP_DATA *idata);
+static void cmd_parse_capability (IMAP_DATA *idata, char *s);
+static void cmd_parse_vanished (IMAP_DATA *idata, char *s);
+static void cmd_parse_expunge (IMAP_DATA *idata, const char *s);
+static void cmd_parse_list (IMAP_DATA *idata, char *s);
+static void cmd_parse_lsub (IMAP_DATA *idata, char *s);
+static void cmd_parse_fetch (IMAP_DATA *idata, char *s);
+static void cmd_parse_myrights (IMAP_DATA *idata, const char *s);
+static void cmd_parse_search (IMAP_DATA *idata, const char *s);
+static void cmd_parse_status (IMAP_DATA *idata, char *s);
+static void cmd_parse_enabled (IMAP_DATA *idata, const char *s);
 
 static const char * const Capabilities[] = {
   "IMAP4",
@@ -82,7 +82,7 @@ static const char * const Capabilities[] = {
 
 /* imap_cmd_start: Given an IMAP command, send it to the server.
  *   If cmdstr is NULL, sends queued commands. */
-int imap_cmd_start (IMAP_DATA* idata, const char* cmdstr)
+int imap_cmd_start (IMAP_DATA *idata, const char *cmdstr)
 {
   return cmd_start (idata, cmdstr, 0);
 }
@@ -91,13 +91,13 @@ int imap_cmd_start (IMAP_DATA* idata, const char* cmdstr)
  *   tagged completion response, handles untagged messages, can read
  *   arbitrarily large strings (using malloc, so don't make it _too_
  *   large!). */
-int imap_cmd_step (IMAP_DATA* idata)
+int imap_cmd_step (IMAP_DATA *idata)
 {
   size_t len = 0;
   int c;
   int rc;
   int stillrunning = 0;
-  IMAP_COMMAND* cmd;
+  IMAP_COMMAND *cmd;
 
   if (idata->status == IMAP_FATAL)
   {
@@ -210,10 +210,10 @@ int imap_code (const char *s)
 }
 
 /* imap_cmd_trailer: extra information after tagged command response if any */
-const char* imap_cmd_trailer (IMAP_DATA* idata)
+const char *imap_cmd_trailer (IMAP_DATA *idata)
 {
-  static const char* notrailer = "";
-  const char* s = idata->buf;
+  static const char *notrailer = "";
+  const char *s = idata->buf;
 
   if (!s)
   {
@@ -247,7 +247,7 @@ const char* imap_cmd_trailer (IMAP_DATA* idata)
  *   IMAP_CMD_POLL: poll the socket for a response before running 
imap_cmd_step.
  * Return 0 on success, -1 on Failure, -2 on OK Failure
  */
-int imap_exec (IMAP_DATA* idata, const char* cmdstr, int flags)
+int imap_exec (IMAP_DATA *idata, const char *cmdstr, int flags)
 {
   int rc;
 
@@ -298,7 +298,7 @@ int imap_exec (IMAP_DATA* idata, const char* cmdstr, int 
flags)
  * idata->check_status is set and will be used later by
  * imap_check_mailbox().
  */
-void imap_cmd_finish (IMAP_DATA* idata)
+void imap_cmd_finish (IMAP_DATA *idata)
 {
   if (idata->status == IMAP_FATAL)
   {
@@ -332,7 +332,7 @@ void imap_cmd_finish (IMAP_DATA* idata)
 }
 
 /* imap_cmd_idle: Enter the IDLE state. */
-int imap_cmd_idle (IMAP_DATA* idata)
+int imap_cmd_idle (IMAP_DATA *idata)
 {
   int rc;
 
@@ -372,7 +372,7 @@ int imap_cmd_idle (IMAP_DATA* idata)
   return 0;
 }
 
-static int cmd_queue_full (IMAP_DATA* idata)
+static int cmd_queue_full (IMAP_DATA *idata)
 {
   if ((idata->nextcmd + 1) % idata->cmdslots == idata->lastcmd)
     return 1;
@@ -382,9 +382,9 @@ static int cmd_queue_full (IMAP_DATA* idata)
 
 /* sets up a new command control block and adds it to the queue.
  * Returns NULL if the pipeline is full. */
-static IMAP_COMMAND* cmd_new (IMAP_DATA* idata)
+static IMAP_COMMAND *cmd_new (IMAP_DATA *idata)
 {
-  IMAP_COMMAND* cmd;
+  IMAP_COMMAND *cmd;
 
   if (cmd_queue_full (idata))
   {
@@ -405,9 +405,9 @@ static IMAP_COMMAND* cmd_new (IMAP_DATA* idata)
 }
 
 /* queues command. If the queue is full, attempts to drain it. */
-static int cmd_queue (IMAP_DATA* idata, const char* cmdstr, int flags)
+static int cmd_queue (IMAP_DATA *idata, const char *cmdstr, int flags)
 {
-  IMAP_COMMAND* cmd;
+  IMAP_COMMAND *cmd;
   int rc;
 
   if (cmd_queue_full (idata))
@@ -429,7 +429,7 @@ static int cmd_queue (IMAP_DATA* idata, const char* cmdstr, 
int flags)
   return 0;
 }
 
-static int cmd_start (IMAP_DATA* idata, const char* cmdstr, int flags)
+static int cmd_start (IMAP_DATA *idata, const char *cmdstr, int flags)
 {
   int rc;
 
@@ -473,7 +473,7 @@ static int cmd_status (const char *s)
 }
 
 /* cmd_handle_fatal: when IMAP_DATA is in fatal state, do what we can */
-static void cmd_handle_fatal (IMAP_DATA* idata)
+static void cmd_handle_fatal (IMAP_DATA *idata)
 {
   /* Attempt to reconnect later during mx_check_mailbox() */
   if (Context && idata->ctx == Context)
@@ -510,10 +510,10 @@ static void cmd_handle_fatal (IMAP_DATA* idata)
 }
 
 /* cmd_handle_untagged: fallback parser for otherwise unhandled messages. */
-static int cmd_handle_untagged (IMAP_DATA* idata)
+static int cmd_handle_untagged (IMAP_DATA *idata)
 {
-  char* s;
-  char* pn;
+  char *s;
+  char *pn;
   unsigned int count;
 
   s = imap_next_word (idata->buf);
@@ -612,10 +612,10 @@ static int cmd_handle_untagged (IMAP_DATA* idata)
 
 /* cmd_parse_capabilities: set capability bits according to CAPABILITY
  *   response */
-static void cmd_parse_capability (IMAP_DATA* idata, char* s)
+static void cmd_parse_capability (IMAP_DATA *idata, char *s)
 {
   int x;
-  char* bracket;
+  char *bracket;
 
   muttdbg(3, "Handling CAPABILITY");
 
@@ -641,10 +641,10 @@ static void cmd_parse_capability (IMAP_DATA* idata, char* 
s)
 
 /* cmd_parse_expunge: mark headers with new sequence ID and mark idata to
  *   be reopened at our earliest convenience */
-static void cmd_parse_expunge (IMAP_DATA* idata, const char* s)
+static void cmd_parse_expunge (IMAP_DATA *idata, const char *s)
 {
   unsigned int exp_msn, cur;
-  HEADER* h;
+  HEADER *h;
 
   muttdbg(2, "Handling EXPUNGE");
 
@@ -680,13 +680,13 @@ static void cmd_parse_expunge (IMAP_DATA* idata, const 
char* s)
 /* cmd_parse_vanished: handles VANISHED (RFC 7162), which is like
  *   expunge, but passes a seqset of UIDs.  An optional (EARLIER) argument
  *   specifies not to decrement subsequent MSNs. */
-static void cmd_parse_vanished (IMAP_DATA* idata, char* s)
+static void cmd_parse_vanished (IMAP_DATA *idata, char *s)
 {
   int earlier = 0, rc;
   char *end_of_seqset;
   SEQSET_ITERATOR *iter;
   unsigned int uid, exp_msn, cur;
-  HEADER* h;
+  HEADER *h;
 
   muttdbg(2, "Handling VANISHED");
 
@@ -769,7 +769,7 @@ static void cmd_parse_vanished (IMAP_DATA* idata, char* s)
  *   handles unanticipated FETCH responses, and only FLAGS data. We get
  *   these if another client has changed flags for a mailbox we've selected.
  *   Of course, a lot of code here duplicates code in message.c. */
-static void cmd_parse_fetch (IMAP_DATA* idata, char* s)
+static void cmd_parse_fetch (IMAP_DATA *idata, char *s)
 {
   unsigned int msn, uid;
   HEADER *h;
@@ -900,9 +900,9 @@ static void cmd_parse_fetch (IMAP_DATA* idata, char* s)
   }
 }
 
-static void cmd_parse_list (IMAP_DATA* idata, char* s)
+static void cmd_parse_list (IMAP_DATA *idata, char *s)
 {
-  IMAP_LIST* list;
+  IMAP_LIST *list;
   IMAP_LIST lb;
   char delimbuf[5]; /* worst case: "\\"\0 */
   unsigned int litlen;
@@ -990,7 +990,7 @@ static void cmd_parse_list (IMAP_DATA* idata, char* s)
   }
 }
 
-static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
+static void cmd_parse_lsub (IMAP_DATA *idata, char *s)
 {
   BUFFER *mailbox = NULL;
   ciss_url_t url;
@@ -1031,7 +1031,7 @@ static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
 }
 
 /* cmd_parse_myrights: set rights bits according to MYRIGHTS response */
-static void cmd_parse_myrights (IMAP_DATA* idata, const char* s)
+static void cmd_parse_myrights (IMAP_DATA *idata, const char *s)
 {
   muttdbg(2, "Handling MYRIGHTS");
 
@@ -1096,7 +1096,7 @@ static void cmd_parse_myrights (IMAP_DATA* idata, const 
char* s)
 }
 
 /* cmd_parse_search: store SEARCH response for later use */
-static void cmd_parse_search (IMAP_DATA* idata, const char* s)
+static void cmd_parse_search (IMAP_DATA *idata, const char *s)
 {
   unsigned int uid;
   HEADER *h;
@@ -1115,11 +1115,11 @@ static void cmd_parse_search (IMAP_DATA* idata, const 
char* s)
 
 /* first cut: just do buffy update. Later we may wish to cache all
  * mailbox information, even that not desired by buffy */
-static void cmd_parse_status (IMAP_DATA* idata, char* s)
+static void cmd_parse_status (IMAP_DATA *idata, char *s)
 {
-  char* mailbox;
-  char* value;
-  BUFFY* inc;
+  char *mailbox;
+  char *value;
+  BUFFY *inc;
   IMAP_MBOX mx;
   unsigned long ulcount;
   unsigned int count;
@@ -1286,7 +1286,7 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s)
 }
 
 /* cmd_parse_enabled: record what the server has enabled */
-static void cmd_parse_enabled (IMAP_DATA* idata, const char* s)
+static void cmd_parse_enabled (IMAP_DATA *idata, const char *s)
 {
   muttdbg(2, "Handling ENABLED");
 
diff --git a/imap/imap.c b/imap/imap.c
index 89694067..3e1440a6 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -50,17 +50,17 @@
 #include <sys/stat.h>
 
 /* imap forward declarations */
-static char* imap_get_flags (LIST** hflags, char* s);
-static int imap_check_capabilities (IMAP_DATA* idata);
-static void imap_set_flag (IMAP_DATA* idata, int aclbit, int flag,
-                           const char* str, char* flags, size_t flsize);
+static char *imap_get_flags (LIST **hflags, char *s);
+static int imap_check_capabilities (IMAP_DATA *idata);
+static void imap_set_flag (IMAP_DATA *idata, int aclbit, int flag,
+                           const char *str, char *flags, size_t flsize);
 
 /* imap_access: Check permissions on an IMAP mailbox.
  * TODO: ACL checks. Right now we assume if it exists we can
  *       mess with it. */
-int imap_access (const char* path)
+int imap_access (const char *path)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   IMAP_MBOX mx;
   char buf[LONG_STRING*2];
   char mailbox[LONG_STRING];
@@ -116,7 +116,7 @@ int imap_access (const char* path)
   return 0;
 }
 
-int imap_create_mailbox (IMAP_DATA* idata, char* mailbox)
+int imap_create_mailbox (IMAP_DATA *idata, char *mailbox)
 {
   char buf[LONG_STRING*2], mbox[LONG_STRING];
 
@@ -132,7 +132,7 @@ int imap_create_mailbox (IMAP_DATA* idata, char* mailbox)
   return 0;
 }
 
-int imap_rename_mailbox (IMAP_DATA* idata, IMAP_MBOX* mx, const char* newname)
+int imap_rename_mailbox (IMAP_DATA *idata, IMAP_MBOX *mx, const char *newname)
 {
   char oldmbox[LONG_STRING];
   char newmbox[LONG_STRING];
@@ -153,7 +153,7 @@ int imap_rename_mailbox (IMAP_DATA* idata, IMAP_MBOX* mx, 
const char* newname)
   return rc;
 }
 
-int imap_delete_mailbox (CONTEXT* ctx, IMAP_MBOX mx)
+int imap_delete_mailbox (CONTEXT *ctx, IMAP_MBOX mx)
 {
   char buf[LONG_STRING*2], mbox[LONG_STRING];
   IMAP_DATA *idata;
@@ -185,8 +185,8 @@ int imap_delete_mailbox (CONTEXT* ctx, IMAP_MBOX mx)
  *   make sure we've got all the context we need. */
 void imap_logout_all (void)
 {
-  CONNECTION* conn;
-  CONNECTION* tmp;
+  CONNECTION *conn;
+  CONNECTION *tmp;
 
   conn = mutt_socket_head ();
 
@@ -208,7 +208,7 @@ void imap_logout_all (void)
 
 /* imap_read_literal: read bytes bytes from server into file. Not explicitly
  *   buffered, relies on FILE buffering. */
-int imap_read_literal (FILE* fp, IMAP_DATA* idata, unsigned int bytes, 
progress_t* pbar)
+int imap_read_literal (FILE *fp, IMAP_DATA *idata, unsigned int bytes, 
progress_t *pbar)
 {
   unsigned int pos;
   char c;
@@ -256,9 +256,9 @@ int imap_read_literal (FILE* fp, IMAP_DATA* idata, unsigned 
int bytes, progress_
 /* imap_expunge_mailbox: Purge IMAP portion of expunged messages from the
  *   context. Must not be done while something has a handle on any headers
  *   (eg inside pager or editor). That is, check IMAP_REOPEN_ALLOW. */
-void imap_expunge_mailbox (IMAP_DATA* idata)
+void imap_expunge_mailbox (IMAP_DATA *idata)
 {
-  HEADER* h;
+  HEADER *h;
   int i, cacheno;
   short old_sort;
 
@@ -334,7 +334,7 @@ void imap_expunge_mailbox (IMAP_DATA* idata)
 }
 
 /* imap_check_capabilities: make sure we can log in to this server. */
-static int imap_check_capabilities (IMAP_DATA* idata)
+static int imap_check_capabilities (IMAP_DATA *idata)
 {
   if (imap_exec (idata, "CAPABILITY", 0) != 0)
   {
@@ -364,11 +364,11 @@ static int imap_check_capabilities (IMAP_DATA* idata)
  *   MUTT_IMAP_CONN_NONEW    - must be an existing connection
  *   MUTT_IMAP_CONN_NOSELECT - must not be in the IMAP_SELECTED state.
  */
-IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags)
+IMAP_DATA *imap_conn_find (const ACCOUNT *account, int flags)
 {
-  CONNECTION* conn = NULL;
-  ACCOUNT* creds = NULL;
-  IMAP_DATA* idata = NULL;
+  CONNECTION *conn = NULL;
+  ACCOUNT *creds = NULL;
+  IMAP_DATA *idata = NULL;
   int new = 0;
 
   while ((conn = mutt_conn_find (conn, account)))
@@ -467,7 +467,7 @@ IMAP_DATA* imap_conn_find (const ACCOUNT* account, int 
flags)
   return idata;
 }
 
-int imap_open_connection (IMAP_DATA* idata)
+int imap_open_connection (IMAP_DATA *idata)
 {
   if (mutt_socket_open (idata->conn) < 0)
     return -1;
@@ -564,7 +564,7 @@ bail:
   return -1;
 }
 
-void imap_close_connection(IMAP_DATA* idata)
+void imap_close_connection(IMAP_DATA *idata)
 {
   if (idata->state != IMAP_DISCONNECTED)
   {
@@ -736,10 +736,10 @@ cleanup:
 
 /* imap_get_flags: Make a simple list out of a FLAGS response.
  *   return stream following FLAGS response */
-static char* imap_get_flags (LIST** hflags, char* s)
+static char *imap_get_flags (LIST **hflags, char *s)
 {
-  LIST* flags;
-  char* flag_word;
+  LIST *flags;
+  char *flag_word;
   char ctmp;
 
   /* sanity-check string */
@@ -788,10 +788,10 @@ static char* imap_get_flags (LIST** hflags, char* s)
   return s;
 }
 
-static int imap_open_mailbox (CONTEXT* ctx)
+static int imap_open_mailbox (CONTEXT *ctx)
 {
   IMAP_DATA *idata;
-  IMAP_STATUS* status;
+  IMAP_STATUS *status;
   char buf[LONG_STRING];
   char bufout[LONG_STRING*2];
   int count = 0;
@@ -988,7 +988,7 @@ static int imap_open_mailbox (CONTEXT* ctx)
       muttdbg(3, "No folder flags found");
     else
     {
-      LIST* t = idata->flags;
+      LIST *t = idata->flags;
 
       muttdbg(3, "Mailbox flags: ");
 
@@ -1085,7 +1085,7 @@ static int imap_open_mailbox_append (CONTEXT *ctx, int 
flags)
 }
 
 /* imap_logout: Gracefully log out of server. */
-void imap_logout (IMAP_DATA** idata)
+void imap_logout (IMAP_DATA **idata)
 {
   if ((*idata)->status != IMAP_FATAL)
   {
@@ -1128,7 +1128,7 @@ cleanup:
 
 /* 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,
+static void imap_set_flag (IMAP_DATA *idata, int aclbit, int flag,
                            const char *str, char *flags, size_t flsize)
 {
   if (mutt_bit_isset (idata->ctx->rights, aclbit))
@@ -1138,7 +1138,7 @@ static void imap_set_flag (IMAP_DATA* idata, int aclbit, 
int flag,
 
 /* imap_has_flag: do a caseless comparison of the flag against a flag list,
 *   return 1 if found or flag list has '\*', 0 otherwise */
-int imap_has_flag (LIST* flag_list, const char* flag)
+int imap_has_flag (LIST *flag_list, const char *flag)
 {
   if (!flag_list)
     return 0;
@@ -1168,10 +1168,10 @@ static int compare_uid (const void *a, const void *b)
 
 /* Note: headers must be in SORT_UID. See imap_exec_msgset for args.
  * Pos is an opaque pointer a la strtok. It should be 0 at first call. */
-static int imap_make_msg_set (IMAP_DATA* idata, BUFFER* buf, int flag,
-                              int changed, int invert, int* pos)
+static int imap_make_msg_set (IMAP_DATA *idata, BUFFER *buf, int flag,
+                              int changed, int invert, int *pos)
 {
-  HEADER** hdrs = idata->ctx->hdrs;
+  HEADER **hdrs = idata->ctx->hdrs;
   int count = 0;        /* number of messages in message set */
   int match = 0;        /* whether current message matches flag condition */
   unsigned int setstart = 0;    /* start of current message range */
@@ -1265,12 +1265,12 @@ static int imap_make_msg_set (IMAP_DATA* idata, BUFFER* 
buf, int flag,
  *   changed: include only changed messages in message set
  *   invert: invert sense of flag, eg MUTT_READ matches unread messages
  * Returns: number of matched messages, or -1 on failure */
-int imap_exec_msgset (IMAP_DATA* idata, const char* pre, const char* post,
+int imap_exec_msgset (IMAP_DATA *idata, const char *pre, const char *post,
                       int flag, int changed, int invert)
 {
-  HEADER** hdrs = NULL;
+  HEADER **hdrs = NULL;
   short oldsort;
-  BUFFER* cmd;
+  BUFFER *cmd;
   int pos;
   int rc;
   int count = 0, reopen_set = 0;
@@ -1342,9 +1342,9 @@ out:
 
 /* returns 0 if mutt's flags match cached server flags:
  * EXCLUDING the deleted flag. */
-static int compare_flags_for_copy (HEADER* h)
+static int compare_flags_for_copy (HEADER *h)
 {
-  IMAP_HEADER_DATA* hd = (IMAP_HEADER_DATA*)h->data;
+  IMAP_HEADER_DATA *hd = (IMAP_HEADER_DATA*)h->data;
 
   if (h->read != hd->read)
     return 1;
@@ -1438,7 +1438,7 @@ int imap_sync_message_for_copy (IMAP_DATA *idata, HEADER 
*hdr, BUFFER *cmd,
   return 0;
 }
 
-static int sync_helper (IMAP_DATA* idata, int right, int flag, const char* 
name)
+static int sync_helper (IMAP_DATA *idata, int right, int flag, const char 
*name)
 {
   int count = 0;
   int rc;
@@ -1471,12 +1471,12 @@ static int sync_helper (IMAP_DATA* idata, int right, 
int flag, const char* name)
  *   ctx: the current context
  *   expunge: 0 or 1 - do expunge?
  */
-int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
+int imap_sync_mailbox (CONTEXT *ctx, int expunge, int *index_hint)
 {
-  IMAP_DATA* idata;
-  CONTEXT* appendctx = NULL;
-  HEADER* h;
-  HEADER** hdrs = NULL;
+  IMAP_DATA *idata;
+  CONTEXT *appendctx = NULL;
+  HEADER *h;
+  HEADER **hdrs = NULL;
   int oldsort;
   int n;
   int rc, quickdel_rc = 0;
@@ -1722,9 +1722,9 @@ out:
 }
 
 /* imap_close_mailbox: clean up IMAP data in CONTEXT */
-int imap_close_mailbox (CONTEXT* ctx)
+int imap_close_mailbox (CONTEXT *ctx)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   int i;
 
   idata = (IMAP_DATA*) ctx->data;
@@ -1795,7 +1795,7 @@ int imap_check_mailbox (CONTEXT *ctx, int *index_hint, 
int force)
 {
   /* overload keyboard timeout to avoid many mailbox checks in a row.
    * Most users don't like having to wait exactly when they press a key. */
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   int result = -1, poll_rc;
 
   idata = (IMAP_DATA*) ctx->data;
@@ -1881,7 +1881,7 @@ static int imap_save_to_header_cache (CONTEXT *ctx, 
HEADER *h)
   int rc = 0;
 #ifdef USE_HCACHE
   int close_hc = 1;
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
 
   idata = (IMAP_DATA *)ctx->data;
   if (idata->hcache)
@@ -1896,7 +1896,7 @@ static int imap_save_to_header_cache (CONTEXT *ctx, 
HEADER *h)
 }
 
 /* split path into (idata,mailbox name) */
-static int imap_get_mailbox (const char* path, IMAP_DATA** hidata, char* buf, 
size_t blen)
+static int imap_get_mailbox (const char *path, IMAP_DATA **hidata, char *buf, 
size_t blen)
 {
   IMAP_MBOX mx;
 
@@ -1924,9 +1924,9 @@ static int imap_get_mailbox (const char* path, 
IMAP_DATA** hidata, char* buf, si
  * save on round trips. Returns number of mailboxes with new mail. */
 int imap_buffy_check (int force, int check_stats)
 {
-  IMAP_DATA* idata;
-  IMAP_DATA* lastdata = NULL;
-  BUFFY* mailbox;
+  IMAP_DATA *idata;
+  IMAP_DATA *lastdata = NULL;
+  BUFFY *mailbox;
   char name[LONG_STRING];
   char command[LONG_STRING*2];
   char munged[LONG_STRING];
@@ -2017,14 +2017,14 @@ int imap_buffy_check (int force, int check_stats)
 /* imap_status: returns count of messages in mailbox, or -1 on error.
  * if queue != 0, queue the command and expect it to have been run
  * on the next call (for pipelining the postponed count) */
-int imap_status (const char* path, int queue)
+int imap_status (const char *path, int queue)
 {
   static int queued = 0;
 
   IMAP_DATA *idata;
   char buf[LONG_STRING*2];
   char mbox[LONG_STRING];
-  IMAP_STATUS* status;
+  IMAP_STATUS *status;
 
   if (imap_get_mailbox (path, &idata, buf, sizeof (buf)) < 0)
     return -1;
@@ -2064,10 +2064,10 @@ int imap_status (const char* path, int queue)
 }
 
 /* return cached mailbox stats or NULL if create is 0 */
-IMAP_STATUS* imap_mboxcache_get (IMAP_DATA* idata, const char* mbox, int 
create)
+IMAP_STATUS *imap_mboxcache_get (IMAP_DATA *idata, const char *mbox, int 
create)
 {
-  LIST* cur;
-  IMAP_STATUS* status;
+  LIST *cur;
+  IMAP_STATUS *status;
   IMAP_STATUS scache;
 #ifdef USE_HCACHE
   header_cache_t *hc = NULL;
@@ -2137,10 +2137,10 @@ IMAP_STATUS* imap_mboxcache_get (IMAP_DATA* idata, 
const char* mbox, int create)
   return status;
 }
 
-void imap_mboxcache_free (IMAP_DATA* idata)
+void imap_mboxcache_free (IMAP_DATA *idata)
 {
-  LIST* cur;
-  IMAP_STATUS* status;
+  LIST *cur;
+  IMAP_STATUS *status;
 
   for (cur = idata->mboxcache; cur; cur = cur->next)
   {
@@ -2154,10 +2154,10 @@ void imap_mboxcache_free (IMAP_DATA* idata)
 
 /* returns number of patterns in the search that should be done server-side
  * (eg are full-text) */
-static int do_search (const pattern_t* search, int allpats)
+static int do_search (const pattern_t *search, int allpats)
 {
   int rc = 0;
-  const pattern_t* pat;
+  const pattern_t *pat;
 
   for (pat = search; pat; pat = pat->next)
   {
@@ -2184,7 +2184,7 @@ static int do_search (const pattern_t* search, int 
allpats)
 /* convert mutt pattern_t to IMAP SEARCH command containing only elements
  * that require full-text search (mutt already has what it needs for most
  * match types, and does a better job (eg server doesn't support regexps). */
-static int imap_compile_search (const pattern_t* pat, BUFFER* buf)
+static int imap_compile_search (const pattern_t *pat, BUFFER *buf)
 {
   if (! do_search (pat, 0))
     return 0;
@@ -2198,7 +2198,7 @@ static int imap_compile_search (const pattern_t* pat, 
BUFFER* buf)
 
     if ((clauses = do_search (pat->child, 1)) > 0)
     {
-      const pattern_t* clause = pat->child;
+      const pattern_t *clause = pat->child;
 
       mutt_buffer_addch (buf, '(');
 
@@ -2267,10 +2267,10 @@ static int imap_compile_search (const pattern_t* pat, 
BUFFER* buf)
   return 0;
 }
 
-int imap_search (CONTEXT* ctx, const pattern_t* pat)
+int imap_search (CONTEXT *ctx, const pattern_t *pat)
 {
   BUFFER buf;
-  IMAP_DATA* idata = (IMAP_DATA*)ctx->data;
+  IMAP_DATA *idata = (IMAP_DATA*)ctx->data;
   int i;
 
   for (i = 0; i < ctx->msgcount; i++)
@@ -2356,7 +2356,7 @@ fail:
 /* trim dest to the length of the longest prefix it shares with src,
  * returning the length of the trimmed string */
 static size_t
-longest_common_prefix (char *dest, const char* src, size_t start, size_t dlen)
+longest_common_prefix (char *dest, const char *src, size_t start, size_t dlen)
 {
   size_t pos = start;
 
@@ -2372,8 +2372,8 @@ longest_common_prefix (char *dest, const char* src, 
size_t start, size_t dlen)
 static int
 imap_complete_hosts (char *dest, size_t len)
 {
-  BUFFY* mailbox;
-  CONNECTION* conn;
+  BUFFY *mailbox;
+  CONNECTION *conn;
   int rc = -1;
   size_t matchlen;
 
@@ -2422,9 +2422,9 @@ imap_complete_hosts (char *dest, size_t len)
 
 /* imap_complete: given a partial IMAP folder path, return a string which
  *   adds as much to the path as is unique */
-int imap_complete(char* dest, size_t dlen, const char* path)
+int imap_complete(char *dest, size_t dlen, const char *path)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   char list[LONG_STRING];
   char buf[LONG_STRING*2];
   IMAP_LIST listresp;
@@ -2518,9 +2518,9 @@ int imap_complete(char* dest, size_t dlen, const char* 
path)
  *      -1: error
  *       0: success
  *       1: non-fatal error - try fetch/append */
-int imap_fast_trash (CONTEXT* ctx, char* dest)
+int imap_fast_trash (CONTEXT *ctx, char *dest)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   char mbox[LONG_STRING];
   char mmbox[LONG_STRING];
   char prompt[LONG_STRING];
diff --git a/imap/imap.h b/imap/imap.h
index c18a8790..413b52c1 100644
--- a/imap/imap.h
+++ b/imap/imap.h
@@ -28,21 +28,21 @@
 typedef struct
 {
   ACCOUNT account;
-  char* mbox;
+  char *mbox;
 } IMAP_MBOX;
 
 /* imap.c */
 int imap_access (const char *path);
 int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force);
-int imap_delete_mailbox (CONTEXT* idata, IMAP_MBOX mx);
+int imap_delete_mailbox (CONTEXT *idata, IMAP_MBOX mx);
 int imap_sync_mailbox (CONTEXT *ctx, int expunge, int *index_hint);
 int imap_close_mailbox (CONTEXT *ctx);
 int imap_buffy_check (int force, int check_stats);
 int imap_status (const char *path, int queue);
-int imap_search (CONTEXT* ctx, const pattern_t* pat);
+int imap_search (CONTEXT *ctx, const pattern_t *pat);
 int imap_subscribe (char *path, int subscribe);
-int imap_complete (char* dest, size_t dlen, const char* path);
-int imap_fast_trash (CONTEXT* ctx, char* dest);
+int imap_complete (char *dest, size_t dlen, const char *path);
+int imap_fast_trash (CONTEXT *ctx, char *dest);
 
 void imap_allow_reopen (CONTEXT *ctx);
 void imap_disallow_reopen (CONTEXT *ctx);
@@ -50,26 +50,26 @@ void imap_disallow_reopen (CONTEXT *ctx);
 extern struct mx_ops mx_imap_ops;
 
 /* browse.c */
-int imap_browse (const char* path, struct browser_state* state);
-int imap_mailbox_create (const char* folder, BUFFER *result);
-int imap_mailbox_rename (const char* mailbox, BUFFER *result);
+int imap_browse (const char *path, struct browser_state *state);
+int imap_mailbox_create (const char *folder, BUFFER *result);
+int imap_mailbox_rename (const char *mailbox, BUFFER *result);
 
 /* message.c */
-int imap_append_message (CONTEXT* ctx, MESSAGE* msg);
-int imap_copy_messages (CONTEXT* ctx, HEADER* h, const char* dest, int delete);
+int imap_append_message (CONTEXT *ctx, MESSAGE *msg);
+int imap_copy_messages (CONTEXT *ctx, HEADER *h, const char *dest, int delete);
 
 /* socket.c */
 void imap_logout_all (void);
 
 /* util.c */
-int imap_expand_path (BUFFER* path);
+int imap_expand_path (BUFFER *path);
 int imap_buffer_remove_path_password (BUFFER *dest, const char *src);
-int imap_parse_path (const char* path, IMAP_MBOX* mx);
-void imap_pretty_mailbox (char* path, size_t pathlen);
+int imap_parse_path (const char *path, IMAP_MBOX *mx);
+void imap_pretty_mailbox (char *path, size_t pathlen);
 
 int imap_wait_keepalive (pid_t pid);
 void imap_keepalive (void);
 
-int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2);
+int imap_account_match (const ACCOUNT *a1, const ACCOUNT *a2);
 
 #endif
diff --git a/imap/imap_private.h b/imap/imap_private.h
index 7cceb011..5090d4ba 100644
--- a/imap/imap_private.h
+++ b/imap/imap_private.h
@@ -132,12 +132,12 @@ enum
 typedef struct
 {
   unsigned int uid;
-  char* path;
+  char *path;
 } IMAP_CACHE;
 
 typedef struct
 {
-  char* name;
+  char *name;
 
   unsigned int messages;
   unsigned int recent;
@@ -149,7 +149,7 @@ typedef struct
 
 typedef struct
 {
-  char* name;
+  char *name;
 
   char delim;
   /* if we end up storing a lot of these we could turn this into a bitfield */
@@ -185,11 +185,11 @@ typedef struct
    * I've chosen (3) for now. (2) might not be too bad, but it involves
    * tracking all possible capabilities. bah. (1) I don't like because
    * it's just no fun to get the same information twice */
-  char* capstr;
+  char *capstr;
   unsigned char capabilities[(CAPMAX + 7)/8];
   unsigned int seqno;
   time_t lastread; /* last time we read a command for the server */
-  char* buf;
+  char *buf;
   unsigned int blen;
 
   /* If nonzero, we can send UTF-8, and the server will use UTF8 rather
@@ -201,17 +201,17 @@ typedef struct
   /* if set, the response parser will store results for complicated commands
    * here. */
   IMAP_COMMAND_TYPE cmdtype;
-  void* cmddata;
+  void *cmddata;
 
   /* command queue */
-  IMAP_COMMAND* cmds;
+  IMAP_COMMAND *cmds;
   int cmdslots;
   int nextcmd;
   int lastcmd;
-  BUFFER* cmdbuf;
+  BUFFER *cmdbuf;
 
   /* cache IMAP_STATUS of visited mailboxes */
-  LIST* mboxcache;
+  LIST *mboxcache;
 
   /* The following data is all specific to the currently SELECTED mbox */
   char delim;
@@ -253,44 +253,44 @@ typedef struct
 
 /* -- private IMAP functions -- */
 /* imap.c */
-int imap_create_mailbox (IMAP_DATA* idata, char* mailbox);
-int imap_rename_mailbox (IMAP_DATA* idata, IMAP_MBOX* mx, const char* newname);
-IMAP_STATUS* imap_mboxcache_get (IMAP_DATA* idata, const char* mbox,
+int imap_create_mailbox (IMAP_DATA *idata, char *mailbox);
+int imap_rename_mailbox (IMAP_DATA *idata, IMAP_MBOX *mx, const char *newname);
+IMAP_STATUS *imap_mboxcache_get (IMAP_DATA *idata, const char *mbox,
                                  int create);
-void imap_mboxcache_free (IMAP_DATA* idata);
-int imap_exec_msgset (IMAP_DATA* idata, const char* pre, const char* post,
+void imap_mboxcache_free (IMAP_DATA *idata);
+int imap_exec_msgset (IMAP_DATA *idata, const char *pre, const char *post,
                       int flag, int changed, int invert);
-int imap_open_connection (IMAP_DATA* idata);
-void imap_close_connection (IMAP_DATA* idata);
-IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags);
-int imap_read_literal (FILE* fp, IMAP_DATA* idata, unsigned int bytes, 
progress_t*);
-void imap_expunge_mailbox (IMAP_DATA* idata);
-void imap_logout (IMAP_DATA** idata);
+int imap_open_connection (IMAP_DATA *idata);
+void imap_close_connection (IMAP_DATA *idata);
+IMAP_DATA *imap_conn_find (const ACCOUNT *account, int flags);
+int imap_read_literal (FILE *fp, IMAP_DATA *idata, unsigned int bytes, 
progress_t*);
+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 imap_has_flag (LIST* flag_list, const char* flag);
+int imap_has_flag (LIST *flag_list, const char *flag);
 int imap_reconnect (IMAP_DATA **p_idata);
 
 /* auth.c */
-int imap_authenticate (IMAP_DATA* idata);
+int imap_authenticate (IMAP_DATA *idata);
 
 /* command.c */
-int imap_cmd_start (IMAP_DATA* idata, const char* cmd);
-int imap_cmd_step (IMAP_DATA* idata);
-void imap_cmd_finish (IMAP_DATA* idata);
-int imap_code (const char* s);
-const char* imap_cmd_trailer (IMAP_DATA* idata);
-int imap_exec (IMAP_DATA* idata, const char* cmd, int flags);
-int imap_cmd_idle (IMAP_DATA* idata);
+int imap_cmd_start (IMAP_DATA *idata, const char *cmd);
+int imap_cmd_step (IMAP_DATA *idata);
+void imap_cmd_finish (IMAP_DATA *idata);
+int imap_code (const char *s);
+const char *imap_cmd_trailer (IMAP_DATA *idata);
+int imap_exec (IMAP_DATA *idata, const char *cmd, int flags);
+int imap_cmd_idle (IMAP_DATA *idata);
 
 /* message.c */
-void imap_add_keywords (char* s, HEADER* keywords, LIST* mailbox_flags, size_t 
slen);
-void imap_free_header_data (IMAP_HEADER_DATA** data);
-int imap_read_headers (IMAP_DATA* idata, unsigned int msn_begin, unsigned int 
msn_end,
+void imap_add_keywords (char *s, HEADER *keywords, LIST *mailbox_flags, size_t 
slen);
+void imap_free_header_data (IMAP_HEADER_DATA **data);
+int imap_read_headers (IMAP_DATA *idata, unsigned int msn_begin, unsigned int 
msn_end,
                        int initial_download);
-char* imap_set_flags (IMAP_DATA* idata, HEADER* h, char* s, int 
*server_changes);
-int imap_cache_del (IMAP_DATA* idata, HEADER* h);
-int imap_cache_clean (IMAP_DATA* idata);
+char *imap_set_flags (IMAP_DATA *idata, HEADER *h, char *s, int 
*server_changes);
+int imap_cache_del (IMAP_DATA *idata, HEADER *h);
+int imap_cache_clean (IMAP_DATA *idata);
 
 int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno, int headers);
 int imap_close_message (CONTEXT *ctx, MESSAGE *msg);
@@ -298,34 +298,34 @@ int imap_commit_message (CONTEXT *ctx, MESSAGE *msg);
 
 /* util.c */
 #ifdef USE_HCACHE
-header_cache_t* imap_hcache_open (IMAP_DATA* idata, const char* path);
-void imap_hcache_close (IMAP_DATA* idata);
-HEADER* imap_hcache_get (IMAP_DATA* idata, unsigned int uid);
-int imap_hcache_put (IMAP_DATA* idata, HEADER* h);
-int imap_hcache_del (IMAP_DATA* idata, unsigned int uid);
+header_cache_t *imap_hcache_open (IMAP_DATA *idata, const char *path);
+void imap_hcache_close (IMAP_DATA *idata);
+HEADER *imap_hcache_get (IMAP_DATA *idata, unsigned int uid);
+int imap_hcache_put (IMAP_DATA *idata, HEADER *h);
+int imap_hcache_del (IMAP_DATA *idata, unsigned int uid);
 int imap_hcache_store_uid_seqset (IMAP_DATA *idata);
 int imap_hcache_clear_uid_seqset (IMAP_DATA *idata);
 char *imap_hcache_get_uid_seqset (IMAP_DATA *idata);
 #endif
 
-int imap_continue (const char* msg, const char* resp);
-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,
+int imap_continue (const char *msg, const char *resp);
+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);
 void imap_cachepath(IMAP_DATA *idata, const char *mailbox, BUFFER *dest);
-int imap_get_literal_count (char* buf, unsigned int* bytes);
-char* imap_get_qualifier (char* buf);
-int imap_mxcmp (const char* mx1, const char* mx2);
-char* imap_next_word (char* s);
-time_t imap_parse_date (char* s);
-void imap_make_date (BUFFER* buf, time_t timestamp);
-void imap_qualify_path (char *dest, size_t len, IMAP_MBOX *mx, char* path);
-void imap_buffer_qualify_path (BUFFER *dest, IMAP_MBOX *mx, char* path);
-void imap_quote_string (char* dest, size_t dlen, const char* src);
+int imap_get_literal_count (char *buf, unsigned int *bytes);
+char *imap_get_qualifier (char *buf);
+int imap_mxcmp (const char *mx1, const char *mx2);
+char *imap_next_word (char *s);
+time_t imap_parse_date (char *s);
+void imap_make_date (BUFFER *buf, time_t timestamp);
+void imap_qualify_path (char *dest, size_t len, IMAP_MBOX *mx, char *path);
+void imap_buffer_qualify_path (BUFFER *dest, IMAP_MBOX *mx, char *path);
+void imap_quote_string (char *dest, size_t dlen, const char *src);
 void imap_quote_string_and_backquotes (char *dest, size_t dlen, const char 
*src);
-void imap_unquote_string (char* s);
+void imap_unquote_string (char *s);
 void imap_munge_mbox_name (IMAP_DATA *idata, char *dest, size_t dlen, const 
char *src);
 void imap_unmunge_mbox_name (IMAP_DATA *idata, char *s);
 int imap_wordcasecmp(const char *a, const char *b);
@@ -338,7 +338,7 @@ void imap_utf_encode (IMAP_DATA *idata, char **s);
 void imap_utf_decode (IMAP_DATA *idata, char **s);
 
 #if USE_HCACHE
-/* typedef size_t (*hcache_keylen_t)(const char* fn); */
+/* typedef size_t (*hcache_keylen_t)(const char *fn); */
 #define imap_hcache_keylen mutt_strlen
 #endif /* USE_HCACHE */
 
diff --git a/imap/message.c b/imap/message.c
index dbc91034..1c05f2e8 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -66,15 +66,15 @@ static int read_headers_fetch_new (IMAP_DATA *idata, 
unsigned int msn_begin,
                                    unsigned int *maxuid, int initial_download);
 
 
-static FILE* msg_cache_get (IMAP_DATA* idata, HEADER* h);
-static FILE* msg_cache_put (IMAP_DATA* idata, HEADER* h);
-static int msg_cache_commit (IMAP_DATA* idata, HEADER* h);
+static FILE *msg_cache_get (IMAP_DATA *idata, HEADER *h);
+static FILE *msg_cache_put (IMAP_DATA *idata, HEADER *h);
+static int msg_cache_commit (IMAP_DATA *idata, HEADER *h);
 
-static int flush_buffer (char* buf, size_t* len, CONNECTION* conn);
-static int msg_fetch_header (CONTEXT* ctx, IMAP_HEADER* h, char* buf,
-                             FILE* fp);
-static int msg_parse_fetch (IMAP_HEADER* h, char* s);
-static char* msg_parse_flags (IMAP_HEADER* h, char* s);
+static int flush_buffer (char *buf, size_t *len, CONNECTION *conn);
+static int msg_fetch_header (CONTEXT *ctx, IMAP_HEADER *h, char *buf,
+                             FILE *fp);
+static int msg_parse_fetch (IMAP_HEADER *h, char *s);
+static char *msg_parse_flags (IMAP_HEADER *h, char *s);
 
 
 /* If the user hits ctrl-c during an initial header download for a mailbox,
@@ -226,11 +226,11 @@ static unsigned int imap_fetch_msn_seqset (BUFFER *b, 
IMAP_DATA *idata, int eval
  * msn of the last message read. It will return a value other than
  * msn_end if mail comes in while downloading headers (in theory).
  */
-int imap_read_headers (IMAP_DATA* idata, unsigned int msn_begin, unsigned int 
msn_end,
+int imap_read_headers (IMAP_DATA *idata, unsigned int msn_begin, unsigned int 
msn_end,
                        int initial_download)
 {
-  CONTEXT* ctx;
-  IMAP_STATUS* status;
+  CONTEXT *ctx;
+  IMAP_STATUS *status;
   int oldmsgcount;
   unsigned int maxuid = 0;
   int retval = -1;
@@ -447,7 +447,7 @@ static int read_headers_normal_eval_cache (IMAP_DATA *idata,
                                            int store_flag_updates,
                                            int eval_condstore)
 {
-  CONTEXT* ctx;
+  CONTEXT *ctx;
   int idx, msgno, rc, mfhrc = 0;
   progress_t progress;
   IMAP_HEADER h;
@@ -578,7 +578,7 @@ static int read_headers_normal_eval_cache (IMAP_DATA *idata,
  */
 static int read_headers_qresync_eval_cache (IMAP_DATA *idata, char *uid_seqset)
 {
-  CONTEXT* ctx;
+  CONTEXT *ctx;
   int rc;
   unsigned int uid, msn;
   SEQSET_ITERATOR *iter;
@@ -661,7 +661,7 @@ static int read_headers_condstore_qresync_updates 
(IMAP_DATA *idata,
                                                    unsigned long long 
hc_modseq,
                                                    int eval_qresync)
 {
-  CONTEXT* ctx;
+  CONTEXT *ctx;
   progress_t progress;
   int msgno, rc;
   char buf[LONG_STRING];
@@ -834,7 +834,7 @@ static int read_headers_fetch_new (IMAP_DATA *idata, 
unsigned int msn_begin,
                                    unsigned int msn_end, int evalhc,
                                    unsigned int *maxuid, int initial_download)
 {
-  CONTEXT* ctx;
+  CONTEXT *ctx;
   int idx, msgno, rc, mfhrc = 0, retval = -1;
   unsigned int fetch_msn_end = 0;
   progress_t progress;
@@ -1057,9 +1057,9 @@ bail:
 
 int imap_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno, int headers)
 {
-  IMAP_DATA* idata;
-  HEADER* h;
-  ENVELOPE* newenv;
+  IMAP_DATA *idata;
+  HEADER *h;
+  ENVELOPE *newenv;
   BUFFER *path;
   char buf[LONG_STRING];
   char *pc;
@@ -1315,7 +1315,7 @@ int imap_commit_message (CONTEXT *ctx, MESSAGE *msg)
 
 int imap_append_message (CONTEXT *ctx, MESSAGE *msg)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   FILE *fp = NULL;
   BUFFER *internaldate;
   char buf[LONG_STRING*2];
@@ -1455,9 +1455,9 @@ fail:
  *      -1: error
  *       0: success
  *       1: non-fatal error - try fetch/append */
-int imap_copy_messages (CONTEXT* ctx, HEADER* h, const char* dest, int delete)
+int imap_copy_messages (CONTEXT *ctx, HEADER *h, const char *dest, int delete)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   BUFFER *sync_cmd = NULL, *cmd = NULL;
   char mbox[LONG_STRING];
   char mmbox[LONG_STRING];
@@ -1650,7 +1650,7 @@ static body_cache_t *msg_cache_open (IMAP_DATA *idata)
   return rv;
 }
 
-static FILE* msg_cache_get (IMAP_DATA* idata, HEADER* h)
+static FILE *msg_cache_get (IMAP_DATA *idata, HEADER *h)
 {
   char id[SHORT_STRING];
 
@@ -1662,7 +1662,7 @@ static FILE* msg_cache_get (IMAP_DATA* idata, HEADER* h)
   return mutt_bcache_get (idata->bcache, id);
 }
 
-static FILE* msg_cache_put (IMAP_DATA* idata, HEADER* h)
+static FILE *msg_cache_put (IMAP_DATA *idata, HEADER *h)
 {
   char id[SHORT_STRING];
 
@@ -1674,7 +1674,7 @@ static FILE* msg_cache_put (IMAP_DATA* idata, HEADER* h)
   return mutt_bcache_put (idata->bcache, id, 1);
 }
 
-static int msg_cache_commit (IMAP_DATA* idata, HEADER* h)
+static int msg_cache_commit (IMAP_DATA *idata, HEADER *h)
 {
   char id[SHORT_STRING];
 
@@ -1687,7 +1687,7 @@ static int msg_cache_commit (IMAP_DATA* idata, HEADER* h)
   return mutt_bcache_commit (idata->bcache, id);
 }
 
-int imap_cache_del (IMAP_DATA* idata, HEADER* h)
+int imap_cache_del (IMAP_DATA *idata, HEADER *h)
 {
   char id[SHORT_STRING];
 
@@ -1699,10 +1699,10 @@ int imap_cache_del (IMAP_DATA* idata, HEADER* h)
   return mutt_bcache_del (idata->bcache, id);
 }
 
-static int msg_cache_clean_cb (const char* id, body_cache_t* bcache, void* 
data)
+static int msg_cache_clean_cb (const char *id, body_cache_t *bcache, void 
*data)
 {
   unsigned int uv, uid;
-  IMAP_DATA* idata = (IMAP_DATA*)data;
+  IMAP_DATA *idata = (IMAP_DATA*)data;
 
   if (sscanf (id, "%u-%u", &uv, &uid) != 2)
     return 0;
@@ -1715,7 +1715,7 @@ static int msg_cache_clean_cb (const char* id, 
body_cache_t* bcache, void* data)
   return 0;
 }
 
-int imap_cache_clean (IMAP_DATA* idata)
+int imap_cache_clean (IMAP_DATA *idata)
 {
   idata->bcache = msg_cache_open (idata);
   mutt_bcache_list (idata->bcache, msg_cache_clean_cb, idata);
@@ -1725,7 +1725,7 @@ int imap_cache_clean (IMAP_DATA* idata)
 
 /* imap_add_keywords: concatenate custom IMAP tags to list, if they
  *   appear in the folder flags list. Why wouldn't they? */
-void imap_add_keywords (char* s, HEADER* h, LIST* mailbox_flags, size_t slen)
+void imap_add_keywords (char *s, HEADER *h, LIST *mailbox_flags, size_t slen)
 {
   LIST *keywords;
 
@@ -1746,7 +1746,7 @@ void imap_add_keywords (char* s, HEADER* h, LIST* 
mailbox_flags, size_t slen)
 }
 
 /* imap_free_header_data: free IMAP_HEADER structure */
-void imap_free_header_data (IMAP_HEADER_DATA** data)
+void imap_free_header_data (IMAP_HEADER_DATA **data)
 {
   if (*data)
   {
@@ -1788,12 +1788,12 @@ static void imap_set_changed_flag (CONTEXT *ctx, HEADER 
*h, int local_changes,
  * Sets server_changes to 1 if a change to a flag is made, or in the
  * case of h->changed, if a change to a flag _would_ have been
  * made. */
-char* imap_set_flags (IMAP_DATA* idata, HEADER* h, char* s, int 
*server_changes)
+char *imap_set_flags (IMAP_DATA *idata, HEADER *h, char *s, int 
*server_changes)
 {
-  CONTEXT* ctx = idata->ctx;
+  CONTEXT *ctx = idata->ctx;
   IMAP_HEADER newh;
   IMAP_HEADER_DATA old_hd;
-  IMAP_HEADER_DATA* hd;
+  IMAP_HEADER_DATA *hd;
   unsigned char readonly;
   int local_changes;
 
@@ -1847,9 +1847,9 @@ char* imap_set_flags (IMAP_DATA* idata, HEADER* h, char* 
s, int *server_changes)
  *      0 on success
  *     -1 if the string is not a fetch response
  *     -2 if the string is a corrupt fetch response */
-static int msg_fetch_header (CONTEXT* ctx, IMAP_HEADER* h, char* buf, FILE* fp)
+static int msg_fetch_header (CONTEXT *ctx, IMAP_HEADER *h, char *buf, FILE *fp)
 {
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   unsigned int bytes;
   int rc = -1; /* default now is that string isn't FETCH response*/
   int parse_rc;
@@ -2018,9 +2018,9 @@ static int msg_parse_fetch (IMAP_HEADER *h, char *s)
 }
 
 /* msg_parse_flags: read a FLAGS token into an IMAP_HEADER */
-static char* msg_parse_flags (IMAP_HEADER* h, char* s)
+static char *msg_parse_flags (IMAP_HEADER *h, char *s)
 {
-  IMAP_HEADER_DATA* hd = h->data;
+  IMAP_HEADER_DATA *hd = h->data;
 
   /* sanity-check string */
   if (ascii_strncasecmp ("FLAGS", s, 5) != 0)
@@ -2074,7 +2074,7 @@ static char* msg_parse_flags (IMAP_HEADER* h, char* s)
     {
       /* store custom flags as well */
       char ctmp;
-      char* flag_word = s;
+      char *flag_word = s;
 
       if (!hd->keywords)
         hd->keywords = mutt_new_list ();
diff --git a/imap/message.h b/imap/message.h
index ea185db1..9d3bc476 100644
--- a/imap/message.h
+++ b/imap/message.h
@@ -42,7 +42,7 @@ typedef struct imap_header_data
 
 typedef struct
 {
-  IMAP_HEADER_DATA* data;
+  IMAP_HEADER_DATA *data;
 
   time_t received;
   long content_length;
diff --git a/imap/util.c b/imap/util.c
index 681713a5..f5d3c706 100644
--- a/imap/util.c
+++ b/imap/util.c
@@ -49,10 +49,10 @@
  * Outputs: The buffer is rewritten in place with the canonical IMAP path.
  * Returns 0 on success, or -1 if imap_parse_path chokes or url_ciss_tobuffer
  *   fails, which it might if there isn't enough room in the buffer. */
-int imap_expand_path (BUFFER* path)
+int imap_expand_path (BUFFER *path)
 {
   IMAP_MBOX mx;
-  IMAP_DATA* idata;
+  IMAP_DATA *idata;
   ciss_url_t url;
   char fixedpath[LONG_STRING];
   int rc;
@@ -156,7 +156,7 @@ static void imap_hcache_namer (const char *path, BUFFER 
*dest)
   mutt_buffer_printf (dest, "%s.hcache", path);
 }
 
-header_cache_t* imap_hcache_open (IMAP_DATA* idata, const char* path)
+header_cache_t *imap_hcache_open (IMAP_DATA *idata, const char *path)
 {
   IMAP_MBOX mx;
   ciss_url_t url;
@@ -200,7 +200,7 @@ cleanup:
   return rv;
 }
 
-void imap_hcache_close (IMAP_DATA* idata)
+void imap_hcache_close (IMAP_DATA *idata)
 {
   if (!idata->hcache)
     return;
@@ -209,12 +209,12 @@ void imap_hcache_close (IMAP_DATA* idata)
   idata->hcache = NULL;
 }
 
-HEADER* imap_hcache_get (IMAP_DATA* idata, unsigned int uid)
+HEADER *imap_hcache_get (IMAP_DATA *idata, unsigned int uid)
 {
   char key[16];
   void *data;
   unsigned int uv;
-  HEADER* h = NULL;
+  HEADER *h = NULL;
 
   if (!idata->hcache)
     return NULL;
@@ -235,7 +235,7 @@ HEADER* imap_hcache_get (IMAP_DATA* idata, unsigned int uid)
   return h;
 }
 
-int imap_hcache_put (IMAP_DATA* idata, HEADER* h)
+int imap_hcache_put (IMAP_DATA *idata, HEADER *h)
 {
   char key[16];
 
@@ -247,7 +247,7 @@ int imap_hcache_put (IMAP_DATA* idata, HEADER* h)
                             imap_hcache_keylen, 0);
 }
 
-int imap_hcache_del (IMAP_DATA* idata, unsigned int uid)
+int imap_hcache_del (IMAP_DATA *idata, unsigned int uid)
 {
   char key[16];
 
@@ -307,11 +307,11 @@ char *imap_hcache_get_uid_seqset (IMAP_DATA *idata)
 /* imap_parse_path: given an IMAP mailbox name, return host, port
  *   and a path IMAP servers will recognize.
  * mx.mbox is malloc'd, caller must free it */
-int imap_parse_path (const char* path, IMAP_MBOX* mx)
+int imap_parse_path (const char *path, IMAP_MBOX *mx)
 {
   static unsigned short ImapPort = 0;
   static unsigned short ImapsPort = 0;
-  struct servent* service;
+  struct servent *service;
   char tmp[128];
   ciss_url_t url;
   char *c;
@@ -414,10 +414,10 @@ int imap_parse_path (const char* path, IMAP_MBOX* mx)
 }
 
 /* silly helper for mailbox name string comparisons, because of INBOX */
-int imap_mxcmp (const char* mx1, const char* mx2)
+int imap_mxcmp (const char *mx1, const char *mx2)
 {
-  char* b1;
-  char* b2;
+  char *b1;
+  char *b2;
   int rc;
 
   if (!mx1 || !*mx1)
@@ -442,11 +442,11 @@ int imap_mxcmp (const char* mx1, const char* mx2)
 
 /* imap_pretty_mailbox: called by mutt_pretty_mailbox to make IMAP paths
  *   look nice. */
-void imap_pretty_mailbox (char* path, size_t pathlen)
+void imap_pretty_mailbox (char *path, size_t pathlen)
 {
   IMAP_MBOX home, target;
   ciss_url_t url;
-  char* delim;
+  char *delim;
   int tlen;
   int hlen = 0;
   char home_match = 0;
@@ -496,7 +496,7 @@ void imap_pretty_mailbox (char* path, size_t pathlen)
 
 /* imap_continue: display a message and ask the user if she wants to
  *   go on. */
-int imap_continue (const char* msg, const char* resp)
+int imap_continue (const char *msg, const char *resp)
 {
   imap_error (msg, resp);
   return mutt_yesorno (_("Continue?"), 0);
@@ -510,9 +510,9 @@ void imap_error (const char *where, const char *msg)
 }
 
 /* imap_new_idata: Allocate and initialise a new IMAP_DATA structure. */
-IMAP_DATA* imap_new_idata (void)
+IMAP_DATA *imap_new_idata (void)
 {
-  IMAP_DATA* idata = safe_calloc (1, sizeof (IMAP_DATA));
+  IMAP_DATA *idata = safe_calloc (1, sizeof (IMAP_DATA));
 
   idata->cmdbuf = mutt_buffer_new ();
   idata->cmdslots = ImapPipelineDepth + 2;
@@ -522,7 +522,7 @@ IMAP_DATA* imap_new_idata (void)
 }
 
 /* imap_free_idata: Release and clear storage in an IMAP_DATA structure. */
-void imap_free_idata (IMAP_DATA** idata)
+void imap_free_idata (IMAP_DATA **idata)
 {
   if (!idata)
     return;
@@ -629,7 +629,7 @@ int imap_get_literal_count(char *buf, unsigned int *bytes)
 
 /* imap_get_qualifier: in a tagged response, skip tag and status for
  *   the qualifier message. Used by imap_copy_message for TRYCREATE */
-char* imap_get_qualifier (char* buf)
+char *imap_get_qualifier (char *buf)
 {
   char *s = buf;
 
@@ -717,7 +717,7 @@ time_t imap_parse_date (char *s)
 /* format date in IMAP style: DD-MMM-YYYY HH:MM:SS +ZZzz. */
 void imap_make_date (BUFFER *buf, time_t timestamp)
 {
-  struct tm* tm = localtime (&timestamp);
+  struct tm *tm = localtime (&timestamp);
   time_t tz = mutt_local_tz (timestamp);
 
   tz /= 60;
@@ -736,7 +736,7 @@ void imap_make_date (BUFFER *buf, time_t timestamp)
  * Note this will include the password in the URL, if it was present in the
  * account connection URL.
  */
-void imap_qualify_path (char *dest, size_t len, IMAP_MBOX *mx, char* path)
+void imap_qualify_path (char *dest, size_t len, IMAP_MBOX *mx, char *path)
 {
   ciss_url_t url;
 
@@ -746,7 +746,7 @@ void imap_qualify_path (char *dest, size_t len, IMAP_MBOX 
*mx, char* path)
   url_ciss_tostring (&url, dest, len, U_DECODE_PASSWD);
 }
 
-void imap_buffer_qualify_path (BUFFER *dest, IMAP_MBOX *mx, char* path)
+void imap_buffer_qualify_path (BUFFER *dest, IMAP_MBOX *mx, char *path)
 {
   ciss_url_t url;
 
@@ -1015,12 +1015,12 @@ void imap_disallow_reopen (CONTEXT *ctx)
     CTX_DATA->reopen &= ~IMAP_REOPEN_ALLOW;
 }
 
-int imap_account_match (const ACCOUNT* a1, const ACCOUNT* a2)
+int imap_account_match (const ACCOUNT *a1, const ACCOUNT *a2)
 {
-  IMAP_DATA* a1_idata = imap_conn_find (a1, MUTT_IMAP_CONN_NONEW);
-  IMAP_DATA* a2_idata = imap_conn_find (a2, MUTT_IMAP_CONN_NONEW);
-  const ACCOUNT* a1_canon = a1_idata == NULL ? a1 : &a1_idata->conn->account;
-  const ACCOUNT* a2_canon = a2_idata == NULL ? a2 : &a2_idata->conn->account;
+  IMAP_DATA *a1_idata = imap_conn_find (a1, MUTT_IMAP_CONN_NONEW);
+  IMAP_DATA *a2_idata = imap_conn_find (a2, MUTT_IMAP_CONN_NONEW);
+  const ACCOUNT *a1_canon = a1_idata == NULL ? a1 : &a1_idata->conn->account;
+  const ACCOUNT *a2_canon = a2_idata == NULL ? a2 : &a2_idata->conn->account;
 
   return mutt_account_match (a1_canon, a2_canon);
 }
diff --git a/init.c b/init.c
index 7cd8b233..34ec438c 100644
--- a/init.c
+++ b/init.c
@@ -65,17 +65,17 @@ typedef struct myvar
 {
   char *name;
   char *value;
-  struct myvar* next;
+  struct myvar *next;
 } myvar_t;
 
-static myvar_t* MyVars;
+static myvar_t *MyVars;
 
 static int var_to_string (int idx, BUFFER *val);
 static void escape_string_to_buffer (BUFFER *dst, const char *src);
 
-static void myvar_set (const char* var, const char* val);
-static const char* myvar_get (const char* var);
-static void myvar_del (const char* var);
+static void myvar_set (const char *var, const char *val);
+static const char *myvar_get (const char *var);
+static void myvar_del (const char *var);
 
 extern char **envlist;
 
@@ -395,9 +395,9 @@ int mutt_extract_token (BUFFER *dest, BUFFER *tok, int 
flags)
   return 0;
 }
 
-static void mutt_free_opt (struct option_t* p)
+static void mutt_free_opt (struct option_t *p)
 {
-  REGEXP* pp;
+  REGEXP *pp;
 
   switch (p->type & DT_MASK)
   {
@@ -2004,9 +2004,9 @@ static void escape_string_to_buffer (BUFFER *dst, const 
char *src)
   }
 }
 
-static size_t escape_string (char *dst, size_t len, const char* src)
+static size_t escape_string (char *dst, size_t len, const char *src)
 {
-  char* p = dst;
+  char *p = dst;
 
   if (!len)
     return 0;
@@ -2249,7 +2249,7 @@ static int parse_set (BUFFER *tmp, BUFFER *s, union 
pointer_long_t udata, BUFFER
   int idx = -1;
   const char *p;
   BUFFER *scratch = NULL;
-  char* myvar;
+  char *myvar;
   long data = udata.l;
 
   while (MoreArgs (s))
@@ -3682,16 +3682,16 @@ static int mutt_execute_commands (LIST *p)
   return 0;
 }
 
-static char* mutt_find_cfg (const char *home, const char *xdg_cfg_home)
+static char *mutt_find_cfg (const char *home, const char *xdg_cfg_home)
 {
-  const char* names[] =
+  const char *names[] =
     {
       "muttrc-" MUTT_VERSION,
       "muttrc",
       NULL,
     };
 
-  const char* locations[][2] =
+  const char *locations[][2] =
     {
       { home, ".", },
       { home, ".mutt/" },
@@ -4082,9 +4082,9 @@ bail:
   return -1;
 }
 
-static void myvar_set (const char* var, const char* val)
+static void myvar_set (const char *var, const char *val)
 {
-  myvar_t** cur;
+  myvar_t **cur;
 
   for (cur = &MyVars; *cur; cur = &((*cur)->next))
     if (!mutt_strcmp ((*cur)->name, var))
@@ -4099,7 +4099,7 @@ static void myvar_set (const char* var, const char* val)
   mutt_str_replace (&(*cur)->value, val);
 }
 
-static void myvar_del (const char* var)
+static void myvar_del (const char *var)
 {
   myvar_t **cur;
   myvar_t *tmp;
@@ -4119,9 +4119,9 @@ static void myvar_del (const char* var)
   }
 }
 
-static const char* myvar_get (const char* var)
+static const char *myvar_get (const char *var)
 {
-  myvar_t* cur;
+  myvar_t *cur;
 
   for (cur = MyVars; cur; cur = cur->next)
     if (!mutt_strcmp (cur->name, var))
diff --git a/menu.c b/menu.c
index a5652c6a..698dfa77 100644
--- a/menu.c
+++ b/menu.c
@@ -28,7 +28,7 @@
 #include "sidebar.h"
 #endif
 
-char* SearchBuffers[MENU_MAX];
+char *SearchBuffers[MENU_MAX];
 
 /* These are used to track the active menus, for redraw operations. */
 static size_t MenuStackCount = 0;
@@ -885,7 +885,7 @@ static int menu_search (MUTTMENU *menu, int op)
   int searchDir;
   regex_t re;
   char buf[SHORT_STRING];
-  char* searchBuf = menu->menu >= 0 && menu->menu < MENU_MAX ?
+  char *searchBuf = menu->menu >= 0 && menu->menu < MENU_MAX ?
     SearchBuffers[menu->menu] : NULL;
 
   if (!(searchBuf && *searchBuf) ||
diff --git a/mh.c b/mh.c
index 40115db2..479f4fc0 100644
--- a/mh.c
+++ b/mh.c
@@ -219,10 +219,10 @@ out:
   return rc;
 }
 
-static inline mode_t mh_umask (CONTEXT* ctx)
+static inline mode_t mh_umask (CONTEXT *ctx)
 {
   struct stat st;
-  struct mh_data* data = mh_data (ctx);
+  struct mh_data *data = mh_data (ctx);
 
   if (data && data->mh_umask)
     return data->mh_umask;
@@ -970,13 +970,13 @@ static int md_cmp_path (struct maildir *a, struct maildir 
*b)
 /*
  * Merge two maildir lists according to the inode numbers.
  */
-static struct maildir*  maildir_merge_lists (struct maildir *left,
+static struct maildir *maildir_merge_lists (struct maildir *left,
                                              struct maildir *right,
                                              int (*cmp) (struct maildir *,
                                                          struct maildir *))
 {
-  struct maildir* head;
-  struct maildir* tail;
+  struct maildir *head;
+  struct maildir *tail;
 
   if (left && right)
   {
@@ -1028,7 +1028,7 @@ static struct maildir*  maildir_merge_lists (struct 
maildir *left,
   return head;
 }
 
-static struct maildir* maildir_ins_sort (struct maildir* list,
+static struct maildir *maildir_ins_sort (struct maildir *list,
                                          int (*cmp) (struct maildir *,
                                                      struct maildir *))
 {
@@ -1060,12 +1060,12 @@ static struct maildir* maildir_ins_sort (struct 
maildir* list,
 /*
  * Sort maildir list according to inode.
  */
-static struct maildir* maildir_sort (struct maildir* list, size_t len,
+static struct maildir *maildir_sort (struct maildir *list, size_t len,
                                      int (*cmp) (struct maildir *,
                                                  struct maildir *))
 {
-  struct maildir* left = list;
-  struct maildir* right = list;
+  struct maildir *left = list;
+  struct maildir *right = list;
   size_t c = 0;
 
   if (!list || !list->next)
diff --git a/mutt_crypt.h b/mutt_crypt.h
index 127f1aa8..3ae4a318 100644
--- a/mutt_crypt.h
+++ b/mutt_crypt.h
@@ -182,7 +182,7 @@ int crypt_write_signed(BODY *a, STATE *s, const char 
*tempf);
             crypt_add_string_to_hints().
    *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 *crypt_get_fingerprint_or_id (char *p, const char **pphint,
                                          const char **ppl, const char **pps);
 
 /* Check if a string contains a numerical key */
diff --git a/mutt_curses.h b/mutt_curses.h
index 1027e08e..6691a351 100644
--- a/mutt_curses.h
+++ b/mutt_curses.h
@@ -166,20 +166,20 @@ typedef struct
 {
   unsigned short inc;
   unsigned short flags;
-  const char* msg;
+  const char *msg;
   long pos;
   long size;
   unsigned long long timestamp_millis;
   char sizestr[SHORT_STRING];
 } progress_t;
 
-void mutt_progress_init (progress_t* progress, const char *msg,
+void mutt_progress_init (progress_t *progress, const char *msg,
                          unsigned short flags, unsigned short inc,
                          long size);
 /* If percent is positive, it is displayed as percentage, otherwise
  * percentage is calculated from progress->size and pos if progress
  * was initialized with positive size, otherwise no percentage is shown */
-void mutt_progress_update (progress_t* progress, long pos, int percent);
+void mutt_progress_update (progress_t *progress, long pos, int percent);
 
 /* Windows for different parts of the screen */
 typedef struct
diff --git a/mutt_sasl.c b/mutt_sasl.c
index c197de55..4de4f8d0 100644
--- a/mutt_sasl.c
+++ b/mutt_sasl.c
@@ -92,19 +92,19 @@ static sasl_secret_t *secret_ptr = NULL;
 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);
-static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* context, int id,
-                              sasl_secret_t** psecret);
+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);
+static int mutt_sasl_cb_pass (sasl_conn_t *conn, void *context, int id,
+                              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,
+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);
-static int mutt_sasl_conn_poll (CONNECTION* conn, time_t wait_secs);
+static int mutt_sasl_conn_poll (CONNECTION *conn, time_t wait_secs);
 
 /* utility function, stolen from sasl2 sample code */
 static int iptostring(const struct sockaddr *addr, socklen_t addrlen,
@@ -170,15 +170,15 @@ int mutt_sasl_start (void)
 /* mutt_sasl_client_new: wrapper for sasl_client_new which also sets various
  * security properties. If this turns out to be fine for POP too we can
  * probably stop exporting mutt_sasl_get_callbacks(). */
-int mutt_sasl_client_new (CONNECTION* conn, sasl_conn_t** saslconn)
+int mutt_sasl_client_new (CONNECTION *conn, sasl_conn_t **saslconn)
 {
   sasl_security_properties_t secprops;
   struct sockaddr_storage local, remote;
   socklen_t size;
   char iplocalport[IP_PORT_BUFLEN], ipremoteport[IP_PORT_BUFLEN];
-  char* plp = NULL;
-  char* prp = NULL;
-  const char* service;
+  char *plp = NULL;
+  char *prp = NULL;
+  const char *service;
   int rc;
 
   if (mutt_sasl_start () != SASL_OK)
@@ -273,9 +273,9 @@ int mutt_sasl_client_new (CONNECTION* conn, sasl_conn_t** 
saslconn)
   return 0;
 }
 
-sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT* account)
+sasl_callback_t *mutt_sasl_get_callbacks (ACCOUNT *account)
 {
-  sasl_callback_t* callback;
+  sasl_callback_t *callback;
 
   callback = mutt_sasl_callbacks;
 
@@ -306,7 +306,7 @@ sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT* account)
   return mutt_sasl_callbacks;
 }
 
-int mutt_sasl_interact (sasl_interact_t* interaction)
+int mutt_sasl_interact (sasl_interact_t *interaction)
 {
   char prompt[SHORT_STRING];
   char resp[SHORT_STRING];
@@ -346,11 +346,11 @@ int mutt_sasl_interact (sasl_interact_t* interaction)
 /* mutt_sasl_setup_conn: replace connection methods, sockdata with
  *   SASL wrappers, for protection layers. Also get ssf, as a fastpath
  *   for the read/write methods. */
-void mutt_sasl_setup_conn (CONNECTION* conn, sasl_conn_t* saslconn)
+void mutt_sasl_setup_conn (CONNECTION *conn, sasl_conn_t *saslconn)
 {
-  SASL_DATA* sasldata = (SASL_DATA*) safe_malloc (sizeof (SASL_DATA));
+  SASL_DATA *sasldata = (SASL_DATA*) safe_malloc (sizeof (SASL_DATA));
   /* work around sasl_getprop aliasing issues */
-  const void* tmp;
+  const void *tmp;
 
   sasldata->saslconn = saslconn;
   /* get ssf so we know whether we have to (en|de)code read/write */
@@ -386,7 +386,7 @@ void mutt_sasl_setup_conn (CONNECTION* conn, sasl_conn_t* 
saslconn)
 }
 
 /* mutt_sasl_cb_log: callback to log SASL messages */
-static int mutt_sasl_cb_log (void* context, int priority, const char* message)
+static int mutt_sasl_cb_log (void *context, int priority, const char *message)
 {
   muttdbg(priority, "SASL: %s", message);
 
@@ -399,10 +399,10 @@ 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)
+static int mutt_sasl_cb_authname (void *context, int id, const char **result,
+                                  unsigned *len)
 {
-  ACCOUNT* account = (ACCOUNT*) context;
+  ACCOUNT *account = (ACCOUNT*) context;
 
   if (!result)
     return SASL_FAIL;
@@ -437,10 +437,10 @@ static int mutt_sasl_cb_authname (void* context, int id, 
const char** result,
   return SASL_OK;
 }
 
-static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* context, int id,
-                              sasl_secret_t** psecret)
+static int mutt_sasl_cb_pass (sasl_conn_t *conn, void *context, int id,
+                              sasl_secret_t **psecret)
 {
-  ACCOUNT* account = (ACCOUNT*) context;
+  ACCOUNT *account = (ACCOUNT*) context;
   int len;
 
   if (!account || !psecret)
@@ -466,9 +466,9 @@ static int mutt_sasl_cb_pass (sasl_conn_t* conn, void* 
context, int id,
  *   don't know in advance that a connection will use SASL, so we
  *   replace conn's methods with sasl methods when authentication
  *   is successful, using mutt_sasl_setup_conn */
-static int mutt_sasl_conn_open (CONNECTION* conn)
+static int mutt_sasl_conn_open (CONNECTION *conn)
 {
-  SASL_DATA* sasldata;
+  SASL_DATA *sasldata;
   int rc;
 
   sasldata = (SASL_DATA*) conn->sockdata;
@@ -481,9 +481,9 @@ static int mutt_sasl_conn_open (CONNECTION* conn)
 
 /* mutt_sasl_conn_close: calls underlying close function and disposes of
  *   the sasl_conn_t object, then restores connection to pre-sasl state */
-static int mutt_sasl_conn_close (CONNECTION* conn)
+static int mutt_sasl_conn_close (CONNECTION *conn)
 {
-  SASL_DATA* sasldata;
+  SASL_DATA *sasldata;
   int rc;
 
   sasldata = (SASL_DATA*) conn->sockdata;
@@ -506,9 +506,9 @@ static int mutt_sasl_conn_close (CONNECTION* conn)
   return rc;
 }
 
-static int mutt_sasl_conn_read (CONNECTION* conn, char* buf, size_t len)
+static int mutt_sasl_conn_read (CONNECTION *conn, char *buf, size_t len)
 {
-  SASL_DATA* sasldata;
+  SASL_DATA *sasldata;
   int rc;
 
   unsigned int olen;
@@ -570,10 +570,10 @@ out:
   return rc;
 }
 
-static int mutt_sasl_conn_write (CONNECTION* conn, const char* buf,
+static int mutt_sasl_conn_write (CONNECTION *conn, const char *buf,
                                  size_t len)
 {
-  SASL_DATA* sasldata;
+  SASL_DATA *sasldata;
   int rc;
 
   const char *pbuf;
@@ -619,9 +619,9 @@ fail:
   return -1;
 }
 
-static int mutt_sasl_conn_poll (CONNECTION* conn, time_t wait_secs)
+static int mutt_sasl_conn_poll (CONNECTION *conn, time_t wait_secs)
 {
-  SASL_DATA* sasldata = conn->sockdata;
+  SASL_DATA *sasldata = conn->sockdata;
   int rc;
 
   conn->sockdata = sasldata->sockdata;
diff --git a/mutt_sasl.h b/mutt_sasl.h
index 83a2cf34..675e0e38 100644
--- a/mutt_sasl.h
+++ b/mutt_sasl.h
@@ -26,16 +26,16 @@
 #include "mutt_socket.h"
 
 int mutt_sasl_client_new (CONNECTION*, sasl_conn_t**);
-sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT*);
+sasl_callback_t *mutt_sasl_get_callbacks (ACCOUNT*);
 int mutt_sasl_interact (sasl_interact_t*);
 void mutt_sasl_setup_conn (CONNECTION*, sasl_conn_t*);
 void mutt_sasl_done (void);
 
 typedef struct
 {
-  sasl_conn_t* saslconn;
-  const sasl_ssf_t* ssf;
-  const unsigned int* pbufsize;
+  sasl_conn_t *saslconn;
+  const sasl_ssf_t *ssf;
+  const unsigned int *pbufsize;
 
   /* read buffer */
   const char *buf;
@@ -43,12 +43,12 @@ typedef struct
   unsigned int bpos;
 
   /* underlying socket data */
-  void* sockdata;
-  int (*msasl_open) (CONNECTION* conn);
-  int (*msasl_close) (CONNECTION* conn);
-  int (*msasl_read) (CONNECTION* conn, char* buf, size_t len);
-  int (*msasl_write) (CONNECTION* conn, const char* buf, size_t count);
-  int (*msasl_poll) (CONNECTION* conn, time_t wait_secs);
+  void *sockdata;
+  int (*msasl_open) (CONNECTION *conn);
+  int (*msasl_close) (CONNECTION *conn);
+  int (*msasl_read) (CONNECTION *conn, char *buf, size_t len);
+  int (*msasl_write) (CONNECTION *conn, const char *buf, size_t count);
+  int (*msasl_poll) (CONNECTION *conn, time_t wait_secs);
 }
 SASL_DATA;
 
diff --git a/mutt_sasl_gnu.c b/mutt_sasl_gnu.c
index 2e107774..92244fc9 100644
--- a/mutt_sasl_gnu.c
+++ b/mutt_sasl_gnu.c
@@ -159,7 +159,7 @@ static int mutt_gsasl_callback (Gsasl *ctx, Gsasl_session 
*sctx,
 {
   int rc = GSASL_NO_CALLBACK;
   CONNECTION *conn;
-  const char* service;
+  const char *service;
 
   conn = gsasl_session_hook_get (sctx);
   if (!conn)
diff --git a/mutt_socket.c b/mutt_socket.c
index 5aef173b..7ee9ea45 100644
--- a/mutt_socket.c
+++ b/mutt_socket.c
@@ -54,11 +54,11 @@ static CONNECTION *Connections = NULL;
 
 /* forward declarations */
 static int socket_preconnect (void);
-static int socket_connect (int fd, struct sockaddr* sa);
-static CONNECTION* socket_new_conn (void);
+static int socket_connect (int fd, struct sockaddr *sa);
+static CONNECTION *socket_new_conn (void);
 
 /* Wrappers */
-int mutt_socket_open (CONNECTION* conn)
+int mutt_socket_open (CONNECTION *conn)
 {
   int rc;
 
@@ -73,7 +73,7 @@ int mutt_socket_open (CONNECTION* conn)
   return rc;
 }
 
-int mutt_socket_close (CONNECTION* conn)
+int mutt_socket_close (CONNECTION *conn)
 {
   int rc = -1;
 
@@ -161,7 +161,7 @@ void mutt_socket_clear_buffered_input (CONNECTION *conn)
  *   Returns: >0 if there is data to read,
  *            0 if a read would block,
  *            -1 if this connection doesn't support polling */
-int mutt_socket_poll (CONNECTION* conn, time_t wait_secs)
+int mutt_socket_poll (CONNECTION *conn, time_t wait_secs)
 {
   if (conn->bufpos < conn->available)
     return conn->available - conn->bufpos;
@@ -201,7 +201,7 @@ int mutt_socket_readchar (CONNECTION *conn, char *c)
   return 1;
 }
 
-int mutt_socket_readln_d (char* buf, size_t buflen, CONNECTION* conn, int dbg)
+int mutt_socket_readln_d (char *buf, size_t buflen, CONNECTION *conn, int dbg)
 {
   char ch;
   int i;
@@ -262,16 +262,16 @@ int mutt_socket_buffer_readln_d (BUFFER *buf, CONNECTION 
*conn, int dbg)
   return 0;
 }
 
-CONNECTION* mutt_socket_head (void)
+CONNECTION *mutt_socket_head (void)
 {
   return Connections;
 }
 
 /* mutt_socket_free: remove connection from connection list and free it */
-void mutt_socket_free (CONNECTION* conn)
+void mutt_socket_free (CONNECTION *conn)
 {
-  CONNECTION* iter;
-  CONNECTION* tmp;
+  CONNECTION *iter;
+  CONNECTION *tmp;
 
   iter = Connections;
 
@@ -301,9 +301,9 @@ void mutt_socket_free (CONNECTION* conn)
  *   connections after the given connection (allows higher level socket code
  *   to make more fine-grained searches than account info - eg in IMAP we may
  *   wish to find a connection which is not in IMAP_SELECTED state) */
-CONNECTION* mutt_conn_find (const CONNECTION* start, const ACCOUNT* account)
+CONNECTION *mutt_conn_find (const CONNECTION *start, const ACCOUNT *account)
 {
-  CONNECTION* conn;
+  CONNECTION *conn;
   ciss_url_t url;
   char hook[LONG_STRING];
 
@@ -386,7 +386,7 @@ static void alarm_handler (int sig)
 }
 
 /* socket_connect: set up to connect to a socket fd. */
-static int socket_connect (int fd, struct sockaddr* sa)
+static int socket_connect (int fd, struct sockaddr *sa)
 {
   int sa_size;
   int save_errno;
@@ -466,9 +466,9 @@ static int socket_connect (int fd, struct sockaddr* sa)
 }
 
 /* socket_new_conn: allocate and initialise a new connection. */
-static CONNECTION* socket_new_conn (void)
+static CONNECTION *socket_new_conn (void)
 {
-  CONNECTION* conn;
+  CONNECTION *conn;
 
   conn = (CONNECTION *) safe_calloc (1, sizeof (CONNECTION));
   conn->fd = -1;
@@ -481,7 +481,7 @@ int raw_socket_close (CONNECTION *conn)
   return close (conn->fd);
 }
 
-int raw_socket_read (CONNECTION* conn, char* buf, size_t len)
+int raw_socket_read (CONNECTION *conn, char *buf, size_t len)
 {
   int rc;
 
@@ -501,7 +501,7 @@ int raw_socket_read (CONNECTION* conn, char* buf, size_t 
len)
   return rc;
 }
 
-int raw_socket_write (CONNECTION* conn, const char* buf, size_t count)
+int raw_socket_write (CONNECTION *conn, const char *buf, size_t count)
 {
   int rc;
   size_t sent = 0;
@@ -527,7 +527,7 @@ int raw_socket_write (CONNECTION* conn, const char* buf, 
size_t count)
   return sent;
 }
 
-int raw_socket_poll (CONNECTION* conn, time_t wait_secs)
+int raw_socket_poll (CONNECTION *conn, time_t wait_secs)
 {
   fd_set rfds;
   unsigned long long wait_millis, post_t_millis;
@@ -568,7 +568,7 @@ int raw_socket_poll (CONNECTION* conn, time_t wait_secs)
   }
 }
 
-int raw_socket_open (CONNECTION* conn)
+int raw_socket_open (CONNECTION *conn)
 {
   int rc;
   int fd;
@@ -581,8 +581,8 @@ int raw_socket_open (CONNECTION* conn)
   /* "65536\0" */
   char port[6];
   struct addrinfo hints;
-  struct addrinfo* res;
-  struct addrinfo* cur;
+  struct addrinfo *res;
+  struct addrinfo *cur;
 
   /* we accept v4 or v6 STREAM sockets */
   memset (&hints, 0, sizeof (hints));
@@ -648,7 +648,7 @@ int raw_socket_open (CONNECTION* conn)
   /* --- IPv4 only --- */
 
   struct sockaddr_in sin;
-  struct hostent* he;
+  struct hostent *he;
   int i;
 
   memset (&sin, 0, sizeof (sin));
diff --git a/mutt_socket.h b/mutt_socket.h
index ab27bde4..b9400263 100644
--- a/mutt_socket.h
+++ b/mutt_socket.h
@@ -54,18 +54,18 @@ typedef struct _connection
   struct _connection *next;
 
   void *sockdata;
-  int (*conn_read) (struct _connection* conn, char* buf, size_t len);
+  int (*conn_read) (struct _connection *conn, char *buf, size_t len);
   int (*conn_write) (struct _connection *conn, const char *buf, size_t count);
   int (*conn_open) (struct _connection *conn);
   int (*conn_close) (struct _connection *conn);
   int (*conn_poll) (struct _connection *conn, time_t wait_secs);
 } CONNECTION;
 
-int mutt_socket_open (CONNECTION* conn);
-int mutt_socket_close (CONNECTION* conn);
+int mutt_socket_open (CONNECTION *conn);
+int mutt_socket_close (CONNECTION *conn);
 int mutt_socket_has_buffered_input (CONNECTION *conn);
 void mutt_socket_clear_buffered_input (CONNECTION *conn);
-int mutt_socket_poll (CONNECTION* conn, time_t wait_secs);
+int mutt_socket_poll (CONNECTION *conn, time_t wait_secs);
 int mutt_socket_readchar (CONNECTION *conn, char *c);
 #define mutt_socket_buffer_readln(A,B) 
mutt_socket_buffer_readln_d(A,B,MUTT_SOCK_LOG_CMD)
 int mutt_socket_buffer_readln_d (BUFFER *buf, CONNECTION *conn, int dbg);
@@ -76,14 +76,14 @@ int mutt_socket_readln_d (char *buf, size_t buflen, 
CONNECTION *conn, int dbg);
 int mutt_socket_write_d (CONNECTION *conn, const char *buf, int len, int dbg);
 
 /* stupid hack for imap_logout_all */
-CONNECTION* mutt_socket_head (void);
-void mutt_socket_free (CONNECTION* conn);
-CONNECTION* mutt_conn_find (const CONNECTION* start, const ACCOUNT* account);
+CONNECTION *mutt_socket_head (void);
+void mutt_socket_free (CONNECTION *conn);
+CONNECTION *mutt_conn_find (const CONNECTION *start, const ACCOUNT *account);
 
-int raw_socket_read (CONNECTION* conn, char* buf, size_t len);
-int raw_socket_write (CONNECTION* conn, const char* buf, size_t count);
+int raw_socket_read (CONNECTION *conn, char *buf, size_t len);
+int raw_socket_write (CONNECTION *conn, const char *buf, size_t count);
 int raw_socket_open (CONNECTION *conn);
 int raw_socket_close (CONNECTION *conn);
-int raw_socket_poll (CONNECTION* conn, time_t wait_secs);
+int raw_socket_poll (CONNECTION *conn, time_t wait_secs);
 
 #endif /* _MUTT_SOCKET_H_ */
diff --git a/mutt_ssl.c b/mutt_ssl.c
index 762377e1..14b9fa6e 100644
--- a/mutt_ssl.c
+++ b/mutt_ssl.c
@@ -87,12 +87,12 @@ sslsockdata;
 /* local prototypes */
 static int ssl_init (void);
 static int add_entropy (const char *file);
-static int ssl_socket_read (CONNECTION* conn, char* buf, size_t len);
-static int ssl_socket_write (CONNECTION* conn, const char* buf, size_t len);
-static int ssl_socket_poll (CONNECTION* conn, time_t wait_secs);
+static int ssl_socket_read (CONNECTION *conn, char *buf, size_t len);
+static int ssl_socket_write (CONNECTION *conn, const char *buf, size_t len);
+static int ssl_socket_poll (CONNECTION *conn, time_t wait_secs);
 static int ssl_socket_open (CONNECTION * conn);
 static int ssl_socket_close (CONNECTION * conn);
-static int starttls_close (CONNECTION* conn);
+static int starttls_close (CONNECTION *conn);
 static void ssl_err (sslsockdata *data, int err);
 static void ssl_dprint_err_stack (void);
 static int ssl_cache_trusted_cert (X509 *cert);
@@ -319,7 +319,7 @@ bail:
 }
 
 /* mutt_ssl_starttls: Negotiate TLS over an already opened connection. */
-int mutt_ssl_starttls (CONNECTION* conn)
+int mutt_ssl_starttls (CONNECTION *conn)
 {
   long ssl_options = 0;
 
@@ -471,7 +471,7 @@ int mutt_ssl_socket_setup (CONNECTION * conn)
   return 0;
 }
 
-static int ssl_socket_read (CONNECTION* conn, char* buf, size_t len)
+static int ssl_socket_read (CONNECTION *conn, char *buf, size_t len)
 {
   sslsockdata *data = conn->sockdata;
   int rc;
@@ -486,7 +486,7 @@ static int ssl_socket_read (CONNECTION* conn, char* buf, 
size_t len)
   return rc;
 }
 
-static int ssl_socket_write (CONNECTION* conn, const char* buf, size_t len)
+static int ssl_socket_write (CONNECTION *conn, const char *buf, size_t len)
 {
   sslsockdata *data = conn->sockdata;
   int rc;
@@ -498,7 +498,7 @@ static int ssl_socket_write (CONNECTION* conn, const char* 
buf, size_t len)
   return rc;
 }
 
-static int ssl_socket_poll (CONNECTION* conn, time_t wait_secs)
+static int ssl_socket_poll (CONNECTION *conn, time_t wait_secs)
 {
   sslsockdata *data = conn->sockdata;
 
@@ -641,7 +641,7 @@ static int ssl_socket_close (CONNECTION * conn)
   return raw_socket_close (conn);
 }
 
-static int starttls_close (CONNECTION* conn)
+static int starttls_close (CONNECTION *conn)
 {
   int rc;
 
@@ -656,7 +656,7 @@ static int starttls_close (CONNECTION* conn)
 
 static void ssl_err (sslsockdata *data, int err)
 {
-  const char* errmsg;
+  const char *errmsg;
   unsigned long sslerr;
 
   switch (SSL_get_error (data->ssl, err))
diff --git a/mutt_ssl.h b/mutt_ssl.h
index ad0e74c9..d8624c9b 100644
--- a/mutt_ssl.h
+++ b/mutt_ssl.h
@@ -22,7 +22,7 @@
 #include "mutt_socket.h"
 
 #if defined(USE_SSL)
-int mutt_ssl_starttls (CONNECTION* conn);
+int mutt_ssl_starttls (CONNECTION *conn);
 int mutt_ssl_socket_setup (CONNECTION *conn);
 #endif
 
diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c
index bd7b5bf3..5cc2c08c 100644
--- a/mutt_ssl_gnutls.c
+++ b/mutt_ssl_gnutls.c
@@ -83,20 +83,20 @@ typedef struct _tlssockdata
 tlssockdata;
 
 /* local prototypes */
-static int tls_socket_read (CONNECTION* conn, char* buf, size_t len);
-static int tls_socket_write (CONNECTION* conn, const char* buf, size_t len);
-static int tls_socket_poll (CONNECTION* conn, time_t wait_secs);
-static int tls_socket_open (CONNECTION* conn);
-static int tls_socket_close (CONNECTION* conn);
-static int tls_starttls_close (CONNECTION* conn);
+static int tls_socket_read (CONNECTION *conn, char *buf, size_t len);
+static int tls_socket_write (CONNECTION *conn, const char *buf, size_t len);
+static int tls_socket_poll (CONNECTION *conn, time_t wait_secs);
+static int tls_socket_open (CONNECTION *conn);
+static int tls_socket_close (CONNECTION *conn);
+static int tls_starttls_close (CONNECTION *conn);
 
 static int tls_init (void);
-static int tls_negotiate (CONNECTION* conn);
-static int tls_check_certificate (CONNECTION* conn);
-static int tls_passwd_cb (void* userdata, int attempt, const char* token_url,
-                          const char* token_label,
+static int tls_negotiate (CONNECTION *conn);
+static int tls_check_certificate (CONNECTION *conn);
+static int tls_passwd_cb (void *userdata, int attempt, const char *token_url,
+                          const char *token_label,
                           unsigned int flags,
-                          char* pin, size_t pin_max);
+                          char *pin, size_t pin_max);
 
 
 static int tls_init (void)
@@ -119,7 +119,7 @@ static int tls_init (void)
   return 0;
 }
 
-int mutt_ssl_socket_setup (CONNECTION* conn)
+int mutt_ssl_socket_setup (CONNECTION *conn)
 {
   if (tls_init () < 0)
     return -1;
@@ -133,7 +133,7 @@ int mutt_ssl_socket_setup (CONNECTION* conn)
   return 0;
 }
 
-static int tls_socket_read (CONNECTION* conn, char* buf, size_t len)
+static int tls_socket_read (CONNECTION *conn, char *buf, size_t len)
 {
   tlssockdata *data = conn->sockdata;
   int ret;
@@ -160,7 +160,7 @@ static int tls_socket_read (CONNECTION* conn, char* buf, 
size_t len)
   return ret;
 }
 
-static int tls_socket_write (CONNECTION* conn, const char* buf, size_t len)
+static int tls_socket_write (CONNECTION *conn, const char *buf, size_t len)
 {
   tlssockdata *data = conn->sockdata;
   int ret;
@@ -193,7 +193,7 @@ static int tls_socket_write (CONNECTION* conn, const char* 
buf, size_t len)
   return sent;
 }
 
-static int tls_socket_poll (CONNECTION* conn, time_t wait_secs)
+static int tls_socket_poll (CONNECTION *conn, time_t wait_secs)
 {
   tlssockdata *data = conn->sockdata;
 
@@ -206,7 +206,7 @@ static int tls_socket_poll (CONNECTION* conn, time_t 
wait_secs)
     return raw_socket_poll (conn, wait_secs);
 }
 
-static int tls_socket_open (CONNECTION* conn)
+static int tls_socket_open (CONNECTION *conn)
 {
   if (raw_socket_open (conn) < 0)
     return -1;
@@ -220,7 +220,7 @@ static int tls_socket_open (CONNECTION* conn)
   return 0;
 }
 
-int mutt_ssl_starttls (CONNECTION* conn)
+int mutt_ssl_starttls (CONNECTION *conn)
 {
   if (mutt_socket_has_buffered_input (conn))
   {
@@ -262,12 +262,12 @@ int mutt_ssl_starttls (CONNECTION* conn)
  * I'm disabling it.
  */
 #if 0
-static void tls_get_client_cert (CONNECTION* conn)
+static void tls_get_client_cert (CONNECTION *conn)
 {
   tlssockdata *data = conn->sockdata;
-  const gnutls_datum_t* crtdata;
+  const gnutls_datum_t *crtdata;
   gnutls_x509_crt_t clientcrt;
-  char* cn = NULL;
+  char *cn = NULL;
   size_t cnlen = 0;
   int rc;
 
@@ -539,7 +539,7 @@ fail:
   return -1;
 }
 
-static int tls_socket_close (CONNECTION* conn)
+static int tls_socket_close (CONNECTION *conn)
 {
   tlssockdata *data = conn->sockdata;
   if (data)
@@ -562,7 +562,7 @@ static int tls_socket_close (CONNECTION* conn)
   return raw_socket_close (conn);
 }
 
-static int tls_starttls_close (CONNECTION* conn)
+static int tls_starttls_close (CONNECTION *conn)
 {
   int rc;
 
@@ -648,7 +648,7 @@ static int tls_compare_certificates (const gnutls_datum_t 
*peercert)
 }
 
 static void tls_fingerprint (gnutls_digest_algorithm_t algo,
-                             char* s, int l, const gnutls_datum_t* data)
+                             char *s, int l, const gnutls_datum_t *data)
 {
   unsigned char md[64];
   size_t n;
@@ -742,8 +742,8 @@ static int tls_check_stored_hostname (const gnutls_datum_t 
*cert,
  */
 static int tls_check_preauth (const gnutls_datum_t *certdata,
                               gnutls_certificate_status_t certstat,
-                              const char *hostname, int chainidx, int* certerr,
-                              int* savedcert)
+                              const char *hostname, int chainidx, int *certerr,
+                              int *savedcert)
 {
   gnutls_x509_crt_t cert;
 
@@ -849,7 +849,7 @@ static int tls_check_preauth (const gnutls_datum_t 
*certdata,
  */
 static int tls_check_one_certificate (const gnutls_datum_t *certdata,
                                       gnutls_certificate_status_t certstat,
-                                      const char* hostname, int idx, int len)
+                                      const char *hostname, int idx, int len)
 {
   int certerr, savedcert;
   gnutls_x509_crt_t cert;
@@ -1191,7 +1191,7 @@ static int tls_verify_peers (gnutls_session_t tlsstate,
 /* Returns 1 on success.
  *         0 on failure.
  */
-static int tls_check_certificate (CONNECTION* conn)
+static int tls_check_certificate (CONNECTION *conn)
 {
   tlssockdata *data = conn->sockdata;
   gnutls_session_t state = data->state;
@@ -1286,10 +1286,10 @@ static void client_cert_prompt (char *prompt, size_t 
prompt_size, ACCOUNT *accou
             account->host);
 }
 
-static int tls_passwd_cb (void* userdata, int attempt, const char* token_url,
-                          const char* token_label,
+static int tls_passwd_cb (void *userdata, int attempt, const char *token_url,
+                          const char *token_label,
                           unsigned int flags,
-                          char* buf, size_t size)
+                          char *buf, size_t size)
 {
   ACCOUNT *account;
 
diff --git a/mutt_tunnel.c b/mutt_tunnel.c
index fbb89c68..6bc39404 100644
--- a/mutt_tunnel.c
+++ b/mutt_tunnel.c
@@ -43,9 +43,9 @@ typedef struct
 /* forward declarations */
 static int tunnel_socket_open (CONNECTION*);
 static int tunnel_socket_close (CONNECTION*);
-static int tunnel_socket_read (CONNECTION* conn, char* buf, size_t len);
-static int tunnel_socket_write (CONNECTION* conn, const char* buf, size_t len);
-static int tunnel_socket_poll (CONNECTION* conn, time_t wait_secs);
+static int tunnel_socket_read (CONNECTION *conn, char *buf, size_t len);
+static int tunnel_socket_write (CONNECTION *conn, const char *buf, size_t len);
+static int tunnel_socket_poll (CONNECTION *conn, time_t wait_secs);
 
 /* -- public functions -- */
 int mutt_tunnel_socket_setup (CONNECTION *conn)
@@ -66,7 +66,7 @@ int mutt_tunnel_socket_setup (CONNECTION *conn)
 
 static int tunnel_socket_open (CONNECTION *conn)
 {
-  TUNNEL_DATA* tunnel;
+  TUNNEL_DATA *tunnel;
   int pid;
   int rc;
   int pin[2], pout[2];
@@ -142,9 +142,9 @@ static int tunnel_socket_open (CONNECTION *conn)
   return 0;
 }
 
-static int tunnel_socket_close (CONNECTION* conn)
+static int tunnel_socket_close (CONNECTION *conn)
 {
-  TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata;
+  TUNNEL_DATA *tunnel = (TUNNEL_DATA*) conn->sockdata;
   int status;
 
   close (tunnel->readfd);
@@ -162,9 +162,9 @@ static int tunnel_socket_close (CONNECTION* conn)
   return 0;
 }
 
-static int tunnel_socket_read (CONNECTION* conn, char* buf, size_t len)
+static int tunnel_socket_read (CONNECTION *conn, char *buf, size_t len)
 {
-  TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata;
+  TUNNEL_DATA *tunnel = (TUNNEL_DATA*) conn->sockdata;
   int rc;
 
   do
@@ -183,9 +183,9 @@ static int tunnel_socket_read (CONNECTION* conn, char* buf, 
size_t len)
   return rc;
 }
 
-static int tunnel_socket_write (CONNECTION* conn, const char* buf, size_t len)
+static int tunnel_socket_write (CONNECTION *conn, const char *buf, size_t len)
 {
-  TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata;
+  TUNNEL_DATA *tunnel = (TUNNEL_DATA*) conn->sockdata;
   int rc;
   size_t sent = 0;
 
@@ -210,9 +210,9 @@ static int tunnel_socket_write (CONNECTION* conn, const 
char* buf, size_t len)
   return sent;
 }
 
-static int tunnel_socket_poll (CONNECTION* conn, time_t wait_secs)
+static int tunnel_socket_poll (CONNECTION *conn, time_t wait_secs)
 {
-  TUNNEL_DATA* tunnel = (TUNNEL_DATA*) conn->sockdata;
+  TUNNEL_DATA *tunnel = (TUNNEL_DATA*) conn->sockdata;
   int ofd;
   int rc;
 
diff --git a/mutt_zstrm.c b/mutt_zstrm.c
index d86d4b95..9f45eb8a 100644
--- a/mutt_zstrm.c
+++ b/mutt_zstrm.c
@@ -45,23 +45,23 @@ zstrmctx;
 
 /* simple wrapper functions to match zlib interface for calling
  * malloc/free */
-static void *mutt_zstrm_malloc (void* op, unsigned int sze, unsigned int v)
+static void *mutt_zstrm_malloc (void *op, unsigned int sze, unsigned int v)
 {
   return safe_calloc (sze, v);
 }
 
-static void mutt_zstrm_free (void* op, void* ptr)
+static void mutt_zstrm_free (void *op, void *ptr)
 {
   FREE (&ptr);
 }
 
-static int mutt_zstrm_open (CONNECTION* conn)
+static int mutt_zstrm_open (CONNECTION *conn)
 {
   /* cannot open a zlib connection, must wrap an existing one */
   return -1;
 }
 
-static int mutt_zstrm_close (CONNECTION* conn)
+static int mutt_zstrm_close (CONNECTION *conn)
 {
   zstrmctx* zctx = conn->sockdata;
   int rc = zctx->next_conn.conn_close (&zctx->next_conn);
@@ -89,7 +89,7 @@ static int mutt_zstrm_close (CONNECTION* conn)
   return rc;
 }
 
-static int mutt_zstrm_read (CONNECTION* conn, char* buf, size_t len)
+static int mutt_zstrm_read (CONNECTION *conn, char *buf, size_t len)
 {
   zstrmctx* zctx = conn->sockdata;
   int rc = 0;
@@ -167,7 +167,7 @@ retry:
   return zrc;
 }
 
-static int mutt_zstrm_poll (CONNECTION* conn, time_t wait_secs)
+static int mutt_zstrm_poll (CONNECTION *conn, time_t wait_secs)
 {
   zstrmctx* zctx = conn->sockdata;
 
@@ -180,7 +180,7 @@ static int mutt_zstrm_poll (CONNECTION* conn, time_t 
wait_secs)
     return zctx->next_conn.conn_poll (&zctx->next_conn, wait_secs);
 }
 
-static int mutt_zstrm_write (CONNECTION* conn, const char* buf, size_t count)
+static int mutt_zstrm_write (CONNECTION *conn, const char *buf, size_t count)
 {
   zstrmctx* zctx = conn->sockdata;
   int rc;
@@ -235,7 +235,7 @@ static int mutt_zstrm_write (CONNECTION* conn, const char* 
buf, size_t count)
   return rc <= 0 ? 1 : rc;  /* avoid wrong behaviour due to overflow */
 }
 
-void mutt_zstrm_wrap_conn (CONNECTION* conn)
+void mutt_zstrm_wrap_conn (CONNECTION *conn)
 {
   zstrmctx* zctx;
 
diff --git a/mutt_zstrm.h b/mutt_zstrm.h
index 9c3098a4..d306596f 100644
--- a/mutt_zstrm.h
+++ b/mutt_zstrm.h
@@ -22,7 +22,7 @@
 #include "mutt_socket.h"
 
 #if defined(USE_ZLIB)
-void mutt_zstrm_wrap_conn (CONNECTION* conn);
+void mutt_zstrm_wrap_conn (CONNECTION *conn);
 #endif
 
 #endif /* _MUTT_ZSTRM_H_ */
diff --git a/muttlib.c b/muttlib.c
index a6294476..096fa60c 100644
--- a/muttlib.c
+++ b/muttlib.c
@@ -923,7 +923,7 @@ void mutt_free_envelope (ENVELOPE **p)
 }
 
 /* move all the headers from extra not present in base into base */
-void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra)
+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
@@ -2171,7 +2171,7 @@ time_t mutt_decrease_mtime (const char *f, struct stat 
*st)
 }
 
 /* sets mtime of 'to' to mtime of 'from' */
-void mutt_set_mtime (const char* from, const char* to)
+void mutt_set_mtime (const char *from, const char *to)
 {
   struct utimbuf utim;
   struct stat st;
@@ -2507,10 +2507,10 @@ int mutt_convert_to_lf (const char *infile, FILE *ifp, 
const char *outfile, FILE
  ************************************************************************/
 
 /* remove a directory and everything under it */
-int mutt_rmtree (const char* path)
+int mutt_rmtree (const char *path)
 {
-  DIR* dirp;
-  struct dirent* de;
+  DIR *dirp;
+  struct dirent *de;
   BUFFER *cur = NULL;
   struct stat statbuf;
   int rc = 0;
diff --git a/mx.c b/mx.c
index 5ca589a0..2a3b2bcb 100644
--- a/mx.c
+++ b/mx.c
@@ -64,7 +64,7 @@
 #include <ctype.h>
 #include <utime.h>
 
-struct mx_ops* mx_get_ops (int magic)
+struct mx_ops *mx_get_ops (int magic)
 {
   switch (magic)
   {
@@ -513,7 +513,7 @@ int mx_set_magic (const char *s)
 /* mx_access: Wrapper for access, checks permissions on a given mailbox.
  *   We may be interested in using ACL-style flags at some point, currently
  *   we use the normal access() flags. */
-int mx_access (const char* path, int flags)
+int mx_access (const char *path, int flags)
 {
 #ifdef USE_IMAP
   if (mx_is_imap (path))
diff --git a/mx.h b/mx.h
index 542d9dd8..576126f4 100644
--- a/mx.h
+++ b/mx.h
@@ -72,7 +72,7 @@ void mx_update_tables (CONTEXT *, int);
 int mx_lock_file (const char *, int, int, int, int);
 int mx_unlock_file (const char *path, int fd, int dot);
 
-struct mx_ops* mx_get_ops (int magic);
+struct mx_ops *mx_get_ops (int magic);
 extern struct mx_ops mx_maildir_ops;
 extern struct mx_ops mx_mbox_ops;
 extern struct mx_ops mx_mh_ops;
diff --git a/pattern.c b/pattern.c
index d6f64e8e..bd462965 100644
--- a/pattern.c
+++ b/pattern.c
@@ -330,7 +330,7 @@ int mutt_which_case (const char *s)
 }
 
 static int
-msg_search (CONTEXT *ctx, pattern_t* pat, int msgno)
+msg_search (CONTEXT *ctx, pattern_t *pat, int msgno)
 {
   BUFFER *tempfile = NULL;
   MESSAGE *msg = NULL;
@@ -805,7 +805,7 @@ static void adjust_date_range (struct tm *min, struct tm 
*max)
   }
 }
 
-static const char * parse_date_range (const char* pc, struct tm *min,
+static const char * parse_date_range (const char *pc, struct tm *min,
                                       struct tm *max, int haveMin,
                                       struct tm *baseMin, BUFFER *err)
 {
@@ -1047,7 +1047,7 @@ out:
   return rc;
 }
 
-static int patmatch (const pattern_t* pat, const char* buf)
+static int patmatch (const pattern_t *pat, const char *buf)
 {
   if (pat->stringmatch)
     return pat->ign_case ? !strcasestr (buf, pat->p.str) :
@@ -1533,7 +1533,7 @@ static int match_threadchildren(struct pattern_t *pat, 
pattern_exec_flag flags,
   return 0;
 }
 
-static int match_content_type(const pattern_t* pat, BODY *b)
+static int match_content_type(const pattern_t *pat, BODY *b)
 {
   char buffer[STRING];
   if (!b)
@@ -2024,7 +2024,7 @@ int mutt_search_command (int cur, int op)
   int incr;
   HEADER *h;
   progress_t progress;
-  const char* msg = NULL;
+  const char *msg = NULL;
 
   if (!*LastSearch || (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE))
   {
diff --git a/pop.c b/pop.c
index 157b8222..64ce5641 100644
--- a/pop.c
+++ b/pop.c
@@ -562,7 +562,7 @@ int pop_close_mailbox (CONTEXT *ctx)
 }
 
 /* fetch message from POP server */
-static int pop_fetch_message (CONTEXT* ctx, MESSAGE* msg, int msgno, int 
headers)
+static int pop_fetch_message (CONTEXT *ctx, MESSAGE *msg, int msgno, int 
headers)
 {
   int ret, rc = -1;
   void *uidl;
diff --git a/pop.h b/pop.h
index 89ecd9de..e6f9db12 100644
--- a/pop.h
+++ b/pop.h
@@ -86,7 +86,7 @@ typedef struct
   pop_auth_res_t (*authenticate) (POP_DATA *, const char *);
   /* name of authentication method supported, NULL means variable. If this
    * is not null, authenticate may ignore the second parameter. */
-  const char* method;
+  const char *method;
 } pop_auth_t;
 
 /* pop_auth.c */
diff --git a/pop_auth.c b/pop_auth.c
index 4fc143b0..e87b3613 100644
--- a/pop_auth.c
+++ b/pop_auth.c
@@ -50,7 +50,7 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA *pop_data, 
const char *method)
   char *buf = NULL;
   size_t bufsize = 0;
   char inbuf[LONG_STRING];
-  const char* mech;
+  const char *mech;
   const char *pc = NULL;
   unsigned int len, olen, client_start;
 
@@ -548,13 +548,13 @@ static const pop_auth_t pop_authenticators[] = {
  * -2 - login failed,
  * -3 - authentication canceled.
  */
-int pop_authenticate (POP_DATA* pop_data)
+int pop_authenticate (POP_DATA *pop_data)
 {
   ACCOUNT *acct = &pop_data->conn->account;
-  const pop_auth_t* authenticator;
-  char* methods;
-  char* comma;
-  char* method;
+  const pop_auth_t *authenticator;
+  char *methods;
+  char *comma;
+  char *method;
   int attempts = 0;
   int ret = POP_A_UNAVAIL;
 
diff --git a/pop_lib.c b/pop_lib.c
index 66494daa..df994608 100644
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -36,7 +36,7 @@
 #include <netinet/in.h>
 
 /* given an POP mailbox name, return host, port, username and password */
-int pop_parse_path (const char* path, ACCOUNT* acct)
+int pop_parse_path (const char *path, ACCOUNT *acct)
 {
   ciss_url_t url;
   char *c;
diff --git a/protos.h b/protos.h
index 71497f95..28b4622f 100644
--- a/protos.h
+++ b/protos.h
@@ -81,7 +81,7 @@ int query_quadoption (int, const char *);
 int quadoption (int);
 int mutt_query_boolean (int opt, const char *prompt, int def);
 
-char* mutt_extract_message_id (const char *, const char **, int);
+char *mutt_extract_message_id (const char *, const char **, int);
 
 ADDRESS *mutt_get_address (ENVELOPE *, char **);
 ADDRESS *mutt_lookup_alias (const char *s);
@@ -181,7 +181,7 @@ void _mutt_adv_mktemp (BUFFER *, const char *);
 #define _mutt_buffer_mktemp_pfx_sfx(a,b,c,d) _mutt_buffer_mktemp (a, b, c, d, 
__FILE__, __LINE__)
 void _mutt_buffer_mktemp (BUFFER *, const char *, const char *, const char *, 
const char *, int);
 
-void mutt_account_hook (const char* url);
+void mutt_account_hook (const char *url);
 void mutt_alias_menu (char *, size_t, ALIAS *);
 void mutt_allow_interrupt (int);
 void mutt_auto_subscribe (const char *);
@@ -252,7 +252,7 @@ void mutt_draw_tree (CONTEXT *);
 void mutt_check_lookup_list (BODY *, char *, size_t);
 void mutt_list_menu (CONTEXT *ctx, HEADER *cur);
 void mutt_make_help (char *, size_t, const char *, int, int);
-void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra);
+void mutt_merge_envelopes(ENVELOPE *base, ENVELOPE **extra);
 void mutt_message_to_7bit (BODY *, FILE *);
 void mutt_normalize_time (struct tm *);
 void mutt_paddstr (int, const char *);
diff --git a/sendlib.c b/sendlib.c
index babbcd5f..fcc0700c 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -1677,9 +1677,9 @@ static int get_toplevel_encoding (BODY *a)
 }
 
 /* check for duplicate boundary. return 1 if duplicate */
-static int mutt_check_boundary (const char* boundary, BODY *b)
+static int mutt_check_boundary (const char *boundary, BODY *b)
 {
-  char* p;
+  char *p;
 
   if (b->parts && mutt_check_boundary (boundary, b->parts))
     return 1;
@@ -2941,7 +2941,7 @@ static int _mutt_bounce_message (FILE *fp, HEADER *h, 
ADDRESS *to, const char *r
   if ((f = safe_fopen (mutt_b2s (tempfile), "w")) != NULL)
   {
     int ch_flags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
-    char* msgid_str;
+    char *msgid_str;
     BUFFER *date;
 
     if (!option (OPTBOUNCEDELIVERED))
diff --git a/sha1.c b/sha1.c
index f4927e35..d5a53e18 100644
--- a/sha1.c
+++ b/sha1.c
@@ -65,7 +65,7 @@ CHAR64LONG16 block[1];  /* use array to appear as a pointer */
      * And the result is written through.  I threw a "const" in, hoping
      * this will cause a diagnostic.
      */
-CHAR64LONG16* block = (const CHAR64LONG16*)buffer;
+CHAR64LONG16 *block = (const CHAR64LONG16*)buffer;
 #endif
     /* Copy context->state[] to working vars */
     a = state[0];
@@ -110,7 +110,7 @@ CHAR64LONG16* block = (const CHAR64LONG16*)buffer;
 
 /* SHA1Init - Initialize new context */
 
-void SHA1Init(SHA1_CTX* context)
+void SHA1Init(SHA1_CTX *context)
 {
     /* SHA1 initialization constants */
     context->state[0] = 0x67452301;
@@ -124,7 +124,7 @@ void SHA1Init(SHA1_CTX* context)
 
 /* Run your data through this. */
 
-void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len)
+void SHA1Update(SHA1_CTX *context, const unsigned char *data, uint32_t len)
 {
 uint32_t i;
 uint32_t j;
@@ -149,7 +149,7 @@ uint32_t j;
 
 /* Add padding and return the message digest. */
 
-void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
+void SHA1Final(unsigned char digest[20], SHA1_CTX *context)
 {
 unsigned i;
 unsigned char finalcount[8];
diff --git a/sha1.h b/sha1.h
index 304beb93..b2dc87c4 100644
--- a/sha1.h
+++ b/sha1.h
@@ -18,9 +18,9 @@ typedef struct {
 } SHA1_CTX;
 
 void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
-void SHA1Init(SHA1_CTX* context);
-void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len);
-void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
+void SHA1Init(SHA1_CTX *context);
+void SHA1Update(SHA1_CTX *context, const unsigned char *data, uint32_t len);
+void SHA1Final(unsigned char digest[20], SHA1_CTX *context);
 
 # define SHA1_Transform SHA1Transform
 # define SHA1_Init SHA1Init
diff --git a/smime.c b/smime.c
index 2495b5e6..ebdf8d32 100644
--- a/smime.c
+++ b/smime.c
@@ -399,7 +399,7 @@ static void smime_entry (char *s, size_t l, MUTTMENU * 
menu, int num)
 {
   smime_key_t **Table = (smime_key_t **) menu->data;
   smime_key_t *this = Table[num];
-  char* truststate;
+  char *truststate;
   switch (this->trust)
   {
     case 't':
@@ -438,7 +438,7 @@ static smime_key_t *smime_select_key (smime_key_t *keys, 
char *query)
   char helpstr[LONG_STRING];
   char buf[LONG_STRING];
   char title[256];
-  MUTTMENU* menu;
+  MUTTMENU *menu;
   char *s = "";
   int done = 0;
 
diff --git a/smime.h b/smime.h
index 7e07334f..911de0c4 100644
--- a/smime.h
+++ b/smime.h
@@ -46,9 +46,9 @@ int   smime_decrypt_mime (FILE *, FILE **, BODY *, BODY **);
 int  smime_application_smime_handler (BODY *, STATE *);
 
 
-BODY* smime_sign_message (BODY *);
+BODY *smime_sign_message (BODY *);
 
-BODY* smime_build_smime_entity (BODY *, char *);
+BODY *smime_build_smime_entity (BODY *, char *);
 
 int   smime_verify_one(BODY *, STATE *, const char *);
 
@@ -56,7 +56,7 @@ int   smime_verify_one(BODY *, STATE *, const char *);
 int   smime_verify_sender(HEADER *);
 
 
-char* smime_get_field_from_db (char *, char *, short, short);
+char *smime_get_field_from_db (char *, char *, short, short);
 
 void  smime_getkeys (ENVELOPE *);
 
diff --git a/smtp.c b/smtp.c
index 3e388573..a53dc809 100644
--- a/smtp.c
+++ b/smtp.c
@@ -70,20 +70,20 @@ enum {
   CAPMAX
 };
 
-static int smtp_auth (CONNECTION* conn);
-static int smtp_auth_oauth (CONNECTION* conn, int xoauth2);
+static int smtp_auth (CONNECTION *conn);
+static int smtp_auth_oauth (CONNECTION *conn, int xoauth2);
 #ifdef USE_SASL_CYRUS
-static int smtp_auth_sasl (CONNECTION* conn, const char* mechanisms);
+static int smtp_auth_sasl (CONNECTION *conn, const char *mechanisms);
 #endif
 #ifdef USE_SASL_GNU
-static int smtp_auth_gsasl (CONNECTION* conn, const char* method);
+static int smtp_auth_gsasl (CONNECTION *conn, const char *method);
 #endif
 
-static int smtp_fill_account (ACCOUNT* account);
-static int smtp_open (CONNECTION* conn);
+static int smtp_fill_account (ACCOUNT *account);
+static int smtp_open (CONNECTION *conn);
 
 static int Esmtp = 0;
-static char* AuthMechs = NULL;
+static char *AuthMechs = NULL;
 static unsigned char Capabilities[(CAPMAX + 7)/ 8];
 
 /* Note: the 'len' parameter is actually the number of bytes, as
@@ -318,7 +318,7 @@ static int address_uses_unicode(const char *a)
 /* Returns 1 if any address in a contains at least one 8-bit
  * character, 0 if none do.
  */
-static int addresses_use_unicode(const ADDRESS* a)
+static int addresses_use_unicode(const ADDRESS *a)
 {
   while (a)
   {
@@ -331,12 +331,12 @@ static int addresses_use_unicode(const ADDRESS* a)
 
 
 int
-mutt_smtp_send (const ADDRESS* from, const ADDRESS* to, const ADDRESS* cc,
-                const ADDRESS* bcc, const char *msgfile, int eightbit)
+mutt_smtp_send (const ADDRESS *from, const ADDRESS *to, const ADDRESS *cc,
+                const ADDRESS *bcc, const char *msgfile, int eightbit)
 {
   CONNECTION *conn;
   ACCOUNT account;
-  const char* envfrom;
+  const char *envfrom;
   char buf[1024];
   int ret = -1;
 
@@ -420,13 +420,13 @@ mutt_smtp_send (const ADDRESS* from, const ADDRESS* to, 
const ADDRESS* cc,
   return ret;
 }
 
-static int smtp_fill_account (ACCOUNT* account)
+static int smtp_fill_account (ACCOUNT *account)
 {
   static unsigned short SmtpPort = 0;
 
-  struct servent* service;
+  struct servent *service;
   ciss_url_t url;
-  char* urlstr;
+  char *urlstr;
 
   account->flags = 0;
   account->port = 0;
@@ -469,10 +469,10 @@ static int smtp_fill_account (ACCOUNT* account)
   return 0;
 }
 
-static int smtp_helo (CONNECTION* conn)
+static int smtp_helo (CONNECTION *conn)
 {
   char buf[LONG_STRING];
-  const char* fqdn;
+  const char *fqdn;
 
   memset (Capabilities, 0, sizeof (Capabilities));
 
@@ -500,7 +500,7 @@ static int smtp_helo (CONNECTION* conn)
   return smtp_get_resp (conn);
 }
 
-static int smtp_open (CONNECTION* conn)
+static int smtp_open (CONNECTION *conn)
 {
   int rc;
 
@@ -565,15 +565,15 @@ static int smtp_open (CONNECTION* conn)
   return 0;
 }
 
-static int smtp_auth (CONNECTION* conn)
+static int smtp_auth (CONNECTION *conn)
 {
   int r = SMTP_AUTH_UNAVAIL;
 
   if (SmtpAuthenticators)
   {
-    char* methods = safe_strdup (SmtpAuthenticators);
-    char* method;
-    char* delim;
+    char *methods = safe_strdup (SmtpAuthenticators);
+    char *method;
+    char *delim;
 
     for (method = methods; method; method = delim)
     {
@@ -647,12 +647,12 @@ static int smtp_auth (CONNECTION* conn)
 }
 
 #ifdef USE_SASL_CYRUS
-static int smtp_auth_sasl (CONNECTION* conn, const char* mechlist)
+static int smtp_auth_sasl (CONNECTION *conn, const char *mechlist)
 {
-  sasl_conn_t* saslconn;
-  sasl_interact_t* interaction = NULL;
-  const char* mech;
-  const char* data = NULL;
+  sasl_conn_t *saslconn;
+  sasl_interact_t *interaction = NULL;
+  const char *mech;
+  const char *data = NULL;
   unsigned int data_len;
   BUFFER *temp_buf = NULL, *output_buf = NULL, *smtp_response_buf = NULL;
   int rc = SMTP_AUTH_FAIL, sasl_rc, smtp_rc;
@@ -866,7 +866,7 @@ fail:
 
 
 /* smtp_auth_oauth: AUTH=OAUTHBEARER support. See RFC 7628 */
-static int smtp_auth_oauth (CONNECTION* conn, int xoauth2)
+static int smtp_auth_oauth (CONNECTION *conn, int xoauth2)
 {
   int rc = SMTP_AUTH_FAIL, smtp_rc;
   BUFFER *bearertoken = NULL, *authline = NULL;
diff --git a/url.c b/url.c
index dfe8bff7..a357bff9 100644
--- a/url.c
+++ b/url.c
@@ -215,7 +215,7 @@ static void url_pct_encode (char *dst, size_t l, const char 
*src)
   *dst = 0;
 }
 
-int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t len, int flags)
+int url_ciss_tostring (ciss_url_t *ciss, char *dest, size_t len, int flags)
 {
   BUFFER *dest_buf;
   int retval;
@@ -232,7 +232,7 @@ int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t 
len, int flags)
 }
 
 /* url_ciss_tobuffer: output the URL string for a given CISS object. */
-int url_ciss_tobuffer (ciss_url_t* ciss, BUFFER* dest, int flags)
+int url_ciss_tobuffer (ciss_url_t *ciss, BUFFER *dest, int flags)
 {
   if (ciss->scheme == U_UNKNOWN)
     return -1;
diff --git a/url.h b/url.h
index 2b1f94b6..2c80b34e 100644
--- a/url.h
+++ b/url.h
@@ -32,8 +32,8 @@ ciss_url_t;
 url_scheme_t url_check_scheme (const char *s);
 int url_parse_file (char *d, const char *src, size_t dl);
 int url_parse_ciss (ciss_url_t *ciss, char *src);
-int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t len, int flags);
-int url_ciss_tobuffer (ciss_url_t* ciss, BUFFER* dest, int flags);
+int url_ciss_tostring (ciss_url_t *ciss, char *dest, size_t len, int flags);
+int url_ciss_tobuffer (ciss_url_t *ciss, BUFFER *dest, int flags);
 int url_parse_mailto (ENVELOPE *e, char **body, const char *src);
 
 #endif
-- 
2.53.0

Reply via email to