diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2006-10-17 13:09:46 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2006-10-17 13:09:46 +0000 |
commit | 8c8ce543049a1f18cbd1fa16c8852422f2a04891 (patch) | |
tree | c0e30f7d574f70a0dfe99a6daf24e034d05add90 /template.c | |
parent | 8b0083e89d5899c4f2e73845a293f563b36d8d10 (diff) | |
download | rsyslog-8c8ce543049a1f18cbd1fa16c8852422f2a04891.tar.gz rsyslog-8c8ce543049a1f18cbd1fa16c8852422f2a04891.tar.xz rsyslog-8c8ce543049a1f18cbd1fa16c8852422f2a04891.zip |
added '$' toPos specifier
Diffstat (limited to 'template.c')
-rw-r--r-- | template.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 */ |