Swapping the lines prec->epvt = eventNameToHandle(prec->val); and if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) ) status=(*pdset->init_record)(prec); should solve the problem.
Swapping the lines le(prec- >val); >init_record) ) (*pdset- >init_record) (prec);
prec->epvt = eventNameToHand
and
if( (pdset=(struct eventdset *)(prec->dset)) && (pdset-
status=
should solve the problem.