if (curs_x >= cols) curs_x = cols-1; if (curs_y >= rows) curs_y = rows-1;
static void save_cursor(int save) {    if (save) {	save_x = curs_x;	save_y = curs_y;	save_attr = curr_attr;	save_cset = cset;	save_csattr = cset_attr[cset];    } else {	curs_x = save_x;	curs_y = save_y;	curr_attr = save_attr;	cset = save_cset;	cset_attr[cset] = save_csattr;	fix_cpos;        if (use_bce) erase_char = (' ' |(curr_attr&(ATTR_FGMASK|ATTR_BGMASK)));    }}