4
4
/* Necessary functions to read/write a MiraMon Vector File */
5
5
/* -------------------------------------------------------------------- */
6
6
7
- #ifdef GDAL_COMPILATION
8
7
#include "mm_gdal_constants.h"
9
8
#include "mm_gdal_structures.h"
10
9
11
10
CPL_C_START // Necessary for compiling in GDAL project
12
- #else
13
- #include <stdio.h> // For FILE
14
- #include "mm_constants.h"
15
- #include "mm_gdal\mm_gdal_structures.h"
16
- #endif
17
11
18
12
// For MetaData
19
13
#define SECTION_VERSIO "VERSIO"
@@ -259,7 +253,7 @@ struct MM_FLUSH_INFO
259
253
GUInt64 NTimesFlushed ;
260
254
261
255
// Pointer to an OPEN file where to flush.
262
- FILE_TYPE * pF ;
256
+ VSILFILE * pF ;
263
257
// Offset in the disk where to flush
264
258
MM_FILE_OFFSET OffsetWhereToFlush ;
265
259
@@ -493,19 +487,19 @@ struct MiraMonPointLayer
493
487
{
494
488
// Name of the layer with extension
495
489
char pszLayerName [MM_CPL_PATH_BUF_SIZE ];
496
- FILE_TYPE * pF ;
490
+ VSILFILE * pF ;
497
491
498
492
// Coordinates x,y of the points
499
493
struct MM_FLUSH_INFO FlushTL ;
500
494
char * pTL ; // (II mode)
501
495
char pszTLName [MM_CPL_PATH_BUF_SIZE ]; // Temporary file where to flush
502
- FILE_TYPE * pFTL ; // Pointer to temporary file where to flush
496
+ VSILFILE * pFTL ; // Pointer to temporary file where to flush
503
497
504
498
// Z section
505
499
// Temporary file where the Z coordinates are stored
506
500
// if necessary
507
501
char psz3DLayerName [MM_CPL_PATH_BUF_SIZE ];
508
- FILE_TYPE * pF3d ;
502
+ VSILFILE * pF3d ;
509
503
struct MM_ZSection pZSection ;
510
504
511
505
// MiraMon table (extended DBF)
@@ -519,7 +513,7 @@ struct MiraMonNodeLayer
519
513
{
520
514
char
521
515
pszLayerName [MM_CPL_PATH_BUF_SIZE ]; // Name of the layer with extension
522
- FILE_TYPE * pF ;
516
+ VSILFILE * pF ;
523
517
524
518
// Header of every node
525
519
GUInt32 nSizeNodeHeader ;
@@ -530,7 +524,7 @@ struct MiraMonNodeLayer
530
524
struct MM_FLUSH_INFO FlushNL ; // (II mode)
531
525
char * pNL ; //
532
526
char pszNLName [MM_CPL_PATH_BUF_SIZE ]; // Temporary file where to flush
533
- FILE_TYPE * pFNL ; // Pointer to temporary file where to flush
527
+ VSILFILE * pFNL ; // Pointer to temporary file where to flush
534
528
535
529
struct MMAdmDatabase MMAdmDB ;
536
530
@@ -542,12 +536,12 @@ struct MiraMonArcLayer
542
536
{
543
537
char
544
538
pszLayerName [MM_CPL_PATH_BUF_SIZE ]; // Name of the layer with extension
545
- FILE_TYPE * pF ;
539
+ VSILFILE * pF ;
546
540
547
541
// Temporal file where the Z coordinates are stored
548
542
// if necessary
549
543
char psz3DLayerName [MM_CPL_PATH_BUF_SIZE ];
550
- FILE_TYPE * pF3d ;
544
+ VSILFILE * pF3d ;
551
545
552
546
// Header of every arc
553
547
GUInt32 nSizeArcHeader ;
@@ -559,7 +553,7 @@ struct MiraMonArcLayer
559
553
unsigned short int nALElementSize ; // 16 bytes: 2 doubles (coordinates)
560
554
char * pAL ; // Arc List // (II mode)
561
555
char pszALName [MM_CPL_PATH_BUF_SIZE ]; // Temporary file where to flush
562
- FILE_TYPE * pFAL ; // Pointer to temporary file where to flush
556
+ VSILFILE * pFAL ; // Pointer to temporary file where to flush
563
557
564
558
// Z section
565
559
struct MM_ZSection pZSection ;
@@ -583,14 +577,14 @@ struct MiraMonPolygonLayer
583
577
{
584
578
char
585
579
pszLayerName [MM_CPL_PATH_BUF_SIZE ]; // Name of the layer with extension
586
- FILE_TYPE * pF ;
580
+ VSILFILE * pF ;
587
581
588
582
// PS part
589
583
struct MM_FLUSH_INFO FlushPS ;
590
584
unsigned short int nPSElementSize ;
591
585
char * pPS ; // Polygon side (II mode)
592
586
char pszPSName [MM_CPL_PATH_BUF_SIZE ]; // Temporary file where to flush
593
- FILE_TYPE * pFPS ; // Pointer to temporary file where to flush
587
+ VSILFILE * pFPS ; // Pointer to temporary file where to flush
594
588
595
589
// Header of every polygon
596
590
MM_INTERNAL_FID nMaxPolHeader ; // Number of pPolHeader allocated
@@ -602,7 +596,7 @@ struct MiraMonPolygonLayer
602
596
unsigned short int nPALElementSize ;
603
597
char * pPAL ; // Polygon Arc List // (II mode)
604
598
char pszPALName [MM_CPL_PATH_BUF_SIZE ]; // Temporary file where to flush
605
- FILE_TYPE * pFPAL ; // Pointer to temporary file where to flush
599
+ VSILFILE * pFPAL ; // Pointer to temporary file where to flush
606
600
607
601
// Arc layer associated to the arc layer
608
602
struct MM_TH TopArcHeader ;
@@ -676,7 +670,7 @@ struct MiraMonFeature
676
670
struct MiraMonVectMapInfo
677
671
{
678
672
char pszMapName [MM_CPL_PATH_BUF_SIZE ];
679
- FILE_TYPE * fMMMap ;
673
+ VSILFILE * fMMMap ;
680
674
int nNumberOfLayers ;
681
675
};
682
676
@@ -832,7 +826,5 @@ enum TreatmentVariable
832
826
MMTVCategorical
833
827
};
834
828
835
- #ifdef GDAL_COMPILATION
836
829
CPL_C_END // Necessary for compiling in GDAL project
837
- #endif
838
- #endif //__MM_GDAL_DRIVER_STRUCTS_H
830
+ #endif //__MM_GDAL_DRIVER_STRUCTS_H
0 commit comments