File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 15
15
/* $Id$ */
16
16
17
17
// Dbase header structure
18
+ #ifndef _MSC_VER
19
+ #include < stdint.h>
20
+ #else
21
+ typedef __int32 int32_t ;
22
+ typedef __int16 int16_t ;
23
+ #endif
18
24
19
25
struct DbaseHeader
20
26
{
21
27
unsigned char valid_dbf;
22
28
char year;
23
29
char month;
24
30
char day;
25
- long num_recs;
26
- short size_hdr;
27
- short size_rec;
31
+ int32_t num_recs;
32
+ int16_t size_hdr;
33
+ int16_t size_rec;
28
34
char reserved[3 ];
29
35
char lan[13 ];
30
36
char reserved2[4 ];
@@ -35,7 +41,7 @@ struct FieldDescriptorArray
35
41
{
36
42
char field_name[11 ];
37
43
char field_type;
38
- long field_addr; /* used only in memory */
44
+ int32_t field_addr; /* used only in memory */
39
45
unsigned char field_length;
40
46
unsigned char field_decimal;
41
47
char reserved[2 ];
Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ QString QgsShapeFile::getFeatureClass()
207
207
dbf.read (( char * )&fda, sizeof ( fda ) );
208
208
switch ( fda.field_type )
209
209
{
210
- case ' N' : if (( int )fda.field_decimal > 0 )
210
+ case ' N' :
211
+ if (( int )fda.field_decimal > 0 )
211
212
column_types.push_back ( " float" );
212
213
else
213
214
column_types.push_back ( " int" );
You can’t perform that action at this time.
0 commit comments