From 3c746d013ed8236b7313f051d1f374a284f1c2f7 Mon Sep 17 00:00:00 2001 From: bjasspa Date: Sun, 12 Aug 2012 20:51:21 +0000 Subject: 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 --- navit/maptool/tile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'navit/maptool/tile.c') diff --git a/navit/maptool/tile.c b/navit/maptool/tile.c index 1817ba6d5..9727bbf97 100644 --- a/navit/maptool/tile.c +++ b/navit/maptool/tile.c @@ -28,8 +28,10 @@ #include #include #include +#ifndef _MSC_VER #include #include +#endif #include #include #include @@ -464,9 +466,10 @@ load_tilesdir(FILE *in) { char tile[32],subtile[32],c; int size,zipnum=0; + struct tile_head **last; create_tile_hash(); tile_hash=g_hash_table_new(g_str_hash, g_str_equal); - struct tile_head **last=&tile_head_root; + last=&tile_head_root; while (fscanf(in,"%[^:]:%d",tile,&size) == 2) { struct tile_head *th=malloc(sizeof(struct tile_head)); if (!strcmp(tile,"index")) @@ -655,10 +658,11 @@ index_submap_add(struct tile_info *info, struct tile_head *th) { int tlen=tile_len(th->name); int len=tlen; - char index_tile[len+1+strlen(info->suffix)]; + char *index_tile; struct rect r; struct item_bin *item_bin; + index_tile=g_alloca(len+1+strlen(info->suffix)); strcpy(index_tile, th->name); if (len > 6) len=6; -- cgit v1.2.1