From bd223a4438a05b74afde4aca23096355317fe7a76a120e746fd94878b76455ad Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 15 Oct 2013 17:08:10 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=46 --- tcsh-6.18.01-history-merge.dif | 38 ++++++++++++++++++++++++++++++++++ tcsh.changes | 6 ++++++ tcsh.spec | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 tcsh-6.18.01-history-merge.dif diff --git a/tcsh-6.18.01-history-merge.dif b/tcsh-6.18.01-history-merge.dif new file mode 100644 index 0000000..00528e3 --- /dev/null +++ b/tcsh-6.18.01-history-merge.dif @@ -0,0 +1,38 @@ +--- sh.hist.c ++++ sh.hist.c 2013-10-15 17:04:45.518796367 +0000 +@@ -107,7 +107,7 @@ hremove(struct Hist *hp) + + /* Prune length of history list to specified size by history variable. */ + PG_STATIC void +-discardExcess(int histlen) ++discardExcess(int histlen, int mflg) + { + struct Hist *hp, *np; + if (histTail == NULL) { +@@ -124,7 +124,7 @@ discardExcess(int histlen) + break; + } + while (histCount > (unsigned)histlen && (np = histTail) != &Histlist) { +- if (eventno - np->Href >= histlen || histlen == 0) ++ if ((eventno - np->Href >= histlen || histlen == 0) && !mflg) + hremove(np), hfree(np); + else + break; +@@ -133,7 +133,7 @@ discardExcess(int histlen) + return; /* don't bother doing the full scan */ + for (hp = &Histlist; histCount > (unsigned)histlen && + (np = hp->Hnext) != NULL;) +- if (eventno - np->Href >= histlen || histlen == 0) ++ if (eventno - np->Href >= histlen || histlen == 0 || mflg) + hremove(np), hfree(np); + else + hp = np; +@@ -161,7 +161,7 @@ savehist( + } + if (sp) + (void) enthist(++eventno, sp, 1, mflg, histlen); +- discardExcess(histlen); ++ discardExcess(histlen, mflg); + } + + #define USE_JENKINS_HASH 1 diff --git a/tcsh.changes b/tcsh.changes index 7e10219..77091b5 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 15 17:05:54 UTC 2013 - werner@suse.de + +- Add patch tcsh-6.18.01-history-merge.dif which is a backport of + the patch from Stanislav Tokos (bnc#844752) + ------------------------------------------------------------------- Tue Aug 6 12:37:27 UTC 2013 - werner@suse.de diff --git a/tcsh.spec b/tcsh.spec index ec717ab..92b057d 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -41,6 +41,7 @@ Patch5: tcsh-6.17.06-dspmbyte.dif Patch6: tcsh-6.17.10-catalogs.dif Patch7: tcsh-6.18.01-blk_buf.patch Patch8: tcsh-6.18.01-metakey.patch +Patch9: tcsh-6.18.01-history-merge.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -77,6 +78,7 @@ Provides translations to the package tcsh %patch6 -p0 -b .catalogs %patch7 -p0 -b .blk_buf %patch8 -p0 -b .metakey +%patch9 -p0 -b .history %patch -b .0 %build