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

◆ DBFClose()

void SHPAPI_CALL DBFClose ( DBFHandle  hDBF)

Definition at line 566 of file dbfopen.c.

567{
568 if (psDBF == NULL)
569 return;
570
571 /* -------------------------------------------------------------------- */
572 /* Write out header if not already written. */
573 /* -------------------------------------------------------------------- */
574 if (psDBF->bNoHeader)
575 DBFWriteHeader(psDBF);
576
577 DBFFlushRecord(psDBF);
578
579 /* -------------------------------------------------------------------- */
580 /* Update last access date, and number of records if we have */
581 /* write access. */
582 /* -------------------------------------------------------------------- */
583 if (psDBF->bUpdated)
584 DBFUpdateHeader(psDBF);
585
586 /* -------------------------------------------------------------------- */
587 /* Close, and free resources. */
588 /* -------------------------------------------------------------------- */
589 psDBF->sHooks.FClose(psDBF->fp);
590
591 if (psDBF->panFieldOffset != NULL)
592 {
593 free(psDBF->panFieldOffset);
594 free(psDBF->panFieldSize);
595 free(psDBF->panFieldDecimals);
596 free(psDBF->pachFieldType);
597 }
598
599 if (psDBF->pszWorkField != NULL)
600 free(psDBF->pszWorkField);
601
602 free(psDBF->pszHeader);
603 free(psDBF->pszCurrentRecord);
604 free(psDBF->pszCodePage);
605
606 free(psDBF);
607}
static void DBFWriteHeader(DBFHandle psDBF)
Definition dbfopen.c:198
static int DBFFlushRecord(DBFHandle psDBF)
Definition dbfopen.c:258
void SHPAPI_CALL DBFUpdateHeader(DBFHandle psDBF)
Definition dbfopen.c:324
void free(void *)

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

Referenced by ShpDumperCloseTable(), and ShpLoaderDestroy().

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