if (*tstr == '\0')
if (*tstr == '\0') {
VarModifiers_Apply(char *str, const struct Name *name, SymTable *ctxt,     bool err, bool *freePtr, const char *start, int endc, size_t *lengthPtr){    const char	*tstr;    bool	atstart;    /* Some ODE modifiers only make sense at start */    tstr = start;    /*     * Now we need to apply any modifiers the user wants applied.     * These are:     *		  :M<pattern>	words which match the given <pattern>.     *				<pattern> is of the standard file     *				wildcarding form.     *		  :S<d><pat1><d><pat2><d>[g]     *				Substitute <pat2> for <pat1> in the value     *		  :C<d><pat1><d><pat2><d>[g]     *				Substitute <pat2> for regex <pat1> in the value     *		  :H		Substitute the head of each word     *		  :T		Substitute the tail of each word     *		  :E		Substitute the extension (minus '.') of     *				each word     *		  :R		Substitute the root of each word     *				(pathname minus the suffix).     *		  :lhs=rhs	Like :S, but the rhs goes to the end of     *				the invocation.     */        atstart = true;    while (*tstr != endc && *tstr != '\0') {	struct modifier *mod;	void		*arg;	char		*newStr;	tstr++;	if (DEBUG(VAR))	    printf("Applying :%c to \"%s\"\n", *tstr, str);	mod = choose_mod[*tstr];	arg = NULL;	if (mod != NULL && (!mod->atstart || atstart))	    arg = mod->getarg(&tstr, ctxt, err, endc);	if (FEATURES(FEATURE_SYSVVARSUB) && arg == NULL) {	    mod = &sysv_mod;	    arg = mod->getarg(&tstr, ctxt, err, endc);	}	atstart = false;	if (arg != NULL) {	    if (str != NULL || (mod->atstart && name != NULL)) {		if (mod->word_apply != NULL) {		    newStr = VarModify(str, mod->word_apply, arg);		    if (mod->apply != NULL) {		    	char *newStr2;		    	newStr2 = mod->apply(newStr, name, arg);			free(newStr);			newStr = newStr2;		    }		} else		    newStr = mod->apply(str, name, arg);		if (*freePtr)		    free(str);		str = newStr;		if (str != var_Error)		    *freePtr = true;		else		    *freePtr = false;	    }	    if (mod->freearg != NULL)		mod->freearg(arg);	} else {	    Error("Bad modifier: %s\n", tstr);	    /* Try skipping to end of var... */	    for (tstr++; *tstr != endc && *tstr != '\0';)		tstr++;	    if (str != NULL && *freePtr)		free(str);	    str = var_Error;	    *freePtr = false;	    break;	}	if (DEBUG(VAR))	    printf("Result is \"%s\"\n", str);    }    if (*tstr == '\0')	Error("Unclosed variable specification");    *lengthPtr += tstr - start;    return str;}