342 uchar abyHeader[100];
348 if (psSHP->
fpSHX == NULL)
350 psSHP->
sHooks.
Error(
"SHPWriteHeader failed : SHX file is closed");
357 for( i = 0; i < 100; i++ )
376 ByteCopy( &dValue, abyHeader+36, 8 );
380 ByteCopy( &dValue, abyHeader+44, 8 );
384 ByteCopy( &dValue, abyHeader+52, 8 );
388 ByteCopy( &dValue, abyHeader+60, 8 );
392 ByteCopy( &dValue, abyHeader+68, 8 );
396 ByteCopy( &dValue, abyHeader+76, 8 );
400 ByteCopy( &dValue, abyHeader+84, 8 );
404 ByteCopy( &dValue, abyHeader+92, 8 );
413 psSHP->
sHooks.
Error(
"Failure writing .shp header" );
427 psSHP->
sHooks.
Error(
"Failure writing .shx header" );
436 for( i = 0; i < psSHP->
nRecords; i++ )
447 psSHP->
sHooks.
Error(
"Failure writing .shx contents" );
static void SwapWord(int length, void *wordP)
#define ByteCopy(a, b, c)
void(* Error)(const char *message)
int(* FFlush)(SAFile file)
SAOffset(* FWrite)(void *p, SAOffset size, SAOffset nmemb, SAFile file)
SAOffset(* FSeek)(SAFile file, SAOffset offset, int whence)
unsigned int * panRecSize
unsigned int * panRecOffset