updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / mutt-great-dane / patch-1.5.21.vvv.initials
blobcd6b23e86ad0f1c02e473325688cab19bb2c63a3
1 diff -udprP mutt-1.5.21.orig/hdrline.c mutt-1.5.21/hdrline.c
2 --- mutt-1.5.21.orig/hdrline.c  2009-04-11 02:45:19.000000000 +0300
3 +++ mutt-1.5.21/hdrline.c       2010-09-16 11:04:49.000000000 +0300
4 @@ -212,6 +212,7 @@ int mutt_user_is_recipient (HEADER *h)
5   * %f = entire from line
6   * %F = like %n, unless from self
7   * %i = message-id
8 + * %I = initials of author
9   * %l = number of lines in the message
10   * %L = like %F, except `lists' are displayed first
11   * %m = number of messages in the mailbox
12 @@ -461,6 +462,31 @@ hdr_format_str (char *dest,
13        mutt_format_s (dest, destlen, prefix, hdr->env->message_id ? hdr->env->message_id : "<no.id>");
14        break;
16 +    case 'I':
17 +      {
18 +       int iflag = FALSE;
19 +       int j = 0;
21 +       for (i = 0; hdr->env->from && hdr->env->from->personal &&
22 +                   hdr->env->from->personal[i] && j < SHORT_STRING - 1; i++)
23 +       {
24 +         if (isalpha ((int)hdr->env->from->personal[i]))
25 +         {
26 +           if (!iflag)
27 +           {
28 +             buf2[j++] = hdr->env->from->personal[i];
29 +             iflag = TRUE;
30 +           }
31 +         }
32 +         else
33 +           iflag = FALSE;
34 +       }
36 +       buf2[j] = '\0';
37 +      }
38 +      mutt_format_s (dest, destlen, prefix, buf2);
39 +      break;
41      case 'l':
42        if (!optional)
43        {
44 diff -udprP mutt-1.5.21.orig/PATCHES mutt-1.5.21/PATCHES
45 --- mutt-1.5.21.orig/PATCHES    2008-03-19 22:07:06.000000000 +0200
46 +++ mutt-1.5.21/PATCHES 2010-09-16 11:04:49.000000000 +0300
47 @@ -0,0 +1 @@
48 +vvv.initials