--- mutt-1.5.6/PATCHES~ never +++ mutt-1.5.6/PATCHES Mon Feb 9 22:50:13 CST 2004 @@ -1,0 +1 @@ +patch-1.5.6.dgc.softfill.2 diff -Pur mutt-1.5.6-base/init.h mutt-1.5.6-dgc.softfill.2/init.h --- mutt-1.5.6-base/init.h Sun Feb 1 11:15:17 2004 +++ mutt-1.5.6-dgc.softfill.2/init.h Mon Feb 9 22:50:11 2004 @@ -207,6 +207,7 @@ ** .dt %u .dd unlink (=to delete) flag ** .dt %>X .dd right justify the rest of the string and pad with character "X" ** .dt %|X .dd pad to the end of the line with character "X" + ** .dt %=XY .dd soft-fill %Y, padding with character "X" ** .de */ { "attach_sep", DT_STR, R_NONE, UL &AttachSep, UL "\n" }, @@ -562,6 +563,7 @@ ** .dt %u .dd owner name (or numeric uid, if missing) ** .dt %>X .dd right justify the rest of the string and pad with character "X" ** .dt %|X .dd pad to the end of the line with character "X" + ** .dt %=XY .dd soft-fill %Y, padding with character "X" ** .de */ { "followup_to", DT_BOOL, R_NONE, OPTFOLLOWUPTO, 1 }, @@ -937,6 +939,7 @@ ** function ``strftime''; a leading bang disables locales. ** .dt %>X .dd right justify the rest of the string and pad with character "X" ** .dt %|X .dd pad to the end of the line with character "X" + ** .dt %=XY .dd soft-fill %Y, padding with character "X" ** .de ** .pp ** See also: ``$$to_chars''. @@ -2433,6 +2436,7 @@ ** .dt %V .dd currently active limit pattern, if any * ** .dt %>X .dd right justify the rest of the string and pad with "X" ** .dt %|X .dd pad to the end of the line with "X" + ** .dt %=XY .dd soft-fill %Y, padding with character "X" ** .de ** .pp ** * = can be optionally printed if nonzero diff -Pur mutt-1.5.6-base/muttlib.c mutt-1.5.6-dgc.softfill.2/muttlib.c --- mutt-1.5.6-base/muttlib.c Sun Feb 1 11:15:17 2004 +++ mutt-1.5.6-dgc.softfill.2/muttlib.c Mon Feb 9 22:50:11 2004 @@ -920,8 +920,9 @@ unsigned long data, /* callback data */ format_flag flags) /* callback flags */ { - char prefix[SHORT_STRING], buf[LONG_STRING], *cp, *wptr = dest, ch; + char prefix[SHORT_STRING], buf[LONG_STRING], *cp, *wptr = dest, ch, fmtch; char ifstring[SHORT_STRING], elsestring[SHORT_STRING]; + char remainder[LONG_STRING]; size_t wlen, count, len; prefix[0] = '\0'; @@ -1042,6 +1043,45 @@ } break; /* skip rest of input */ } + else if (ch == '=') + { + int space, used; + + /* truncate to fit remainder, pad with chr. */ + ch = *src++; /* pad chr */ + fmtch = *src++; /* format chr to truncate */ + mutt_FormatString (remainder, sizeof(remainder), src, callback, + data, flags); + + len = mutt_strlen(remainder); + space = COLS - wlen - len; + + if (space > 0) + { + src = callback (buf, sizeof (buf), fmtch, src, prefix, ifstring, elsestring, data, flags); + memcpy (wptr, buf, space); + used = mutt_strlen(buf); + + if (used > space) + used = space; + + wptr += used; + wlen += used; + + if (space > used) + { + memset (wptr, ch, space - used); + wptr += space - used; + wlen += space - used; + } + + } + + memcpy(wptr, remainder, len); + wptr += len; + wlen += len; + } + else { short tolower = 0;