PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ DBFGetFieldIndex()

int SHPAPI_CALL DBFGetFieldIndex ( DBFHandle  psDBF,
const char *  pszFieldName 
)

Definition at line 1728 of file dbfopen.c.

1730{
1731 char name[XBASE_FLDNAME_LEN_READ+1];
1732 int i;
1733
1734 for( i = 0; i < DBFGetFieldCount(psDBF); i++ )
1735 {
1736 DBFGetFieldInfo( psDBF, i, name, SHPLIB_NULLPTR, SHPLIB_NULLPTR );
1737 if(!STRCASECMP(pszFieldName,name))
1738 return(i);
1739 }
1740 return(-1);
1741}
int SHPAPI_CALL DBFGetFieldCount(DBFHandle psDBF)
Definition dbfopen.c:1246
#define STRCASECMP(a, b)
Definition dbfopen.c:52
#define SHPLIB_NULLPTR
Definition dbfopen.c:99
DBFFieldType SHPAPI_CALL DBFGetFieldInfo(DBFHandle psDBF, int iField, char *pszFieldName, int *pnWidth, int *pnDecimals)
Definition dbfopen.c:1274
#define XBASE_FLDNAME_LEN_READ
Definition shapefil.h:650

References DBFGetFieldCount(), DBFGetFieldInfo(), SHPLIB_NULLPTR, STRCASECMP, and XBASE_FLDNAME_LEN_READ.

Here is the call graph for this function: