fix_cpos;
static void save_cursor(Terminal *term, int save){    if (save) {	term->savecurs = term->curs;	term->save_attr = term->curr_attr;	term->save_cset = term->cset;	term->save_utf = term->utf;	term->save_wnext = term->wrapnext;	term->save_csattr = term->cset_attr[term->cset];	term->save_sco_acs = term->sco_acs;    } else {	term->curs = term->savecurs;	/* Make sure the window hasn't shrunk since the save */	if (term->curs.x >= term->cols)	    term->curs.x = term->cols - 1;	if (term->curs.y >= term->rows)	    term->curs.y = term->rows - 1;	term->curr_attr = term->save_attr;	term->cset = term->save_cset;	term->utf = term->save_utf;	term->wrapnext = term->save_wnext;	/*	 * wrapnext might reset to False if the x position is no	 * longer at the rightmost edge.	 */	if (term->wrapnext && term->curs.x < term->cols-1)	    term->wrapnext = FALSE;	term->cset_attr[term->cset] = term->save_csattr;	term->sco_acs = term->save_sco_acs;	fix_cpos;	set_erase_char(term);    }}