dprint (1, (debugfile, "%s\n", Errorbuf));
mutt_format_string (Errorbuf, sizeof (Errorbuf),
- 0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf));
+ 0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf), 0);
if (!option (OPTKEEPQUIET))
{
va_end (ap);
mutt_format_string (Errorbuf, sizeof (Errorbuf),
- 0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf));
+ 0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf), 0);
if (!option (OPTKEEPQUIET))
{
void mutt_format_string (char *dest, size_t destlen,
int min_width, int max_width,
int right_justify, char pad_char,
- const char *s, size_t n)
+ const char *s, size_t n,
+ int arboreal)
{
char *p;
wchar_t wc;
k = (k == (size_t)(-1)) ? 1 : n;
wc = replacement_char ();
}
- if (wc < M_TREE_MAX)
+ if (arboreal && wc < M_TREE_MAX)
w = 1; /* hack */
else
{
* the number of character cells when printed.
*/
-void mutt_format_s (char *dest,
- size_t destlen,
- const char *prefix,
- const char *s)
+static void mutt_format_s_x (char *dest,
+ size_t destlen,
+ const char *prefix,
+ const char *s,
+ int arboreal)
{
int right_justify = 1;
char *p;
}
mutt_format_string (dest, destlen, min_width, max_width,
- right_justify, ' ', s, mutt_strlen (s));
+ right_justify, ' ', s, mutt_strlen (s), arboreal);
+}
+
+void mutt_format_s (char *dest,
+ size_t destlen,
+ const char *prefix,
+ const char *s)
+{
+ mutt_format_s_x (dest, destlen, prefix, s, 0);
+}
+
+void mutt_format_s_tree (char *dest,
+ size_t destlen,
+ const char *prefix,
+ const char *s)
+{
+ mutt_format_s_x (dest, destlen, prefix, s, 1);
}
/*
* mutt_paddstr (n, s) is almost equivalent to
- * mutt_format_string (bigbuf, big, n, n, 0, ' ', s, big), addstr (bigbuf)
+ * mutt_format_string (bigbuf, big, n, n, 0, ' ', s, big, 0), addstr (bigbuf)
*/
void mutt_paddstr (int n, const char *s)
{
if (flags & M_FORMAT_FORCESUBJ)
{
- snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, NONULL (hdr->env->subject));
- mutt_format_s (dest, destlen, prefix, buf2);
+ mutt_format_s (dest, destlen, "", NONULL (hdr->env->subject));
+ snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, dest);
+ mutt_format_s_tree (dest, destlen, prefix, buf2);
}
else
- mutt_format_s (dest, destlen, prefix, hdr->tree);
+ mutt_format_s_tree (dest, destlen, prefix, hdr->tree);
}
else
mutt_format_s (dest, destlen, prefix, NONULL (hdr->env->subject));
void mutt_expand_link (char *, const char *, const char *);
void mutt_fix_reply_recipients (ENVELOPE *env);
void mutt_folder_hook (char *);
-void mutt_format_string (char *, size_t, int, int, int, char, const char *, size_t);
+void mutt_format_string (char *, size_t, int, int, int, char, const char *, size_t, int);
void mutt_format_s (char *, size_t, const char *, const char *);
+void mutt_format_s_tree (char *, size_t, const char *, const char *);
void mutt_forward_intro (FILE *fp, HEADER *cur);
void mutt_forward_trailer (FILE *fp);
void mutt_free_alias (ALIAS **);