if (x < left) c = LTARROW; else if (x > right) c = '\b'; else c = PGUP;
y -= 1 + (LYsb_arrow != 0); if (y < 0) return LAC_TO_LKC0(LYK_UP_TWO); if (y >= h) return LAC_TO_LKC0(LYK_DOWN_TWO);  if (clicks >= 2) { double frac = (1. * y)/(h - 1); int l = HText_getNumOfLines() + 1;	  l -= display_lines; if (l > 0) LYSetNewline((int)(frac * l + 1 + 0.5)); return LYReverseKeymap(LYK_DO_NOTHING); }  if (y < LYsb_begin) return LAC_TO_LKC0(LYK_PREV_PAGE); if (y >= LYsb_end) return LAC_TO_LKC0(LYK_NEXT_PAGE); mouse_link = -1;		 #endif
PRIVATE int set_clicked_link ARGS3(    int,	x,    int,	y,    int,	code){    int left = 6;    int right = LYcols-6;    /* yes, I am assuming that my screen will be a certain width. */    int i;    int c = -1;    if (y == (LYlines-1)) {	mouse_link = -2;	if (x < left) c = LTARROW;	else if (x > right) c = '\b';	else c = PGDOWN;    } else if (y == 0) {	mouse_link = -2;	if (x < left) c = LTARROW;	else if (x > right) c = '\b';	else c = PGUP;    } else {	int mouse_err = -1, cur_err;	/* Loop over the links and see if we can get a match */	for (i = 0; i < nlinks; i++) {	    int len, lx = links[i].lx, is_text = 0;	    if (links[i].type == WWW_FORM_LINK_TYPE		/* XXXX What else? */		&& (links[i].form->type == F_TEXTAREA_TYPE		 || links[i].form->type == F_TEXT_TYPE))		is_text = 1;	    if (is_text)		len = links[i].form->size;	    else		len = strlen(links[i].hightext );	    /* Check the first line of the link */	    if ( links[i].hightext != NULL) {		cur_err = XYdist(x, y, links[i].lx, links[i].ly, len);		if (cur_err == 0) {		    int cury, curx;		    LYGetYX(cury,curx);		    if (code != FOR_INPUT			/* Do not pick up the current input field */			|| !((cury == y && (curx >= lx) && ((curx - lx) <= len)))) {			if (is_text)			    have_levent = 1;			mouse_link = i;		    } else			mouse_link = -1;		    mouse_err = 0;		    break;		} else if (cur_err < mouse_err) {		    mouse_err = cur_err;		    mouse_link = i;		}	    }	    /* Check the second line */	    if (links[i].hightext2 != NULL) {		cur_err = XYdist(x, y,				 links[i].hightext2_offset,				 links[i].ly+1,				 strlen(links[i].hightext2));		if (cur_err == 0) {		    mouse_link = i;		    mouse_err = 0;		    break;		} else if (cur_err < mouse_err) {		    mouse_err = cur_err;		    mouse_link = i;		}	    }	}	/*	 * If a link was hit, we must look for a key which will activate	 * LYK_ACTIVATE We expect to find LYK_ACTIVATE (it's usually mapped to	 * the Enter key).	 */	if (mouse_link >= 0) {	    if (mouse_err == 0)		c = lookup_keymap(LYK_ACTIVATE);	    else if (mouse_err >= 0)		c = lookup_keymap(LYK_CHANGE_LINK);	}    }    return c;}