diff options
-rw-r--r-- | navit/debug.c | 3 | ||||
-rw-r--r-- | navit/geom.c | 43 | ||||
-rw-r--r-- | navit/graphics.c | 36 | ||||
-rw-r--r-- | navit/map/garmin/garmin.c | 11 | ||||
-rw-r--r-- | navit/map/mg/block.c | 13 | ||||
-rw-r--r-- | navit/map/mg/street.c | 47 | ||||
-rw-r--r-- | navit/map/mg/town.c | 3 | ||||
-rw-r--r-- | navit/maptool/boundaries.c | 31 | ||||
-rw-r--r-- | navit/maptool/ch.c | 15 | ||||
-rw-r--r-- | navit/maptool/coastline.c | 125 | ||||
-rw-r--r-- | navit/maptool/itembin.c | 14 | ||||
-rw-r--r-- | navit/maptool/osm.c | 18 | ||||
-rw-r--r-- | navit/maptool/osm_protobuf.c | 73 | ||||
-rw-r--r-- | navit/maptool/osm_protobufdb.c | 81 | ||||
-rw-r--r-- | navit/maptool/tile.c | 12 | ||||
-rw-r--r-- | navit/navigation.c | 3 | ||||
-rw-r--r-- | navit/route.c | 49 | ||||
-rw-r--r-- | navit/speech/cmdline/speech_cmdline.c | 9 | ||||
-rw-r--r-- | navit/track.c | 4 | ||||
-rw-r--r-- | navit/vehicle/null/vehicle_null.c | 14 | ||||
-rw-r--r-- | navit/vehicle/webos/bluetooth.c | 75 |
21 files changed, 0 insertions, 679 deletions
diff --git a/navit/debug.c b/navit/debug.c index d8277f761..2d6e8fdc5 100644 --- a/navit/debug.c +++ b/navit/debug.c @@ -403,9 +403,6 @@ debug_dump_mallocs(void) fprintf(stderr,"unfreed malloc from %s of size %d\n",head->where,head->size); for (i = 0 ; i < 8 ; i++) fprintf(stderr,"\tlist *%p\n",head->return_address[i]); -#if 0 - fprintf(stderr,"%s\n",head+1); -#endif head=head->next; } } diff --git a/navit/geom.c b/navit/geom.c index 65ea4986b..0f40e2dac 100644 --- a/navit/geom.c +++ b/navit/geom.c @@ -93,19 +93,10 @@ geom_poly_area(struct coord *c, int count) { long long area=0; int i,j=0; -#if 0 - fprintf(stderr,"count=%d\n",count); -#endif for (i=0; i<count; i++) { if (++j == count) j=0; -#if 0 - fprintf(stderr,"(%d+%d)*(%d-%d)=%d*%d="LONGLONG_FMT"\n",c[i].x,c[j].x,c[i].y,c[j].y,c[i].x+c[j].x,c[i].y-c[j].y,(long long)(c[i].x+c[j].x)*(c[i].y-c[j].y)); -#endif area+=(long long)(c[i].x+c[j].x)*(c[i].y-c[j].y); -#if 0 - fprintf(stderr,"area="LONGLONG_FMT"\n",area); -#endif } return area/2; } @@ -205,12 +196,6 @@ geom_poly_point_inside(struct coord *cp, int count, struct coord *c) while (cp < last) { if ((cp[0].y > c->y) != (cp[1].y > c->y) && c->x < ((long long)cp[1].x-cp[0].x)*(c->y-cp[0].y)/(cp[1].y-cp[0].y)+cp[0].x) { -#if 0 - fprintf(stderr," cross 0x%x,0x%x-0x%x,0x%x %dx%d",cp,cp[0].x,cp[0].y,cp[1].x,cp[1].y,cp[1].x-cp[0].x,c->y-cp[0].y); - printf("type=selected_line\n"); - coord_print(projection_mg, &cp[0], stdout); - coord_print(projection_mg, &cp[1], stdout); -#endif ret=!ret; } cp++; @@ -236,15 +221,6 @@ geom_poly_segments_insert(GList *list, struct geom_poly_segment *first, struct g count+=(first->last-first->first); if (third) count+=(third->last-third->first); -#if 0 - fprintf(stderr,"count=%d first=%p second=%p third=%p\n",count,first,second,third); - if (first) - fprintf(stderr,"first:0x%x,0x%x-0x%x,0x%x (%d)\n",first->first->x,first->first->y,first->last->x,first->last->y, first->last-first->first+1); - if (second) - fprintf(stderr,"second:0x%x,0x%x-0x%x,0x%x (%d)\n",second->first->x,second->first->y,second->last->x,second->last->y, second->last-second->first+1); - if (third) - fprintf(stderr,"third:0x%x,0x%x-0x%x,0x%x (%d)\n",third->first->x,third->first->y,third->last->x,third->last->y, third->last-third->first+1); -#endif ret->first=g_new(struct coord, count); pos=ret->first; if (first) { @@ -262,13 +238,7 @@ geom_poly_segments_insert(GList *list, struct geom_poly_segment *first, struct g pos+=count; } ret->last=pos-1; -#if 0 - fprintf(stderr,"result:0x%x,0x%x-0x%x,0x%x (%d)\n",ret->first->x,ret->first->y,ret->last->x,ret->last->y, ret->last-ret->first+1); -#endif list=g_list_prepend(list, ret); -#if 0 - fprintf(stderr,"List=%p\n",list); -#endif return list; } @@ -361,30 +331,17 @@ int geom_poly_segments_point_inside(GList *in, struct coord *c) { int open_matches=0,closed_matches=0; -#if 0 - fprintf(stderr,"try 0x%x,0x%x:",c->x,c->y); -#endif while (in) { struct geom_poly_segment *seg=in->data; if (geom_poly_point_inside(seg->first, seg->last-seg->first+1, c)) { -#if 0 - fprintf(stderr," inside"); -#endif if (coord_is_equal(*seg->first,*seg->last)) closed_matches++; else open_matches++; } else { -#if 0 - fprintf(stderr," outside"); -#endif } in=g_list_next(in); } -#if 0 - fprintf(stderr,"\n"); - fprintf(stderr,"open_matches %d closed_matches %d\n",open_matches,closed_matches); -#endif if (closed_matches) { if (closed_matches & 1) return 1; diff --git a/navit/graphics.c b/navit/graphics.c index 69eabfc3e..4651e3f04 100644 --- a/navit/graphics.c +++ b/navit/graphics.c @@ -1574,10 +1574,6 @@ draw_shape(struct draw_polyline_context *ctx, struct point *pnt, int wi) struct draw_polyline_shape *shape=&ctx->shape; struct draw_polyline_shape *prev=&ctx->prev_shape; -#if 0 - dbg(lvl_debug,"enter %d,%d - %d,%d %d",pnt[0].x,pnt[0].y,pnt[1].x,pnt[1].y,wi); -#endif - *prev=*shape; if (prev->wi != wi && prev->l) { prev->wi=wi; @@ -1592,9 +1588,6 @@ draw_shape(struct draw_polyline_context *ctx, struct point *pnt, int wi) shape->step=8; else shape->step=16; -#if 0 - l = int_sqrt(dx * dx * lscale * lscale + dy * dy * lscale * lscale); -#else dxs=shape->dx*shape->dx; dys=shape->dy*shape->dy; lscales=lscale*lscale; @@ -1712,11 +1705,6 @@ graphics_draw_polyline_as_polygon(struct graphics_priv *gra_priv, struct graphic int max_circle_points=20; if (count < 2) return; -#if 0 - dbg(lvl_debug,"count=%d",count); - for (i = 0 ; i < count ; i++) - dbg(lvl_debug,"%d,%d width %d",pnt[i].x,pnt[i].y,width[i]); -#endif ctx.shape.l=0; ctx.shape.wi=0; ctx.res=g_alloca(sizeof(struct point)*maxpoints); @@ -1895,9 +1883,6 @@ graphics_draw_polyline_clipped(struct graphics *gra, struct graphics_gc *gc, str if (points_to_draw_cnt > 1) { if (poly) { graphics_draw_polyline_as_polygon(gra->priv, gc->priv, points_to_draw, points_to_draw_cnt, w, gra->meth.draw_polygon); -#if 0 - gra->meth.draw_lines(gra->priv, gc->priv, points_to_draw, points_to_draw_cnt); -#endif } else gra->meth.draw_lines(gra->priv, gc->priv, points_to_draw, points_to_draw_cnt); points_to_draw_cnt=0; @@ -1967,12 +1952,6 @@ graphics_draw_polygon_clipped(struct graphics *gra, struct graphics_gc *gc, stru struct point *pa2=g_alloca(sizeof(struct point) * (count_in < limit ? count_in*8+1:0)); int count_out,edge=3; int i; -#if 0 - r.lu.x+=20; - r.lu.y+=20; - r.rl.x-=20; - r.rl.y-=20; -#endif if (count_in < limit) { p1=pa1; p2=pa2; @@ -2136,18 +2115,6 @@ displayitem_draw(struct displayitem *di, void *dummy, struct display_context *dc count=limit_count(di->c, count); if (dc->type == type_poly_water_tiled) mindist=0; -#if 0 - if (dc->e->type == element_polygon) { - int max=1000; - int offset=5600; - c+=offset; - count-=offset; - if (count < 0) - count=0; - if (count > max) - count=max; - } -#endif if (dc->e->type == element_polyline) count=transform(dc->trans, dc->pro, di->c, pa, count, mindist, e->u.polyline.width, width); else @@ -2527,9 +2494,6 @@ do_draw(struct displaylist *displaylist, int cancel, int flags) count=item_coord_get_within_selection(item, ca, item->type < type_line ? 1: max, displaylist->sel); if (! count) continue; -#if 0 - dbg(lvl_debug,"%s 0x%x 0x%x",item_to_name(item->type), item->id_hi, item->id_lo); -#endif if (displaylist->dc.pro != pro) transform_from_to_count(ca, displaylist->dc.pro, ca, pro, count); if (count == max) { diff --git a/navit/map/garmin/garmin.c b/navit/map/garmin/garmin.c index 2e7263081..4ef32a28e 100644 --- a/navit/map/garmin/garmin.c +++ b/navit/map/garmin/garmin.c @@ -814,17 +814,6 @@ garmin_get_selection(struct map_rect_priv *map, struct map_selection *sel) } return -1; } -#if 0 - sl = (18-(gm->maxlevel - gm->minlevel))/2; - el = sl + (gm->maxlevel - gm->minlevel); - if (level < sl) - level = sl; - if (level > el) - level = el; - level = level - sl; - level = (gm->maxlevel - gm->minlevel) - level; - dlog(3, "sl=%d el=%d level=%d\n", sl, el, level); -#endif sl = (18-gm->zoomlevels)/2; el = sl + gm->zoomlevels; if (level < sl) diff --git a/navit/map/mg/block.c b/navit/map/mg/block.c index 7e7326908..747e49b15 100644 --- a/navit/map/mg/block.c +++ b/navit/map/mg/block.c @@ -219,12 +219,6 @@ block_next(struct map_rect_priv *mr) bt->order=0; dbg(lvl_debug,"size 0x%x next 0x%x", block_get_size(bt->b), block_get_next(bt->b)); if (! mr->b.bt.block_count) { -#if 0 - if (debug) { - printf("idx rect "); - block_rect_print(&mr->b.bt.b->r); - } -#endif block_get_r(bt->b, &bt->r); bt->r_curr=bt->r; coord=get_u32(&mr->b.bt.p); @@ -243,13 +237,6 @@ block_next(struct map_rect_priv *mr) r_w=bt->r_curr.rl.x-bt->r_curr.lu.x; r_h=bt->r_curr.lu.y-bt->r_curr.rl.y; -#if 0 - if (debug) { - printf(" rect1 "); - block_rect_print(&bt->r_curr); - printf(" %dx%d", r_w, r_h); - } -#endif mr->b.b=NULL; if (blk_num != -1) { block_mem+=8; diff --git a/navit/map/mg/street.c b/navit/map/mg/street.c index 49f790e9c..cffd599ae 100644 --- a/navit/map/mg/street.c +++ b/navit/map/mg/street.c @@ -61,10 +61,6 @@ street_name_debug(struct street_name *sn, FILE *out) static void street_name_get(struct street_name *name, unsigned char **p) { -#if 0 - static FILE *out; - static GHashTable *hash; -#endif unsigned char *start=*p; name->len=get_u16_unal(p); name->country=get_u16_unal(p); @@ -79,18 +75,6 @@ street_name_get(struct street_name *name, unsigned char **p) name->tmp_len=name->aux_len; name->tmp_data=name->aux_data; *p=start+name->len; -#if 0 - if (! out) { - out=fopen("hn.txt","a"); - } - if (! hash) { - hash=g_hash_table_new(NULL,NULL); - } - if (! g_hash_table_lookup(hash, *p)) { - g_hash_table_insert(hash, *p, (void *)1); - street_name_debug(name, out); - } -#endif } static int @@ -414,13 +398,6 @@ street_get(struct map_rect_priv *mr, struct street_priv *street, struct item *it struct coord c; street_coord_get(street, &c, 1); } -#if 0 - if (street->housenumber) { - if (street_get_housenumber(mr, street, item)) - return 1; - street->housenumber=0; - } -#endif if (mr->b.p == mr->b.p_start) { street_get_data(street, &mr->b.p); street->name_file=mr->m->file[file_strname_stn]; @@ -445,16 +422,8 @@ street_get(struct map_rect_priv *mr, struct street_priv *street, struct item *it return 0; if (street_str_get_segid(street->str) < 0) street->type++; -#if 0 - dbg_assert(street->p != NULL); -#endif street->next=NULL; street->status_rewind=street->status=street_str_get_segid(&street->str[1]) >= 0 ? 0:1; -#if 0 - if (street->type->country != 0x31) { - printf("country=0x%x\n", street->type->country); - } -#endif item->id_hi=street_type_get_country(street->type) | (mr->current_file << 16); item->id_lo=street_str_get_segid(street->str) > 0 ? street_str_get_segid(street->str) : -street_str_get_segid(street->str); switch(street_str_get_type(street->str) & 0x1f) { @@ -530,13 +499,6 @@ street_get(struct map_rect_priv *mr, struct street_priv *street, struct item *it street->flags|=(street_str_get_limit(street->str) & 0x30) ? AF_ONEWAY:0; street->flags|=(street_str_get_limit(street->str) & 0x03) ? AF_ONEWAYREV:0; } -#if 0 - coord_debug=(street->str->unknown2 != 0x40 || street->str->unknown3 != 0x40); - if (coord_debug) { - item->type=type_street_unkn; - printf("%d %02x %02x %02x %02x\n", street->str->segid, street->str->type, street->str->limit, street->str->unknown2, street->str->unknown3); - } -#endif street->p_rewind=street->p; street->name.len=0; street->attr_next=attr_label; @@ -580,12 +542,6 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi, street->str+=(res & 0xfff)-1; dbg(lvl_debug,"segid 0x%x", street_str_get_segid(&street->str[1])); return street_get(mr, street, item); -#if 0 - mr->b.p=mr->b.block_start+(res & 0xffff); - return town_get(mr, twn, item); -#endif - - return 0; } struct street_name_index { @@ -999,9 +955,6 @@ housenumber_search_setup(struct map_rect_priv *mr) mr->search_str=g_strdup(mr->search_attr->u.str); dbg(lvl_debug,"last %p",mr->b.p); street_name_get(&mr->street.name, &mr->b.p); -#if 0 - debug(mr); -#endif while (id > 0) { id--; dbg(lvl_debug,"loop"); diff --git a/navit/map/mg/town.c b/navit/map/mg/town.c index 1399bca33..ace353a1d 100644 --- a/navit/map/mg/town.c +++ b/navit/map/mg/town.c @@ -137,9 +137,6 @@ town_get_data(struct town_priv *twn, unsigned char **p) twn->unknown3=get_u8(p); twn->postal_code2=get_string(p); twn->unknown4=get_u32_unal(p); -#if 0 - printf("%s\t%s\t%s\t%d\t%d\t%d\n",twn->name,twn->district,twn->postal_code1,twn->order, twn->country, twn->type); -#endif } /*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 */ static unsigned char limit[]={0,1,2,2,4,6,8,10,11,13,14,14,14,20,20,20,20,20,20}; 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=×tamp; - 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=⪫ - 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) { diff --git a/navit/navigation.c b/navit/navigation.c index 8ddee5a9d..b8fb16e6d 100644 --- a/navit/navigation.c +++ b/navit/navigation.c @@ -1982,9 +1982,6 @@ maneuver_required2 (struct navigation *nav, struct navigation_itm *old, struct n dc = m.delta; dbg(lvl_debug,"enter %p %p %p",old, new, maneuver); -#if 0 - dbg(lvl_debug, "old=%s %s, new=%s %s, angle old=%d, angle new=%d, d=%i ", old->way.name, old->way.name_systematic, new->way.name, new->way.name_systematic, old->angle_end, new->way.angle2, d); -#endif if (!new->way.next || (new->way.next && (new->way.next->angle2 == new->way.angle2) && !new->way.next->next)) { /* No announcement necessary (with extra magic to eliminate duplicate ways) */ r="no: Only one possibility"; diff --git a/navit/route.c b/navit/route.c index a45d2f2f7..acccf3f7c 100644 --- a/navit/route.c +++ b/navit/route.c @@ -43,11 +43,6 @@ #include <stdlib.h> #include <string.h> #include <math.h> -#if 0 -#include <assert.h> -#include <unistd.h> -#include <sys/time.h> -#endif #include "navit_nls.h" #include "glib_slice.h" #include "config.h" @@ -2142,9 +2137,6 @@ route_value_seg(struct vehicleprofile *profile, struct route_graph_point *from, { int ret; struct route_traffic_distortion dist,*distp=NULL; -#if 0 - dbg(lvl_debug,"flags 0x%x mask 0x%x flags 0x%x", over->flags, dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask, profile->flags); -#endif if ((over->data.flags & (dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags) return INT_MAX; if (dir > 0 && (over->start->flags & RP_TURN_RESTRICTION)) @@ -2766,9 +2758,6 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout posinfo=pos; while (s && !dstinfo) { /* following start->seg, which indicates the least costly way to reach our destination */ segs++; -#if 0 - printf("start->value=%d 0x%x,0x%x\n", start->value, start->c.x, start->c.y); -#endif if (s->start == start) { if (item_is_equal(s->data.item, dst->street->item) && (s->end->seg == s || !posinfo)) dstinfo=dst; @@ -3297,34 +3286,6 @@ route_info_street(struct route_info *rinf) return rinf->street; } -#if 0 -struct route_crossings * -route_crossings_get(struct route *this, struct coord *c) -{ - struct route_point *pnt; - struct route_segment *seg; - int crossings=0; - struct route_crossings *ret; - - pnt=route_graph_get_point(this, c); - seg=pnt->start; - while (seg) { - printf("start: 0x%x 0x%x\n", seg->item.id_hi, seg->item.id_lo); - crossings++; - seg=seg->start_next; - } - seg=pnt->end; - while (seg) { - printf("end: 0x%x 0x%x\n", seg->item.id_hi, seg->item.id_lo); - crossings++; - seg=seg->end_next; - } - ret=g_malloc(sizeof(struct route_crossings)+crossings*sizeof(struct route_crossing)); - ret->count=crossings; - return ret; -} -#endif - /** * @brief Implementation-specific map rect data @@ -3708,16 +3669,6 @@ rm_rect_new(struct map_priv *priv, struct map_selection *sel) { struct map_rect_priv * mr; dbg(lvl_debug,"enter"); -#if 0 - if (! route_get_pos(priv->route)) - return NULL; - if (! route_get_dst(priv->route)) - return NULL; -#endif -#if 0 - if (! priv->route->path2) - return NULL; -#endif mr=g_new0(struct map_rect_priv, 1); mr->mpriv = priv; mr->item.priv_data = mr; diff --git a/navit/speech/cmdline/speech_cmdline.c b/navit/speech/cmdline/speech_cmdline.c index 256fb2adf..15ba15c1a 100644 --- a/navit/speech/cmdline/speech_cmdline.c +++ b/navit/speech/cmdline/speech_cmdline.c @@ -102,15 +102,6 @@ speech_cmdline_search(GList *samples, int suffix_len, const char *text, int deco } return result; } -#if 0 - - r=search(l, strlen(path)+1, suffix_len, argv[1]); - while (r) { - printf("%s/%s\n",path,r->data); - r=g_list_next(r); - } - return 0; -#endif struct speech_priv { char *cmdline; diff --git a/navit/track.c b/navit/track.c index 2f0d4e8d1..9217b192f 100644 --- a/navit/track.c +++ b/navit/track.c @@ -735,10 +735,6 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v } tr->time=time; tr->pro=pro; -#if 0 - - tracking_process_cdf(&tr->cdf, pc, &pcf, angle, &anglef, speed, fixtime); -#endif tr->curr_angle=tr->direction=direction; tr->speed=speed; tr->last_in=tr->curr_in; diff --git a/navit/vehicle/null/vehicle_null.c b/navit/vehicle/null/vehicle_null.c index 1005328f6..ea990a31e 100644 --- a/navit/vehicle/null/vehicle_null.c +++ b/navit/vehicle/null/vehicle_null.c @@ -85,11 +85,6 @@ vehicle_null_position_attr_get(struct vehicle_priv *priv, { dbg(lvl_debug,"enter %s",attr_to_name(type)); switch (type) { -#if 0 - case attr_position_fix_type: - attr->u.num = priv->fix_type; - break; -#endif case attr_position_height: attr->u.numd = &priv->height; break; @@ -102,15 +97,6 @@ vehicle_null_position_attr_get(struct vehicle_priv *priv, case attr_position_radius: attr->u.numd = &priv->radius; break; - -#if 0 - case attr_position_qual: - attr->u.num = priv->sats; - break; - case attr_position_sats_used: - attr->u.num = priv->sats_used; - break; -#endif case attr_position_coord_geo: attr->u.coord_geo = &priv->geo; if (!priv->have_coords) diff --git a/navit/vehicle/webos/bluetooth.c b/navit/vehicle/webos/bluetooth.c index 31e3a575e..906a42b07 100644 --- a/navit/vehicle/webos/bluetooth.c +++ b/navit/vehicle/webos/bluetooth.c @@ -252,14 +252,6 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) g_free(priv->nmea_data); priv->nmea_data=priv->nmea_data_buf; priv->nmea_data_buf=NULL; -#if 0 - if (priv->file_type == file_type_file) { - if (priv->watch) { - vehicle_file_disable_watch(priv); - event_add_timeout(priv->time, 0, priv->cbt); - } - } -#endif ret = 1; } if (!strncmp(&buffer[3], "VTG", 3)) { @@ -302,13 +294,6 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) strptime(time,"%H%M%S%d%m%y",&tm); priv->fix_time = mktime(&tm); -#if 0 - sscanf(item[9], "%02d%02d%02d", - &priv->fixday, - &priv->fixmonth, - &priv->fixyear); - priv->fixyear += 2000; -#endif } ret = 1; } @@ -329,46 +314,7 @@ vehicle_webos_parse_nmea(struct vehicle_priv *priv, char *buffer) if (item[3]) { sscanf(item[3], "%d", &priv->sats_visible); } -#if 0 - j=4; - while (j+4 <= i && priv->current_count < 24) { - struct gps_sat *sat=&priv->next[priv->next_count++]; - sat->prn=atoi(item[j]); - sat->elevation=atoi(item[j+1]); - sat->azimuth=atoi(item[j+2]); - sat->snr=atoi(item[j+3]); - j+=4; - } - if (!strcmp(item[1], item[2])) { - priv->sats_signal=0; - for (i = 0 ; i < priv->next_count ; i++) { - priv->current[i]=priv->next[i]; - if (priv->current[i].snr) - priv->sats_signal++; - } - priv->current_count=priv->next_count; - priv->next_count=0; - } -#endif - } -#if 0 - if (!strncmp(&buffer[3], "ZDA", 3)) { - /* - 0 1 2 3 4 5 6 - $GPZDA,hhmmss.ss,dd,mm,yyyy,xx,yy*CC - hhmmss HrMinSec(UTC) - dd,mm,yyy Day,Month,Year - xx local zone hours -13..13 - yy local zone minutes 0..59 - */ - if (item[1] && item[2] && item[3] && item[4]) { - strncpy(priv->fixtime, item[1], strlen(priv->fixtime)); - priv->fixday = atoi(item[2]); - priv->fixmonth = atoi(item[3]); - priv->fixyear = atoi(item[4]); - } } -#endif if (!strncmp(buffer, "$IISMD", 6)) { /* 0 1 2 3 4 @@ -464,13 +410,6 @@ vehicle_webos_spp_init_read(struct vehicle_priv *priv, unsigned int length) priv, PDL_FALSE ); -#if 0 - if (err != PDL_NOERROR) { - dbg(lvl_error,"PDL_ServiceCall failed with (%d): (%s)", err, PDL_GetError()); - vehicle_webos_close(priv); - return; - } -#endif } static void @@ -569,23 +508,9 @@ vehicle_webos_init_bt_gps(struct vehicle_priv *priv, char *addr) (PDL_ServiceCallbackFunc)vehicle_webos_spp_notify, priv, PDL_FALSE); -#if 0 - if (err != PDL_NOERROR) { - dbg(lvl_error,"PDL_ServiceCallWithCallback failed with (%d): (%s)", err, PDL_GetError()); - vehicle_webos_close(priv); - return; - } -#endif snprintf(parameters, sizeof(parameters), "{\"address\":\"%s\"}", addr); mlPDL_ServiceCall("palm://com.palm.bluetooth/spp/connect", parameters); -#if 0 - if (err != PDL_NOERROR) { - dbg(lvl_error,"PDL_ServiceCall failed with (%d): (%s)", err, PDL_GetError()); - vehicle_webos_close(priv); - return; - } -#endif priv->spp_address = addr; } |