diff --git a/dbfopen.c b/dbfopen.c index cc0ab06..1b8995d 100644 --- a/dbfopen.c +++ b/dbfopen.c @@ -366,7 +366,7 @@ static int DBFGetLenWithoutExtension(const char *pszBasename) /************************************************************************/ DBFHandle SHPAPI_CALL DBFOpenLL(const char *pszFilename, const char *pszAccess, - SAHooks *psHooks) + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* We only allow the access strings "rb" and "r+". */ @@ -647,7 +647,8 @@ DBFHandle SHPAPI_CALL DBFCreateEx(const char *pszFilename, /************************************************************************/ DBFHandle SHPAPI_CALL DBFCreateLL(const char *pszFilename, - const char *pszCodePage, SAHooks *psHooks) + const char *pszCodePage, + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* Compute the base (layer) name. If there is any extension */ diff --git a/sbnsearch.c b/sbnsearch.c index 90f1ea7..afc7929 100644 --- a/sbnsearch.c +++ b/sbnsearch.c @@ -151,7 +151,8 @@ static void SwapWord(int length, void *wordP) /* SBNOpenDiskTree() */ /************************************************************************/ -SBNSearchHandle SBNOpenDiskTree(const char *pszSBNFilename, SAHooks *psHooks) +SBNSearchHandle SBNOpenDiskTree(const char *pszSBNFilename, + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* Establish the byte order on this machine. */ diff --git a/shapefil.h b/shapefil.h index 59793f1..c941e1f 100644 --- a/shapefil.h +++ b/shapefil.h @@ -269,13 +269,13 @@ extern "C" SHPHandle SHPAPI_CALL SHPOpen(const char *pszShapeFile, const char *pszAccess); SHPHandle SHPAPI_CALL SHPOpenLL(const char *pszShapeFile, - const char *pszAccess, SAHooks *psHooks); + const char *pszAccess, const SAHooks *psHooks); SHPHandle SHPAPI_CALL SHPOpenLLEx(const char *pszShapeFile, - const char *pszAccess, SAHooks *psHooks, + const char *pszAccess, const SAHooks *psHooks, int bRestoreSHX); int SHPAPI_CALL SHPRestoreSHX(const char *pszShapeFile, - const char *pszAccess, SAHooks *psHooks); + const char *pszAccess, const SAHooks *psHooks); /* If setting bFastMode = TRUE, the content of SHPReadObject() is owned by the SHPHandle. */ /* So you cannot have 2 valid instances of SHPReadObject() simultaneously. */ @@ -285,7 +285,7 @@ extern "C" SHPHandle SHPAPI_CALL SHPCreate(const char *pszShapeFile, int nShapeType); SHPHandle SHPAPI_CALL SHPCreateLL(const char *pszShapeFile, int nShapeType, - SAHooks *psHooks); + const SAHooks *psHooks); void SHPAPI_CALL SHPGetInfo(SHPHandle hSHP, int *pnEntities, int *pnShapeType, double *padfMinBound, double *padfMaxBound); @@ -376,7 +376,7 @@ extern "C" typedef struct SHPDiskTreeInfo *SHPTreeDiskHandle; SHPTreeDiskHandle SHPAPI_CALL SHPOpenDiskTree(const char *pszQIXFilename, - SAHooks *psHooks); + const SAHooks *psHooks); void SHPAPI_CALL SHPCloseDiskTree(SHPTreeDiskHandle hDiskTree); @@ -385,7 +385,7 @@ extern "C" double *padfBoundsMax, int *pnShapeCount); int SHPAPI_CALL SHPWriteTreeLL(SHPTree *hTree, const char *pszFilename, - SAHooks *psHooks); + const SAHooks *psHooks); /* -------------------------------------------------------------------- */ /* SBN Search API */ @@ -394,7 +394,7 @@ extern "C" typedef struct SBNSearchInfo *SBNSearchHandle; SBNSearchHandle SHPAPI_CALL SBNOpenDiskTree(const char *pszSBNFilename, - SAHooks *psHooks); + const SAHooks *psHooks); void SHPAPI_CALL SBNCloseDiskTree(SBNSearchHandle hSBN); @@ -483,13 +483,13 @@ extern "C" DBFHandle SHPAPI_CALL DBFOpen(const char *pszDBFFile, const char *pszAccess); DBFHandle SHPAPI_CALL DBFOpenLL(const char *pszDBFFile, - const char *pszAccess, SAHooks *psHooks); + const char *pszAccess, const SAHooks *psHooks); DBFHandle SHPAPI_CALL DBFCreate(const char *pszDBFFile); DBFHandle SHPAPI_CALL DBFCreateEx(const char *pszDBFFile, const char *pszCodePage); DBFHandle SHPAPI_CALL DBFCreateLL(const char *pszDBFFile, const char *pszCodePage, - SAHooks *psHooks); + const SAHooks *psHooks); int SHPAPI_CALL DBFGetFieldCount(DBFHandle psDBF); int SHPAPI_CALL DBFGetRecordCount(DBFHandle psDBF); diff --git a/shpopen.c b/shpopen.c index 681671a..eaf2911 100644 --- a/shpopen.c +++ b/shpopen.c @@ -311,7 +311,7 @@ static int SHPGetLenWithoutExtension(const char *pszBasename) /************************************************************************/ SHPHandle SHPAPI_CALL SHPOpenLL(const char *pszLayer, const char *pszAccess, - SAHooks *psHooks) + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* Ensure the access string is one of the legal ones. We */ @@ -666,7 +666,7 @@ SHPHandle SHPAPI_CALL SHPOpenLL(const char *pszLayer, const char *pszAccess, /************************************************************************/ SHPHandle SHPAPI_CALL SHPOpenLLEx(const char *pszLayer, const char *pszAccess, - SAHooks *psHooks, int bRestoreSHX) + const SAHooks *psHooks, int bRestoreSHX) { if (!bRestoreSHX) return SHPOpenLL(pszLayer, pszAccess, psHooks); @@ -689,7 +689,7 @@ SHPHandle SHPAPI_CALL SHPOpenLLEx(const char *pszLayer, const char *pszAccess, /************************************************************************/ int SHPAPI_CALL SHPRestoreSHX(const char *pszLayer, const char *pszAccess, - SAHooks *psHooks) + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* Ensure the access string is one of the legal ones. We */ @@ -981,7 +981,7 @@ SHPHandle SHPAPI_CALL SHPCreate(const char *pszLayer, int nShapeType) /************************************************************************/ SHPHandle SHPAPI_CALL SHPCreateLL(const char *pszLayer, int nShapeType, - SAHooks *psHooks) + const SAHooks *psHooks) { /* -------------------------------------------------------------------- */ /* Establish the byte order on this system. */ diff --git a/shptree.c b/shptree.c index 0e9c051..067ebbb 100644 --- a/shptree.c +++ b/shptree.c @@ -727,7 +727,8 @@ struct SHPDiskTreeInfo /* SHPOpenDiskTree() */ /************************************************************************/ -SHPTreeDiskHandle SHPOpenDiskTree(const char *pszQIXFilename, SAHooks *psHooks) +SHPTreeDiskHandle SHPOpenDiskTree(const char *pszQIXFilename, + const SAHooks *psHooks) { SHPTreeDiskHandle hDiskTree; @@ -1049,7 +1050,8 @@ static int SHPGetSubNodeOffset(SHPTreeNode *node) /* SHPWriteTreeNode() */ /************************************************************************/ -static void SHPWriteTreeNode(SAFile fp, SHPTreeNode *node, SAHooks *psHooks) +static void SHPWriteTreeNode(SAFile fp, SHPTreeNode *node, + const SAHooks *psHooks) { int i, j; int offset; @@ -1111,7 +1113,8 @@ int SHPAPI_CALL SHPWriteTree(SHPTree *tree, const char *filename) /* SHPWriteTreeLL() */ /************************************************************************/ -int SHPWriteTreeLL(SHPTree *tree, const char *filename, SAHooks *psHooks) +int SHPWriteTreeLL(SHPTree *tree, const char *filename, + const SAHooks *psHooks) { char signature[4] = "SQT"; int i;