diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:36:24 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:36:24 +0000 |
commit | cb575bf823793db3620c77a3c7bf12a7d3856ed3 (patch) | |
tree | 0118c6ec64520748c7daefd46e57c226343621d2 /navit/map | |
parent | 72471adee798a3a1d8414f0d4f77be816fb4dad6 (diff) | |
download | navit-cb575bf823793db3620c77a3c7bf12a7d3856ed3.tar.gz |
Fix:core:Change all logging at lvl_error/warning to lvl_debug, unless it looks like an error message.|#1269, part 5
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5967 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/map')
-rw-r--r-- | navit/map/binfile/binfile.c | 148 | ||||
-rw-r--r-- | navit/map/csv/csv.c | 26 | ||||
-rw-r--r-- | navit/map/csv/quadtree.c | 20 | ||||
-rw-r--r-- | navit/map/filter/filter.c | 10 | ||||
-rw-r--r-- | navit/map/mg/block.c | 14 | ||||
-rw-r--r-- | navit/map/mg/map.c | 18 | ||||
-rw-r--r-- | navit/map/mg/poly.c | 4 | ||||
-rw-r--r-- | navit/map/mg/street.c | 74 | ||||
-rw-r--r-- | navit/map/mg/town.c | 18 | ||||
-rw-r--r-- | navit/map/mg/tree.c | 52 | ||||
-rw-r--r-- | navit/map/shapefile/shapefile.c | 20 | ||||
-rw-r--r-- | navit/map/textfile/textfile.c | 44 |
12 files changed, 224 insertions, 224 deletions
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c index 1abc14c23..d0abd24f4 100644 --- a/navit/map/binfile/binfile.c +++ b/navit/map/binfile/binfile.c @@ -241,7 +241,7 @@ binfile_read_eoc(struct file *fi) eoc=(struct zip_eoc *)file_data_read(fi,fi->size-sizeof(struct zip_eoc), sizeof(struct zip_eoc)); if (eoc) { eoc_to_cpu(eoc); - dbg(lvl_warning,"sig 0x%x\n", eoc->zipesig); + dbg(lvl_debug,"sig 0x%x\n", eoc->zipesig); if (eoc->zipesig != zip_eoc_sig) { dbg(lvl_error,"eoc signature check failed: 0x%x vs 0x%x\n",eoc->zipesig,zip_eoc_sig); file_data_free(fi,(unsigned char *)eoc); @@ -259,7 +259,7 @@ binfile_read_eoc64(struct file *fi) eocl=(struct zip64_eocl *)file_data_read(fi,fi->size-sizeof(struct zip_eoc)-sizeof(struct zip64_eocl), sizeof(struct zip64_eocl)); if (!eocl) return NULL; - dbg(lvl_warning,"sig 0x%x\n", eocl->zip64lsig); + dbg(lvl_debug,"sig 0x%x\n", eocl->zip64lsig); if (eocl->zip64lsig != zip64_eocl_sig) { file_data_free(fi,(unsigned char *)eocl); dbg(lvl_warning,"eocl wrong\n"); @@ -272,7 +272,7 @@ binfile_read_eoc64(struct file *fi) dbg(lvl_warning,"eoc wrong\n"); eoc=NULL; } - dbg(lvl_warning,"eoc64 ok 0x"LONGLONG_HEX_FMT " 0x"LONGLONG_HEX_FMT "\n",eoc->zip64eofst,eoc->zip64ecsz); + dbg(lvl_debug,"eoc64 ok 0x"LONGLONG_HEX_FMT " 0x"LONGLONG_HEX_FMT "\n",eoc->zip64eofst,eoc->zip64ecsz); } file_data_free(fi,(unsigned char *)eocl); return eoc; @@ -297,9 +297,9 @@ binfile_read_cd(struct map_priv *m, int offset, int len) } cd=(struct zip_cd *)file_data_read(m->fi,cdoffset+offset, sizeof(*cd)+len); if (cd) { - dbg(lvl_warning,"cd at "LONGLONG_FMT" %zu bytes\n",cdoffset+offset, sizeof(*cd)+len); + dbg(lvl_debug,"cd at "LONGLONG_FMT" %zu bytes\n",cdoffset+offset, sizeof(*cd)+len); cd_to_cpu(cd); - dbg(lvl_warning,"sig 0x%x\n", cd->zipcensig); + dbg(lvl_debug,"sig 0x%x\n", cd->zipcensig); if (cd->zipcensig != zip_cd_sig) { file_data_free(m->fi,(unsigned char *)cd); cd=NULL; @@ -408,7 +408,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s long long cdoffset=m->eoc64?m->eoc64->zip64eofst:m->eoc->zipeofst; struct zip_cd *cd; #if 0 - dbg(lvl_error,"end=%d\n",end); + dbg(lvl_debug,"end=%d\n",end); #endif while (offset < end) { cd=(struct zip_cd *)(m->search_data+offset-m->search_offset); @@ -418,7 +418,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s offset-m->search_offset+sizeof(*cd)+cd->zipcfnl+cd->zipcxtl > m->search_size ) { #if 0 - dbg(lvl_error,"reload %p %d %d\n", m->search_data, m->search_offset, offset); + dbg(lvl_debug,"reload %p %d %d\n", m->search_data, m->search_offset, offset); #endif if (m->search_data) file_data_free(m->fi,m->search_data); @@ -430,8 +430,8 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s cd=(struct zip_cd *)m->search_data; } #if 0 - dbg(lvl_error,"offset=%d search_offset=%d search_size=%d search_data=%p cd=%p\n", offset, m->search_offset, m->search_size, m->search_data, cd); - dbg(lvl_error,"offset=%d fn='%s'\n",offset,cd->zipcfn); + dbg(lvl_debug,"offset=%d search_offset=%d search_size=%d search_data=%p cd=%p\n", offset, m->search_offset, m->search_size, m->search_data, cd); + dbg(lvl_debug,"offset=%d fn='%s'\n",offset,cd->zipcfn); #endif if (!skip && (partial || cd->zipcfnl == len) && @@ -447,7 +447,7 @@ binfile_search_cd(struct map_priv *m, int offset, char *name, int partial, int s static void map_destroy_binfile(struct map_priv *m) { - dbg(lvl_warning,"map_destroy_binfile\n"); + dbg(lvl_debug,"map_destroy_binfile\n"); if (m->fi) map_binfile_close(m); map_binfile_destroy(m); @@ -542,7 +542,7 @@ binfile_extract(struct map_priv *m, char *dir, char *filename, int partial) if (full[len-2] != '/') { lfh=binfile_read_lfh(m->fi, binfile_cd_offset(cd)); start=binfile_read_content(m, m->fi, binfile_cd_offset(cd), lfh); - dbg(lvl_error,"fopen '%s'\n", full); + dbg(lvl_debug,"fopen '%s'\n", full); f=fopen(full,"w"); fwrite(start, lfh->zipuncmp, 1, f); fclose(f); @@ -588,7 +588,7 @@ binfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) mr->label_attr[4]=t->pos_attr; if (type == attr_type || attr_type == attr_any) { if (attr_type == attr_any) { - dbg(lvl_warning,"pos %p attr %s size %d\n", t->pos_attr-1, attr_to_name(type), size); + dbg(lvl_debug,"pos %p attr %s size %d\n", t->pos_attr-1, attr_to_name(type), size); } attr->type=type; if (ATTR_IS_GROUP(type)) { @@ -666,13 +666,13 @@ binfile_item_dup(struct map_priv *m, struct item *item, struct tile *t, int exte entry->id.id_hi=item->id_hi; entry->id.id_lo=item->id_lo; entry->flags=1; - dbg(lvl_error,"id 0x%x,0x%x\n",entry->id.id_hi,entry->id.id_lo); + dbg(lvl_debug,"id 0x%x,0x%x\n",entry->id.id_hi,entry->id.id_lo); memcpy(ret, t->pos, (size+1)*sizeof(int)); if (!m->changes) m->changes=g_hash_table_new_full(binfile_hash_entry_hash, binfile_hash_entry_equal, g_free, NULL); g_hash_table_replace(m->changes, entry, entry); - dbg(lvl_error,"ret %p\n",ret); + dbg(lvl_debug,"ret %p\n",ret); return ret; } @@ -687,15 +687,15 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode { int *i=t->pos,j=0; - dbg(lvl_error,"Before: pos_coord=%td\n",t->pos_coord-i); + dbg(lvl_debug,"Before: pos_coord=%td\n",t->pos_coord-i); while (i < t->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } aoffset=t->pos_attr-t->pos_attr_start; coffset=t->pos_coord-t->pos_coord_start-2; clen=t->pos_attr_start-t->pos_coord+2; - dbg(lvl_error,"coffset=%d clen=%d\n",coffset,clen); + dbg(lvl_debug,"coffset=%d clen=%d\n",coffset,clen); switch (mode) { case change_mode_delete: if (count*2 > clen) @@ -732,7 +732,7 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode default: return 0; } - dbg(lvl_error,"delta %d\n",delta); + dbg(lvl_debug,"delta %d\n",delta); data=binfile_item_dup(mr->m, &mr->item, t, delta > 0 ? delta:0); data[0]=cpu_to_le32(le32_to_cpu(data[0])+delta); data[2]=cpu_to_le32(le32_to_cpu(data[2])+delta); @@ -744,18 +744,18 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode tn=mr->t; tn->pos_coord=tn->pos_coord_start+coffset; tn->pos_attr=tn->pos_attr_start+aoffset; - dbg(lvl_error,"moving %d ints from offset %td to %td\n",move_len,tn->pos_coord_start+move_offset-data,tn->pos_coord_start+move_offset+delta-data); + dbg(lvl_debug,"moving %d ints from offset %td to %td\n",move_len,tn->pos_coord_start+move_offset-data,tn->pos_coord_start+move_offset+delta-data); memmove(tn->pos_coord_start+move_offset+delta, tn->pos_coord_start+move_offset, move_len*4); { int *i=tn->pos,j=0; - dbg(lvl_error,"After move: pos_coord=%td\n",tn->pos_coord-i); + dbg(lvl_debug,"After move: pos_coord=%td\n",tn->pos_coord-i); while (i < tn->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } if (mode != change_mode_append) tn->pos_coord+=move_offset; if (mode != change_mode_delete) { - dbg(lvl_error,"writing %d ints at offset %td\n",count*2,write_offset+tn->pos_coord_start-data); + dbg(lvl_debug,"writing %d ints at offset %td\n",count*2,write_offset+tn->pos_coord_start-data); for (i = 0 ; i < count ; i++) { tn->pos_coord_start[write_offset++]=c[i].x; tn->pos_coord_start[write_offset++]=c[i].y; @@ -764,9 +764,9 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode } { int *i=tn->pos,j=0; - dbg(lvl_error,"After: pos_coord=%td\n",tn->pos_coord-i); + dbg(lvl_debug,"After: pos_coord=%td\n",tn->pos_coord-i); while (i < tn->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } return 1; } @@ -783,9 +783,9 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) { int *i=t->pos,j=0; - dbg(lvl_error,"Before: pos_attr=%td\n",t->pos_attr-i); + dbg(lvl_debug,"Before: pos_attr=%td\n",t->pos_attr-i); while (i < t->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } @@ -804,7 +804,7 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) } while (offset < naoffset) { oattr_len=le32_to_cpu(t->pos_attr_start[offset])+1; - dbg(lvl_error,"len %d\n",oattr_len); + dbg(lvl_debug,"len %d\n",oattr_len); write_offset=offset; offset+=oattr_len; } @@ -837,7 +837,7 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) delta=nattr_len-oattr_len; else delta=nattr_len; - dbg(lvl_error,"delta %d oattr_len %d nattr_len %d\n",delta,oattr_len, nattr_len); + dbg(lvl_debug,"delta %d oattr_len %d nattr_len %d\n",delta,oattr_len, nattr_len); data=binfile_item_dup(mr->m, &mr->item, t, delta > 0 ? delta:0); data[0]=cpu_to_le32(le32_to_cpu(data[0])+delta); new.pos=new.start=data; @@ -848,20 +848,20 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) tn=mr->t; tn->pos_coord=tn->pos_coord_start+coffset; tn->pos_attr=tn->pos_attr_start+offset; - dbg(lvl_error,"attr start %td offset %d\n",tn->pos_attr_start-data,offset); - dbg(lvl_error,"moving %d ints from offset %td to %td\n",move_len,tn->pos_attr_start+move_offset-data,tn->pos_attr_start+move_offset+delta-data); + dbg(lvl_debug,"attr start %td offset %d\n",tn->pos_attr_start-data,offset); + dbg(lvl_debug,"moving %d ints from offset %td to %td\n",move_len,tn->pos_attr_start+move_offset-data,tn->pos_attr_start+move_offset+delta-data); memmove(tn->pos_attr_start+move_offset+delta, tn->pos_attr_start+move_offset, move_len*4); if (mode != change_mode_append) tn->pos_attr+=delta; { int *i=tn->pos,j=0; - dbg(lvl_error,"After move: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After move: pos_attr=%td\n",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } if (nattr_len) { int *nattr=tn->pos_attr_start+write_offset; - dbg(lvl_error,"writing %d ints at %td\n",nattr_len,nattr-data); + dbg(lvl_debug,"writing %d ints at %td\n",nattr_len,nattr-data); nattr[0]=cpu_to_le32(nattr_len-1); nattr[1]=cpu_to_le32(attr->type); memcpy(nattr+2, attr_data_get(attr), nattr_size); @@ -869,11 +869,11 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) } { int *i=tn->pos,j=0; - dbg(lvl_error,"After: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_error,"After: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_error,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x\n",j++,*i++); } return 1; } @@ -910,7 +910,7 @@ pop_tile(struct map_rect_priv *mr) file_data_free(mr->m->fi, (unsigned char *)(mr->t->start)); #ifdef DEBUG_SIZE #if DEBUG_SIZE > 0 - dbg(lvl_error,"leave %d\n",mr->t->zipfile_num); + dbg(lvl_debug,"leave %d\n",mr->t->zipfile_num); #endif #endif mr->t=&mr->tiles[--mr->tile_depth-1]; @@ -925,8 +925,8 @@ zipfile_to_tile(struct map_priv *m, struct zip_cd *cd, struct tile *t) struct zip_lfh *lfh; char *zipfn; struct file *fi; - dbg(lvl_warning,"enter %p %p %p\n", m, cd, t); - dbg(lvl_warning,"cd->zipofst=0x"LONGLONG_HEX_FMT "\n", binfile_cd_offset(cd)); + dbg(lvl_debug,"enter %p %p %p\n", m, cd, t); + dbg(lvl_debug,"cd->zipofst=0x"LONGLONG_HEX_FMT "\n", binfile_cd_offset(cd)); t->start=NULL; t->mode=1; if (m->fis) @@ -957,7 +957,7 @@ map_binfile_handle_redirect(struct map_priv *m) if (m->redirect) return 0; m->redirect=1; - dbg(lvl_error,"redirected from %s to %s\n",m->url,location); + dbg(lvl_debug,"redirected from %s to %s\n",m->url,location); g_free(m->url); m->url=g_strdup(location); file_destroy(m->http); @@ -1006,7 +1006,7 @@ map_binfile_download_size(struct map_priv *m) } while (map_binfile_handle_redirect(m)); ret=file_size(m->http); - dbg(lvl_warning,"file size "LONGLONG_FMT"\n",ret); + dbg(lvl_debug,"file size "LONGLONG_FMT"\n",ret); return ret; } @@ -1052,7 +1052,7 @@ map_binfile_download_range(struct map_priv *m, long long offset, int size) ret=file_data_read_special(http, size, &size_ret); if (size_ret != size) { - dbg(lvl_error,"size %d vs %d\n",size,size_ret); + dbg(lvl_debug,"size %d vs %d\n",size,size_ret); g_free(ret); return NULL; } @@ -1066,7 +1066,7 @@ download_cd(struct map_download *download) struct zip64_eoc *zip64_eoc=(struct zip64_eoc *)file_data_read(m->fi, 0, sizeof(*zip64_eoc)); struct zip_cd *cd=(struct zip_cd *)map_binfile_download_range(m, zip64_eoc->zip64eofst+download->zipfile*m->cde_size,m->cde_size); file_data_free(m->fi, (unsigned char *)zip64_eoc); - dbg(lvl_error,"needed cd, result %p\n",cd); + dbg(lvl_debug,"needed cd, result %p\n",cd); return cd; } @@ -1099,7 +1099,7 @@ download_request(struct map_download *download) attrs[3]=NULL; download->dl_size=size; } - dbg(lvl_error,"encountered missing tile %d %s(%s), Downloading %d bytes at "LONGLONG_FMT"\n",download->zipfile, url.u.str,(char *)(download->cd_copy+1), download->dl_size, download->offset); + dbg(lvl_debug,"encountered missing tile %d %s(%s), Downloading %d bytes at "LONGLONG_FMT"\n",download->zipfile, url.u.str,(char *)(download->cd_copy+1), download->dl_size, download->offset); map_binfile_http_request(download->m, attrs); g_free(url.u.str); download->http=download->m->http; @@ -1147,7 +1147,7 @@ download_download(struct map_download *download) return 0; } - dbg(lvl_warning,"got %d bytes writing at offset "LONGLONG_FMT"\n",size_ret,download->offset); + dbg(lvl_debug,"got %d bytes writing at offset "LONGLONG_FMT"\n",size_ret,download->offset); if (size_ret <= 0) { g_free(data); return 1; @@ -1189,7 +1189,7 @@ download_finish(struct map_download *download) g_free(download->cd_copy); download->cd=(struct zip_cd *)(file_data_read(download->file, download->m->eoc->zipeofst + download->zipfile*download->m->cde_size, download->m->cde_size)); cd_to_cpu(download->cd); - dbg(lvl_warning,"Offset %d\n",download->cd->zipofst); + dbg(lvl_debug,"Offset %d\n",download->cd->zipofst); return 1; } @@ -1197,7 +1197,7 @@ static int download_planet_size(struct map_download *download) { download->size=map_binfile_download_size(download->m); - dbg(lvl_error,"Planet size "LONGLONG_FMT"\n",download->size); + dbg(lvl_debug,"Planet size "LONGLONG_FMT"\n",download->size); if (!download->size) return 0; return 1; @@ -1240,7 +1240,7 @@ download_directory_do(struct map_download *download) struct zip_cd *cd; cd=(struct zip_cd *)file_data_read_special(download->http, sizeof(*cd), &size_ret); cd->zipcunc=0; - dbg(lvl_warning,"size_ret=%d\n",size_ret); + dbg(lvl_debug,"size_ret=%d\n",size_ret); if (!size_ret) return 0; if (size_ret != sizeof(*cd) || cd->zipcensig != zip_cd_sig) { @@ -1297,14 +1297,14 @@ push_zipfile_tile_do(struct map_rect_priv *mr, struct zip_cd *cd, int zipfile, i struct map_priv *m=mr->m; struct file *f=m->fi; - dbg(lvl_warning,"enter %p %d\n", mr, zipfile); + dbg(lvl_debug,"enter %p %d\n", mr, zipfile); #ifdef DEBUG_SIZE #if DEBUG_SIZE > 0 { char filename[cd->zipcfnl+1]; memcpy(filename, cd+1, cd->zipcfnl); filename[cd->zipcfnl]='\0'; - dbg(lvl_error,"enter %d (%s) %d\n",zipfile, filename, cd->zipcunc); + dbg(lvl_debug,"enter %d (%s) %d\n",zipfile, filename, cd->zipcunc); } #endif mr->size+=cd->zipcunc; @@ -1360,7 +1360,7 @@ download(struct map_priv *m, struct map_rect_priv *mr, struct zip_cd *cd, int zi return NULL; } for (;;) { - dbg(lvl_error,"state=%d\n",download->state); + dbg(lvl_debug,"state=%d\n",download->state); switch (download->state) { case 0: dbg(lvl_error,"error\n"); @@ -1462,7 +1462,7 @@ push_zipfile_tile(struct map_rect_priv *mr, int zipfile, int offset, int length, struct file *f=m->fi; long long cdoffset=m->eoc64?m->eoc64->zip64eofst:m->eoc->zipeofst; struct zip_cd *cd=(struct zip_cd *)(file_data_read(f, cdoffset + zipfile*m->cde_size, m->cde_size)); - dbg(lvl_warning,"read from "LONGLONG_FMT" %d bytes\n",cdoffset + zipfile*m->cde_size, m->cde_size); + dbg(lvl_debug,"read from "LONGLONG_FMT" %d bytes\n",cdoffset + zipfile*m->cde_size, m->cde_size); cd_to_cpu(cd); if (!cd->zipcunc && m->url) { cd=download(m, mr, cd, zipfile, offset, length, async); @@ -1479,7 +1479,7 @@ map_rect_new_binfile_int(struct map_priv *map, struct map_selection *sel) struct map_rect_priv *mr; binfile_check_version(map); - dbg(lvl_warning,"map_rect_new_binfile\n"); + dbg(lvl_debug,"map_rect_new_binfile\n"); if (!map->fi && !map->url) return NULL; map_binfile_http_close(map); @@ -1567,7 +1567,7 @@ map_rect_new_binfile(struct map_priv *map, struct map_selection *sel) { struct map_rect_priv *mr=map_rect_new_binfile_int(map, sel); struct tile t; - dbg(lvl_warning,"zip_members=%d\n", map->zip_members); + dbg(lvl_debug,"zip_members=%d\n", map->zip_members); if (map->url && map->fi && sel && sel->order == 255) { map_download_selection(map, mr, sel); } @@ -1599,7 +1599,7 @@ write_changes_do(gpointer key, gpointer value, gpointer user_data) if (entry->flags) { entry->flags=0; fwrite(entry, sizeof(*entry)+(le32_to_cpu(entry->data[0])+1)*4, 1, out); - dbg(lvl_error,"yes\n"); + dbg(lvl_debug,"yes\n"); } } @@ -1652,7 +1652,7 @@ map_rect_destroy_binfile(struct map_rect_priv *mr) write_changes(mr->m); while (pop_tile(mr)); #ifdef DEBUG_SIZE - dbg(lvl_error,"size=%d kb\n",mr->size/1024); + dbg(lvl_debug,"size=%d kb\n",mr->size/1024); #endif if (mr->tiles[0].fi && mr->tiles[0].start) file_data_free(mr->tiles[0].fi, (unsigned char *)(mr->tiles[0].start)); @@ -1668,11 +1668,11 @@ setup_pos(struct map_rect_priv *mr) struct tile *t=mr->t; size=le32_to_cpu(t->pos[0]); if (size > 1024*1024 || size < 0) { - dbg(lvl_error,"size=0x%x\n", size); + dbg(lvl_debug,"size=0x%x\n", size); #if 0 fprintf(stderr,"offset=%d\n", (unsigned char *)(mr->pos)-mr->m->f->begin); #endif - dbg(lvl_error,"size error\n"); + dbg(lvl_debug,"size error\n"); } t->pos_next=t->pos+size+1; mr->item.type=le32_to_cpu(t->pos[1]); @@ -1690,7 +1690,7 @@ selection_contains(struct map_selection *sel, struct coord_rect *r, struct range while (sel) { if (coord_rect_overlap(r, &sel->u.c_rect)) { order=sel->order; - dbg(lvl_warning,"min %d max %d order %d\n", mima->min, mima->max, order); + dbg(lvl_debug,"min %d max %d order %d\n", mima->min, mima->max, order); if (!mima->min && !mima->max) return 1; if (order >= mima->min && order <= mima->max) @@ -1722,13 +1722,13 @@ map_parse_country_binfile(struct map_rect_priv *mr) struct attr af, al; if(binfile_attr_get(mr->item.priv_data, attr_first_key, &af)) { if(linguistics_compare(af.u.str,search->u.str,linguistics_cmp_partial)>0) { - dbg(lvl_warning,"Skipping index item with first_key='%s'\n", af.u.str); + dbg(lvl_debug,"Skipping index item with first_key='%s'\n", af.u.str); return; } } if(binfile_attr_get(mr->item.priv_data, attr_last_key, &al)) { if(linguistics_compare(al.u.str,search->u.str,linguistics_cmp_partial)<0) { - dbg(lvl_warning,"Skipping index item with first_key='%s', last_key='%s'\n", af.u.str, al.u.str); + dbg(lvl_debug,"Skipping index item with first_key='%s', last_key='%s'\n", af.u.str, al.u.str); return; } } @@ -1763,7 +1763,7 @@ map_parse_submap(struct map_rect_priv *mr, int async) return 0; if (!binfile_attr_get(mr->item.priv_data, attr_zipfile_ref, &at)) return 0; - dbg(lvl_warning,"pushing zipfile %ld from %d\n", at.u.num, mr->t->zipfile_num); + dbg(lvl_debug,"pushing zipfile %ld from %d\n", at.u.num, mr->t->zipfile_num); return push_zipfile_tile(mr, at.u.num, 0, 0, async); } @@ -2108,7 +2108,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, map_rect_destroy_binfile(map_rec); break; case attr_house_number: - dbg(lvl_warning,"case house_number"); + dbg(lvl_debug,"case house_number"); if (! item->map) break; if (!map_priv_is(item->map, map)) @@ -2131,12 +2131,12 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, msp->mr = binmap_search_street_by_place(map, town, &c, &msp->ms, &msp->boundaries); map_rect_destroy_binfile(map_rec); if (msp->boundaries) - dbg(lvl_error, "using map town boundaries\n"); + dbg(lvl_debug, "using map town boundaries\n"); if (!msp->boundaries && town) { binmap_get_estimated_boundaries(town, &msp->boundaries); if (msp->boundaries) - dbg(lvl_error, "using estimated boundaries\n"); + dbg(lvl_debug, "using estimated boundaries\n"); } /* start searching in area around the street segment even if town boundaries are available */ msp->mr=binmap_search_housenumber_by_estimate(map, &c, &msp->ms); @@ -2144,7 +2144,7 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, msp->rect_new=msp->ms.u.c_rect; if(item_attr_get(msp->item, attr_street_name, &attr)) msp->parent_name=g_strdup(attr.u.str); - dbg(lvl_error,"pn=%s\n",msp->parent_name); + dbg(lvl_debug,"pn=%s\n",msp->parent_name); } } if (idx != 3) { @@ -2432,7 +2432,7 @@ binmap_search_get_item(struct map_search_priv *map_search) map_search->ms.u.c_rect=map_search->rect_new; map_rect_destroy_binfile(map_search->mr); map_search->mr=map_rect_new_binfile(map_search->map, &map_search->ms); - dbg(lvl_error,"Extended house number search region to %d x %d, restarting...\n",map_search->ms.u.c_rect.rl.x - map_search->ms.u.c_rect.lu.x, map_search->ms.u.c_rect.lu.y-map_search->ms.u.c_rect.rl.y); + dbg(lvl_debug,"Extended house number search region to %d x %d, restarting...\n",map_search->ms.u.c_rect.rl.x - map_search->ms.u.c_rect.lu.x, map_search->ms.u.c_rect.lu.y-map_search->ms.u.c_rect.rl.y); continue; } } @@ -2580,7 +2580,7 @@ map_binfile_zip_setup(struct map_priv *m, char *filename, int mmap) m->fis[m->eoc->zipedsk-1]=m->fi; g_free(tmpfilename); } - dbg(lvl_warning,"num_disk %d\n",m->eoc->zipedsk); + dbg(lvl_debug,"num_disk %d\n",m->eoc->zipedsk); m->eoc64=binfile_read_eoc64(m->fi); if (!binfile_get_index(m)) { dbg(lvl_error,"no index found\n"); @@ -2592,8 +2592,8 @@ map_binfile_zip_setup(struct map_priv *m, char *filename, int mmap) } m->cde_size=sizeof(struct zip_cd)+first_cd->zipcfnl+first_cd->zipcxtl; m->zip_members=m->index_offset/m->cde_size+1; - dbg(lvl_warning,"cde_size %d\n", m->cde_size); - dbg(lvl_warning,"members %d\n",m->zip_members); + dbg(lvl_debug,"cde_size %d\n", m->cde_size); + dbg(lvl_debug,"members %d\n",m->zip_members); file_data_free(m->fi, (unsigned char *)first_cd); if (mmap) file_mmap(m->fi); @@ -2692,7 +2692,7 @@ map_binfile_open(struct map_priv *m) struct attr readwrite={attr_readwrite, {(void *)1}}; struct attr *attrs[]={&readwrite, NULL}; - dbg(lvl_warning,"file_create %s\n", m->filename); + dbg(lvl_debug,"file_create %s\n", m->filename); m->fi=file_create(m->filename, m->url?attrs:NULL); if (! m->fi && m->url) return 0; @@ -2735,7 +2735,7 @@ map_binfile_open(struct map_priv *m) if (binfile_attr_get(item->priv_data, attr_map_release, &attr)) m->map_release=g_strdup(attr.u.str); if (m->url && binfile_attr_get(item->priv_data, attr_url, &attr)) { - dbg(lvl_error,"url config %s map %s\n",m->url,attr.u.str); + dbg(lvl_debug,"url config %s map %s\n",m->url,attr.u.str); if (strcmp(m->url, attr.u.str)) m->update_available=1; g_free(m->url); @@ -2807,7 +2807,7 @@ map_new_binfile(struct map_methods *meth, struct attr **attrs, struct callback_l wexp=file_wordexp_new(data->u.str); wexp_data=file_wordexp_get_array(wexp); - dbg(lvl_warning,"map_new_binfile %s\n", data->u.str); + dbg(lvl_debug,"map_new_binfile %s\n", data->u.str); *meth=map_methods_binfile; m=g_new0(struct map_priv, 1); @@ -2843,7 +2843,7 @@ map_new_binfile(struct map_methods *meth, struct attr **attrs, struct callback_l void plugin_init(void) { - dbg(lvl_warning,"binfile: plugin_init\n"); + dbg(lvl_debug,"binfile: plugin_init\n"); if (sizeof(struct zip_cd) != 46) { dbg(lvl_error,"error: sizeof(struct zip_cd)=%zu\n",sizeof(struct zip_cd)); } diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c index 8cb677839..ea36432d1 100644 --- a/navit/map/csv/csv.c +++ b/navit/map/csv/csv.c @@ -130,7 +130,7 @@ save_map_csv(struct map_priv *m) tmpstr=g_strdup(""); } } else { - dbg(lvl_error,"No value defined for the atribute %s, assuming empty string\n",attr_to_name(*at)); + dbg(lvl_debug,"No value defined for the atribute %s, assuming empty string\n",attr_to_name(*at)); tmpstr=g_strdup(""); } } @@ -181,7 +181,7 @@ static const int zoom_max = 18; static void map_destroy_csv(struct map_priv *m) { - dbg(lvl_warning,"map_destroy_csv\n"); + dbg(lvl_debug,"map_destroy_csv\n"); /*save if changed */ save_map_csv(m); g_hash_table_destroy(m->qitem_hash); @@ -355,10 +355,10 @@ static int csv_type_set(void *priv_data, enum item_type type) { struct map_rect_priv* mr = (struct map_rect_priv*)priv_data; - dbg(lvl_warning,"Enter %d\n", type); + dbg(lvl_debug,"Enter %d\n", type); if(!mr || !mr->qitem) { - dbg(lvl_warning,"Nothing to do\n"); + dbg(lvl_debug,"Nothing to do\n"); return 0; } @@ -366,7 +366,7 @@ csv_type_set(void *priv_data, enum item_type type) return 0; mr->qitem->deleted=1; - dbg(lvl_warning,"Item %p is deleted\n",mr->qitem); + dbg(lvl_debug,"Item %p is deleted\n",mr->qitem); return 1; } @@ -395,7 +395,7 @@ csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode struct map_priv* m; struct quadtree_item* qi; GList* new_it; - dbg(lvl_warning,"Set coordinates %d %d\n", c->x, c->y); + dbg(lvl_debug,"Set coordinates %d %d\n", c->x, c->y); /* for now we only support coord modification only */ if( ! change_mode_modify) { @@ -430,7 +430,7 @@ csv_coord_set(void *priv_data, struct coord *c, int count, enum change_mode mode qi->longitude = cg.lng; qi->latitude = cg.lat; quadtree_add( m->tree_root, qi, mr->qiter); - dbg(lvl_warning,"Set coordinates %f %f\n", cg.lng, cg.lat); + dbg(lvl_debug,"Set coordinates %f %f\n", cg.lng, cg.lat); m->new_items = g_list_remove_link(m->new_items,new_it); m->dirty=1; save_map_csv(m); @@ -518,7 +518,7 @@ map_rect_new_csv(struct map_priv *map, struct map_selection *sel) struct coord_geo lu; struct coord_geo rl; struct quadtree_iter *res = NULL; - dbg(lvl_warning,"map_rect_new_csv\n"); + dbg(lvl_debug,"map_rect_new_csv\n"); if(debug_level_get("map_csv")>2) { map_csv_debug_dump(map); } @@ -725,7 +725,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list charset = attr_search(attrs, NULL, attr_charset); if(charset) { - dbg(lvl_warning,"charset:%s\n",charset->u.str); + dbg(lvl_debug,"charset:%s\n",charset->u.str); m->charset=g_strdup(charset->u.str); } else { m->charset=g_strdup(map_methods_csv.charset); @@ -757,7 +757,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list FILE *fp; wexp=file_wordexp_new(data->u.str); wexp_data=file_wordexp_get_array(wexp); - dbg(lvl_warning,"map_new_csv %s\n", data->u.str); + dbg(lvl_debug,"map_new_csv %s\n", data->u.str); m->filename=g_strdup(wexp_data[0]); file_wordexp_destroy(wexp); @@ -847,7 +847,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list *pID = m->next_item_idx; g_hash_table_insert(m->qitem_hash, pID,qi); ++m->next_item_idx; - dbg(lvl_warning,"%s\n",line); + dbg(lvl_debug,"%s\n",line); } else { g_free(curr_item); @@ -867,7 +867,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list dbg(lvl_error,"Error opening csv map file %s, starting with empty map\n", m->filename); } } else { - dbg(lvl_warning,"No data attribute, starting with in-memory map\n"); + dbg(lvl_debug,"No data attribute, starting with in-memory map\n"); } dbg(lvl_info,"%p\n",tree_root); @@ -877,7 +877,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list void plugin_init(void) { - dbg(lvl_warning,"csv: plugin_init\n"); + dbg(lvl_debug,"csv: plugin_init\n"); plugin_register_map_type("csv", map_new_csv); } diff --git a/navit/map/csv/quadtree.c b/navit/map/csv/quadtree.c index f7b3fdc30..ca6068541 100644 --- a/navit/map/csv/quadtree.c +++ b/navit/map/csv/quadtree.c @@ -379,7 +379,7 @@ void quadtree_node_drop_garbage(struct quadtree_node* node, struct quadtree_iter { int i,j; int node_num=node->node_num; - dbg(lvl_warning,"Processing unreferenced subnode children...\n"); + dbg(lvl_debug,"Processing unreferenced subnode children...\n"); for(i=0,j=0;i<node_num;i++) { if(node->items[i]->deleted && !node->items[i]->ref_count) { if(iter->item_free) { @@ -561,7 +561,7 @@ struct quadtree_iter *quadtree_query(struct quadtree_node *this_, double dXMin, ret->xmax=dXMax; ret->ymin=dYMin; ret->ymax=dYMax; - dbg(lvl_warning,"%f %f %f %f\n",dXMin,dXMax,dYMin,dYMax) + dbg(lvl_debug,"%f %f %f %f\n",dXMin,dXMax,dYMin,dYMax) ret->item_free=item_free; ret->item_free_context=item_free_context; n->node=this_; @@ -577,7 +577,7 @@ struct quadtree_iter *quadtree_query(struct quadtree_node *this_, double dXMin, } this_->ref_count++; - dbg(lvl_warning,"Query %p \n",this_) + dbg(lvl_debug,"Query %p \n",this_) return ret; } @@ -627,16 +627,16 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter) if(iter_node->is_leaf) { /* Try to find undeleted item in the current node */ - dbg(lvl_warning,"find item %p %p ...\n",iter->iter_nodes,iter->iter_nodes->data); + dbg(lvl_debug,"find item %p %p ...\n",iter->iter_nodes,iter->iter_nodes->data); while(iter_node->item<iter_node->node_num) { - dbg(lvl_warning,"%d %d\n",iter_node->item,iter_node->items[iter_node->item]->deleted); + dbg(lvl_debug,"%d %d\n",iter_node->item,iter_node->items[iter_node->item]->deleted); if(iter_node->items[iter_node->item]->deleted) { iter_node->item++; continue; } iter->item=iter_node->items[iter_node->item]; iter_node->item++; - dbg(lvl_warning,"Returning %p\n",iter->item); + dbg(lvl_debug,"Returning %p\n",iter->item); iter->item->ref_count++; return iter->item; } @@ -654,13 +654,13 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter) i=iter_node->subnode; if(!nodes[i] || !rects_overlap(nodes[i]->xmin, nodes[i]->ymin, nodes[i]->xmax, nodes[i]->ymax, iter->xmin, iter->ymin, iter->xmax, iter->ymax)) continue; - dbg(lvl_warning,"%f %f %f %f\n",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax) + dbg(lvl_debug,"%f %f %f %f\n",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax) subnode=nodes[i]; } if(subnode) { /* Go one level deeper */ - dbg(lvl_warning,"Go one level deeper...\n"); + dbg(lvl_debug,"Go one level deeper...\n"); iter_node=g_new0(struct quadtree_iter_node, 1); iter_node->node=subnode; iter_node->is_leaf=subnode->is_leaf; @@ -692,7 +692,7 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter) /* 2. remove empty leaf subnode if it's unreferenced */ if(!subnode->ref_count && !subnode->node_num && subnode->is_leaf ) { - dbg(lvl_warning,"Going to delete an empty unreferenced leaf subnode...\n"); + dbg(lvl_debug,"Going to delete an empty unreferenced leaf subnode...\n"); if(subnode->parent) { if(subnode->parent->aa==subnode) { @@ -711,7 +711,7 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter) subnode->parent->is_leaf=1; g_free(subnode); } else - dbg(lvl_warning,"Quadtree is empty. NOT deleting the root subnode...\n"); + dbg(lvl_debug,"Quadtree is empty. NOT deleting the root subnode...\n"); } diff --git a/navit/map/filter/filter.c b/navit/map/filter/filter.c index cf083c85a..63817ecc7 100644 --- a/navit/map/filter/filter.c +++ b/navit/map/filter/filter.c @@ -319,7 +319,7 @@ map_filter_rect_get_item(struct map_rect_priv *mr) static struct item * map_filter_rect_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) { - dbg(lvl_error,"enter\n"); + dbg(lvl_debug,"enter\n"); mr->parent_item=map_rect_get_item_byid(mr->parent, id_hi, id_lo); if (!mr->parent_item) return NULL; @@ -332,21 +332,21 @@ map_filter_rect_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) static struct map_search_priv * map_filter_search_new(struct map_priv *map, struct item *item, struct attr *search, int partial) { - dbg(lvl_error,"enter\n"); + dbg(lvl_debug,"enter\n"); return NULL; } static struct item * map_filter_search_get_item(struct map_search_priv *map_search) { - dbg(lvl_error,"enter\n"); + dbg(lvl_debug,"enter\n"); return NULL; } static void map_filter_search_destroy(struct map_search_priv *ms) { - dbg(lvl_error,"enter\n"); + dbg(lvl_debug,"enter\n"); } static void @@ -429,7 +429,7 @@ map_filter_new(struct map_methods *meth, struct attr **attrs, struct callback_li void plugin_init(void) { - dbg(lvl_warning,"filter: plugin_init\n"); + dbg(lvl_debug,"filter: plugin_init\n"); plugin_register_map_type("filter", map_filter_new); } diff --git a/navit/map/mg/block.c b/navit/map/mg/block.c index f18e77863..b2bb64ac0 100644 --- a/navit/map/mg/block.c +++ b/navit/map/mg/block.c @@ -77,7 +77,7 @@ block_get_byid(struct file *file, int id, unsigned char **p_ret) int block_get_byindex(struct file *file, int idx, struct block_priv *blk) { - dbg(lvl_warning,"idx=%d\n", idx); + dbg(lvl_debug,"idx=%d\n", idx); blk->b=block_get_byid(file, idx, &blk->p); blk->block_start=(unsigned char *)(blk->b); blk->p_start=blk->p; @@ -177,7 +177,7 @@ block_next_lin(struct map_rect_priv *mr) else mr->b.p=mr->b.block_start+block_get_blocks(mr->b.b)*512; if (mr->b.p >= mr->file->end) { - dbg(lvl_warning,"end of blocks %p vs %p\n", mr->b.p, mr->file->end); + dbg(lvl_debug,"end of blocks %p vs %p\n", mr->b.p, mr->file->end); return 0; } mr->b.block_start=mr->b.p; @@ -192,7 +192,7 @@ block_next_lin(struct map_rect_priv *mr) if (!mr->cur_sel || coord_rect_overlap(&mr->cur_sel->u.c_rect, &r)) { block_active_count++; block_active_mem+=block_get_blocks(mr->b.b)*512-sizeof(struct block *); - dbg(lvl_warning,"block ok\n"); + dbg(lvl_debug,"block ok\n"); return 1; } dbg(lvl_info,"block not in cur_sel\n"); @@ -210,14 +210,14 @@ block_next(struct map_rect_priv *mr) return block_next_lin(mr); for (;;) { if (! bt->p) { - dbg(lvl_warning,"block 0x%x\n", bt->next); + dbg(lvl_debug,"block 0x%x\n", bt->next); if (bt->next == -1) return 0; bt->b=block_get_byid(mr->file, bt->next, &bt->p); bt->end=(unsigned char *)mr->b.bt.b+block_get_size(mr->b.bt.b); bt->next=block_get_next(bt->b); bt->order=0; - dbg(lvl_warning,"size 0x%x next 0x%x\n", block_get_size(bt->b), block_get_next(bt->b)); + dbg(lvl_debug,"size 0x%x next 0x%x\n", block_get_size(bt->b), block_get_next(bt->b)); if (! mr->b.bt.block_count) { #if 0 if (debug) { @@ -238,8 +238,8 @@ block_next(struct map_rect_priv *mr) blk_num=get_u32(&mr->b.bt.p); coord=get_u32(&mr->b.bt.p); block_mem+=8; - dbg(lvl_warning,"%p vs %p coord 0x%x ", mr->b.bt.end, mr->b.bt.p, coord); - dbg(lvl_warning,"block 0x%x", blk_num); + dbg(lvl_debug,"%p vs %p coord 0x%x ", mr->b.bt.end, mr->b.bt.p, coord); + dbg(lvl_debug,"block 0x%x", blk_num); r_w=bt->r_curr.rl.x-bt->r_curr.lu.x; r_h=bt->r_curr.lu.y-bt->r_curr.rl.y; diff --git a/navit/map/mg/map.c b/navit/map/mg/map.c index b5a67fd09..9b0805e2d 100644 --- a/navit/map/mg/map.c +++ b/navit/map/mg/map.c @@ -289,7 +289,7 @@ map_rect_get_item_mg(struct map_rect_priv *mr) } if (file_next(mr)) continue; - dbg(lvl_warning,"lin_count %d idx_count %d active_count %d %d kB (%d kB)\n", block_lin_count, block_idx_count, block_active_count, (block_mem+block_active_mem)/1024, block_active_mem/1024); + dbg(lvl_debug,"lin_count %d idx_count %d active_count %d %d kB (%d kB)\n", block_lin_count, block_idx_count, block_active_count, (block_mem+block_active_mem)/1024, block_active_mem/1024); return NULL; } } @@ -361,7 +361,7 @@ map_search_mg_convert_special(char *str) *c++='u'; break; default: - dbg(lvl_warning,"0x%x\n", *str); + dbg(lvl_debug,"0x%x\n", *str); *c++=*str; break; } @@ -375,7 +375,7 @@ static int map_search_setup(struct map_rect_priv *mr) { char *prefix; - dbg(lvl_warning,"%s\n", attr_to_name(mr->search_type)); + dbg(lvl_debug,"%s\n", attr_to_name(mr->search_type)); switch (mr->search_type) { case attr_town_postal: if (mr->search_item.type != type_country_label) { @@ -388,7 +388,7 @@ map_search_setup(struct map_rect_priv *mr) tree_search_init(mr->m->dirname, "town.b1", &mr->ts, 0); mr->current_file=file_town_twn; mr->search_str=g_strdup_printf("%s%s",prefix,mr->search_attr->u.str); - dbg(lvl_error,"search_str='%s'\n",mr->search_str); + dbg(lvl_debug,"search_str='%s'\n",mr->search_str); mr->search_country=mg_country_from_isonum(mr->search_item.id_lo); break; case attr_town_name: @@ -438,7 +438,7 @@ map_search_setup(struct map_rect_priv *mr) return 0; } } - dbg(lvl_warning,"street_assoc=0x%x\n", mr->search_item.id_lo); + dbg(lvl_debug,"street_assoc=0x%x\n", mr->search_item.id_lo); tree_search_init(mr->m->dirname, "strname.b1", &mr->ts, 0); mr->current_file=file_strname_stn; mr->search_str=g_strdup(mr->search_attr->u.str); @@ -467,9 +467,9 @@ static struct map_search_priv * map_search_new_mg(struct map_priv *map, struct item *item, struct attr *search, int partial) { struct map_rect_priv *mr=g_new0(struct map_rect_priv, 1); - dbg(lvl_warning,"searching for %s '%s'\n", attr_to_name(search->type), search->u.str); - dbg(lvl_warning,"id_lo=0x%x\n", item->id_lo); - dbg(lvl_warning,"search=%s\n", search->u.str); + dbg(lvl_debug,"searching for %s '%s'\n", attr_to_name(search->type), search->u.str); + dbg(lvl_debug,"id_lo=0x%x\n", item->id_lo); + dbg(lvl_debug,"search=%s\n", search->u.str); mr->m=map; mr->search_attr=attr_dup(search); mr->search_type=search->type; @@ -507,7 +507,7 @@ map_search_destroy_mg(struct map_search_priv *ms) { struct map_rect_priv *mr=(struct map_rect_priv *)ms; - dbg(lvl_warning,"mr=%p\n", mr); + dbg(lvl_debug,"mr=%p\n", mr); if (! mr) return; map_search_cleanup(mr); diff --git a/navit/map/mg/poly.c b/navit/map/mg/poly.c index 43256a295..7c73d4587 100644 --- a/navit/map/mg/poly.c +++ b/navit/map/mg/poly.c @@ -235,10 +235,10 @@ poly_get(struct map_rect_priv *mr, struct poly_priv *poly, struct item *item) } } else mr->b.p=poly->subpoly_next; - dbg(lvl_warning,"%d %d %s\n", poly->subpoly_num_all, mr->b.block_num, poly->name); + dbg(lvl_debug,"%d %d %s\n", poly->subpoly_num_all, mr->b.block_num, poly->name); item->id_lo=poly->subpoly_num_all | (mr->b.block_num << 16); item->id_hi=(mr->current_file << 16); - dbg(lvl_warning,"0x%x 0x%x\n", item->id_lo, item->id_hi); + dbg(lvl_debug,"0x%x 0x%x\n", item->id_lo, item->id_hi); poly->subpoly_next=mr->b.p+L(poly->count[poly->subpoly_num])*sizeof(struct coord); poly->subpoly_num++; poly->subpoly_num_all++; diff --git a/navit/map/mg/street.c b/navit/map/mg/street.c index 9a43ca14a..6aad6e5a0 100644 --- a/navit/map/mg/street.c +++ b/navit/map/mg/street.c @@ -208,7 +208,7 @@ static int street_get_coord(unsigned char **pos, int bytes, struct coord_rect *r if (f) { f->x=ref->lu.x+x; f->y=ref->rl.y+y; - dbg(lvl_warning,"0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x\n", x, y, ref->lu.x, ref->rl.y, f->x, f->y); + dbg(lvl_debug,"0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x\n", x, y, ref->lu.x, ref->rl.y, f->x, f->y); } *pos=p; return flags; @@ -282,14 +282,14 @@ street_coord_get(void *priv_data, struct coord *c, int count) if (segid == 0x15) debug=1; if (debug) { - dbg(lvl_error,"enter 0x%x\n",segid); + dbg(lvl_debug,"enter 0x%x\n",segid); } #endif while (count > 0) { if (street_coord_get_helper(street, c)) { #ifdef DEBUG_COORD_GET if (debug) { - dbg(lvl_error,"0x%x,0x%x\n", c->x, c->y); + dbg(lvl_debug,"0x%x,0x%x\n", c->x, c->y); } #endif c++; @@ -316,7 +316,7 @@ street_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) struct street_priv *street=priv_data; int nameid; - dbg(lvl_warning,"segid 0x%x\n", street_str_get_segid(street->str)); + dbg(lvl_debug,"segid 0x%x\n", street_str_get_segid(street->str)); attr->type=attr_type; switch (attr_type) { case attr_any: @@ -557,12 +557,12 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi, int country=id_hi & 0xffff; int res; struct coord_rect r; - dbg(lvl_warning,"enter(%p,%p,0x%x,0x%x,%p)\n", mr, street, id_hi, id_lo, item); + dbg(lvl_debug,"enter(%p,%p,0x%x,0x%x,%p)\n", mr, street, id_hi, id_lo, item); if (! country) return 0; if (! tree_search_hv(mr->m->dirname, "street", (id_lo >> 8) | (country << 24), id_lo & 0xff, &res)) return 0; - dbg(lvl_warning,"res=0x%x (blk=0x%x)\n", res, res >> 12); + dbg(lvl_debug,"res=0x%x (blk=0x%x)\n", res, res >> 12); block_get_byindex(mr->m->file[mr->current_file], res >> 12, &mr->b); street_get_data(street, &mr->b.p); street->name_file=mr->m->file[file_strname_stn]; @@ -578,7 +578,7 @@ street_get_byid(struct map_rect_priv *mr, struct street_priv *street, int id_hi, item->meth=&street_meth; item->priv_data=street; street->str+=(res & 0xfff)-1; - dbg(lvl_warning,"segid 0x%x\n", street_str_get_segid(&street->str[1])); + dbg(lvl_debug,"segid 0x%x\n", street_str_get_segid(&street->str[1])); return street_get(mr, street, item); #if 0 mr->b.p=mr->b.block_start+(res & 0xffff); @@ -620,7 +620,7 @@ latin1_tolower_ascii(unsigned char c) return 'u'; default: if (ret >= 0x80) - dbg(lvl_warning,"ret=0x%x\n",c); + dbg(lvl_debug,"ret=0x%x\n",c); return ret; } } @@ -662,27 +662,27 @@ street_search_compare_do(struct map_rect_priv *mr, int country, int town_assoc, { int d,len; - dbg(lvl_warning,"enter"); - dbg(lvl_warning,"country 0x%x town_assoc 0x%x name '%s'\n", country, town_assoc, name); + dbg(lvl_debug,"enter"); + dbg(lvl_debug,"country 0x%x town_assoc 0x%x name '%s'\n", country, town_assoc, name); d=(mr->search_item.id_hi & 0xffff)-country; - dbg(lvl_warning,"country %d (%d vs %d)\n", d, mr->search_item.id_hi & 0xffff, country); + dbg(lvl_debug,"country %d (%d vs %d)\n", d, mr->search_item.id_hi & 0xffff, country); if (!d) { if (mr->search_item.id_lo == town_assoc ) { - dbg(lvl_warning,"town_assoc match (0x%x)\n", town_assoc); + dbg(lvl_debug,"town_assoc match (0x%x)\n", town_assoc); len=mr->search_partial ? strlen(mr->search_str):INT_MAX; d=strncasecmp_latin1(mr->search_str, name, len); if (!strncasecmp_latin1_ascii(mr->search_str, name, len)) d=0; - dbg(lvl_warning,"string %d\n", d); + dbg(lvl_debug,"string %d\n", d); } else { if (town_assoc < mr->search_item.id_lo) d=1; else d=-1; - dbg(lvl_warning,"assoc %d 0x%x-0x%x\n",d, mr->search_item.id_lo, town_assoc); + dbg(lvl_debug,"assoc %d 0x%x-0x%x\n",d, mr->search_item.id_lo, town_assoc); } } - dbg(lvl_warning,"d=%d\n", d); + dbg(lvl_debug,"d=%d\n", d); return d; } @@ -692,11 +692,11 @@ street_search_compare(unsigned char **p, struct map_rect_priv *mr) struct street_name_index *i; int ret; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); i=(struct street_name_index *)(*p); *p+=sizeof(*i)+strlen(i->name)+1; - dbg(lvl_warning,"block 0x%x\n", i->block); + dbg(lvl_debug,"block 0x%x\n", i->block); ret=street_search_compare_do(mr, i->country, i->town_assoc, i->name); if (ret <= 0) @@ -725,7 +725,7 @@ street_name_coord_get(void *priv_data, struct coord *c, int count) struct street_name_numbers snns; unsigned char *p=mr->street.name.aux_data; - dbg(lvl_warning,"aux_data=%p\n", p); + dbg(lvl_debug,"aux_data=%p\n", p); if (count) { street_name_numbers_get(&snns, &p); street_name_numbers_get_coord(&snns, c); @@ -830,7 +830,7 @@ street_name_get_byid(struct map_rect_priv *mr, struct street_priv *street, int i item->map=NULL; item->priv_data=mr; mr->b.p=street->name_file->begin+item->id_lo; - dbg(lvl_warning,"last %p map %p file %d begin %p\n", mr->b.p, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin); + dbg(lvl_debug,"last %p map %p file %d begin %p\n", mr->b.p, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin); street_name_get(&street->name, &mr->b.p); return 1; } @@ -841,30 +841,30 @@ street_search_get_item_street_name(struct map_rect_priv *mr) int dir=1,leaf; unsigned char *last; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); if (! mr->search_blk_count) { - dbg(lvl_warning,"partial 0x%x '%s' ***\n", mr->town.street_assoc, mr->search_str); + dbg(lvl_debug,"partial 0x%x '%s' ***\n", mr->town.street_assoc, mr->search_str); if (mr->search_linear) return NULL; - dbg(lvl_warning,"tree_search_next\n"); + dbg(lvl_debug,"tree_search_next\n"); mr->search_block=-1; while ((leaf=tree_search_next(&mr->ts, &mr->search_p, dir)) != -1) { dir=street_search_compare(&mr->search_p, mr); } - dbg(lvl_warning,"dir=%d mr->search_block=0x%x\n", dir, mr->search_block); + dbg(lvl_debug,"dir=%d mr->search_block=0x%x\n", dir, mr->search_block); if (mr->search_block == -1) return NULL; mr->search_blk_count=1; block_get_byindex(mr->m->file[file_strname_stn], mr->search_block, &mr->b); mr->b.p=mr->b.block_start+12; } - dbg(lvl_warning,"name id %td\n", mr->b.p-mr->m->file[file_strname_stn]->begin); + dbg(lvl_debug,"name id %td\n", mr->b.p-mr->m->file[file_strname_stn]->begin); if (! mr->search_blk_count) return NULL; for (;;) { if (mr->b.p >= mr->b.end) { if (!block_next_lin(mr)) { - dbg(lvl_warning,"end of blocks in %p, %p\n", mr->m->file[file_strname_stn]->begin, mr->m->file[file_strname_stn]->end); + dbg(lvl_debug,"end of blocks in %p, %p\n", mr->m->file[file_strname_stn]->begin, mr->m->file[file_strname_stn]->end); return NULL; } mr->b.p=mr->b.block_start+12; @@ -873,23 +873,23 @@ street_search_get_item_street_name(struct map_rect_priv *mr) last=mr->b.p; street_name_get(&mr->street.name, &mr->b.p); dir=street_search_compare_do(mr, mr->street.name.country, mr->street.name.townassoc, mr->street.name.name2); - dbg(lvl_warning,"country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir); + dbg(lvl_debug,"country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir); if (dir < 0) { - dbg(lvl_warning,"end of data\n"); + dbg(lvl_debug,"end of data\n"); mr->search_blk_count=0; return NULL; } if (!dir) { - dbg(lvl_warning,"result country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d aux_data=%p len=0x%x\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir, mr->street.name.aux_data, mr->street.name.aux_len); + dbg(lvl_debug,"result country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d aux_data=%p len=0x%x\n", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir, mr->street.name.aux_data, mr->street.name.aux_len); mr->item.type = type_street_name; mr->item.id_hi=(file_strname_stn << 16); mr->item.id_lo=last-mr->m->file[file_strname_stn]->begin; - dbg(lvl_warning,"id 0x%x 0x%x last %p map %p file %d begin %p\n", mr->item.id_hi, mr->item.id_lo, last, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin); + dbg(lvl_debug,"id 0x%x 0x%x last %p map %p file %d begin %p\n", mr->item.id_hi, mr->item.id_lo, last, mr->m, mr->current_file, mr->m->file[mr->current_file]->begin); mr->item.meth=&street_name_meth; mr->item.map=NULL; mr->item.priv_data=mr; /* debug(mr); */ - dbg(lvl_warning,"last %p\n",last); + dbg(lvl_debug,"last %p\n",last); return &mr->item; } } @@ -920,7 +920,7 @@ street_name_numbers_next(struct map_rect_priv *mr) { if (street_name_eod(&mr->street.name)) return 0; - dbg(lvl_warning,"%p vs %p\n",mr->street.name.tmp_data, mr->street.name.aux_data); + dbg(lvl_debug,"%p vs %p\n",mr->street.name.tmp_data, mr->street.name.aux_data); street_name_numbers_get(&mr->street.name_numbers, &mr->street.name.tmp_data); return 1; } @@ -991,20 +991,20 @@ static struct item_methods housenumber_meth = { int housenumber_search_setup(struct map_rect_priv *mr) { - dbg(lvl_warning,"enter (0x%x,0x%x)\n",mr->search_item.id_hi,mr->search_item.id_lo); + dbg(lvl_debug,"enter (0x%x,0x%x)\n",mr->search_item.id_hi,mr->search_item.id_lo); int id=mr->search_item.id_hi & 0xff; mr->current_file=file_strname_stn; mr->street.name_file=mr->m->file[mr->current_file]; mr->b.p=mr->street.name_file->begin+mr->search_item.id_lo; mr->search_str=g_strdup(mr->search_attr->u.str); - dbg(lvl_warning,"last %p\n",mr->b.p); + dbg(lvl_debug,"last %p\n",mr->b.p); street_name_get(&mr->street.name, &mr->b.p); #if 0 debug(mr); #endif while (id > 0) { id--; - dbg(lvl_warning,"loop\n"); + dbg(lvl_debug,"loop\n"); if (!street_name_numbers_next(mr)) return 0; } @@ -1015,10 +1015,10 @@ housenumber_search_setup(struct map_rect_priv *mr) if (!id) mr->item.id_hi+=1; mr->item.id_lo=mr->search_item.id_lo; - dbg(lvl_warning,"getting name_number %p vs %p + %d\n",mr->street.name_numbers.tmp_data,mr->street.name_numbers.aux_data, mr->street.name_numbers.aux_len); + dbg(lvl_debug,"getting name_number %p vs %p + %d\n",mr->street.name_numbers.tmp_data,mr->street.name_numbers.aux_data, mr->street.name_numbers.aux_len); if (!street_name_number_next(mr)) return 0; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); // debug(mr); return 1; } @@ -1055,7 +1055,7 @@ struct item * housenumber_search_get_item(struct map_rect_priv *mr) { int d; - dbg(lvl_warning,"enter %s %s\n",mr->street.first_number,mr->street.last_number); + dbg(lvl_debug,"enter %s %s\n",mr->street.first_number,mr->street.last_number); for (;;) { if (!house_number_next(mr->street.current_number, mr->street.first_number, mr->street.last_number, 0, NULL)) { if (!street_name_number_next(mr)) diff --git a/navit/map/mg/town.c b/navit/map/mg/town.c index ab7a19786..0fd19be0d 100644 --- a/navit/map/mg/town.c +++ b/navit/map/mg/town.c @@ -222,12 +222,12 @@ town_search_compare(unsigned char **p, struct map_rect_priv *mr) d=0; } else { country=get_u16_unal(p); - dbg(lvl_warning,"country 0x%x ", country); + dbg(lvl_debug,"country 0x%x ", country); name=get_string(p); - dbg(lvl_warning,"name '%s' ",name); + dbg(lvl_debug,"name '%s' ",name); mr->search_blk_count=get_u32_unal(p); mr->search_blk_off=(struct block_offset *)(*p); - dbg(lvl_warning,"len %d ", mr->search_blk_count); + dbg(lvl_debug,"len %d ", mr->search_blk_count); (*p)+=mr->search_blk_count*4; d=mr->search_country-country; } @@ -237,7 +237,7 @@ town_search_compare(unsigned char **p, struct map_rect_priv *mr) else d=strcasecmp(mr->search_str, name); } - dbg(lvl_warning,"%d \n",d); + dbg(lvl_debug,"%d \n",d); return d; } @@ -250,7 +250,7 @@ town_search_get_item(struct map_rect_priv *mr) int dir=1,leaf; if (! mr->search_blk_count) { - dbg(lvl_warning,"partial %d 0x%x '%s' ***\n", mr->search_partial, mr->search_country, mr->search_str); + dbg(lvl_debug,"partial %d 0x%x '%s' ***\n", mr->search_partial, mr->search_country, mr->search_str); if (! mr->search_linear) { while ((leaf=tree_search_next(&mr->ts, &mr->search_p, dir)) != -1) { dir=town_search_compare(&mr->search_p, mr); @@ -266,18 +266,18 @@ town_search_get_item(struct map_rect_priv *mr) } } if (! tree_search_next_lin(&mr->ts, &mr->search_p)) { - dbg(lvl_warning,"linear not found\n"); + dbg(lvl_debug,"linear not found\n"); return NULL; } if (town_search_compare(&mr->search_p, mr)) { - dbg(lvl_warning,"no match\n"); + dbg(lvl_debug,"no match\n"); return NULL; } - dbg(lvl_warning,"found %d blocks\n",mr->search_blk_count); + dbg(lvl_debug,"found %d blocks\n",mr->search_blk_count); } if (! mr->search_blk_count) return NULL; - dbg(lvl_warning,"block 0x%x offset 0x%x\n", block_offset_get_block(mr->search_blk_off), block_offset_get_offset(mr->search_blk_off)); + dbg(lvl_debug,"block 0x%x offset 0x%x\n", block_offset_get_block(mr->search_blk_off), block_offset_get_offset(mr->search_blk_off)); block_get_byindex(mr->m->file[mr->current_file], block_offset_get_block(mr->search_blk_off), &mr->b); mr->b.p=mr->b.block_start+block_offset_get_offset(mr->search_blk_off); town_get(mr, &mr->town, &mr->item); diff --git a/navit/map/mg/tree.c b/navit/map/mg/tree.c index 27100007c..e456ca87c 100644 --- a/navit/map/mg/tree.c +++ b/navit/map/mg/tree.c @@ -78,22 +78,22 @@ tree_search_h(struct file *file, unsigned int search) struct tree_hdr_h *thdr; struct tree_leaf_h *tleaf; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); while (i++ < 1000) { thdr=(struct tree_hdr_h *)p; p+=sizeof(*thdr); end=p+tree_hdr_h_get_size(thdr); - dbg(lvl_warning,"@%td\n", p-file->begin); + dbg(lvl_debug,"@%td\n", p-file->begin); last=0; while (p < end) { tleaf=(struct tree_leaf_h *)p; p+=sizeof(*tleaf); - dbg(lvl_warning,"low:0x%x high:0x%x match:0x%x val:0x%x search:0x%x\n", tree_leaf_h_get_lower(tleaf), tree_leaf_h_get_higher(tleaf), tree_leaf_h_get_match(tleaf), tree_leaf_h_get_value(tleaf), search); + dbg(lvl_debug,"low:0x%x high:0x%x match:0x%x val:0x%x search:0x%x\n", tree_leaf_h_get_lower(tleaf), tree_leaf_h_get_higher(tleaf), tree_leaf_h_get_match(tleaf), tree_leaf_h_get_value(tleaf), search); value=tree_leaf_h_get_value(tleaf); if (value == search) return tree_leaf_h_get_match(tleaf); if (value > search) { - dbg(lvl_warning,"lower\n"); + dbg(lvl_debug,"lower\n"); lower=tree_leaf_h_get_lower(tleaf); if (lower) last=lower; @@ -119,11 +119,11 @@ tree_search_v(struct file *file, int offset, int search) thdr=(struct tree_hdr_v *)p; p+=sizeof(*thdr); count=tree_hdr_v_get_count(thdr); - dbg(lvl_warning,"offset=%td count=0x%x\n", p-file->begin, count); + dbg(lvl_debug,"offset=%td count=0x%x\n", p-file->begin, count); while (count--) { tleaf=(struct tree_leaf_v *)p; p+=sizeof(*tleaf); - dbg(lvl_warning,"0x%x 0x%x\n", tleaf->key, search); + dbg(lvl_debug,"0x%x 0x%x\n", tleaf->key, search); if (tleaf->key == search) return tree_leaf_v_get_value(tleaf); } @@ -142,32 +142,32 @@ tree_search_hv(char *dirname, char *filename, unsigned int search_h, unsigned in char buffer[4096]; int h,v; - dbg(lvl_warning,"enter(%s, %s, 0x%x, 0x%x, %p)\n",dirname, filename, search_h, search_v, result); + dbg(lvl_debug,"enter(%s, %s, 0x%x, 0x%x, %p)\n",dirname, filename, search_h, search_v, result); sprintf(buffer, "%s/%s.h1", dirname, filename); f_idx_h=file_create_caseinsensitive(buffer, 0); if ((!f_idx_h) || (!file_mmap(f_idx_h))) return 0; sprintf(buffer, "%s/%s.v1", dirname, filename); f_idx_v=file_create_caseinsensitive(buffer, 0); - dbg(lvl_warning,"%p %p\n", f_idx_h, f_idx_v); + dbg(lvl_debug,"%p %p\n", f_idx_h, f_idx_v); if ((!f_idx_v) || (!file_mmap(f_idx_v))) { file_destroy(f_idx_h); return 0; } if ((h=tree_search_h(f_idx_h, search_h))) { - dbg(lvl_warning,"h=0x%x\n", h); + dbg(lvl_debug,"h=0x%x\n", h); if ((v=tree_search_v(f_idx_v, h, search_v))) { - dbg(lvl_warning,"v=0x%x\n", v); + dbg(lvl_debug,"v=0x%x\n", v); *result=v; file_destroy(f_idx_v); file_destroy(f_idx_h); - dbg(lvl_warning,"return 1\n"); + dbg(lvl_debug,"return 1\n"); return 1; } } file_destroy(f_idx_v); file_destroy(f_idx_h); - dbg(lvl_warning,"return 0\n"); + dbg(lvl_debug,"return 0\n"); return 0; } @@ -183,7 +183,7 @@ tree_search_enter(struct tree_search *ts, int offset) tsn->end=p+tree_hdr_get_size(tsn->hdr); tsn->low=tree_hdr_get_low(tsn->hdr); tsn->high=tree_hdr_get_low(tsn->hdr); - dbg(lvl_warning,"pos %td addr 0x%ux size 0x%ux low 0x%ux end %tu\n", p-ts->f->begin, tree_hdr_get_addr(tsn->hdr), tree_hdr_get_size(tsn->hdr), tree_hdr_get_low(tsn->hdr), tsn->end-ts->f->begin); + dbg(lvl_debug,"pos %td addr 0x%ux size 0x%ux low 0x%ux end %tu\n", p-ts->f->begin, tree_hdr_get_addr(tsn->hdr), tree_hdr_get_size(tsn->hdr), tree_hdr_get_low(tsn->hdr), tsn->end-ts->f->begin); return tsn; } @@ -193,17 +193,17 @@ int tree_search_next(struct tree_search *ts, unsigned char **p, int dir) if (! *p) *p=tsn->p; - dbg(lvl_warning,"next *p=%p dir=%d\n", *p, dir); - dbg(lvl_warning,"low1=0x%x high1=0x%x\n", tsn->low, tsn->high); + dbg(lvl_debug,"next *p=%p dir=%d\n", *p, dir); + dbg(lvl_debug,"low1=0x%x high1=0x%x\n", tsn->low, tsn->high); if (dir <= 0) { - dbg(lvl_warning,"down 0x%x\n", tsn->low); + dbg(lvl_debug,"down 0x%x\n", tsn->low); if (tsn->low != 0xffffffff) { tsn=tree_search_enter(ts, tsn->low); *p=tsn->p; tsn->high=get_u32(p); ts->last_node=ts->curr_node; - dbg(lvl_warning,"saving last2 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); - dbg(lvl_warning,"high2=0x%x\n", tsn->high); + dbg(lvl_debug,"saving last2 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); + dbg(lvl_debug,"high2=0x%x\n", tsn->high); return 0; } return -1; @@ -211,18 +211,18 @@ int tree_search_next(struct tree_search *ts, unsigned char **p, int dir) tsn->low=tsn->high; tsn->last=*p; tsn->high=get_u32_unal(p); - dbg(lvl_warning,"saving last3 %d %p\n", ts->curr_node, tsn->last); + dbg(lvl_debug,"saving last3 %d %p\n", ts->curr_node, tsn->last); if (*p < tsn->end) return (tsn->low == 0xffffffff ? 1 : 0); - dbg(lvl_warning,"end reached high=0x%x\n",tsn->high); + dbg(lvl_debug,"end reached high=0x%x\n",tsn->high); if (tsn->low != 0xffffffff) { - dbg(lvl_warning,"low 0x%x\n", tsn->low); + dbg(lvl_debug,"low 0x%x\n", tsn->low); tsn=tree_search_enter(ts, tsn->low); *p=tsn->p; tsn->high=get_u32_unal(p); ts->last_node=ts->curr_node; - dbg(lvl_warning,"saving last4 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); - dbg(lvl_warning,"high4=0x%x\n", tsn->high); + dbg(lvl_debug,"saving last4 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); + dbg(lvl_debug,"high4=0x%x\n", tsn->high); return 0; } return -1; @@ -233,7 +233,7 @@ int tree_search_next_lin(struct tree_search *ts, unsigned char **p) struct tree_search_node *tsn=&ts->nodes[ts->curr_node]; int high; - dbg(lvl_warning,"pos=%d %td\n", ts->curr_node, *p-ts->f->begin); + dbg(lvl_debug,"pos=%d %td\n", ts->curr_node, *p-ts->f->begin); if (*p) ts->nodes[ts->last_node].last=*p; *p=tsn->last; @@ -243,12 +243,12 @@ int tree_search_next_lin(struct tree_search *ts, unsigned char **p) ts->last_node=ts->curr_node; while (high != 0xffffffff) { tsn=tree_search_enter(ts, high); - dbg(lvl_warning,"reload %d\n",ts->curr_node); + dbg(lvl_debug,"reload %d\n",ts->curr_node); high=tsn->low; } return 1; } - dbg(lvl_warning,"eon %d %td %td\n", ts->curr_node, *p-ts->f->begin, tsn->end-ts->f->begin); + dbg(lvl_debug,"eon %d %td %td\n", ts->curr_node, *p-ts->f->begin, tsn->end-ts->f->begin); if (! ts->curr_node) break; ts->curr_node--; diff --git a/navit/map/shapefile/shapefile.c b/navit/map/shapefile/shapefile.c index f311d514e..e67aaafee 100644 --- a/navit/map/shapefile/shapefile.c +++ b/navit/map/shapefile/shapefile.c @@ -76,7 +76,7 @@ struct map_rect_priv { static void map_destroy_shapefile(struct map_priv *m) { - dbg(lvl_warning,"map_destroy_shapefile\n"); + dbg(lvl_debug,"map_destroy_shapefile\n"); g_free(m); } @@ -328,7 +328,7 @@ build_match(struct longest_match *lm, struct longest_match_list *lml, char *line { struct longest_match_list_item *lmli; char *kvl=NULL,*i=NULL,*p,*kv; - dbg(lvl_warning,"line=%s\n",line); + dbg(lvl_debug,"line=%s\n",line); kvl=line; p=strchr(line,'\t'); if (p) { @@ -424,7 +424,7 @@ attr_resolve(struct map_rect_priv *mr, enum attr_type attr_type, struct attr *at } if (!value[0]) return -1; - dbg(lvl_warning,"name=%s value=%s\n",name,value); + dbg(lvl_debug,"name=%s value=%s\n",name,value); attr_free(mr->attr); mr->attr=attr_new_from_text(name,value); if (mr->attr) { @@ -531,7 +531,7 @@ map_rect_new_shapefile(struct map_priv *map, struct map_selection *sel) map->dbfmap_data=NULL; } } - dbg(lvl_warning,"%s changed %d old %p\n",dbfmapfile,changed,map->dbfmap_data); + dbg(lvl_debug,"%s changed %d old %p\n",dbfmapfile,changed,map->dbfmap_data); if (changed) { longest_match_destroy(map->lm,1); map->lm=NULL; @@ -539,7 +539,7 @@ map_rect_new_shapefile(struct map_priv *map, struct map_selection *sel) build_matches(map,map->dbfmap_data); } } - dbg(lvl_warning,"map_rect_new_shapefile\n"); + dbg(lvl_debug,"map_rect_new_shapefile\n"); mr=g_new0(struct map_rect_priv, 1); mr->m=map; mr->idx=0; @@ -595,12 +595,12 @@ map_rect_get_item_shapefile(struct map_rect_priv *mr) if (count) { mr->line=lines[0]; if (attr_from_line(mr->line,"type",NULL,type,NULL)) { - dbg(lvl_warning,"type='%s'\n", type); + dbg(lvl_debug,"type='%s'\n", type); mr->item.type=item_from_name(type); if (mr->item.type == type_none && strcmp(type,"none")) dbg(lvl_error,"Warning: type '%s' unknown\n", type); } else { - dbg(lvl_error,"failed to get attribute type\n"); + dbg(lvl_debug,"failed to get attribute type\n"); } } else mr->line=NULL; @@ -649,7 +649,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback char *shapefile,*dbffile; if (! data) return NULL; - dbg(lvl_warning,"map_new_shapefile %s\n", data->u.str); + dbg(lvl_debug,"map_new_shapefile %s\n", data->u.str); wdata=g_strdup(data->u.str); wexp=file_wordexp_new(wdata); wexp_data=file_wordexp_get_array(wexp); @@ -665,7 +665,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback m->hDBF=DBFOpen(dbffile, "rb"); m->nFields=DBFGetFieldCount(m->hDBF); g_free(dbffile); - dbg(lvl_warning,"map_new_shapefile %s %s\n", m->filename, wdata); + dbg(lvl_debug,"map_new_shapefile %s %s\n", m->filename, wdata); if (charset) { m->charset=g_strdup(charset->u.str); meth->charset=m->charset; @@ -681,7 +681,7 @@ map_new_shapefile(struct map_methods *meth, struct attr **attrs, struct callback void plugin_init(void) { - dbg(lvl_warning,"shapefile: plugin_init\n"); + dbg(lvl_debug,"shapefile: plugin_init\n"); plugin_register_map_type("shapefile", map_new_shapefile); } diff --git a/navit/map/textfile/textfile.c b/navit/map/textfile/textfile.c index 558c86219..d70f989f9 100644 --- a/navit/map/textfile/textfile.c +++ b/navit/map/textfile/textfile.c @@ -54,7 +54,7 @@ get_line(struct map_rect_priv *mr) else mr->pos+=mr->lastlen; fgets(mr->line, TEXTFILE_LINE_SIZE, mr->f); - dbg(lvl_warning,"read textfile line: %s\n", mr->line); + dbg(lvl_debug,"read textfile line: %s\n", mr->line); remove_comment_line(mr->line); mr->lastlen=strlen(mr->line)+1; if (strlen(mr->line) >= TEXTFILE_LINE_SIZE-1) @@ -99,7 +99,7 @@ textfile_coord_get(void *priv_data, struct coord *c, int count) if (mr->f && !feof(mr->f) && (!mr->item.id_hi || !mr->eoc) && parse_line(mr, mr->item.id_hi)) { if (c){ *c=mr->c; - dbg(lvl_warning,"c=0x%x,0x%x\n", c->x, c->y); + dbg(lvl_debug,"c=0x%x,0x%x\n", c->x, c->y); c++; } ret++; @@ -136,31 +136,31 @@ textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) { struct map_rect_priv *mr=priv_data; char *str=NULL; - dbg(lvl_warning,"mr=%p attrs='%s' ", mr, mr->attrs); + dbg(lvl_debug,"mr=%p attrs='%s' ", mr, mr->attrs); if (attr_type != mr->attr_last) { - dbg(lvl_warning,"reset attr_pos\n"); + dbg(lvl_debug,"reset attr_pos\n"); mr->attr_pos=0; mr->attr_last=attr_type; } if (attr_type == attr_any) { - dbg(lvl_warning,"attr_any"); + dbg(lvl_debug,"attr_any"); if (attr_from_line(mr->attrs,NULL,&mr->attr_pos,mr->attr, mr->attr_name)) { attr_type=attr_from_name(mr->attr_name); - dbg(lvl_warning,"found attr '%s' 0x%x\n", mr->attr_name, attr_type); + dbg(lvl_debug,"found attr '%s' 0x%x\n", mr->attr_name, attr_type); attr->type=attr_type; textfile_encode_attr(mr->attr, attr_type, attr); return 1; } } else { str=attr_to_name(attr_type); - dbg(lvl_warning,"attr='%s' ",str); + dbg(lvl_debug,"attr='%s' ",str); if (attr_from_line(mr->attrs,str,&mr->attr_pos,mr->attr, NULL)) { textfile_encode_attr(mr->attr, attr_type, attr); - dbg(lvl_warning,"found\n"); + dbg(lvl_debug,"found\n"); return 1; } } - dbg(lvl_warning,"not found\n"); + dbg(lvl_debug,"not found\n"); return 0; } @@ -176,7 +176,7 @@ map_rect_new_textfile(struct map_priv *map, struct map_selection *sel) { struct map_rect_priv *mr; - dbg(lvl_warning,"enter\n"); + dbg(lvl_debug,"enter\n"); mr=g_new0(struct map_rect_priv, 1); mr->m=map; mr->sel=sel; @@ -204,7 +204,7 @@ map_rect_new_textfile(struct map_priv *map, struct map_selection *sel) } sel=sel->next; } - dbg(lvl_warning,"popen args %s\n", args); + dbg(lvl_debug,"popen args %s\n", args); mr->args=args; mr->f=popen(mr->args, "r"); mr->pos=0; @@ -245,7 +245,7 @@ static struct item * map_rect_get_item_textfile(struct map_rect_priv *mr) { char *p,type[TEXTFILE_LINE_SIZE]; - dbg(lvl_warning,"map_rect_get_item_textfile id_hi=%d line=%s", mr->item.id_hi, mr->line); + dbg(lvl_debug,"map_rect_get_item_textfile id_hi=%d line=%s", mr->item.id_hi, mr->line); if (!mr->f) { return NULL; } @@ -255,7 +255,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) } for(;;) { if (feof(mr->f)) { - dbg(lvl_warning,"map_rect_get_item_textfile: eof %d\n",mr->item.id_hi); + dbg(lvl_debug,"map_rect_get_item_textfile: eof %d\n",mr->item.id_hi); if (mr->m->flags & 1) { if (!mr->item.id_hi) return NULL; @@ -286,7 +286,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) get_line(mr); continue; } - dbg(lvl_warning,"map_rect_get_item_textfile: point found\n"); + dbg(lvl_debug,"map_rect_get_item_textfile: point found\n"); mr->eoc=0; mr->item.id_lo=mr->pos; } else { @@ -294,7 +294,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) get_line(mr); continue; } - dbg(lvl_warning,"map_rect_get_item_textfile: line found\n"); + dbg(lvl_debug,"map_rect_get_item_textfile: line found\n"); if (! mr->line[0]) { get_line(mr); continue; @@ -302,11 +302,11 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) mr->item.id_lo=mr->pos; strcpy(mr->attrs, mr->line); get_line(mr); - dbg(lvl_warning,"mr=%p attrs=%s\n", mr, mr->attrs); + dbg(lvl_debug,"mr=%p attrs=%s\n", mr, mr->attrs); } - dbg(lvl_warning,"get_attrs %s\n", mr->attrs); + dbg(lvl_debug,"get_attrs %s\n", mr->attrs); if (attr_from_line(mr->attrs,"type",NULL,type,NULL)) { - dbg(lvl_warning,"type='%s'\n", type); + dbg(lvl_debug,"type='%s'\n", type); mr->item.type=item_from_name(type); if (mr->item.type == type_none) dbg(lvl_error, "Warning: type '%s' unknown\n", type); @@ -316,7 +316,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) } mr->attr_last=attr_none; mr->more=1; - dbg(lvl_warning,"return attr='%s'\n", mr->attrs); + dbg(lvl_debug,"return attr='%s'\n", mr->attrs); return &mr->item; } } @@ -362,7 +362,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_ char **wexp_data; if (! data) return NULL; - dbg(lvl_warning,"map_new_textfile %s\n", data->u.str); + dbg(lvl_debug,"map_new_textfile %s\n", data->u.str); wdata=g_strdup(data->u.str); len=strlen(wdata); if (len && wdata[len-1] == '|') { @@ -380,7 +380,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_ m->no_warning_if_map_file_missing=(no_warn!=NULL) && (no_warn->u.num); if (flags) m->flags=flags->u.num; - dbg(lvl_warning,"map_new_textfile %s %s\n", m->filename, wdata); + dbg(lvl_debug,"map_new_textfile %s %s\n", m->filename, wdata); if (charset) { m->charset=g_strdup(charset->u.str); meth->charset=m->charset; @@ -393,7 +393,7 @@ map_new_textfile(struct map_methods *meth, struct attr **attrs, struct callback_ void plugin_init(void) { - dbg(lvl_warning,"textfile: plugin_init\n"); + dbg(lvl_debug,"textfile: plugin_init\n"); plugin_register_map_type("textfile", map_new_textfile); } |