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

◆ DBFUpdateHeader()

void SHPAPI_CALL DBFUpdateHeader ( DBFHandle  hDBF)

Definition at line 324 of file dbfopen.c.

325{
326 unsigned char abyFileHeader[32];
327
328 if (psDBF->bNoHeader)
329 DBFWriteHeader(psDBF);
330
331 DBFFlushRecord(psDBF);
332
333 psDBF->sHooks.FSeek(psDBF->fp, 0, 0);
334 psDBF->sHooks.FRead(abyFileHeader, 32, 1, psDBF->fp);
335
336 abyFileHeader[4] = (unsigned char)(psDBF->nRecords % 256);
337 abyFileHeader[5] = (unsigned char)((psDBF->nRecords / 256) % 256);
338 abyFileHeader[6] = (unsigned char)((psDBF->nRecords / (256 * 256)) % 256);
339 abyFileHeader[7] = (unsigned char)((psDBF->nRecords / (256 * 256 * 256)) % 256);
340
341 psDBF->sHooks.FSeek(psDBF->fp, 0, 0);
342 psDBF->sHooks.FWrite(abyFileHeader, 32, 1, psDBF->fp);
343
344 psDBF->sHooks.FFlush(psDBF->fp);
345}
static void DBFWriteHeader(DBFHandle psDBF)
Definition dbfopen.c:198
static int DBFFlushRecord(DBFHandle psDBF)
Definition dbfopen.c:258

References DBFFlushRecord(), and DBFWriteHeader().

Referenced by DBFAddNativeFieldType(), DBFAlterFieldDefn(), DBFClose(), and DBFReorderFields().

Here is the call graph for this function:
Here is the caller graph for this function: