PostGIS  2.1.10dev-r@@SVN_REVISION@@
void SHPAPI_CALL DBFClose ( DBFHandle  hDBF)

Definition at line 579 of file dbfopen.c.

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

Referenced by ShpDumperCloseTable(), and ShpLoaderDestroy().

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

Here is the call graph for this function:

Here is the caller graph for this function: