Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

struct confparams* HAMLIB_API rig_ext_lookup ( RIG rig,
const char *  name 
) [read]

lookup ext token by its name, return pointer to confparams struct.

nameLookup extlevels table first, then fall back to extparms.

Returns NULL if nothing found

TODO: should use Lex to speed it up, strcmp hurts!

Definition at line 120 of file ext.c.

References caps, rig_caps::extlevels, rig_caps::extparms, and confparams::name.

Referenced by rig_ext_token_lookup().

      const struct confparams *cfp;

      if (!rig || !rig->caps)
            return NULL;

      for (cfp = rig->caps->extlevels; cfp && cfp->name; cfp++)
            if (!strcmp(cfp->name, name))
                  return cfp;
      for (cfp = rig->caps->extparms; cfp && cfp->name; cfp++)
            if (!strcmp(cfp->name, name))
                  return cfp;
      return NULL;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index