From 8c8ce543049a1f18cbd1fa16c8852422f2a04891 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 17 Oct 2006 13:09:46 +0000 Subject: added '$' toPos specifier --- template.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'template.c') diff --git a/template.c b/template.c index 0947018a..2cb6b8cc 100644 --- a/template.c +++ b/template.c @@ -389,6 +389,16 @@ static int do_Parameter(char **pp, struct template *pTpl) p = regex_end + 5/*strlen("--end")*/; free(regex_char); } + } else if(*p == '$') { + /* shortcut for "end of message */ + p++; /* eat '$' */ + /* in this case, we do a quick, somewhat dirty but totally + * legitimate trick: we simply use a topos that is higher than + * potentially ever can happen. The code below checks that no copy + * will occur after the end of string, so this is perfectly legal. + * rgerhards, 2006-10-17 + */ + pTpe->data.field.iToPos = 9999999; } else { /* fallthrough to "regular" ToPos code */ #endif /* #ifdef FEATURE_REGEXP */ -- cgit