summaryrefslogtreecommitdiff
path: root/navit/coord.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/coord.c')
-rw-r--r--navit/coord.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/navit/coord.c b/navit/coord.c
index 2bc169d46..4874a49ed 100644
--- a/navit/coord.c
+++ b/navit/coord.c
@@ -104,7 +104,7 @@ coord_rect_overlap(struct coord_rect *r1, struct coord_rect *r2)
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(lvl_debug,"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(lvl_debug,"0x%x,0x%x - 0x%x,0x%x vs 0x%x,0x%x - 0x%x,0x%x", 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)
@@ -171,14 +171,14 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
struct coord c,offset;
enum projection str_pro=projection_none;
- dbg(lvl_debug,"enter('%s',%d,%p)\n", coord_input, output_projection, result);
+ dbg(lvl_debug,"enter('%s',%d,%p)", coord_input, output_projection, result);
s=strchr(str,' ');
co=strchr(str,':');
if (co && co < s) {
proj=malloc(co-str+1);
strncpy(proj, str, co-str);
proj[co-str]='\0';
- dbg(lvl_debug,"projection=%s\n", proj);
+ dbg(lvl_debug,"projection=%s", proj);
str=co+1;
s=strchr(str,' ');
if (!strcmp(proj, "geo"))
@@ -186,7 +186,7 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
else {
str_pro = projection_from_name(proj,&offset);
if (str_pro == projection_none) {
- dbg(lvl_error, "Unknown projection: %s\n", proj);
+ dbg(lvl_error, "Unknown projection: %s", proj);
goto out;
}
}
@@ -202,8 +202,8 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
args=sscanf(str, "%i %i%n",&c.x, &c.y, &ret);
if (args < 2)
goto out;
- dbg(lvl_debug,"str='%s' x=0x%x y=0x%x c=%d\n", str, c.x, c.y, ret);
- dbg(lvl_debug,"rest='%s'\n", str+ret);
+ dbg(lvl_debug,"str='%s' x=0x%x y=0x%x c=%d", str, c.x, c.y, ret);
+ dbg(lvl_debug,"rest='%s'", str+ret);
if (str_pro == projection_none)
str_pro=projection_mg;
@@ -215,13 +215,13 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
} else if (*s == 'N' || *s == 'n' || *s == 'S' || *s == 's') {
double lng, lat;
char ns, ew;
- dbg(lvl_debug,"str='%s'\n", str);
+ dbg(lvl_debug,"str='%s'", str);
args=sscanf(str, "%lf %c %lf %c%n", &lat, &ns, &lng, &ew, &ret);
- dbg(lvl_debug,"args=%d\n", args);
- dbg(lvl_debug,"lat=%f %c lon=%f %c\n", lat, ns, lng, ew);
+ dbg(lvl_debug,"args=%d", args);
+ dbg(lvl_debug,"lat=%f %c lon=%f %c", lat, ns, lng, ew);
if (args < 4)
goto out;
- dbg(lvl_debug,"projection=%d str_pro=%d projection_none=%d\n", output_projection, str_pro, projection_none);
+ dbg(lvl_debug,"projection=%d str_pro=%d projection_none=%d", output_projection, str_pro, projection_none);
if (str_pro == projection_none) {
g.lat=floor(lat/100);
lat-=g.lat*100;
@@ -235,10 +235,10 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
g.lng=-g.lng;
dbg(lvl_debug,"transform_from_geo(%f,%f)",g.lat,g.lng);
transform_from_geo(output_projection, &g, result);
- dbg(lvl_debug,"result 0x%x,0x%x\n", result->x,result->y);
+ dbg(lvl_debug,"result 0x%x,0x%x", result->x,result->y);
}
- dbg(lvl_debug,"str='%s' x=%f ns=%c y=%f ew=%c c=%d\n", str, lng, ns, lat, ew, ret);
- dbg(lvl_debug,"rest='%s'\n", str+ret);
+ dbg(lvl_debug,"str='%s' x=%f ns=%c y=%f ew=%c c=%d", str, lng, ns, lat, ew, ret);
+ dbg(lvl_debug,"rest='%s'", str+ret);
} else if (str_pro == projection_utm) {
double x,y;
args=sscanf(str, "%lf %lf%n", &x, &y, &ret);
@@ -256,14 +256,14 @@ coord_parse(const char *coord_input, enum projection output_projection, struct c
args=sscanf(str, "%lf %lf%n", &lng, &lat, &ret);
if (args < 2)
goto out;
- dbg(lvl_debug,"str='%s' x=%f y=%f c=%d\n", str, lng, lat, ret);
- dbg(lvl_debug,"rest='%s'\n", str+ret);
+ dbg(lvl_debug,"str='%s' x=%f y=%f c=%d", str, lng, lat, ret);
+ dbg(lvl_debug,"rest='%s'", str+ret);
g.lng=lng;
g.lat=lat;
transform_from_geo(output_projection, &g, result);
}
ret+=str-coord_input;
- dbg(lvl_info, "ret=%d delta=%d ret_str='%s'\n", ret, GPOINTER_TO_INT(str-coord_input), coord_input+ret);
+ dbg(lvl_info, "ret=%d delta=%d ret_str='%s'", ret, GPOINTER_TO_INT(str-coord_input), coord_input+ret);
out:
free(proj);
return ret;