if (anchor == 2)
if (anchor == 2) {
re_search_2(bufp, string1, size1, string2, size2, pos, range, regs,	    mstop)    regexp_t bufp;    char *string1, *string2;    int size1, size2, pos, range, mstop;    regexp_registers_t regs;{    char *fastmap, *translate, *text, *partstart, *partend;    int dir, ret;    char anchor;    assert(size1 >= 0 && size2 >= 0 && pos >= 0 && mstop >= 0);    assert(pos + range >= 0 && pos + range <= size1 + size2);    assert(pos <= mstop);    fastmap = bufp->fastmap;    translate = bufp->translate;    if (fastmap && !bufp->fastmap_accurate)	re_compile_fastmap(bufp);    anchor = bufp->anchor;    if (bufp->can_be_null == 1)	/* can_be_null == 2: can match null at eob */	fastmap = NULL;    if (range < 0) {	dir = -1;	range = -range;    } else	dir = 1;    if (anchor == 2)	if (pos != 0)	    return -1;	else	    range = 0;    for (; range >= 0; range--, pos += dir) {	if (fastmap) {	    if (dir == 1) {	/* searching forwards */		if (pos < size1) {		    text = string1 + pos;		    if (pos + range > size1)			partend = string1 + size1;		    else			partend = string1 + pos + range;		} else {		    text = string2 + pos - size1;		    partend = string2 + pos + range - size1;		}		partstart = text;		if (translate)		    while (text != partend &&			   !fastmap[(unsigned char)				    translate[(unsigned char) *text]])			text++;		else		    while (text != partend && !fastmap[(unsigned char) *text])			text++;		pos += text - partstart;		range -= text - partstart;		if (pos == size1 + size2 && bufp->can_be_null == 0)		    return -1;	    } else {		/* searching backwards */		if (pos <= size1) {		    text = string1 + pos;		    partstart = string1 + pos - range;		} else {		    text = string2 + pos - size1;		    if (range < pos - size1)			partstart = string2 + pos - size1 - range;		    else			partstart = string2;		}		partend = text;		if (translate)		    while (text != partstart &&			   !fastmap[(unsigned char)				    translate[(unsigned char) *text]])			text--;		else		    while (text != partstart &&			   !fastmap[(unsigned char) *text])			text--;		pos -= partend - text;		range -= partend - text;	    }	}	if (anchor == 1) {	/* anchored to begline */	    if (pos > 0 &&		(pos <= size1 ? string1[pos - 1] :		 string2[pos - size1 - 1]) != '\n')		continue;	}	assert(pos >= 0 && pos <= size1 + size2);	ret = re_match_2(bufp, string1, size1, string2, size2, pos, regs, mstop);	if (ret >= 0)	    return pos;	if (ret == -2)	    return -2;    }    return -1;}