Hello,

   The following patch allows winX11 not to segfault when displaying
particularly large function tables.  The fix trades one very sleight visual
inaccuracy for another, -for one that at least doesn't cause csound to
crash!  The patch applies equally well to both the canonical and unofficial
Linux versions.

   David Ogborn
   Winnipeg, Canada.

--- pristine/winX11.c   Sat Jul 24 10:18:34 1999
+++ dpo/winX11.c        Mon Apr  3 23:41:50 2000
@@ -255,8 +255,9 @@
        pts_pls = 1;
     }
     else {
-       pts_pls = 1 + (npts/MAXLSEGS);
-       lsegs = ((long)npts + pts_pls - 1)/(long)pts_pls;
+       pts_pls = npts/MAXLSEGS;
+       if(npts%MAXLSEGS)pts_pls++;
+       lsegs = npts/pts_pls;
     }
 
     /* THIS ASSIGNMENT ASSUMES LONG INT FOR NPTS > 32767 */



Reply via email to