Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!arizona!wendt From: wendt@arizona.edu (Alan Lee Wendt) Newsgroups: comp.sources.bugs Subject: sc 5.1 bugfix Keywords: bug,fix,sc Message-ID: <7034@megaron.arizona.edu> Date: 13 Sep 88 19:33:01 GMT Organization: U of Arizona CS Dept, Tucson Lines: 126 Here's a patch for what is either a bug in sc 5.1 or my curses. On my system, if you go to the bottom of the worksheet with 999 down-arrow, it positions the last line of the worksheet at the middle of the page and doesn't erase the bottom of the page. I fixed this by positioning the last line of the sheet at the last line of the page if necessary, so now the only lurking bug is if there are fewer visible lines in the worksheet than there are in the screen, but in that case the bottom of the screen should be blank anyway. For 999 right-arrow, it positions the rightmost worksheet column at the middle screen column and erases the right-hand side of the page, so I left that alone. There are also a couple cosmetic changes and some stuff to make the data area take up less room on my PC. As the changes are not tested anywhere but on my system, be careful! I tried to send this to rgb privately before worldwide distribution, but the mail bounced, so here it is: Alan W. sc version 5.1 *** sc.c Mon Sep 12 20:38:24 1988 --- newsc.c Tue Sep 13 01:19:24 1988 *************** *** 46,52 **** int FullUpdate; int maxrow, maxcol; int fwidth[MAXCOLS]; ! int precision[MAXCOLS]; char col_hidden[MAXCOLS]; char row_hidden[MAXROWS]; char line[1000]; --- 46,52 ---- int FullUpdate; int maxrow, maxcol; int fwidth[MAXCOLS]; ! unsigned char precision[MAXCOLS]; char col_hidden[MAXCOLS]; char row_hidden[MAXROWS]; char line[1000]; *************** *** 189,202 **** } } /* Now - same process on the rows */ if (strow <= currow) { for (i = strow, rows = 0, row=RESROW; row= 0 && row-1 > RESROW; i--) { strow--; ! if (row_hidden[i]) ! continue; ! row--; } } /* Now pick up the counts again */ for (i = strow, rows = 0, row=RESROW; row