]> granicus.if.org Git - neomutt/commitdiff
replace 'BODY' with 'struct Body'
authorRichard Russon <rich@flatcap.org>
Mon, 15 May 2017 13:30:55 +0000 (14:30 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 15 May 2017 23:04:07 +0000 (00:04 +0100)
42 files changed:
attach.c
attach.h
browser.c
commands.c
compose.c
copy.c
copy.h
crypt.c
crypt_gpgme.c
crypt_gpgme.h
crypt_mod.h
crypt_mod_pgp_classic.c
crypt_mod_pgp_gpgme.c
crypt_mod_smime_classic.c
crypt_mod_smime_gpgme.c
cryptglue.c
handler.c
hcache/hcache.c
headers.c
main.c
mbox.c
mutt.h
mutt_crypt.h
muttlib.c
pager.h
parse.c
pattern.c
pgp.c
pgp.h
pgpkey.c
postpone.c
protos.h
recvattach.c
recvcmd.c
rfc1524.c
rfc1524.h
rfc3676.c
rfc3676.h
send.c
sendlib.c
smime.c
smime.h

index cea3939bf75dbe4a938c04978671b5068589b017..523e5ce5d5b24ba0c51282b871c2bbe471a8d61e 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -39,7 +39,7 @@
 #include "pager.h"
 #include "rfc1524.h"
 
-int mutt_get_tmp_attachment(BODY *a)
+int mutt_get_tmp_attachment(struct Body *a)
 {
   char type[STRING];
   char tempfile[_POSIX_PATH_MAX];
@@ -81,7 +81,7 @@ int mutt_get_tmp_attachment(BODY *a)
 
 
 /* return 1 if require full screen redraw, 0 otherwise */
-int mutt_compose_attachment(BODY *a)
+int mutt_compose_attachment(struct Body *a)
 {
   char type[STRING];
   char command[STRING];
@@ -128,7 +128,7 @@ int mutt_compose_attachment(BODY *a)
 
         if (r != -1 && entry->composetypecommand)
         {
-          BODY *b = NULL;
+          struct Body *b = NULL;
           FILE *fp = NULL, *tfp = NULL;
           char tempfile[_POSIX_PATH_MAX];
 
@@ -205,14 +205,14 @@ bailout:
 
 /*
  * Currently, this only works for send mode, as it assumes that the
- * BODY->filename actually contains the information.  I'm not sure
+ * Body->filename actually contains the information.  I'm not sure
  * we want to deal with editing attachments we've already received,
  * so this should be ok.
  *
  * Returns 1 if editor found, 0 if not (useful to tell calling menu to
  * redraw)
  */
-int mutt_edit_attachment(BODY *a)
+int mutt_edit_attachment(struct Body *a)
 {
   char type[STRING];
   char command[STRING];
@@ -282,7 +282,7 @@ bailout:
 }
 
 
-void mutt_check_lookup_list(BODY *b, char *type, int len)
+void mutt_check_lookup_list(struct Body *b, char *type, int len)
 {
   LIST *t = MimeLookupList;
   int i;
@@ -294,7 +294,7 @@ void mutt_check_lookup_list(BODY *b, char *type, int len)
          (ascii_strncasecmp(type, t->data, i) == 0)) ||
         (ascii_strcasecmp(type, t->data) == 0))
     {
-      BODY tmp = { 0 };
+      struct Body tmp = { 0 };
       int n;
       if ((n = mutt_lookup_mime_type(&tmp, b->filename)) != TYPEOTHER)
       {
@@ -323,7 +323,7 @@ void mutt_check_lookup_list(BODY *b, char *type, int len)
 }
 
 /* returns -1 on error, 0 or the return code from mutt_do_pager() on success */
-int mutt_view_attachment(FILE *fp, BODY *a, int flag, HEADER *hdr, struct AttachPtr **idx, short idxlen)
+int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr, struct AttachPtr **idx, short idxlen)
 {
   char tempfile[_POSIX_PATH_MAX] = "";
   char pagerfile[_POSIX_PATH_MAX] = "";
@@ -589,7 +589,7 @@ return_error:
 }
 
 /* returns 1 on success, 0 on error */
-int mutt_pipe_attachment(FILE *fp, BODY *b, const char *path, char *outfile)
+int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile)
 {
   pid_t thepid;
   int out = -1;
@@ -692,7 +692,7 @@ static FILE *save_attachment_open(char *path, int flags)
 }
 
 /* returns 0 on success, -1 on error */
-int mutt_save_attachment(FILE *fp, BODY *m, char *path, int flags, HEADER *hdr)
+int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER *hdr)
 {
   if (!m)
     return -1;
@@ -806,11 +806,11 @@ int mutt_save_attachment(FILE *fp, BODY *m, char *path, int flags, HEADER *hdr)
 }
 
 /* returns 0 on success, -1 on error */
-int mutt_decode_save_attachment(FILE *fp, BODY *m, char *path, int displaying, int flags)
+int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displaying, int flags)
 {
   STATE s;
   unsigned int saved_encoding = 0;
-  BODY *saved_parts = NULL;
+  struct Body *saved_parts = NULL;
   HEADER *saved_hdr = NULL;
   int ret = 0;
 
@@ -892,12 +892,12 @@ int mutt_decode_save_attachment(FILE *fp, BODY *m, char *path, int displaying, i
 }
 
 /* Ok, the difference between send and receive:
- * recv: BODY->filename is a suggested name, and Context|HEADER points
+ * recv: Body->filename is a suggested name, and Context|HEADER points
  *       to the attachment in mailbox which is encoded
- * send: BODY->filename points to the un-encoded file which contains the
+ * send: Body->filename points to the un-encoded file which contains the
  *       attachment
  */
-int mutt_print_attachment(FILE *fp, BODY *a)
+int mutt_print_attachment(FILE *fp, struct Body *a)
 {
   char newfile[_POSIX_PATH_MAX] = "";
   char type[STRING];
index 8b8d6f15ad40fa2f69fabe024ae1a2ccc2a9d4bd..f3a64a1adc66a8534ea0125f89a6c24f59e9558c 100644 (file)
--- a/attach.h
+++ b/attach.h
@@ -24,7 +24,7 @@
 
 struct AttachPtr
 {
-  BODY *content;
+  struct Body *content;
   int parent_type;
   char *tree;
   int level;
@@ -32,25 +32,25 @@ struct AttachPtr
   bool unowned : 1; /* don't unlink on detach */
 };
 
-struct AttachPtr **mutt_gen_attach_list(BODY *m, int parent_type, struct AttachPtr **idx,
+struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type, struct AttachPtr **idx,
                                  short *idxlen, short *idxmax, int level, int compose);
 void mutt_update_tree(struct AttachPtr **idx, short idxlen);
-int mutt_view_attachment(FILE *fp, BODY *a, int flag, HEADER *hdr,
+int mutt_view_attachment(FILE *fp, struct Body *a, int flag, HEADER *hdr,
                          struct AttachPtr **idx, short idxlen);
 
 int mutt_tag_attach(MUTTMENU *menu, int n, int m);
-int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY *cur,
+int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, struct Body *cur,
                              struct AttachPtr ***idxp, short *idxlen, short *idxmax, int recv);
 
-void mutt_save_attachment_list(FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTMENU *menu);
-void mutt_pipe_attachment_list(FILE *fp, int tag, BODY *top, int filter);
-void mutt_print_attachment_list(FILE *fp, int tag, BODY *top);
+void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, HEADER *hdr, MUTTMENU *menu);
+void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter);
+void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top);
 
-void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur);
-void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur);
+void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
+void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur);
 void mutt_attach_forward(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
-                         BODY *cur, int flags);
+                         struct Body *cur, int flags);
 void mutt_attach_reply(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
-                       BODY *cur, int flags);
+                       struct Body *cur, int flags);
 
 #endif /* _MUTT_ATTACH_H */
index 2a7a7420170235e6e611621383ca5e8cd79fb433..c9f70af169ee6e2924db3087cb5e8e690ab00084 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1848,7 +1848,7 @@ void _mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numf
         }
         else
         {
-          BODY *b = NULL;
+          struct Body *b = NULL;
           char buf2[_POSIX_PATH_MAX];
 
           mutt_concat_path(buf2, LastDir, state.entry[menu->current].name, sizeof(buf2));
index f9a0f4ccd6addd09c5ac8e328c6b36c52b00fa13..48cee698adf94e26a53d50678f74aa58b7813c46 100644 (file)
@@ -905,7 +905,7 @@ void mutt_version(void)
   mutt_message("NeoMutt %s%s (%s)", PACKAGE_VERSION, GitVer, MUTT_VERSION);
 }
 
-void mutt_edit_content_type(HEADER *h, BODY *b, FILE *fp)
+void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp)
 {
   char buf[LONG_STRING];
   char obuf[LONG_STRING];
index 054ac45a64bd12052601e469c057ec3c563b25dc..d01a7b5952b7575395c585c6651a1d32164563d0 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -493,7 +493,7 @@ static unsigned long cum_attachs_size(MUTTMENU *menu)
   unsigned short i;
   struct AttachPtr **idx = menu->data;
   CONTENT *info = NULL;
-  BODY *b = NULL;
+  struct Body *b = NULL;
 
   for (i = 0, s = 0; i < menu->max; i++)
   {
@@ -1109,7 +1109,7 @@ int mutt_compose_menu(HEADER *msg, /* structure for new message */
         CHECK_COUNT;
         if (menu->tagprefix)
         {
-          BODY *top = NULL;
+          struct Body *top = NULL;
           for (top = msg->content; top; top = top->next)
           {
             if (top->tagged)
@@ -1213,7 +1213,7 @@ int mutt_compose_menu(HEADER *msg, /* structure for new message */
         CHECK_COUNT;
         if (menu->tagprefix)
         {
-          BODY *top = NULL;
+          struct Body *top = NULL;
           for (top = msg->content; top; top = top->next)
           {
             if (top->tagged)
diff --git a/copy.c b/copy.c
index 2a65f8f8ebfaf13a2c93a9a50c7dfc3439c24b64..36bf9b7f69378c98b9119762cb58ab8da0f24275 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -34,7 +34,7 @@
 #endif
 
 static int address_header_decode(char **str);
-static int copy_delete_attach(BODY *b, FILE *fpin, FILE *fpout, char *date);
+static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *date);
 
 /* Ok, the only reason for not merging this with mutt_copy_header()
  * below is to avoid creating a HEADER structure in message_handler().
@@ -462,7 +462,7 @@ int mutt_copy_header(FILE *in, HEADER *h, FILE *out, int flags, const char *pref
 }
 
 /* Count the number of lines and bytes to be deleted in this body */
-static int count_delete_lines(FILE *fp, BODY *b, LOFF_T *length, size_t datelen)
+static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t datelen)
 {
   int dellines = 0;
   long l;
@@ -510,7 +510,7 @@ static int count_delete_lines(FILE *fp, BODY *b, LOFF_T *length, size_t datelen)
  *      MUTT_CM_CHARCONV        perform character set conversion
  * chflags      flags to mutt_copy_header()
  */
-int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body, int flags, int chflags)
+int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body, int flags, int chflags)
 {
   char prefix[SHORT_STRING];
   STATE s;
@@ -640,7 +640,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body, int fla
   }
   else if (WithCrypto && (flags & MUTT_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT))
   {
-    BODY *cur = NULL;
+    struct Body *cur = NULL;
     FILE *fp = NULL;
 
     if ((WithCrypto & APPLICATION_PGP) && (flags & MUTT_CM_DECODE_PGP) &&
@@ -741,7 +741,7 @@ int mutt_copy_message(FILE *fpout, CONTEXT *src, HEADER *hdr, int flags, int chf
  * chflags      mutt_copy_header() flags
  */
 static int _mutt_append_message(CONTEXT *dest, FILE *fpin, CONTEXT *src,
-                                HEADER *hdr, BODY *body, int flags, int chflags)
+                                HEADER *hdr, struct Body *body, int flags, int chflags)
 {
   char buf[STRING];
   MESSAGE *msg = NULL;
@@ -789,9 +789,9 @@ int mutt_append_message(CONTEXT *dest, CONTEXT *src, HEADER *hdr, int cmflags, i
  *
  * The function will return 0 on success and -1 on failure.
  */
-static int copy_delete_attach(BODY *b, FILE *fpin, FILE *fpout, char *date)
+static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *date)
 {
-  BODY *part = NULL;
+  struct Body *part = NULL;
 
   for (part = b->parts; part; part = part->next)
   {
diff --git a/copy.h b/copy.h
index 41e2d484ff7e41623014cc0dc71d6c94e7f5e869..5f7f91f396a84fed886164a66e47dddf71695992 100644 (file)
--- a/copy.h
+++ b/copy.h
@@ -63,7 +63,7 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
 
 int mutt_copy_header(FILE *in, HEADER *h, FILE *out, int flags, const char *prefix);
 
-int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, BODY *body,
+int _mutt_copy_message(FILE *fpout, FILE *fpin, HEADER *hdr, struct Body *body,
                        int flags, int chflags);
 
 int mutt_copy_message(FILE *fpout, CONTEXT *src, HEADER *hdr, int flags, int chflags);
diff --git a/crypt.c b/crypt.c
index bddd05a56acaf393ec1d3248c87ac43cb74909a4..ac0ccbb309de22dfc690ca86c92ad8a0c1874698 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -110,9 +110,9 @@ int crypt_valid_passphrase(int flags)
 
 int mutt_protect(HEADER *msg, char *keylist)
 {
-  BODY *pbody = NULL, *tmp_pbody = NULL;
-  BODY *tmp_smime_pbody = NULL;
-  BODY *tmp_pgp_pbody = NULL;
+  struct Body *pbody = NULL, *tmp_pbody = NULL;
+  struct Body *tmp_smime_pbody = NULL;
+  struct Body *tmp_pgp_pbody = NULL;
   int flags = (WithCrypto & APPLICATION_PGP) ? msg->security : 0;
 
   if (!WithCrypto)
@@ -294,7 +294,7 @@ int mutt_protect(HEADER *msg, char *keylist)
 }
 
 
-int mutt_is_multipart_signed(BODY *b)
+int mutt_is_multipart_signed(struct Body *b)
 {
   char *p = NULL;
 
@@ -323,7 +323,7 @@ int mutt_is_multipart_signed(BODY *b)
 }
 
 
-int mutt_is_multipart_encrypted(BODY *b)
+int mutt_is_multipart_encrypted(struct Body *b)
 {
   if ((WithCrypto & APPLICATION_PGP))
   {
@@ -342,7 +342,7 @@ int mutt_is_multipart_encrypted(BODY *b)
 }
 
 
-int mutt_is_valid_multipart_pgp_encrypted(BODY *b)
+int mutt_is_valid_multipart_pgp_encrypted(struct Body *b)
 {
   if (!mutt_is_multipart_encrypted(b))
     return 0;
@@ -370,7 +370,7 @@ int mutt_is_valid_multipart_pgp_encrypted(BODY *b)
  *     <application/octet-stream> [BASE64-encoded]
  * See ticket #3742
  */
-int mutt_is_malformed_multipart_pgp_encrypted(BODY *b)
+int mutt_is_malformed_multipart_pgp_encrypted(struct Body *b)
 {
   if (!(WithCrypto & APPLICATION_PGP))
     return 0;
@@ -402,7 +402,7 @@ int mutt_is_malformed_multipart_pgp_encrypted(BODY *b)
 }
 
 
-int mutt_is_application_pgp(BODY *m)
+int mutt_is_application_pgp(struct Body *m)
 {
   int t = 0;
   char *p = NULL;
@@ -449,7 +449,7 @@ int mutt_is_application_pgp(BODY *m)
   return t;
 }
 
-int mutt_is_application_smime(BODY *m)
+int mutt_is_application_smime(struct Body *m)
 {
   char *t = NULL;
   int len, complain = 0;
@@ -516,7 +516,7 @@ int mutt_is_application_smime(BODY *m)
 }
 
 
-int crypt_query(BODY *m)
+int crypt_query(struct Body *m)
 {
   int t = 0;
 
@@ -559,7 +559,7 @@ int crypt_query(BODY *m)
 
   if (m->type == TYPEMULTIPART || m->type == TYPEMESSAGE)
   {
-    BODY *p = NULL;
+    struct Body *p = NULL;
     int u, v, w;
 
     u = m->parts ? 0xffffffff : 0; /* Bits set in all parts */
@@ -581,7 +581,7 @@ int crypt_query(BODY *m)
 }
 
 
-int crypt_write_signed(BODY *a, STATE *s, const char *tempfile)
+int crypt_write_signed(struct Body *a, STATE *s, const char *tempfile)
 {
   FILE *fp = NULL;
   int c;
@@ -625,7 +625,7 @@ int crypt_write_signed(BODY *a, STATE *s, const char *tempfile)
 }
 
 
-void convert_to_7bit(BODY *a)
+void convert_to_7bit(struct Body *a)
 {
   if (!WithCrypto)
     return;
@@ -860,7 +860,7 @@ void crypt_opportunistic_encrypt(HEADER *msg)
 }
 
 
-static void crypt_fetch_signatures(BODY ***signatures, BODY *a, int *n)
+static void crypt_fetch_signatures(struct Body ***signatures, struct Body *a, int *n)
 {
   if (!WithCrypto)
     return;
@@ -872,7 +872,7 @@ static void crypt_fetch_signatures(BODY ***signatures, BODY *a, int *n)
     else
     {
       if ((*n % 5) == 0)
-        safe_realloc(signatures, (*n + 6) * sizeof(BODY **));
+        safe_realloc(signatures, (*n + 6) * sizeof(struct Body **));
 
       (*signatures)[(*n)++] = a;
     }
@@ -883,14 +883,14 @@ static void crypt_fetch_signatures(BODY ***signatures, BODY *a, int *n)
 /*
  * This routine verifies a  "multipart/signed"  body.
  */
-int mutt_signed_handler(BODY *a, STATE *s)
+int mutt_signed_handler(struct Body *a, STATE *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   int signed_type;
   int inconsistent = 0;
 
-  BODY *b = a;
-  BODY **signatures = NULL;
+  struct Body *b = a;
+  struct Body **signatures = NULL;
   int sigcnt = 0;
   int i;
   bool goodsig = true;
index 290c24080fdbd1bb7f19564b97e8111ab2a052ef..e1ef38607f14c947feaaef1db5756da0b74b08ee 100644 (file)
@@ -412,7 +412,7 @@ static gpgme_data_t create_gpgme_data(void)
 /* Create a new GPGME Data object from the mail body A.  With CONVERT
    passed as true, the lines are converted to CR,LF if required.
    Return NULL on error or the gpgme_data_t object on success. */
-static gpgme_data_t body_to_data_object(BODY *a, int convert)
+static gpgme_data_t body_to_data_object(struct Body *a, int convert)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fptmp = NULL;
@@ -850,9 +850,9 @@ static void print_time(time_t t, STATE *s)
 /* Sign the MESSAGE in body A either using OpenPGP or S/MIME when
    USE_SMIME is passed as true.  Returns the new body or NULL on
    error. */
-static BODY *sign_message(BODY *a, int use_smime)
+static struct Body *sign_message(struct Body *a, int use_smime)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
   char *sigfile = NULL;
   int err = 0;
   char buf[100];
@@ -971,12 +971,12 @@ static BODY *sign_message(BODY *a, int use_smime)
 }
 
 
-BODY *pgp_gpgme_sign_message(BODY *a)
+struct Body *pgp_gpgme_sign_message(struct Body *a)
 {
   return sign_message(a, 0);
 }
 
-BODY *smime_gpgme_sign_message(BODY *a)
+struct Body *smime_gpgme_sign_message(struct Body *a)
 {
   return sign_message(a, 1);
 }
@@ -987,10 +987,10 @@ BODY *smime_gpgme_sign_message(BODY *a)
 
 /* Encrypt the mail body A to all keys given as space separated keyids
    or fingerprints in KEYLIST and return the encrypted body.  */
-BODY *pgp_gpgme_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *pgp_gpgme_encrypt_message(struct Body *a, char *keylist, int sign)
 {
   char *outfile = NULL;
-  BODY *t = NULL;
+  struct Body *t = NULL;
   gpgme_key_t *rset = NULL;
   gpgme_data_t plaintext;
 
@@ -1048,10 +1048,10 @@ BODY *pgp_gpgme_encrypt_message(BODY *a, char *keylist, int sign)
 
 /* Encrypt the mail body A to all keys given as space separated
    fingerprints in KEYLIST and return the S/MIME encrypted body.  */
-BODY *smime_gpgme_build_smime_entity(BODY *a, char *keylist)
+struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist)
 {
   char *outfile = NULL;
-  BODY *t = NULL;
+  struct Body *t = NULL;
   gpgme_key_t *rset = NULL;
   gpgme_data_t plaintext;
 
@@ -1486,7 +1486,7 @@ static int show_one_sig_status(gpgme_ctx_t ctx, int idx, STATE *s)
 
 /* Do the actual verification step. With IS_SMIME set to true we
    assume S/MIME (surprise!) */
-static int verify_one(BODY *sigbdy, STATE *s, const char *tempfile, int is_smime)
+static int verify_one(struct Body *sigbdy, STATE *s, const char *tempfile, int is_smime)
 {
   int badsig = -1;
   int anywarn = 0;
@@ -1611,12 +1611,12 @@ static int verify_one(BODY *sigbdy, STATE *s, const char *tempfile, int is_smime
   return badsig ? 1 : anywarn ? 2 : 0;
 }
 
-int pgp_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int pgp_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
 {
   return verify_one(sigbdy, s, tempfile, 0);
 }
 
-int smime_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int smime_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
 {
   return verify_one(sigbdy, s, tempfile, 1);
 }
@@ -1631,13 +1631,13 @@ int smime_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
    a flag in R_IS_SIGNED to indicate whether this is a combined
    encrypted and signed message, for S/MIME it returns true when it is
    not a encrypted but a signed message.  */
-static BODY *decrypt_part(BODY *a, STATE *s, FILE *fpout, int is_smime, int *r_is_signed)
+static struct Body *decrypt_part(struct Body *a, STATE *s, FILE *fpout, int is_smime, int *r_is_signed)
 {
   if (!a || !s || !fpout)
     return NULL;
 
   struct stat info;
-  BODY *tattach = NULL;
+  struct Body *tattach = NULL;
   int err = 0;
   gpgme_ctx_t ctx;
   gpgme_data_t ciphertext, plaintext;
@@ -1775,11 +1775,11 @@ restart:
 
 /* Decrypt a PGP/MIME message in FPIN and B and return a new body and
    the stream in CUR and FPOUT.  Returns 0 on success. */
-int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
   STATE s;
-  BODY *first_part = b;
+  struct Body *first_part = b;
   int is_signed = 0;
   int need_decode = 0;
   int saved_type;
@@ -1861,7 +1861,7 @@ bail:
 
 /* Decrypt a S/MIME message in FPIN and B and return a new body and
    the stream in CUR and FPOUT.  Returns 0 on success. */
-int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
   STATE s;
@@ -1932,8 +1932,8 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
          encrypted part can then point into this file and there won't
          ever be a need to decrypt again.  This needs a partial
          rewrite of the MIME engine. */
-    BODY *bb = *cur;
-    BODY *tmp_b = NULL;
+    struct Body *bb = *cur;
+    struct Body *tmp_b = NULL;
 
     saved_b_type = bb->type;
     saved_b_offset = bb->offset;
@@ -2124,7 +2124,7 @@ static int line_compare(const char *a, size_t n, const char *b)
 /*
  * Implementation of `pgp_check_traditional'.
  */
-static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
+static int pgp_check_traditional_one_body(FILE *fp, struct Body *b, int tagged_only)
 {
   char tempfile[_POSIX_PATH_MAX];
   char buf[HUGE_STRING];
@@ -2182,7 +2182,7 @@ static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
   return 1;
 }
 
-int pgp_gpgme_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int pgp_gpgme_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 {
   int rv = 0;
   int r;
@@ -2304,7 +2304,7 @@ static void copy_clearsigned(gpgme_data_t data, STATE *s, char *charset)
 }
 
 /* Support for classic_application/pgp */
-int pgp_gpgme_application_handler(BODY *m, STATE *s)
+int pgp_gpgme_application_handler(struct Body *m, STATE *s)
 {
   int needpass = -1, pgp_keyblock = 0;
   int clearsign = 0;
@@ -2549,11 +2549,11 @@ int pgp_gpgme_application_handler(BODY *m, STATE *s)
  * This handler is passed the application/octet-stream directly.
  * The caller must propagate a->goodsig to its parent.
  */
-int pgp_gpgme_encrypted_handler(BODY *a, STATE *s)
+int pgp_gpgme_encrypted_handler(struct Body *a, STATE *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL;
-  BODY *tattach = NULL;
+  struct Body *tattach = NULL;
   int is_signed;
   int rc = 0;
 
@@ -2623,11 +2623,11 @@ int pgp_gpgme_encrypted_handler(BODY *a, STATE *s)
 }
 
 /* Support for application/smime */
-int smime_gpgme_application_handler(BODY *a, STATE *s)
+int smime_gpgme_application_handler(struct Body *a, STATE *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL;
-  BODY *tattach = NULL;
+  struct Body *tattach = NULL;
   int is_signed;
   int rc = 0;
 
@@ -4441,14 +4441,14 @@ char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode)
 }
 
 #ifdef HAVE_GPGME_OP_EXPORT_KEYS
-BODY *pgp_gpgme_make_key_attachment(char *tempf)
+struct Body *pgp_gpgme_make_key_attachment(char *tempf)
 {
   crypt_key_t *key = NULL;
   gpgme_ctx_t context = NULL;
   gpgme_key_t export_keys[2];
   gpgme_data_t keydata = NULL;
   gpgme_error_t err;
-  BODY *att = NULL;
+  struct Body *att = NULL;
   char buff[LONG_STRING];
   struct stat sb;
 
index e173f0edc165d6e34da634188b9020c90a497bb9..b7d61e187ad29e31ba77e236aec30c11a1b41e2e 100644 (file)
@@ -26,26 +26,26 @@ void smime_gpgme_init(void);
 char *pgp_gpgme_findkeys(struct Address *adrlist, int oppenc_mode);
 char *smime_gpgme_findkeys(struct Address *adrlist, int oppenc_mode);
 
-BODY *pgp_gpgme_encrypt_message(BODY *a, char *keylist, int sign);
-BODY *smime_gpgme_build_smime_entity(BODY *a, char *keylist);
+struct Body *pgp_gpgme_encrypt_message(struct Body *a, char *keylist, int sign);
+struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist);
 
-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_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
+int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
 
-int pgp_gpgme_check_traditional(FILE *fp, BODY *b, int tagged_only);
+int pgp_gpgme_check_traditional(FILE *fp, struct Body *b, int tagged_only);
 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);
-int pgp_gpgme_encrypted_handler(BODY *a, STATE *s);
+int pgp_gpgme_application_handler(struct Body *m, STATE *s);
+int smime_gpgme_application_handler(struct Body *a, STATE *s);
+int pgp_gpgme_encrypted_handler(struct Body *a, STATE *s);
 
-BODY *pgp_gpgme_make_key_attachment(char *tempf);
+struct Body *pgp_gpgme_make_key_attachment(char *tempf);
 
-BODY *pgp_gpgme_sign_message(BODY *a);
-BODY *smime_gpgme_sign_message(BODY *a);
+struct Body *pgp_gpgme_sign_message(struct Body *a);
+struct Body *smime_gpgme_sign_message(struct Body *a);
 
-int pgp_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
-int smime_gpgme_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
+int pgp_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+int smime_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
 
 int pgp_gpgme_send_menu(HEADER *msg);
 int smime_gpgme_send_menu(HEADER *msg);
index 8f8f3ce5433a87b458895257eb019b55bcc896c0..c922b78cfc99f60008aee36dc174409d8363c732 100644 (file)
 typedef void (*crypt_func_void_passphrase_t)(void);
 typedef int (*crypt_func_valid_passphrase_t)(void);
 
-typedef int (*crypt_func_decrypt_mime_t)(FILE *a, FILE **b, BODY *c, BODY **d);
+typedef int (*crypt_func_decrypt_mime_t)(FILE *a, FILE **b, struct Body *c, struct Body **d);
 
-typedef int (*crypt_func_application_handler_t)(BODY *m, STATE *s);
-typedef int (*crypt_func_encrypted_handler_t)(BODY *m, STATE *s);
+typedef int (*crypt_func_application_handler_t)(struct Body *m, STATE *s);
+typedef int (*crypt_func_encrypted_handler_t)(struct Body *m, STATE *s);
 
 typedef void (*crypt_func_pgp_invoke_getkeys_t)(struct Address *addr);
-typedef int (*crypt_func_pgp_check_traditional_t)(FILE *fp, BODY *b, int tagged_only);
-typedef BODY *(*crypt_func_pgp_traditional_encryptsign_t)(BODY *a, int flags, char *keylist);
-typedef BODY *(*crypt_func_pgp_make_key_attachment_t)(char *tempf);
+typedef int (*crypt_func_pgp_check_traditional_t)(FILE *fp, struct Body *b, int tagged_only);
+typedef struct Body *(*crypt_func_pgp_traditional_encryptsign_t)(struct Body *a, int flags, char *keylist);
+typedef struct Body *(*crypt_func_pgp_make_key_attachment_t)(char *tempf);
 typedef char *(*crypt_func_findkeys_t)(struct Address *adrlist, int oppenc_mode);
-typedef BODY *(*crypt_func_sign_message_t)(BODY *a);
-typedef BODY *(*crypt_func_pgp_encrypt_message_t)(BODY *a, char *keylist, int sign);
+typedef struct Body *(*crypt_func_sign_message_t)(struct Body *a);
+typedef struct Body *(*crypt_func_pgp_encrypt_message_t)(struct Body *a, char *keylist, int sign);
 typedef void (*crypt_func_pgp_invoke_import_t)(const char *fname);
-typedef int (*crypt_func_verify_one_t)(BODY *sigbdy, STATE *s, const char *tempf);
+typedef int (*crypt_func_verify_one_t)(struct Body *sigbdy, STATE *s, const char *tempf);
 typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)(FILE *fp, int tag,
-                                                                   BODY *top);
+                                                                   struct Body *top);
 
 typedef int (*crypt_func_send_menu_t)(HEADER *msg);
 
@@ -53,7 +53,7 @@ typedef int (*crypt_func_send_menu_t)(HEADER *msg);
 typedef void (*crypt_func_smime_getkeys_t)(ENVELOPE *env);
 typedef int (*crypt_func_smime_verify_sender_t)(HEADER *h);
 
-typedef BODY *(*crypt_func_smime_build_smime_entity_t)(BODY *a, char *certlist);
+typedef struct Body *(*crypt_func_smime_build_smime_entity_t)(struct Body *a, char *certlist);
 
 typedef void (*crypt_func_smime_invoke_import_t)(char *infile, char *mailbox);
 
index abefdb2ad2275bc7192912a399778d564eda41fc..110f68c00472e85e8aeeed02137f07f635c8bd77 100644 (file)
@@ -33,11 +33,11 @@ static int crypt_mod_pgp_valid_passphrase(void)
   return pgp_valid_passphrase();
 }
 
-static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   return pgp_decrypt_mime(a, b, c, d);
 }
-static int crypt_mod_pgp_application_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
 {
   return pgp_application_pgp_handler(m, s);
 }
@@ -47,12 +47,12 @@ static char *crypt_mod_pgp_findkeys(struct Address *adrlist, int oppenc_mode)
   return pgp_find_keys(adrlist, oppenc_mode);
 }
 
-static BODY *crypt_mod_pgp_sign_message(BODY *a)
+static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
 {
   return pgp_sign_message(a);
 }
 
-static int crypt_mod_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   return pgp_verify_one(sigbdy, s, tempf);
 }
@@ -62,27 +62,27 @@ static int crypt_mod_pgp_send_menu(HEADER *msg)
   return pgp_send_menu(msg);
 }
 
-static BODY *crypt_mod_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+static struct Body *crypt_mod_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
 {
   return pgp_encrypt_message(a, keylist, sign);
 }
 
-static BODY *crypt_mod_pgp_make_key_attachment(char *tempf)
+static struct Body *crypt_mod_pgp_make_key_attachment(char *tempf)
 {
   return pgp_make_key_attachment(tempf);
 }
 
-static int crypt_mod_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+static int crypt_mod_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 {
   return pgp_check_traditional(fp, b, tagged_only);
 }
 
-static BODY *crypt_mod_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+static struct Body *crypt_mod_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
 {
   return pgp_traditional_encryptsign(a, flags, keylist);
 }
 
-static int crypt_mod_pgp_encrypted_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
 {
   return pgp_encrypted_handler(m, s);
 }
@@ -97,7 +97,7 @@ static void crypt_mod_pgp_invoke_import(const char *fname)
   pgp_invoke_import(fname);
 }
 
-static void crypt_mod_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+static void crypt_mod_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
 {
   pgp_extract_keys_from_attachment_list(fp, tag, top);
 }
index 84a2dab81eee587c87741123ffcd0d08289d4972..b16f1be27b1ff897d0d5853ad563b1533b8b2580 100644 (file)
@@ -39,22 +39,22 @@ static int crypt_mod_pgp_valid_passphrase(void)
   return 1;
 }
 
-static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   return pgp_gpgme_decrypt_mime(a, b, c, d);
 }
 
-static int crypt_mod_pgp_application_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
 {
   return pgp_gpgme_application_handler(m, s);
 }
 
-static int crypt_mod_pgp_encrypted_handler(BODY *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
 {
   return pgp_gpgme_encrypted_handler(m, s);
 }
 
-static int crypt_mod_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+static int crypt_mod_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 {
   return pgp_gpgme_check_traditional(fp, b, tagged_only);
 }
@@ -69,12 +69,12 @@ static char *crypt_mod_pgp_findkeys(struct Address *adrlist, int oppenc_mode)
   return pgp_gpgme_findkeys(adrlist, oppenc_mode);
 }
 
-static BODY *crypt_mod_pgp_sign_message(BODY *a)
+static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
 {
   return pgp_gpgme_sign_message(a);
 }
 
-static int crypt_mod_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   return pgp_gpgme_verify_one(sigbdy, s, tempf);
 }
@@ -84,13 +84,13 @@ static int crypt_mod_pgp_send_menu(HEADER *msg)
   return pgp_gpgme_send_menu(msg);
 }
 
-static BODY *crypt_mod_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+static struct Body *crypt_mod_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
 {
   return pgp_gpgme_encrypt_message(a, keylist, sign);
 }
 
 #ifdef HAVE_GPGME_OP_EXPORT_KEYS
-static BODY *crypt_mod_pgp_make_key_attachment(char *tempf)
+static struct Body *crypt_mod_pgp_make_key_attachment(char *tempf)
 {
   return pgp_gpgme_make_key_attachment(tempf);
 }
index 627aae9fa43cf5992f0f438bd312368eb35047dc..ad2cb15bb3b551e8d143ae119b83bf09ba560f6f 100644 (file)
@@ -33,11 +33,11 @@ static int crypt_mod_smime_valid_passphrase(void)
   return smime_valid_passphrase();
 }
 
-static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   return smime_decrypt_mime(a, b, c, d);
 }
-static int crypt_mod_smime_application_handler(BODY *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
 {
   return smime_application_smime_handler(m, s);
 }
@@ -47,12 +47,12 @@ static char *crypt_mod_smime_findkeys(struct Address *adrlist, int oppenc_mode)
   return smime_find_keys(adrlist, oppenc_mode);
 }
 
-static BODY *crypt_mod_smime_sign_message(BODY *a)
+static struct Body *crypt_mod_smime_sign_message(struct Body *a)
 {
   return smime_sign_message(a);
 }
 
-static int crypt_mod_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   return smime_verify_one(sigbdy, s, tempf);
 }
@@ -72,7 +72,7 @@ static int crypt_mod_smime_verify_sender(HEADER *h)
   return smime_verify_sender(h);
 }
 
-static BODY *crypt_mod_smime_build_smime_entity(BODY *a, char *certlist)
+static struct Body *crypt_mod_smime_build_smime_entity(struct Body *a, char *certlist)
 {
   return smime_build_smime_entity(a, certlist);
 }
index 77508a1e01cbde54e01548478da742590bead4e0..6bde78dbf5c1c91990dbcb32c143fb52e3ba9c4b 100644 (file)
@@ -39,12 +39,12 @@ static int crypt_mod_smime_valid_passphrase(void)
   return 1;
 }
 
-static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   return smime_gpgme_decrypt_mime(a, b, c, d);
 }
 
-static int crypt_mod_smime_application_handler(BODY *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
 {
   return smime_gpgme_application_handler(m, s);
 }
@@ -54,12 +54,12 @@ static char *crypt_mod_smime_findkeys(struct Address *adrlist, int oppenc_mode)
   return smime_gpgme_findkeys(adrlist, oppenc_mode);
 }
 
-static BODY *crypt_mod_smime_sign_message(BODY *a)
+static struct Body *crypt_mod_smime_sign_message(struct Body *a)
 {
   return smime_gpgme_sign_message(a);
 }
 
-static int crypt_mod_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   return smime_gpgme_verify_one(sigbdy, s, tempf);
 }
@@ -69,7 +69,7 @@ static int crypt_mod_smime_send_menu(HEADER *msg)
   return smime_gpgme_send_menu(msg);
 }
 
-static BODY *crypt_mod_smime_build_smime_entity(BODY *a, char *certlist)
+static struct Body *crypt_mod_smime_build_smime_entity(struct Body *a, char *certlist)
 {
   return smime_gpgme_build_smime_entity(a, certlist);
 }
index 78d347db932426ca9cf868c3df49702c7cd52ba9..e5ee6a991a70ecef54c685081c143c713f231036 100644 (file)
@@ -133,7 +133,7 @@ int crypt_pgp_valid_passphrase(void)
 
 
 /* Decrypt a PGP/MIME message. */
-int crypt_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+int crypt_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, decrypt_mime))
     return (CRYPT_MOD_CALL(PGP, decrypt_mime))(a, b, c, d);
@@ -142,7 +142,7 @@ int crypt_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
 }
 
 /* MIME handler for the application/pgp content-type. */
-int crypt_pgp_application_pgp_handler(BODY *m, STATE *s)
+int crypt_pgp_application_pgp_handler(struct Body *m, STATE *s)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, application_handler))
     return (CRYPT_MOD_CALL(PGP, application_handler))(m, s);
@@ -151,7 +151,7 @@ int crypt_pgp_application_pgp_handler(BODY *m, STATE *s)
 }
 
 /* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(BODY *a, STATE *s)
+int crypt_pgp_encrypted_handler(struct Body *a, STATE *s)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, encrypted_handler))
     return (CRYPT_MOD_CALL(PGP, encrypted_handler))(a, s);
@@ -167,7 +167,7 @@ void crypt_pgp_invoke_getkeys(struct Address *addr)
 }
 
 /* Check for a traditional PGP message in body B. */
-int crypt_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int crypt_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, pgp_check_traditional))
     return (CRYPT_MOD_CALL(PGP, pgp_check_traditional))(fp, b, tagged_only);
@@ -176,7 +176,7 @@ int crypt_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
 }
 
 /* fixme: needs documentation. */
-BODY *crypt_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, pgp_traditional_encryptsign))
     return (CRYPT_MOD_CALL(PGP, pgp_traditional_encryptsign))(a, flags, keylist);
@@ -185,7 +185,7 @@ BODY *crypt_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
 }
 
 /* Generate a PGP public key attachment. */
-BODY *crypt_pgp_make_key_attachment(char *tempf)
+struct Body *crypt_pgp_make_key_attachment(char *tempf)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, pgp_make_key_attachment))
     return (CRYPT_MOD_CALL(PGP, pgp_make_key_attachment))(tempf);
@@ -206,7 +206,7 @@ char *crypt_pgp_findkeys(struct Address *adrlist, int oppenc_mode)
 }
 
 /* Create a new body with a PGP signed message from A. */
-BODY *crypt_pgp_sign_message(BODY *a)
+struct Body *crypt_pgp_sign_message(struct Body *a)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, sign_message))
     return (CRYPT_MOD_CALL(PGP, sign_message))(a);
@@ -216,7 +216,7 @@ BODY *crypt_pgp_sign_message(BODY *a)
 
 /* Warning: A is no longer freed in this routine, you need to free it
    later.  This is necessary for $fcc_attach. */
-BODY *crypt_pgp_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *crypt_pgp_encrypt_message(struct Body *a, char *keylist, int sign)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, pgp_encrypt_message))
     return (CRYPT_MOD_CALL(PGP, pgp_encrypt_message))(a, keylist, sign);
@@ -232,7 +232,7 @@ void crypt_pgp_invoke_import(const char *fname)
 }
 
 /* fixme: needs documentation */
-int crypt_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, verify_one))
     return (CRYPT_MOD_CALL(PGP, verify_one))(sigbdy, s, tempf);
@@ -251,7 +251,7 @@ int crypt_pgp_send_menu(HEADER *msg)
 
 
 /* fixme: needs documentation */
-void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, pgp_extract_keys_from_attachment_list))
     (CRYPT_MOD_CALL(PGP, pgp_extract_keys_from_attachment_list))(fp, tag, top);
@@ -287,7 +287,7 @@ int crypt_smime_valid_passphrase(void)
 }
 
 /* Decrypt am S/MIME message. */
-int crypt_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
+int crypt_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, decrypt_mime))
     return (CRYPT_MOD_CALL(SMIME, decrypt_mime))(a, b, c, d);
@@ -296,7 +296,7 @@ int crypt_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d)
 }
 
 /* MIME handler for the application/smime content-type. */
-int crypt_smime_application_smime_handler(BODY *m, STATE *s)
+int crypt_smime_application_smime_handler(struct Body *m, STATE *s)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, application_handler))
     return (CRYPT_MOD_CALL(SMIME, application_handler))(m, s);
@@ -305,7 +305,7 @@ int crypt_smime_application_smime_handler(BODY *m, STATE *s)
 }
 
 /* MIME handler for an PGP/MIME encrypted message. */
-void crypt_smime_encrypted_handler(BODY *a, STATE *s)
+void crypt_smime_encrypted_handler(struct Body *a, STATE *s)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, encrypted_handler))
     (CRYPT_MOD_CALL(SMIME, encrypted_handler))(a, s);
@@ -340,7 +340,7 @@ char *crypt_smime_findkeys(struct Address *adrlist, int oppenc_mode)
 }
 
 /* fixme: Needs documentation. */
-BODY *crypt_smime_sign_message(BODY *a)
+struct Body *crypt_smime_sign_message(struct Body *a)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, sign_message))
     return (CRYPT_MOD_CALL(SMIME, sign_message))(a);
@@ -349,7 +349,7 @@ BODY *crypt_smime_sign_message(BODY *a)
 }
 
 /* fixme: needs documentation. */
-BODY *crypt_smime_build_smime_entity(BODY *a, char *certlist)
+struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, smime_build_smime_entity))
     return (CRYPT_MOD_CALL(SMIME, smime_build_smime_entity))(a, certlist);
@@ -365,7 +365,7 @@ void crypt_smime_invoke_import(char *infile, char *mailbox)
 }
 
 /* fixme: needs documentation */
-int crypt_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf)
+int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, verify_one))
     return (CRYPT_MOD_CALL(SMIME, verify_one))(sigbdy, s, tempf);
index 89ec631c3469a3e6397c0ae16d0a13b21489356c..908194c2e8db8e102efe4db06af921abd839b4f7 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -37,7 +37,7 @@
 #define BUFO_SIZE 2000
 
 
-typedef int (*handler_t)(BODY *, STATE *);
+typedef int (*handler_t)(struct Body *, STATE *);
 
 // clang-format off
 const int Index_hex[128] = {
@@ -63,7 +63,7 @@ const int Index_64[128] = {
 };
 // clang-format on
 
-static void print_part_line(STATE *s, BODY *b, int n)
+static void print_part_line(STATE *s, struct Body *b, int n)
 {
   char length[5];
   mutt_pretty_size(length, sizeof(length), b->length);
@@ -811,7 +811,7 @@ static void enriched_set_flags(const wchar_t *tag, struct enriched_state *stte)
   }
 }
 
-static int text_enriched_handler(BODY *a, STATE *s)
+static int text_enriched_handler(struct Body *a, STATE *s)
 {
   enum
   {
@@ -996,7 +996,7 @@ static int is_mmnoask(const char *buf)
  *
  * 0    otherwise
  */
-static int is_autoview(BODY *b)
+static int is_autoview(struct Body *b)
 {
   char type[SHORT_STRING];
   int is_av = 0;
@@ -1040,10 +1040,10 @@ static int is_autoview(BODY *b)
 #define TXTPLAIN 2
 #define TXTENRICHED 3
 
-static int alternative_handler(BODY *a, STATE *s)
+static int alternative_handler(struct Body *a, STATE *s)
 {
-  BODY *choice = NULL;
-  BODY *b = NULL;
+  struct Body *choice = NULL;
+  struct Body *b = NULL;
   LIST *t = NULL;
   int type = 0;
   int mustfree = 0;
@@ -1218,10 +1218,10 @@ static int alternative_handler(BODY *a, STATE *s)
 }
 
 /* handles message/rfc822 body parts */
-static int message_handler(BODY *a, STATE *s)
+static int message_handler(struct Body *a, STATE *s)
 {
   struct stat st;
-  BODY *b = NULL;
+  struct Body *b = NULL;
   LOFF_T off_start;
   int rc = 0;
 
@@ -1264,7 +1264,7 @@ static int message_handler(BODY *a, STATE *s)
 }
 
 /* returns 1 if decoding the attachment will produce output */
-int mutt_can_decode(BODY *a)
+int mutt_can_decode(struct Body *a)
 {
   if (is_autoview(a))
     return 1;
@@ -1274,7 +1274,7 @@ int mutt_can_decode(BODY *a)
     return 1;
   else if (a->type == TYPEMULTIPART)
   {
-    BODY *p = NULL;
+    struct Body *p = NULL;
 
     if (WithCrypto)
     {
@@ -1300,9 +1300,9 @@ int mutt_can_decode(BODY *a)
   return 0;
 }
 
-static int multipart_handler(BODY *a, STATE *s)
+static int multipart_handler(struct Body *a, STATE *s)
 {
-  BODY *b = NULL, *p = NULL;
+  struct Body *b = NULL, *p = NULL;
   struct stat st;
   int count;
   int rc = 0;
@@ -1364,7 +1364,7 @@ static int multipart_handler(BODY *a, STATE *s)
   return rc;
 }
 
-static int autoview_handler(BODY *a, STATE *s)
+static int autoview_handler(struct Body *a, STATE *s)
 {
   rfc1524_entry *entry = rfc1524_new_entry();
   char buffer[LONG_STRING];
@@ -1495,7 +1495,7 @@ static int autoview_handler(BODY *a, STATE *s)
   return rc;
 }
 
-static int external_body_handler(BODY *b, STATE *s)
+static int external_body_handler(struct Body *b, STATE *s)
 {
   const char *access_type = NULL;
   const char *expiration = NULL;
@@ -1589,7 +1589,7 @@ static int external_body_handler(BODY *b, STATE *s)
   return 0;
 }
 
-void mutt_decode_attachment(BODY *b, STATE *s)
+void mutt_decode_attachment(struct Body *b, STATE *s)
 {
   int istext = mutt_is_text_part(b);
   iconv_t cd = (iconv_t)(-1);
@@ -1638,7 +1638,7 @@ void mutt_decode_attachment(BODY *b, STATE *s)
  * strip all trailing spaces to improve interoperability;
  * if $text_flowed is unset, simply verbatim copy input
  */
-static int text_plain_handler(BODY *b, STATE *s)
+static int text_plain_handler(struct Body *b, STATE *s)
 {
   char *buf = NULL;
   size_t l = 0, sz = 0;
@@ -1661,7 +1661,7 @@ static int text_plain_handler(BODY *b, STATE *s)
   return 0;
 }
 
-static int run_decode_and_handler(BODY *b, STATE *s, handler_t handler, int plaintext)
+static int run_decode_and_handler(struct Body *b, STATE *s, handler_t handler, int plaintext)
 {
   int origType;
   char *savePrefix = NULL;
@@ -1799,10 +1799,10 @@ static int run_decode_and_handler(BODY *b, STATE *s, handler_t handler, int plai
   return rc;
 }
 
-static int valid_pgp_encrypted_handler(BODY *b, STATE *s)
+static int valid_pgp_encrypted_handler(struct Body *b, STATE *s)
 {
   int rc;
-  BODY *octetstream = NULL;
+  struct Body *octetstream = NULL;
 
   octetstream = b->parts->next;
   rc = crypt_pgp_encrypted_handler(octetstream, s);
@@ -1811,10 +1811,10 @@ static int valid_pgp_encrypted_handler(BODY *b, STATE *s)
   return rc;
 }
 
-static int malformed_pgp_encrypted_handler(BODY *b, STATE *s)
+static int malformed_pgp_encrypted_handler(struct Body *b, STATE *s)
 {
   int rc;
-  BODY *octetstream = NULL;
+  struct Body *octetstream = NULL;
 
   octetstream = b->parts->next->next;
   /* exchange encodes the octet-stream, so re-run it through the decoder */
@@ -1824,7 +1824,7 @@ static int malformed_pgp_encrypted_handler(BODY *b, STATE *s)
   return rc;
 }
 
-int mutt_body_handler(BODY *b, STATE *s)
+int mutt_body_handler(struct Body *b, STATE *s)
 {
   if (!b || !s)
     return -1;
index bae5a170d924eb6f1af328ea60ecf289da293bfe..2c05f08db8b5243c15a55c26fde881d2f87a297a 100644 (file)
@@ -370,11 +370,11 @@ static void restore_parameter(PARAMETER **p, const unsigned char *d, int *off, i
   *p = NULL;
 }
 
-static unsigned char *dump_body(BODY *c, unsigned char *d, int *off, int convert)
+static unsigned char *dump_body(struct Body *c, unsigned char *d, int *off, int convert)
 {
-  BODY nb;
+  struct Body nb;
 
-  memcpy(&nb, c, sizeof(BODY));
+  memcpy(&nb, c, sizeof(struct Body));
 
   /* some fields are not safe to cache */
   nb.content = NULL;
@@ -384,9 +384,9 @@ static unsigned char *dump_body(BODY *c, unsigned char *d, int *off, int convert
   nb.hdr = NULL;
   nb.aptr = NULL;
 
-  lazy_realloc(&d, *off + sizeof(BODY));
-  memcpy(d + *off, &nb, sizeof(BODY));
-  *off += sizeof(BODY);
+  lazy_realloc(&d, *off + sizeof(struct Body));
+  memcpy(d + *off, &nb, sizeof(struct Body));
+  *off += sizeof(struct Body);
 
   d = dump_char(nb.xtype, d, off, 0);
   d = dump_char(nb.subtype, d, off, 0);
@@ -401,10 +401,10 @@ static unsigned char *dump_body(BODY *c, unsigned char *d, int *off, int convert
   return d;
 }
 
-static void restore_body(BODY *c, const unsigned char *d, int *off, int convert)
+static void restore_body(struct Body *c, const unsigned char *d, int *off, int convert)
 {
-  memcpy(c, d + *off, sizeof(BODY));
-  *off += sizeof(BODY);
+  memcpy(c, d + *off, sizeof(struct Body));
+  *off += sizeof(struct Body);
 
   restore_char(&c->xtype, d, off, 0);
   restore_char(&c->subtype, d, off, 0);
index 5140026e24c25b27f7b254fbc9d89c2414a772fb..5485b5d485ba03acce18ed1b8cc47441ae2459ac 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -147,8 +147,8 @@ void mutt_edit_headers(const char *editor, const char *body, HEADER *msg, char *
     }
     else if (ascii_strncasecmp("attach:", cur->data, 7) == 0)
     {
-      BODY *body2 = NULL;
-      BODY *parts = NULL;
+      struct Body *body2 = NULL;
+      struct Body *parts = NULL;
       size_t l = 0;
 
       p = skip_email_wsp(cur->data + 7);
diff --git a/main.c b/main.c
index 85cd6396b2abbabc5dd7ef8485df74d000c330a2..87253be68972b7226c62ab2bd91352533922fcf6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -647,7 +647,7 @@ int main(int argc, char **argv, char **environ)
       else
         sendflags |= SENDNOFREEHEADER;
 
-      /* Parse the draftFile into the full HEADER/BODY structure.
+      /* Parse the draftFile into the full HEADER/Body structure.
        * Set SENDDRAFTFILE so ci_send_message doesn't overwrite
        * our msg->content.
        */
@@ -719,7 +719,7 @@ int main(int argc, char **argv, char **environ)
     if (attach)
     {
       LIST *t = attach;
-      BODY *a = msg->content;
+      struct Body *a = msg->content;
 
       while (a && a->next)
         a = a->next;
diff --git a/mbox.c b/mbox.c
index b200d35cfa4d97bd451da9629b1ac6b061171d92..82ca4530302de0f38abb93e6c03424bd0cdf7a0d 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -625,7 +625,7 @@ static int strict_cmp_parameters(const PARAMETER *p1, const PARAMETER *p2)
   return 1;
 }
 
-static int strict_cmp_bodies(const BODY *b1, const BODY *b2)
+static int strict_cmp_bodies(const struct Body *b1, const struct Body *b2)
 {
   if (b1->type != b2->type || b1->encoding != b2->encoding ||
       (mutt_strcmp(b1->subtype, b2->subtype) != 0) ||
diff --git a/mutt.h b/mutt.h
index d9b84a80748334b52f9c2f2d9f00359a3f212724..511f3d59b32f4a2c81a89b783e275560b07eb98b 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -719,7 +719,7 @@ typedef struct content
   bool cr : 1;     /* has CR, even when in a CRLF pair */
 } CONTENT;
 
-typedef struct body
+struct Body
 {
   char *xtype;          /* content-type if x-unknown */
   char *subtype;        /* content-type subtype */
@@ -747,8 +747,8 @@ typedef struct body
                          * to determine what content-transfer-encoding
                          * is required when sending mail.
                          */
-  struct body *next;    /* next attachment in the list */
-  struct body *parts;   /* parts of a multipart or message/rfc822 */
+  struct Body *next;    /* next attachment in the list */
+  struct Body *parts;   /* parts of a multipart or message/rfc822 */
   struct header *hdr;   /* header information for message/rfc822 */
 
   struct AttachPtr *aptr; /* Menu information, used in recvattach.c */
@@ -794,7 +794,7 @@ typedef struct body
   bool collapsed : 1; /* used by recvattach */
   bool attach_qualifies : 1;
 
-} BODY;
+};
 
 /* #3279: AIX defines conflicting struct thread */
 typedef struct mutt_thread THREAD;
@@ -858,7 +858,7 @@ typedef struct header
   int virtual;        /* virtual message number */
   int score;
   ENVELOPE *env;      /* envelope information */
-  BODY *content;      /* list of MIME parts */
+  struct Body *content;      /* list of MIME parts */
   char *path;
 
   char *tree; /* character string to print thread tree */
index b4912b2906474174804aa3151ba6f36f38bd9a5e..b59f03705d8f6362ddeb19ee64c4998847224c3b 100644 (file)
@@ -106,23 +106,23 @@ typedef struct pgp_keyinfo *pgp_key_t;
 
 int mutt_protect(HEADER *msg, char *keylist);
 
-int mutt_is_multipart_encrypted(BODY *b);
+int mutt_is_multipart_encrypted(struct Body *b);
 
-int mutt_is_valid_multipart_pgp_encrypted(BODY *b);
+int mutt_is_valid_multipart_pgp_encrypted(struct Body *b);
 
-int mutt_is_malformed_multipart_pgp_encrypted(BODY *b);
+int mutt_is_malformed_multipart_pgp_encrypted(struct Body *b);
 
-int mutt_is_multipart_signed(BODY *b);
+int mutt_is_multipart_signed(struct Body *b);
 
-int mutt_is_application_pgp(BODY *m);
+int mutt_is_application_pgp(struct Body *m);
 
-int mutt_is_application_smime(BODY *m);
+int mutt_is_application_smime(struct Body *m);
 
-int mutt_signed_handler(BODY *a, STATE *s);
+int mutt_signed_handler(struct Body *a, STATE *s);
 
 int mutt_parse_crypt_hdr(const char *p, int set_empty_signas, int crypt_app);
 
-void convert_to_7bit(BODY *a);
+void convert_to_7bit(struct Body *a);
 
 /* -- crypt.c -- */
 
@@ -131,7 +131,7 @@ void crypt_current_time(STATE *s, char *app_name);
 
 /* Check out the type of encryption used and set the cached status
    values if there are any. */
-int crypt_query(BODY *m);
+int crypt_query(struct Body *m);
 
 /* Fixme: To be documented. */
 void crypt_extract_keys_from_messages(HEADER *h);
@@ -155,7 +155,7 @@ int crypt_valid_passphrase(int flags);
 
 /* Write the message body/part A described by state S to the given
    TEMPFILE.  */
-int crypt_write_signed(BODY *a, STATE *s, const char *tempfile);
+int crypt_write_signed(struct Body *a, STATE *s, const char *tempfile);
 
 /* Obtain pointers to fingerprint or short or long key ID, if any.
 
@@ -187,25 +187,25 @@ int crypt_pgp_valid_passphrase(void);
 
 
 /* Decrypt a PGP/MIME message. */
-int crypt_pgp_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d);
+int crypt_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d);
 
 /* MIME handler for the application/pgp content-type. */
-int crypt_pgp_application_pgp_handler(BODY *m, STATE *s);
+int crypt_pgp_application_pgp_handler(struct Body *m, STATE *s);
 
 /* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(BODY *a, STATE *s);
+int crypt_pgp_encrypted_handler(struct Body *a, STATE *s);
 
 /* fixme: needs documentation. */
 void crypt_pgp_invoke_getkeys(struct Address *addr);
 
 /* Check for a traditional PGP message in body B. */
-int crypt_pgp_check_traditional(FILE *fp, BODY *b, int tagged_only);
+int crypt_pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only);
 
 /* fixme: needs documentation. */
-BODY *crypt_pgp_traditional_encryptsign(BODY *a, int flags, char *keylist);
+struct Body *crypt_pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist);
 
 /* Generate a PGP public key attachment. */
-BODY *crypt_pgp_make_key_attachment(char *tempf);
+struct Body *crypt_pgp_make_key_attachment(char *tempf);
 
 /* This routine attempts to find the keyids of the recipients of a
    message.  It returns NULL if any of the keys can not be found.
@@ -214,11 +214,11 @@ BODY *crypt_pgp_make_key_attachment(char *tempf);
 char *crypt_pgp_findkeys(struct Address *adrlist, int oppenc_mode);
 
 /* Create a new body with a PGP signed message from A. */
-BODY *crypt_pgp_sign_message(BODY *a);
+struct Body *crypt_pgp_sign_message(struct Body *a);
 
 /* Warning: A is no longer freed in this routine, you need to free it
    later.  This is necessary for $fcc_attach. */
-BODY *crypt_pgp_encrypt_message(BODY *a, char *keylist, int sign);
+struct Body *crypt_pgp_encrypt_message(struct Body *a, char *keylist, int sign);
 
 /* Invoke the PGP command to import a key. */
 void crypt_pgp_invoke_import(const char *fname);
@@ -226,10 +226,10 @@ void crypt_pgp_invoke_import(const char *fname);
 int crypt_pgp_send_menu(HEADER *msg);
 
 /* fixme: needs documentation */
-int crypt_pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempf);
+int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
 
 /* fixme: needs documentation */
-void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top);
+void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top);
 
 void crypt_pgp_set_sender(const char *sender);
 
@@ -239,10 +239,10 @@ void crypt_smime_void_passphrase(void);
 int crypt_smime_valid_passphrase(void);
 
 /* Decrypt an S/MIME message. */
-int crypt_smime_decrypt_mime(FILE *a, FILE **b, BODY *c, BODY **d);
+int crypt_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct Body **d);
 
 /* MIME handler for the application/smime content-type. */
-int crypt_smime_application_smime_handler(BODY *m, STATE *s);
+int crypt_smime_application_smime_handler(struct Body *m, STATE *s);
 
 /* fixme: Needs documentation. */
 void crypt_smime_getkeys(ENVELOPE *env);
@@ -259,10 +259,10 @@ int crypt_smime_verify_sender(HEADER *h);
 char *crypt_smime_findkeys(struct Address *adrlist, int oppenc_mode);
 
 /* fixme: Needs documentation. */
-BODY *crypt_smime_sign_message(BODY *a);
+struct Body *crypt_smime_sign_message(struct Body *a);
 
 /* fixme: needs documentation. */
-BODY *crypt_smime_build_smime_entity(BODY *a, char *certlist);
+struct Body *crypt_smime_build_smime_entity(struct Body *a, char *certlist);
 
 /* Add a certificate and update index file (externally). */
 void crypt_smime_invoke_import(char *infile, char *mailbox);
@@ -272,7 +272,7 @@ int crypt_smime_send_menu(HEADER *msg);
 void crypt_smime_set_sender(const char *sender);
 
 /* fixme: needs documentation */
-int crypt_smime_verify_one(BODY *sigbdy, STATE *s, const char *tempf);
+int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
 
 void crypt_init(void);
 
index 47d0ec2923a0995633397c7061e016366799f7c8..06aa80b0eb25c4edc9f56faf8f48abfc42f99713 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -56,9 +56,9 @@ static const char *xdg_defaults[] = {
       [kXDGConfigHome] = "~/.config", [kXDGConfigDirs] = "/etc/xdg",
 };
 
-BODY *mutt_new_body(void)
+struct Body *mutt_new_body(void)
 {
-  BODY *p = safe_calloc(1, sizeof(BODY));
+  struct Body *p = safe_calloc(1, sizeof(struct Body));
 
   p->disposition = DISPATTACH;
   p->use_disp = true;
@@ -100,13 +100,13 @@ void mutt_adv_mktemp(char *s, size_t l)
 }
 
 /* create a send-mode duplicate from a receive-mode body */
-int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src)
+int mutt_copy_body(FILE *fp, struct Body **tgt, struct Body *src)
 {
   if (!tgt || !src)
     return -1;
 
   char tmp[_POSIX_PATH_MAX];
-  BODY *b = NULL;
+  struct Body *b = NULL;
 
   PARAMETER *par = NULL, **ppar = NULL;
 
@@ -130,7 +130,7 @@ int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src)
   *tgt = mutt_new_body();
   b = *tgt;
 
-  memcpy(b, src, sizeof(BODY));
+  memcpy(b, src, sizeof(struct Body));
   b->parts = NULL;
   b->next = NULL;
 
@@ -173,9 +173,9 @@ int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src)
 }
 
 
-void mutt_free_body(BODY **p)
+void mutt_free_body(struct Body **p)
 {
-  BODY *a = *p, *b = NULL;
+  struct Body *a = *p, *b = NULL;
 
   while (a)
   {
@@ -687,7 +687,7 @@ void mutt_delete_parameter(const char *attribute, PARAMETER **p)
 }
 
 /* returns 1 if Mutt can't display this type of data, 0 otherwise */
-bool mutt_needs_mailcap(BODY *m)
+bool mutt_needs_mailcap(struct Body *m)
 {
   switch (m->type)
   {
@@ -710,7 +710,7 @@ bool mutt_needs_mailcap(BODY *m)
   return true;
 }
 
-bool mutt_is_text_part(BODY *b)
+bool mutt_is_text_part(struct Body *b)
 {
   int t = b->type;
   char *s = b->subtype;
diff --git a/pager.h b/pager.h
index 6dcba9ffa15112e2e952e62a940b3eb49341dceb..92259db63ec4786dc1deca2b754e0d5ab1797748 100644 (file)
--- a/pager.h
+++ b/pager.h
@@ -42,7 +42,7 @@ typedef struct
 {
   CONTEXT *ctx;    /* current mailbox */
   HEADER *hdr;     /* current message */
-  BODY *bdy;       /* current attachment */
+  struct Body *bdy;       /* current attachment */
   FILE *fp;        /* source stream */
   struct AttachPtr **idx; /* attachment information */
   short idxlen;
diff --git a/parse.c b/parse.c
index 9abfa47b3e8f3563acadfca4d0042a1bf8e668d1..54faababe2b8c62722d1fce06dc99533f3d2aeea 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -285,7 +285,7 @@ int mutt_check_mime_type(const char *s)
     return TYPEOTHER;
 }
 
-void mutt_parse_content_type(char *s, BODY *ct)
+void mutt_parse_content_type(char *s, struct Body *ct)
 {
   char *pc = NULL;
   char *subtype = NULL;
@@ -340,7 +340,7 @@ void mutt_parse_content_type(char *s, BODY *ct)
   if (ct->subtype == NULL)
   {
     /* Some older non-MIME mailers (i.e., mailtool, elm) have a content-type
-     * field, so we can attempt to convert the type to BODY here.
+     * field, so we can attempt to convert the type to Body here.
      */
     if (ct->type == TYPETEXT)
       ct->subtype = safe_strdup("plain");
@@ -371,7 +371,7 @@ void mutt_parse_content_type(char *s, BODY *ct)
   }
 }
 
-static void parse_content_disposition(const char *s, BODY *ct)
+static void parse_content_disposition(const char *s, struct Body *ct)
 {
   PARAMETER *parms = NULL;
 
@@ -400,9 +400,9 @@ static void parse_content_disposition(const char *s, BODY *ct)
  *      digest  1 if reading subparts of a multipart/digest, 0
  *              otherwise
  */
-BODY *mutt_read_mime_header(FILE *fp, int digest)
+struct Body *mutt_read_mime_header(FILE *fp, int digest)
 {
-  BODY *p = mutt_new_body();
+  struct Body *p = mutt_new_body();
   char *c = NULL;
   char *line = safe_malloc(LONG_STRING);
   size_t linelen = LONG_STRING;
@@ -475,7 +475,7 @@ BODY *mutt_read_mime_header(FILE *fp, int digest)
   return p;
 }
 
-void mutt_parse_part(FILE *fp, BODY *b)
+void mutt_parse_part(FILE *fp, struct Body *b)
 {
   char *bound = NULL;
 
@@ -529,9 +529,9 @@ void mutt_parse_part(FILE *fp, BODY *b)
  *
  * NOTE: this assumes that `parent->length' has been set!
  */
-BODY *mutt_parse_message_rfc822(FILE *fp, BODY *parent)
+struct Body *mutt_parse_message_rfc822(FILE *fp, struct Body *parent)
 {
-  BODY *msg = NULL;
+  struct Body *msg = NULL;
 
   parent->hdr = mutt_new_header();
   parent->hdr->offset = ftello(fp);
@@ -563,14 +563,14 @@ BODY *mutt_parse_message_rfc822(FILE *fp, BODY *parent)
  *
  *      digest          1 if reading a multipart/digest, 0 otherwise
  */
-BODY *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest)
+struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest)
 {
 #ifdef SUN_ATTACHMENT
   int lines;
 #endif
   int blen, len, crlf = 0;
   char buffer[LONG_STRING];
-  BODY *head = NULL, *last = NULL, *new = NULL;
+  struct Body *head = NULL, *last = NULL, *new = NULL;
   int i;
   int final = 0; /* did we see the ending boundary? */
 
@@ -1538,7 +1538,7 @@ struct Address *mutt_parse_adrlist(struct Address *p, const char *s)
 }
 
 /* Compares mime types to the ok and except lists */
-static bool count_body_parts_check(LIST **checklist, BODY *b, bool dflt)
+static bool count_body_parts_check(LIST **checklist, struct Body *b, bool dflt)
 {
   LIST *type = NULL;
   ATTACH_MATCH *a = NULL;
@@ -1579,11 +1579,11 @@ static bool count_body_parts_check(LIST **checklist, BODY *b, bool dflt)
     shallcount = false;                                                        \
   }
 
-static int count_body_parts(BODY *body, int flags)
+static int count_body_parts(struct Body *body, int flags)
 {
   int count = 0;
   bool shallcount, shallrecurse;
-  BODY *bp = NULL;
+  struct Body *bp = NULL;
 
   if (body == NULL)
     return 0;
index 51a2a62a29e8dfeb81c6215190946af22b2871a3..f0d4132421e8c87c54a2ad20eeeb059f01bdee90 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1753,7 +1753,7 @@ bool mutt_limit_current_thread(HEADER *h)
 
     if (top_of_thread(Context->hdrs[i]) == me)
     {
-      BODY *body = Context->hdrs[i]->content;
+      struct Body *body = Context->hdrs[i]->content;
 
       Context->hdrs[i]->virtual = Context->vcount;
       Context->hdrs[i]->limited = true;
diff --git a/pgp.c b/pgp.c
index 81e0fa6d7976bb7a62e9ae10187b229437293722..147b502943b48b0ba4fe709d8f5529b2d8206cb6 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -297,7 +297,7 @@ static void pgp_copy_clearsigned(FILE *fpin, STATE *s, char *charset)
 
 
 /* Support for the Application/PGP Content Type. */
-int pgp_application_pgp_handler(BODY *m, STATE *s)
+int pgp_application_pgp_handler(struct Body *m, STATE *s)
 {
   int could_not_decrypt = 0;
   int needpass = -1, pgp_keyblock = 0;
@@ -588,7 +588,7 @@ out:
   return rc;
 }
 
-static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
+static int pgp_check_traditional_one_body(FILE *fp, struct Body *b, int tagged_only)
 {
   char tempfile[_POSIX_PATH_MAX];
   char buf[HUGE_STRING];
@@ -648,7 +648,7 @@ static int pgp_check_traditional_one_body(FILE *fp, BODY *b, int tagged_only)
   return 1;
 }
 
-int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
+int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 {
   int rv = 0;
   int r;
@@ -669,7 +669,7 @@ int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only)
 }
 
 
-int pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
 {
   char sigfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
   FILE *fp = NULL, *pgpout = NULL, *pgperr = NULL;
@@ -733,7 +733,7 @@ int pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
 
 
 /* Extract pgp public keys from messages or attachments */
-static void pgp_extract_keys_from_attachment(FILE *fp, BODY *top)
+static void pgp_extract_keys_from_attachment(FILE *fp, struct Body *top)
 {
   STATE s;
   FILE *tempfp = NULL;
@@ -761,7 +761,7 @@ static void pgp_extract_keys_from_attachment(FILE *fp, BODY *top)
   mutt_unlink(tempfname);
 }
 
-void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
+void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
 {
   if (!fp)
   {
@@ -784,7 +784,7 @@ void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top)
   unset_option(OPTDONTHANDLEPGPKEYS);
 }
 
-static BODY *pgp_decrypt_part(BODY *a, STATE *s, FILE *fpout, BODY *p)
+static struct Body *pgp_decrypt_part(struct Body *a, STATE *s, FILE *fpout, struct Body *p)
 {
   if (!a || !s || !fpout || !p)
     return NULL;
@@ -792,7 +792,7 @@ static BODY *pgp_decrypt_part(BODY *a, STATE *s, FILE *fpout, BODY *p)
   char buf[LONG_STRING];
   FILE *pgpin = NULL, *pgpout = NULL, *pgperr = NULL, *pgptmp = NULL;
   struct stat info;
-  BODY *tattach = NULL;
+  struct Body *tattach = NULL;
   int len;
   char pgperrfile[_POSIX_PATH_MAX];
   char pgptmpfile[_POSIX_PATH_MAX];
@@ -908,11 +908,11 @@ static BODY *pgp_decrypt_part(BODY *a, STATE *s, FILE *fpout, BODY *p)
   return tattach;
 }
 
-int pgp_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
   STATE s;
-  BODY *p = b;
+  struct Body *p = b;
   int need_decode = 0;
   int saved_type;
   LOFF_T saved_offset;
@@ -989,11 +989,11 @@ bail:
  * This handler is passed the application/octet-stream directly.
  * The caller must propagate a->goodsig to its parent.
  */
-int pgp_encrypted_handler(BODY *a, STATE *s)
+int pgp_encrypted_handler(struct Body *a, STATE *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL, *fpin = NULL;
-  BODY *tattach = NULL;
+  struct Body *tattach = NULL;
   int rc = 0;
 
   mutt_mktemp(tempfile, sizeof(tempfile));
@@ -1058,9 +1058,9 @@ int pgp_encrypted_handler(BODY *a, STATE *s)
  */
 
 
-BODY *pgp_sign_message(BODY *a)
+struct Body *pgp_sign_message(struct Body *a)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
   char buffer[LONG_STRING];
   char sigfile[_POSIX_PATH_MAX], signedfile[_POSIX_PATH_MAX];
   FILE *pgpin = NULL, *pgpout = NULL, *pgperr = NULL, *fp = NULL, *sfp = NULL;
@@ -1301,13 +1301,13 @@ char *pgp_find_keys(struct Address *adrlist, int oppenc_mode)
 
 /* Warning: "a" is no longer freed in this routine, you need
  * to free it later.  This is necessary for $fcc_attach. */
-BODY *pgp_encrypt_message(BODY *a, char *keylist, int sign)
+struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign)
 {
   char buf[LONG_STRING];
   char tempfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
   char pgpinfile[_POSIX_PATH_MAX];
   FILE *pgpin = NULL, *pgperr = NULL, *fpout = NULL, *fptmp = NULL;
-  BODY *t = NULL;
+  struct Body *t = NULL;
   int err = 0;
   int empty = 0;
   pid_t thepid;
@@ -1425,9 +1425,9 @@ BODY *pgp_encrypt_message(BODY *a, char *keylist, int sign)
   return t;
 }
 
-BODY *pgp_traditional_encryptsign(BODY *a, int flags, char *keylist)
+struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist)
 {
-  BODY *b = NULL;
+  struct Body *b = NULL;
 
   char pgpoutfile[_POSIX_PATH_MAX];
   char pgperrfile[_POSIX_PATH_MAX];
diff --git a/pgp.h b/pgp.h
index 722a7f433da99864abd3c20aa8beba2db5dacdf5..f2a25712b94094342ec8a4e490b1e9367541f65d 100644 (file)
--- a/pgp.h
+++ b/pgp.h
@@ -30,8 +30,8 @@
 
 bool pgp_use_gpg_agent(void);
 
-int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only);
-BODY *pgp_make_key_attachment(char *tempf);
+int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only);
+struct Body *pgp_make_key_attachment(char *tempf);
 const char *pgp_micalg(const char *fname);
 
 char *_pgp_keyid(pgp_key_t);
@@ -40,7 +40,7 @@ char *pgp_short_keyid(pgp_key_t k);
 char *pgp_long_keyid(pgp_key_t k);
 char *pgp_fpr_or_lkeyid(pgp_key_t k);
 
-int pgp_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
+int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
 
 pgp_key_t pgp_ask_for_key(char *tag, char *whatfor, short abilities, pgp_ring_t keyring);
 pgp_key_t pgp_get_candidates(pgp_ring_t keyring, LIST *hints);
@@ -49,9 +49,9 @@ pgp_key_t pgp_getkeybystr(char *p, short abilities, pgp_ring_t keyring);
 
 char *pgp_find_keys(struct Address *adrlist, int oppenc_mode);
 
-int pgp_application_pgp_handler(BODY *m, STATE *s);
-int pgp_encrypted_handler(BODY *a, STATE *s);
-void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, BODY *top);
+int pgp_application_pgp_handler(struct Body *m, STATE *s);
+int pgp_encrypted_handler(struct Body *a, STATE *s);
+void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top);
 void pgp_void_passphrase(void);
 int pgp_valid_passphrase(void);
 
@@ -85,10 +85,10 @@ void pgp_invoke_getkeys(struct Address *addr);
 
 
 /* private ? */
-int pgp_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
-BODY *pgp_traditional_encryptsign(BODY *a, int flags, char *keylist);
-BODY *pgp_encrypt_message(BODY *a, char *keylist, int sign);
-BODY *pgp_sign_message(BODY *a);
+int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylist);
+struct Body *pgp_encrypt_message(struct Body *a, char *keylist, int sign);
+struct Body *pgp_sign_message(struct Body *a);
 
 int pgp_send_menu(HEADER *msg);
 
index 0c26be89d74a2390064df27aeff837cca5230d7b..615375702aad7b477034172c2786a670845a7c58 100644 (file)
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -680,9 +680,9 @@ pgp_key_t pgp_ask_for_key(char *tag, char *whatfor, short abilities, pgp_ring_t
 }
 
 /* generate a public key attachment */
-BODY *pgp_make_key_attachment(char *tempf)
+struct Body *pgp_make_key_attachment(char *tempf)
 {
-  BODY *att = NULL;
+  struct Body *att = NULL;
   char buff[LONG_STRING];
   char tempfb[_POSIX_PATH_MAX], tmp[STRING];
   FILE *tempfp = NULL;
index 082ef5992620463c4b978cb4c967e90a7857eb89..2925e820ce2a0b66bb85cd1891290a6264c12938 100644 (file)
@@ -546,7 +546,7 @@ int mutt_prepare_template(FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr, s
 {
   MESSAGE *msg = NULL;
   char file[_POSIX_PATH_MAX];
-  BODY *b = NULL;
+  struct Body *b = NULL;
   FILE *bfp = NULL;
   int rv = -1;
   STATE s;
index 9f84f94a01a3ebad0bdea9ef22bfce0afe718d6b..ba6d2af7ec1258bacbff6e0b54274cbc91842290 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -74,7 +74,7 @@ void mutt_FormatString(char *dest,         /* output buffer */
                        unsigned long data, /* callback data */
                        format_flag flags); /* callback flags */
 
-void mutt_parse_content_type(char *s, BODY *ct);
+void mutt_parse_content_type(char *s, struct Body *ct);
 void mutt_generate_boundary(PARAMETER **parm);
 void mutt_delete_parameter(const char *attribute, PARAMETER **p);
 void mutt_set_parameter(const char *attribute, const char *value, PARAMETER **p);
@@ -100,16 +100,16 @@ struct Address *mutt_remove_xrefs(struct Address *a, struct Address *b);
 struct Address *mutt_expand_aliases(struct Address *a);
 struct Address *mutt_parse_adrlist(struct Address *p, const char *s);
 
-BODY *mutt_make_file_attach(const char *path);
-BODY *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg);
-BODY *mutt_remove_multipart(BODY *b);
-BODY *mutt_make_multipart(BODY *b);
-BODY *mutt_new_body(void);
-BODY *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest);
-BODY *mutt_parse_message_rfc822(FILE *fp, BODY *parent);
-BODY *mutt_read_mime_header(FILE *fp, int digest);
+struct Body *mutt_make_file_attach(const char *path);
+struct Body *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg);
+struct Body *mutt_remove_multipart(struct Body *b);
+struct Body *mutt_make_multipart(struct Body *b);
+struct Body *mutt_new_body(void);
+struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, int digest);
+struct Body *mutt_parse_message_rfc822(FILE *fp, struct Body *parent);
+struct Body *mutt_read_mime_header(FILE *fp, int digest);
 
-CONTENT *mutt_get_content_info(const char *fname, BODY *b);
+CONTENT *mutt_get_content_info(const char *fname, struct Body *b);
 
 HASH *mutt_make_id_hash(CONTEXT *ctx);
 
@@ -136,7 +136,7 @@ char *mutt_expand_path(char *s, size_t slen);
 char *_mutt_expand_path(char *s, size_t slen, int rx);
 char *mutt_find_hook(int type, const char *pat);
 char *mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw);
-char *mutt_get_body_charset(char *d, size_t dlen, BODY *b);
+char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b);
 const char *mutt_get_name(struct Address *a);
 char *mutt_get_parameter(const char *s, PARAMETER *p);
 LIST *mutt_crypt_hook(struct Address *adr);
@@ -159,10 +159,10 @@ void mutt_add_to_reference_headers(ENVELOPE *env, ENVELOPE *curenv, LIST ***pp,
 void mutt_adv_mktemp(char *s, size_t l);
 void mutt_alias_menu(char *buf, size_t buflen, struct Alias *aliases);
 void mutt_allow_interrupt(int disposition);
-void mutt_attach_init(BODY *b);
+void mutt_attach_init(struct Body *b);
 void mutt_block_signals(void);
 void mutt_block_signals_system(void);
-int mutt_body_handler(BODY *b, STATE *s);
+int mutt_body_handler(struct Body *b, STATE *s);
 int mutt_bounce_message(FILE *fp, HEADER *h, struct Address *to);
 void mutt_break_thread(HEADER *hdr);
 void mutt_buffy(char *s, size_t slen);
@@ -173,12 +173,12 @@ void mutt_check_rescore(CONTEXT *ctx);
 void mutt_clear_error(void);
 void mutt_clear_pager_position(void);
 void mutt_create_alias(ENVELOPE *cur, struct Address *iadr);
-void mutt_decode_attachment(BODY *b, STATE *s);
+void mutt_decode_attachment(struct Body *b, STATE *s);
 void mutt_decode_base64(STATE *s, long len, int istext, iconv_t cd);
 void mutt_default_save(char *path, size_t pathlen, HEADER *hdr);
 void mutt_display_address(ENVELOPE *env);
 void mutt_draw_statusline(int cols, const char *buf, int buflen);
-void mutt_edit_content_type(HEADER *h, BODY *b, FILE *fp);
+void mutt_edit_content_type(HEADER *h, struct Body *b, FILE *fp);
 void mutt_edit_file(const char *editor, const char *data);
 void mutt_edit_headers(const char *editor, const char *body, HEADER *msg,
                        char *fcc, size_t fcclen);
@@ -192,7 +192,7 @@ void mutt_label_hash_remove(CONTEXT *ctx, HEADER *hdr);
 int mutt_label_complete(char *buffer, size_t len, int numtabs);
 void mutt_curses_error(const char *fmt, ...);
 void mutt_curses_message(const char *fmt, ...);
-void mutt_encode_descriptions(BODY *b, short recurse);
+void mutt_encode_descriptions(struct Body *b, short recurse);
 void mutt_encode_path(char *dest, size_t dlen, const char *src);
 void mutt_enter_command(void);
 void mutt_expand_aliases_env(ENVELOPE *env);
@@ -207,7 +207,7 @@ void mutt_format_s_tree(char *dest, size_t destlen, const char *prefix, const ch
 void mutt_forward_intro(FILE *fp, HEADER *cur);
 void mutt_forward_trailer(FILE *fp);
 void mutt_free_alias(struct Alias **p);
-void mutt_free_body(BODY **p);
+void mutt_free_body(struct Body **p);
 void mutt_free_color(int fg, int bg);
 void mutt_free_enter_state(ENTER_STATE **esp);
 void mutt_free_envelope(ENVELOPE **p);
@@ -216,14 +216,14 @@ void mutt_free_parameter(PARAMETER **p);
 void mutt_free_regexp(REGEXP **pp);
 void mutt_help(int menu);
 void mutt_draw_tree(CONTEXT *ctx);
-void mutt_check_lookup_list(BODY *b, char *type, int len);
+void mutt_check_lookup_list(struct Body *b, char *type, int len);
 void mutt_make_attribution(CONTEXT *ctx, HEADER *cur, FILE *out);
 void mutt_make_forward_subject(ENVELOPE *env, CONTEXT *ctx, HEADER *cur);
 void mutt_make_help(char *d, size_t dlen, const char *txt, int menu, int op);
 void mutt_make_misc_reply_headers(ENVELOPE *env, CONTEXT *ctx, HEADER *cur, ENVELOPE *curenv);
 void mutt_make_post_indent(CONTEXT *ctx, HEADER *cur, FILE *out);
 void mutt_merge_envelopes(ENVELOPE *base, ENVELOPE **extra);
-void mutt_message_to_7bit(BODY *a, FILE *fp);
+void mutt_message_to_7bit(struct Body *a, FILE *fp);
 #define mutt_mktemp(a, b) mutt_mktemp_pfx_sfx(a, b, "mutt", NULL)
 #define mutt_mktemp_pfx_sfx(a, b, c, d) _mutt_mktemp(a, b, c, d, __FILE__, __LINE__)
 void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
@@ -231,7 +231,7 @@ void _mutt_mktemp(char *s, size_t slen, const char *prefix, const char *suffix,
 void mutt_normalize_time(struct tm *tm);
 void mutt_paddstr(int n, const char *s);
 void mutt_parse_mime_message(CONTEXT *ctx, HEADER *cur);
-void mutt_parse_part(FILE *fp, BODY *b);
+void mutt_parse_part(FILE *fp, struct Body *b);
 void mutt_perror(const char *s);
 void mutt_prepare_envelope(ENVELOPE *env, int final);
 void mutt_unprepare_envelope(ENVELOPE *env);
@@ -254,12 +254,12 @@ void mutt_set_followup_to(ENVELOPE *e);
 void mutt_shell_escape(void);
 void mutt_show_error(void);
 void mutt_signal_init(void);
-void mutt_stamp_attachment(BODY *a);
+void mutt_stamp_attachment(struct Body *a);
 void mutt_tag_set_flag(int flag, int bf);
 bool mutt_ts_capability(void);
 void mutt_unblock_signals(void);
 void mutt_unblock_signals_system(int catch);
-void mutt_update_encoding(BODY *a);
+void mutt_update_encoding(struct Body *a);
 void mutt_version(void);
 void mutt_view_attachments(HEADER *hdr);
 void mutt_write_address_list(struct Address *adr, FILE *fp, int linelen, int display);
@@ -276,7 +276,7 @@ char *mutt_apply_replace(char *dbuf, size_t dlen, char *sbuf, REPLACE_LIST *rlis
 int mutt_buffy_check(int force);
 int mutt_buffy_notify(void);
 int mutt_builtin_editor(const char *path, HEADER *msg, HEADER *cur);
-int mutt_can_decode(BODY *a);
+int mutt_can_decode(struct Body *a);
 int mutt_change_flag(HEADER *h, int bf);
 int mutt_check_encoding(const char *c);
 
@@ -292,12 +292,12 @@ bool mutt_nm_query_complete(char *buffer, size_t len, int pos, int numtabs);
 bool mutt_nm_tag_complete(char *buffer, size_t len, int pos, int numtabs);
 #endif
 int mutt_complete(char *s, size_t slen);
-int mutt_compose_attachment(BODY *a);
-int mutt_copy_body(FILE *fp, BODY **tgt, BODY *src);
-int mutt_decode_save_attachment(FILE *fp, BODY *m, char *path, int displaying, int flags);
+int mutt_compose_attachment(struct Body *a);
+int mutt_copy_body(FILE *fp, struct Body **tgt, struct Body *src);
+int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displaying, int flags);
 int mutt_display_message(HEADER *cur);
 int mutt_dump_variables(int hide_sensitive);
-int mutt_edit_attachment(BODY *a);
+int mutt_edit_attachment(struct Body *a);
 int mutt_edit_message(CONTEXT *ctx, HEADER *hdr);
 int mutt_fetch_recips(ENVELOPE *out, ENVELOPE *in, int flags);
 int mutt_chscmp(const char *s, const char *chs);
@@ -322,7 +322,7 @@ int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags);
 #define mutt_get_password(A, B, C) mutt_get_field_unbuffered(A, B, C, MUTT_PASS)
 
 int mutt_get_postponed(CONTEXT *ctx, HEADER *hdr, HEADER **cur, char *fcc, size_t fcclen);
-int mutt_get_tmp_attachment(BODY *a);
+int mutt_get_tmp_attachment(struct Body *a);
 int mutt_index_menu(void);
 int mutt_invoke_sendmail(struct Address *from, struct Address *to, struct Address *cc, struct Address *bcc,
                          const char *msg, int eightbit);
@@ -331,14 +331,14 @@ bool mutt_is_message_type(int type, const char *subtype);
 int mutt_is_list_cc(int alladdr, struct Address *a1, struct Address *a2);
 int mutt_is_list_recipient(int alladdr, struct Address *a1, struct Address *a2);
 bool mutt_is_subscribed_list(struct Address *addr);
-bool mutt_is_text_part(BODY *b);
+bool mutt_is_text_part(struct Body *b);
 int mutt_link_threads(HEADER *cur, HEADER *last, CONTEXT *ctx);
-int mutt_lookup_mime_type(BODY *att, const char *path);
+int mutt_lookup_mime_type(struct Body *att, const char *path);
 bool mutt_match_rx_list(const char *s, RX_LIST *l);
 bool mutt_match_spam_list(const char *s, REPLACE_LIST *l, char *text, int textsize);
 int mutt_messages_in_thread(CONTEXT *ctx, HEADER *hdr, int flag);
 int mutt_multi_choice(char *prompt, char *letters);
-bool mutt_needs_mailcap(BODY *m);
+bool mutt_needs_mailcap(struct Body *m);
 int mutt_num_postponed(int force);
 int mutt_parse_bind(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
 int mutt_parse_exec(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
@@ -357,11 +357,11 @@ int mutt_parse_score(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
 int mutt_parse_unscore(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
 int mutt_parse_unhook(BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err);
 int mutt_pattern_func(int op, char *prompt);
-int mutt_pipe_attachment(FILE *fp, BODY *b, const char *path, char *outfile);
-int mutt_print_attachment(FILE *fp, BODY *a);
+int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile);
+int mutt_print_attachment(FILE *fp, struct Body *a);
 int mutt_query_complete(char *buf, size_t buflen);
 int mutt_query_variables(LIST *queries);
-int mutt_save_attachment(FILE *fp, BODY *m, char *path, int flags, HEADER *hdr);
+int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, HEADER *hdr);
 int _mutt_save_message(HEADER *h, CONTEXT *ctx, int delete, int decode, int decrypt);
 int mutt_save_message(HEADER *h, int delete, int decode, int decrypt);
 int mutt_search_command(int cur, int op);
@@ -381,11 +381,11 @@ int mutt_write_fcc(const char *path, HEADER *hdr, const char *msgid, int post,
                    char *fcc, char **finalpath);
 int mutt_write_multiple_fcc(const char *path, HEADER *hdr, const char *msgid,
                             int post, char *fcc, char **finalpath);
-int mutt_write_mime_body(BODY *a, FILE *f);
-int mutt_write_mime_header(BODY *a, FILE *f);
+int mutt_write_mime_body(struct Body *a, FILE *f);
+int mutt_write_mime_header(struct Body *a, FILE *f);
 int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
                           const char *pfx, int wraplen, int flags);
-int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, BODY *attach, int mode, int privacy);
+int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, struct Body *attach, int mode, int privacy);
 void mutt_write_references(LIST *r, FILE *f, int trim);
 int mutt_yesorno(const char *msg, int def);
 void mutt_set_header_color(CONTEXT *ctx, HEADER *curhdr);
index 8a0d045251851b7ca3a23364f7207e5d0cd92306..1d475339165c76b3f4bc24048219c3d80e95d383 100644 (file)
@@ -91,7 +91,7 @@ void mutt_update_tree(struct AttachPtr **idx, short idxlen)
   }
 }
 
-struct AttachPtr **mutt_gen_attach_list(BODY *m, int parent_type, struct AttachPtr **idx,
+struct AttachPtr **mutt_gen_attach_list(struct Body *m, int parent_type, struct AttachPtr **idx,
                                  short *idxlen, short *idxmax, int level, int compose)
 {
   struct AttachPtr *new = NULL;
@@ -376,7 +376,7 @@ static void attach_entry(char *b, size_t blen, MUTTMENU *menu, int num)
 
 int mutt_tag_attach(MUTTMENU *menu, int n, int m)
 {
-  BODY *cur = ((struct AttachPtr **) menu->data)[n]->content;
+  struct Body *cur = ((struct AttachPtr **) menu->data)[n]->content;
   bool ot = cur->tagged;
 
   cur->tagged = (m >= 0 ? m : !cur->tagged);
@@ -411,7 +411,7 @@ static void prepend_curdir(char *dst, size_t dstlen)
   dst[l + 2] = 0;
 }
 
-static int query_save_attachment(FILE *fp, BODY *body, HEADER *hdr, char **directory)
+static int query_save_attachment(FILE *fp, struct Body *body, HEADER *hdr, char **directory)
 {
   char *prompt = NULL;
   char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
@@ -492,7 +492,7 @@ static int query_save_attachment(FILE *fp, BODY *body, HEADER *hdr, char **direc
   return 0;
 }
 
-void mutt_save_attachment_list(FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTMENU *menu)
+void mutt_save_attachment_list(FILE *fp, int tag, struct Body *top, HEADER *hdr, MUTTMENU *menu)
 {
   char buf[_POSIX_PATH_MAX], tfile[_POSIX_PATH_MAX];
   char *directory = NULL;
@@ -573,7 +573,7 @@ void mutt_save_attachment_list(FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTME
     mutt_message(_("Attachment saved."));
 }
 
-static void query_pipe_attachment(char *command, FILE *fp, BODY *body, int filter)
+static void query_pipe_attachment(char *command, FILE *fp, struct Body *body, int filter)
 {
   char tfile[_POSIX_PATH_MAX];
   char warning[STRING + _POSIX_PATH_MAX];
@@ -609,7 +609,7 @@ static void query_pipe_attachment(char *command, FILE *fp, BODY *body, int filte
   }
 }
 
-static void pipe_attachment(FILE *fp, BODY *b, STATE *state)
+static void pipe_attachment(FILE *fp, struct Body *b, STATE *state)
 {
   FILE *ifp = NULL;
 
@@ -634,7 +634,7 @@ static void pipe_attachment(FILE *fp, BODY *b, STATE *state)
   }
 }
 
-static void pipe_attachment_list(char *command, FILE *fp, int tag, BODY *top,
+static void pipe_attachment_list(char *command, FILE *fp, int tag, struct Body *top,
                                  int filter, STATE *state)
 {
   for (; top; top = top->next)
@@ -653,7 +653,7 @@ static void pipe_attachment_list(char *command, FILE *fp, int tag, BODY *top,
   }
 }
 
-void mutt_pipe_attachment_list(FILE *fp, int tag, BODY *top, int filter)
+void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter)
 {
   STATE state;
   char buf[SHORT_STRING];
@@ -687,7 +687,7 @@ void mutt_pipe_attachment_list(FILE *fp, int tag, BODY *top, int filter)
     pipe_attachment_list(buf, fp, tag, top, filter, &state);
 }
 
-static int can_print(BODY *top, int tag)
+static int can_print(struct Body *top, int tag)
 {
   char type[STRING];
 
@@ -717,7 +717,7 @@ static int can_print(BODY *top, int tag)
   return 1;
 }
 
-static void print_attachment_list(FILE *fp, int tag, BODY *top, STATE *state)
+static void print_attachment_list(FILE *fp, int tag, struct Body *top, STATE *state)
 {
   char type[STRING];
 
@@ -763,7 +763,7 @@ static void print_attachment_list(FILE *fp, int tag, BODY *top, STATE *state)
   }
 }
 
-void mutt_print_attachment_list(FILE *fp, int tag, BODY *top)
+void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
 {
   STATE state;
 
@@ -788,7 +788,7 @@ void mutt_print_attachment_list(FILE *fp, int tag, BODY *top)
     print_attachment_list(fp, tag, top, &state);
 }
 
-static void update_attach_index(BODY *cur, struct AttachPtr ***idxp, short *idxlen,
+static void update_attach_index(struct Body *cur, struct AttachPtr ***idxp, short *idxlen,
                                 short *idxmax, MUTTMENU *menu)
 {
   struct AttachPtr **idx = *idxp;
@@ -808,7 +808,7 @@ static void update_attach_index(BODY *cur, struct AttachPtr ***idxp, short *idxl
 }
 
 
-int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY *cur,
+int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, struct Body *cur,
                              struct AttachPtr ***idxp, short *idxlen, short *idxmax, int recv)
 {
   struct AttachPtr **idx = *idxp;
@@ -877,7 +877,7 @@ int mutt_attach_display_loop(MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, BODY
   return op;
 }
 
-static void attach_collapse(BODY *b, short collapse, short init, short just_one)
+static void attach_collapse(struct Body *b, short collapse, short init, short just_one)
 {
   short i;
   for (; b; b = b->next)
@@ -894,7 +894,7 @@ static void attach_collapse(BODY *b, short collapse, short init, short just_one)
   }
 }
 
-void mutt_attach_init(BODY *b)
+void mutt_attach_init(struct Body *b)
 {
   for (; b; b = b->next)
   {
@@ -924,7 +924,7 @@ void mutt_view_attachments(HEADER *hdr)
 
   char helpstr[LONG_STRING];
   MUTTMENU *menu = NULL;
-  BODY *cur = NULL;
+  struct Body *cur = NULL;
   MESSAGE *msg = NULL;
   FILE *fp = NULL;
   struct AttachPtr **idx = NULL;
@@ -964,7 +964,7 @@ void mutt_view_attachments(HEADER *hdr)
         /* S/MIME nesting */
         if ((mutt_is_application_smime(cur) & SMIMEOPAQUE))
         {
-          BODY *_cur = cur;
+          struct Body *_cur = cur;
           FILE *_fp = fp;
 
           fp = NULL;
index b0b4ad541b854cd0146d9ecdbd7c5df975183c43..8bc9856ee96ea5b439fd4c5fa2f55e45db122d84 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -27,7 +27,7 @@
 /* some helper functions to verify that we are exclusively operating
  * on message/rfc822 attachments
  */
-static bool check_msg(BODY *b, bool err)
+static bool check_msg(struct Body *b, bool err)
 {
   if (!mutt_is_message_type(b->type, b->subtype))
   {
@@ -38,7 +38,7 @@ static bool check_msg(BODY *b, bool err)
   return true;
 }
 
-static bool check_all_msg(struct AttachPtr **idx, short idxlen, BODY *cur, bool err)
+static bool check_all_msg(struct AttachPtr **idx, short idxlen, struct Body *cur, bool err)
 {
   short i;
 
@@ -60,7 +60,7 @@ static bool check_all_msg(struct AttachPtr **idx, short idxlen, BODY *cur, bool
 
 
 /* can we decode all tagged attachments? */
-static short check_can_decode(struct AttachPtr **idx, short idxlen, BODY *cur)
+static short check_can_decode(struct AttachPtr **idx, short idxlen, struct Body *cur)
 {
   short i;
 
@@ -107,7 +107,7 @@ static short count_tagged_children(struct AttachPtr **idx, short idxlen, short i
  ** The bounce function, from the attachment menu
  **
  **/
-void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur)
+void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur)
 {
   short i;
   char prompt[STRING];
@@ -231,7 +231,7 @@ void mutt_attach_bounce(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idx
  **
  **
  **/
-void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, BODY *cur)
+void mutt_attach_resend(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen, struct Body *cur)
 {
   short i;
 
@@ -285,7 +285,7 @@ static HEADER *find_common_parent(struct AttachPtr **idx, short idxlen, short na
  * Note: This and the calling procedure could be optimized quite a
  * bit.  For now, it's not worth the effort.
  */
-static bool is_parent(short i, struct AttachPtr **idx, short idxlen, BODY *cur)
+static bool is_parent(short i, struct AttachPtr **idx, short idxlen, struct Body *cur)
 {
   short level = idx[i]->level;
 
@@ -298,7 +298,7 @@ static bool is_parent(short i, struct AttachPtr **idx, short idxlen, BODY *cur)
   return 0;
 }
 
-static HEADER *find_parent(struct AttachPtr **idx, short idxlen, BODY *cur, short nattach)
+static HEADER *find_parent(struct AttachPtr **idx, short idxlen, struct Body *cur, short nattach)
 {
   short i;
   HEADER *parent = NULL;
@@ -345,7 +345,7 @@ static void include_header(int quote, FILE *ifp, HEADER *hdr, FILE *ofp, char *_
 
 /* Attach all the body parts which can't be decoded.
  * This code is shared by forwarding and replying. */
-static BODY **copy_problematic_attachments(FILE *fp, BODY **last, struct AttachPtr **idx,
+static struct Body **copy_problematic_attachments(FILE *fp, struct Body **last, struct AttachPtr **idx,
                                            short idxlen, short force)
 {
   short i;
@@ -367,14 +367,14 @@ static BODY **copy_problematic_attachments(FILE *fp, BODY **last, struct AttachP
  * (non-message types)
  */
 static void attach_forward_bodies(FILE *fp, HEADER *hdr, struct AttachPtr **idx,
-                                  short idxlen, BODY *cur, short nattach, int flags)
+                                  short idxlen, struct Body *cur, short nattach, int flags)
 {
   short i;
   short mime_fwd_all = 0;
   short mime_fwd_any = 1;
   HEADER *parent = NULL;
   HEADER *tmphdr = NULL;
-  BODY **last;
+  struct Body **last;
   char tmpbody[_POSIX_PATH_MAX];
   FILE *tmpfp = NULL;
 
@@ -537,14 +537,14 @@ bail:
  * the attachment index.
  */
 static void attach_forward_msgs(FILE *fp, HEADER *hdr, struct AttachPtr **idx,
-                                short idxlen, BODY *cur, int flags)
+                                short idxlen, struct Body *cur, int flags)
 {
   HEADER *curhdr = NULL;
   HEADER *tmphdr = NULL;
   short i;
   int rc;
 
-  BODY **last;
+  struct Body **last;
   char tmpbody[_POSIX_PATH_MAX];
   FILE *tmpfp = NULL;
 
@@ -642,7 +642,7 @@ static void attach_forward_msgs(FILE *fp, HEADER *hdr, struct AttachPtr **idx,
 }
 
 void mutt_attach_forward(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
-                         BODY *cur, int flags)
+                         struct Body *cur, int flags)
 {
   short nattach;
 
@@ -781,7 +781,7 @@ static void attach_include_reply(FILE *fp, FILE *tmpfp, HEADER *cur, int flags)
 }
 
 void mutt_attach_reply(FILE *fp, HEADER *hdr, struct AttachPtr **idx, short idxlen,
-                       BODY *cur, int flags)
+                       struct Body *cur, int flags)
 {
   short mime_reply_any = 0;
 
index 8e91f1b352188d294d0f23d81ea9b54d4bd97df9..24fc874a46e4c3c27d82512555a8965cd2fcde9c 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -49,7 +49,7 @@
  * In addition, this function returns a 0 if the command works on a file,
  * and 1 if the command works on a pipe.
  */
-int rfc1524_expand_command(BODY *a, char *filename, char *_type, char *command, int clen)
+int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *command, int clen)
 {
   int x = 0, y = 0;
   int needspipe = true;
@@ -159,7 +159,7 @@ static int get_field_text(char *field, char **entry, char *type, char *filename,
   }
 }
 
-static int rfc1524_mailcap_parse(BODY *a, char *filename, char *type,
+static int rfc1524_mailcap_parse(struct Body *a, char *filename, char *type,
                                  rfc1524_entry *entry, int opt)
 {
   FILE *fp = NULL;
@@ -364,7 +364,7 @@ void rfc1524_free_entry(rfc1524_entry **entry)
  * in *entry, and returns 1.  On failure (not found), returns 0.
  * If entry == NULL just return 1 if the given type is found.
  */
-int rfc1524_mailcap_lookup(BODY *a, char *type, rfc1524_entry *entry, int opt)
+int rfc1524_mailcap_lookup(struct Body *a, char *type, rfc1524_entry *entry, int opt)
 {
   char path[_POSIX_PATH_MAX];
   int x;
index 609a11de03ae7fafd031e37118b1760f4227571e..8f780113badbe2d3cc71281f7480914328f9a424 100644 (file)
--- a/rfc1524.h
+++ b/rfc1524.h
@@ -34,9 +34,9 @@ typedef struct rfc1524_mailcap_entry
 
 rfc1524_entry *rfc1524_new_entry(void);
 void rfc1524_free_entry(rfc1524_entry **entry);
-int rfc1524_expand_command(BODY *a, char *filename, char *_type, char *command, int clen);
+int rfc1524_expand_command(struct Body *a, char *filename, char *_type, char *command, int clen);
 int rfc1524_expand_filename(char *nametemplate, char *oldfile, char *newfile, size_t nflen);
-int rfc1524_mailcap_lookup(BODY *a, char *type, rfc1524_entry *entry, int opt);
+int rfc1524_mailcap_lookup(struct Body *a, char *type, rfc1524_entry *entry, int opt);
 int mutt_rename_file(char *oldfile, char *newfile);
 
 #endif /* _MUTT_RFC1524_H */
index 3271c7bec02858a54b1d5428c9f380edafa4d576..edae5fb19ee877a9e5925f7ca55cf4da8734ff99 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
@@ -243,7 +243,7 @@ static void print_fixed_line(const char *line, STATE *s, int ql, flowed_state_t
   fst->spaces = 0;
 }
 
-int rfc3676_handler(BODY *a, STATE *s)
+int rfc3676_handler(struct Body *a, STATE *s)
 {
   char *buf = NULL, *t = NULL;
   unsigned int quotelevel = 0, newql = 0, sigsep = 0;
index ca323dc01d9719981494e1dbb2e6f0a0ee1d1ce3..eb63e922bd117f16c698afa2e80b62c61cf6a135 100644 (file)
--- a/rfc3676.h
+++ b/rfc3676.h
@@ -25,7 +25,7 @@
 #include "mutt.h"
 
 /* body handler implementing RfC 3676 for format=flowed */
-int rfc3676_handler(BODY *a, STATE *s);
+int rfc3676_handler(struct Body *a, STATE *s);
 
 /* this does the space-stuffing for RfC3676 style messages */
 void rfc3676_space_stuff(HEADER *hdr);
diff --git a/send.c b/send.c
index d879accae21ba0fb43729e7362daf2f606ff23ee..85d6d819a012d85babadc399dc37dc2c1790c19f 100644 (file)
--- a/send.c
+++ b/send.c
@@ -835,7 +835,7 @@ static int generate_body(FILE *tempfp, /* stream for outgoing message */
 {
   int i;
   HEADER *h = NULL;
-  BODY *tmp = NULL;
+  struct Body *tmp = NULL;
 
   if (flags & SENDREPLY)
   {
@@ -869,7 +869,7 @@ static int generate_body(FILE *tempfp, /* stream for outgoing message */
   {
     if ((i = query_quadoption(OPT_MIMEFWD, _("Forward as attachment?"))) == MUTT_YES)
     {
-      BODY *last = msg->content;
+      struct Body *last = msg->content;
 
       mutt_message(_("Preparing forwarded message..."));
 
@@ -917,7 +917,7 @@ static int generate_body(FILE *tempfp, /* stream for outgoing message */
   /* if (WithCrypto && (flags & SENDKEY)) */
   else if ((WithCrypto & APPLICATION_PGP) && (flags & SENDKEY))
   {
-    BODY *b = NULL;
+    struct Body *b = NULL;
 
     if ((WithCrypto & APPLICATION_PGP) && (b = crypt_pgp_make_key_attachment(NULL)) == NULL)
       return -1;
@@ -1127,9 +1127,9 @@ static int send_message(HEADER *msg)
 }
 
 /* rfc2047 encode the content-descriptions */
-void mutt_encode_descriptions(BODY *b, short recurse)
+void mutt_encode_descriptions(struct Body *b, short recurse)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
 
   for (t = b; t; t = t->next)
   {
@@ -1143,9 +1143,9 @@ void mutt_encode_descriptions(BODY *b, short recurse)
 }
 
 /* rfc2047 decode them in case of an error */
-static void decode_descriptions(BODY *b)
+static void decode_descriptions(struct Body *b)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
 
   for (t = b; t; t = t->next)
   {
@@ -1290,13 +1290,13 @@ int ci_send_message(int flags,      /* send mode */
   char buffer[LONG_STRING];
   char fcc[_POSIX_PATH_MAX] = ""; /* where to copy this message */
   FILE *tempfp = NULL;
-  BODY *pbody = NULL;
+  struct Body *pbody = NULL;
   int i, killfrom = 0;
   int fcc_error = 0;
   int free_clear_content = 0;
 
-  BODY *save_content = NULL;
-  BODY *clear_content = NULL;
+  struct Body *save_content = NULL;
+  struct Body *clear_content = NULL;
   char *pgpkeylist = NULL;
   /* save current value of "pgp_sign_as"  and "smime_default_key" */
   char *pgp_signas = NULL;
@@ -2008,9 +2008,9 @@ int ci_send_message(int flags,      /* send mode */
 
   if (*fcc && (mutt_strcmp("/dev/null", fcc) != 0))
   {
-    BODY *tmpbody = msg->content;
-    BODY *save_sig = NULL;
-    BODY *save_parts = NULL;
+    struct Body *tmpbody = msg->content;
+    struct Body *save_sig = NULL;
+    struct Body *save_parts = NULL;
 
     if (WithCrypto && (msg->security & (ENCRYPT | SIGN)) && option(OPTFCCCLEAR))
       msg->content = clear_content;
index b392669d6f18c98a25519a200235e520f4331c10..f53b16ee099910da4a1785351cf07ea7c14f84ef 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -287,7 +287,7 @@ static void encode_8bit(FGETCONV *fc, FILE *fout, int istext)
 }
 
 
-int mutt_write_mime_header(BODY *a, FILE *f)
+int mutt_write_mime_header(struct Body *a, FILE *f)
 {
   PARAMETER *p = NULL;
   char buffer[STRING];
@@ -399,12 +399,12 @@ int mutt_write_mime_header(BODY *a, FILE *f)
 #define write_as_text_part(a)                                                  \
   (mutt_is_text_part(a) || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(a)))
 
-int mutt_write_mime_body(BODY *a, FILE *f)
+int mutt_write_mime_body(struct Body *a, FILE *f)
 {
   char *p, boundary[SHORT_STRING];
   char send_charset[SHORT_STRING];
   FILE *fpin = NULL;
-  BODY *t = NULL;
+  struct Body *t = NULL;
   FGETCONV *fc = NULL;
 
   if (a->type == TYPEMULTIPART)
@@ -840,7 +840,7 @@ static size_t convert_file_from_to(FILE *file, const char *fromcodes, const char
  * Analyze the contents of a file to determine which MIME encoding to use.
  * Also set the body charset, sometimes, or not.
  */
-CONTENT *mutt_get_content_info(const char *fname, BODY *b)
+CONTENT *mutt_get_content_info(const char *fname, struct Body *b)
 {
   CONTENT *info = NULL;
   CONTENT_STATE state;
@@ -923,7 +923,7 @@ CONTENT *mutt_get_content_info(const char *fname, BODY *b)
  * The longest match is used so that we can match `ps.gz' when `gz' also
  * exists.
  */
-int mutt_lookup_mime_type(BODY *att, const char *path)
+int mutt_lookup_mime_type(struct Body *att, const char *path)
 {
   FILE *f = NULL;
   char *p = NULL, *q = NULL, *ct = NULL;
@@ -1027,7 +1027,7 @@ bye:
   return type;
 }
 
-static void transform_to_7bit(BODY *a, FILE *fpin)
+static void transform_to_7bit(struct Body *a, FILE *fpin)
 {
   char buff[_POSIX_PATH_MAX];
   STATE s;
@@ -1081,7 +1081,7 @@ static void transform_to_7bit(BODY *a, FILE *fpin)
   }
 }
 
-void mutt_message_to_7bit(BODY *a, FILE *fp)
+void mutt_message_to_7bit(struct Body *a, FILE *fp)
 {
   char temp[_POSIX_PATH_MAX];
   char *line = NULL;
@@ -1158,7 +1158,7 @@ cleanup:
 }
 
 /* determine which Content-Transfer-Encoding to use */
-static void set_encoding(BODY *b, CONTENT *info)
+static void set_encoding(struct Body *b, CONTENT *info)
 {
   char send_charset[SHORT_STRING];
 
@@ -1199,13 +1199,13 @@ static void set_encoding(BODY *b, CONTENT *info)
   }
 }
 
-void mutt_stamp_attachment(BODY *a)
+void mutt_stamp_attachment(struct Body *a)
 {
   a->stamp = time(NULL);
 }
 
 /* Get a body's character set */
-char *mutt_get_body_charset(char *d, size_t dlen, BODY *b)
+char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b)
 {
   char *p = NULL;
 
@@ -1224,8 +1224,8 @@ char *mutt_get_body_charset(char *d, size_t dlen, BODY *b)
 }
 
 
-/* Assumes called from send mode where BODY->filename points to actual file */
-void mutt_update_encoding(BODY *a)
+/* Assumes called from send mode where Body->filename points to actual file */
+void mutt_update_encoding(struct Body *a)
 {
   CONTENT *info = NULL;
   char chsbuff[STRING];
@@ -1247,10 +1247,10 @@ void mutt_update_encoding(BODY *a)
   a->content = info;
 }
 
-BODY *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg)
+struct Body *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg)
 {
   char buffer[LONG_STRING];
-  BODY *body = NULL;
+  struct Body *body = NULL;
   FILE *fp = NULL;
   int cmflags, chflags;
   int pgp = WithCrypto ? hdr->security : 0;
@@ -1335,9 +1335,9 @@ BODY *mutt_make_message_attach(CONTEXT *ctx, HEADER *hdr, int attach_msg)
   return body;
 }
 
-BODY *mutt_make_file_attach(const char *path)
+struct Body *mutt_make_file_attach(const char *path)
 {
-  BODY *att = NULL;
+  struct Body *att = NULL;
   CONTENT *info = NULL;
 
   att = mutt_new_body();
@@ -1378,7 +1378,7 @@ BODY *mutt_make_file_attach(const char *path)
   return att;
 }
 
-static int get_toplevel_encoding(BODY *a)
+static int get_toplevel_encoding(struct Body *a)
 {
   int e = ENC7BIT;
 
@@ -1394,7 +1394,7 @@ static int get_toplevel_encoding(BODY *a)
 }
 
 /* check for duplicate boundary. return 1 if duplicate */
-static bool check_boundary(const char *boundary, BODY *b)
+static bool check_boundary(const char *boundary, struct Body *b)
 {
   char *p = NULL;
 
@@ -1409,9 +1409,9 @@ static bool check_boundary(const char *boundary, BODY *b)
   return false;
 }
 
-BODY *mutt_make_multipart(BODY *b)
+struct Body *mutt_make_multipart(struct Body *b)
 {
-  BODY *new = NULL;
+  struct Body *new = NULL;
 
   new = mutt_new_body();
   new->type = TYPEMULTIPART;
@@ -1431,9 +1431,9 @@ BODY *mutt_make_multipart(BODY *b)
 }
 
 /* remove the multipart body if it exists */
-BODY *mutt_remove_multipart(BODY *b)
+struct Body *mutt_remove_multipart(struct Body *b)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
 
   if (b->parts)
   {
@@ -1914,7 +1914,7 @@ out:
  */
 
 
-int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, BODY *attach, int mode, int privacy)
+int mutt_write_rfc822_header(FILE *fp, ENVELOPE *env, struct Body *attach, int mode, int privacy)
 {
   char buffer[LONG_STRING];
   char *p = NULL, *q = NULL;
@@ -2736,7 +2736,7 @@ struct Address *mutt_remove_duplicates(struct Address *addr)
   return top;
 }
 
-static void set_noconv_flags(BODY *b, short flag)
+static void set_noconv_flags(struct Body *b, short flag)
 {
   for (; b; b = b->next)
   {
diff --git a/smime.c b/smime.c
index d1d3979aff836391fd20655cddd08091d5d4de25..d345c00f3e90aae8254c43db046042734c425f7a 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -1297,14 +1297,14 @@ static pid_t smime_invoke_sign(FILE **smimein, FILE **smimeout, FILE **smimeerr,
 }
 
 
-BODY *smime_build_smime_entity(BODY *a, char *certlist)
+struct Body *smime_build_smime_entity(struct Body *a, char *certlist)
 {
   char buf[LONG_STRING], certfile[LONG_STRING];
   char tempfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
   char smimeinfile[_POSIX_PATH_MAX];
   char *cert_start = certlist, *cert_end = certlist;
   FILE *smimein = NULL, *smimeerr = NULL, *fpout = NULL, *fptmp = NULL;
-  BODY *t = NULL;
+  struct Body *t = NULL;
   int err = 0, empty;
   pid_t thepid;
 
@@ -1446,9 +1446,9 @@ static char *openssl_md_to_smime_micalg(char *md)
 }
 
 
-BODY *smime_sign_message(BODY *a)
+struct Body *smime_sign_message(struct Body *a)
 {
-  BODY *t = NULL;
+  struct Body *t = NULL;
   char buffer[LONG_STRING];
   char signedfile[_POSIX_PATH_MAX], filetosign[_POSIX_PATH_MAX];
   FILE *smimein = NULL, *smimeout = NULL, *smimeerr = NULL, *sfp = NULL;
@@ -1610,7 +1610,7 @@ static pid_t smime_invoke_decrypt(FILE **smimein, FILE **smimeout,
 }
 
 
-int smime_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
+int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
 {
   char signedfile[_POSIX_PATH_MAX], smimeerrfile[_POSIX_PATH_MAX];
   FILE *fp = NULL, *smimeout = NULL, *smimeerr = NULL;
@@ -1722,7 +1722,7 @@ int smime_verify_one(BODY *sigbdy, STATE *s, const char *tempfile)
   This handles application/pkcs7-mime which can either be a signed
   or an encrypted message.
 */
-static BODY *smime_handle_entity(BODY *m, STATE *s, FILE *outFile)
+static struct Body *smime_handle_entity(struct Body *m, STATE *s, FILE *outFile)
 {
   int len = 0;
   int c;
@@ -1733,7 +1733,7 @@ static BODY *smime_handle_entity(BODY *m, STATE *s, FILE *outFile)
   FILE *smimeout = NULL, *smimein = NULL, *smimeerr = NULL;
   FILE *tmpfp = NULL, *tmpfp_buffer = NULL, *fpout = NULL;
   struct stat info;
-  BODY *p = NULL;
+  struct Body *p = NULL;
   pid_t thepid = -1;
   unsigned int type = mutt_is_application_smime(m);
 
@@ -1926,7 +1926,7 @@ static BODY *smime_handle_entity(BODY *m, STATE *s, FILE *outFile)
 }
 
 
-int smime_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
+int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
   STATE s;
@@ -1993,7 +1993,7 @@ bail:
 }
 
 
-int smime_application_smime_handler(BODY *m, STATE *s)
+int smime_application_smime_handler(struct Body *m, STATE *s)
 {
   return smime_handle_entity(m, s, NULL) ? 0 : -1;
 }
diff --git a/smime.h b/smime.h
index ec105b3e7f16901ea767271a675487f4733afc34..8cd7e19f17f5e7274ac7c7e61365d85d69ccf2f5 100644 (file)
--- a/smime.h
+++ b/smime.h
@@ -38,16 +38,16 @@ typedef struct smime_key
 void smime_void_passphrase(void);
 int smime_valid_passphrase(void);
 
-int smime_decrypt_mime(FILE *fpin, FILE **fpout, BODY *b, BODY **cur);
+int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
 
-int smime_application_smime_handler(BODY *m, STATE *s);
+int smime_application_smime_handler(struct Body *m, STATE *s);
 
 
-BODY *smime_sign_message(BODY *a);
+struct Body *smime_sign_message(struct Body *a);
 
-BODY *smime_build_smime_entity(BODY *a, char *certlist);
+struct Body *smime_build_smime_entity(struct Body *a, char *certlist);
 
-int smime_verify_one(BODY *sigbdy, STATE *s, const char *tempfile);
+int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
 
 
 int smime_verify_sender(HEADER *h);