PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ DBFMarkRecordDeleted()

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

Definition at line 1757 of file dbfopen.c.

1760 {
1761  char chNewFlag;
1762 
1763 /* -------------------------------------------------------------------- */
1764 /* Verify selection. */
1765 /* -------------------------------------------------------------------- */
1766  if( iShape < 0 || iShape >= psDBF->nRecords )
1767  return FALSE;
1768 
1769 /* -------------------------------------------------------------------- */
1770 /* Is this an existing record, but different than the last one */
1771 /* we accessed? */
1772 /* -------------------------------------------------------------------- */
1773  if( !DBFLoadRecord( psDBF, iShape ) )
1774  return FALSE;
1775 
1776 /* -------------------------------------------------------------------- */
1777 /* Assign value, marking record as dirty if it changes. */
1778 /* -------------------------------------------------------------------- */
1779  if( bIsDeleted )
1780  chNewFlag = '*';
1781  else
1782  chNewFlag = ' ';
1783 
1784  if( psDBF->pszCurrentRecord[0] != chNewFlag )
1785  {
1786  psDBF->bCurrentRecordModified = TRUE;
1787  psDBF->bUpdated = TRUE;
1788  psDBF->pszCurrentRecord[0] = chNewFlag;
1789  }
1790 
1791  return TRUE;
1792 }
static int DBFLoadRecord(DBFHandle psDBF, int iRecord)
Definition: dbfopen.c:291
#define TRUE
Definition: dbfopen.c:169
#define FALSE
Definition: dbfopen.c:168

References DBFLoadRecord(), FALSE, and TRUE.

Here is the call graph for this function: