PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int DBFFlushRecord ( DBFHandle  psDBF)
static

Definition at line 259 of file dbfopen.c.

References FALSE, and TRUE.

Referenced by DBFAddNativeFieldType(), DBFAlterFieldDefn(), DBFClose(), DBFLoadRecord(), DBFReorderFields(), DBFUpdateHeader(), DBFWriteAttribute(), DBFWriteAttributeDirectly(), and DBFWriteTuple().

261 {
262  SAOffset nRecordOffset;
263 
264  if( psDBF->bCurrentRecordModified && psDBF->nCurrentRecord > -1 )
265  {
266  psDBF->bCurrentRecordModified = FALSE;
267 
268  nRecordOffset =
269  psDBF->nRecordLength * (SAOffset) psDBF->nCurrentRecord
270  + psDBF->nHeaderLength;
271 
272  if( psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ) != 0
273  || psDBF->sHooks.FWrite( psDBF->pszCurrentRecord,
274  psDBF->nRecordLength,
275  1, psDBF->fp ) != 1 )
276  {
277  char szMessage[128];
278  sprintf( szMessage, "Failure writing DBF record %d.",
279  psDBF->nCurrentRecord );
280  psDBF->sHooks.Error( szMessage );
281  return FALSE;
282  }
283  }
284 
285  return TRUE;
286 }
unsigned long SAOffset
Definition: shapefil.h:251
#define FALSE
Definition: dbfopen.c:169
#define TRUE
Definition: dbfopen.c:170

Here is the caller graph for this function: