PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ DBFClose()

void SHPAPI_CALL DBFClose ( DBFHandle  hDBF)

Definition at line 578 of file dbfopen.c.

References DBFFlushRecord(), DBFUpdateHeader(), DBFWriteHeader(), free(), and SHPAPI_CALL.

Referenced by return(), ShpDumperCloseTable(), and ShpLoaderDestroy().

579 {
580  if( psDBF == NULL )
581  return;
582 
583 /* -------------------------------------------------------------------- */
584 /* Write out header if not already written. */
585 /* -------------------------------------------------------------------- */
586  if( psDBF->bNoHeader )
587  DBFWriteHeader( psDBF );
588 
589  DBFFlushRecord( psDBF );
590 
591 /* -------------------------------------------------------------------- */
592 /* Update last access date, and number of records if we have */
593 /* write access. */
594 /* -------------------------------------------------------------------- */
595  if( psDBF->bUpdated )
596  DBFUpdateHeader( psDBF );
597 
598 /* -------------------------------------------------------------------- */
599 /* Close, and free resources. */
600 /* -------------------------------------------------------------------- */
601  psDBF->sHooks.FClose( psDBF->fp );
602 
603  if( psDBF->panFieldOffset != NULL )
604  {
605  free( psDBF->panFieldOffset );
606  free( psDBF->panFieldSize );
607  free( psDBF->panFieldDecimals );
608  free( psDBF->pachFieldType );
609  }
610 
611  if( psDBF->pszWorkField != NULL )
612  free( psDBF->pszWorkField );
613 
614  free( psDBF->pszHeader );
615  free( psDBF->pszCurrentRecord );
616  free( psDBF->pszCodePage );
617 
618  free( psDBF );
619 }
static void DBFWriteHeader(DBFHandle psDBF)
Definition: dbfopen.c:197
static int DBFFlushRecord(DBFHandle psDBF)
Definition: dbfopen.c:258
void free(void *)
void SHPAPI_CALL DBFUpdateHeader(DBFHandle psDBF)
Definition: dbfopen.c:334
Here is the call graph for this function:
Here is the caller graph for this function: