diff options
author | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-08-12 20:51:21 +0000 |
---|---|---|
committer | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-08-12 20:51:21 +0000 |
commit | 3c746d013ed8236b7313f051d1f374a284f1c2f7 (patch) | |
tree | 08fb5f2683b97156739bc53c9aeb5751cb528ed8 /navit/maptool/tile.c | |
parent | 172d821b3c93b2f0ca87d3e3f7efc6f15f2a0f45 (diff) | |
download | navit-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/tile.c')
-rw-r--r-- | navit/maptool/tile.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 <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> @@ -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; |