PostGIS  2.1.10dev-r@@SVN_REVISION@@
void SHPAPI_CALL DBFUpdateHeader ( DBFHandle  hDBF)

Definition at line 335 of file dbfopen.c.

References DBFFlushRecord(), and DBFWriteHeader().

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

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

Here is the call graph for this function:

Here is the caller graph for this function: