[QGIS Commit] r10094 - trunk/qgis/src/plugins/spit
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Feb 2 15:47:17 EST 2009
Author: jef
Date: 2009-02-02 15:47:16 -0500 (Mon, 02 Feb 2009)
New Revision: 10094
Modified:
trunk/qgis/src/plugins/spit/qgsdbfbase.h
trunk/qgis/src/plugins/spit/qgsshapefile.cpp
Log:
fix #1523 (r10084 was actually fixing #1516)
Modified: trunk/qgis/src/plugins/spit/qgsdbfbase.h
===================================================================
--- trunk/qgis/src/plugins/spit/qgsdbfbase.h 2009-02-02 19:30:43 UTC (rev 10093)
+++ trunk/qgis/src/plugins/spit/qgsdbfbase.h 2009-02-02 20:47:16 UTC (rev 10094)
@@ -15,6 +15,12 @@
/* $Id$ */
// Dbase header structure
+#ifndef _MSC_VER
+#include <stdint.h>
+#else
+typedef __int32 int32_t;
+typedef __int16 int16_t;
+#endif
struct DbaseHeader
{
@@ -22,9 +28,9 @@
char year;
char month;
char day;
- long num_recs;
- short size_hdr;
- short size_rec;
+ int32_t num_recs;
+ int16_t size_hdr;
+ int16_t size_rec;
char reserved[3];
char lan[13];
char reserved2[4];
@@ -35,7 +41,7 @@
{
char field_name[11];
char field_type;
- long field_addr; /* used only in memory */
+ int32_t field_addr; /* used only in memory */
unsigned char field_length;
unsigned char field_decimal;
char reserved[2];
Modified: trunk/qgis/src/plugins/spit/qgsshapefile.cpp
===================================================================
--- trunk/qgis/src/plugins/spit/qgsshapefile.cpp 2009-02-02 19:30:43 UTC (rev 10093)
+++ trunk/qgis/src/plugins/spit/qgsshapefile.cpp 2009-02-02 20:47:16 UTC (rev 10094)
@@ -207,7 +207,8 @@
dbf.read(( char * )&fda, sizeof( fda ) );
switch ( fda.field_type )
{
- case 'N': if (( int )fda.field_decimal > 0 )
+ case 'N':
+ if (( int )fda.field_decimal > 0 )
column_types.push_back( "float" );
else
column_types.push_back( "int" );
More information about the QGIS-commit
mailing list