copystr = "$"; copylen = 1; 
copystr = "${"; copylen = 1 + braced; 
static char *expand_variables(char *string, MBlockList *varbuf, const char *basedir){	char *p, *expstr;	const char *copystr;	int limlen, copylen, explen, varlen, braced;		if ((p = strchr(string, '$')) == NULL)		return string;	varlen = strlen(basedir);	explen = limlen = 0;	expstr = NULL;	copystr = string;	copylen = p - string;	string = p;	for(;;)	{		if (explen + copylen + 1 > limlen)		{			limlen += copylen + 128;			expstr = memcpy(new_segment(varbuf, limlen), expstr, explen);		}		memcpy(&expstr[explen], copystr, copylen);		explen += copylen;		if (*string == '\0')			break;		else if (*string == '$')		{			braced = *++string == '{';			if (braced)			{				if ((p = strchr(string + 1, '}')) == NULL)					p = string;	/* no closing brace */				else					string++;			}			else				for(p = string; isalnum(*p) || *p == '_'; p++) ;			if (p == string)	/* empty */			{				copystr = "$";				copylen = 1;			}			else			{				if (p - string == 7 && memcmp(string, "basedir", 7) == 0)				{					copystr = basedir;					copylen = varlen;				}				else	/* undefined variable */					copylen = 0;				string = p + braced;			}		}		else	/* search next */		{			p = strchr(string, '$');			if (p == NULL)				copylen = strlen(string);			else				copylen = p - string;			copystr = string;			string += copylen;		}	}	expstr[explen] = '\0';	return expstr;}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/ace1d510063695214cba8549afa92b6b863cc5b6/timidity.c/clean/timidity/timidity.c