goto out;
}
}
- if (! s)
- return 0;
+ if (! s) {
+ ret=0;
+ goto out;
+ }
while (*s == ' ') {
s++;
}
dbg(1,"lat=%f %c lon=%f %c\n", lat, ns, lng, ew);
if (args < 4)
goto out;
+ dbg(1,"projection=%d str_pro=%d projection_none=%d\n", pro, str_pro, projection_none);
if (str_pro == projection_none) {
g.lat=floor(lat/100);
lat-=g.lat*100;
g.lat=-g.lat;
if (ew == 'w' || ew == 'W')
g.lng=-g.lng;
+ dbg(1,"transform_from_geo(%f,%f)",g.lat,g.lng);
transform_from_geo(pro, &g, c_ret);
+ dbg(1,"result 0x%x,0x%x\n", c_ret->x,c_ret->y);
}
dbg(3,"str='%s' x=%f ns=%c y=%f ew=%c c=%d\n", str, lng, ns, lat, ew, ret);
dbg(3,"rest='%s'\n", str+ret);
ret+=str-c_str;
if (debug) {
printf("args=%d\n", args);
- printf("ret=%d delta=%d ret_str='%s'\n", ret, str-c_str, c_str+ret);
+ printf("ret=%d delta=%d ret_str='%s'\n", ret, GPOINTER_TO_INT(str-c_str), c_str+ret);
}
out:
if (proj)
y = c->y;
}
fprintf( out, "%s: %s0x%x %s0x%x\n",
- projection_to_name( pro ),
+ projection_to_name( pro , NULL),
sign_x, x,
sign_y, y );
return;
}
+unsigned int
+coord_hash(const void *key)
+{
+ const struct coord *c=key;
+ return c->x^c->y;
+}
+
+int
+coord_equal(const void *a, const void *b)
+{
+ const struct coord *c_a=a;
+ const struct coord *c_b=b;
+ if (c_a->x == c_b->x && c_a->y == c_b->y)
+ return TRUE;
+ return FALSE;
+}
/** @} */