1627 newDBF =
DBFCreateEx ( pszFilename, psDBF->pszCodePage );
1628 if ( newDBF == NULL )
return ( NULL );
1630 newDBF->nFields = psDBF->nFields;
1631 newDBF->nRecordLength = psDBF->nRecordLength;
1632 newDBF->nHeaderLength = psDBF->nHeaderLength;
1634 newDBF->pszHeader = (
char *)
malloc ( newDBF->nHeaderLength );
1635 memcpy ( newDBF->pszHeader, psDBF->pszHeader, newDBF->nHeaderLength );
1637 newDBF->panFieldOffset = (
int *)
malloc (
sizeof(
int) * psDBF->nFields );
1638 memcpy ( newDBF->panFieldOffset, psDBF->panFieldOffset,
sizeof(
int) * psDBF->nFields );
1639 newDBF->panFieldSize = (
int *)
malloc (
sizeof(
int) * psDBF->nFields );
1640 memcpy ( newDBF->panFieldSize, psDBF->panFieldSize,
sizeof(
int) * psDBF->nFields );
1641 newDBF->panFieldDecimals = (
int *)
malloc (
sizeof(
int) * psDBF->nFields );
1642 memcpy ( newDBF->panFieldDecimals, psDBF->panFieldDecimals,
sizeof(
int) * psDBF->nFields );
1643 newDBF->pachFieldType = (
char *)
malloc (
sizeof(
char) * psDBF->nFields );
1644 memcpy ( newDBF->pachFieldType, psDBF->pachFieldType,
sizeof(
char)*psDBF->nFields );
1646 newDBF->bNoHeader =
TRUE;
1647 newDBF->bUpdated =
TRUE;
1652 newDBF =
DBFOpen ( pszFilename,
"rb+" );
DBFHandle SHPAPI_CALL DBFCreateEx(const char *pszFilename, const char *pszCodePage)
DBFHandle SHPAPI_CALL DBFOpen(const char *pszFilename, const char *pszAccess)
static void DBFWriteHeader(DBFHandle psDBF)
void SHPAPI_CALL DBFClose(DBFHandle psDBF)