summaryrefslogtreecommitdiffstats
path: root/ctok.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-28 10:40:34 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-28 10:40:34 +0000
commitb8455132707ab4e5ca86e320c5cd8f8b84d6fc34 (patch)
treed5c86299463ca9d2f35bedaa52aef72a22ac14f3 /ctok.c
parent8860335f57904501bfd72c1c5b65b0c83c7d1c1e (diff)
downloadrsyslog-b8455132707ab4e5ca86e320c5cd8f8b84d6fc34.zip
rsyslog-b8455132707ab4e5ca86e320c5cd8f8b84d6fc34.tar.gz
rsyslog-b8455132707ab4e5ca86e320c5cd8f8b84d6fc34.tar.xz
- wrote doc on how to use the expression engine
- changed ABNF to fully support old property names - added case-insensitive comparison operations
Diffstat (limited to 'ctok.c')
-rw-r--r--ctok.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ctok.c b/ctok.c
index a8057a9..b10001f 100644
--- a/ctok.c
+++ b/ctok.c
@@ -155,7 +155,7 @@ ctokGetWordFromStream(ctok_t *pThis, uchar *pWordBuf, size_t lenWordBuf)
CHKiRet(ctokSkipWhitespaceFromStream(pThis));
CHKiRet(ctokGetCharFromStream(pThis, &c));
- while(isalnum(c) && lenWordBuf > 1) {
+ while((isalnum(c) || c == '_' || c == '-') && lenWordBuf > 1) {
*pWordBuf++ = c;
--lenWordBuf;
CHKiRet(ctokGetCharFromStream(pThis, &c));
@@ -503,8 +503,12 @@ ctokGetToken(ctok_t *pThis, ctok_token_t **ppToken)
pToken->tok = ctok_NOT;
} else if(!strcasecmp((char*)szWord, "contains")) {
pToken->tok = ctok_CMP_CONTAINS;
+ } else if(!strcasecmp((char*)szWord, "contains_i")) {
+ pToken->tok = ctok_CMP_CONTAINSI;
} else if(!strcasecmp((char*)szWord, "startswith")) {
pToken->tok = ctok_CMP_STARTSWITH;
+ } else if(!strcasecmp((char*)szWord, "startswith_i")) {
+ pToken->tok = ctok_CMP_STARTSWITHI;
} else if(!strcasecmp((char*)szWord, "then")) {
pToken->tok = ctok_THEN;
} else {