PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ DBFFlushRecord()

static int DBFFlushRecord ( DBFHandle  psDBF)
static

Definition at line 258 of file dbfopen.c.

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

References FALSE, and TRUE.

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

Here is the caller graph for this function: