PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ DBFMarkRecordDeleted()

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

Definition at line 1766 of file dbfopen.c.

1769 {
1770  char chNewFlag;
1771 
1772 /* -------------------------------------------------------------------- */
1773 /* Verify selection. */
1774 /* -------------------------------------------------------------------- */
1775  if( iShape < 0 || iShape >= psDBF->nRecords )
1776  return FALSE;
1777 
1778 /* -------------------------------------------------------------------- */
1779 /* Is this an existing record, but different than the last one */
1780 /* we accessed? */
1781 /* -------------------------------------------------------------------- */
1782  if( !DBFLoadRecord( psDBF, iShape ) )
1783  return FALSE;
1784 
1785 /* -------------------------------------------------------------------- */
1786 /* Assign value, marking record as dirty if it changes. */
1787 /* -------------------------------------------------------------------- */
1788  if( bIsDeleted )
1789  chNewFlag = '*';
1790  else
1791  chNewFlag = ' ';
1792 
1793  if( psDBF->pszCurrentRecord[0] != chNewFlag )
1794  {
1795  psDBF->bCurrentRecordModified = TRUE;
1796  psDBF->bUpdated = TRUE;
1797  psDBF->pszCurrentRecord[0] = chNewFlag;
1798  }
1799 
1800  return TRUE;
1801 }
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: