[comp.emacs] GNU Emacs on sun-4

peck@SUN.COM (09/17/87)

  There is a bug in pre-18.44 scroll.c that causes emacs to bomb on sun-4
If you don't have 18.48, this simple patch will help:


190,192c190
< 	    cost1 = p1->insertcost + 
< 	      (i - p1->insertcount >= 0 ?
< 	       next_insert_cost[i - p1->insertcount] : 0);
- ---
> 	    cost1 = p1->insertcost + next_insert_cost[i - p1->insertcount];

rms@PREP.AI.MIT.EDU.UUCP (09/17/87)

This patch in scroll.c does not really fix the problem.  It detects
and ignores invalid data resulting from an unknown bug.  This cure for
one manifestation will not necessarily fix them all.

The only way it can be fixed properly is if someone can find the real
bug, or else tell me how to reproduce the problem.  To this end,
please do not install this patch.

jkf@frisky.UUCP (John Foderaro) (09/17/87)

 
 I believe that the following is the real fix for the scrolling
problem (which is a bug on all machines but a killer on sun4s):

In calculate_scrolling (scroll.c) look for this initialization code
and make the change noted:


  for (j = 1; j <= window_size; j++)
    {
      cost += next_delete_cost[j];
      matrix[j].deletecost = cost;
      matrix[j].writecost = INFINITY;
      matrix[j].insertcost = INFINITY;
      matrix[j].deletecount = j;
      matrix[j].insertcount = 0;  /* jkf fix, was j */
    }


This is from version 18.37 and may look different in other versions.


-john foderaro