30 #include <sys/types.h> 70 for(i=0; i<nTblEntries; ++i)
72 if( !strcmp(tbl[i].m_sName, sName) )
100 for(i=0; i<nTblEntries; ++i)
102 if( tbl[i].m_iVal == iVal )
Simple associative map data and operator declarations.
const char * NvpVal2Name(Nvp_T tbl[], size_t nTblEntries, int iVal)
Get the name associated with the value.
AssocMapVoidPoint_T * m_pMapDft
default x, y point
Doubly linked list of character strings "inherited" from dlistvoid.
#define CHKPTR(p,...)
Checks validity of pointer.
size_t m_tblSize
number of entries in table
const char * m_sName
null-terminated string name
Memory allocation and deallocation declarations.
AssocMapVoidPoint_T * m_tblAssocMap
associative map table
void * AssocMapVoidXtoY(AssocMapVoidMapper_T *pMapper, void *px)
Get the y value associated with the given x value.
int m_iVal
associated integer value
RoadNarrows Robotics common configuration file.
void * y
with this y value (and vice versa).
void * x
the x value associates
AssocMapVoidCmp_T m_opYCmp
return 0 if y1 == y2
void * AssocMapVoidYtoX(AssocMapVoidMapper_T *pMapper, void *py)
Get the x value associated with the given y value.
AssocMapVoidCmp_T m_opXCmp
return 0 if x1 == x2
#define CHKEXPR_ULONG(val, expr,...)
check unsigned long integer
int NvpName2Val(Nvp_T tbl[], size_t nTblEntries, const char *sName)
Get the value associated with the name.