diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-13 11:03:45 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-13 11:03:45 +0100 |
commit | a072dac3638c399303b3308dbb1c5bbdfc59022b (patch) | |
tree | b03b8e7a2fd78aa64abd7ec3bc6819b043577812 /parse.c | |
parent | 1cd51a5d5a8a2c662e9ebcdea12b2ae01afd34d3 (diff) | |
parent | 925b060b2932a7f9ddee1e0fcbaa6266ba03d8b1 (diff) | |
download | rsyslog-a072dac3638c399303b3308dbb1c5bbdfc59022b.tar.gz rsyslog-a072dac3638c399303b3308dbb1c5bbdfc59022b.tar.bz2 rsyslog-a072dac3638c399303b3308dbb1c5bbdfc59022b.zip |
Merge branch 'lognorm' + some doc added
Conflicts:
ChangeLog
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -231,7 +231,8 @@ rsRetVal parsSkipWhitespace(rsParsObj *pThis) /* Parse string up to a delimiter. * * Input: - * cDelim - the delimiter + * cDelim - the delimiter. Note that SP within a value always is a delimiter, + * so cDelim is actually an *additional* delimiter. * The following two are for whitespace stripping, * 0 means "no", 1 "yes" * - bTrimLeading @@ -256,13 +257,13 @@ rsRetVal parsDelimCStr(rsParsObj *pThis, cstr_t **ppCStr, char cDelim, int bTrim pC = rsCStrGetBufBeg(pThis->pCStr) + pThis->iCurrPos; - while(pThis->iCurrPos < rsCStrLen(pThis->pCStr) && *pC != cDelim) { + while(pThis->iCurrPos < rsCStrLen(pThis->pCStr) && *pC != cDelim && *pC != ' ') { CHKiRet(cstrAppendChar(pCStr, bConvLower ? tolower(*pC) : *pC)); ++pThis->iCurrPos; ++pC; } - if(*pC == cDelim) { + if(pThis->iCurrPos < cstrLen(pThis->pCStr)) { //BUGFIX!! ++pThis->iCurrPos; /* eat delimiter */ } |