PUBLIC char * LYno_attr_mbcs_strstr ARGS5( char *, 	chptr, char *, 	tarptr,
PUBLIC char * LYno_attr_mbcs_strstr ARGS6( char *,		chptr, CONST char *,	tarptr,
PUBLIC char * LYno_attr_mbcs_strstr ARGS5(	char *, 	chptr,	char *, 	tarptr,	BOOL,		utf_flag,	int *,		nstartp,	int *,		nendp){    register char *tmpchptr, *tmptarptr;    int len = 0;    int offset;    if (!(chptr && tarptr))	return(NULL);    /*     *	Skip initial IsSpecial chars. - FM     */    while (IsSpecialAttrChar(*chptr) && *chptr != '\0')	chptr++;    /*     *	Seek a first target match. - FM     */    for (; *chptr != '\0'; chptr++) {	if ((*chptr) == (*tarptr)) {	    int tarlen = 0;	    offset = len;	    len++;	    /*	     *	See if they line up.	     */	    tmpchptr = (chptr + 1);	    tmptarptr = (tarptr + 1);	    if (*tmptarptr == '\0') {		/*		 *  One char target.		 */		*nstartp = offset;		*nendp = len + 1;		 return(chptr);	    }	    if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) &&		 *tmpchptr != '\0' &&		 !IsSpecialAttrChar(*tmpchptr)) {		/*		 *  Check the CJK multibyte. - FM		 */		if (*tmpchptr == *tmptarptr) {		    /*		     *	It's a match.  Advance to next char. - FM		     */		    tmpchptr++;		    tmptarptr++;		    if (*tmptarptr == '\0') {			/*			 *  One character match. - FM			 */			*nstartp = offset;			*nendp = len + tarlen;			return(chptr);		    }		    tarlen++;		} else {		    /*		     *	It's not a match, so go back to		     *	seeking a first target match. - FM		     */		    chptr++;		    continue;		}	    }	    /*	     *	See if the rest of the target matches. - FM	     */	    while (1) {		 if (!IsSpecialAttrChar(*tmpchptr)) {		    if (!utf_flag && HTCJK != NOCJK && !isascii(*tmpchptr)) {			if (*tmpchptr == *tmptarptr &&			    *(tmpchptr + 1) == *(tmptarptr + 1) &&			    !IsSpecialAttrChar(*(tmpchptr + 1))) {			    tmpchptr++;			    tmptarptr++;			} else {			    break;			}		    } else if ((*tmpchptr) != (*tmptarptr)) {			break;		    }		    if (!IS_UTF_EXTRA(*tmptarptr)) {			tarlen++;		    }		    tmpchptr++;		    tmptarptr++;		 } else {		    tmpchptr++;		 }		 if (*tmptarptr == '\0') {		    *nstartp = offset;		     *nendp = len + tarlen;		     return(chptr);		 }		if (*tmpchptr == '\0') {		     break;	    }	    }	} else if (!(IS_UTF_EXTRA(*chptr) ||		      IsSpecialAttrChar(*chptr))) {	    if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) &&		*(chptr + 1) != '\0' &&		!IsSpecialAttrChar(*(chptr + 1))) {		chptr++;	    }	    len++;	}    } /* end for */    return(NULL);}