]> diplodocus.org Git - nmh/blobdiff - uip/mhfixmsg.c
Added a couple of new directories and a note about valgrind
[nmh] / uip / mhfixmsg.c
index f5488532bfa7df9f6ac05a40cf7b4852a05a9d2d..5385b9ecff7bbfaa4d1a4d209d41c693ad07c985 100644 (file)
@@ -53,7 +53,6 @@ int debugsw; /* Needed by mhparse.c. */
 extern int skip_mp_cte_check;                 /* flag to InitMultiPart */
 extern int suppress_bogus_mp_content_warning; /* flag to InitMultiPart */
 extern int bogus_mp_content;                  /* flag from InitMultiPart */
-void reverse_parts (CT);
 
 /* mhoutsbr.c */
 int output_message (CT, char *);
@@ -78,7 +77,6 @@ typedef struct fix_transformations {
 } fix_transformations;
 
 int mhfixmsgsbr (CT *, const fix_transformations *, char *);
-static void reverse_alternative_parts (CT);
 static int fix_boundary (CT *, int *);
 static int get_multipart_boundary (CT, char **);
 static int replace_boundary (CT, char *, char *);
@@ -459,27 +457,6 @@ mhfixmsgsbr (CT *ctp, const fix_transformations *fx, char *outfile) {
 }
 
 
-/* parse_mime() arranges alternates in reverse (priority) order, so
-   reverse them back.  This will put a text/plain part at the front of
-   a multipart/alternative part, for example, where it belongs. */
-static void
-reverse_alternative_parts (CT ct) {
-    if (ct->c_type == CT_MULTIPART) {
-        struct multipart *m = (struct multipart *) ct->c_ctparams;
-        struct part *part;
-
-        if (ct->c_subtype == MULTI_ALTERNATE) {
-            reverse_parts (ct);
-        }
-
-        /* And call recursively on each part of a multipart. */
-        for (part = m->mp_parts; part; part = part->mp_next) {
-            reverse_alternative_parts (part->mp_part);
-        }
-    }
-}
-
-
 static int
 fix_boundary (CT *ct, int *message_mods) {
     struct multipart *mp;
@@ -1669,16 +1646,16 @@ strip_crs (CT ct, int *message_mods) {
                         } else if (last_char_was_cr) {
                             if (*cp != '\n') {
                                 if (write (fd, "\r", 1) < 0) {
-                                    advise (tempfile, "write of CR failed");
+                                    advise (tempfile, "CR write");
                                 }
                             }
                             if (write (fd, cp, 1) < 0) {
-                                advise (tempfile, "write failed");
+                                advise (tempfile, "write");
                             }
                             last_char_was_cr = 0;
                         } else {
                             if (write (fd, cp, 1) < 0) {
-                                advise (tempfile, "write failed");
+                                advise (tempfile, "write");
                             }
                             last_char_was_cr = 0;
                         }