Logo Search packages:      
Sourcecode: hamlib version File versions

int HAMLIB_API rig_ext_parm_foreach ( RIG rig,
int(*)(RIG *, const struct confparams *, rig_ptr_t)  cfunc,
rig_ptr_t  data 
)

Executes cfunc on all the elements stored in the extparms table.

Parameters:
rig 
cfunc The function to be called
data The data

Definition at line 79 of file ext.c.

References caps, rig_caps::extparms, confparams::name, RIG_EINVAL, and RIG_OK.

{
      const struct confparams *cfp;

      if (!rig || !rig->caps || !cfunc)
            return -RIG_EINVAL;

      for (cfp = rig->caps->extparms; cfp && cfp->name; cfp++)
            if ((*cfunc)(rig, cfp, data) == 0)
                  return RIG_OK;

      return RIG_OK;
}


Generated by  Doxygen 1.6.0   Back to index