Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > media > core-src > by-pkgid > 818205f6325473533f345b0ba31e289d > files > 21

mutt-1.4.2.3-alt1.src.rpm

diff -udprP mutt-1.4.2.2.orig/hdrline.c mutt-1.4.2.2/hdrline.c
--- mutt-1.4.2.2.orig/hdrline.c	2002-03-25 13:29:32.000000000 +0200
+++ mutt-1.4.2.2/hdrline.c	2006-07-18 12:37:13.000000000 +0300
@@ -212,6 +212,7 @@ int mutt_user_is_recipient (HEADER *h)
  * %f = entire from line
  * %F = like %n, unless from self
  * %i = message-id
+ * %I = initials of author
  * %l = number of lines in the message
  * %L = like %F, except `lists' are displayed first
  * %m = number of messages in the mailbox
@@ -444,6 +445,31 @@ hdr_format_str (char *dest,
       mutt_format_s (dest, destlen, prefix, hdr->env->message_id ? hdr->env->message_id : "<no.id>");
       break;
 
+    case 'I':
+      {
+	int iflag = FALSE;
+	int j = 0;
+
+	for (i = 0; hdr->env->from && hdr->env->from->personal &&
+		    hdr->env->from->personal[i] && j < SHORT_STRING - 1; i++)
+	{
+	  if (isalpha ((int)hdr->env->from->personal[i]))
+	  {
+	    if (!iflag)
+	    {
+	      buf2[j++] = hdr->env->from->personal[i];
+	      iflag = TRUE;
+	    }
+	  }
+	  else
+	    iflag = FALSE;
+	}
+
+	buf2[j] = '\0';
+      }
+      mutt_format_s (dest, destlen, prefix, buf2);
+      break;
+
     case 'l':
       if (!optional)
       {
diff -udprP mutt-1.4.2.2.orig/PATCHES mutt-1.4.2.2/PATCHES
--- mutt-1.4.2.2.orig/PATCHES	2001-11-26 21:16:52.000000000 +0200
+++ mutt-1.4.2.2/PATCHES	2006-07-18 12:37:13.000000000 +0300
@@ -0,0 +1 @@
+vvv.initials