PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ DBFFlushRecord()

static int DBFFlushRecord ( DBFHandle  psDBF)
static

Definition at line 258 of file dbfopen.c.

References FALSE, and TRUE.

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

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