void redrawscreen(void) /* Displays the entire screen */ { setrightcol(); setbottomrow(); writef(1, 1, MSGMEMORYCOLOR, strlen(MSGMEMORY), MSGMEMORY); writef(29, 1, PROMPTCOLOR, strlen(MSGCOMMAND), MSGCOMMAND); changeautocalc(autocalc); changeformdisplay(formdisplay); printfreemem(); displayscreen(NOUPDATE); } /* redrawscreen */
void gotocell() /* Moves to a selected cell */ { writeprompt(MSGGOTO); if (!getcell(&curcol, &currow)) return; leftcol = curcol; toprow = currow; setbottomrow(); setrightcol(); setleftcol(); displayscreen(NOUPDATE); } /* gotocell */
void moverowup(void) /* Moves up 1 row */ { displaycell(curcol, currow, NOHIGHLIGHT, NOUPDATE); if (currow > toprow) currow--; else if (toprow != 0) { scroll(DOWN, 1, LEFTMARGIN + 1, 3, 80, SCREENROWS + 2, WHITE); displayrow(--toprow, NOUPDATE); currow--; setbottomrow(); } } /* moverowup */
void moverowdown(void) /* Moves down one row */ { displaycell(curcol, currow, NOHIGHLIGHT, NOUPDATE); if (currow < bottomrow) currow++; else if (bottomrow < (MAXROWS - 1)) { scroll(UP, 1, LEFTMARGIN + 1, 3, 80, SCREENROWS + 2, WHITE); toprow++; currow++; setbottomrow(); displayrow(bottomrow, NOUPDATE); } } /* moverowdown */
void clearsheet(void) /* Clears the current spreadsheet */ { int col, row; for (row = 0; row <= lastrow; row++) { for (col = 0; col <= lastcol; col++) deletecell(col, row, NOUPDATE); } initvars(); setrightcol(); setbottomrow(); displayscreen(NOUPDATE); printfreemem(); changed = FALSE; } /* clearsheet */