From d232cb23eec4a73859e5e9f4a313aaf5805455b5 Mon Sep 17 00:00:00 2001 From: Thomas Beutlich Date: Tue, 13 Aug 2024 20:48:06 +0200 Subject: [PATCH] Fix const-correctness --- web/dbf_api.html | 29 +++++++++++++++-------------- web/shp_api.html | 19 ++++++++++++------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/web/dbf_api.html b/web/dbf_api.html index cdd29a2..ed02166 100644 --- a/web/dbf_api.html +++ b/web/dbf_api.html @@ -54,7 +54,7 @@

DBFCreate()

DBFGetFieldCount()

-int DBFGetFieldCount( DBFHandle hDBF );
+int DBFGetFieldCount( const DBFHandle hDBF );
 
   hDBF:		The access handle for the file to be queried, as returned
                 by DBFOpen(), or DBFCreate().
@@ -68,7 +68,7 @@ 

DBFGetFieldCount()

DBFGetRecordCount()

-int DBFGetRecordCount( DBFHandle hDBF );
+int DBFGetRecordCount( const DBFHandle hDBF );
 
   hDBF:		The access handle for the file to be queried, as returned by
 		DBFOpen(), or DBFCreate().
@@ -83,7 +83,7 @@ 

DBFGetRecordCount()

DBFGetFieldIndex()

-int DBFGetFieldIndex( DBFHandle hDBF, const char *pszFieldName );
+int DBFGetFieldIndex( const DBFHandle hDBF, const char *pszFieldName );
 
   hDBF:		The access handle for the file to be queried, as returned by
 		DBFOpen(), or DBFCreate().
@@ -99,7 +99,8 @@ 

DBFGetFieldIndex()

DBFGetFieldInfo()

-DBFFieldType DBFGetFieldInfo( DBFHandle hDBF, int iField, char * pszFieldName,
+DBFFieldType DBFGetFieldInfo( const  DBFHandle hDBF, int iField,
+                              char * pszFieldName,
                               int * pnWidth, int * pnDecimals );
 
   hDBF:		The access handle for the file to be queried, as returned by
@@ -127,16 +128,16 @@ 

DBFGetFieldInfo()

The DBFGetFieldInfo() returns the type of the requested field, which is one of the DBFFieldType enumerated values. As well, the field name, and field width information can optionally be returned. The field type returned - does not correspond one to one with the xBase field types. For instance - the xBase field type for Date will just be returned as being FTInteger.

+ does not correspond one to one with the xBase field types.

     typedef enum {
-      FTString,			/* fixed length string field 		*/
-      FTInteger,		/* numeric field with no decimals 	*/
-      FTDouble,			/* numeric field with decimals 		*/
-      FTLogical,		/* logical field.                       */
-      FTInvalid                 /* not a recognised field type 		*/
+      FTString,			/* fixed length string field        */
+      FTInteger,		/* numeric field with no decimals   */
+      FTDouble,			/* numeric field with decimals      */
+      FTLogical,		/* logical field                    */
+      FTDate,			/* date field                       */
+      FTInvalid			/* not a recognised field type      */
     } DBFFieldType;
 
@@ -251,7 +252,7 @@

DBFReadStringAttribute()

DBFIsAttributeNULL()

-int DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField );
+int DBFIsAttributeNULL( const DBFHandle hDBF, int iShape, int iField );
 
   hDBF:		The access handle for the file to be queried, as returned by
 		DBFOpen(), or DBFCreate().
@@ -382,7 +383,7 @@ 

DBFClose()

DBFIsRecordDeleted()

-int DBFIsRecordDeleted( DBFHandle hDBF, int iShape );
+int DBFIsRecordDeleted( const DBFHandle hDBF, int iShape );
 
   hDBF:		The access handle for the file to be checked.
   iShape:       The record index to check.
@@ -410,7 +411,7 @@ 

DBFMarkRecordDeleted()

DBFGetNativeFieldType()

-char DBFGetNativeFieldType( DBFHandle hDBF, int iField );
+char DBFGetNativeFieldType( const DBFHandle hDBF, int iField );
 
   hDBF:		The access handle for the file.
   iField:       The field index to query.
diff --git a/web/shp_api.html b/web/shp_api.html
index 55900bd..f80a25a 100644
--- a/web/shp_api.html
+++ b/web/shp_api.html
@@ -82,6 +82,9 @@ 

SHPObject

double dfYMax; double dfZMax; double dfMMax; + + int bMeasureIsUsed; + int bFastModeReadObject; } SHPObject;
@@ -113,7 +116,7 @@

SHPOpen()

SHPGetInfo()

-void SHPGetInfo( SHPHandle hSHP, int * pnEntities, int * pnShapeType,
+void SHPGetInfo( const SHPHandle hSHP, int * pnEntities, int * pnShapeType,
                  double * padfMinBound, double * padfMaxBound );
 
   hSHP:			The handle previously returned by SHPOpen()
@@ -143,7 +146,7 @@ 

SHPGetInfo()

SHPReadObject()

-SHPObject *SHPReadObject( SHPHandle hSHP, int iShape );
+SHPObject *SHPReadObject( const SHPHandle hSHP, int iShape );
 
   hSHP:			The handle previously returned by SHPOpen()
 			or SHPCreate().
@@ -210,7 +213,8 @@ 

SHPCreateSimpleObject()

 SHPObject *
      SHPCreateSimpleObject( int nSHPType, int nVertices,
-			    double *padfX, double * padfY, double *padfZ, );
+			    const double *padfX, const double * padfY,
+			    const double *padfZ );
 
   nSHPType:		The SHPT_ type of the object to be created, such
                         as SHPT_POINT, or SHPT_POLYGON.
@@ -250,9 +254,10 @@ 

SHPCreateObject()

 SHPObject *
      SHPCreateObject( int nSHPType, int iShape,
-                      int nParts, int * panPartStart, int * panPartType,
-                      int nVertices, double *padfX, double * padfY,
-                      double *padfZ, double *padfM );
+                      int nParts, const int * panPartStart,
+                      const int * panPartType,
+                      int nVertices, const double *padfX, const double * padfY,
+                      const double *padfZ, const double *padfM );
 
   nSHPType:		The SHPT_ type of the object to be created, such
                         as SHPT_POINT, or SHPT_POLYGON.
@@ -321,7 +326,7 @@ 

SHPComputeExtents()

SHPWriteObject()

-int SHPWriteObject( SHPHandle hSHP, int iShape, SHPObject *psObject );
+int SHPWriteObject( SHPHandle hSHP, int iShape, const SHPObject *psObject );
 
   hSHP:			The handle previously returned by SHPOpen("r+")
 			or SHPCreate().