]> granicus.if.org Git - neomutt/commitdiff
replace 'STATE' with 'struct State'
authorRichard Russon <rich@flatcap.org>
Mon, 15 May 2017 13:51:38 +0000 (14:51 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 15 May 2017 23:05:11 +0000 (00:05 +0100)
29 files changed:
attach.c
copy.c
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
md5.c
mutt.h
mutt_crypt.h
muttlib.c
pattern.c
pgp.c
pgp.h
pgpmicalg.c
postpone.c
protos.h
recvattach.c
recvcmd.c
rfc3676.c
rfc3676.h
sendlib.c
smime.c
smime.h

index 330f2a5ba6709a6b5476b35ba8a72f11c2276556..81c09ddfb65cd22b9b6065a08c2ff24173f6b88f 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -501,7 +501,7 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Header *hdr,
          * Don't use mutt_save_attachment() because we want to perform charset
          * conversion since this will be displayed by the internal pager.
          */
-        STATE decode_state;
+        struct State decode_state;
 
         memset(&decode_state, 0, sizeof(decode_state));
         decode_state.fpout = safe_fopen(pagerfile, "w");
@@ -608,9 +608,9 @@ int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfi
   {
     /* recv case */
 
-    STATE s;
+    struct State s;
 
-    memset(&s, 0, sizeof(STATE));
+    memset(&s, 0, sizeof(struct State));
     /* perform charset conversion on text attachments when piping */
     s.flags = MUTT_CHARCONV;
 
@@ -745,7 +745,7 @@ int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, struct
     {
       /* In recv mode, extract from folder and decode */
 
-      STATE s;
+      struct State s;
 
       memset(&s, 0, sizeof(s));
       if ((s.fpout = save_attachment_open(path, flags)) == NULL)
@@ -808,7 +808,7 @@ int mutt_save_attachment(FILE *fp, struct Body *m, char *path, int flags, struct
 /* returns 0 on success, -1 on error */
 int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displaying, int flags)
 {
-  STATE s;
+  struct State s;
   unsigned int saved_encoding = 0;
   struct Body *saved_parts = NULL;
   struct Header *saved_hdr = NULL;
diff --git a/copy.c b/copy.c
index edae0c597e970f1415b3e17d4d558a15f1904e8c..367c3170e99154e78b9b0ecbfe03165dc8a7aa61 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -513,7 +513,7 @@ static int count_delete_lines(FILE *fp, struct Body *b, LOFF_T *length, size_t d
 int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body *body, int flags, int chflags)
 {
   char prefix[SHORT_STRING];
-  STATE s;
+  struct State s;
   LOFF_T new_offset = -1;
   int rc = 0;
 
@@ -617,7 +617,7 @@ int _mutt_copy_message(FILE *fpout, FILE *fpin, struct Header *hdr, struct Body
   if (flags & MUTT_CM_DECODE)
   {
     /* now make a text/plain version of the message */
-    memset(&s, 0, sizeof(STATE));
+    memset(&s, 0, sizeof(struct State));
     s.fpin = fpin;
     s.fpout = fpout;
     if (flags & MUTT_CM_PREFIX)
diff --git a/crypt.c b/crypt.c
index 99935217e2cf74c4a3bab81565a3566e7823bbbe..ffcf3065dba7befa09d55ec82b9faf29aa23a0b8 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -39,7 +39,7 @@
 
 
 /* print the current time to avoid spoofing of the signature output */
-void crypt_current_time(STATE *s, char *app_name)
+void crypt_current_time(struct State *s, char *app_name)
 {
   time_t t;
   char p[STRING], tmp[STRING];
@@ -581,7 +581,7 @@ int crypt_query(struct Body *m)
 }
 
 
-int crypt_write_signed(struct Body *a, STATE *s, const char *tempfile)
+int crypt_write_signed(struct Body *a, struct State *s, const char *tempfile)
 {
   FILE *fp = NULL;
   int c;
@@ -883,7 +883,7 @@ static void crypt_fetch_signatures(struct Body ***signatures, struct Body *a, in
 /*
  * This routine verifies a  "multipart/signed"  body.
  */
-int mutt_signed_handler(struct Body *a, STATE *s)
+int mutt_signed_handler(struct Body *a, struct State *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   int signed_type;
index 387f66a70392cffaff10bfac341ab1a1aa3b7979..79f3c4ade2b4d9748ae7f55c32e28cc61b7f1e8b 100644 (file)
@@ -835,7 +835,7 @@ static int get_micalg(gpgme_ctx_t ctx, int use_smime, char *buf, size_t buflen)
   return *buf ? 0 : -1;
 }
 
-static void print_time(time_t t, STATE *s)
+static void print_time(time_t t, struct State *s)
 {
   char p[STRING];
 
@@ -1102,7 +1102,7 @@ struct Body *smime_gpgme_build_smime_entity(struct Body *a, char *keylist)
    Return 1 if there is is a severe warning.
  */
 static int show_sig_summary(unsigned long sum, gpgme_ctx_t ctx, gpgme_key_t key,
-                            int idx, STATE *s, gpgme_signature_t sig)
+                            int idx, struct State *s, gpgme_signature_t sig)
 {
   if (!key)
     return 1;
@@ -1224,7 +1224,7 @@ static int show_sig_summary(unsigned long sum, gpgme_ctx_t ctx, gpgme_key_t key,
 }
 
 
-static void show_fingerprint(gpgme_key_t key, STATE *state)
+static void show_fingerprint(gpgme_key_t key, struct State *state)
 {
   const char *s = NULL;
   int i, is_pgp;
@@ -1276,7 +1276,7 @@ static void show_fingerprint(gpgme_key_t key, STATE *state)
 }
 
 /* Show the validity of a key used for one signature. */
-static void show_one_sig_validity(gpgme_ctx_t ctx, int idx, STATE *s)
+static void show_one_sig_validity(gpgme_ctx_t ctx, int idx, struct State *s)
 {
   gpgme_verify_result_t result = NULL;
   gpgme_signature_t sig = NULL;
@@ -1314,7 +1314,7 @@ static void show_one_sig_validity(gpgme_ctx_t ctx, int idx, STATE *s)
 }
 
 static void print_smime_keyinfo(const char *msg, gpgme_signature_t sig,
-                                gpgme_key_t key, STATE *s)
+                                gpgme_key_t key, struct State *s)
 {
   int msgwid;
   gpgme_user_id_t uids = NULL;
@@ -1373,7 +1373,7 @@ static void print_smime_keyinfo(const char *msg, gpgme_signature_t sig,
 
    Return values are: 0 for normal procession, 1 for a bad signature,
    2 for a signature with a warning or -1 for no more signature.  */
-static int show_one_sig_status(gpgme_ctx_t ctx, int idx, STATE *s)
+static int show_one_sig_status(gpgme_ctx_t ctx, int idx, struct State *s)
 {
   const char *fpr = NULL;
   gpgme_key_t key = NULL;
@@ -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(struct Body *sigbdy, STATE *s, const char *tempfile, int is_smime)
+static int verify_one(struct Body *sigbdy, struct State *s, const char *tempfile, int is_smime)
 {
   int badsig = -1;
   int anywarn = 0;
@@ -1611,12 +1611,12 @@ static int verify_one(struct Body *sigbdy, STATE *s, const char *tempfile, int i
   return badsig ? 1 : anywarn ? 2 : 0;
 }
 
-int pgp_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
+int pgp_gpgme_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
 {
   return verify_one(sigbdy, s, tempfile, 0);
 }
 
-int smime_gpgme_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
+int smime_gpgme_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
 {
   return verify_one(sigbdy, s, tempfile, 1);
 }
@@ -1631,7 +1631,7 @@ int smime_gpgme_verify_one(struct 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 struct Body *decrypt_part(struct Body *a, STATE *s, FILE *fpout, int is_smime, int *r_is_signed)
+static struct Body *decrypt_part(struct Body *a, struct State *s, FILE *fpout, int is_smime, int *r_is_signed)
 {
   if (!a || !s || !fpout)
     return NULL;
@@ -1778,7 +1778,7 @@ restart:
 int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
-  STATE s;
+  struct State s;
   struct Body *first_part = b;
   int is_signed = 0;
   int need_decode = 0;
@@ -1864,7 +1864,7 @@ bail:
 int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
-  STATE s;
+  struct State s;
   FILE *tmpfp = NULL;
   int is_signed;
   LOFF_T saved_b_offset;
@@ -2247,7 +2247,7 @@ void pgp_gpgme_invoke_import(const char *fname)
   (Note that we aren't worse than Outlook & Cie in this, and also
   note that we can successfully handle anything produced by any
   existing versions of mutt.)  */
-static void copy_clearsigned(gpgme_data_t data, STATE *s, char *charset)
+static void copy_clearsigned(gpgme_data_t data, struct State *s, char *charset)
 {
   char buf[HUGE_STRING];
   short complete, armor_header;
@@ -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(struct Body *m, STATE *s)
+int pgp_gpgme_application_handler(struct Body *m, struct State *s)
 {
   int needpass = -1, pgp_keyblock = 0;
   int clearsign = 0;
@@ -2549,7 +2549,7 @@ int pgp_gpgme_application_handler(struct 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(struct Body *a, STATE *s)
+int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL;
@@ -2623,7 +2623,7 @@ int pgp_gpgme_encrypted_handler(struct Body *a, STATE *s)
 }
 
 /* Support for application/smime */
-int smime_gpgme_application_handler(struct Body *a, STATE *s)
+int smime_gpgme_application_handler(struct Body *a, struct State *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL;
index 3719f3d5257b655f988832d598ee578ea7c53d60..899e371332826976a908e517111b595e7a26c779 100644 (file)
@@ -35,17 +35,17 @@ int smime_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Bo
 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(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);
+int pgp_gpgme_application_handler(struct Body *m, struct State *s);
+int smime_gpgme_application_handler(struct Body *a, struct State *s);
+int pgp_gpgme_encrypted_handler(struct Body *a, struct State *s);
 
 struct Body *pgp_gpgme_make_key_attachment(char *tempf);
 
 struct Body *pgp_gpgme_sign_message(struct Body *a);
 struct Body *smime_gpgme_sign_message(struct Body *a);
 
-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_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile);
+int smime_gpgme_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile);
 
 int pgp_gpgme_send_menu(struct Header *msg);
 int smime_gpgme_send_menu(struct Header *msg);
index 0300dce3d4518d8367f2740b0228e163b7c737bb..f5976a5fca7818384f68fbc62d035e027f2d663b 100644 (file)
@@ -32,8 +32,8 @@ typedef int (*crypt_func_valid_passphrase_t)(void);
 
 typedef int (*crypt_func_decrypt_mime_t)(FILE *a, FILE **b, struct Body *c, struct Body **d);
 
-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 int (*crypt_func_application_handler_t)(struct Body *m, struct State *s);
+typedef int (*crypt_func_encrypted_handler_t)(struct Body *m, struct State *s);
 
 typedef void (*crypt_func_pgp_invoke_getkeys_t)(struct Address *addr);
 typedef int (*crypt_func_pgp_check_traditional_t)(FILE *fp, struct Body *b, int tagged_only);
@@ -43,7 +43,7 @@ typedef char *(*crypt_func_findkeys_t)(struct Address *adrlist, int oppenc_mode)
 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)(struct Body *sigbdy, STATE *s, const char *tempf);
+typedef int (*crypt_func_verify_one_t)(struct Body *sigbdy, struct State *s, const char *tempf);
 typedef void (*crypt_func_pgp_extract_keys_from_attachment_list_t)(FILE *fp, int tag,
                                                                    struct Body *top);
 
index 59cdb83f999a03e66d2c86a686901fc32d9ede39..245cc406144e7474a0bd697a3931073645ab3a85 100644 (file)
@@ -37,7 +37,7 @@ static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct
 {
   return pgp_decrypt_mime(a, b, c, d);
 }
-static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, struct State *s)
 {
   return pgp_application_pgp_handler(m, s);
 }
@@ -52,7 +52,7 @@ static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
   return pgp_sign_message(a);
 }
 
-static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   return pgp_verify_one(sigbdy, s, tempf);
 }
@@ -82,7 +82,7 @@ static struct Body *crypt_mod_pgp_traditional_encryptsign(struct Body *a, int fl
   return pgp_traditional_encryptsign(a, flags, keylist);
 }
 
-static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, struct State *s)
 {
   return pgp_encrypted_handler(m, s);
 }
index b92dbb112ee260e849fb6dc30af8a1f9336e7f98..01306246731977816e6be4e9bd7b5f7e7a9a3298 100644 (file)
@@ -44,12 +44,12 @@ static int crypt_mod_pgp_decrypt_mime(FILE *a, FILE **b, struct Body *c, struct
   return pgp_gpgme_decrypt_mime(a, b, c, d);
 }
 
-static int crypt_mod_pgp_application_handler(struct Body *m, STATE *s)
+static int crypt_mod_pgp_application_handler(struct Body *m, struct State *s)
 {
   return pgp_gpgme_application_handler(m, s);
 }
 
-static int crypt_mod_pgp_encrypted_handler(struct Body *m, STATE *s)
+static int crypt_mod_pgp_encrypted_handler(struct Body *m, struct State *s)
 {
   return pgp_gpgme_encrypted_handler(m, s);
 }
@@ -74,7 +74,7 @@ static struct Body *crypt_mod_pgp_sign_message(struct Body *a)
   return pgp_gpgme_sign_message(a);
 }
 
-static int crypt_mod_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   return pgp_gpgme_verify_one(sigbdy, s, tempf);
 }
index 7daf813963e93300d7ce8061cd03e44c8b019ac4..cf8d3409e1d4114506c749df749eabf42630432d 100644 (file)
@@ -37,7 +37,7 @@ static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struc
 {
   return smime_decrypt_mime(a, b, c, d);
 }
-static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, struct State *s)
 {
   return smime_application_smime_handler(m, s);
 }
@@ -52,7 +52,7 @@ static struct Body *crypt_mod_smime_sign_message(struct Body *a)
   return smime_sign_message(a);
 }
 
-static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   return smime_verify_one(sigbdy, s, tempf);
 }
index e8cd20c307d659fd3748ed54f1860ce2c4327786..efc11c44f2ec9d4d3f327c80bf79da2e58f6cb66 100644 (file)
@@ -44,7 +44,7 @@ static int crypt_mod_smime_decrypt_mime(FILE *a, FILE **b, struct Body *c, struc
   return smime_gpgme_decrypt_mime(a, b, c, d);
 }
 
-static int crypt_mod_smime_application_handler(struct Body *m, STATE *s)
+static int crypt_mod_smime_application_handler(struct Body *m, struct State *s)
 {
   return smime_gpgme_application_handler(m, s);
 }
@@ -59,7 +59,7 @@ static struct Body *crypt_mod_smime_sign_message(struct Body *a)
   return smime_gpgme_sign_message(a);
 }
 
-static int crypt_mod_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+static int crypt_mod_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   return smime_gpgme_verify_one(sigbdy, s, tempf);
 }
index 0dc1cbdb0b217d756e1a508c7c6553b9439318e4..6f757416a33d8ac0431b91f897a4bc5f1024cde3 100644 (file)
@@ -142,7 +142,7 @@ 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(struct Body *m, STATE *s)
+int crypt_pgp_application_pgp_handler(struct Body *m, struct 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(struct Body *m, STATE *s)
 }
 
 /* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(struct Body *a, STATE *s)
+int crypt_pgp_encrypted_handler(struct Body *a, struct State *s)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, encrypted_handler))
     return (CRYPT_MOD_CALL(PGP, encrypted_handler))(a, s);
@@ -232,7 +232,7 @@ void crypt_pgp_invoke_import(const char *fname)
 }
 
 /* fixme: needs documentation */
-int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+int crypt_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   if (CRYPT_MOD_CALL_CHECK(PGP, verify_one))
     return (CRYPT_MOD_CALL(PGP, verify_one))(sigbdy, s, tempf);
@@ -296,7 +296,7 @@ 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(struct Body *m, STATE *s)
+int crypt_smime_application_smime_handler(struct Body *m, struct 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(struct Body *m, STATE *s)
 }
 
 /* MIME handler for an PGP/MIME encrypted message. */
-void crypt_smime_encrypted_handler(struct Body *a, STATE *s)
+void crypt_smime_encrypted_handler(struct Body *a, struct State *s)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, encrypted_handler))
     (CRYPT_MOD_CALL(SMIME, encrypted_handler))(a, s);
@@ -365,7 +365,7 @@ void crypt_smime_invoke_import(char *infile, char *mailbox)
 }
 
 /* fixme: needs documentation */
-int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf)
+int crypt_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf)
 {
   if (CRYPT_MOD_CALL_CHECK(SMIME, verify_one))
     return (CRYPT_MOD_CALL(SMIME, verify_one))(sigbdy, s, tempf);
index 984870a95ae0756f359d4d8dc7d24df84189498f..b11c09d617d280b76d199c98e04422399a2c3241 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -37,7 +37,7 @@
 #define BUFO_SIZE 2000
 
 
-typedef int (*handler_t)(struct Body *, STATE *);
+typedef int (*handler_t)(struct Body *, struct 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, struct Body *b, int n)
+static void print_part_line(struct State *s, struct Body *b, int n)
 {
   char length[5];
   mutt_pretty_size(length, sizeof(length), b->length);
@@ -78,7 +78,7 @@ static void print_part_line(STATE *s, struct Body *b, int n)
                ENCODING(b->encoding), length);
 }
 
-static void state_prefix_put(const char *d, size_t dlen, STATE *s)
+static void state_prefix_put(const char *d, size_t dlen, struct State *s)
 {
   if (s->prefix)
     while (dlen--)
@@ -87,7 +87,7 @@ static void state_prefix_put(const char *d, size_t dlen, STATE *s)
     fwrite(d, dlen, 1, s->fpout);
 }
 
-static void convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s)
+static void convert_to_state(iconv_t cd, char *bufi, size_t *l, struct State *s)
 {
   char bufo[BUFO_SIZE];
   ICONV_CONST char *ib = NULL;
@@ -126,7 +126,7 @@ static void convert_to_state(iconv_t cd, char *bufi, size_t *l, STATE *s)
   *l = ibl;
 }
 
-static void decode_xbit(STATE *s, long len, int istext, iconv_t cd)
+static void decode_xbit(struct State *s, long len, int istext, iconv_t cd)
 {
   int c, ch;
   char bufi[BUFI_SIZE];
@@ -247,7 +247,7 @@ static void qp_decode_line(char *dest, char *src, size_t *l, int last)
  * above, we just use STRING*2 for the target buffer's size.
  *
  */
-static void decode_quoted(STATE *s, long len, int istext, iconv_t cd)
+static void decode_quoted(struct State *s, long len, int istext, iconv_t cd)
 {
   char line[STRING];
   char decline[2 * STRING];
@@ -301,7 +301,7 @@ static void decode_quoted(STATE *s, long len, int istext, iconv_t cd)
   state_reset_prefix(s);
 }
 
-void mutt_decode_base64(STATE *s, long len, int istext, iconv_t cd)
+void mutt_decode_base64(struct State *s, long len, int istext, iconv_t cd)
 {
   char buf[5];
   int c1, c2, c3, c4, ch, cr = 0, i;
@@ -395,7 +395,7 @@ static unsigned char decode_byte(char ch)
   return ch - 32;
 }
 
-static void decode_uuencoded(STATE *s, long len, int istext, iconv_t cd)
+static void decode_uuencoded(struct State *s, long len, int istext, iconv_t cd)
 {
   char tmps[SHORT_STRING];
   char linelen, c, l, out;
@@ -508,7 +508,7 @@ struct enriched_state
   size_t param_len;
   int tag_level[RICH_LAST_TAG];
   int WrapMargin;
-  STATE *s;
+  struct State *s;
 };
 
 static void enriched_wrap(struct enriched_state *stte)
@@ -811,7 +811,7 @@ static void enriched_set_flags(const wchar_t *tag, struct enriched_state *stte)
   }
 }
 
-static int text_enriched_handler(struct Body *a, STATE *s)
+static int text_enriched_handler(struct Body *a, struct State *s)
 {
   enum
   {
@@ -1040,7 +1040,7 @@ static int is_autoview(struct Body *b)
 #define TXTPLAIN 2
 #define TXTENRICHED 3
 
-static int alternative_handler(struct Body *a, STATE *s)
+static int alternative_handler(struct Body *a, struct State *s)
 {
   struct Body *choice = NULL;
   struct Body *b = NULL;
@@ -1218,7 +1218,7 @@ static int alternative_handler(struct Body *a, STATE *s)
 }
 
 /* handles message/rfc822 body parts */
-static int message_handler(struct Body *a, STATE *s)
+static int message_handler(struct Body *a, struct State *s)
 {
   struct stat st;
   struct Body *b = NULL;
@@ -1300,7 +1300,7 @@ int mutt_can_decode(struct Body *a)
   return 0;
 }
 
-static int multipart_handler(struct Body *a, STATE *s)
+static int multipart_handler(struct Body *a, struct State *s)
 {
   struct Body *b = NULL, *p = NULL;
   struct stat st;
@@ -1364,7 +1364,7 @@ static int multipart_handler(struct Body *a, STATE *s)
   return rc;
 }
 
-static int autoview_handler(struct Body *a, STATE *s)
+static int autoview_handler(struct Body *a, struct State *s)
 {
   rfc1524_entry *entry = rfc1524_new_entry();
   char buffer[LONG_STRING];
@@ -1495,7 +1495,7 @@ static int autoview_handler(struct Body *a, STATE *s)
   return rc;
 }
 
-static int external_body_handler(struct Body *b, STATE *s)
+static int external_body_handler(struct Body *b, struct State *s)
 {
   const char *access_type = NULL;
   const char *expiration = NULL;
@@ -1589,7 +1589,7 @@ static int external_body_handler(struct Body *b, STATE *s)
   return 0;
 }
 
-void mutt_decode_attachment(struct Body *b, STATE *s)
+void mutt_decode_attachment(struct Body *b, struct State *s)
 {
   int istext = mutt_is_text_part(b);
   iconv_t cd = (iconv_t)(-1);
@@ -1638,7 +1638,7 @@ void mutt_decode_attachment(struct 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(struct Body *b, STATE *s)
+static int text_plain_handler(struct Body *b, struct State *s)
 {
   char *buf = NULL;
   size_t l = 0, sz = 0;
@@ -1661,7 +1661,7 @@ static int text_plain_handler(struct Body *b, STATE *s)
   return 0;
 }
 
-static int run_decode_and_handler(struct Body *b, STATE *s, handler_t handler, int plaintext)
+static int run_decode_and_handler(struct Body *b, struct State *s, handler_t handler, int plaintext)
 {
   int origType;
   char *savePrefix = NULL;
@@ -1799,7 +1799,7 @@ static int run_decode_and_handler(struct Body *b, STATE *s, handler_t handler, i
   return rc;
 }
 
-static int valid_pgp_encrypted_handler(struct Body *b, STATE *s)
+static int valid_pgp_encrypted_handler(struct Body *b, struct State *s)
 {
   int rc;
   struct Body *octetstream = NULL;
@@ -1811,7 +1811,7 @@ static int valid_pgp_encrypted_handler(struct Body *b, STATE *s)
   return rc;
 }
 
-static int malformed_pgp_encrypted_handler(struct Body *b, STATE *s)
+static int malformed_pgp_encrypted_handler(struct Body *b, struct State *s)
 {
   int rc;
   struct Body *octetstream = NULL;
@@ -1824,7 +1824,7 @@ static int malformed_pgp_encrypted_handler(struct Body *b, STATE *s)
   return rc;
 }
 
-int mutt_body_handler(struct Body *b, STATE *s)
+int mutt_body_handler(struct Body *b, struct State *s)
 {
   if (!b || !s)
     return -1;
diff --git a/md5.c b/md5.c
index 5b53d72de90f478282e45dd80549ea866c843be4..42cc49e76aed5dbee635c35f9a87606b87c553c1 100644 (file)
--- a/md5.c
+++ b/md5.c
@@ -163,7 +163,7 @@ process_partial_block:
   return 0;
 }
 
-/* Compute MD5 message digest for LEN bytes beginning at struct Buffer.  The
+/* Compute MD5 message digest for LEN bytes beginning at Buffer.  The
    result is always in little endian byte order, so that a byte-wise
    output yields to the wanted ASCII representation of the message
    digest.  */
@@ -256,7 +256,7 @@ void md5_process_bytes(const void *buffer, size_t len, struct md5_ctx *ctx)
 #define FH(b, c, d) (b ^ c ^ d)
 #define FI(b, c, d) (c ^ (b | ~d))
 
-/* Process LEN bytes of struct Buffer, accumulating context into CTX.
+/* Process LEN bytes of Buffer, accumulating context into CTX.
    It is assumed that LEN % 64 == 0.  */
 void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ctx)
 {
diff --git a/mutt.h b/mutt.h
index 5713d9db39d6b908ceb1c77e62f2d144554d4248..226e79ade46be77e1af73d936288df481f864be5 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -1061,13 +1061,13 @@ struct Context
   struct mx_ops *mx_ops;
 };
 
-typedef struct
+struct State
 {
   FILE *fpin;
   FILE *fpout;
   char *prefix;
   int flags;
-} STATE;
+};
 
 /* used by enter.c */
 
@@ -1086,7 +1086,7 @@ static inline struct EnterState *mutt_new_enter_state(void)
   return safe_calloc(1, sizeof(struct EnterState));
 }
 
-/* flags for the STATE struct */
+/* flags for the State struct */
 #define MUTT_DISPLAY       (1 << 0) /* output is displayed to the user */
 #define MUTT_VERIFY        (1 << 1) /* perform signature verification */
 #define MUTT_PENDINGPREFIX (1 << 2) /* prefix to write, but character must follow */
@@ -1101,11 +1101,11 @@ static inline struct EnterState *mutt_new_enter_state(void)
 #define state_puts(x, y) fputs(x, (y)->fpout)
 #define state_putc(x, y) fputc(x, (y)->fpout)
 
-void state_mark_attach(STATE *s);
-void state_attach_puts(const char *t, STATE *s);
-void state_prefix_putc(char c, STATE *s);
-int state_printf(STATE *s, const char *fmt, ...);
-int state_putws(const wchar_t *ws, STATE *s);
+void state_mark_attach(struct State *s);
+void state_attach_puts(const char *t, struct State *s);
+void state_prefix_putc(char c, struct State *s);
+int state_printf(struct State *s, const char *fmt, ...);
+int state_putws(const wchar_t *ws, struct State *s);
 
 /* for attachment counter */
 typedef struct
index 73d65e590a20beb2d1f1f07ef7456c152bc0118e..38441a46a5ce19ee9bebaa49abeba1b346a35435 100644 (file)
@@ -114,7 +114,7 @@ int mutt_is_application_pgp(struct Body *m);
 
 int mutt_is_application_smime(struct Body *m);
 
-int mutt_signed_handler(struct Body *a, STATE *s);
+int mutt_signed_handler(struct Body *a, struct State *s);
 
 int mutt_parse_crypt_hdr(const char *p, int set_empty_signas, int crypt_app);
 
@@ -123,7 +123,7 @@ void convert_to_7bit(struct Body *a);
 /* -- crypt.c -- */
 
 /* Print the current time. */
-void crypt_current_time(STATE *s, char *app_name);
+void crypt_current_time(struct State *s, char *app_name);
 
 /* Check out the type of encryption used and set the cached status
    values if there are any. */
@@ -151,7 +151,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(struct Body *a, STATE *s, const char *tempfile);
+int crypt_write_signed(struct Body *a, struct State *s, const char *tempfile);
 
 /* Obtain pointers to fingerprint or short or long key ID, if any.
 
@@ -186,10 +186,10 @@ int crypt_pgp_valid_passphrase(void);
 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(struct Body *m, STATE *s);
+int crypt_pgp_application_pgp_handler(struct Body *m, struct State *s);
 
 /* MIME handler for an PGP/MIME encrypted message. */
-int crypt_pgp_encrypted_handler(struct Body *a, STATE *s);
+int crypt_pgp_encrypted_handler(struct Body *a, struct State *s);
 
 /* fixme: needs documentation. */
 void crypt_pgp_invoke_getkeys(struct Address *addr);
@@ -222,7 +222,7 @@ void crypt_pgp_invoke_import(const char *fname);
 int crypt_pgp_send_menu(struct Header *msg);
 
 /* fixme: needs documentation */
-int crypt_pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
+int crypt_pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempf);
 
 /* fixme: needs documentation */
 void crypt_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top);
@@ -238,7 +238,7 @@ int crypt_smime_valid_passphrase(void);
 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(struct Body *m, STATE *s);
+int crypt_smime_application_smime_handler(struct Body *m, struct State *s);
 
 /* fixme: Needs documentation. */
 void crypt_smime_getkeys(struct Envelope *env);
@@ -268,7 +268,7 @@ int crypt_smime_send_menu(struct Header *msg);
 void crypt_smime_set_sender(const char *sender);
 
 /* fixme: needs documentation */
-int crypt_smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempf);
+int crypt_smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempf);
 
 void crypt_init(void);
 
index 12cf7f67b736bc0dae1bb8766849bf36475bb6f0..797beba70e2824881af47c96178b0eaacadc3409 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1867,7 +1867,7 @@ int mutt_save_confirm(const char *s, struct stat *st)
   return ret;
 }
 
-void state_prefix_putc(char c, STATE *s)
+void state_prefix_putc(char c, struct State *s)
 {
   if (s->flags & MUTT_PENDINGPREFIX)
   {
@@ -1882,7 +1882,7 @@ void state_prefix_putc(char c, STATE *s)
     state_set_prefix(s);
 }
 
-int state_printf(STATE *s, const char *fmt, ...)
+int state_printf(struct State *s, const char *fmt, ...)
 {
   int rv;
   va_list ap;
@@ -1894,7 +1894,7 @@ int state_printf(STATE *s, const char *fmt, ...)
   return rv;
 }
 
-void state_mark_attach(STATE *s)
+void state_mark_attach(struct State *s)
 {
   if (!s || !s->fpout)
     return;
@@ -1902,7 +1902,7 @@ void state_mark_attach(STATE *s)
     state_puts(AttachmentMarker, s);
 }
 
-void state_attach_puts(const char *t, STATE *s)
+void state_attach_puts(const char *t, struct State *s)
 {
   if (!t || !s || !s->fpout)
     return;
@@ -1918,7 +1918,7 @@ void state_attach_puts(const char *t, STATE *s)
   }
 }
 
-static int state_putwc(wchar_t wc, STATE *s)
+static int state_putwc(wchar_t wc, struct State *s)
 {
   char mb[MB_LEN_MAX] = "";
   int rc;
@@ -1930,7 +1930,7 @@ static int state_putwc(wchar_t wc, STATE *s)
   return 0;
 }
 
-int state_putws(const wchar_t *ws, STATE *s)
+int state_putws(const wchar_t *ws, struct State *s)
 {
   const wchar_t *p = ws;
 
index 4cdd7b30a033a72875e56199cfe204e425133a19..b3a6581958806e2d3324bdd501c1f2170f9dfef7 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -873,7 +873,7 @@ static int patmatch(const struct Pattern *pat, const char *buf)
 static int msg_search(struct Context *ctx, struct Pattern *pat, int msgno)
 {
   struct Message *msg = NULL;
-  STATE s;
+  struct State s;
   FILE *fp = NULL;
   long lng = 0;
   int match = 0;
diff --git a/pgp.c b/pgp.c
index 6320f6ac60498fd753ede863ea50bc4fa8031c7e..4c23a90deaed1390b485f46be0de0a9063fbeb98 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -247,7 +247,7 @@ static int pgp_check_decryption_okay(FILE *fpin)
  * note that we can successfully handle anything produced by any
  * existing versions of mutt.)
  */
-static void pgp_copy_clearsigned(FILE *fpin, STATE *s, char *charset)
+static void pgp_copy_clearsigned(FILE *fpin, struct State *s, char *charset)
 {
   char buf[HUGE_STRING];
   short complete, armor_header;
@@ -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(struct Body *m, STATE *s)
+int pgp_application_pgp_handler(struct Body *m, struct State *s)
 {
   int could_not_decrypt = 0;
   int needpass = -1, pgp_keyblock = 0;
@@ -669,7 +669,7 @@ int pgp_check_traditional(FILE *fp, struct Body *b, int tagged_only)
 }
 
 
-int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
+int pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
 {
   char sigfile[_POSIX_PATH_MAX], pgperrfile[_POSIX_PATH_MAX];
   FILE *fp = NULL, *pgpout = NULL, *pgperr = NULL;
@@ -735,7 +735,7 @@ int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
 /* Extract pgp public keys from messages or attachments */
 static void pgp_extract_keys_from_attachment(FILE *fp, struct Body *top)
 {
-  STATE s;
+  struct State s;
   FILE *tempfp = NULL;
   char tempfname[_POSIX_PATH_MAX];
 
@@ -746,7 +746,7 @@ static void pgp_extract_keys_from_attachment(FILE *fp, struct Body *top)
     return;
   }
 
-  memset(&s, 0, sizeof(STATE));
+  memset(&s, 0, sizeof(struct State));
 
   s.fpin = fp;
   s.fpout = tempfp;
@@ -784,7 +784,7 @@ void pgp_extract_keys_from_attachment_list(FILE *fp, int tag, struct Body *top)
   unset_option(OPTDONTHANDLEPGPKEYS);
 }
 
-static struct Body *pgp_decrypt_part(struct Body *a, STATE *s, FILE *fpout, struct Body *p)
+static struct Body *pgp_decrypt_part(struct Body *a, struct State *s, FILE *fpout, struct Body *p)
 {
   if (!a || !s || !fpout || !p)
     return NULL;
@@ -911,7 +911,7 @@ static struct Body *pgp_decrypt_part(struct Body *a, STATE *s, FILE *fpout, stru
 int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
-  STATE s;
+  struct State s;
   struct Body *p = b;
   int need_decode = 0;
   int saved_type;
@@ -989,7 +989,7 @@ bail:
  * This handler is passed the application/octet-stream directly.
  * The caller must propagate a->goodsig to its parent.
  */
-int pgp_encrypted_handler(struct Body *a, STATE *s)
+int pgp_encrypted_handler(struct Body *a, struct State *s)
 {
   char tempfile[_POSIX_PATH_MAX];
   FILE *fpout = NULL, *fpin = NULL;
diff --git a/pgp.h b/pgp.h
index 3dd7fd00ee4bfd596a3dcf84d94f81604b059aff..edfb08a013cd41d91be606c71c294f8acfb1977e 100644 (file)
--- a/pgp.h
+++ b/pgp.h
@@ -49,8 +49,8 @@ struct PgpKeyInfo *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(struct Body *m, STATE *s);
-int pgp_encrypted_handler(struct Body *a, STATE *s);
+int pgp_application_pgp_handler(struct Body *m, struct State *s);
+int pgp_encrypted_handler(struct Body *a, struct 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,7 +85,7 @@ void pgp_invoke_getkeys(struct Address *addr);
 
 
 /* private ? */
-int pgp_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+int pgp_verify_one(struct Body *sigbdy, struct 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);
index 56f2f7f5b5c242a0aa66dbe1392b7c49d90d0bda..bc3c98665bc96948ba62ef455af9ee54a3397ab9 100644 (file)
@@ -57,9 +57,9 @@ static void pgp_dearmor(FILE *in, FILE *out)
   LOFF_T end;
   char *r = NULL;
 
-  STATE state;
+  struct State state;
 
-  memset(&state, 0, sizeof(STATE));
+  memset(&state, 0, sizeof(struct State));
   state.fpin = in;
   state.fpout = out;
 
index c82840cb9884cbc067e28278e6d5b5bcd7b06a1d..bbb05128d8d523b67971e98a8f9d4778c8f0ffc1 100644 (file)
@@ -549,7 +549,7 @@ int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr,
   struct Body *b = NULL;
   FILE *bfp = NULL;
   int rv = -1;
-  STATE s;
+  struct State s;
   int sec_type;
 
   memset(&s, 0, sizeof(s));
index feabf985953f5cbc0575e499e7553018c26847de..2824243640e70502c2b8d90a5825f0099d4f8ac8 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -162,7 +162,7 @@ void mutt_allow_interrupt(int disposition);
 void mutt_attach_init(struct Body *b);
 void mutt_block_signals(void);
 void mutt_block_signals_system(void);
-int mutt_body_handler(struct Body *b, STATE *s);
+int mutt_body_handler(struct Body *b, struct State *s);
 int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to);
 void mutt_break_thread(struct Header *hdr);
 void mutt_buffy(char *s, size_t slen);
@@ -173,8 +173,8 @@ void mutt_check_rescore(struct Context *ctx);
 void mutt_clear_error(void);
 void mutt_clear_pager_position(void);
 void mutt_create_alias(struct Envelope *cur, struct Address *iadr);
-void mutt_decode_attachment(struct Body *b, STATE *s);
-void mutt_decode_base64(STATE *s, long len, int istext, iconv_t cd);
+void mutt_decode_attachment(struct Body *b, struct State *s);
+void mutt_decode_base64(struct State *s, long len, int istext, iconv_t cd);
 void mutt_default_save(char *path, size_t pathlen, struct Header *hdr);
 void mutt_display_address(struct Envelope *env);
 void mutt_draw_statusline(int cols, const char *buf, int buflen);
index c39cc428cf5555e8de47b527d334dabadcd8a34b..781fb03bbad419f64def67f547b6937d1597f952 100644 (file)
@@ -609,7 +609,7 @@ static void query_pipe_attachment(char *command, FILE *fp, struct Body *body, in
   }
 }
 
-static void pipe_attachment(FILE *fp, struct Body *b, STATE *state)
+static void pipe_attachment(FILE *fp, struct Body *b, struct State *state)
 {
   FILE *ifp = NULL;
 
@@ -635,7 +635,7 @@ static void pipe_attachment(FILE *fp, struct Body *b, STATE *state)
 }
 
 static void pipe_attachment_list(char *command, FILE *fp, int tag, struct Body *top,
-                                 int filter, STATE *state)
+                                 int filter, struct State *state)
 {
   for (; top; top = top->next)
   {
@@ -655,7 +655,7 @@ static void pipe_attachment_list(char *command, FILE *fp, int tag, struct Body *
 
 void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter)
 {
-  STATE state;
+  struct State state;
   char buf[SHORT_STRING];
   pid_t thepid;
 
@@ -663,7 +663,7 @@ void mutt_pipe_attachment_list(FILE *fp, int tag, struct Body *top, int filter)
     filter = 0; /* sanity check: we can't filter in the recv case yet */
 
   buf[0] = 0;
-  memset(&state, 0, sizeof(STATE));
+  memset(&state, 0, sizeof(struct State));
   /* perform charset conversion on text attachments when piping */
   state.flags = MUTT_CHARCONV;
 
@@ -717,7 +717,7 @@ static int can_print(struct Body *top, int tag)
   return 1;
 }
 
-static void print_attachment_list(FILE *fp, int tag, struct Body *top, STATE *state)
+static void print_attachment_list(FILE *fp, int tag, struct Body *top, struct State *state)
 {
   char type[STRING];
 
@@ -765,7 +765,7 @@ static void print_attachment_list(FILE *fp, int tag, struct Body *top, STATE *st
 
 void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
 {
-  STATE state;
+  struct State state;
 
   pid_t thepid;
   if (query_quadoption(OPT_PRINT, tag ? _("Print tagged attachment(s)?") :
@@ -777,7 +777,7 @@ void mutt_print_attachment_list(FILE *fp, int tag, struct Body *top)
     if (!can_print(top, tag))
       return;
     mutt_endwin(NULL);
-    memset(&state, 0, sizeof(STATE));
+    memset(&state, 0, sizeof(struct State));
     thepid = mutt_create_filter(NONULL(PrintCmd), &state.fpout, NULL, NULL);
     print_attachment_list(fp, tag, top, &state);
     safe_fclose(&state.fpout);
index 225cc79e385c58de05faddb0900c6d4726b0d04d..3411971c7d32fccd900677b57f22eb9e605712ef 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -382,7 +382,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachPtr
 
   int rc = 0;
 
-  STATE st;
+  struct State st;
 
   /*
    * First, find the parent message.
@@ -790,7 +790,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx, sho
   struct Header *tmphdr = NULL;
   short i;
 
-  STATE st;
+  struct State st;
   char tmpbody[_POSIX_PATH_MAX];
   FILE *tmpfp = NULL;
 
@@ -858,7 +858,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachPtr **idx, sho
   {
     mutt_make_attribution(Context, parent, tmpfp);
 
-    memset(&st, 0, sizeof(STATE));
+    memset(&st, 0, sizeof(struct State));
     st.fpin = fp;
     st.fpout = tmpfp;
 
index 032237a78d03568cd2aac2f6c3ce03f84b0dbcd6..a01f2b14ca5e16c4f8b441c902cb22aaaf608330 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
@@ -60,7 +60,7 @@ static int get_quote_level(const char *line)
  * becomes
  *    > > > foo
  */
-static int space_quotes(STATE *s)
+static int space_quotes(struct State *s)
 {
   /* Allow quote spacing in the pager even for OPTTEXTFLOWED,
    * but obviously not when replying.
@@ -76,7 +76,7 @@ static int space_quotes(STATE *s)
  * as opposed to
  *    >>>foo
  */
-static bool add_quote_suffix(STATE *s, int ql)
+static bool add_quote_suffix(struct State *s, int ql)
 {
   if (s->flags & MUTT_REPLYING)
     return false;
@@ -94,7 +94,7 @@ static bool add_quote_suffix(STATE *s, int ql)
   return true;
 }
 
-static size_t print_indent(int ql, STATE *s, int add_suffix)
+static size_t print_indent(int ql, struct State *s, int add_suffix)
 {
   int i;
   size_t wid = 0;
@@ -127,7 +127,7 @@ static size_t print_indent(int ql, STATE *s, int add_suffix)
   return ql + add_suffix + wid;
 }
 
-static void flush_par(STATE *s, flowed_state_t *fst)
+static void flush_par(struct State *s, flowed_state_t *fst)
 {
   if (fst->width > 0)
   {
@@ -140,7 +140,7 @@ static void flush_par(STATE *s, flowed_state_t *fst)
 /* Calculate the paragraph width based upon the current quote level. The start
  * of a quoted line will be ">>> ", so we need to subtract the space required
  * for the prefix from the terminal width. */
-static int quote_width(STATE *s, int ql)
+static int quote_width(struct State *s, int ql)
 {
   int width = mutt_window_wrap_cols(MuttIndexWindow, ReflowWrap);
   if (option(OPTTEXTFLOWED) && (s->flags & MUTT_REPLYING))
@@ -163,7 +163,7 @@ static int quote_width(STATE *s, int ql)
   return width;
 }
 
-static void print_flowed_line(char *line, STATE *s, int ql, flowed_state_t *fst, int term)
+static void print_flowed_line(char *line, struct State *s, int ql, flowed_state_t *fst, int term)
 {
   size_t width, w, words = 0;
   char *p = NULL;
@@ -232,7 +232,7 @@ static void print_flowed_line(char *line, STATE *s, int ql, flowed_state_t *fst,
     flush_par(s, fst);
 }
 
-static void print_fixed_line(const char *line, STATE *s, int ql, flowed_state_t *fst)
+static void print_fixed_line(const char *line, struct State *s, int ql, flowed_state_t *fst)
 {
   print_indent(ql, s, add_quote_suffix(s, ql));
   if (line && *line)
@@ -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(struct Body *a, STATE *s)
+int rfc3676_handler(struct Body *a, struct State *s)
 {
   char *buf = NULL, *t = NULL;
   unsigned int quotelevel = 0, newql = 0, sigsep = 0;
index dec0fbbb1b0bc6b0a869e8059716dc3a4679eab1..8c57def8fddf66bb4498e46d4a632c82f2261309 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(struct Body *a, STATE *s);
+int rfc3676_handler(struct Body *a, struct State *s);
 
 /* this does the space-stuffing for RfC3676 style messages */
 void rfc3676_space_stuff(struct Header *hdr);
index 2674d29cbf88ef83a73c7d109234a87d2f196c0d..3baad52bce3b9e2a25c2686e9c657f34621dd7ff 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1030,7 +1030,7 @@ bye:
 static void transform_to_7bit(struct Body *a, FILE *fpin)
 {
   char buff[_POSIX_PATH_MAX];
-  STATE s;
+  struct State s;
   struct stat sb;
 
   memset(&s, 0, sizeof(s));
diff --git a/smime.c b/smime.c
index 7f181e2415064e44ff2d24d86f6e23de6f6a1d08..54ca08e62d7df493028318403d0e5578fc487a73 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -1610,7 +1610,7 @@ static pid_t smime_invoke_decrypt(FILE **smimein, FILE **smimeout,
 }
 
 
-int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile)
+int smime_verify_one(struct Body *sigbdy, struct 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(struct Body *sigbdy, STATE *s, const char *tempfile)
   This handles application/pkcs7-mime which can either be a signed
   or an encrypted message.
 */
-static struct Body *smime_handle_entity(struct Body *m, STATE *s, FILE *outFile)
+static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *outFile)
 {
   int len = 0;
   int c;
@@ -1929,7 +1929,7 @@ static struct Body *smime_handle_entity(struct Body *m, STATE *s, FILE *outFile)
 int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur)
 {
   char tempfile[_POSIX_PATH_MAX];
-  STATE s;
+  struct State s;
   LOFF_T tmpoffset = b->offset;
   size_t tmplength = b->length;
   int origType = b->type;
@@ -1993,7 +1993,7 @@ bail:
 }
 
 
-int smime_application_smime_handler(struct Body *m, STATE *s)
+int smime_application_smime_handler(struct Body *m, struct State *s)
 {
   return smime_handle_entity(m, s, NULL) ? 0 : -1;
 }
diff --git a/smime.h b/smime.h
index e4164f6551d388d4b66499d733d319274a5f4ff9..9d438c664e38a4e7c43849e50b6d30506f0812ed 100644 (file)
--- a/smime.h
+++ b/smime.h
@@ -40,14 +40,14 @@ int smime_valid_passphrase(void);
 
 int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur);
 
-int smime_application_smime_handler(struct Body *m, STATE *s);
+int smime_application_smime_handler(struct Body *m, struct State *s);
 
 
 struct Body *smime_sign_message(struct Body *a);
 
 struct Body *smime_build_smime_entity(struct Body *a, char *certlist);
 
-int smime_verify_one(struct Body *sigbdy, STATE *s, const char *tempfile);
+int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile);
 
 
 int smime_verify_sender(struct Header *h);