diff options
author | Joseph Herlant <aerostitch@users.noreply.github.com> | 2018-04-26 10:12:26 -0700 |
---|---|---|
committer | jkoan <jkoan@users.noreply.github.com> | 2018-04-26 19:12:26 +0200 |
commit | 221f783ea1caaaab2f5ceadc6b0fb3e720aac3df (patch) | |
tree | 1ecf89faa1dfa550477669b05ef5c36e9864f68a /navit/map | |
parent | 011bb15468b4cb626e9facecba924b04bd494d7f (diff) | |
download | navit-221f783ea1caaaab2f5ceadc6b0fb3e720aac3df.tar.gz |
Fix:debug:Change line separators for dbg to work also on win* platform (#546)
* Fix:debug:Change line separators for dbg to work also on win* platform
* Fix:debug:Break multiline dbg statements to use the new model
* Fix:debug:Move the EOL into debug_vprintf
Diffstat (limited to 'navit/map')
-rw-r--r-- | navit/map/binfile/binfile.c | 184 | ||||
-rw-r--r-- | navit/map/csv/csv.c | 42 | ||||
-rw-r--r-- | navit/map/csv/quadtree.c | 26 | ||||
-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 | 36 | ||||
-rw-r--r-- | navit/map/mg/poly.c | 6 | ||||
-rw-r--r-- | navit/map/mg/street.c | 78 | ||||
-rw-r--r-- | navit/map/mg/town.c | 16 | ||||
-rw-r--r-- | navit/map/mg/tree.c | 52 | ||||
-rw-r--r-- | navit/map/shapefile/shapefile.c | 26 | ||||
-rw-r--r-- | navit/map/textfile/textfile.c | 46 |
12 files changed, 268 insertions, 268 deletions
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c index 93cbbd466..cd6fec8dc 100644 --- a/navit/map/binfile/binfile.c +++ b/navit/map/binfile/binfile.c @@ -240,9 +240,9 @@ 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_debug,"sig 0x%x\n", eoc->zipesig); + dbg(lvl_debug,"sig 0x%x", eoc->zipesig); if (eoc->zipesig != zip_eoc_sig) { - dbg(lvl_error,"map file %s: eoc signature check failed: 0x%x vs 0x%x\n", fi->name, eoc->zipesig,zip_eoc_sig); + dbg(lvl_error,"map file %s: eoc signature check failed: 0x%x vs 0x%x", fi->name, eoc->zipesig,zip_eoc_sig); file_data_free(fi,(unsigned char *)eoc); eoc=NULL; } @@ -258,20 +258,20 @@ 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_debug,"sig 0x%x\n", eocl->zip64lsig); + dbg(lvl_debug,"sig 0x%x", eocl->zip64lsig); if (eocl->zip64lsig != zip64_eocl_sig) { file_data_free(fi,(unsigned char *)eocl); - dbg(lvl_warning,"map file %s: eocl wrong\n", fi->name); + dbg(lvl_warning,"map file %s: eocl wrong", fi->name); return NULL; } eoc=(struct zip64_eoc *)file_data_read(fi,eocl->zip64lofst, sizeof(struct zip64_eoc)); if (eoc) { if (eoc->zip64esig != zip64_eoc_sig) { file_data_free(fi,(unsigned char *)eoc); - dbg(lvl_warning,"map file %s: eoc wrong\n", fi->name); + dbg(lvl_warning,"map file %s: eoc wrong", fi->name); eoc=NULL; } - dbg(lvl_debug,"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 "",eoc->zip64eofst,eoc->zip64ecsz); } file_data_free(fi,(unsigned char *)eocl); return eoc; @@ -296,9 +296,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_debug,"cd at "LONGLONG_FMT" %zu bytes\n",cdoffset+offset, sizeof(*cd)+len); + dbg(lvl_debug,"cd at "LONGLONG_FMT" %zu bytes",cdoffset+offset, sizeof(*cd)+len); cd_to_cpu(cd); - dbg(lvl_debug,"sig 0x%x\n", cd->zipcensig); + dbg(lvl_debug,"sig 0x%x", cd->zipcensig); if (cd->zipcensig != zip_cd_sig) { file_data_free(m->fi,(unsigned char *)cd); cd=NULL; @@ -375,7 +375,7 @@ binfile_read_content(struct map_priv *m, struct file *fi, long long offset, stru ret=file_data_read_compressed(fi,offset, lfh->zipsize, lfh->zipuncmp); break; default: - dbg(lvl_error,"map file %s: unknown compression method %d\n", fi->name, lfh->zipmthd); + dbg(lvl_error,"map file %s: unknown compression method %d", fi->name, lfh->zipmthd); } return ret; } @@ -389,7 +389,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_debug,"end=%d\n",end); + dbg(lvl_debug,"end=%d",end); #endif while (offset < end) { cd=(struct zip_cd *)(m->search_data+offset-m->search_offset); @@ -399,7 +399,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_debug,"reload %p %d %d\n", m->search_data, m->search_offset, offset); + dbg(lvl_debug,"reload %p %d %d", m->search_data, m->search_offset, offset); #endif if (m->search_data) file_data_free(m->fi,m->search_data); @@ -411,8 +411,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_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); + dbg(lvl_debug,"offset=%d search_offset=%d search_size=%d search_data=%p cd=%p", offset, m->search_offset, m->search_size, m->search_data, cd); + dbg(lvl_debug,"offset=%d fn='%s'",offset,cd->zipcfn); #endif if (!skip && (partial || cd->zipcfnl == len) && @@ -428,7 +428,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_debug,"map_destroy_binfile\n"); + dbg(lvl_debug,"map_destroy_binfile"); if (m->fi) map_binfile_close(m); map_binfile_destroy(m); @@ -523,7 +523,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_debug,"fopen '%s'\n", full); + dbg(lvl_debug,"fopen '%s'", full); f=fopen(full,"w"); fwrite(start, lfh->zipuncmp, 1, f); fclose(f); @@ -569,7 +569,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_debug,"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", t->pos_attr-1, attr_to_name(type), size); } attr->type=type; if (ATTR_IS_GROUP(type)) { @@ -647,13 +647,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_debug,"id 0x%x,0x%x\n",entry->id.id_hi,entry->id.id_lo); + dbg(lvl_debug,"id 0x%x,0x%x",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_debug,"ret %p\n",ret); + dbg(lvl_debug,"ret %p",ret); return ret; } @@ -668,15 +668,15 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode { int *i=t->pos,j=0; - dbg(lvl_debug,"Before: pos_coord=%td\n",t->pos_coord-i); + dbg(lvl_debug,"Before: pos_coord=%td",t->pos_coord-i); while (i < t->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",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_debug,"coffset=%d clen=%d\n",coffset,clen); + dbg(lvl_debug,"coffset=%d clen=%d",coffset,clen); switch (mode) { case change_mode_delete: if (count*2 > clen) @@ -713,7 +713,7 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode default: return 0; } - dbg(lvl_debug,"delta %d\n",delta); + dbg(lvl_debug,"delta %d",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); @@ -725,18 +725,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_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); + dbg(lvl_debug,"moving %d ints from offset %td to %td",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_debug,"After move: pos_coord=%td\n",tn->pos_coord-i); + dbg(lvl_debug,"After move: pos_coord=%td",tn->pos_coord-i); while (i < tn->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",j++,*i++); } if (mode != change_mode_append) tn->pos_coord+=move_offset; if (mode != change_mode_delete) { - dbg(lvl_debug,"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",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; @@ -745,9 +745,9 @@ binfile_coord_set(void *priv_data, struct coord *c, int count, enum change_mode } { int *i=tn->pos,j=0; - dbg(lvl_debug,"After: pos_coord=%td\n",tn->pos_coord-i); + dbg(lvl_debug,"After: pos_coord=%td",tn->pos_coord-i); while (i < tn->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",j++,*i++); } return 1; } @@ -764,9 +764,9 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) { int *i=t->pos,j=0; - dbg(lvl_debug,"Before: pos_attr=%td\n",t->pos_attr-i); + dbg(lvl_debug,"Before: pos_attr=%td",t->pos_attr-i); while (i < t->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",j++,*i++); } @@ -777,7 +777,7 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) oattr_len=0; if (!naoffset) { if (mode == change_mode_delete || mode == change_mode_modify) { - dbg(lvl_error,"no attribute selected\n"); + dbg(lvl_error,"no attribute selected"); return 0; } if (mode == change_mode_append) @@ -785,7 +785,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_debug,"len %d\n",oattr_len); + dbg(lvl_debug,"len %d",oattr_len); write_offset=offset; offset+=oattr_len; } @@ -818,7 +818,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_debug,"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",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; @@ -829,20 +829,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_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); + dbg(lvl_debug,"attr start %td offset %d",tn->pos_attr_start-data,offset); + dbg(lvl_debug,"moving %d ints from offset %td to %td",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_debug,"After move: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After move: pos_attr=%td",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",j++,*i++); } if (nattr_len) { int *nattr=tn->pos_attr_start+write_offset; - dbg(lvl_debug,"writing %d ints at %td\n",nattr_len,nattr-data); + dbg(lvl_debug,"writing %d ints at %td",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); @@ -850,11 +850,11 @@ binfile_attr_set(void *priv_data, struct attr *attr, enum change_mode mode) } { int *i=tn->pos,j=0; - dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After: pos_attr=%td",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_debug,"After: pos_attr=%td\n",tn->pos_attr-i); + dbg(lvl_debug,"After: pos_attr=%td",tn->pos_attr-i); while (i < tn->pos_next) - dbg(lvl_debug,"%d:0x%x\n",j++,*i++); + dbg(lvl_debug,"%d:0x%x",j++,*i++); } return 1; } @@ -891,7 +891,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_debug,"leave %d\n",mr->t->zipfile_num); + dbg(lvl_debug,"leave %d",mr->t->zipfile_num); #endif #endif mr->t=&mr->tiles[--mr->tile_depth-1]; @@ -906,8 +906,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_debug,"enter %p %p %p\n", m, cd, t); - dbg(lvl_debug,"cd->zipofst=0x"LONGLONG_HEX_FMT "\n", binfile_cd_offset(cd)); + dbg(lvl_debug,"enter %p %p %p", m, cd, t); + dbg(lvl_debug,"cd->zipofst=0x"LONGLONG_HEX_FMT "", binfile_cd_offset(cd)); t->start=NULL; t->mode=1; if (m->fis) @@ -938,7 +938,7 @@ map_binfile_handle_redirect(struct map_priv *m) if (m->redirect) return 0; m->redirect=1; - dbg(lvl_debug,"redirected from %s to %s\n",m->url,location); + dbg(lvl_debug,"redirected from %s to %s",m->url,location); g_free(m->url); m->url=g_strdup(location); file_destroy(m->http); @@ -987,7 +987,7 @@ map_binfile_download_size(struct map_priv *m) } while (map_binfile_handle_redirect(m)); ret=file_size(m->http); - dbg(lvl_debug,"file size "LONGLONG_FMT"\n",ret); + dbg(lvl_debug,"file size "LONGLONG_FMT"",ret); return ret; } @@ -1033,7 +1033,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_debug,"size %d vs %d\n",size,size_ret); + dbg(lvl_debug,"size %d vs %d",size,size_ret); g_free(ret); return NULL; } @@ -1047,7 +1047,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_debug,"needed cd, result %p\n",cd); + dbg(lvl_debug,"needed cd, result %p",cd); return cd; } @@ -1061,7 +1061,7 @@ download_request(struct map_download *download) if(!download->m->download_enabled) { - dbg(lvl_error,"Tried downloading while it's not allowed\n"); + dbg(lvl_error,"Tried downloading while it's not allowed"); return 0; } attrs[0]=&url; @@ -1080,7 +1080,7 @@ download_request(struct map_download *download) attrs[3]=NULL; download->dl_size=size; } - 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); + dbg(lvl_debug,"encountered missing tile %d %s(%s), Downloading %d bytes at "LONGLONG_FMT"",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; @@ -1128,7 +1128,7 @@ download_download(struct map_download *download) return 0; } - dbg(lvl_debug,"got %d bytes writing at offset "LONGLONG_FMT"\n",size_ret,download->offset); + dbg(lvl_debug,"got %d bytes writing at offset "LONGLONG_FMT"",size_ret,download->offset); if (size_ret <= 0) { g_free(data); return 1; @@ -1170,7 +1170,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_debug,"Offset %d\n",download->cd->zipofst); + dbg(lvl_debug,"Offset %d",download->cd->zipofst); return 1; } @@ -1178,7 +1178,7 @@ static int download_planet_size(struct map_download *download) { download->size=map_binfile_download_size(download->m); - dbg(lvl_debug,"Planet size "LONGLONG_FMT"\n",download->size); + dbg(lvl_debug,"Planet size "LONGLONG_FMT"",download->size); if (!download->size) return 0; return 1; @@ -1194,7 +1194,7 @@ download_eoc(struct map_download *download) download->zip_eoc=(struct zip_eoc *)(download->zip64_eocl+1); if (download->zip64_eoc->zip64esig != zip64_eoc_sig || download->zip64_eocl->zip64lsig != zip64_eocl_sig || download->zip_eoc->zipesig != zip_eoc_sig) { - dbg(lvl_error,"wrong signature on zip64_eoc downloaded from "LONGLONG_FMT"\n",download->size-98); + dbg(lvl_error,"wrong signature on zip64_eoc downloaded from "LONGLONG_FMT"",download->size-98); g_free(download->zip64_eoc); return 0; } @@ -1221,11 +1221,11 @@ 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_debug,"size_ret=%d\n",size_ret); + dbg(lvl_debug,"size_ret=%d",size_ret); if (!size_ret) return 0; if (size_ret != sizeof(*cd) || cd->zipcensig != zip_cd_sig) { - dbg(lvl_error,"error1 size=%d vs %zu\n",size_ret, sizeof(*cd)); + dbg(lvl_error,"error1 size=%d vs %zu",size_ret, sizeof(*cd)); return 0; } file_data_write(download->file, download->offset, sizeof(*cd), (unsigned char *)cd); @@ -1233,7 +1233,7 @@ download_directory_do(struct map_download *download) cd_xlen=cd->zipcfnl+cd->zipcxtl; cd_data=file_data_read_special(download->http, cd_xlen, &size_ret); if (size_ret != cd_xlen) { - dbg(lvl_error,"error2 size=%d vs %d\n",size_ret,cd_xlen); + dbg(lvl_error,"error2 size=%d vs %d",size_ret,cd_xlen); return 0; } file_data_write(download->file, download->offset, cd_xlen, cd_data); @@ -1278,14 +1278,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_debug,"enter %p %d\n", mr, zipfile); + dbg(lvl_debug,"enter %p %d", 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_debug,"enter %d (%s) %d\n",zipfile, filename, cd->zipcunc); + dbg(lvl_debug,"enter %d (%s) %d",zipfile, filename, cd->zipcunc); } #endif mr->size+=cd->zipcunc; @@ -1341,10 +1341,10 @@ download(struct map_priv *m, struct map_rect_priv *mr, struct zip_cd *cd, int zi return NULL; } for (;;) { - dbg(lvl_debug,"state=%d\n",download->state); + dbg(lvl_debug,"state=%d",download->state); switch (download->state) { case 0: - dbg(lvl_error,"error\n"); + dbg(lvl_error,"error"); break; case 1: if (download_start(download)) @@ -1394,7 +1394,7 @@ download(struct map_priv *m, struct map_rect_priv *mr, struct zip_cd *cd, int zi if (download_eoc(download)) download->state=6; else { - dbg(lvl_error,"download of eoc failed\n"); + dbg(lvl_error,"download of eoc failed"); download->state=0; } break; @@ -1443,7 +1443,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_debug,"read from "LONGLONG_FMT" %d bytes\n",cdoffset + zipfile*m->cde_size, m->cde_size); + dbg(lvl_debug,"read from "LONGLONG_FMT" %d bytes",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); @@ -1460,7 +1460,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_debug,"map_rect_new_binfile\n"); + dbg(lvl_debug,"map_rect_new_binfile"); if (!map->fi && !map->url) return NULL; map_binfile_http_close(map); @@ -1548,7 +1548,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_debug,"zip_members=%d\n", map->zip_members); + dbg(lvl_debug,"zip_members=%d", map->zip_members); if (map->url && map->fi && sel && sel->order == 255) { map_download_selection(map, mr, sel); } @@ -1580,7 +1580,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_debug,"yes\n"); + dbg(lvl_debug,"yes"); } } @@ -1633,7 +1633,7 @@ map_rect_destroy_binfile(struct map_rect_priv *mr) write_changes(mr->m); while (pop_tile(mr)); #ifdef DEBUG_SIZE - dbg(lvl_debug,"size=%d kb\n",mr->size/1024); + dbg(lvl_debug,"size=%d kb",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)); @@ -1649,11 +1649,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_debug,"size=0x%x\n", size); + dbg(lvl_debug,"size=0x%x", size); #if 0 fprintf(stderr,"offset=%d\n", (unsigned char *)(mr->pos)-mr->m->f->begin); #endif - dbg(lvl_debug,"size error\n"); + dbg(lvl_debug,"size error"); } t->pos_next=t->pos+size+1; mr->item.type=le32_to_cpu(t->pos[1]); @@ -1671,7 +1671,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_debug,"min %d max %d order %d\n", mima->min, mima->max, order); + dbg(lvl_debug,"min %d max %d order %d", mima->min, mima->max, order); if (!mima->min && !mima->max) return 1; if (order >= mima->min && order <= mima->max) @@ -1703,13 +1703,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_debug,"Skipping index item with first_key='%s'\n", af.u.str); + dbg(lvl_debug,"Skipping index item with first_key='%s'", 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_debug,"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'", af.u.str, al.u.str); return; } } @@ -1744,7 +1744,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_debug,"pushing zipfile %ld from %d\n", at.u.num, mr->t->zipfile_num); + dbg(lvl_debug,"pushing zipfile %ld from %d", at.u.num, mr->t->zipfile_num); return push_zipfile_tile(mr, at.u.num, 0, 0, async); } @@ -2110,12 +2110,12 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, if (town) msp->mr = binmap_search_street_by_place(map, town, &c, &msp->ms, &msp->boundaries); if (msp->boundaries) - dbg(lvl_debug, "using map town boundaries\n"); + dbg(lvl_debug, "using map town boundaries"); if (!msp->boundaries && town) { binmap_get_estimated_boundaries(town, &msp->boundaries); if (msp->boundaries) - dbg(lvl_debug, "using estimated boundaries\n"); + dbg(lvl_debug, "using estimated boundaries"); } map_rect_destroy_binfile(map_rec); /* start searching in area around the street segment even if town boundaries are available */ @@ -2124,7 +2124,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_debug,"pn=%s\n",msp->parent_name); + dbg(lvl_debug,"pn=%s",msp->parent_name); } } if (idx != 3) { @@ -2435,7 +2435,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_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); + dbg(lvl_debug,"Extended house number search region to %d x %d, restarting...",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; } } @@ -2567,7 +2567,7 @@ map_binfile_zip_setup(struct map_priv *m, char *filename, int mmap) struct zip_cd *first_cd; int i; if (!(m->eoc=binfile_read_eoc(m->fi))) { - dbg(lvl_error,"map file %s: unable to read eoc\n", filename); + dbg(lvl_error,"map file %s: unable to read eoc", filename); return 0; } dbg_assert(m->eoc->zipedsk == m->eoc->zipecen); @@ -2583,20 +2583,20 @@ 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_debug,"num_disk %d\n",m->eoc->zipedsk); + dbg(lvl_debug,"num_disk %d",m->eoc->zipedsk); m->eoc64=binfile_read_eoc64(m->fi); if (!binfile_get_index(m)) { - dbg(lvl_error,"map file %s: no index found\n", filename); + dbg(lvl_error,"map file %s: no index found", filename); return 0; } if (!(first_cd=binfile_read_cd(m, 0, 0))) { - dbg(lvl_error,"map file %s: unable to get first cd\n", filename); + dbg(lvl_error,"map file %s: unable to get first cd", filename); return 0; } 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_debug,"cde_size %d\n", m->cde_size); - dbg(lvl_debug,"members %d\n",m->zip_members); + dbg(lvl_debug,"cde_size %d", m->cde_size); + dbg(lvl_debug,"members %d",m->zip_members); file_data_free(m->fi, (unsigned char *)first_cd); if (mmap) file_mmap(m->fi); @@ -2695,12 +2695,12 @@ map_binfile_open(struct map_priv *m) struct attr readwrite={attr_readwrite, {(void *)1}}; struct attr *attrs[]={&readwrite, NULL}; - dbg(lvl_debug,"file_create %s\n", m->filename); + dbg(lvl_debug,"file_create %s", m->filename); m->fi=file_create(m->filename, m->url?attrs:NULL); if (! m->fi && m->url) return 0; if (! m->fi) { - dbg(lvl_error,"Failed to load '%s'\n", m->filename); + dbg(lvl_error,"Failed to load '%s'", m->filename); return 0; } if (m->check_version) @@ -2714,13 +2714,13 @@ map_binfile_open(struct map_priv *m) *magic = le32_to_cpu(*magic); if (*magic == zip_lfh_sig || *magic == zip_split_sig || *magic == zip_cd_sig || *magic == zip64_eoc_sig) { if (!map_binfile_zip_setup(m, m->filename, m->flags & 1)) { - dbg(lvl_error,"invalid file format for '%s'\n", m->filename); + dbg(lvl_error,"invalid file format for '%s'", m->filename); file_destroy(m->fi); m->fi=NULL; return 0; } } else if (*magic == zip_lfh_sig_rev || *magic == zip_split_sig_rev || *magic == zip_cd_sig_rev || *magic == zip64_eoc_sig_rev) { - dbg(lvl_error,"endianness mismatch for '%s'\n", m->filename); + dbg(lvl_error,"endianness mismatch for '%s'", m->filename); file_destroy(m->fi); m->fi=NULL; return 0; @@ -2738,7 +2738,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_debug,"url config %s map %s\n",m->url,attr.u.str); + dbg(lvl_debug,"url config %s map %s",m->url,attr.u.str); if (strcmp(m->url, attr.u.str)) m->update_available=1; g_free(m->url); @@ -2747,7 +2747,7 @@ map_binfile_open(struct map_priv *m) } map_rect_destroy_binfile(mr); if (m->map_version >= 16) { - dbg(lvl_error,"%s: This map is incompatible with your navit version. Please update navit. (map version %d)\n", + dbg(lvl_error,"%s: This map is incompatible with your navit version. Please update navit. (map version %d)", m->filename, m->map_version); return 0; } @@ -2811,7 +2811,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_debug,"map_new_binfile %s\n", data->u.str); + dbg(lvl_debug,"map_new_binfile %s", data->u.str); *meth=map_methods_binfile; m=g_new0(struct map_priv, 1); @@ -2844,9 +2844,9 @@ map_new_binfile(struct map_methods *meth, struct attr **attrs, struct callback_l void plugin_init(void) { - dbg(lvl_debug,"binfile: plugin_init\n"); + dbg(lvl_debug,"binfile: plugin_init"); if (sizeof(struct zip_cd) != 46) { - dbg(lvl_error,"error: sizeof(struct zip_cd)=%zu\n",sizeof(struct zip_cd)); + dbg(lvl_error,"error: sizeof(struct zip_cd)=%zu",sizeof(struct zip_cd)); } plugin_register_category_map("binfile", map_new_binfile); } diff --git a/navit/map/csv/csv.c b/navit/map/csv/csv.c index 0477f7fdf..3ee2d6239 100644 --- a/navit/map/csv/csv.c +++ b/navit/map/csv/csv.c @@ -127,11 +127,11 @@ save_map_csv(struct map_priv *m) } else if(ATTR_IS_STRING(*at)) { tmpstr = g_strdup(found_attr->u.str); } else { - dbg(lvl_error,"Cant represent attribute %s\n",attr_to_name(*at)); + dbg(lvl_error,"Cant represent attribute %s",attr_to_name(*at)); tmpstr=g_strdup(""); } } else { - dbg(lvl_debug,"No value defined for the attribute %s, assuming empty string\n",attr_to_name(*at)); + dbg(lvl_debug,"No value defined for the attribute %s, assuming empty string",attr_to_name(*at)); tmpstr=g_strdup(""); } } @@ -150,7 +150,7 @@ save_map_csv(struct map_priv *m) if(m->charset) { tmpstr=g_convert(csv_line, -1,m->charset,"utf-8",NULL,NULL,NULL); if(!tmpstr) - dbg(lvl_error,"Error converting '%s' to %s\n",csv_line, m->charset); + dbg(lvl_error,"Error converting '%s' to %s",csv_line, m->charset); } else tmpstr=csv_line; @@ -182,7 +182,7 @@ static const int zoom_max = 18; static void map_destroy_csv(struct map_priv *m) { - dbg(lvl_debug,"map_destroy_csv\n"); + dbg(lvl_debug,"map_destroy_csv"); /*save if changed */ save_map_csv(m); g_hash_table_destroy(m->qitem_hash); @@ -356,10 +356,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_debug,"Enter %d\n", type); + dbg(lvl_debug,"Enter %d", type); if(!mr || !mr->qitem) { - dbg(lvl_debug,"Nothing to do\n"); + dbg(lvl_debug,"Nothing to do"); return 0; } @@ -367,7 +367,7 @@ csv_type_set(void *priv_data, enum item_type type) return 0; mr->qitem->deleted=1; - dbg(lvl_debug,"Item %p is deleted\n",mr->qitem); + dbg(lvl_debug,"Item %p is deleted",mr->qitem); return 1; } @@ -396,7 +396,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_debug,"Set coordinates %d %d\n", c->x, c->y); + dbg(lvl_debug,"Set coordinates %d %d", c->x, c->y); /* for now we only support coord modification only */ if( ! change_mode_modify) { @@ -431,7 +431,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_debug,"Set coordinates %f %f\n", cg.lng, cg.lat); + dbg(lvl_debug,"Set coordinates %f %f", cg.lng, cg.lat); m->new_items = g_list_remove_link(m->new_items,new_it); m->dirty=1; save_map_csv(m); @@ -494,11 +494,11 @@ static void map_csv_debug_dump_hash_item(gpointer key, gpointer value, gpointer { struct quadtree_item *qi=value; GList *attrs; - dbg(lvl_debug,"%p del=%d ref=%d\n", qi,qi->deleted, qi->ref_count); + dbg(lvl_debug,"%p del=%d ref=%d", qi,qi->deleted, qi->ref_count); attrs=((struct quadtree_data *)qi->data)->attr_list; while(attrs) { if(((struct attr*)attrs->data)->type==attr_label) - dbg(lvl_debug,"... %s\n",((struct attr*)attrs->data)->u.str); + dbg(lvl_debug,"... %s",((struct attr*)attrs->data)->u.str); attrs=g_list_next(attrs); } } @@ -519,7 +519,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_debug,"map_rect_new_csv\n"); + dbg(lvl_debug,"map_rect_new_csv"); if(debug_level_get("map_csv")>2) { map_csv_debug_dump(map); } @@ -726,7 +726,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_debug,"charset:%s\n",charset->u.str); + dbg(lvl_debug,"charset:%s",charset->u.str); m->charset=g_strdup(charset->u.str); } else { m->charset=g_strdup(map_methods_csv.charset); @@ -758,7 +758,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_debug,"map_new_csv %s\n", data->u.str); + dbg(lvl_debug,"map_new_csv %s", data->u.str); m->filename=g_strdup(wexp_data[0]); file_wordexp_destroy(wexp); @@ -775,7 +775,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list int col_cnt=0; char *tok; if(!line) { - dbg(lvl_error,"Error converting '%s' to utf-8 from %s\n",linebuf, m->charset); + dbg(lvl_error,"Error converting '%s' to utf-8 from %s",linebuf, m->charset); continue; } if(line[strlen(line)-1]=='\n' || line[strlen(line)-1]=='\r') { @@ -848,7 +848,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_debug,"%s\n",line); + dbg(lvl_debug,"%s",line); } else { g_free(curr_item); @@ -856,7 +856,7 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list } else { - dbg(lvl_error,"ERROR: Non-matching attr count and column count: %d %d SKIPPING line: %s\n",col_cnt, attr_cnt,line); + dbg(lvl_error,"ERROR: Non-matching attr count and column count: %d %d SKIPPING line: %s",col_cnt, attr_cnt,line); } g_free(line); g_free(line2); @@ -865,21 +865,21 @@ map_new_csv(struct map_methods *meth, struct attr **attrs, struct callback_list fclose(fp); } else { - dbg(lvl_error,"Error opening csv map file '%s': %s\n", m->filename, strerror(errno)); + dbg(lvl_error,"Error opening csv map file '%s': %s", m->filename, strerror(errno)); return NULL; } } else { - dbg(lvl_debug,"No data attribute, starting with in-memory map\n"); + dbg(lvl_debug,"No data attribute, starting with in-memory map"); } - dbg(lvl_info,"%p\n",tree_root); + dbg(lvl_info,"%p",tree_root); return m; } void plugin_init(void) { - dbg(lvl_debug,"csv: plugin_init\n"); + dbg(lvl_debug,"csv: plugin_init"); plugin_register_category_map("csv", map_new_csv); } diff --git a/navit/map/csv/quadtree.c b/navit/map/csv/quadtree.c index ca6068541..32d075a3d 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_debug,"Processing unreferenced subnode children...\n"); + dbg(lvl_debug,"Processing unreferenced subnode children..."); for(i=0,j=0;i<node_num;i++) { if(node->items[i]->deleted && !node->items[i]->ref_count) { if(iter->item_free) { @@ -426,7 +426,7 @@ quadtree_add(struct quadtree_node* this_, struct quadtree_item* item, struct qua } if (bSame) { //FIXME: memleak and items thrown away if more than QUADTREE_NODE_CAPACITY-1 items with same coordinates added. - dbg(lvl_error,"Unable to add another item with same coordinates. Throwing item to the ground. Will leak %p.\n",item); + dbg(lvl_error,"Unable to add another item with same coordinates. Throwing item to the ground. Will leak %p.",item); return; } this_->items[this_->node_num++] = item; @@ -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_debug,"%f %f %f %f\n",dXMin,dXMax,dYMin,dYMax) + dbg(lvl_debug,"%f %f %f %f",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_debug,"Query %p \n",this_) + dbg(lvl_debug,"Query %p ",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_debug,"find item %p %p ...\n",iter->iter_nodes,iter->iter_nodes->data); + dbg(lvl_debug,"find item %p %p ...",iter->iter_nodes,iter->iter_nodes->data); while(iter_node->item<iter_node->node_num) { - dbg(lvl_debug,"%d %d\n",iter_node->item,iter_node->items[iter_node->item]->deleted); + dbg(lvl_debug,"%d %d",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_debug,"Returning %p\n",iter->item); + dbg(lvl_debug,"Returning %p",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_debug,"%f %f %f %f\n",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax) + dbg(lvl_debug,"%f %f %f %f",nodes[i]->xmin, nodes[i]->xmax, nodes[i]->ymin, nodes[i]->ymax) subnode=nodes[i]; } if(subnode) { /* Go one level deeper */ - dbg(lvl_debug,"Go one level deeper...\n"); + dbg(lvl_debug,"Go one level deeper..."); 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_debug,"Going to delete an empty unreferenced leaf subnode...\n"); + dbg(lvl_debug,"Going to delete an empty unreferenced leaf subnode..."); if(subnode->parent) { if(subnode->parent->aa==subnode) { @@ -704,19 +704,19 @@ struct quadtree_item * quadtree_item_next(struct quadtree_iter *iter) } else if(subnode->parent->bb==subnode) { subnode->parent->bb=NULL; } else { - dbg(lvl_error,"Found Quadtree structure corruption while trying to free an empty node.\n"); + dbg(lvl_error,"Found Quadtree structure corruption while trying to free an empty node."); } if(!subnode->parent->aa && !subnode->parent->ab && !subnode->parent->ba && !subnode->parent->bb ) subnode->parent->is_leaf=1; g_free(subnode); } else - dbg(lvl_debug,"Quadtree is empty. NOT deleting the root subnode...\n"); + dbg(lvl_debug,"Quadtree is empty. NOT deleting the root subnode..."); } /* Go one step towards root */ - dbg(lvl_info,"Going towards root...\n"); + dbg(lvl_info,"Going towards root..."); g_free(iter->iter_nodes->data); iter->iter_nodes=g_list_delete_link(iter->iter_nodes,iter->iter_nodes); } diff --git a/navit/map/filter/filter.c b/navit/map/filter/filter.c index cecae7fc0..78d09e5b9 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); return NULL; } static struct item * map_filter_search_get_item(struct map_search_priv *map_search) { - dbg(lvl_debug,"enter\n"); + dbg(lvl_debug,"enter"); return NULL; } static void map_filter_search_destroy(struct map_search_priv *ms) { - dbg(lvl_debug,"enter\n"); + dbg(lvl_debug,"enter"); } 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_debug,"filter: plugin_init\n"); + dbg(lvl_debug,"filter: plugin_init"); plugin_register_category_map("filter", map_filter_new); } diff --git a/navit/map/mg/block.c b/navit/map/mg/block.c index b2bb64ac0..7e7326908 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_debug,"idx=%d\n", idx); + dbg(lvl_debug,"idx=%d", 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_debug,"end of blocks %p vs %p\n", mr->b.p, mr->file->end); + dbg(lvl_debug,"end of blocks %p vs %p", mr->b.p, mr->file->end); return 0; } mr->b.block_start=mr->b.p; @@ -185,17 +185,17 @@ block_next_lin(struct map_rect_priv *mr) mr->b.p_start=mr->b.p; mr->b.end=mr->b.block_start+block_get_size(mr->b.b); if (block_get_count(mr->b.b) == -1) { - dbg(lvl_warning,"empty blocks\n"); + dbg(lvl_warning,"empty blocks"); return 0; } block_get_r(mr->b.b, &r); 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_debug,"block ok\n"); + dbg(lvl_debug,"block ok"); return 1; } - dbg(lvl_info,"block not in cur_sel\n"); + dbg(lvl_info,"block not in cur_sel"); } } @@ -210,14 +210,14 @@ block_next(struct map_rect_priv *mr) return block_next_lin(mr); for (;;) { if (! bt->p) { - dbg(lvl_debug,"block 0x%x\n", bt->next); + dbg(lvl_debug,"block 0x%x", 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_debug,"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", block_get_size(bt->b), block_get_next(bt->b)); if (! mr->b.bt.block_count) { #if 0 if (debug) { diff --git a/navit/map/mg/map.c b/navit/map/mg/map.c index 13561e154..81d28a8f3 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_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); + dbg(lvl_debug,"lin_count %d idx_count %d active_count %d %d kB (%d kB)", 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_debug,"0x%x\n", *str); + dbg(lvl_debug,"0x%x", *str); *c++=*str; break; } @@ -375,11 +375,11 @@ static int map_search_setup(struct map_rect_priv *mr) { char *prefix; - dbg(lvl_debug,"%s\n", attr_to_name(mr->search_type)); + dbg(lvl_debug,"%s", attr_to_name(mr->search_type)); switch (mr->search_type) { case attr_town_postal: if (mr->search_item.type != type_country_label) { - dbg(lvl_error,"wrong parent type %s\n", item_to_name(mr->search_item.type)); + dbg(lvl_error,"wrong parent type %s", item_to_name(mr->search_item.type)); return 0; } prefix=mg_country_postal_prefix(mr->search_item.id_lo); @@ -388,12 +388,12 @@ 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_debug,"search_str='%s'\n",mr->search_str); + dbg(lvl_debug,"search_str='%s'",mr->search_str); mr->search_country=mg_country_from_isonum(mr->search_item.id_lo); break; case attr_town_name: if (mr->search_item.type != type_country_label) { - dbg(lvl_error,"wrong parent type %s\n", item_to_name(mr->search_item.type)); + dbg(lvl_error,"wrong parent type %s", item_to_name(mr->search_item.type)); return 0; } tree_search_init(mr->m->dirname, "town.b2", &mr->ts, 0x1000); @@ -403,7 +403,7 @@ map_search_setup(struct map_rect_priv *mr) break; case attr_district_name: if (mr->search_item.type != type_country_label) { - dbg(lvl_error,"wrong parent type %s\n", item_to_name(mr->search_item.type)); + dbg(lvl_error,"wrong parent type %s", item_to_name(mr->search_item.type)); return 0; } tree_search_init(mr->m->dirname, "town.b3", &mr->ts, 0x1000); @@ -434,11 +434,11 @@ map_search_setup(struct map_rect_priv *mr) return 0; } } else { - dbg(lvl_error,"wrong parent type %s %p 0x%x 0x%x\n", item_to_name(mr->search_item.type), item, mr->search_item.id_hi, mr->search_item.id_lo); + dbg(lvl_error,"wrong parent type %s %p 0x%x 0x%x", item_to_name(mr->search_item.type), item, mr->search_item.id_hi, mr->search_item.id_lo); return 0; } } - dbg(lvl_debug,"street_assoc=0x%x\n", mr->search_item.id_lo); + dbg(lvl_debug,"street_assoc=0x%x", 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); @@ -447,12 +447,12 @@ map_search_setup(struct map_rect_priv *mr) if (!map_priv_is(mr->search_item.map, mr->m)) return 0; if (!housenumber_search_setup(mr)) { - dbg(lvl_error,"failed to search for attr_house_number\n"); + dbg(lvl_error,"failed to search for attr_house_number"); return 0; } break; default: - dbg(lvl_error,"unknown search %s\n",attr_to_name(mr->search_type)); + dbg(lvl_error,"unknown search %s",attr_to_name(mr->search_type)); return 0; } mr->file=mr->m->file[mr->current_file]; @@ -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_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); + dbg(lvl_debug,"searching for %s '%s'", attr_to_name(search->type), search->u.str); + dbg(lvl_debug,"id_lo=0x%x", item->id_lo); + dbg(lvl_debug,"search=%s", search->u.str); mr->m=map; mr->search_attr=attr_dup(search); mr->search_type=search->type; @@ -480,7 +480,7 @@ map_search_new_mg(struct map_priv *map, struct item *item, struct attr *search, mr->search_type_next=attr_district_name; } if (!map_search_setup(mr)) { - dbg(lvl_warning,"map_search_new_mg failed\n"); + dbg(lvl_warning,"map_search_new_mg failed"); g_free(mr); return NULL; } @@ -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_debug,"mr=%p\n", mr); + dbg(lvl_debug,"mr=%p", mr); if (! mr) return; map_search_cleanup(mr); @@ -538,7 +538,7 @@ map_search_get_item_mg(struct map_search_priv *ms) ret=housenumber_search_get_item(mr); break; default: - dbg(lvl_error,"unknown search %s\n",attr_to_name(mr->search_type)); + dbg(lvl_error,"unknown search %s",attr_to_name(mr->search_type)); break; } if (!ret && mr->search_type_next != attr_none) { @@ -595,7 +595,7 @@ map_new_mg(struct map_methods *meth, struct attr **attrs, struct callback_list * if (! m->file[i]) { maybe_missing=(i == file_border_ply || i == file_height_ply || i == file_sea_ply); if (! maybe_missing) - dbg(lvl_error,"Failed to load %s\n", filename); + dbg(lvl_error,"Failed to load %s", filename); } else file_mmap(m->file[i]); g_free(filename); diff --git a/navit/map/mg/poly.c b/navit/map/mg/poly.c index 7c73d4587..b759301e3 100644 --- a/navit/map/mg/poly.c +++ b/navit/map/mg/poly.c @@ -225,7 +225,7 @@ poly_get(struct map_rect_priv *mr, struct poly_priv *poly, struct item *item) item->type=type_rail; break; default: - dbg(lvl_error,"Unknown poly type 0x%x '%s' 0x%x,0x%x\n", poly->type,poly->name,r.lu.x,r.lu.y); + dbg(lvl_error,"Unknown poly type 0x%x '%s' 0x%x,0x%x", poly->type,poly->name,r.lu.x,r.lu.y); item->type=type_street_unkn; } if (!map_selection_contains_item(mr->cur_sel, 0, item->type)) { @@ -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_debug,"%d %d %s\n", poly->subpoly_num_all, mr->b.block_num, poly->name); + dbg(lvl_debug,"%d %d %s", 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_debug,"0x%x 0x%x\n", item->id_lo, item->id_hi); + dbg(lvl_debug,"0x%x 0x%x", 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 6aad6e5a0..49f790e9c 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_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); + dbg(lvl_debug,"0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x", 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_debug,"enter 0x%x\n",segid); + dbg(lvl_debug,"enter 0x%x",segid); } #endif while (count > 0) { if (street_coord_get_helper(street, c)) { #ifdef DEBUG_COORD_GET if (debug) { - dbg(lvl_debug,"0x%x,0x%x\n", c->x, c->y); + dbg(lvl_debug,"0x%x,0x%x", 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_debug,"segid 0x%x\n", street_str_get_segid(street->str)); + dbg(lvl_debug,"segid 0x%x", street_str_get_segid(street->str)); attr->type=attr_type; switch (attr_type) { case attr_any: @@ -516,7 +516,7 @@ street_get(struct map_rect_priv *mr, struct street_priv *street, struct item *it break; default: item->type=type_street_unkn; - dbg(lvl_error,"unknown type 0x%x\n",street_str_get_type(street->str)); + dbg(lvl_error,"unknown type 0x%x",street_str_get_type(street->str)); } flags=item_get_default_flags(item->type); if (flags) @@ -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_debug,"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)", 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_debug,"res=0x%x (blk=0x%x)\n", res, res >> 12); + dbg(lvl_debug,"res=0x%x (blk=0x%x)", 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_debug,"segid 0x%x\n", street_str_get_segid(&street->str[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); @@ -620,7 +620,7 @@ latin1_tolower_ascii(unsigned char c) return 'u'; default: if (ret >= 0x80) - dbg(lvl_debug,"ret=0x%x\n",c); + dbg(lvl_debug,"ret=0x%x",c); return ret; } } @@ -663,26 +663,26 @@ street_search_compare_do(struct map_rect_priv *mr, int country, int town_assoc, int d,len; dbg(lvl_debug,"enter"); - dbg(lvl_debug,"country 0x%x town_assoc 0x%x name '%s'\n", country, town_assoc, name); + dbg(lvl_debug,"country 0x%x town_assoc 0x%x name '%s'", country, town_assoc, name); 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); + dbg(lvl_debug,"country %d (%d vs %d)", d, mr->search_item.id_hi & 0xffff, country); if (!d) { if (mr->search_item.id_lo == town_assoc ) { - dbg(lvl_debug,"town_assoc match (0x%x)\n", town_assoc); + dbg(lvl_debug,"town_assoc match (0x%x)", 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_debug,"string %d\n", d); + dbg(lvl_debug,"string %d", d); } else { if (town_assoc < mr->search_item.id_lo) d=1; else d=-1; - dbg(lvl_debug,"assoc %d 0x%x-0x%x\n",d, mr->search_item.id_lo, town_assoc); + dbg(lvl_debug,"assoc %d 0x%x-0x%x",d, mr->search_item.id_lo, town_assoc); } } - dbg(lvl_debug,"d=%d\n", d); + dbg(lvl_debug,"d=%d", 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); i=(struct street_name_index *)(*p); *p+=sizeof(*i)+strlen(i->name)+1; - dbg(lvl_debug,"block 0x%x\n", i->block); + dbg(lvl_debug,"block 0x%x", 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_debug,"aux_data=%p\n", p); + dbg(lvl_debug,"aux_data=%p", p); if (count) { street_name_numbers_get(&snns, &p); street_name_numbers_get_coord(&snns, c); @@ -801,7 +801,7 @@ street_name_attr_get(void *priv_data, enum attr_type attr_type, struct attr *att return 0; return item_attr_get(mr->search_item_tmp, attr_type, attr); default: - dbg(lvl_error,"unknown attr %s\n",attr_to_name(attr_type)); + dbg(lvl_error,"unknown attr %s",attr_to_name(attr_type)); return 0; } } @@ -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_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); + dbg(lvl_debug,"last %p map %p file %d begin %p", 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); if (! mr->search_blk_count) { - dbg(lvl_debug,"partial 0x%x '%s' ***\n", mr->town.street_assoc, mr->search_str); + dbg(lvl_debug,"partial 0x%x '%s' ***", mr->town.street_assoc, mr->search_str); if (mr->search_linear) return NULL; - dbg(lvl_debug,"tree_search_next\n"); + dbg(lvl_debug,"tree_search_next"); 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_debug,"dir=%d mr->search_block=0x%x\n", dir, mr->search_block); + dbg(lvl_debug,"dir=%d mr->search_block=0x%x", 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_debug,"name id %td\n", mr->b.p-mr->m->file[file_strname_stn]->begin); + dbg(lvl_debug,"name id %td", 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_debug,"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", 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_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); + dbg(lvl_debug,"country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d", mr->street.name.country, mr->street.name.townassoc, mr->street.name.name1, mr->street.name.name2, dir); if (dir < 0) { - dbg(lvl_debug,"end of data\n"); + dbg(lvl_debug,"end of data"); mr->search_blk_count=0; return NULL; } if (!dir) { - 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); + dbg(lvl_debug,"result country 0x%x assoc 0x%x name1 '%s' name2 '%s' dir=%d aux_data=%p len=0x%x", 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_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); + dbg(lvl_debug,"id 0x%x 0x%x last %p map %p file %d begin %p", 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_debug,"last %p\n",last); + dbg(lvl_debug,"last %p",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_debug,"%p vs %p\n",mr->street.name.tmp_data, mr->street.name.aux_data); + dbg(lvl_debug,"%p vs %p",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; } @@ -975,7 +975,7 @@ housenumber_attr_get(void *priv_data, enum attr_type attr_type, struct attr *att return 0; return item_attr_get(mr->search_item_tmp, attr_type, attr); default: - dbg(lvl_error,"unknown attr %s\n",attr_to_name(attr_type)); + dbg(lvl_error,"unknown attr %s",attr_to_name(attr_type)); return 0; } } @@ -991,20 +991,20 @@ static struct item_methods housenumber_meth = { int housenumber_search_setup(struct map_rect_priv *mr) { - dbg(lvl_debug,"enter (0x%x,0x%x)\n",mr->search_item.id_hi,mr->search_item.id_lo); + dbg(lvl_debug,"enter (0x%x,0x%x)",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_debug,"last %p\n",mr->b.p); + 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\n"); + dbg(lvl_debug,"loop"); 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_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); + dbg(lvl_debug,"getting name_number %p vs %p + %d",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_debug,"enter\n"); + dbg(lvl_debug,"enter"); // debug(mr); return 1; } @@ -1055,7 +1055,7 @@ struct item * housenumber_search_get_item(struct map_rect_priv *mr) { int d; - dbg(lvl_debug,"enter %s %s\n",mr->street.first_number,mr->street.last_number); + dbg(lvl_debug,"enter %s %s",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 0fd19be0d..1399bca33 100644 --- a/navit/map/mg/town.c +++ b/navit/map/mg/town.c @@ -105,7 +105,7 @@ town_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) twn->attr_next=attr_none; return 1; default: - dbg(lvl_warning, "Don't know about attribute %d[%04X]=%s yet\n", + dbg(lvl_warning, "Don't know about attribute %d[%04X]=%s yet", attr_type, attr_type, attr_to_name(attr_type)); return 0; } @@ -237,7 +237,7 @@ town_search_compare(unsigned char **p, struct map_rect_priv *mr) else d=strcasecmp(mr->search_str, name); } - dbg(lvl_debug,"%d \n",d); + dbg(lvl_debug,"%d ",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_debug,"partial %d 0x%x '%s' ***\n", mr->search_partial, mr->search_country, mr->search_str); + dbg(lvl_debug,"partial %d 0x%x '%s' ***", 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); @@ -261,23 +261,23 @@ town_search_get_item(struct map_rect_priv *mr) } } if (! mr->search_linear) { - dbg(lvl_warning,"not found\n"); + dbg(lvl_warning,"not found"); return NULL; } } if (! tree_search_next_lin(&mr->ts, &mr->search_p)) { - dbg(lvl_debug,"linear not found\n"); + dbg(lvl_debug,"linear not found"); return NULL; } if (town_search_compare(&mr->search_p, mr)) { - dbg(lvl_debug,"no match\n"); + dbg(lvl_debug,"no match"); return NULL; } - dbg(lvl_debug,"found %d blocks\n",mr->search_blk_count); + dbg(lvl_debug,"found %d blocks",mr->search_blk_count); } if (! mr->search_blk_count) return NULL; - 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)); + dbg(lvl_debug,"block 0x%x offset 0x%x", 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 e456ca87c..4774cf610 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); while (i++ < 1000) { thdr=(struct tree_hdr_h *)p; p+=sizeof(*thdr); end=p+tree_hdr_h_get_size(thdr); - dbg(lvl_debug,"@%td\n", p-file->begin); + dbg(lvl_debug,"@%td", p-file->begin); last=0; while (p < end) { tleaf=(struct tree_leaf_h *)p; p+=sizeof(*tleaf); - 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); + dbg(lvl_debug,"low:0x%x high:0x%x match:0x%x val:0x%x search:0x%x", 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_debug,"lower\n"); + dbg(lvl_debug,"lower"); 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_debug,"offset=%td count=0x%x\n", p-file->begin, count); + dbg(lvl_debug,"offset=%td count=0x%x", p-file->begin, count); while (count--) { tleaf=(struct tree_leaf_v *)p; p+=sizeof(*tleaf); - dbg(lvl_debug,"0x%x 0x%x\n", tleaf->key, search); + dbg(lvl_debug,"0x%x 0x%x", 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_debug,"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)",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_debug,"%p %p\n", f_idx_h, f_idx_v); + dbg(lvl_debug,"%p %p", 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_debug,"h=0x%x\n", h); + dbg(lvl_debug,"h=0x%x", h); if ((v=tree_search_v(f_idx_v, h, search_v))) { - dbg(lvl_debug,"v=0x%x\n", v); + dbg(lvl_debug,"v=0x%x", v); *result=v; file_destroy(f_idx_v); file_destroy(f_idx_h); - dbg(lvl_debug,"return 1\n"); + dbg(lvl_debug,"return 1"); return 1; } } file_destroy(f_idx_v); file_destroy(f_idx_h); - dbg(lvl_debug,"return 0\n"); + dbg(lvl_debug,"return 0"); 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_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); + dbg(lvl_debug,"pos %td addr 0x%ux size 0x%ux low 0x%ux end %tu", 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_debug,"next *p=%p dir=%d\n", *p, dir); - dbg(lvl_debug,"low1=0x%x high1=0x%x\n", tsn->low, tsn->high); + dbg(lvl_debug,"next *p=%p dir=%d", *p, dir); + dbg(lvl_debug,"low1=0x%x high1=0x%x", tsn->low, tsn->high); if (dir <= 0) { - dbg(lvl_debug,"down 0x%x\n", tsn->low); + dbg(lvl_debug,"down 0x%x", 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_debug,"saving last2 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); - dbg(lvl_debug,"high2=0x%x\n", tsn->high); + dbg(lvl_debug,"saving last2 %d %td", ts->curr_node, tsn->last-ts->f->begin); + dbg(lvl_debug,"high2=0x%x", 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_debug,"saving last3 %d %p\n", ts->curr_node, tsn->last); + dbg(lvl_debug,"saving last3 %d %p", ts->curr_node, tsn->last); if (*p < tsn->end) return (tsn->low == 0xffffffff ? 1 : 0); - dbg(lvl_debug,"end reached high=0x%x\n",tsn->high); + dbg(lvl_debug,"end reached high=0x%x",tsn->high); if (tsn->low != 0xffffffff) { - dbg(lvl_debug,"low 0x%x\n", tsn->low); + dbg(lvl_debug,"low 0x%x", 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_debug,"saving last4 %d %td\n", ts->curr_node, tsn->last-ts->f->begin); - dbg(lvl_debug,"high4=0x%x\n", tsn->high); + dbg(lvl_debug,"saving last4 %d %td", ts->curr_node, tsn->last-ts->f->begin); + dbg(lvl_debug,"high4=0x%x", 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_debug,"pos=%d %td\n", ts->curr_node, *p-ts->f->begin); + dbg(lvl_debug,"pos=%d %td", 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_debug,"reload %d\n",ts->curr_node); + dbg(lvl_debug,"reload %d",ts->curr_node); high=tsn->low; } return 1; } - dbg(lvl_debug,"eon %d %td %td\n", ts->curr_node, *p-ts->f->begin, tsn->end-ts->f->begin); + dbg(lvl_debug,"eon %d %td %td", 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 e3eb4b723..68c44272d 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_debug,"map_destroy_shapefile\n"); + dbg(lvl_debug,"map_destroy_shapefile"); 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_debug,"line=%s\n",line); + dbg(lvl_debug,"line=%s",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_debug,"name=%s value=%s\n",name,value); + dbg(lvl_debug,"name=%s value=%s",name,value); attr_free(mr->attr); mr->attr=attr_new_from_text(name,value); if (mr->attr) { @@ -524,14 +524,14 @@ map_rect_new_shapefile(struct map_priv *map, struct map_selection *sel) } file_destroy(file); } else { - dbg(lvl_error,"Failed to open %s\n",dbfmapfile); + dbg(lvl_error,"Failed to open %s",dbfmapfile); if (map->dbfmap_data) { changed=1; g_free(map->dbfmap_data); map->dbfmap_data=NULL; } } - dbg(lvl_debug,"%s changed %d old %p\n",dbfmapfile,changed,map->dbfmap_data); + dbg(lvl_debug,"%s changed %d old %p",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_debug,"map_rect_new_shapefile\n"); + dbg(lvl_debug,"map_rect_new_shapefile"); 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_debug,"type='%s'\n", type); + dbg(lvl_debug,"type='%s'", 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); + dbg(lvl_error,"Warning: type '%s' unknown", type); } else { - dbg(lvl_debug,"failed to get attribute type\n"); + dbg(lvl_debug,"failed to get attribute type"); } } 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_debug,"map_new_shapefile %s\n", data->u.str); + dbg(lvl_debug,"map_new_shapefile %s", 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_debug,"map_new_shapefile %s %s\n", m->filename, wdata); + dbg(lvl_debug,"map_new_shapefile %s %s", 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_debug,"shapefile: plugin_init\n"); + dbg(lvl_debug,"shapefile: plugin_init"); plugin_register_category_map("shapefile", map_new_shapefile); } @@ -759,7 +759,7 @@ static int VSI_SHP_Close( SAFile file ) static void VSI_SHP_Error( const char *message ) { - dbg(lvl_error,"error:%s\n", message); + dbg(lvl_error,"error:%s", message); } /************************************************************************/ diff --git a/navit/map/textfile/textfile.c b/navit/map/textfile/textfile.c index 43be12368..2dbcc1ab4 100644 --- a/navit/map/textfile/textfile.c +++ b/navit/map/textfile/textfile.c @@ -54,11 +54,11 @@ get_line(struct map_rect_priv *mr) else mr->pos+=mr->lastlen; fgets(mr->line, TEXTFILE_LINE_SIZE, mr->f); - dbg(lvl_debug,"read textfile line: %s\n", mr->line); + dbg(lvl_debug,"read textfile line: %s", mr->line); remove_comment_line(mr->line); mr->lastlen=strlen(mr->line)+1; if (strlen(mr->line) >= TEXTFILE_LINE_SIZE-1) - dbg(lvl_error, "line too long: %s\n", mr->line); + dbg(lvl_error, "line too long: %s", mr->line); } } @@ -94,12 +94,12 @@ textfile_coord_get(void *priv_data, struct coord *c, int count) { struct map_rect_priv *mr=priv_data; int ret=0; - dbg(lvl_warning,"enter, count: %d\n",count); + dbg(lvl_warning,"enter, count: %d",count); while (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_debug,"c=0x%x,0x%x\n", c->x, c->y); + dbg(lvl_debug,"c=0x%x,0x%x", c->x, c->y); c++; } ret++; @@ -138,7 +138,7 @@ textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) char *str=NULL; dbg(lvl_debug,"mr=%p attrs='%s' ", mr, mr->attrs); if (attr_type != mr->attr_last) { - dbg(lvl_debug,"reset attr_pos\n"); + dbg(lvl_debug,"reset attr_pos"); mr->attr_pos=0; mr->attr_last=attr_type; } @@ -146,7 +146,7 @@ textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) 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_debug,"found attr '%s' 0x%x\n", mr->attr_name, attr_type); + dbg(lvl_debug,"found attr '%s' 0x%x", mr->attr_name, attr_type); attr->type=attr_type; textfile_encode_attr(mr->attr, attr_type, attr); return 1; @@ -156,11 +156,11 @@ textfile_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) 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_debug,"found\n"); + dbg(lvl_debug,"found"); return 1; } } - dbg(lvl_debug,"not found\n"); + dbg(lvl_debug,"not found"); 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_debug,"enter\n"); + dbg(lvl_debug,"enter"); mr=g_new0(struct map_rect_priv, 1); mr->m=map; mr->sel=sel; @@ -204,20 +204,20 @@ map_rect_new_textfile(struct map_priv *map, struct map_selection *sel) } sel=sel->next; } - dbg(lvl_debug,"popen args %s\n", args); + dbg(lvl_debug,"popen args %s", args); mr->args=args; mr->f=popen(mr->args, "r"); mr->pos=0; mr->lastlen=0; #else - dbg(lvl_error,"unable to work with pipes %s\n",map->filename); + dbg(lvl_error,"unable to work with pipes %s",map->filename); #endif } else { mr->f=fopen(map->filename, "r"); } if(!mr->f) { if (!(errno == ENOENT && map->no_warning_if_map_file_missing)) { - dbg(lvl_error, "error opening textfile %s: %s\n", map->filename, strerror(errno)); + dbg(lvl_error, "error opening textfile %s: %s", map->filename, strerror(errno)); } } get_line(mr); @@ -255,7 +255,7 @@ map_rect_get_item_textfile(struct map_rect_priv *mr) } for(;;) { if (feof(mr->f)) { - dbg(lvl_debug,"map_rect_get_item_textfile: eof %d\n",mr->item.id_hi); + dbg(lvl_debug,"map_rect_get_item_textfile: eof %d",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_debug,"map_rect_get_item_textfile: point found\n"); + dbg(lvl_debug,"map_rect_get_item_textfile: point found"); 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_debug,"map_rect_get_item_textfile: line found\n"); + dbg(lvl_debug,"map_rect_get_item_textfile: line found"); if (! mr->line[0]) { get_line(mr); continue; @@ -302,21 +302,21 @@ 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_debug,"mr=%p attrs=%s\n", mr, mr->attrs); + dbg(lvl_debug,"mr=%p attrs=%s", mr, mr->attrs); } - dbg(lvl_debug,"get_attrs %s\n", mr->attrs); + dbg(lvl_debug,"get_attrs %s", mr->attrs); if (attr_from_line(mr->attrs,"type",NULL,type,NULL)) { - dbg(lvl_debug,"type='%s'\n", type); + dbg(lvl_debug,"type='%s'", type); mr->item.type=item_from_name(type); if (mr->item.type == type_none) - dbg(lvl_error, "Warning: type '%s' unknown\n", type); + dbg(lvl_error, "Warning: type '%s' unknown", type); } else { get_line(mr); continue; } mr->attr_last=attr_none; mr->more=1; - dbg(lvl_debug,"return attr='%s'\n", mr->attrs); + dbg(lvl_debug,"return attr='%s'", 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_debug,"map_new_textfile %s\n", data->u.str); + dbg(lvl_debug,"map_new_textfile %s", 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_debug,"map_new_textfile %s %s\n", m->filename, wdata); + dbg(lvl_debug,"map_new_textfile %s %s", 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_debug,"textfile: plugin_init\n"); + dbg(lvl_debug,"textfile: plugin_init"); plugin_register_category_map("textfile", map_new_textfile); } |