for (j = dataLen; j >= fg->patternLen; j -= fg->qsBc[data[j - fg->patternLen - 1]]) {
j = dataLen; do {
grep_search(fastgrep_t *fg, unsigned char *data, int dataLen, regmatch_t *pmatch){	int j;	int rtrnVal = REG_NOMATCH;	pmatch->rm_so = -1;	pmatch->rm_eo = -1;	/* No point in going farther if we do not have enough data. */	if (dataLen < fg->patternLen)		return (rtrnVal);	/* Only try once at the beginning or ending of the line. */	if (fg->bol || fg->eol) {		/* Simple text comparison. */		/* Verify data is >= pattern length before searching on it. */		if (dataLen >= fg->patternLen) {			/* Determine where in data to start search at. */			if (fg->eol)				j = dataLen - fg->patternLen;			else				j = 0;			if (!((fg->bol && fg->eol) && (dataLen != fg->patternLen)))				if (grep_cmp(fg->pattern, data + j, fg->patternLen) == -1) {					rtrnVal = 0;					pmatch->rm_so = j;					pmatch->rm_eo = j + fg->patternLen;				}		}	} else if (fg->reversedSearch) {		/* Quick Search algorithm. */		for (j = dataLen; j >= fg->patternLen;		    j -= fg->qsBc[data[j - fg->patternLen - 1]]) {			if (grep_cmp(fg->pattern, data + j - fg->patternLen,			    fg->patternLen) == -1) {				rtrnVal = 0;				pmatch->rm_so = j - fg->patternLen;				pmatch->rm_eo = j;				break;			}		}	} else {		/* Quick Search algorithm. */		j = 0;		do {			if (grep_cmp(fg->pattern, data + j, fg->patternLen) == -1) {				rtrnVal = 0;				pmatch->rm_so = j;				pmatch->rm_eo = j + fg->patternLen;				break;			}			/* Shift if within bounds, otherwise, we are done. */			if (j + fg->patternLen == dataLen)				break;			else				j += fg->qsBc[data[j + fg->patternLen]];		} while (j <= (dataLen - fg->patternLen));	}	return (rtrnVal);}