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

◆ DBFGetFieldIndex()

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

Definition at line 1645 of file dbfopen.c.

1646{
1647 char name[12], name1[12], name2[12];
1648 int i;
1649
1650 snprintf(name1, 11, "%s", pszFieldName);
1651 name1[11] = '\0';
1652 str_to_upper(name1);
1653
1654 for (i = 0; i < DBFGetFieldCount(psDBF); i++)
1655 {
1656 DBFGetFieldInfo(psDBF, i, name, NULL, NULL);
1657 snprintf(name2, 12, "%s", name);
1658 str_to_upper(name2);
1659
1660 if (!strncmp(name1, name2, 10))
1661 return i;
1662 }
1663 return -1;
1664}
int SHPAPI_CALL DBFGetFieldCount(DBFHandle psDBF)
Definition dbfopen.c:1164
static void str_to_upper(char *string)
Definition dbfopen.c:1624
DBFFieldType SHPAPI_CALL DBFGetFieldInfo(DBFHandle psDBF, int iField, char *pszFieldName, int *pnWidth, int *pnDecimals)
Definition dbfopen.c:1188

References DBFGetFieldCount(), DBFGetFieldInfo(), and str_to_upper().

Here is the call graph for this function: