projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7694ed2
)
add new outputtoken 'F', which does FMOUT with the escaper.
author
Wilfried Goesgens
<dothebart@citadel.org>
Fri, 15 Jul 2011 15:07:36 +0000
(15:07 +0000)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 4 Sep 2011 21:36:28 +0000
(21:36 +0000)
webcit/subst.c
patch
|
blob
|
history
diff --git
a/webcit/subst.c
b/webcit/subst.c
index 1a08abc245f131cc1a3fed562d130db4862b8848..cf6c9e130399ad5a3e051141377dfde810c26397 100644
(file)
--- a/
webcit/subst.c
+++ b/
webcit/subst.c
@@
-620,12
+620,14
@@
void StrBufAppendTemplate(StrBuf *Target,
const StrBuf *Source, int FormatTypeIndex)
{
wcsession *WCC;
const StrBuf *Source, int FormatTypeIndex)
{
wcsession *WCC;
+ const char *pFmt = NULL;
char EscapeAs = ' ';
if ((FormatTypeIndex < TP->Tokens->nParameters) &&
(TP->Tokens->Params[FormatTypeIndex]->Type == TYPE_STR) &&
char EscapeAs = ' ';
if ((FormatTypeIndex < TP->Tokens->nParameters) &&
(TP->Tokens->Params[FormatTypeIndex]->Type == TYPE_STR) &&
- (TP->Tokens->Params[FormatTypeIndex]->len == 1)) {
- EscapeAs = *TP->Tokens->Params[FormatTypeIndex]->Start;
+ (TP->Tokens->Params[FormatTypeIndex]->len >= 1)) {
+ pFmt = TP->Tokens->Params[FormatTypeIndex]->Start;
+ EscapeAs = pFmt;
}
switch(EscapeAs)
}
switch(EscapeAs)
@@
-646,6
+648,12
@@
void StrBufAppendTemplate(StrBuf *Target,
case 'U':
StrBufUrlescAppend(Target, Source, NULL);
break;
case 'U':
StrBufUrlescAppend(Target, Source, NULL);
break;
+ case 'F':
+ if (pFmt != NULL) pFmt++;
+ else pFmt = "JUSTIFY";
+ if (*pFmt == '\0') pFmt = "JUSTIFY";
+ FmOut(Target, pFmt, Source);
+ break;
default:
StrBufAppendBuf(Target, Source, 0);
}
default:
StrBufAppendBuf(Target, Source, 0);
}