1 #ifndef SHAPEFILE_H_INCLUDED
2 #define SHAPEFILE_H_INCLUDED
3 
4 /******************************************************************************
5  * $Id: shapefil.h 88e27ffd9f44b53e6ded32072365c2bce6d45ddd 2021-02-27 03:20:57 -0800 Kurt Schwehr $
6  *
7  * Project:  Shapelib
8  * Purpose:  Primary include file for Shapelib.
9  * Author:   Frank Warmerdam, warmerdam@pobox.com
10  *
11  ******************************************************************************
12  * Copyright (c) 1999, Frank Warmerdam
13  * Copyright (c) 2012-2016, Even Rouault <even dot rouault at spatialys.com>
14  *
15  * This software is available under the following "MIT Style" license,
16  * or at the option of the licensee under the LGPL (see COPYING).  This
17  * option is discussed in more detail in shapelib.html.
18  *
19  * --
20  *
21  * Permission is hereby granted, free of charge, to any person obtaining a
22  * copy of this software and associated documentation files (the "Software"),
23  * to deal in the Software without restriction, including without limitation
24  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
25  * and/or sell copies of the Software, and to permit persons to whom the
26  * Software is furnished to do so, subject to the following conditions:
27  *
28  * The above copyright notice and this permission notice shall be included
29  * in all copies or substantial portions of the Software.
30  *
31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
34  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
36  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
37  * DEALINGS IN THE SOFTWARE.
38  ******************************************************************************
39  *
40  */
41 
42 #include <stdio.h>
43 
44 #ifdef USE_DBMALLOC
45 #include <dbmalloc.h>
46 #endif
47 
48 #ifdef USE_CPL
49 #include "cpl_conv.h"
50 #endif
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /************************************************************************/
57 /*                        Configuration options.                        */
58 /************************************************************************/
59 
60 /* -------------------------------------------------------------------- */
61 /*      Should the DBFReadStringAttribute() strip leading and           */
62 /*      trailing white space?                                           */
63 /* -------------------------------------------------------------------- */
64 #define TRIM_DBF_WHITESPACE
65 
66 /* -------------------------------------------------------------------- */
67 /*      Should we write measure values to the Multipatch object?        */
68 /*      Reportedly ArcView crashes if we do write it, so for now it     */
69 /*      is disabled.                                                    */
70 /* -------------------------------------------------------------------- */
71 #define DISABLE_MULTIPATCH_MEASURE
72 
73 /* -------------------------------------------------------------------- */
74 /*      SHPAPI_CALL                                                     */
75 /*                                                                      */
76 /*      The following two macros are present to allow forcing           */
77 /*      various calling conventions on the Shapelib API.                */
78 /*                                                                      */
79 /*      To force __stdcall conventions (needed to call Shapelib         */
80 /*      from Visual Basic and/or Dephi I believe) the makefile could    */
81 /*      be modified to define:                                          */
82 /*                                                                      */
83 /*        /DSHPAPI_CALL=__stdcall                                       */
84 /*                                                                      */
85 /*      If it is desired to force export of the Shapelib API without    */
86 /*      using the shapelib.def file, use the following definition.      */
87 /*                                                                      */
88 /*        /DSHAPELIB_DLLEXPORT                                          */
89 /*                                                                      */
90 /*      To get both at once it will be necessary to hack this           */
91 /*      include file to define:                                         */
92 /*                                                                      */
93 /*        #define SHPAPI_CALL __declspec(dllexport) __stdcall           */
94 /*        #define SHPAPI_CALL1 __declspec(dllexport) * __stdcall        */
95 /*                                                                      */
96 /*      The complexity of the situation is partly caused by the        */
97 /*      peculiar requirement of Visual C++ that __stdcall appear        */
98 /*      after any "*"'s in the return value of a function while the     */
99 /*      __declspec(dllexport) must appear before them.                  */
100 /* -------------------------------------------------------------------- */
101 
102 #ifdef SHAPELIB_DLLEXPORT
103 #  define SHPAPI_CALL __declspec(dllexport)
104 #  define SHPAPI_CALL1(x)  __declspec(dllexport) x
105 #endif
106 
107 #ifndef SHPAPI_CALL
108 #  if defined(USE_GCC_VISIBILITY_FLAG)
109 #    define SHPAPI_CALL     __attribute__ ((visibility("default")))
110 #    define SHPAPI_CALL1(x) __attribute__ ((visibility("default")))     x
111 #  else
112 #    define SHPAPI_CALL
113 #  endif
114 #endif
115 
116 #ifndef SHPAPI_CALL1
117 #  define SHPAPI_CALL1(x)      x SHPAPI_CALL
118 #endif
119 
120 /* -------------------------------------------------------------------- */
121 /*      Macros for controlling CVSID and ensuring they don't appear     */
122 /*      as unreferenced variables resulting in lots of warnings.        */
123 /* -------------------------------------------------------------------- */
124 #ifndef DISABLE_CVSID
125 #  if defined(__GNUC__) && __GNUC__ >= 4
126 #    define SHP_CVSID(string)     static const char cpl_cvsid[] __attribute__((used)) = string;
127 #  else
128 #    define SHP_CVSID(string)     static const char cpl_cvsid[] = string; \
129 static const char *cvsid_aw() { return( cvsid_aw() ? NULL : cpl_cvsid ); }
130 #  endif
131 #else
132 #  define SHP_CVSID(string)
133 #endif
134 
135 /* -------------------------------------------------------------------- */
136 /*      On some platforms, additional file IO hooks are defined that    */
137 /*      UTF-8 encoded filenames Unicode filenames                       */
138 /* -------------------------------------------------------------------- */
139 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
140 #  define SHPAPI_WINDOWS
141 #  define SHPAPI_UTF8_HOOKS
142 #endif
143 
144 /* -------------------------------------------------------------------- */
145 /*      IO/Error hook functions.                                        */
146 /* -------------------------------------------------------------------- */
147 typedef int *SAFile;
148 
149 #ifndef SAOffset
150 typedef unsigned long SAOffset;
151 #endif
152 
153 typedef struct {
154     SAFile     (*FOpen) ( const char *filename, const char *access);
155     SAOffset   (*FRead) ( void *p, SAOffset size, SAOffset nmemb, SAFile file);
156     SAOffset   (*FWrite)( void *p, SAOffset size, SAOffset nmemb, SAFile file);
157     SAOffset   (*FSeek) ( SAFile file, SAOffset offset, int whence );
158     SAOffset   (*FTell) ( SAFile file );
159     int        (*FFlush)( SAFile file );
160     int        (*FClose)( SAFile file );
161     int        (*Remove) ( const char *filename );
162 
163     void       (*Error) ( const char *message );
164     double     (*Atof)  ( const char *str );
165 } SAHooks;
166 
167 void SHPAPI_CALL SASetupDefaultHooks( SAHooks *psHooks );
168 #ifdef SHPAPI_UTF8_HOOKS
169 void SHPAPI_CALL SASetupUtf8Hooks( SAHooks *psHooks );
170 #endif
171 
172 /************************************************************************/
173 /*                             SHP Support.                             */
174 /************************************************************************/
175 typedef struct tagSHPObject SHPObject;
176 
177 typedef struct
178 {
179     SAHooks sHooks;
180 
181     SAFile      fpSHP;
182     SAFile      fpSHX;
183 
184     int         nShapeType;  /* SHPT_* */
185 
186     unsigned int nFileSize;  /* SHP file */
187 
188     int         nRecords;
189     int         nMaxRecords;
190     unsigned int*panRecOffset;
191     unsigned int *panRecSize;
192 
193     double      adBoundsMin[4];
194     double      adBoundsMax[4];
195 
196     int         bUpdated;
197 
198     unsigned char *pabyRec;
199     int         nBufSize;
200 
201     int            bFastModeReadObject;
202     unsigned char *pabyObjectBuf;
203     int            nObjectBufSize;
204     SHPObject*     psCachedObject;
205 } SHPInfo;
206 
207 typedef SHPInfo * SHPHandle;
208 
209 /* -------------------------------------------------------------------- */
210 /*      Shape types (nSHPType)                                          */
211 /* -------------------------------------------------------------------- */
212 #define SHPT_NULL       0
213 #define SHPT_POINT      1
214 #define SHPT_ARC        3
215 #define SHPT_POLYGON    5
216 #define SHPT_MULTIPOINT 8
217 #define SHPT_POINTZ     11
218 #define SHPT_ARCZ       13
219 #define SHPT_POLYGONZ   15
220 #define SHPT_MULTIPOINTZ 18
221 #define SHPT_POINTM     21
222 #define SHPT_ARCM       23
223 #define SHPT_POLYGONM   25
224 #define SHPT_MULTIPOINTM 28
225 #define SHPT_MULTIPATCH 31
226 
227 /* -------------------------------------------------------------------- */
228 /*      Part types - everything but SHPT_MULTIPATCH just uses           */
229 /*      SHPP_RING.                                                      */
230 /* -------------------------------------------------------------------- */
231 
232 #define SHPP_TRISTRIP   0
233 #define SHPP_TRIFAN     1
234 #define SHPP_OUTERRING  2
235 #define SHPP_INNERRING  3
236 #define SHPP_FIRSTRING  4
237 #define SHPP_RING       5
238 
239 /* -------------------------------------------------------------------- */
240 /*      SHPObject - represents on shape (without attributes) read       */
241 /*      from the .shp file.                                             */
242 /* -------------------------------------------------------------------- */
243 struct tagSHPObject
244 {
245     int    nSHPType;
246 
247     int    nShapeId;  /* -1 is unknown/unassigned */
248 
249     int    nParts;
250     int    *panPartStart;
251     int    *panPartType;
252 
253     int    nVertices;
254     double *padfX;
255     double *padfY;
256     double *padfZ;
257     double *padfM;
258 
259     double dfXMin;
260     double dfYMin;
261     double dfZMin;
262     double dfMMin;
263 
264     double dfXMax;
265     double dfYMax;
266     double dfZMax;
267     double dfMMax;
268 
269     int    bMeasureIsUsed;
270     int    bFastModeReadObject;
271 };
272 
273 /* -------------------------------------------------------------------- */
274 /*      SHP API Prototypes                                              */
275 /* -------------------------------------------------------------------- */
276 
277 /* If pszAccess is read-only, the fpSHX field of the returned structure */
278 /* will be NULL as it is not necessary to keep the SHX file open */
279 SHPHandle SHPAPI_CALL
280       SHPOpen( const char * pszShapeFile, const char * pszAccess );
281 SHPHandle SHPAPI_CALL
282       SHPOpenLL( const char *pszShapeFile, const char *pszAccess,
283                  SAHooks *psHooks );
284 SHPHandle SHPAPI_CALL
285       SHPOpenLLEx( const char *pszShapeFile, const char *pszAccess,
286                   SAHooks *psHooks, int bRestoreSHX );
287 
288 int SHPAPI_CALL
289       SHPRestoreSHX( const char *pszShapeFile, const char *pszAccess,
290                   SAHooks *psHooks );
291 
292 /* If setting bFastMode = TRUE, the content of SHPReadObject() is owned by the SHPHandle. */
293 /* So you cannot have 2 valid instances of SHPReadObject() simultaneously. */
294 /* The SHPObject padfZ and padfM members may be NULL depending on the geometry */
295 /* type. It is illegal to free at hand any of the pointer members of the SHPObject structure */
296 void SHPAPI_CALL SHPSetFastModeReadObject( SHPHandle hSHP, int bFastMode );
297 
298 SHPHandle SHPAPI_CALL
299       SHPCreate( const char * pszShapeFile, int nShapeType );
300 SHPHandle SHPAPI_CALL
301       SHPCreateLL( const char * pszShapeFile, int nShapeType,
302                    SAHooks *psHooks );
303 void SHPAPI_CALL
304       SHPGetInfo( SHPHandle hSHP, int * pnEntities, int * pnShapeType,
305                   double * padfMinBound, double * padfMaxBound );
306 
307 SHPObject SHPAPI_CALL1(*)
308       SHPReadObject( SHPHandle hSHP, int iShape );
309 int SHPAPI_CALL
310       SHPWriteObject( SHPHandle hSHP, int iShape, SHPObject * psObject );
311 
312 void SHPAPI_CALL
313       SHPDestroyObject( SHPObject * psObject );
314 void SHPAPI_CALL
315       SHPComputeExtents( SHPObject * psObject );
316 SHPObject SHPAPI_CALL1(*)
317       SHPCreateObject( int nSHPType, int nShapeId, int nParts,
318                        const int * panPartStart, const int * panPartType,
319                        int nVertices,
320                        const double * padfX, const double * padfY,
321                        const double * padfZ, const double * padfM );
322 SHPObject SHPAPI_CALL1(*)
323       SHPCreateSimpleObject( int nSHPType, int nVertices,
324                              const double * padfX,
325                              const double * padfY,
326                              const double * padfZ );
327 
328 int SHPAPI_CALL
329       SHPRewindObject( SHPHandle hSHP, SHPObject * psObject );
330 
331 void SHPAPI_CALL SHPClose( SHPHandle hSHP );
332 void SHPAPI_CALL SHPWriteHeader( SHPHandle hSHP );
333 
334 const char SHPAPI_CALL1(*)
335       SHPTypeName( int nSHPType );
336 const char SHPAPI_CALL1(*)
337       SHPPartTypeName( int nPartType );
338 
339 /* -------------------------------------------------------------------- */
340 /*      Shape quadtree indexing API.                                    */
341 /* -------------------------------------------------------------------- */
342 
343 /* this can be two or four for binary or quad tree */
344 #define MAX_SUBNODE 4
345 
346 /* upper limit of tree levels for automatic estimation */
347 #define MAX_DEFAULT_TREE_DEPTH 12
348 
349 typedef struct shape_tree_node
350 {
351     /* region covered by this node */
352     double      adfBoundsMin[4];
353     double      adfBoundsMax[4];
354 
355     /* list of shapes stored at this node.  The papsShapeObj pointers
356        or the whole list can be NULL */
357     int         nShapeCount;
358     int         *panShapeIds;
359     SHPObject   **papsShapeObj;
360 
361     int         nSubNodes;
362     struct shape_tree_node *apsSubNode[MAX_SUBNODE];
363 
364 } SHPTreeNode;
365 
366 typedef struct
367 {
368     SHPHandle   hSHP;
369 
370     int         nMaxDepth;
371     int         nDimension;
372     int         nTotalCount;
373 
374     SHPTreeNode *psRoot;
375 } SHPTree;
376 
377 SHPTree SHPAPI_CALL1(*)
378       SHPCreateTree( SHPHandle hSHP, int nDimension, int nMaxDepth,
379                      double *padfBoundsMin, double *padfBoundsMax );
380 void SHPAPI_CALL
381       SHPDestroyTree( SHPTree * hTree );
382 
383 int SHPAPI_CALL
384       SHPWriteTree( SHPTree *hTree, const char * pszFilename );
385 
386 int SHPAPI_CALL
387       SHPTreeAddShapeId( SHPTree * hTree, SHPObject * psObject );
388 int SHPAPI_CALL
389       SHPTreeRemoveShapeId( SHPTree * hTree, int nShapeId );
390 
391 void SHPAPI_CALL
392       SHPTreeTrimExtraNodes( SHPTree * hTree );
393 
394 int SHPAPI_CALL1(*)
395       SHPTreeFindLikelyShapes( SHPTree * hTree,
396                                double * padfBoundsMin,
397                                double * padfBoundsMax,
398                                int * );
399 int SHPAPI_CALL
400       SHPCheckBoundsOverlap( double *, double *, double *, double *, int );
401 
402 int SHPAPI_CALL1(*)
403 SHPSearchDiskTree( FILE *fp,
404                    double *padfBoundsMin, double *padfBoundsMax,
405                    int *pnShapeCount );
406 
407 typedef struct SHPDiskTreeInfo* SHPTreeDiskHandle;
408 
409 SHPTreeDiskHandle SHPAPI_CALL
410     SHPOpenDiskTree( const char* pszQIXFilename,
411                      SAHooks *psHooks );
412 
413 void SHPAPI_CALL
414     SHPCloseDiskTree( SHPTreeDiskHandle hDiskTree );
415 
416 int SHPAPI_CALL1(*)
417 SHPSearchDiskTreeEx( SHPTreeDiskHandle hDiskTree,
418                      double *padfBoundsMin, double *padfBoundsMax,
419                      int *pnShapeCount );
420 
421 int SHPAPI_CALL
422     SHPWriteTreeLL(SHPTree *hTree, const char *pszFilename, SAHooks *psHooks );
423 
424 /* -------------------------------------------------------------------- */
425 /*      SBN Search API                                                  */
426 /* -------------------------------------------------------------------- */
427 
428 typedef struct SBNSearchInfo* SBNSearchHandle;
429 
430 SBNSearchHandle SHPAPI_CALL
431     SBNOpenDiskTree( const char* pszSBNFilename,
432                  SAHooks *psHooks );
433 
434 void SHPAPI_CALL
435     SBNCloseDiskTree( SBNSearchHandle hSBN );
436 
437 int SHPAPI_CALL1(*)
438 SBNSearchDiskTree( SBNSearchHandle hSBN,
439                    double *padfBoundsMin, double *padfBoundsMax,
440                    int *pnShapeCount );
441 
442 int SHPAPI_CALL1(*)
443 SBNSearchDiskTreeInteger( SBNSearchHandle hSBN,
444                           int bMinX, int bMinY, int bMaxX, int bMaxY,
445                           int *pnShapeCount );
446 
447 void SHPAPI_CALL SBNSearchFreeIds( int* panShapeId );
448 
449 /************************************************************************/
450 /*                             DBF Support.                             */
451 /************************************************************************/
452 typedef struct
453 {
454     SAHooks sHooks;
455 
456     SAFile      fp;
457 
458     int         nRecords;
459 
460     int         nRecordLength; /* Must fit on uint16 */
461     int         nHeaderLength; /* File header length (32) + field
462                                   descriptor length + spare space.
463                                   Must fit on uint16 */
464     int         nFields;
465     int         *panFieldOffset;
466     int         *panFieldSize;
467     int         *panFieldDecimals;
468     char        *pachFieldType;
469 
470     char        *pszHeader; /* Field descriptors */
471 
472     int         nCurrentRecord;
473     int         bCurrentRecordModified;
474     char        *pszCurrentRecord;
475 
476     int         nWorkFieldLength;
477     char        *pszWorkField;
478 
479     int         bNoHeader;
480     int         bUpdated;
481 
482     union
483     {
484         double      dfDoubleField;
485         int         nIntField;
486     } fieldValue;
487 
488     int         iLanguageDriver;
489     char        *pszCodePage;
490 
491     int         nUpdateYearSince1900; /* 0-255 */
492     int         nUpdateMonth; /* 1-12 */
493     int         nUpdateDay; /* 1-31 */
494 
495     int         bWriteEndOfFileChar; /* defaults to TRUE */
496 
497     int         bRequireNextWriteSeek;
498 } DBFInfo;
499 
500 typedef DBFInfo * DBFHandle;
501 
502 typedef enum {
503   FTString,
504   FTInteger,
505   FTDouble,
506   FTLogical,
507   FTDate,
508   FTInvalid
509 } DBFFieldType;
510 
511 /* Field descriptor/header size */
512 #define XBASE_FLDHDR_SZ         32
513 /* Shapelib read up to 11 characters, even if only 10 should normally be used */
514 #define XBASE_FLDNAME_LEN_READ  11
515 /* On writing, we limit to 10 characters */
516 #define XBASE_FLDNAME_LEN_WRITE 10
517 /* Normally only 254 characters should be used. We tolerate 255 historically */
518 #define XBASE_FLD_MAX_WIDTH     255
519 
520 DBFHandle SHPAPI_CALL
521       DBFOpen( const char * pszDBFFile, const char * pszAccess );
522 DBFHandle SHPAPI_CALL
523       DBFOpenLL( const char * pszDBFFile, const char * pszAccess,
524                  SAHooks *psHooks );
525 DBFHandle SHPAPI_CALL
526       DBFCreate( const char * pszDBFFile );
527 DBFHandle SHPAPI_CALL
528       DBFCreateEx( const char * pszDBFFile, const char * pszCodePage );
529 DBFHandle SHPAPI_CALL
530       DBFCreateLL( const char * pszDBFFile, const char * pszCodePage, SAHooks *psHooks );
531 
532 int SHPAPI_CALL
533       DBFGetFieldCount( DBFHandle psDBF );
534 int SHPAPI_CALL
535       DBFGetRecordCount( DBFHandle psDBF );
536 int SHPAPI_CALL
537       DBFAddField( DBFHandle hDBF, const char * pszFieldName,
538                    DBFFieldType eType, int nWidth, int nDecimals );
539 
540 int SHPAPI_CALL
541       DBFAddNativeFieldType( DBFHandle hDBF, const char * pszFieldName,
542                              char chType, int nWidth, int nDecimals );
543 
544 int SHPAPI_CALL
545       DBFDeleteField( DBFHandle hDBF, int iField );
546 
547 int SHPAPI_CALL
548       DBFReorderFields( DBFHandle psDBF, int* panMap );
549 
550 int SHPAPI_CALL
551       DBFAlterFieldDefn( DBFHandle psDBF, int iField, const char * pszFieldName,
552                          char chType, int nWidth, int nDecimals );
553 
554 DBFFieldType SHPAPI_CALL
555       DBFGetFieldInfo( DBFHandle psDBF, int iField,
556                        char * pszFieldName, int * pnWidth, int * pnDecimals );
557 
558 int SHPAPI_CALL
559       DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName);
560 
561 int SHPAPI_CALL
562       DBFReadIntegerAttribute( DBFHandle hDBF, int iShape, int iField );
563 double SHPAPI_CALL
564       DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField );
565 const char SHPAPI_CALL1(*)
566       DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField );
567 const char SHPAPI_CALL1(*)
568       DBFReadLogicalAttribute( DBFHandle hDBF, int iShape, int iField );
569 int SHPAPI_CALL
570       DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField );
571 
572 int SHPAPI_CALL
573       DBFWriteIntegerAttribute( DBFHandle hDBF, int iShape, int iField,
574                                 int nFieldValue );
575 int SHPAPI_CALL
576       DBFWriteDoubleAttribute( DBFHandle hDBF, int iShape, int iField,
577                                double dFieldValue );
578 int SHPAPI_CALL
579       DBFWriteStringAttribute( DBFHandle hDBF, int iShape, int iField,
580                                const char * pszFieldValue );
581 int SHPAPI_CALL
582      DBFWriteNULLAttribute( DBFHandle hDBF, int iShape, int iField );
583 
584 int SHPAPI_CALL
585      DBFWriteLogicalAttribute( DBFHandle hDBF, int iShape, int iField,
586                                const char lFieldValue);
587 int SHPAPI_CALL
588      DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField,
589                                void * pValue );
590 const char SHPAPI_CALL1(*)
591       DBFReadTuple(DBFHandle psDBF, int hEntity );
592 int SHPAPI_CALL
593       DBFWriteTuple(DBFHandle psDBF, int hEntity, void * pRawTuple );
594 
595 int SHPAPI_CALL DBFIsRecordDeleted( DBFHandle psDBF, int iShape );
596 int SHPAPI_CALL DBFMarkRecordDeleted( DBFHandle psDBF, int iShape,
597                                       int bIsDeleted );
598 
599 DBFHandle SHPAPI_CALL
600       DBFCloneEmpty(DBFHandle psDBF, const char * pszFilename );
601 
602 void SHPAPI_CALL
603       DBFClose( DBFHandle hDBF );
604 void    SHPAPI_CALL
605       DBFUpdateHeader( DBFHandle hDBF );
606 char SHPAPI_CALL
607       DBFGetNativeFieldType( DBFHandle hDBF, int iField );
608 
609 const char SHPAPI_CALL1(*)
610       DBFGetCodePage(DBFHandle psDBF );
611 
612 void SHPAPI_CALL
613     DBFSetLastModifiedDate( DBFHandle psDBF, int nYYSince1900, int nMM, int nDD );
614 
615 void SHPAPI_CALL DBFSetWriteEndOfFileChar( DBFHandle psDBF, int bWriteFlag );
616 
617 #ifdef __cplusplus
618 }
619 #endif
620 
621 #endif /* ndef SHAPEFILE_H_INCLUDED */
622