From ae6b0558f64f5f15b05c79623f905be584c0d3ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 11 Jan 2009 22:44:15 +0000 Subject: [PATCH] + all special token parameters may now have their string in braces like --- webcit/subst.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/webcit/subst.c b/webcit/subst.c index 5259828cf..2e35216f7 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -768,7 +768,7 @@ TemplateParam *GetNextParameter(StrBuf *Buf, const char **pCh, const char *pe, W const char *pchs, *pche; TemplateParam *Parm = (TemplateParam *) malloc(sizeof(TemplateParam)); char quote = '\0'; - + int ParamBrace = 0; Parm->Type = TYPE_STR; @@ -781,20 +781,34 @@ TemplateParam *GetNextParameter(StrBuf *Buf, const char **pCh, const char *pe, W if (*pch == ':') { Parm->Type = TYPE_PREFSTR; pch ++; + if (*pch == '(') { + pch ++; + ParamBrace = 1; + } } else if (*pch == ';') { Parm->Type = TYPE_PREFINT; pch ++; + if (*pch == '(') { + pch ++; + ParamBrace = 1; + } } else if (*pch == '_') { Parm->Type = TYPE_GETTEXT; pch ++; - if (*pch == '(') + if (*pch == '(') { pch ++; + ParamBrace = 1; + } } else if (*pch == 'B') { Parm->Type = TYPE_BSTR; pch ++; + if (*pch == '(') { + pch ++; + ParamBrace = 1; + } } @@ -832,7 +846,7 @@ TemplateParam *GetNextParameter(StrBuf *Buf, const char **pCh, const char *pe, W Parm->Start = pchs; Parm->len = pche - pchs; pch ++; /* move after trailing quote */ - if ((Parm->Type == TYPE_GETTEXT) && (*pch == ')')) { + if (ParamBrace && (*pch == ')')) { pch ++; } -- 2.39.2