Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tcsh for openSUSE:Factory checked in 
at 2023-07-15 23:15:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tcsh (Old)
 and      /work/SRC/openSUSE:Factory/.tcsh.new.3193 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tcsh"

Sat Jul 15 23:15:02 2023 rev:93 rq:1098668 version:6.24.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/tcsh/tcsh.changes        2023-04-18 
15:52:05.597143865 +0200
+++ /work/SRC/openSUSE:Factory/.tcsh.new.3193/tcsh.changes      2023-07-15 
23:15:08.395508127 +0200
@@ -1,0 +2,8 @@
+Fri Jul 14 11:29:02 UTC 2023 - Dr. Werner Fink <[email protected]>
+
+- (Re)add patch tcsh-6.24.10-history-merge.dif
+  * which is port of an old patch as the problem was not gone
+  * Make it possible to merge current history with already
+    written history
+
+-------------------------------------------------------------------

New:
----
  tcsh-6.24.10-history-merge.dif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tcsh.spec ++++++
--- /var/tmp/diff_new_pack.998VeF/_old  2023-07-15 23:15:09.239513078 +0200
+++ /var/tmp/diff_new_pack.998VeF/_new  2023-07-15 23:15:09.247513124 +0200
@@ -31,6 +31,7 @@
 Patch0:         tcsh-6.21.00.dif
 Patch1:         tcsh-6.15.00-pipe.dif
 Patch2:         tcsh-6.16.00-norm-cmd.dif
+Patch3:         tcsh-6.24.10-history-merge.dif
 Patch4:         tcsh-6.18.03-colorls.dif
 Patch5:         tcsh-6.17.06-dspmbyte.dif
 Patch6:         tcsh-6.18.03-catalogs.dif
@@ -57,6 +58,7 @@
 %setup -q
 %patch1      -b .pipe
 %patch2      -b .normcmd
+%patch3      -b .merge
 %patch4      -b .colorls
 %patch5      -b .dspmbyte
 %patch6      -b .catalogs

++++++ tcsh-6.24.10-history-merge.dif ++++++
---
 sh.hist.c |   22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

--- sh.hist.c
+++ sh.hist.c   2023-07-13 09:18:13.149624778 +0000
@@ -105,7 +105,7 @@ hremove(struct Hist *hp)
 
 /* Prune length of history list to specified size by history variable. */
 PG_STATIC void
-discardExcess(int hlen)
+discardExcess(int hlen, int mflg)
 {
     struct Hist *hp, *np;
     if (histTail == NULL) {
@@ -116,13 +116,13 @@ discardExcess(int hlen)
      * the list is still too long scan the whole list as before.  But only do a
      * full scan if the list is more than 6% (1/16th) too long. */
     while (histCount > (unsigned)hlen && (np = Histlist.Hnext)) {
-        if (eventno - np->Href >= hlen || hlen == 0)
+        if ((eventno - np->Href >= hlen || hlen == 0) && !mflg)
             hremove(np), hfree(np);
         else
             break;
     }
     while (histCount > (unsigned)hlen && (np = histTail) != &Histlist) {
-        if (eventno - np->Href >= hlen || hlen == 0)
+        if (eventno - np->Href >= hlen || hlen == 0 || mflg)
             hremove(np), hfree(np);
         else
             break;
@@ -148,7 +148,7 @@ savehist(
        return;
     if (sp)
         (void) enthist(++eventno, sp, 1, mflg, histlen);
-    discardExcess(histlen);
+    discardExcess(histlen, mflg);
 }
 
 #define USE_JENKINS_HASH 1
@@ -1404,6 +1404,18 @@ loadhist(Char *fname, int mflg)
 void
 sethistory(int n)
 {
+    int mflg = 0;
+    struct varent *shist;
+
+    if ((shist = adrof(STRsavehist)) != NULL && shist->vec != NULL) {
+       size_t i;
+       for (i = 1; shist->vec[i]; i++) {
+           if (eq(shist->vec[i], STRmerge)) {
+               mflg++;
+               break;
+           }
+       }
+    }
     histlen = n;
-    discardExcess(histlen);
+    discardExcess(histlen, mflg);
 }

Reply via email to