]> granicus.if.org Git - neomutt/commitdiff
Add "_" as an expando option.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Apr 1999 10:09:22 +0000 (10:09 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Apr 1999 10:09:22 +0000 (10:09 +0000)
lib.c

diff --git a/lib.c b/lib.c
index 047a5e45fb62a0482ec784e26ed0a741333c7cf5..7f7c1c71cea101bbe95a802557b86c5ad02d982e 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -1085,11 +1085,23 @@ void mutt_FormatString (char *dest,             /* output buffer */
       }
       else
       {
+       short tolower =  0;
+       
+       if (ch == '_')
+       {
+         ch = *src++;
+         tolower = 1;
+       }
+       
        /* use callback function to handle this case */
        src = callback (buf, sizeof (buf), ch, src, prefix, ifstring, elsestring, data, flags);
 
+       if (tolower)
+         mutt_strlower (buf);
+       
        if ((len = mutt_strlen (buf)) + wlen > destlen)
          len = (destlen - wlen > 0) ? (destlen - wlen) : 0;
+
        memcpy (wptr, buf, len);
        wptr += len;
        wlen += len;