int min,max,count;
ret=g_new0(struct attr, 1);
- dbg(1,"enter name='%s' value='%s'\n", name, value);
+ dbg(3,"enter name='%s' value='%s'\n", name, value);
attr=attr_from_name(name);
ret->type=attr;
switch (attr) {
struct attr *
attr_search(struct attr **attrs, struct attr *last, enum attr_type attr)
{
- dbg(1, "enter attrs=%p\n", attrs);
+ dbg(2, "enter attrs=%p\n", attrs);
while (*attrs) {
- dbg(1,"*attrs=%p\n", *attrs);
+ dbg(3,"*attrs=%p\n", *attrs);
if ((*attrs)->type == attr) {
return *attrs;
}
if (! cb)
return;
if (cb->pcount + pcount <= 8) {
- dbg(1,"cb->pcount=%d\n", cb->pcount);
+ dbg(3,"cb->pcount=%d\n", cb->pcount);
if (cb->pcount && cb->p)
- dbg(1,"cb->p[0]=%p\n", cb->p[0]);
- dbg(1,"pcount=%d\n", pcount);
+ dbg(3,"cb->p[0]=%p\n", cb->p[0]);
+ dbg(3,"pcount=%d\n", pcount);
if (pcount) {
dbg_assert(p!=NULL);
- dbg(1,"p[0]=%p\n", p[0]);
+ dbg(3,"p[0]=%p\n", p[0]);
}
for (i = 0 ; i < cb->pcount ; i++)
pf[i]=cb->p[i];
dbg_assert(r1->lu.y >= r1->rl.y);
dbg_assert(r2->lu.x <= r2->rl.x);
dbg_assert(r2->lu.y >= r2->rl.y);
- dbg(1,"0x%x,0x%x - 0x%x,0x%x vs 0x%x,0x%x - 0x%x,0x%x\n", r1->lu.x, r1->lu.y, r1->rl.x, r1->rl.y, r2->lu.x, r2->lu.y, r2->rl.x, r2->rl.y);
+ dbg(3,"0x%x,0x%x - 0x%x,0x%x vs 0x%x,0x%x - 0x%x,0x%x\n", r1->lu.x, r1->lu.y, r1->rl.x, r1->rl.y, r2->lu.x, r2->lu.y, r2->rl.x, r2->rl.y);
if (r1->lu.x > r2->rl.x)
return 0;
if (r1->rl.x < r2->lu.x)
remove_comment_line(mr->line);
mr->lastlen=strlen(mr->line)+1;
if (strlen(mr->line) >= TEXTFILE_LINE_SIZE-1)
- printf("line too long\n");
+ dbg(0, "line too long: %s\n", mr->line);
}
}
static void
map_destroy_textfile(struct map_priv *m)
{
- dbg(1,"map_destroy_textfile\n");
g_free(m->filename);
if(m->charset) {
g_free(m->charset);
{
struct map_rect_priv *mr=priv_data;
int ret=0;
- dbg(1,"textfile_coord_get %d\n",count);
+ dbg(1,"enter, count: %d\n",count);
while (count--) {
if (mr->f && !feof(mr->f) && (!mr->item.id_hi || !mr->eoc) && parse_line(mr, mr->item.id_hi)) {
*c=mr->c;
{
struct map_rect_priv *mr=priv_data;
char *str=NULL;
- dbg(1,"textfile_attr_get mr=%p attrs='%s' ", mr, mr->attrs);
+ dbg(1,"mr=%p attrs='%s' ", mr, mr->attrs);
if (attr_type != mr->attr_last) {
dbg(1,"reset attr_pos\n");
mr->attr_pos=0;
{
struct map_rect_priv *mr;
- dbg(1,"map_rect_new_textfile\n");
+ dbg(1,"enter\n");
mr=g_new0(struct map_rect_priv, 1);
mr->m=map;
mr->sel=sel;
mr->pos=0;
mr->lastlen=0;
#else
- dbg(0,"map_rect_new_textfile is unable to work with pipes %s\n",map->filename);
+ dbg(0,"unable to work with pipes %s\n",map->filename);
#endif
} else {
mr->f=fopen(map->filename, "r");
}
if(!mr->f) {
- printf("map_rect_new_textfile unable to open textfile %s. Error: %s\n",map->filename, strerror(errno));
+ dbg(0, "error opening textfile %s: %s\n",map->filename, strerror(errno));
}
get_line(mr);
return mr;
dbg(1,"type='%s'\n", type);
mr->item.type=item_from_name(type);
if (mr->item.type == type_none)
- printf("Warning: type '%s' unknown\n", type);
+ dbg(0, "Warning: type '%s' unknown\n", type);
} else {
get_line(mr);
continue;
this_->messages = messagelist_new(attrs);
- dbg(0,"return %p\n",this_);
+ dbg(1,"return %p\n",this_);
return this_;
}
navit_ref(struct navit *this_)
{
this_->refcount++;
- dbg(0,"refcount %d\n",this_->refcount);
+ dbg(1,"refcount %d\n",this_->refcount);
return this_;
}
navit_unref(struct navit *this_)
{
this_->refcount--;
- dbg(0,"refcount %d\n",this_->refcount);
+ dbg(1,"refcount %d\n",this_->refcount);
if (this_->refcount <= 0)
navit_destroy(this_);
}
tracking_ref(struct tracking *this_)
{
this_->refcount++;
- dbg(0,"refcount %d\n",this_->refcount);
+ dbg(1,"refcount %d\n",this_->refcount);
return this_;
}
tracking_unref(struct tracking *this_)
{
this_->refcount--;
- dbg(0,"refcount %d\n",this_->refcount);
+ dbg(1,"refcount %d\n",this_->refcount);
if (this_->refcount <= 0)
tracking_destroy(this_);
}
int zlimit=t->znear;
int visible, visibleo=-1;
int i,j = 0,k=0;
- dbg(1,"count=%d\n", count);
+ dbg(3,"count=%d\n", count);
for (i=0; i < count; i++) {
if (pro == t->pro) {
xc=c[i].x;
attribute_value++;
}
ret[count]=NULL;
- dbg(1,"ret=%p\n", ret);
+ dbg(3,"ret=%p\n", ret);
return ret;
}