summaryrefslogtreecommitdiff
path: root/navit/maptool/misc.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-02-12 18:17:14 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-02-12 18:17:14 +0000
commite7071c026716872236784b06ec1d4058dec67956 (patch)
treecc51f1e41f1217ec2a76ec357ee26458d3657330 /navit/maptool/misc.c
parent8bf234d5eec3f7ae7ceecde6bcb46a24ce69f77d (diff)
downloadnavit-e7071c026716872236784b06ec1d4058dec67956.tar.gz
Add:maptool:Optionally create md5 sum of resulting map
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4149 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool/misc.c')
-rw-r--r--navit/maptool/misc.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/navit/maptool/misc.c b/navit/maptool/misc.c
index bdf8ec070..edfa92faa 100644
--- a/navit/maptool/misc.c
+++ b/navit/maptool/misc.c
@@ -317,7 +317,7 @@ process_slice(FILE **in, FILE **reference, int in_count, int with_range, long lo
}
}
info.write=1;
- info.maxlen=zip_info->maxnamelen;
+ info.maxlen=zip_get_maxnamelen(zip_info);
info.suffix=suffix;
info.tiles_list=NULL;
info.tilesdir_out=NULL;
@@ -331,10 +331,10 @@ process_slice(FILE **in, FILE **reference, int in_count, int with_range, long lo
fprintf(stderr,"Size error '%s': %d vs %d\n", th->name, th->total_size, th->total_size_used);
exit(1);
}
- write_zipmember(zip_info, th->name, zip_info->maxnamelen, th->zip_data, th->total_size);
+ write_zipmember(zip_info, th->name, zip_get_maxnamelen(zip_info), th->zip_data, th->total_size);
zipfiles++;
} else
- fwrite(th->zip_data, th->total_size, 1, zip_info->index);
+ fwrite(th->zip_data, th->total_size, 1, zip_get_index(zip_info));
}
th=th->next;
}
@@ -383,9 +383,9 @@ phase5(FILE **in, FILE **references, int in_count, int with_range, char *suffix,
th=th->next;
}
/* process_slice() modifies zip_info, but need to retain old info */
- zipnum=zip_info->zipnum;
+ zipnum=zip_get_zipnum(zip_info);
written_tiles=process_slice(in, references, in_count, with_range, size, suffix, zip_info);
- zip_info->zipnum=zipnum+written_tiles;
+ zip_set_zipnum(zip_info, zipnum+written_tiles);
slices++;
}
return 0;
@@ -425,13 +425,3 @@ add_aux_tiles(char *name, struct zip_info *info)
}
fclose(in);
}
-
-void
-cat(FILE *in, FILE *out)
-{
- size_t size;
- char buffer[4096];
- while ((size=fread(buffer, 1, 4096, in)))
- fwrite(buffer, 1, size, out);
-}
-