BOOL on_screen = (tentative_result > HTMainText->top_of_screen &&
BOOL on_screen = (BOOL) (tentative_result > HTMainText->top_of_screen &&
PRIVATE void adjust_search_result ARGS3(    document *,	doc,    int,	tentative_result,    int,	start_line){    if (tentative_result > 0) {	int anch_line = -1;	TextAnchor * a;	int nl_closest = -1;	int goal = SEARCH_GOAL_LINE;	int max_offset;	BOOL on_screen = (tentative_result > HTMainText->top_of_screen &&	    tentative_result <= HTMainText->top_of_screen+display_lines);	if (goal < 1)	    goal = 1;	else if (goal > display_lines)	    goal = display_lines;	max_offset = goal - 1;	if (on_screen && nlinks > 0) {	    int i;	    for (i = 0; i < nlinks; i++) {		if (doc->line + links[i].ly - 1 <= tentative_result)		    nl_closest = i;		if (doc->line + links[i].ly - 1 >= tentative_result)		    break;	    }	    if (nl_closest >= 0 &&		doc->line + links[nl_closest].ly - 1 == tentative_result) {		www_search_result = doc->line;		doc->link = nl_closest;		return;	    }	}	/* find last anchor before or on target line */	for (a = HTMainText->first_anchor;	     a && a->line_num <= tentative_result-1; a = a->next) {	    anch_line = a->line_num + 1;	}	/* position such that the anchor found is on first screen line,	   if it is not too far above the target line; but also try to	   make sure we move forward. */	if (anch_line >= 0 &&	    anch_line >= tentative_result - max_offset &&	    (anch_line > start_line ||		tentative_result <= HTMainText->top_of_screen)) {	    www_search_result = anch_line;	} else	if (tentative_result - start_line > 0 &&	    tentative_result - (start_line + 1) <= max_offset) {	    www_search_result = start_line + 1;	} else	if (tentative_result > HTMainText->top_of_screen &&	    tentative_result <= start_line && /* have wrapped */	    tentative_result <= HTMainText->top_of_screen+goal) {	    www_search_result = HTMainText->top_of_screen + 1;	} else	if (tentative_result <= goal)	    www_search_result = 1;	else	    www_search_result = tentative_result - max_offset;	if (www_search_result == doc->line) {	    if (nl_closest >= 0) {		doc->link = nl_closest;		return;	    }	}    }}