scroll_results[index].time = dnow();
int scrollability(Window win, int set) {	double oldest = -1.0;	int i, index = -1, next_index = -1;	if (win == None) {		return 0;	}	if (set == SCR_NONE) {		/* lookup case */		for (i=0; i<SCR_RESULTS_MAX; i++) {			if (win == scroll_results[i].win) {				return scroll_results[i].result;			}		}		return 0;	}	for (i=0; i<SCR_RESULTS_MAX; i++) {		if (oldest == -1.0 || scroll_results[i].time < oldest) {			next_index = i;			oldest = scroll_results[i].time;		}		if (win == scroll_results[i].win) {			index = i;			break;		}	}	if (set == SCR_SUCCESS) {		set = 1;	} else if (set == SCR_FAIL) {		set = -1;	} else {		set = 0;	}	if (index == -1) {		scroll_results[next_index].win = win;		scroll_results[next_index].time = dnow();		scroll_results[next_index].result = set;	} else {		if (scroll_results[index].result == 1) {			/*			 * once a success, always a success, until they			 * forget about us...			 */			set = 1;		} else {			scroll_results[index].time = dnow();			scroll_results[index].result = set;		}	}	return set;}