PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ DBFUpdateHeader()

void SHPAPI_CALL DBFUpdateHeader ( DBFHandle  hDBF)

Definition at line 334 of file dbfopen.c.

336 {
337  unsigned char abyFileHeader[32];
338 
339  if( psDBF->bNoHeader )
340  DBFWriteHeader( psDBF );
341 
342  DBFFlushRecord( psDBF );
343 
344  psDBF->sHooks.FSeek( psDBF->fp, 0, 0 );
345  psDBF->sHooks.FRead( abyFileHeader, 32, 1, psDBF->fp );
346 
347  abyFileHeader[4] = (unsigned char) (psDBF->nRecords % 256);
348  abyFileHeader[5] = (unsigned char) ((psDBF->nRecords/256) % 256);
349  abyFileHeader[6] = (unsigned char) ((psDBF->nRecords/(256*256)) % 256);
350  abyFileHeader[7] = (unsigned char) ((psDBF->nRecords/(256*256*256)) % 256);
351 
352  psDBF->sHooks.FSeek( psDBF->fp, 0, 0 );
353  psDBF->sHooks.FWrite( abyFileHeader, 32, 1, psDBF->fp );
354 
355  psDBF->sHooks.FFlush( psDBF->fp );
356 }
static void DBFWriteHeader(DBFHandle psDBF)
Definition: dbfopen.c:197
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: