diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 09:31:55 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-03 09:31:55 +0000 |
commit | 5e279ea0f79250a07948ed6c24731f60e8221543 (patch) | |
tree | c7585345940febc8b4f4a1f154a292b0fd3b61a0 /parse.c | |
parent | 11461ad9c6de62556df79a35ff0c4902e2881f57 (diff) | |
download | rsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.tar.gz rsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.tar.bz2 rsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.zip |
properties are now case-insensitive everywhere (script, filters, templates)
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -235,11 +235,12 @@ rsRetVal parsSkipWhitespace(rsParsObj *pThis) * 0 means "no", 1 "yes" * - bTrimLeading * - bTrimTrailing + * - bConvLower - convert string to lower case? * * Output: * ppCStr Pointer to the parsed string - must be freed by caller! */ -rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrimLeading, int bTrimTrailing) +rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrimLeading, int bTrimTrailing, int bConvLower) { DEFiRet; register unsigned char *pC; @@ -256,7 +257,7 @@ rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrim while(pThis->iCurrPos < rsCStrLen(pThis->pCStr) && *pC != cDelim) { - if((iRet = rsCStrAppendChar(pCStr, *pC)) != RS_RET_OK) { + if((iRet = rsCStrAppendChar(pCStr, bConvLower ? tolower(*pC) : *pC)) != RS_RET_OK) { rsCStrDestruct(&pCStr); FINALIZE; } |