Skip to content

Commit

Permalink
Fix const-correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
thbeu committed Aug 13, 2024
1 parent bcd39fc commit d232cb2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
29 changes: 15 additions & 14 deletions web/dbf_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2>DBFCreate()</h2>
<h2>DBFGetFieldCount()</h2>

<pre>
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().
Expand All @@ -68,7 +68,7 @@ <h2>DBFGetFieldCount()</h2>
<h2>DBFGetRecordCount()</h2>

<pre>
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().
Expand All @@ -83,7 +83,7 @@ <h2>DBFGetRecordCount()</h2>
<h2>DBFGetFieldIndex()</h2>

<pre>
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().
Expand All @@ -99,7 +99,8 @@ <h2>DBFGetFieldIndex()</h2>
<h2>DBFGetFieldInfo()</h2>

<pre>
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
Expand Down Expand Up @@ -127,16 +128,16 @@ <h2>DBFGetFieldInfo()</h2>
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. <p>
does not correspond one to one with the xBase field types. <p>

<pre>
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;
</pre>

Expand Down Expand Up @@ -251,7 +252,7 @@ <h2>DBFReadStringAttribute()</h2>
<h2>DBFIsAttributeNULL()</h2>

<pre>
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().
Expand Down Expand Up @@ -382,7 +383,7 @@ <h2>DBFClose()</h2>
<h2>DBFIsRecordDeleted()</h2>

<pre>
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.
Expand Down Expand Up @@ -410,7 +411,7 @@ <h2>DBFMarkRecordDeleted()</h2>
<h2>DBFGetNativeFieldType()</h2>

<pre>
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.
Expand Down
19 changes: 12 additions & 7 deletions web/shp_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ <h2>SHPObject</h2>
double dfYMax;
double dfZMax;
double dfMMax;

int bMeasureIsUsed;
int bFastModeReadObject;
} SHPObject;
</pre>

Expand Down Expand Up @@ -113,7 +116,7 @@ <h2>SHPOpen()</h2>
<h2>SHPGetInfo()</h2>

<pre>
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()
Expand Down Expand Up @@ -143,7 +146,7 @@ <h2>SHPGetInfo()</h2>
<h2>SHPReadObject()</h2>

<pre>
SHPObject *SHPReadObject( SHPHandle hSHP, int iShape );
SHPObject *SHPReadObject( const SHPHandle hSHP, int iShape );

hSHP: The handle previously returned by SHPOpen()
or SHPCreate().
Expand Down Expand Up @@ -210,7 +213,8 @@ <h2>SHPCreateSimpleObject()</h2>
<pre>
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.
Expand Down Expand Up @@ -250,9 +254,10 @@ <h2>SHPCreateObject()</h2>
<pre>
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.
Expand Down Expand Up @@ -321,7 +326,7 @@ <h2>SHPComputeExtents()</h2>
<h2>SHPWriteObject()</h2>

<pre>
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().
Expand Down

0 comments on commit d232cb2

Please sign in to comment.