PostGIS  2.1.10dev-r@@SVN_REVISION@@
return ( const char *  )

Definition at line 1610 of file dbfopen.c.

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

1621 {
1622  DBFHandle newDBF;
1623 
1624  newDBF = DBFCreateEx ( pszFilename, psDBF->pszCodePage );
1625  if ( newDBF == NULL ) return ( NULL );
1626 
1627  newDBF->nFields = psDBF->nFields;
1628  newDBF->nRecordLength = psDBF->nRecordLength;
1629  newDBF->nHeaderLength = psDBF->nHeaderLength;
1630 
1631  newDBF->pszHeader = (char *) malloc ( newDBF->nHeaderLength );
1632  memcpy ( newDBF->pszHeader, psDBF->pszHeader, newDBF->nHeaderLength );
1633 
1634  newDBF->panFieldOffset = (int *) malloc ( sizeof(int) * psDBF->nFields );
1635  memcpy ( newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields );
1636  newDBF->panFieldSize = (int *) malloc ( sizeof(int) * psDBF->nFields );
1637  memcpy ( newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields );
1638  newDBF->panFieldDecimals = (int *) malloc ( sizeof(int) * psDBF->nFields );
1639  memcpy ( newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields );
1640  newDBF->pachFieldType = (char *) malloc ( sizeof(char) * psDBF->nFields );
1641  memcpy ( newDBF->pachFieldType, psDBF->pachFieldType, sizeof(char)*psDBF->nFields );
1642 
1643  newDBF->bNoHeader = TRUE;
1644  newDBF->bUpdated = TRUE;
1645 
1646  DBFWriteHeader ( newDBF );
1647  DBFClose ( newDBF );
1648 
1649  newDBF = DBFOpen ( pszFilename, "rb+" );
1650 
1651  return ( newDBF );
1652 }
DBFHandle SHPAPI_CALL DBFCreateEx(const char *pszFilename, const char *pszCodePage)
Definition: dbfopen.c:642
DBFHandle SHPAPI_CALL DBFOpen(const char *pszFilename, const char *pszAccess)
Definition: dbfopen.c:366
static void DBFWriteHeader(DBFHandle psDBF)
Definition: dbfopen.c:198
void SHPAPI_CALL DBFClose(DBFHandle psDBF)
Definition: dbfopen.c:579
#define TRUE
Definition: dbfopen.c:170

Here is the caller graph for this function: