- buf2[0] = 0;
- mutt_format_s (dest, destlen, prefix, buf2);
- break;
-
- case 'v':
- if (mutt_addr_is_user (hdr->env->from))
- {
- if (hdr->env->to)
- mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->to));
- else if (hdr->env->cc)
- mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->cc));
- else
- *buf2 = 0;
- }
+ mutt_format_s_tree (dest, destlen, prefix, hdr->tree);
+ }
+ else
+ mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->subject));
+ break;
+
+ case 'S':
+ if (hdr->deleted)
+ ch = 'D';
+ else if (hdr->attach_del)
+ ch = 'd';
+ else if (hdr->tagged)
+ ch = '*';
+ else if (hdr->flagged)
+ ch = '!';
+ else if (hdr->replied)
+ ch = 'r';
+ else if (hdr->read && (ctx && ctx->msgnotreadyet != hdr->msgno))
+ ch = '-';
+ else if (hdr->old)
+ ch = 'O';
+ else
+ ch = 'N';
+
+ /* FOO - this is probably unsafe, but we are not likely to have such
+ a short string passed into this routine */
+ *dest = ch;
+ *(dest + 1) = 0;
+ break;
+
+ case 't':
+ buf2[0] = 0;
+ if (!check_for_mailing_list (hdr->env->to, "To ", buf2, sizeof (buf2)) &&
+ !check_for_mailing_list (hdr->env->cc, "Cc ", buf2, sizeof (buf2))) {
+ if (hdr->env->to)
+ snprintf (buf2, sizeof (buf2), "To %s", mutt_get_name (hdr->env->to));
+ else if (hdr->env->cc)
+ snprintf (buf2, sizeof (buf2), "Cc %s", mutt_get_name (hdr->env->cc));
+ }
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
+ case 'T':
+ snprintf (fmt, sizeof (fmt), "%%%sc", prefix);
+ snprintf (dest, destlen, fmt,
+ (Tochars
+ && ((i = mutt_user_is_recipient (hdr))) <
+ str_len (Tochars)) ? Tochars[i] : ' ');
+ break;
+
+ case 'u':
+ if (hdr->env->from && hdr->env->from->mailbox) {
+ strfcpy (buf2, mutt_addr_for_display (hdr->env->from), sizeof (buf2));
+ if ((p = strpbrk (buf2, "%@")))
+ *p = 0;
+ }
+ else
+ buf2[0] = 0;
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
+ case 'v':
+ if (mutt_addr_is_user (hdr->env->from)) {
+ if (hdr->env->to)
+ mutt_format_s (buf2, sizeof (buf2), prefix,
+ mutt_get_name (hdr->env->to));
+ else if (hdr->env->cc)
+ mutt_format_s (buf2, sizeof (buf2), prefix,
+ mutt_get_name (hdr->env->cc));