int sbtop = -count234(term->scrollback);
int sbtop = -sblines(term);
void term_scroll(Terminal *term, int rel, int where){    int sbtop = -count234(term->scrollback);#ifdef OPTIMISE_SCROLL    int olddisptop = term->disptop;    int shift;#endif /* OPTIMISE_SCROLL */    term->disptop = (rel < 0 ? 0 : rel > 0 ? sbtop : term->disptop) + where;    if (term->disptop < sbtop)	term->disptop = sbtop;    if (term->disptop > 0)	term->disptop = 0;    update_sbar(term);#ifdef OPTIMISE_SCROLL    shift = (term->disptop - olddisptop);    if (shift < term->rows && shift > -term->rows)	scroll_display(term, 0, term->rows - 1, shift);#endif /* OPTIMISE_SCROLL */    term_update(term);}