#ident "$URL: svn://elmer/devel/SVN/SDDAS/trunk/libdB/ItoR.c $ %D% SwRI" #include "dbf.h" /**************** ** >FILE: ItoR.c ****************/ /******************************************* ** Function: int ItoR(ndxRecord_t *N, int i) ** ** Description: ** This routine converts the index number to a plain record number to be ** used by GetDbfRecord(). ** ** Return Values: ** record number of database (absolute) ** ***************** *****************/ SDDAS_INT ItoR(ndxRecord_t *N, SDDAS_INT i) { SDDAS_INT rec; rec = *((SDDAS_INT *)((char *) N->Index + ((N->KeyLen + DB_ALIGN(N->KeyLen) + sizeof(SDDAS_INT)) * (i-1)) + N->KeyLen + DB_ALIGN (N->KeyLen))); return rec; }