#include "shapefil.h"
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
typedef struct {double x, y;} Point;
char *start,*end;
int num_tabs = 0;
- str2 = (str);
+ (str2) = (str);
- while (str2 = strchr((str2), '\t') )
+ while ((str2 = strchr(str2, '\t')) )
{
if ( (str2 == str) || (str2[-1] != '\\') ) //the previous char isnt a '\'
num_tabs ++;
memset(result,0, strlen(str) + num_tabs+1 );
start = str;
- while(end = strchr((start),'\t'))
+ while((end = strchr((start),'\t')))
{
if ( (end == str) || (end[-1] != '\\' ) ) //the previous char isnt a '\'
{
str2 = str;
- while (str2 = strchr((str2), '\'') )
+ while ((str2 = strchr((str2), '\'')) )
{
if ( (str2 == str) || (str2[-1] != '\\') ) //the previous char isnt a '\'
num_tabs ++;
memset(result,0, strlen(str) + num_tabs+1 );
start = str;
- while(end = strchr((start),'\''))
+ while((end = strchr((start),'\'')))
{
if ( (end == str) || (end[-1] != '\\' ) ) //the previous char isnt a '\'
{
for( i = 0; i < num_fields; i++ ){
if (dump_format){
- printf("\t%s",make_good_string(DBFReadStringAttribute( hDBFHandle, row, i )) );
+
+ printf("\t%s",make_good_string((char*)DBFReadStringAttribute( hDBFHandle,row, i )) );
}else{
- printf(",'%s'",protect_quotes_string(DBFReadStringAttribute( hDBFHandle, row, i )) );
+
+ printf(",'%s'",protect_quotes_string((char*)DBFReadStringAttribute(hDBFHandle, row, i )) );
}
}
return 1;