Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 2016 08:41:56 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r407401 - in head/mail/mutt: . files
Message-ID:  <201601280841.u0S8fuwu098334@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Jan 28 08:41:56 2016
New Revision: 407401
URL: https://svnweb.freebsd.org/changeset/ports/407401

Log:
  mail/mutt: update sidebar patch
  
  PR:		205284
  Reported by:	Zsolt Udvari <udvzsolt@gmail.com>
  Approved by:	Udo Schweigert <Udo.Schweigert@siemens.com> (maintainer)

Modified:
  head/mail/mutt/Makefile
  head/mail/mutt/files/extra-patch-sidebar
  head/mail/mutt/files/extra-patch-sidebar-nntp
  head/mail/mutt/files/extra-patch-sidebar-refresh

Modified: head/mail/mutt/Makefile
==============================================================================
--- head/mail/mutt/Makefile	Thu Jan 28 08:18:42 2016	(r407400)
+++ head/mail/mutt/Makefile	Thu Jan 28 08:41:56 2016	(r407401)
@@ -3,7 +3,7 @@
 
 PORTNAME=	mutt
 PORTVERSION=	1.5.24
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES+=	mail ipv6
 MASTER_SITES=	ftp://ftp.mutt.org/mutt/ \
 		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \

Modified: head/mail/mutt/files/extra-patch-sidebar
==============================================================================
--- head/mail/mutt/files/extra-patch-sidebar	Thu Jan 28 08:18:42 2016	(r407400)
+++ head/mail/mutt/files/extra-patch-sidebar	Thu Jan 28 08:41:56 2016	(r407401)
@@ -1,123 +1,141 @@
-Taken from http://lunar-linux.org/~tchan/mutt/patch-1.5.23.sidebar.20140412.txt
+Based on http://lunar-linux.org/~tchan/mutt/patch-1.5.24.sidebar.20151111.txt
+ - Fixed some flaws with regard to handling of "/" instead of "." for IMAP folders.
 
-diff -uNp -r mutt-1.5.22.orig/buffy.c mutt-1.5.22/buffy.c
-*** mutt-1.5.23-orig/buffy.c.orig	2015-08-30 19:06:38.000000000 +0200
---- mutt-1.5.23/buffy.c	2015-09-10 09:31:22.000000000 +0200
-@@ -161,6 +161,49 @@
-   }
- }
- 
-+static int buffy_compare_name(const void *a, const void *b) {
-+  const BUFFY *b1 = * (BUFFY * const *) a;
-+  const BUFFY *b2 = * (BUFFY * const *) b;
-+
-+  return mutt_strcoll(b1->path, b2->path);
-+}
-+
-+static BUFFY *buffy_sort(BUFFY *b)
-+{
-+  BUFFY *tmp = b;
-+  int buffycount = 0;
-+  BUFFY **ary;
-+  int i;
-+
-+  if (!option(OPTSIDEBARSORT))
-+    return b;
-+
-+  for (; tmp != NULL; tmp = tmp->next)
-+    buffycount++;
-+
-+  ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
-+
-+  tmp = b;
-+  for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
-+    ary[i] = tmp;
-+  }
-+
-+  qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
-+
-+  for (i = 0; i < buffycount - 1; i++) {
-+    ary[i]->next = ary[i+1];
-+  }
-+  ary[buffycount - 1]->next = NULL;
-+  for (i = 1; i < buffycount; i++) {
-+    ary[i]->prev = ary[i-1];
-+  }
-+  ary[0]->prev = NULL;
-+
-+  tmp = ary[0];
-+  free(ary);
-+  return tmp;
-+}
-+
- BUFFY *mutt_find_mailbox (const char *path)
- {
-   BUFFY *tmp = NULL;
-@@ -196,9 +239,13 @@
- static BUFFY *buffy_new (const char *path)
- {
-   BUFFY* buffy;
-+  char rp[PATH_MAX];
-+  char *r;
- 
-   buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
-   strfcpy (buffy->path, path, sizeof (buffy->path));
-+  r = realpath(path, rp);
-+  strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
-   buffy->next = NULL;
-   buffy->magic = 0;
- 
-@@ -243,8 +290,8 @@
-     p = realpath (buf, f1);
-     for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
-     {
--      q = realpath ((*tmp)->path, f2);
--      if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
-+      q = (*tmp)->realpath;
-+      if (mutt_strcmp (p ? p : buf, q) == 0)
-       {
- 	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
- 	break;
-@@ -282,6 +329,7 @@
-     else
-       (*tmp)->size = 0;
-   }
-+  Incoming = buffy_sort(Incoming);
-   return 0;
- }
- 
-@@ -306,6 +354,11 @@
-       return 0;
-   }
- 
-+  if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
-+      mailbox->new = 1;
-+      return 1;
-+  }
-+
-   if ((dirp = opendir (path)) == NULL)
-   {
-     mailbox->magic = 0;
-@@ -357,6 +410,73 @@
- 
-   return 0;
- }
-+  
-+/* update message counts for the sidebar */
-+void buffy_maildir_update (BUFFY* mailbox)
-+{
+*** mutt-1.5.24-orig/buffy.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/buffy.c	2015-09-16 23:18:13.000000000 -0500
+***************
+*** 161,166 ****
+--- 161,209 ----
+    }
+  }
+  
++ static int buffy_compare_name(const void *a, const void *b) {
++   const BUFFY *b1 = * (BUFFY * const *) a;
++   const BUFFY *b2 = * (BUFFY * const *) b;
++ 
++   return mutt_strcoll(b1->path, b2->path);
++ }
++ 
++ static BUFFY *buffy_sort(BUFFY *b)
++ {
++   BUFFY *tmp = b;
++   int buffycount = 0;
++   BUFFY **ary;
++   int i;
++ 
++   if (!option(OPTSIDEBARSORT))
++     return b;
++ 
++   for (; tmp != NULL; tmp = tmp->next)
++     buffycount++;
++ 
++   ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary));
++ 
++   tmp = b;
++   for (i = 0; tmp != NULL; tmp = tmp->next, i++) {
++     ary[i] = tmp;
++   }
++ 
++   qsort(ary, buffycount, sizeof(*ary), buffy_compare_name);
++ 
++   for (i = 0; i < buffycount - 1; i++) {
++     ary[i]->next = ary[i+1];
++   }
++   ary[buffycount - 1]->next = NULL;
++   for (i = 1; i < buffycount; i++) {
++     ary[i]->prev = ary[i-1];
++   }
++   ary[0]->prev = NULL;
++ 
++   tmp = ary[0];
++   free(ary);
++   return tmp;
++ }
++ 
+  BUFFY *mutt_find_mailbox (const char *path)
+  {
+    BUFFY *tmp = NULL;
+***************
+*** 196,204 ****
+--- 239,251 ----
+  static BUFFY *buffy_new (const char *path)
+  {
+    BUFFY* buffy;
++   char rp[PATH_MAX];
++   char *r;
+  
+    buffy = (BUFFY *) safe_calloc (1, sizeof (BUFFY));
+    strfcpy (buffy->path, path, sizeof (buffy->path));
++   r = realpath(path, rp);
++   strfcpy (buffy->realpath, r ? rp : path, sizeof (buffy->realpath));
+    buffy->next = NULL;
+    buffy->magic = 0;
+  
+***************
+*** 243,250 ****
+      p = realpath (buf, f1);
+      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
+      {
+!       q = realpath ((*tmp)->path, f2);
+!       if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0)
+        {
+  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
+  	break;
+--- 290,297 ----
+      p = realpath (buf, f1);
+      for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next))
+      {
+!       q = (*tmp)->realpath;
+!       if (mutt_strcmp (p ? p : buf, q) == 0)
+        {
+  	dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path));
+  	break;
+***************
+*** 282,287 ****
+--- 329,335 ----
+      else
+        (*tmp)->size = 0;
+    }
++   Incoming = buffy_sort(Incoming);
+    return 0;
+  }
+  
+***************
+*** 306,311 ****
+--- 354,364 ----
+        return 0;
+    }
+  
++   if (option(OPTSIDEBAR) && mailbox->msg_unread > 0) {
++       mailbox->new = 1;
++       return 1;
++   }
++ 
+    if ((dirp = opendir (path)) == NULL)
+    {
+      mailbox->magic = 0;
+***************
+*** 357,362 ****
+--- 410,482 ----
+  
+    return 0;
+  }
++   
++  /* update message counts for the sidebar */
++ void buffy_maildir_update (BUFFY* mailbox)
++ {
 +  char path[_POSIX_PATH_MAX];
 +  DIR *dirp;
 +  struct dirent *de;
 +  char *p;
-+
++ 
 +  if(!option(OPTSIDEBAR))
 +      return;
-+
++ 
 +  mailbox->msgcount = 0;
 +  mailbox->msg_unread = 0;
 +  mailbox->msg_flagged = 0;
-+
++ 
 +  snprintf (path, sizeof (path), "%s/new", mailbox->path);
 +        
 +  if ((dirp = opendir (path)) == NULL)
@@ -125,33 +143,33 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
 +    mailbox->magic = 0;
 +    return;
 +  } 
-+      
++        
 +  while ((de = readdir (dirp)) != NULL)
 +  {
 +    if (*de->d_name == '.')
 +      continue;
-+
++ 
 +    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
 +      mailbox->new = 1;
 +      mailbox->msgcount++;
 +      mailbox->msg_unread++;
 +    }
 +  }
-+
++ 
 +  closedir (dirp);
 +  snprintf (path, sizeof (path), "%s/cur", mailbox->path);
 +        
 +  if ((dirp = opendir (path)) == NULL)
 +  {   
-+    mailbox->magic = 0;
++   mailbox->magic = 0;
 +    return;
 +  } 
-+      
++        
 +  while ((de = readdir (dirp)) != NULL)
 +  {
 +    if (*de->d_name == '.')
 +      continue;
-+
++ 
 +    if (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')) {
 +      mailbox->msgcount++;
 +      if ((p = strstr (de->d_name, ":2,"))) {
@@ -164,75 +182,103 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
 +      }
 +    }
 +  }
-+
++ 
 +  mailbox->sb_last_checked = time(NULL);
 +  closedir (dirp);
-+}
-+
- /* returns 1 if mailbox has new mail */ 
- static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
- {
-@@ -368,7 +488,7 @@
-   else
-     statcheck = sb->st_mtime > sb->st_atime
-       || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
--  if (statcheck)
-+  if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
-   {
-     if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
-     {
-@@ -388,6 +508,27 @@
-   return rc;
- }
- 
-+/* update message counts for the sidebar */
-+void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
-+{
-+  CONTEXT *ctx = NULL;
-+
-+  if(!option(OPTSIDEBAR))
-+      return;
-+  if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
-+      return; /* no check necessary */
-+
-+  ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
-+  if(ctx)
-+  {
-+    mailbox->msgcount = ctx->msgcount;
-+    mailbox->msg_unread = ctx->unread;
-+    mailbox->msg_flagged = ctx->flagged;
-+    mailbox->sb_last_checked = time(NULL);
-+    mx_close_mailbox(ctx, 0);
-+  }
-+}
-+
- int mutt_buffy_check (int force)
- {
-   BUFFY *tmp;
-@@ -461,17 +602,20 @@
-       {
-       case M_MBOX:
-       case M_MMDF:
-+	buffy_mbox_update (tmp, &sb);
- 	if (buffy_mbox_hasnew (tmp, &sb) > 0)
- 	  BuffyCount++;
- 	break;
- 
-       case M_MAILDIR:
-+	buffy_maildir_update (tmp);
- 	if (buffy_maildir_hasnew (tmp) > 0)
- 	  BuffyCount++;
- 	break;
- 
-       case M_MH:
--	mh_buffy(tmp);
-+	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
-+        mh_buffy(tmp);
- 	if (tmp->new)
- 	  BuffyCount++;
- 	break;
-*** mutt-1.5.23-orig/buffy.h	2014-03-12 11:03:44.000000000 -0500
---- mutt-1.5.23/buffy.h	2014-04-11 10:14:01.000000000 -0500
++ }
++ 
+  /* returns 1 if mailbox has new mail */ 
+  static int buffy_mbox_hasnew (BUFFY* mailbox, struct stat *sb)
+  {
+***************
+*** 368,374 ****
+    else
+      statcheck = sb->st_mtime > sb->st_atime
+        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
+!   if (statcheck)
+    {
+      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
+      {
+--- 488,494 ----
+    else
+      statcheck = sb->st_mtime > sb->st_atime
+        || (mailbox->newly_created && sb->st_ctime == sb->st_mtime && sb->st_ctime == sb->st_atime);
+!   if ((!option(OPTSIDEBAR) && statcheck) || (option(OPTSIDEBAR) && mailbox->msg_unread > 0))
+    {
+      if (!option(OPTMAILCHECKRECENT) || sb->st_mtime > mailbox->last_visited)
+      {
+***************
+*** 388,393 ****
+--- 508,534 ----
+    return rc;
+  }
+  
++ /* update message counts for the sidebar */
++ void buffy_mbox_update (BUFFY* mailbox, struct stat *sb)
++ {
++   CONTEXT *ctx = NULL;
++ 
++   if(!option(OPTSIDEBAR))
++       return;
++   if(mailbox->sb_last_checked > sb->st_mtime && mailbox->msgcount != 0)
++       return; /* no check necessary */
++ 
++   ctx = mx_open_mailbox(mailbox->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL);
++   if(ctx)
++   {
++     mailbox->msgcount = ctx->msgcount;
++     mailbox->msg_unread = ctx->unread;
++     mailbox->msg_flagged = ctx->flagged;
++     mailbox->sb_last_checked = time(NULL);
++     mx_close_mailbox(ctx, 0);
++   }
++ }
++ 
+  int mutt_buffy_check (int force)
+  {
+    BUFFY *tmp;
+***************
+*** 461,477 ****
+        {
+        case M_MBOX:
+        case M_MMDF:
+  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
+  	  BuffyCount++;
+  	break;
+  
+        case M_MAILDIR:
+  	if (buffy_maildir_hasnew (tmp) > 0)
+  	  BuffyCount++;
+  	break;
+  
+        case M_MH:
+! 	mh_buffy(tmp);
+  	if (tmp->new)
+  	  BuffyCount++;
+  	break;
+--- 602,621 ----
+        {
+        case M_MBOX:
+        case M_MMDF:
++ 	buffy_mbox_update (tmp, &sb);
+  	if (buffy_mbox_hasnew (tmp, &sb) > 0)
+  	  BuffyCount++;
+  	break;
+  
+        case M_MAILDIR:
++ 	buffy_maildir_update (tmp);
+  	if (buffy_maildir_hasnew (tmp) > 0)
+  	  BuffyCount++;
+  	break;
+  
+        case M_MH:
+! 	mh_buffy_update (tmp->path, &tmp->msgcount, &tmp->msg_unread, &tmp->msg_flagged, &tmp->sb_last_checked);
+!         mh_buffy(tmp);
+  	if (tmp->new)
+  	  BuffyCount++;
+  	break;
+*** mutt-1.5.24-orig/buffy.h	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/buffy.h	2015-09-16 23:18:13.000000000 -0500
 ***************
 *** 23,35 ****
 --- 23,41 ----
@@ -255,19 +301,21 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   }
   BUFFY;
   
-*** mutt-1.5.23-orig/color.c.orig	2015-08-30 19:06:38.000000000 +0200
---- mutt-1.5.23/color.c	2015-09-10 09:34:06.000000000 +0200
-@@ -94,6 +94,8 @@
-   { "underline",	MT_COLOR_UNDERLINE },
-   { "index",		MT_COLOR_INDEX },
-   { "prompt",		MT_COLOR_PROMPT },
-+  { "sidebar_new",	MT_COLOR_NEW },
-+  { "sidebar_flagged",	MT_COLOR_FLAGGED },
-   { NULL,		0 }
- };
- 
-*** mutt-1.5.23-orig/compose.c	2014-03-12 11:03:45.000000000 -0500
---- mutt-1.5.23/compose.c	2014-04-12 12:15:56.000000000 -0500
+*** mutt-1.5.24-orig/color.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/color.c	2015-09-16 23:18:13.000000000 -0500
+***************
+*** 94,99 ****
+--- 94,101 ----
+    { "underline",	MT_COLOR_UNDERLINE },
+    { "index",		MT_COLOR_INDEX },
+    { "prompt",		MT_COLOR_PROMPT },
++   { "sidebar_new",	MT_COLOR_NEW },
++   { "sidebar_flagged",	MT_COLOR_FLAGGED },
+    { NULL,		0 }
+  };
+  
+*** mutt-1.5.24-orig/compose.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/compose.c	2015-09-16 23:18:13.000000000 -0500
 ***************
 *** 72,78 ****
   
@@ -303,16 +351,16 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0)
     {
 ***************
-*** 142,148 ****
-    }
+*** 145,151 ****
+        addstr (_(" (OppEnc mode)"));
   
     clrtoeol ();
 !   move (HDR_CRYPTINFO, 0);
     clrtoeol ();
   
     if ((WithCrypto & APPLICATION_PGP)
---- 142,148 ----
-    }
+--- 145,151 ----
+        addstr (_(" (OppEnc mode)"));
   
     clrtoeol ();
 !   move (HDR_CRYPTINFO, SidebarWidth);
@@ -320,7 +368,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
     if ((WithCrypto & APPLICATION_PGP)
 ***************
-*** 159,165 ****
+*** 162,168 ****
         && (msg->security & ENCRYPT)
         && SmimeCryptAlg
         && *SmimeCryptAlg) {
@@ -328,7 +376,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   		NONULL(SmimeCryptAlg));
     }
   }
---- 159,165 ----
+--- 162,168 ----
         && (msg->security & ENCRYPT)
         && SmimeCryptAlg
         && *SmimeCryptAlg) {
@@ -337,7 +385,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     }
   }
 ***************
-*** 172,178 ****
+*** 175,181 ****
     int c;
     char *t;
   
@@ -345,7 +393,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
     if (!chain)
     {
---- 172,178 ----
+--- 175,181 ----
     int c;
     char *t;
   
@@ -354,7 +402,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     if (!chain)
     {
 ***************
-*** 187,193 ****
+*** 190,196 ****
       if (t && t[0] == '0' && t[1] == '\0')
         t = "<random>";
       
@@ -362,7 +410,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
         break;
   
       addstr (NONULL(t));
---- 187,193 ----
+--- 190,196 ----
       if (t && t[0] == '0' && t[1] == '\0')
         t = "<random>";
       
@@ -371,7 +419,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
       addstr (NONULL(t));
 ***************
-*** 239,245 ****
+*** 242,248 ****
   
     buf[0] = 0;
     rfc822_write_address (buf, sizeof (buf), addr, 1);
@@ -379,7 +427,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     mutt_paddstr (W, buf);
   }
   
---- 239,245 ----
+--- 242,248 ----
   
     buf[0] = 0;
     rfc822_write_address (buf, sizeof (buf), addr, 1);
@@ -388,7 +436,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   }
   
 ***************
-*** 249,258 ****
+*** 252,261 ****
     draw_envelope_addr (HDR_TO, msg->env->to);
     draw_envelope_addr (HDR_CC, msg->env->cc);
     draw_envelope_addr (HDR_BCC, msg->env->bcc);
@@ -399,7 +447,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     mutt_paddstr (W, fcc);
   
     if (WithCrypto)
---- 249,258 ----
+--- 252,261 ----
     draw_envelope_addr (HDR_TO, msg->env->to);
     draw_envelope_addr (HDR_CC, msg->env->cc);
     draw_envelope_addr (HDR_BCC, msg->env->bcc);
@@ -411,7 +459,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
     if (WithCrypto)
 ***************
-*** 263,269 ****
+*** 266,272 ****
   #endif
   
     SETCOLOR (MT_COLOR_STATUS);
@@ -419,7 +467,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     clrtoeol ();
   
     NORMAL_COLOR;
---- 263,269 ----
+--- 266,272 ----
   #endif
   
     SETCOLOR (MT_COLOR_STATUS);
@@ -428,7 +476,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
     NORMAL_COLOR;
 ***************
-*** 299,305 ****
+*** 302,308 ****
     /* redraw the expanded list so the user can see the result */
     buf[0] = 0;
     rfc822_write_address (buf, sizeof (buf), *addr, 1);
@@ -436,7 +484,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     mutt_paddstr (W, buf);
     
     return 0;
---- 299,305 ----
+--- 302,308 ----
     /* redraw the expanded list so the user can see the result */
     buf[0] = 0;
     rfc822_write_address (buf, sizeof (buf), *addr, 1);
@@ -445,7 +493,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     
     return 0;
 ***************
-*** 544,550 ****
+*** 562,568 ****
   	if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
   	{
   	  mutt_str_replace (&msg->env->subject, buf);
@@ -453,7 +501,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	  if (msg->env->subject)
   	    mutt_paddstr (W, msg->env->subject);
   	  else
---- 544,550 ----
+--- 562,568 ----
   	if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
   	{
   	  mutt_str_replace (&msg->env->subject, buf);
@@ -462,7 +510,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	    mutt_paddstr (W, msg->env->subject);
   	  else
 ***************
-*** 562,568 ****
+*** 580,586 ****
   	{
   	  strfcpy (fcc, buf, fcclen);
   	  mutt_pretty_mailbox (fcc, fcclen);
@@ -470,7 +518,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	  mutt_paddstr (W, fcc);
   	  fccSet = 1;
   	}
---- 562,568 ----
+--- 580,586 ----
   	{
   	  strfcpy (fcc, buf, fcclen);
   	  mutt_pretty_mailbox (fcc, fcclen);
@@ -478,11 +526,11 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	  mutt_paddstr (W, fcc);
   	  fccSet = 1;
   	}
-*** mutt-1.5.23-orig/configure.ac	2014-03-12 11:26:40.000000000 -0500
---- mutt-1.5.23/configure.ac	2014-04-11 10:14:01.000000000 -0500
+*** mutt-1.5.24-orig/configure.ac	2015-08-30 12:24:20.000000000 -0500
+--- mutt-1.5.24/configure.ac	2015-09-16 23:18:13.000000000 -0500
 ***************
-*** 1276,1281 ****
---- 1276,1283 ----
+*** 1302,1307 ****
+--- 1302,1309 ----
     AC_DEFINE(HAVE_LANGINFO_YESEXPR,1,[ Define if you have <langinfo.h> and nl_langinfo(YESEXPR). ])
   fi
   
@@ -491,8 +539,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   dnl Documentation tools
   have_openjade="no"
   AC_PATH_PROG([OSPCAT], [ospcat], [none])
-*** mutt-1.5.23-orig/curs_main.c	2014-03-12 11:06:17.000000000 -0500
---- mutt-1.5.23/curs_main.c	2014-04-12 21:45:21.000000000 -0500
+*** mutt-1.5.24-orig/curs_main.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/curs_main.c	2015-09-16 23:18:13.000000000 -0500
 ***************
 *** 26,32 ****
 --- 26,34 ----
@@ -506,7 +554,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   #ifdef USE_POP
   #include "pop.h"
 ***************
-*** 519,538 ****
+*** 596,615 ****
          menu->redraw |= REDRAW_STATUS;
        if (do_buffy_notify)
        {
@@ -527,7 +575,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
       }
   
       if (menu->menu == MENU_MAIN)
---- 521,551 ----
+--- 598,628 ----
          menu->redraw |= REDRAW_STATUS;
        if (do_buffy_notify)
        {
@@ -560,8 +608,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   
       if (menu->menu == MENU_MAIN)
 ***************
-*** 554,562 ****
---- 567,578 ----
+*** 631,639 ****
+--- 644,655 ----
   
         if (menu->redraw & REDRAW_STATUS)
         {
@@ -575,7 +623,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	NORMAL_COLOR;
   	menu->redraw &= ~REDRAW_STATUS;
 ***************
-*** 569,575 ****
+*** 653,659 ****
   	menu->oldcurrent = -1;
   
         if (option (OPTARROWCURSOR))
@@ -583,7 +631,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
         else if (option (OPTBRAILLEFRIENDLY))
   	move (menu->current - menu->top + menu->offset, 0);
         else
---- 585,591 ----
+--- 669,675 ----
   	menu->oldcurrent = -1;
   
         if (option (OPTARROWCURSOR))
@@ -592,8 +640,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	move (menu->current - menu->top + menu->offset, 0);
         else
 ***************
-*** 1011,1016 ****
---- 1027,1033 ----
+*** 1095,1100 ****
+--- 1111,1117 ----
   	  break;
   
   	CHECK_MSGCOUNT;
@@ -602,8 +650,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	{
   	  int oldvcount = Context->vcount;
 ***************
-*** 1070,1075 ****
---- 1087,1093 ----
+*** 1154,1159 ****
+--- 1171,1177 ----
   	  menu->redraw = REDRAW_FULL;
   	break;
   
@@ -612,7 +660,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
         case OP_MAIN_NEXT_UNREAD_MAILBOX:
   
 ***************
-*** 1101,1107 ****
+*** 1185,1191 ****
   	{
   	  mutt_buffy (buf, sizeof (buf));
   
@@ -620,7 +668,7 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	  {
   	    if (menu->menu == MENU_PAGER)
   	    {
---- 1119,1129 ----
+--- 1203,1213 ----
   	{
   	  mutt_buffy (buf, sizeof (buf));
   
@@ -633,8 +681,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	    if (menu->menu == MENU_PAGER)
   	    {
 ***************
-*** 1119,1124 ****
---- 1141,1147 ----
+*** 1203,1208 ****
+--- 1225,1231 ----
   	}
   
   	mutt_expand_path (buf, sizeof (buf));
@@ -643,8 +691,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   	{
   	  mutt_error (_("%s is not a mailbox."), buf);
 ***************
-*** 2209,2214 ****
---- 2232,2243 ----
+*** 2293,2298 ****
+--- 2316,2327 ----
   	mutt_what_key();
   	break;
   
@@ -657,8 +705,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
         default:
   	if (menu->menu == MENU_MAIN)
   	  km_error_key (MENU_MAIN);
-*** mutt-1.5.23-orig/flags.c	2014-03-12 11:03:45.000000000 -0500
---- mutt-1.5.23/flags.c	2014-04-11 10:14:01.000000000 -0500
+*** mutt-1.5.24-orig/flags.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/flags.c	2015-09-16 23:18:13.000000000 -0500
 ***************
 *** 22,29 ****
 --- 22,31 ----
@@ -682,8 +730,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   }
   
   void mutt_tag_set_flag (int flag, int bf)
-*** mutt-1.5.23-orig/functions.h	2014-03-12 11:03:45.000000000 -0500
---- mutt-1.5.23/functions.h	2014-04-11 10:14:01.000000000 -0500
+*** mutt-1.5.24-orig/functions.h	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/functions.h	2015-09-16 23:18:13.000000000 -0500
 ***************
 *** 169,174 ****
 --- 169,179 ----
@@ -712,11 +760,11 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
     { NULL,		0,				NULL }
   };
   
-*** mutt-1.5.23-orig/globals.h	2014-03-12 11:06:17.000000000 -0500
---- mutt-1.5.23/globals.h	2014-04-11 10:14:01.000000000 -0500
+*** mutt-1.5.24-orig/globals.h	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/globals.h	2015-09-16 23:18:13.000000000 -0500
 ***************
-*** 117,122 ****
---- 117,125 ----
+*** 118,123 ****
+--- 118,126 ----
   WHERE char *SendCharset;
   WHERE char *Sendmail;
   WHERE char *Shell;
@@ -727,8 +775,8 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   WHERE char *SimpleSearch;
   #if USE_SMTP
 ***************
-*** 208,213 ****
---- 211,219 ----
+*** 213,218 ****
+--- 216,224 ----
   WHERE short ScoreThresholdRead;
   WHERE short ScoreThresholdFlag;
   
@@ -738,91 +786,98 @@ diff -uNp -r mutt-1.5.22.orig/buffy.c mu
   #ifdef USE_IMAP
   WHERE short ImapKeepalive;
   WHERE short ImapPipelineDepth;
-*** mutt-1.5.23-orig/handler.c.orig	2015-09-10 09:34:53.000000000 +0200
---- mutt-1.5.23/handler.c	2015-09-10 09:58:03.000000000 +0200
-@@ -1625,6 +1625,11 @@
-   int decode = 0;
-   int rc = 0;
- 
-+#ifdef HAVE_FMEMOPEN
-+  char *temp;
-+  size_t tempsize;
-+#endif
-+
-   fseeko (s->fpin, b->offset, 0);
- 
-   /* see if we need to decode this part before processing it */
-@@ -1642,6 +1647,14 @@
-     {
-       /* decode to a tempfile, saving the original destination */
-       fp = s->fpout;
-+#ifdef HAVE_FMEMOPEN
-+	if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
-+	{
-+	  mutt_error _("Unable to open memory stream!");
-+	  dprint (1, (debugfile, "Can't open memory stream.\n"));
-+	  goto bail;
-+	}
-+#else
-       mutt_mktemp (tempfile, sizeof (tempfile));
-       if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
-       {
-@@ -1649,6 +1662,7 @@
-         dprint (1, (debugfile, "Can't open %s.\n", tempfile));
-         return -1;
-       }
-+#endif
-       /* decoding the attachment changes the size and offset, so save a copy
-         * of the "real" values now, and restore them after processing
-         */
-@@ -1677,8 +1691,19 @@
-       /* restore final destination and substitute the tempfile for input */
-       s->fpout = fp;
-       fp = s->fpin;
-+#ifdef HAVE_FMEMOPEN
-+	if(tempsize)
-+		s->fpin = fmemopen(temp, tempsize, "r");
-+	else /* fmemopen cannot handle zero-length buffers */
-+		s->fpin = safe_fopen ("/dev/null", "r");
-+	if(s->fpin == NULL) {
-+		mutt_perror("failed to re-open memstream!");
-+		return (-1);
-+	}
-+#else
-       s->fpin = fopen (tempfile, "r");
-       unlink (tempfile);
-+#endif
- 
-       /* restore the prefix */
-       s->prefix = savePrefix;
-@@ -1704,9 +1729,14 @@
- 
-       /* restore the original source stream */
-       safe_fclose (&s->fpin);
-+#ifdef HAVE_FMEMOPEN
-+	if(tempsize)
-+	    FREE(&temp);
-+#endif
-       s->fpin = fp;
-     }
-   }
-+  bail:
-   s->flags |= M_FIRSTDONE;
- 
-   return rc;
-@@ -1743,6 +1773,7 @@
-   handler_t handler = NULL;
-   int rc = 0;
- 
-+
-   int oflags = s->flags;
-   
-   /* first determine which handler to use to process this part */
-*** mutt-1.5.23-orig/init.h	2014-03-12 11:06:17.000000000 -0500
---- mutt-1.5.23/init.h	2014-04-11 10:14:01.000000000 -0500
+*** mutt-1.5.24-orig/handler.c	2015-08-30 12:06:38.000000000 -0500
+--- mutt-1.5.24/handler.c	2015-09-16 23:18:13.000000000 -0500
+***************
+*** 1603,1608 ****
+--- 1603,1613 ----
+  
+    fseeko (s->fpin, b->offset, 0);
+  
++ #ifdef HAVE_FMEMOPEN
++   char *temp;
++   size_t tempsize;
++ #endif
++ 
+    /* see if we need to decode this part before processing it */
+    if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE ||
+        b->encoding == ENCUUENCODED || plaintext ||
+***************
+*** 1618,1623 ****
+--- 1623,1636 ----
+      {
+        /* decode to a tempfile, saving the original destination */
+        fp = s->fpout;
++ #ifdef HAVE_FMEMOPEN
++      if ((s->fpout = open_memstream(&temp, &tempsize)) == NULL)
++      {
++        mutt_error _("Unable to open memory stream!");
++        dprint (1, (debugfile, "Can't open memory stream.\n"));
++        return -1;
++      }
++ #else
+        mutt_mktemp (tempfile, sizeof (tempfile));
+        if ((s->fpout = safe_fopen (tempfile, "w")) == NULL)
+        {
+***************
+*** 1625,1630 ****

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601280841.u0S8fuwu098334>