libserial/serdev.c
static unsigned int SerDevAttrLookup(SerDevAttrKvp_T tbl[], size_t nTblEntries,
    const void *pKey, int (*cmp)(const void *, const void *))
{
  int i;

  for(i=0; i<nTblEntries; ++i)
  {
    if( !cmp(tbl[i].m_pKey, pKey) )
    {
      return tbl[i].m_uVal;
    }
  }
  return SERDEV_NO_ATTR;
}
/*! 
 * \brief Lookup the attribute value associated with the key.
 *
 * \param tbl[]         Attribute Key-Value Pair table.
 * \param nTblEntries   Number of Key-Value Pair table entries.
 * \param pKey          Key to lookup.
 * \param cmp           Attribute key comparator function.
 *
 * \return 
 * The associated attribute value on success, or SERDEV_NO_ATTR if the search
 * failed.
 */
\brief Lookup the attribute value associated with the key.
\param tbl[]         Attribute Key-Value Pair table.
\param nTblEntries   Number of Key-Value Pair table entries.
\param pKey          Key to lookup.
\param cmp           Attribute key comparator function.

\return
The associated attribute value on success, or SERDEV_NO_ATTR if the search
failed.
\ brief Lookup the attribute value associated with the key . \ param tbl [] Attribute Key - Value Pair table . \ param nTblEntries Number of Key - Value Pair table entries . \ param pKey Key to lookup . \ param cmp Attribute key comparator function . \ return The associated attribute value on success or SERDEV_NO_ATTR if the search failed .
static unsigned int SerDevAttrLookup(SerDevAttrKvp_T tbl[], size_t nTblEntries,
    const void *pKey, int (*cmp)(const void *, const void *))
{
  int i;
  for(i=0; i<nTblEntries; ++i)
  {
    if( !cmp(tbl[i].m_pKey, pKey) )
    {
      return tbl[i].m_uVal;
    }
  }
  return SERDEV_NO_ATTR;
}
static unsigned int SerDevAttrLookup ( SerDevAttrKvp_T tbl [ ] , size_t nTblEntries , const void * pKey , int ( * cmp ) ( const void * , const void * ) ) { int i ; for ( i = 0 ; i < nTblEntries ; ++ i ) { if ( ! cmp ( tbl [ i ] . m_pKey , pKey ) ) { return tbl [ i ] . m_uVal ; } } return SERDEV_NO_ATTR ; }
\brief Lookup the attribute value associated with the key.
\ brief Lookup the attribute value associated with the key .