PostGIS  2.1.10dev-r@@SVN_REVISION@@
void SHPAPI_CALL SHPClose ( SHPHandle  psSHP)

Definition at line 760 of file shpopen.c.

References SHPInfo::bUpdated, SAHooks::FClose, SHPInfo::fpSHP, SHPInfo::fpSHX, SHPInfo::pabyRec, SHPInfo::panRecOffset, SHPInfo::panRecSize, SHPInfo::sHooks, and SHPWriteHeader().

Referenced by ShpDumperCloseTable(), and ShpLoaderDestroy().

762 {
763  if( psSHP == NULL )
764  return;
765 
766 /* -------------------------------------------------------------------- */
767 /* Update the header if we have modified anything. */
768 /* -------------------------------------------------------------------- */
769  if( psSHP->bUpdated )
770  SHPWriteHeader( psSHP );
771 
772 /* -------------------------------------------------------------------- */
773 /* Free all resources, and close files. */
774 /* -------------------------------------------------------------------- */
775  free( psSHP->panRecOffset );
776  free( psSHP->panRecSize );
777 
778  if ( psSHP->fpSHX != NULL)
779  psSHP->sHooks.FClose( psSHP->fpSHX );
780  psSHP->sHooks.FClose( psSHP->fpSHP );
781 
782  if( psSHP->pabyRec != NULL )
783  {
784  free( psSHP->pabyRec );
785  }
786 
787  free( psSHP );
788 }
int(* FClose)(SAFile file)
Definition: shapefil.h:262
unsigned int * panRecOffset
Definition: shapefil.h:290
SAHooks sHooks
Definition: shapefil.h:279
SAFile fpSHX
Definition: shapefil.h:282
unsigned int * panRecSize
Definition: shapefil.h:291
void SHPAPI_CALL SHPWriteHeader(SHPHandle psSHP)
Definition: shpopen.c:340
unsigned char * pabyRec
Definition: shapefil.h:298
int bUpdated
Definition: shapefil.h:296
SAFile fpSHP
Definition: shapefil.h:281

Here is the call graph for this function:

Here is the caller graph for this function: