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

◆ DBFClose()

void SHPAPI_CALL DBFClose ( DBFHandle  hDBF)

Definition at line 599 of file dbfopen.c.

600{
601 if( psDBF == SHPLIB_NULLPTR )
602 return;
603
604/* -------------------------------------------------------------------- */
605/* Write out header if not already written. */
606/* -------------------------------------------------------------------- */
607 if( psDBF->bNoHeader )
608 DBFWriteHeader( psDBF );
609
611
612/* -------------------------------------------------------------------- */
613/* Update last access date, and number of records if we have */
614/* write access. */
615/* -------------------------------------------------------------------- */
616 if( psDBF->bUpdated )
617 DBFUpdateHeader( psDBF );
618
619/* -------------------------------------------------------------------- */
620/* Close, and free resources. */
621/* -------------------------------------------------------------------- */
622 psDBF->sHooks.FClose( psDBF->fp );
623
624 if( psDBF->panFieldOffset != SHPLIB_NULLPTR )
625 {
626 free( psDBF->panFieldOffset );
627 free( psDBF->panFieldSize );
628 free( psDBF->panFieldDecimals );
629 free( psDBF->pachFieldType );
630 }
631
632 if( psDBF->pszWorkField != SHPLIB_NULLPTR )
633 free( psDBF->pszWorkField );
634
635 free( psDBF->pszHeader );
636 free( psDBF->pszCurrentRecord );
637 free( psDBF->pszCodePage );
638
639 free( psDBF );
640}
static void DBFWriteHeader(DBFHandle psDBF)
Definition dbfopen.c:127
#define SHPLIB_NULLPTR
Definition dbfopen.c:99
static int DBFFlushRecord(DBFHandle psDBF)
Definition dbfopen.c:195
#define CPL_IGNORE_RET_VAL_INT(x)
Definition dbfopen.c:87
void SHPAPI_CALL DBFUpdateHeader(DBFHandle psDBF)
Definition dbfopen.c:304
void free(void *)

References DBFInfo::bNoHeader, DBFInfo::bUpdated, CPL_IGNORE_RET_VAL_INT, DBFFlushRecord(), DBFUpdateHeader(), DBFWriteHeader(), SAHooks::FClose, DBFInfo::fp, free(), DBFInfo::pachFieldType, DBFInfo::panFieldDecimals, DBFInfo::panFieldOffset, DBFInfo::panFieldSize, DBFInfo::pszCodePage, DBFInfo::pszCurrentRecord, DBFInfo::pszHeader, DBFInfo::pszWorkField, DBFInfo::sHooks, and SHPLIB_NULLPTR.

Referenced by DBFCloneEmpty(), DBFOpenLL(), ShpDumperCloseTable(), and ShpLoaderDestroy().

Here is the call graph for this function:
Here is the caller graph for this function: