diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 14:31:56 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 14:31:56 +0000 |
commit | 45136c665690534d934d0c0c188dbb18a0131b96 (patch) | |
tree | 50e774280a622de5dfc8b98707f0be6324aeb974 /conf.c | |
parent | 04622f7d2210cbb8036502afadf5bcdcb0394d28 (diff) | |
download | rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.tar.gz rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.tar.xz rsyslog-45136c665690534d934d0c0c188dbb18a0131b96.zip |
some more interface changes
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -56,6 +56,7 @@ /* static data */ DEFobjCurrIf(expr) +DEFobjCurrIf(ctok) uchar *pModDir = NULL; /* read-only after startup */ /* The following global variables are used for building @@ -733,7 +734,7 @@ dbgPrintAllDebugInfo(); static rsRetVal cflineProcessIfFilter(uchar **pline, register selector_t *f) { DEFiRet; - ctok_t *ctok; + ctok_t *tok; ctok_token_t *pToken; ASSERT(pline != NULL); @@ -750,28 +751,28 @@ dbgprintf("calling expression parser, pp %p ('%s')\n", *pline, *pline); (*pline) += 3; /* we first need a tokenizer... */ - CHKiRet(ctokConstruct(&ctok)); - CHKiRet(ctokSetpp(ctok, *pline)); - CHKiRet(ctokConstructFinalize(ctok)); + CHKiRet(ctok.Construct(&tok)); + CHKiRet(ctok.Setpp(tok, *pline)); + CHKiRet(ctok.ConstructFinalize(tok)); /* now construct our expression */ CHKiRet(expr.Construct(&f->f_filterData.f_expr)); CHKiRet(expr.ConstructFinalize(f->f_filterData.f_expr)); /* ready to go... */ - CHKiRet(expr.Parse(f->f_filterData.f_expr, ctok)); + CHKiRet(expr.Parse(f->f_filterData.f_expr, tok)); /* we now need to parse off the "then" - and note an error if it is * missing... */ - CHKiRet(ctokGetToken(ctok, &pToken)); + CHKiRet(ctok.GetToken(tok, &pToken)); if(pToken->tok != ctok_THEN) { ABORT_FINALIZE(RS_RET_SYNTAX_ERROR); } /* we are done, so we now need to restore things */ - CHKiRet(ctokGetpp(ctok, pline)); - CHKiRet(ctokDestruct(&ctok)); + CHKiRet(ctok.Getpp(tok, pline)); + CHKiRet(ctok.Destruct(&tok)); dbgprintf("expression parser successfully ended, pp %p ('%s')\n", *pline, *pline); @@ -1155,6 +1156,8 @@ rsRetVal confClassInit(void) DEFiRet; /* request objects we use */ CHKiRet(objUse(expr)); + CHKiRet(objUse(ctok)); + finalize_it: RETiRet; } |