summaryrefslogtreecommitdiff
path: root/navit/maptool
diff options
context:
space:
mode:
authorJoseph Herlant <herlantj@gmail.com>2018-04-29 22:03:44 -0700
committerJoseph Herlant <aerostitch@users.noreply.github.com>2018-04-30 09:05:18 -0700
commit01eb2df05b8d216206c05401d413d3d5601b333d (patch)
treeded7978516664261e4c4ee6a4ec24043e922e2bd /navit/maptool
parent4231cac78eebbc761a4a356292aa79693384254f (diff)
downloadnavit-01eb2df05b8d216206c05401d413d3d5601b333d.tar.gz
cleanup:global:Cleanup some unreachable code
Diffstat (limited to 'navit/maptool')
-rw-r--r--navit/maptool/boundaries.c31
-rw-r--r--navit/maptool/ch.c15
-rw-r--r--navit/maptool/coastline.c125
-rw-r--r--navit/maptool/itembin.c14
-rw-r--r--navit/maptool/osm.c18
-rw-r--r--navit/maptool/osm_protobuf.c73
-rw-r--r--navit/maptool/osm_protobufdb.c81
-rw-r--r--navit/maptool/tile.c12
8 files changed, 0 insertions, 369 deletions
diff --git a/navit/maptool/boundaries.c b/navit/maptool/boundaries.c
index 605b6fb7b..75e1d2479 100644
--- a/navit/maptool/boundaries.c
+++ b/navit/maptool/boundaries.c
@@ -308,37 +308,6 @@ process_boundaries_finish(GList *boundaries_list)
}
}
-#if 0
- printf("hierarchy\n");
-#endif
-#if 0
- boundaries_list=g_list_sort(boundaries_list, boundary_bbox_compare);
- l=boundaries_list;
- while (l) {
- struct boundary *boundary=l->data;
- GList *l2,*ln;
- ln=l2=g_list_next(l);
- while (l2) {
- struct boundary *boundary2=l2->data;
- if (bbox_contains_bbox(&boundary2->r, &boundary->r)) {
- boundaries_list=g_list_remove(boundaries_list, boundary);
- boundary2->children=g_list_append(boundary2->children, boundary);
-#if 0
- printf("found\n");
-#endif
- break;
- }
- l2=g_list_next(l2);
- }
- l=ln;
- }
- dump_hierarchy(boundaries_list,"");
-#if 0
- printf("hierarchy done\n");
- printf("test\n");
- test(boundaries_list);
-#endif
-#endif
return ret;
}
diff --git a/navit/maptool/ch.c b/navit/maptool/ch.c
index b3ebb31b3..59a4b7db2 100644
--- a/navit/maptool/ch.c
+++ b/navit/maptool/ch.c
@@ -262,9 +262,6 @@ ch_process_node(FILE *out, int node, int resolve)
memset(&ch_edge, 0, sizeof(ch_edge));
item_bin=init_item(type_ch_node);
oldnode=GPOINTER_TO_INT(g_hash_table_lookup(newnode_hash, GINT_TO_POINTER(node)));
-#if 0
- dbg(lvl_debug,"0x%x,0x%x",node_index[oldnode].x,node_index[oldnode].y);
-#endif
item_bin_add_coord(item_bin, &node_index[oldnode], 1);
fwd.first=oldnode;
rev.last=oldnode;
@@ -289,23 +286,14 @@ ch_process_node(FILE *out, int node, int resolve)
exit(1);
} else {
ch_edge.middle=*id;
-#if 0
- dbg(lvl_debug,"middle street id for is "ITEM_ID_FMT"",ITEM_ID_ARGS(*id));
-#endif
}
} else {
ch_edge.flags|=4;
id=g_hash_table_lookup(sgr_nodes_hash, GINT_TO_POINTER((int)edge->scmiddle));
dbg_assert(id != NULL);
ch_edge.middle=*id;
-#if 0
- dbg(lvl_debug,"middle node id for is "ITEM_ID_FMT"",ITEM_ID_ARGS(*id));
-#endif
}
id=g_hash_table_lookup(sgr_nodes_hash, GINT_TO_POINTER((int)edge->target));
-#if 0
- dbg(lvl_debug,"id for %d is "ITEM_ID_FMT"",edge->target,ITEM_ID_ARGS(*id));
-#endif
if (id == NULL) {
fprintf(stderr,"Failed to look up target %d\n",edge->target);
} else {
@@ -521,9 +509,6 @@ ch_assemble_map(char *map_suffix, char *suffix, struct zip_info *zip_info)
while (fread(&id, sizeof(id), 1, ref)) {
struct item_id *id2=g_slice_new(struct item_id);
*id2=id;
-#if 0
- dbg(lvl_debug,"%d is "ITEM_ID_FMT"",nodeid,ITEM_ID_ARGS(*id2));
-#endif
g_hash_table_insert(sgr_nodes_hash, GINT_TO_POINTER(nodeid), id2);
nodeid++;
}
diff --git a/navit/maptool/coastline.c b/navit/maptool/coastline.c
index 0c0ea6250..5de56f5b2 100644
--- a/navit/maptool/coastline.c
+++ b/navit/maptool/coastline.c
@@ -86,14 +86,8 @@ close_polygon(struct item_bin *ib, struct coord *from, struct coord *to, int dir
fromdist=distance_from_ll(to, bbox);
todist=distance_from_ll(from, bbox);
}
-#if 0
- fprintf(stderr,"close_polygon fromdist %d todist %d full %d dir %d\n", fromdist, todist, full, dir);
-#endif
if (fromdist > todist)
todist+=full;
-#if 0
- fprintf(stderr,"close_polygon corrected fromdist %d todist %d full %d dir %d\n", fromdist, todist, full, dir);
-#endif
for (i = 0 ; i < 8 ; i++) {
if (dir > 0)
e=i;
@@ -118,14 +112,8 @@ close_polygon(struct item_bin *ib, struct coord *from, struct coord *to, int dir
dist=distance_from_ll(&c, bbox);
if (e & 4)
dist+=full;
-#if 0
- fprintf(stderr,"dist %d %d\n",e,dist);
-#endif
if (dist > fromdist && dist < todist) {
item_bin_add_coord(ib, &c, 1);
-#if 0
- fprintf(stderr,"add\n");
-#endif
}
if (dist >= fromdist && dist <= todist) {
if (!corners)
@@ -161,9 +149,6 @@ tile_data_to_segments(int *tile_data)
curr+=ib->len+1;
count++;
}
-#if 0
- fprintf(stderr,"%d segments\n",count);
-#endif
return segments;
}
@@ -181,42 +166,12 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
struct item_bin *ibt=(struct item_bin *)(tile_data+1);
struct coastline_tile *ct=g_new0(struct coastline_tile, 1);
ct->wayid=item_bin_get_wayid(ibt);
-#if 0
- if (strncmp(tile,"bcdbdcabddddba",7))
- return;
-#endif
-#if 0
- if (strncmp(tile,"bcdbdcaaaaddba",14))
- return;
-#endif
-#if 0
- fprintf(stderr,"tile %s of size %d\n", tile, *tile_data);
-#endif
tile_bbox(tile, &bbox, 0);
curr=tile_data_to_segments(tile_data);
sorted_segments=geom_poly_segments_sort(curr, geom_poly_segment_type_way_right_side);
g_list_foreach(curr,(GFunc)geom_poly_segment_destroy,NULL);
g_list_free(curr);
-#if 0
-{
- GList *sort_segments=sorted_segments;
- int count=0;
- while (sort_segments) {
- struct geom_poly_segment *seg=sort_segments->data;
- struct item_bin *ib=(struct item_bin *)buffer;
- char *text=g_strdup_printf("segment %d type %d %p %s area "LONGLONG_FMT,count++,seg->type,sort_segments,coord_is_equal(*seg->first, *seg->last) ? "closed":"open",geom_poly_area(seg->first,seg->last-seg->first+1));
- item_bin_init(ib, type_rg_segment);
- item_bin_add_coord(ib, seg->first, seg->last-seg->first+1);
- item_bin_add_attr_string(ib, attr_debug, text);
- // fprintf(stderr,"%s\n",text);
- g_free(text);
- // item_bin_dump(ib, stderr);
- item_bin_write_to_sink(ib, out, NULL);
- sort_segments=g_list_next(sort_segments);
- }
-}
-#endif
flags=0;
curr=sorted_segments;
while (curr) {
@@ -243,7 +198,6 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
g_hash_table_insert(data->tile_edges, g_strdup(tile), ct);
return;
}
-#if 1
end=bbox.l;
tile_start_valid=0;
poly_start_valid=0;
@@ -307,49 +261,9 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da
}
g_list_foreach(sorted_segments,(GFunc)geom_poly_segment_destroy,NULL);
g_list_free(sorted_segments);
-#endif
-#if 0
- {
- int *end=tile_data+tile_data[0];
- int *curr=tile_data+1;
- while (curr < end) {
- struct item_bin *ib=(struct item_bin *)curr;
- // item_bin_dump(ib);
- ib->type=type_rg_segment;
- item_bin_write_to_sink(ib, out, NULL);
- curr+=ib->len+1;
-#if 0
- {
- struct coord *c[2];
- int i;
- char *s;
- c[0]=(struct coord *)(ib+1);
- c[1]=c[0]+ib->clen/2-1;
- for (i = 0 ; i < 2 ; i++) {
- s=coord_to_str(c[i]);
- item_bin_write_debug_point_to_sink(out, c[i], "%s",s);
- g_free(s);
- }
-
- }
-#endif
- }
- }
-#endif
ct->edges=edges;
g_hash_table_insert(data->tile_edges, g_strdup(tile), ct);
-#if 0
- item_bin_init(ib, type_border_country);
- item_bin_bbox(ib, &bbox);
- item_bin_add_attr_string(ib, attr_debug, tile);
- item_bin_write_to_sink(ib, out, NULL);
-#endif
-#if 0
- c.x=(bbox.l.x+bbox.h.x)/2;
- c.y=(bbox.l.y+bbox.h.y)/2;
- item_bin_write_debug_point_to_sink(out, &c, "%s %d",tile,edges);
-#endif
}
static void
@@ -377,20 +291,6 @@ ocean_tile(GHashTable *hash, char *tile, char c, osmid wayid, struct item_bin_si
ct->edges=15;
ct->wayid=wayid;
g_hash_table_insert(hash, g_strdup(tile2), ct);
-#if 0
- item_bin_init(ib, type_border_country);
- item_bin_bbox(ib, &bbox);
- item_bin_add_attr_string(ib, attr_debug, tile2);
- item_bin_write_to_sink(ib, out, NULL);
-#endif
-#if 0
- {
- struct coord co;
- co.x=(bbox.l.x+bbox.h.x)/2;
- co.y=(bbox.l.y+bbox.h.y)/2;
- item_bin_write_debug_point_to_sink(out, &co, "%s 15",tile2);
- }
-#endif
}
/* ba */
@@ -404,10 +304,6 @@ tile_collector_add_siblings(char *tile, struct coastline_tile *ct, struct coastl
struct item_bin_sink *out=data->sink->priv_data[1];
int edges=ct->edges;
int debug=0;
-#if 0
- if (!strncmp(tile,"bcacccaadbdcd",10))
- debug=1;
-#endif
if (debug)
fprintf(stderr,"%s (%c) has %d edges active\n",tile,t,edges);
if (t == 'a' && (edges & 1))
@@ -489,10 +385,6 @@ tile_collector_add_siblings2(char *tile, struct coastline_tile *ct, struct coast
char t=tile[len-1];
strcpy(tile2, tile);
tile2[len-1]='\0';
-#if 0
- if (!strncmp(tile,"bcacccaadbdcd",10))
- debug=1;
-#endif
if (debug)
fprintf(stderr,"len of %s %d vs %d\n",tile,len,data->level);
@@ -593,15 +485,6 @@ tile_collector_finish(struct item_bin_sink_func *tile_collector)
foreach_tile(&data, tile_collector_add_siblings2);
fprintf(stderr,"*\n");
}
-#if 0
- data.level=13;
- g_hash_table_foreach(data.tile_edges, tile_collector_add_siblings, &data);
- g_hash_table_foreach(data.tile_edges, tile_collector_add_siblings, &data);
- g_hash_table_foreach(data.tile_edges, tile_collector_add_siblings2, &data);
- data.level=12;
- g_hash_table_foreach(data.tile_edges, tile_collector_add_siblings, &data);
- g_hash_table_foreach(data.tile_edges, tile_collector_add_siblings, &data);
-#endif
item_bin_sink_func_destroy(tile_collector);
fprintf(stderr,"tile_collector_finish done\n");
return 0;
@@ -611,14 +494,6 @@ tile_collector_finish(struct item_bin_sink_func *tile_collector)
static int
coastline_processor_process(struct item_bin_sink_func *func, struct item_bin *ib, struct tile_data *tile_data)
{
-#if 0
- int i;
- struct coord *c=(struct coord *)(ib+1);
- for (i = 0 ; i < 19 ; i++) {
- c[i]=c[i+420];
- }
- ib->clen=(i-1)*2;
-#endif
item_bin_write_clipped(ib, func->priv_data[0], func->priv_data[1]);
return 0;
}
diff --git a/navit/maptool/itembin.c b/navit/maptool/itembin.c
index 98b0c52a6..0c62eb205 100644
--- a/navit/maptool/itembin.c
+++ b/navit/maptool/itembin.c
@@ -520,19 +520,8 @@ item_bin_sort_compare(const void *p1, const void *p2)
if(ret)
return ret;
}
-#if 0
- dbg_assert(ib1->clen==2);
- dbg_assert(ib2->clen==2);
- attr1=(struct attr_bin *)((int *)(ib1+1)+ib1->clen);
- attr2=(struct attr_bin *)((int *)(ib2+1)+ib1->clen);
-#else
attr1=item_bin_get_attr_bin_last(ib1);
attr2=item_bin_get_attr_bin_last(ib2);
-#endif
-#if 0
- dbg_assert(attr1->type == attr_town_name || attr1->type == attr_town_name_match);
- dbg_assert(attr2->type == attr_town_name || attr2->type == attr_town_name_match);
-#endif
s1=(char *)(attr1+1);
s2=(char *)(attr2+1);
if (attr1->type == attr_house_number && attr2->type == attr_house_number) {
@@ -554,9 +543,6 @@ item_bin_sort_compare(const void *p1, const void *p2)
match2=(attr2->type == attr_town_name_match || attr2->type == attr_district_name_match);
ret=match1-match2;
}
-#if 0
- fprintf(stderr,"sort_countries_compare p1=%p p2=%p %s %s\n",p1,p2,s1,s2);
-#endif
return ret;
}
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c
index 1613f2e56..c6d1fa6df 100644
--- a/navit/maptool/osm.c
+++ b/navit/maptool/osm.c
@@ -1470,10 +1470,6 @@ node_item_find_index_in_ordered_list(osmid id)
if (node_buffer_base[node_count-1].nd_id < id)
return -1;
while (node_buffer_base[search_index].nd_id != id) {
-#if 0
- fprintf(stderr,"search_index=%d node_count=%d search_step=%d id=%d node_buffer_base[search_index].id=%d\n",
- search_index, node_count, search_step, id, node_buffer_base[search_index].id);
-#endif
if (node_buffer_base[search_index].nd_id < id) {
search_index+=search_step;
if (search_step == 1) {
@@ -1721,9 +1717,6 @@ static void
relation_add_tag(char *k, char *v)
{
int add_tag=1;
-#if 0
- fprintf(stderr,"add tag %s %s\n",k,v);
-#endif
if (!strcmp(k,"type")) {
g_strlcpy(relation_type, v, sizeof(relation_type));
add_tag=0;
@@ -3201,17 +3194,9 @@ write_item_way_subsection(FILE *out, FILE *out_index, FILE *out_graph, struct it
new.len=new.clen+attr_len+2;
if (out_index)
write_item_way_subsection_index(out, out_index, out_graph, orig, last_id);
-#if 0
- fprintf(stderr,"first %d last %d type 0x%x len %d clen %d attr_len %d\n", first, last, new.type, new.len, new.clen, attr_len);
-#endif
dbg_assert(fwrite(&new, sizeof(new), 1, out)==1);
dbg_assert(fwrite(c+first, new.clen*4, 1, out)==1);
dbg_assert(fwrite(attr, attr_len*4, 1, out)==1);
-#if 0
- fwrite(&new, sizeof(new), 1, out_graph);
- fwrite(c+first, new.clen*4, 1, out_graph);
- fwrite(attr, attr_len*4, 1, out_graph);
-#endif
}
void
@@ -3302,9 +3287,6 @@ map_resolve_coords_and_split_at_intersections(FILE *in, FILE *out, FILE *out_ind
processed_nodes=processed_nodes_out=processed_ways=processed_relations=processed_tiles=0;
sig_alrm(0);
while ((ib=read_item(in))) {
-#if 0
- fprintf(stderr,"type 0x%x len %d clen %d\n", ib->type, ib->len, ib->clen);
-#endif
ccount=ib->clen/2;
if (ccount <= 1)
continue;
diff --git a/navit/maptool/osm_protobuf.c b/navit/maptool/osm_protobuf.c
index 1b4294a70..d75bca8b5 100644
--- a/navit/maptool/osm_protobuf.c
+++ b/navit/maptool/osm_protobuf.c
@@ -184,15 +184,9 @@ process_tag(OSMPBF__PrimitiveBlock *primitive_block, int key, int val)
{
char keybuff[1024];
char valbuff[1024];
-#if 0
- get_string(keybuff, sizeof(keybuff), primitive_block, key, 1);
- get_string(valbuff, sizeof(valbuff), primitive_block, val, 1);
- printf("\t\t<tag k=\"%s\" v=\"%s\" />\n",keybuff,valbuff);
-#else
get_string(keybuff, sizeof(keybuff), primitive_block, key, 0);
get_string(valbuff, sizeof(valbuff), primitive_block, val, 0);
osm_add_tag(keybuff, valbuff);
-#endif
}
@@ -216,26 +210,12 @@ process_dense(OSMPBF__PrimitiveBlock *primitive_block, OSMPBF__DenseNodes *dense
timestamp+=dense->denseinfo->timestamp[i];
has_tags=dense->keys_vals && dense->keys_vals[j];
osm_add_node(id, lat/latlon_scale,lon/latlon_scale);
-#if 0
- printf("\t<node id=\"%Ld\" lat=\"%.7f\" lon=\"%.7f\" version=\"%d\" changeset=\"%Ld\"",id,lat/latlon_scale,lon/latlon_scale,dense->denseinfo->version[i],changeset);
- process_user(primitive_block, user_sid, uid, 0);
- process_timestamp(timestamp);
-#endif
if (has_tags) {
-#if 0
- printf(">\n");
-#endif
while (dense->keys_vals[j]) {
process_tag(primitive_block, dense->keys_vals[j], dense->keys_vals[j+1]);
j+=2;
}
-#if 0
- printf("\t</node>\n");
- } else
- printf("/>\n");
-#else
}
-#endif
osm_end_node(osm);
j++;
}
@@ -258,25 +238,12 @@ process_way(OSMPBF__PrimitiveBlock *primitive_block, OSMPBF__Way *way, struct ma
long long ref=0;
osm_add_way(way->id);
-#if 0
- printf("\t<way id=\"%Ld\"",way->id);
- process_info(primitive_block, way->info);
- printf(">\n");
-#else
-#endif
for (i = 0 ; i < way->n_refs ; i++) {
ref+=way->refs[i];
osm_add_nd(ref);
-#if 0
- printf("\t\t<nd ref=\"%Ld\"/>\n",ref);
-#else
-#endif
}
for (i = 0 ; i < way->n_keys ; i++)
process_tag(primitive_block, way->keys[i], way->vals[i]);
-#if 0
- printf("\t</way>\n");
-#endif
osm_end_way(osm);
}
@@ -287,45 +254,15 @@ process_relation(OSMPBF__PrimitiveBlock *primitive_block, OSMPBF__Relation *rela
long long ref=0;
char rolebuff[1024];
-#if 0
- printf("\t<relation id=\"%Ld\"",relation->id);
- process_info(primitive_block, relation->info);
- printf(">\n");
-#endif
osm_add_relation(relation->id);
for (i = 0 ; i < relation->n_roles_sid ; i++) {
-#if 0
- printf("\t\t<member type=\"");
- switch (relation->types[i]) {
- case 0:
- printf("node");
- break;
- case 1:
- printf("way");
- break;
- case 2:
- printf("relation");
- break;
- default:
- printf("unknown");
- break;
- }
-#endif
ref+=relation->memids[i];
get_string(rolebuff, sizeof(rolebuff), primitive_block, relation->roles_sid[i], 1);
-#if 0
- printf("\" ref=\"%Ld\" role=\"%s\"/>\n",ref,rolebuff);
-#else
osm_add_member(relation->types[i]+1,ref,rolebuff);
-#endif
}
for (i = 0 ; i < relation->n_keys ; i++)
process_tag(primitive_block, relation->keys[i], relation->vals[i]);
-#if 0
- printf("\t</relation>\n");
-#else
osm_end_relation(osm);
-#endif
}
static void
@@ -341,9 +278,6 @@ process_osmdata(OSMPBF__Blob *blob, unsigned char *data, struct maptool_osm *osm
process_way(primitive_block, primitive_group->ways[j], osm);
for (j = 0 ; j < primitive_group->n_relations ; j++)
process_relation(primitive_block, primitive_group->relations[j], osm);
-#if 0
- printf("Group %p %d %d %d %d\n",primitive_group->dense,primitive_group->n_nodes,primitive_group->n_ways,primitive_group->n_relations,primitive_group->n_changesets);
-#endif
}
osmpbf__primitive_block__free_unpacked(primitive_block, &protobuf_c_system_allocator);
}
@@ -357,10 +291,6 @@ map_collect_data_osm_protobuf(FILE *in, struct maptool_osm *osm)
unsigned char *data;
unsigned char *buffer=g_malloc(MAX_BLOB_LENGTH);
-#if 0
- printf("<?xml version='1.0' encoding='UTF-8'?>\n");
- printf("<osm version=\"0.6\" generator=\"pbf2osm\">\n");
-#endif
while ((header=read_header(in))) {
blob=read_blob(header, in, buffer);
data=uncompress_blob(blob);
@@ -378,8 +308,5 @@ map_collect_data_osm_protobuf(FILE *in, struct maptool_osm *osm)
osmpbf__blob_header__free_unpacked(header, &protobuf_c_system_allocator);
}
g_free(buffer);
-#if 0
- printf("</osm>\n");
-#endif
return 1;
}
diff --git a/navit/maptool/osm_protobufdb.c b/navit/maptool/osm_protobufdb.c
index 463817037..51cdceae4 100644
--- a/navit/maptool/osm_protobufdb.c
+++ b/navit/maptool/osm_protobufdb.c
@@ -464,86 +464,13 @@ osm_protobufdb_start_file(struct osm_protobufdb_context *ctx, int type, int num)
static void
test(void)
{
-#if 0
- struct node n,o;
- long long id=1;
- long long lat=0;
- long long lon=0;
- long long timestamp=0;
- long long changeset=0;
- int version=1;
- int user_sid=0;
- int uid=0;
- int p;
- n.id=1;
-#endif
-#if 0
- OSMPBF__DenseInfo di=OSMPBF__DENSE_INFO__INIT;
- OSMPBF__DenseNodes dn=OSMPBF__DENSE_NODES__INIT;
-#endif
-
context.current_file=-1;
-
-#if 0
- context.di=g_malloc(sizeof(*context.di));
- *context.di=di;
- context.dn=g_malloc(sizeof(*context.dn));
- *context.dn=dn;
-#endif
-
-#if 0
- di.n_version=1;
- di.version=&version;
- di.n_timestamp=1;
- di.timestamp=&timestamp;
- di.n_changeset=1;
- di.changeset=&changeset;
- di.n_user_sid=1;
- di.user_sid=&user_sid;
- di.n_uid=1;
- di.uid=&uid;
-#endif
-#if 0
- n.id=1;
- n.lat=1;
- n.lon=1;
- n.timestamp=1;
- n.changeset=1;
- n.version=1;
- n.user_sid=0;
- n.uid=0;
- p=osm_protobufdb_insert_densenode(&n.id, &o, &dn);
- osm_protobufdb_modify(&n, &o, p, &dn);
- p=osm_protobufdb_insert_densenode(&n.id, &o, &dn);
- osm_protobufdb_modify(&n, &o, p, &dn);
-#endif
-
-
-#if 0
- dn.n_id=1;
- dn.id=&id;
- dn.n_lat=1;
- dn.lat=&lat;
- dn.n_lon=1;
- dn.lon=&lon;
-#endif
-#if 0
- st.n_s=1;
- data.data="Test";
- data.len=4;
- st.s=&data;
-#endif
}
static void
finish(void)
{
osm_protobufdb_finish_file(&context);
-#if 0
- osm_protobufdb_write_primitive_group(context.pg, context.pb);
- osm_protobufdb_write_primitive_block(context.pb, context.blob);
- osm_protobufdb_write_blob_to_file();
-#endif
}
static long long
@@ -632,16 +559,8 @@ static int
osm_protobufdb_end_node(struct osm_protobufdb_context *ctx)
{
int p;
-#if 0
- OSMPBF__Node *n=&ctx->n,offset;
- OSMPBF__Info *i=&ctx->i,offseti;
- osm_protobufdb_start_densenode(ctx);
- p=osm_protobufdb_insert_densenode(n->id, &offset, &offseti, context.dn);
- osm_protobufdb_modify_densenode(n, i, &offset, &offseti, p, context.dn);
-#else
p=osm_protobufdb_insert_node(ctx->n.id, ctx->pg);
osm_protobufdb_modify_node(&ctx->n, &ctx->i, p, ctx->pg);
-#endif
ctx->in_node=0;
return 1;
}
diff --git a/navit/maptool/tile.c b/navit/maptool/tile.c
index 6f61b9471..fc8f39076 100644
--- a/navit/maptool/tile.c
+++ b/navit/maptool/tile.c
@@ -424,9 +424,6 @@ add_tile_hash(struct tile_head *th)
int idx,len,maxnamelen=0;
char **data;
-#if 0
- g_hash_table_insert(tile_hash2, string_hash_lookup( th->name ), th);
-#endif
for( idx = 0; idx < th->num_subtiles; idx++ ) {
data = th_get_subtile( th, idx );
@@ -502,13 +499,7 @@ load_tilesdir(FILE *in)
th->zipnum=zipnum++;
th->zip_data=NULL;
th->name=string_hash_lookup(tile);
-#if 0
- printf("tile '%s' %d\n",tile,size);
-#endif
while (fscanf(in,":%[^:\n]",subtile) == 1) {
-#if 0
- printf("subtile '%s'\n",subtile);
-#endif
th=g_realloc(th, sizeof(struct tile_head)+(th->num_subtiles+1)*sizeof(char*));
*th_get_subtile( th, th->num_subtiles ) = string_hash_lookup(subtile);
th->num_subtiles++;
@@ -548,9 +539,6 @@ write_tilesdir(struct tile_info *info, struct zip_info *zip_info, FILE *out)
}
len=maxlen;
while (len >= 0) {
-#if 0
- fprintf(stderr,"PROGRESS: collecting tiles with len=%d\n", len);
-#endif
next=g_list_first(tiles_list);
while (next) {
if (strlen(next->data) == len) {