back->size();
void term_size(int newrows, int newcols, int newsavelines){    tree234 *newalt;    unsigned long *newdisp, *line;    int i, j;    int sblen;    int save_alt_which = alt_which;    if (newrows == rows && newcols == cols && newsavelines == savelines)	return;			       /* nothing to do */    deselect();    swap_screen(0);    alt_t = marg_t = 0;    alt_b = marg_b = newrows - 1;    if (rows == -1) {	scrollback = newtree234(NULL);	screen = newtree234(NULL);	rows = 0;    }    /*     * Resize the screen and scrollback. We only need to shift     * lines around within our data structures, because lineptr()     * will take care of resizing each individual line if     * necessary. So:     *      *  - If the new screen and the old screen differ in length, we     *    must shunt some lines in from the scrollback or out to     *    the scrollback.     *      *  - If doing that fails to provide us with enough material to     *    fill the new screen (i.e. the number of rows needed in     *    the new screen exceeds the total number in the previous     *    screen+scrollback), we must invent some blank lines to     *    cover the gap.     *      *  - Then, if the new scrollback length is less than the     *    amount of scrollback we actually have, we must throw some     *    away.     */    sblen = count234(scrollback);    /* Do this loop to expand the screen if newrows > rows */    for (i = rows; i < newrows; i++) {	if (sblen > 0) {	    line = delpos234(scrollback, --sblen);	} else {	    line = smalloc(TSIZE * (newcols + 2));	    line[0] = newcols;	    for (j = 0; j <= newcols; j++)		line[j + 1] = ERASE_CHAR;	}	addpos234(screen, line, 0);    }    /* Do this loop to shrink the screen if newrows < rows */    for (i = newrows; i < rows; i++) {	line = delpos234(screen, 0);	addpos234(scrollback, line, sblen++);    }    assert(count234(screen) == newrows);    while (sblen > newsavelines) {	line = delpos234(scrollback, 0);	sfree(line);	sblen--;    }    assert(count234(scrollback) <= newsavelines);    disptop = 0;    newdisp = smalloc(newrows * (newcols + 1) * TSIZE);    for (i = 0; i < newrows * (newcols + 1); i++)	newdisp[i] = ATTR_INVALID;    sfree(disptext);    disptext = newdisp;    dispcurs = NULL;    newalt = newtree234(NULL);    for (i = 0; i < newrows; i++) {	line = smalloc(TSIZE * (newcols + 2));	line[0] = newcols;	for (j = 0; j <= newcols; j++)	    line[j + 1] = erase_char;	addpos234(newalt, line, i);    }    if (alt_screen) {	while (NULL != (line = delpos234(alt_screen, 0)))	    sfree(line);	freetree234(alt_screen);    }    alt_screen = newalt;    tabs = srealloc(tabs, newcols * sizeof(*tabs));    {	int i;	for (i = (cols > 0 ? cols : 0); i < newcols; i++)	    tabs[i] = (i % 8 == 0 ? TRUE : FALSE);    }    if (rows > 0)	curs.y += newrows - rows;    if (curs.y < 0)	curs.y = 0;    if (curs.y >= newrows)	curs.y = newrows - 1;    if (curs.x >= newcols)	curs.x = newcols - 1;    alt_x = alt_y = 0;    wrapnext = alt_wnext = FALSE;    rows = newrows;    cols = newcols;    savelines = newsavelines;    fix_cpos;    swap_screen(save_alt_which);    update_sbar();    term_update();}