diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-04-19 13:52:03 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-04-19 13:52:03 +0000 |
commit | c341edd713f9d92a2ddb54b29f3fe0ad11e080c7 (patch) | |
tree | 9a63f796c588ba68def17ed1d925025cc320510a /navit | |
parent | 20efb4a78648669c496fdb504d76d93df48d9460 (diff) | |
download | navit-c341edd713f9d92a2ddb54b29f3fe0ad11e080c7.tar.gz |
Fix:Core:More routing fixes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2216 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/attr.c | 5 | ||||
-rw-r--r-- | navit/item.c | 3 | ||||
-rw-r--r-- | navit/route.c | 11 |
3 files changed, 14 insertions, 5 deletions
diff --git a/navit/attr.c b/navit/attr.c index ba4c0ac8b..fbb7e6251 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -134,7 +134,10 @@ attr_new_from_text(const char *name, const char *value) break; } if (attr >= attr_type_int_begin && attr <= attr_type_int_end) { - ret->u.num=strtol(value, NULL, 0); + if (value[0] == '0' && value[1] == 'x') + ret->u.num=strtoul(value, NULL, 0); + else + ret->u.num=strtol(value, NULL, 0); if ((attr >= attr_type_rel_abs_begin) && (attr < attr_type_boolean_begin)) { /* Absolute values are from -0x40000000 - 0x40000000, with 0x0 being 0 (who would have thought that?) diff --git a/navit/item.c b/navit/item.c index 4c8f7b33e..d7a7e6bec 100644 --- a/navit/item.c +++ b/navit/item.c @@ -59,8 +59,9 @@ struct default_flags default_flags2[]={ {type_ramp, AF_MOTORIZED_FAST}, {type_roundabout, AF_ALL}, {type_ferry, AF_ALL}, - {type_cycleway, AF_ALL}, + {type_cycleway, AF_PBH}, {type_track_gravelled, AF_ALL}, + {type_footway, AF_PBH}, }; diff --git a/navit/route.c b/navit/route.c index 33b1db87f..7eec39422 100644 --- a/navit/route.c +++ b/navit/route.c @@ -1944,7 +1944,7 @@ route_graph_update(struct route *this, struct callback *cb) struct street_data * street_get_data (struct item *item) { - int count=0; + int count=0,*flags; struct street_data *ret = NULL, *ret1; struct attr flags_attr, maxspeed_attr; const int step = 128; @@ -1969,8 +1969,13 @@ street_get_data (struct item *item) ret->count=count; if (item_attr_get(item, attr_flags, &flags_attr)) ret->flags=flags_attr.u.num; - else - ret->flags=0; + else { + flags=item_get_default_flags(item->type); + if (flags) + ret->flags=*flags; + else + ret->flags=0; + } ret->maxspeed = -1; if (ret->flags & AF_SPEED_LIMIT) { |