PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ DBFMarkRecordDeleted()

int SHPAPI_CALL DBFMarkRecordDeleted ( DBFHandle  psDBF,
int  iShape,
int  bIsDeleted 
)

Definition at line 1775 of file dbfopen.c.

1778 {
1779  char chNewFlag;
1780 
1781 /* -------------------------------------------------------------------- */
1782 /* Verify selection. */
1783 /* -------------------------------------------------------------------- */
1784  if( iShape < 0 || iShape >= psDBF->nRecords )
1785  return FALSE;
1786 
1787 /* -------------------------------------------------------------------- */
1788 /* Is this an existing record, but different than the last one */
1789 /* we accessed? */
1790 /* -------------------------------------------------------------------- */
1791  if( !DBFLoadRecord( psDBF, iShape ) )
1792  return FALSE;
1793 
1794 /* -------------------------------------------------------------------- */
1795 /* Assign value, marking record as dirty if it changes. */
1796 /* -------------------------------------------------------------------- */
1797  if( bIsDeleted )
1798  chNewFlag = '*';
1799  else
1800  chNewFlag = ' ';
1801 
1802  if( psDBF->pszCurrentRecord[0] != chNewFlag )
1803  {
1804  psDBF->bCurrentRecordModified = TRUE;
1805  psDBF->bUpdated = TRUE;
1806  psDBF->pszCurrentRecord[0] = chNewFlag;
1807  }
1808 
1809  return TRUE;
1810 }
static int DBFLoadRecord(DBFHandle psDBF, int iRecord)
Definition: dbfopen.c:257
#define TRUE
Definition: dbfopen.c:73
#define FALSE
Definition: dbfopen.c:72
int bUpdated
Definition: shapefil.h:616
char * pszCurrentRecord
Definition: shapefil.h:610
int bCurrentRecordModified
Definition: shapefil.h:609
int nRecords
Definition: shapefil.h:594

References DBFInfo::bCurrentRecordModified, DBFInfo::bUpdated, DBFLoadRecord(), FALSE, DBFInfo::nRecords, DBFInfo::pszCurrentRecord, and TRUE.

Here is the call graph for this function: