define inside define name should work now (${bla${blo}})

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1868 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-12-02 17:48:22 +00:00
parent 78c25b042a
commit fa330ae04d

View file

@ -233,22 +233,28 @@ void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &his
{ {
char *s=strdup(in+1); char *s=strdup(in+1);
char *t=s; char *t=s;
unsigned int bn = 0;
while (*t) while (*t)
{ {
if (*t == '}') break; if (*t == '{') bn++;
if (*t == '}' && bn-- == 0) break;
t=CharNext(t); t=CharNext(t);
} }
if (*t && t!=s) if (*t && t!=s)
{ {
*t=0; *t=0;
t=definedlist.find(s); // check for defines inside the define name - ${bla${blo}}
if (t && hist.find(s,0)<0) GrowBuf defname;
ps_addtoline(s,defname,hist);
defname.add("",1);
t=definedlist.find((char*)defname.get());
if (t && hist.find((char*)defname.get(),0)<0)
{ {
in+=strlen(s)+2; in+=strlen(s)+2;
add=0; add=0;
hist.add(s,0); hist.add((char*)defname.get(),0);
ps_addtoline(t,linedata,hist); ps_addtoline(t,linedata,hist);
hist.delbypos(hist.find(s,0)); hist.delbypos(hist.find((char*)defname.get(),0));
} }
} }
free(s); free(s);