[packages/mutt] - vvv.initials patch from mutt.org.ua

adamg adamg at pld-linux.org
Tue Nov 27 18:27:53 CET 2018


commit 3699f85ee961bd75d7d6f2bc4c79601395a3dfce
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date:   Tue Nov 27 18:27:10 2018 +0100

    - vvv.initials patch from mutt.org.ua

 mutt-vvv.initials.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 mutt.spec               |  2 ++
 2 files changed, 50 insertions(+)
---
diff --git a/mutt.spec b/mutt.spec
index aab4368..ac2fcf9 100644
--- a/mutt.spec
+++ b/mutt.spec
@@ -60,6 +60,7 @@ Patch11:	%{name}-smime.rc.patch
 Patch12:	%{name}-db.patch
 Patch13:	format-security.patch
 Patch14:	%{name}-keep_to.patch
+Patch15:	%{name}-vvv.initials.patch
 # applied during %%install
 Patch50:	%{name}-Muttrc.patch
 # bcond-related patches
@@ -167,6 +168,7 @@ Mutt - це невеликий, але потужний повноекранни
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 %{?with_home_etc:%patch101 -p1}
 %{?with_nntp:%patch102 -p1}
diff --git a/mutt-vvv.initials.patch b/mutt-vvv.initials.patch
new file mode 100644
index 0000000..d1b0cb4
--- /dev/null
+++ b/mutt-vvv.initials.patch
@@ -0,0 +1,48 @@
+diff -udprP mutt-1.10.0.orig/hdrline.c mutt-1.10.0/hdrline.c
+--- mutt-1.10.0.orig/hdrline.c	2018-05-15 00:51:53.000000000 +0300
++++ mutt-1.10.0/hdrline.c	2018-06-16 17:17:07.682610173 +0300
+@@ -228,6 +228,7 @@ static char *apply_subject_mods (ENVELOP
+  * %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
+@@ -478,6 +479,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.10.0.orig/PATCHES mutt-1.10.0/PATCHES
+--- mutt-1.10.0.orig/PATCHES	2017-12-03 05:10:17.000000000 +0200
++++ mutt-1.10.0/PATCHES	2018-06-16 17:17:07.683610157 +0300
+@@ -0,0 +1 @@
++vvv.initials
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mutt.git/commitdiff/3699f85ee961bd75d7d6f2bc4c79601395a3dfce



More information about the pld-cvs-commit mailing list