Dr. Werner Fink 2013-10-15 17:08:10 +00:00 committed by Git OBS Bridge
parent c56d337e97
commit bd223a4438
3 changed files with 46 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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