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

◆ return()

return ( const char *  )

Definition at line 1554 of file dbfopen.c.

1565{
1566 DBFHandle newDBF;
1567
1568 newDBF = DBFCreateEx(pszFilename, psDBF->pszCodePage);
1569 if (newDBF == NULL)
1570 return (NULL);
1571
1572 newDBF->nFields = psDBF->nFields;
1573 newDBF->nRecordLength = psDBF->nRecordLength;
1574 newDBF->nHeaderLength = psDBF->nHeaderLength;
1575
1576 newDBF->pszHeader = (char *)malloc(newDBF->nHeaderLength);
1577 memcpy(newDBF->pszHeader, psDBF->pszHeader, newDBF->nHeaderLength);
1578
1579 newDBF->panFieldOffset = (int *)malloc(sizeof(int) * psDBF->nFields);
1580 memcpy(newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields);
1581 newDBF->panFieldSize = (int *)malloc(sizeof(int) * psDBF->nFields);
1582 memcpy(newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields);
1583 newDBF->panFieldDecimals = (int *)malloc(sizeof(int) * psDBF->nFields);
1584 memcpy(newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields);
1585 newDBF->pachFieldType = (char *)malloc(sizeof(char) * psDBF->nFields);
1586 memcpy(newDBF->pachFieldType, psDBF->pachFieldType, sizeof(char) * psDBF->nFields);
1587
1588 newDBF->bNoHeader = TRUE;
1589 newDBF->bUpdated = TRUE;
1590
1591 DBFWriteHeader(newDBF);
1592 DBFClose(newDBF);
1593
1594 newDBF = DBFOpen(pszFilename, "rb+");
1595
1596 return (newDBF);
1597}
DBFHandle SHPAPI_CALL DBFOpen(const char *pszFilename, const char *pszAccess)
Definition dbfopen.c:354
DBFHandle SHPAPI_CALL DBFCreateEx(const char *pszFilename, const char *pszCodePage)
Definition dbfopen.c:628
void SHPAPI_CALL DBFClose(DBFHandle psDBF)
Definition dbfopen.c:566
static void DBFWriteHeader(DBFHandle psDBF)
Definition dbfopen.c:198
#define TRUE
Definition dbfopen.c:169
void * malloc(YYSIZE_T)

Referenced by ptarray_calc_areas(), rt_raster_calc_phys_params(), rt_raster_get_phys_params(), and rt_raster_set_phys_params().

Here is the caller graph for this function: