pattern->rhs = interval_dup(cp+1, cp2);
pattern->rhs = Str_dupi(cp+1, cp2);
get_sysvpattern(p, ctxt, err, endc)    const char		**p;    SymTable		*ctxt	UNUSED;    Boolean		err	UNUSED;    int			endc;{    VarPattern		*pattern;    const char		*cp, *cp2;    int cnt = 0;    char startc = endc == ')' ? '(' : '}';    for (cp = *p;; cp++) {    	if (*cp == '=' && cnt == 0)	    break;	if (*cp == '\0')	    return NULL;	if (*cp == startc)	    cnt++;	else if (*cp == endc) {	    cnt--;	    if (cnt < 0)	    	return NULL;	}    }    for (cp2 = cp+1;; cp2++) {    	if ((*cp2 == ':' || *cp2 == endc) && cnt == 0)	    break;	if (*cp2 == startc)	    cnt++;	else if (*cp2 == endc) {	    cnt--;	    if (cnt < 0)	    	return NULL;	}    }	    pattern = (VarPattern *)emalloc(sizeof(VarPattern));    pattern->lbuffer = pattern->lhs = interval_dup(*p, cp);    pattern->leftLen = cp - *p;    pattern->rhs = interval_dup(cp+1, cp2);    pattern->rightLen = cp2 - (cp+1);    pattern->flags = 0;    *p = cp2;    return pattern;}