Boolean	err;
bool	err;
get_patternarg(p, ctxt, err, endc)    const char	**p;    SymTable	*ctxt;    Boolean	err;    int		endc;{    VarPattern *pattern;    char	delim;    const char	*s;    pattern = (VarPattern *)emalloc(sizeof(VarPattern));    pattern->flags = 0;    s = *p;    delim = s[1];    if (delim == '\0')	return NULL;    s += 2;    pattern->rhs = NULL;    pattern->lhs = VarGetPattern(ctxt, err, &s, delim, delim,	&pattern->leftLen, NULL);    pattern->lbuffer = pattern->lhs;    if (pattern->lhs != NULL) {	pattern->rhs = VarGetPattern(ctxt, err, &s, delim, delim,	    &pattern->rightLen, pattern);	if (pattern->rhs != NULL) {	    /* Check for global substitution. If 'g' after the final	     * delimiter, substitution is global and is marked that	     * way.  */	    for (;; s++) {		switch (*s) {		case 'g':		    pattern->flags |= VAR_SUB_GLOBAL;		    continue;		case '1':		    pattern->flags |= VAR_SUB_ONE;		    continue;		}		break;	    }	    if (*s == endc || *s == ':') {		*p = s;		return pattern;	    }	}    }    free_patternarg(pattern);    return NULL;}