diff options
| author | Joseph Herlant <aerostitch@users.noreply.github.com> | 2018-04-26 10:12:26 -0700 |
|---|---|---|
| committer | jkoan <jkoan@users.noreply.github.com> | 2018-04-26 19:12:26 +0200 |
| commit | 221f783ea1caaaab2f5ceadc6b0fb3e720aac3df (patch) | |
| tree | 1ecf89faa1dfa550477669b05ef5c36e9864f68a /navit/maptool | |
| parent | 011bb15468b4cb626e9facecba924b04bd494d7f (diff) | |
| download | navit-221f783ea1caaaab2f5ceadc6b0fb3e720aac3df.tar.gz | |
Fix:debug:Change line separators for dbg to work also on win* platform (#546)
* Fix:debug:Change line separators for dbg to work also on win* platform
* Fix:debug:Break multiline dbg statements to use the new model
* Fix:debug:Move the EOL into debug_vprintf
Diffstat (limited to 'navit/maptool')
| -rw-r--r-- | navit/maptool/ch.c | 10 | ||||
| -rw-r--r-- | navit/maptool/coastline.c | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/navit/maptool/ch.c b/navit/maptool/ch.c index be0f22b48..b3ebb31b3 100644 --- a/navit/maptool/ch.c +++ b/navit/maptool/ch.c @@ -263,7 +263,7 @@ ch_process_node(FILE *out, int node, int resolve) 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\n",node_index[oldnode].x,node_index[oldnode].y); + 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; @@ -290,7 +290,7 @@ ch_process_node(FILE *out, int node, int resolve) } else { ch_edge.middle=*id; #if 0 - dbg(lvl_debug,"middle street id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id)); + dbg(lvl_debug,"middle street id for is "ITEM_ID_FMT"",ITEM_ID_ARGS(*id)); #endif } } else { @@ -299,12 +299,12 @@ ch_process_node(FILE *out, int node, int resolve) dbg_assert(id != NULL); ch_edge.middle=*id; #if 0 - dbg(lvl_debug,"middle node id for is "ITEM_ID_FMT"\n",ITEM_ID_ARGS(*id)); + 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"\n",edge->target,ITEM_ID_ARGS(*id)); + 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); @@ -522,7 +522,7 @@ ch_assemble_map(char *map_suffix, char *suffix, struct zip_info *zip_info) struct item_id *id2=g_slice_new(struct item_id); *id2=id; #if 0 - dbg(lvl_debug,"%d is "ITEM_ID_FMT"\n",nodeid,ITEM_ID_ARGS(*id2)); + 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 4e17fd652..0c0ea6250 100644 --- a/navit/maptool/coastline.c +++ b/navit/maptool/coastline.c @@ -52,11 +52,11 @@ find_next(struct rect *bbox, GList *segments, struct coord *c, int exclude, stru for (i = 0 ; i < 2 ; i++) { curr=segments; - dbg(lvl_debug,"search distance %d\n",search); + dbg(lvl_debug,"search distance %d",search); while (curr) { struct geom_poly_segment *seg=curr->data; int dist=distance_from_ll(seg->first, bbox); - dbg(lvl_debug,"0x%x 0x%x dist %d\n",seg->first->x,seg->first->y,dist); + dbg(lvl_debug,"0x%x 0x%x dist %d",seg->first->x,seg->first->y,dist); if (dist != -1 && seg->first != seg->last && dist < min && (dist >= search)) { min=dist; ci[0]=*seg->first; @@ -255,7 +255,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da for (;;) { search++; // item_bin_write_debug_point_to_sink(out, &end, "Search %d",search); - dbg(lvl_debug,"searching next polygon from 0x%x 0x%x\n",end.x,end.y); + dbg(lvl_debug,"searching next polygon from 0x%x 0x%x",end.x,end.y); first=find_next(&bbox, sorted_segments, &end, exclude, cn); exclude=1; if (!first) @@ -265,7 +265,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da tile_start_valid=1; } else { if (cn[0].x == tile_start.x && cn[0].y == tile_start.y) { - dbg(lvl_debug,"end of tile reached\n"); + dbg(lvl_debug,"end of tile reached"); break; } } @@ -274,7 +274,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da continue; } poly_start_valid=0; - dbg(lvl_debug,"start of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y); + dbg(lvl_debug,"start of polygon 0x%x 0x%x",cn[0].x,cn[0].y); for (;;) { if (!poly_start_valid) { poly_start=cn[0]; @@ -283,7 +283,7 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da } else { close_polygon(ib, &end, &cn[0], 1, &bbox, &edges); if (cn[0].x == poly_start.x && cn[0].y == poly_start.y) { - dbg(lvl_debug,"poly end reached\n"); + dbg(lvl_debug,"poly end reached"); item_bin_add_attr_longlong(ib, attr_osm_wayid, ct->wayid); item_bin_write_to_sink(ib, out, NULL); end=cn[0]; @@ -296,11 +296,11 @@ tile_collector_process_tile(char *tile, int *tile_data, struct coastline_tile_da first->type=geom_poly_segment_type_none; end=cn[1]; if (distance_from_ll(&end, &bbox) == -1) { - dbg(lvl_debug,"incomplete\n"); + dbg(lvl_debug,"incomplete"); break; } first=find_next(&bbox, sorted_segments, &end, 1, cn); - dbg(lvl_debug,"next segment of polygon 0x%x 0x%x\n",cn[0].x,cn[0].y); + dbg(lvl_debug,"next segment of polygon 0x%x 0x%x",cn[0].x,cn[0].y); } if (search > 55) break; |
