/ msSHPClose() */ */ Close the .shp and .shx files. */ /
| 381 | /* Close the .shp and .shx files. */ |
| 382 | /************************************************************************/ |
| 383 | void msSHPClose(SHPHandle psSHP ) |
| 384 | { |
| 385 | /* -------------------------------------------------------------------- */ |
| 386 | /* Update the header if we have modified anything. */ |
| 387 | /* -------------------------------------------------------------------- */ |
| 388 | if( psSHP->bUpdated ) |
| 389 | writeHeader( psSHP ); |
| 390 | |
| 391 | /* -------------------------------------------------------------------- */ |
| 392 | /* Free all resources, and close files. */ |
| 393 | /* -------------------------------------------------------------------- */ |
| 394 | free( psSHP->panRecOffset ); |
| 395 | free( psSHP->panRecSize ); |
| 396 | free( psSHP->panRecLoaded ); |
| 397 | |
| 398 | |
| 399 | if(psSHP->pabyRec) free(psSHP->pabyRec); |
| 400 | if(psSHP->panParts) free(psSHP->panParts); |
| 401 | |
| 402 | fclose( psSHP->fpSHX ); |
| 403 | fclose( psSHP->fpSHP ); |
| 404 | |
| 405 | free( psSHP ); |
| 406 | } |
| 407 | |
| 408 | /************************************************************************/ |
| 409 | /* msSHPGetInfo() */ |
no test coverage detected