[packages/mutt/mutt-1.5.22] update db.patch and sidebar.patch to 1.5.22
draenog
draenog at pld-linux.org
Tue Oct 22 00:02:45 CEST 2013
commit 6ae778f841756fed0a07f0db3fccd9855bd41b24
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Mon Oct 21 21:02:10 2013 +0100
update db.patch and sidebar.patch to 1.5.22
mutt-db.patch | 10 +--
mutt-sidebar.patch | 180 +++++++++++++++++++++++++----------------------------
mutt.spec | 4 +-
3 files changed, 92 insertions(+), 102 deletions(-)
---
diff --git a/mutt.spec b/mutt.spec
index 4339190..956d75f 100644
--- a/mutt.spec
+++ b/mutt.spec
@@ -173,9 +173,9 @@ Mutt - це невеликий, але потужний повноекранни
%{?with_imap_recent:%patch18 -p1}
%patch19 -p1
%patch20 -p1
-# %patch21 -p1
+%patch21 -p1
%patch22 -p1
-# %patch23 -p1
+%patch23 -p1
%{?with_nntp:%patch24 -p1}
%patch25 -p1
diff --git a/mutt-db.patch b/mutt-db.patch
index bdc6889..b5b700f 100644
--- a/mutt-db.patch
+++ b/mutt-db.patch
@@ -1,11 +1,11 @@
--- mutt-1.5.21/configure.ac.orig 2012-04-06 17:33:23.905605556 +0200
+++ mutt-1.5.21/configure.ac 2012-04-07 07:42:20.793977750 +0200
-@@ -989,20 +989,20 @@
+@ -985,20 +985,20 @@
bdbpfx="$bdbpfx $d/$v"
done
done
-- BDB_VERSIONS="db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
-+ BDB_VERSIONS="db-5.3 db-5.2 db-5.1 db-5.0 db-5 db5 db-4.7 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4 db4 db ''"
+- BDB_VERSIONS="db-4 db4 db-5 db5 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
++ BDB_VERSIONS="db-5.3 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-5 db5 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4 db4 db ''"
AC_MSG_CHECKING([for BerkeleyDB > 4.0])
for d in $bdbpfx; do
BDB_INCLUDE_DIR=""
@@ -24,10 +24,10 @@
CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR"
- LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$l"
+ LIBS="$OLDLIBS $BDB_LIB_L -l$l"
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <db.h>
-@@ -1025,7 +1025,7 @@
+@@ -1021,7 +1021,7 @@
then
AC_MSG_RESULT(yes)
CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR"
diff --git a/mutt-sidebar.patch b/mutt-sidebar.patch
index eb73dfc..fe1f1a9 100644
--- a/mutt-sidebar.patch
+++ b/mutt-sidebar.patch
@@ -162,18 +162,18 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
-#define W (COLS - HDR_XOFFSET)
+#define W (COLS - HDR_XOFFSET - SidebarWidth)
- static char *Prompts[] =
+ static const char * const Prompts[] =
{
-@@ -112,7 +112,7 @@
- {
- int off = 0;
+@@ -110,7 +110,7 @@
+ static void redraw_crypt_lines (HEADER *msg)
+ {
- mvaddstr (HDR_CRYPT, 0, "Security: ");
+ mvaddstr (HDR_CRYPT, SidebarWidth, "Security: ");
if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0)
{
-@@ -144,7 +144,7 @@
+@@ -142,7 +142,7 @@
}
clrtoeol ();
@@ -182,16 +182,16 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
clrtoeol ();
if ((WithCrypto & APPLICATION_PGP)
-@@ -161,7 +161,7 @@
+@@ -159,7 +159,7 @@
&& (msg->security & ENCRYPT)
&& SmimeCryptAlg
&& *SmimeCryptAlg) {
- mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "),
+ mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "),
NONULL(SmimeCryptAlg));
- off = 20;
}
-@@ -175,7 +175,7 @@
+ }
+@@ -172,7 +172,7 @@
int c;
char *t;
@@ -200,7 +200,7 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
if (!chain)
{
-@@ -190,7 +190,7 @@
+@@ -187,7 +187,7 @@
if (t && t[0] == '0' && t[1] == '\0')
t = "<random>";
@@ -209,7 +209,7 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
break;
addstr (NONULL(t));
-@@ -242,7 +242,7 @@
+@@ -239,7 +239,7 @@
buf[0] = 0;
rfc822_write_address (buf, sizeof (buf), addr, 1);
@@ -218,7 +218,7 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
mutt_paddstr (W, buf);
}
-@@ -252,10 +252,10 @@
+@@ -249,10 +249,10 @@
draw_envelope_addr (HDR_TO, msg->env->to);
draw_envelope_addr (HDR_CC, msg->env->cc);
draw_envelope_addr (HDR_BCC, msg->env->bcc);
@@ -231,16 +231,16 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
mutt_paddstr (W, fcc);
if (WithCrypto)
-@@ -266,7 +266,7 @@
+@@ -263,7 +263,7 @@
#endif
SETCOLOR (MT_COLOR_STATUS);
- mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments"));
+ mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments"));
- BKGDSET (MT_COLOR_STATUS);
clrtoeol ();
-@@ -304,7 +304,7 @@
+ NORMAL_COLOR;
+@@ -299,7 +299,7 @@
/* redraw the expanded list so the user can see the result */
buf[0] = 0;
rfc822_write_address (buf, sizeof (buf), *addr, 1);
@@ -249,16 +249,16 @@ diff -urN mutt-1.5.21/compose.c mutt-1.5.21-sidebar/compose.c
mutt_paddstr (W, buf);
return 0;
-@@ -549,7 +549,7 @@
+@@ -544,7 +544,7 @@
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0)
{
mutt_str_replace (&msg->env->subject, buf);
- move (HDR_SUBJECT, HDR_XOFFSET);
+ move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth);
- clrtoeol ();
if (msg->env->subject)
mutt_paddstr (W, msg->env->subject);
-@@ -566,7 +566,7 @@
+ else
+@@ -562,7 +562,7 @@
{
strfcpy (fcc, buf, fcclen);
mutt_pretty_mailbox (fcc, fcclen);
@@ -303,21 +303,20 @@ diff -urN mutt-1.5.21/curs_main.c mutt-1.5.21-sidebar/curs_main.c
mutt_show_error ();
}
-@@ -554,10 +561,13 @@
+@@ -554,9 +561,12 @@
- if (menu->redraw & REDRAW_STATUS)
+ if ((menu->redraw & REDRAW_STATUS) || update_status_time ())
{
+ DrawFullLine = 1;
menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
+ DrawFullLine = 0;
- CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
+ move (option (OPTSTATUSONTOP) ? 0 : LINES-2, 0);
SETCOLOR (MT_COLOR_STATUS);
- BKGDSET (MT_COLOR_STATUS);
+ set_buffystats(Context);
mutt_paddstr (COLS, buf);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
-@@ -571,7 +581,7 @@
+ NORMAL_COLOR;
+ menu->redraw &= ~REDRAW_STATUS;
+@@ -569,7 +579,7 @@
menu->oldcurrent = -1;
if (option (OPTARROWCURSOR))
@@ -326,7 +325,7 @@ diff -urN mutt-1.5.21/curs_main.c mutt-1.5.21-sidebar/curs_main.c
else if (option (OPTBRAILLEFRIENDLY))
move (menu->current - menu->top + menu->offset, 0);
else
-@@ -1069,6 +1079,7 @@
+@@ -1070,6 +1080,7 @@
menu->redraw = REDRAW_FULL;
break;
@@ -334,7 +333,7 @@ diff -urN mutt-1.5.21/curs_main.c mutt-1.5.21-sidebar/curs_main.c
case OP_MAIN_CHANGE_FOLDER:
case OP_MAIN_NEXT_UNREAD_MAILBOX:
-@@ -1100,7 +1111,11 @@
+@@ -1101,7 +1112,11 @@
{
mutt_buffy (buf, sizeof (buf));
@@ -347,7 +346,7 @@ diff -urN mutt-1.5.21/curs_main.c mutt-1.5.21-sidebar/curs_main.c
{
if (menu->menu == MENU_PAGER)
{
-@@ -1118,6 +1133,7 @@
+@@ -1119,6 +1134,7 @@
}
mutt_expand_path (buf, sizeof (buf));
@@ -355,7 +354,7 @@ diff -urN mutt-1.5.21/curs_main.c mutt-1.5.21-sidebar/curs_main.c
if (mx_get_magic (buf) <= 0)
{
mutt_error (_("%s is not a mailbox."), buf);
-@@ -2208,6 +2224,12 @@
+@@ -2222,6 +2238,12 @@
mutt_what_key();
break;
@@ -585,9 +584,9 @@ diff -urN mutt-1.5.21/menu.c mutt-1.5.21-sidebar/menu.c
#include "mbyte.h"
+#include "sidebar.h"
- #include <string.h>
- #include <stdlib.h>
-@@ -156,7 +157,7 @@
+ extern size_t UngetCount;
+
+@@ -186,7 +187,7 @@
{
char *scratch = safe_strdup (s);
int shift = option (OPTARROWCURSOR) ? 3 : 0;
@@ -596,84 +595,76 @@ diff -urN mutt-1.5.21/menu.c mutt-1.5.21-sidebar/menu.c
mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1);
s[n - 1] = 0;
-@@ -207,6 +208,7 @@
- char buf[LONG_STRING];
- int i;
+@@ -239,6 +240,7 @@
+ int do_color;
+ int attr;
+ draw_sidebar(1);
for (i = menu->top; i < menu->top + menu->pagelen; i++)
{
if (i < menu->max)
-@@ -217,7 +219,7 @@
- if (option (OPTARROWCURSOR))
- {
- attrset (menu->color (i));
-- CLEARLINE (i - menu->top + menu->offset);
-+ CLEARLINE_WIN (i - menu->top + menu->offset);
+@@ -249,7 +251,7 @@
+ menu_pad_string (buf, sizeof (buf));
- if (i == menu->current)
- {
-@@ -246,14 +248,14 @@
- BKGDSET (MT_COLOR_INDICATOR);
- }
+ ATTRSET(attr);
+- move(i - menu->top + menu->offset, 0);
++ move(i - menu->top + menu->offset, SidebarWidth);
+ do_color = 1;
-- CLEARLINE (i - menu->top + menu->offset);
-+ CLEARLINE_WIN (i - menu->top + menu->offset);
- print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
- }
- }
+ if (i == menu->current)
+@@ -272,7 +274,7 @@
else
-- CLEARLINE (i - menu->top + menu->offset);
-+ CLEARLINE_WIN (i - menu->top + menu->offset);
+ {
+ NORMAL_COLOR;
+- CLEARLINE(i - menu->top + menu->offset);
++ CLEARLINE_WIN(i - menu->top + menu->offset);
+ }
}
- menu->redraw = 0;
- }
-@@ -268,7 +270,7 @@
+ NORMAL_COLOR;
+@@ -289,7 +291,7 @@
return;
}
- move (menu->oldcurrent + menu->offset - menu->top, 0);
+ move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
+ ATTRSET(menu->color (menu->oldcurrent));
-@@ -283,13 +285,13 @@
- clrtoeol ();
+ if (option (OPTARROWCURSOR))
+@@ -301,13 +303,13 @@
+ {
menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
menu_pad_string (buf, sizeof (buf));
- move (menu->oldcurrent + menu->offset - menu->top, 3);
+ move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3);
print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
- SETCOLOR (MT_COLOR_NORMAL);
}
/* now draw it in the new location */
-- move (menu->current + menu->offset - menu->top, 0);
-+ move (menu->current + menu->offset - menu->top, SidebarWidth);
- attrset (menu->color (menu->current));
- ADDCOLOR (MT_COLOR_INDICATOR);
- addstr ("->");
-@@ -310,7 +312,7 @@
- attrset (menu->color (menu->current));
- ADDCOLOR (MT_COLOR_INDICATOR);
- BKGDSET (MT_COLOR_INDICATOR);
-- CLEARLINE (menu->current - menu->top + menu->offset);
-+ CLEARLINE_WIN (menu->current - menu->top + menu->offset);
+ SETCOLOR(MT_COLOR_INDICATOR);
+- mvaddstr(menu->current + menu->offset - menu->top, 0, "->");
++ mvaddstr(menu->current + menu->offset - menu->top, SidebarWidth, "->");
+ }
+ else
+ {
+@@ -320,7 +322,7 @@
+ menu_make_entry (buf, sizeof (buf), menu, menu->current);
+ menu_pad_string (buf, sizeof (buf));
+ SETCOLOR(MT_COLOR_INDICATOR);
+- move(menu->current - menu->top + menu->offset, 0);
++ move(menu->current - menu->top + menu->offset, SidebarWidth);
print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
-@@ -322,7 +324,7 @@
- {
+ }
+ menu->redraw &= REDRAW_STATUS;
+@@ -332,7 +334,7 @@
char buf[LONG_STRING];
+ int attr = menu->color (menu->current);
- move (menu->current + menu->offset - menu->top, 0);
+ move (menu->current + menu->offset - menu->top, SidebarWidth);
menu_make_entry (buf, sizeof (buf), menu, menu->current);
menu_pad_string (buf, sizeof (buf));
-@@ -875,7 +877,7 @@
+@@ -872,7 +874,7 @@
if (option (OPTARROWCURSOR))
@@ -869,7 +860,7 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
/* FIXME: this should come from lineInfo */
memset(&mbstate, 0, sizeof(mbstate));
-@@ -1745,7 +1747,7 @@
+@@ -1809,7 +1811,7 @@
if ((redraw & REDRAW_BODY) || topline != oldtopline)
{
do {
@@ -878,7 +869,7 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
curline = oldtopline = topline;
lines = 0;
force_redraw = 0;
-@@ -1758,6 +1760,7 @@
+@@ -1822,6 +1824,7 @@
&QuoteList, &q_level, &force_redraw, &SearchRE) > 0)
lines++;
curline++;
@@ -886,25 +877,26 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
}
last_offset = lineInfo[curline].offset;
} while (force_redraw);
-@@ -1771,6 +1774,7 @@
+@@ -1834,6 +1837,7 @@
addch ('~');
addch ('\n');
lines++;
+ move(lines + bodyoffset, SidebarWidth);
}
- /* We are going to update the pager status bar, so it isn't
- * necessary to reset to normal color now. */
-@@ -1794,21 +1798,21 @@
+ NORMAL_COLOR;
+
+@@ -1857,22 +1861,22 @@
+ strfcpy(pager_progress_str, (topline == 0) ? "all" : "end", sizeof(pager_progress_str));
+
/* print out the pager status bar */
+- move (statusoffset, 0);
++ move (statusoffset, SidebarWidth);
SETCOLOR (MT_COLOR_STATUS);
- BKGDSET (MT_COLOR_STATUS);
-- CLEARLINE (statusoffset);
-+ CLEARLINE_WIN (statusoffset);
if (IsHeader (extra) || IsMsgAttach (extra))
{
- size_t l1 = COLS * MB_LEN_MAX;
-+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX;
++ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX;
size_t l2 = sizeof (buffer);
hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr;
mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT);
@@ -918,9 +910,9 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
- mutt_paddstr (COLS, bn);
+ mutt_paddstr (COLS, IsHeader (extra) || IsMsgAttach (extra) ? buffer : banner);
}
- BKGDSET (MT_COLOR_NORMAL);
- SETCOLOR (MT_COLOR_NORMAL);
-@@ -1819,18 +1823,25 @@
+ NORMAL_COLOR;
+ }
+@@ -1882,16 +1886,23 @@
/* redraw the pager_index indicator, because the
* flags for this message might have changed. */
menu_redraw_current (index);
@@ -934,11 +926,9 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
- move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0);
+ move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth);
SETCOLOR (MT_COLOR_STATUS);
- BKGDSET (MT_COLOR_STATUS);
- mutt_paddstr (COLS, buffer);
+ mutt_paddstr (COLS-SidebarWidth, buffer);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
+ NORMAL_COLOR;
}
+ /* if we're not using the index, update every time */
@@ -948,7 +938,7 @@ diff -urN mutt-1.5.21/pager.c mutt-1.5.21-sidebar/pager.c
redraw = 0;
if (option(OPTBRAILLEFRIENDLY)) {
-@@ -2756,6 +2765,13 @@
+@@ -2848,6 +2859,13 @@
mutt_what_key ();
break;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mutt.git/commitdiff/6ae778f841756fed0a07f0db3fccd9855bd41b24
More information about the pld-cvs-commit
mailing list