db/test: add simple processing callback to xRecord

This commit is contained in:
Michael Davidsaver
2015-03-13 15:24:07 -04:00
parent 8ef1e0d177
commit a014314384
2 changed files with 7 additions and 0 deletions

View File

@@ -45,6 +45,8 @@ static long process(xRecord *prec)
{
long ret = 0;
xdset *xset = (xdset*)prec->dset;
if(prec->clbk)
(*prec->clbk)(prec);
prec->pact = TRUE;
if(xset && xset->process)
ret = (*xset->process)(prec);

View File

@@ -11,4 +11,9 @@ recordtype(x) {
field(INP, DBF_INLINK) {
prompt("Input Link")
}
field(CLBK, DBF_NOACCESS) {
prompt("Processing callback")
special(SPC_NOMOD)
extra("void (*clbk)(struct xRecord*)")
}
}