-/* 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);
- }
- }
-}
-
-