summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-03 09:31:55 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-03 09:31:55 +0000
commit5e279ea0f79250a07948ed6c24731f60e8221543 (patch)
treec7585345940febc8b4f4a1f154a292b0fd3b61a0 /parse.c
parent11461ad9c6de62556df79a35ff0c4902e2881f57 (diff)
downloadrsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.tar.gz
rsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.tar.xz
rsyslog-5e279ea0f79250a07948ed6c24731f60e8221543.zip
properties are now case-insensitive everywhere (script, filters, templates)
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index bca6457d..5239b540 100644
--- a/parse.c
+++ b/parse.c
@@ -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;
}