]> git.pld-linux.org Git - packages/mutt.git/commitdiff
- vvv.initials patch from mutt.org.ua
authorAdam Gołębiowski <adamg@pld-linux.org>
Tue, 27 Nov 2018 17:27:10 +0000 (18:27 +0100)
committerAdam Gołębiowski <adamg@pld-linux.org>
Tue, 27 Nov 2018 17:27:10 +0000 (18:27 +0100)
mutt-vvv.initials.patch [new file with mode: 0644]
mutt.spec

diff --git a/mutt-vvv.initials.patch b/mutt-vvv.initials.patch
new file mode 100644 (file)
index 0000000..d1b0cb4
--- /dev/null
@@ -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
index aab4368ed120385f26fcd18bbeaf6fdee415d2cb..ac2fcf9fa68c71b2dca986aca59013d59a903f3e 100644 (file)
--- 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}
This page took 0.08343 seconds and 4 git commands to generate.