summaryrefslogtreecommitdiff
path: root/navit/maptool/misc.c
diff options
context:
space:
mode:
authorbjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-08-12 20:51:21 +0000
committerbjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-08-12 20:51:21 +0000
commit3c746d013ed8236b7313f051d1f374a284f1c2f7 (patch)
tree08fb5f2683b97156739bc53c9aeb5751cb528ed8 /navit/maptool/misc.c
parent172d821b3c93b2f0ca87d3e3f7efc6f15f2a0f45 (diff)
downloadnavit-3c746d013ed8236b7313f051d1f374a284f1c2f7.tar.gz
Simple changes required to compile in MSVC
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5200 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool/misc.c')
-rw-r--r--navit/maptool/misc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/navit/maptool/misc.c b/navit/maptool/misc.c
index 5e6c39e74..e9ce88341 100644
--- a/navit/maptool/misc.c
+++ b/navit/maptool/misc.c
@@ -28,8 +28,10 @@
#include <signal.h>
#include <stdio.h>
#include <math.h>
+#ifndef _MSC_VER
#include <getopt.h>
#include <unistd.h>
+#endif
#include <fcntl.h>
#include <sys/stat.h>
#include <zlib.h>
@@ -43,6 +45,8 @@
#include "plugin.h"
#include "maptool.h"
+#define phase1_coord_max 16384
+
struct rect world_bbox = {
{ -20000000, -20000000},
{ 20000000, 20000000},
@@ -131,15 +135,15 @@ phase1_map(GList *maps, FILE *out_ways, FILE *out_nodes)
{
struct map_rect *mr;
struct item *item;
- int count,max=16384;
- struct coord ca[max];
+ int count;
+ struct coord ca[phase1_coord_max];
struct attr attr;
struct item_bin *item_bin;
while (maps) {
mr=map_rect_new(maps->data, NULL);
while ((item = map_rect_get_item(mr))) {
- count=item_coord_get(item, ca, item->type < type_line ? 1: max);
+ count=item_coord_get(item, ca, item->type < type_line ? 1: phase1_coord_max);
item_bin=init_item(item->type);
item_bin_add_coord(item_bin, ca, count);
while (item_attr_get(item, attr_any, &attr)) {