long *len)
{
StrBuf *Buf;
+ WCTemplputParams SubTP;
if (TP->Tokens->nParameters < N) {
lprintf(1, "invalid token. this shouldn't have come till here.\n");
*Value = _(TP->Tokens->Params[N]->Start);
*len = strlen(*Value);
break;
+ case TYPE_SUBTEMPLATE:
+ memset(&SubTP, 0, sizeof(WCTemplputParams *));
+ SubTP.Context = TP->Context;
+ SubTP.ContextType = TP->ContextType;
+ Buf = NewStrBuf();
+ DoTemplate(TKEY(N), Buf, &SubTP);
+ *Value = ChrPtr(Buf);
+ *len = StrLength(Buf);
+ /* we can't free it here, so we put it into the subst so its discarded later on. */
+ SVPUTBuf(TKEY(N), Buf, 0);
+ break;
+
default:
break;
/*/todo log error */
ParamBrace = 1;
}
}
+ else if (*pch == '=') {
+ Parm->Type = TYPE_SUBTEMPLATE;
+ pch ++;
+ if (*pch == '(') {
+ pch ++;
+ ParamBrace = 1;
+ }
+ }
if (*pch == '"')