summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-02-22 07:52:54 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-02-22 07:52:54 +0000
commit73b1bdffe3bfecb9e209b1ee6d67a5327e9f673f (patch)
tree427d0ab6315e106187969543ea82db921252ea20
parent267f671b0ade6c9971c44b7213725924fe4bd5ce (diff)
downloadnavit-73b1bdffe3bfecb9e209b1ee6d67a5327e9f673f.tar.gz
Fix:Core:Various minor fixes and improvements
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2957 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/attr.h1
-rw-r--r--navit/debug.c2
-rw-r--r--navit/vehicle.c1
-rw-r--r--navit/xmlconfig.c4
4 files changed, 5 insertions, 3 deletions
diff --git a/navit/attr.h b/navit/attr.h
index 5391018c0..6c357d99d 100644
--- a/navit/attr.h
+++ b/navit/attr.h
@@ -84,6 +84,7 @@ enum attr_position_valid {
#define ATTR_IS_COORD_GEO(x) ((x) >= attr_type_coord_geo_begin && (x) <= attr_type_coord_geo_end)
#define ATTR_IS_NUMERIC(x) (ATTR_IS_INT(x) || ATTR_IS_DOUBLE(x))
#define ATTR_IS_COLOR(x) ((x) >= attr_type_color_begin && (x) <= attr_type_color_end)
+#define ATTR_IS_PCOORD(x) ((x) >= attr_type_pcoord_begin && (x) <= attr_type_pcoord_end)
struct attr {
enum attr_type type;
diff --git a/navit/debug.c b/navit/debug.c
index 05fd753ff..d30ab5d02 100644
--- a/navit/debug.c
+++ b/navit/debug.c
@@ -72,7 +72,7 @@ static void sigsegv(int sig)
void
debug_init(const char *program_name)
{
- gdb_program=program_name;
+ gdb_program=g_strdup(program_name);
signal(SIGSEGV, sigsegv);
debug_hash=g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
debug_fp = stderr;
diff --git a/navit/vehicle.c b/navit/vehicle.c
index 117a71f7c..4f0af4ee4 100644
--- a/navit/vehicle.c
+++ b/navit/vehicle.c
@@ -256,6 +256,7 @@ vehicle_remove_attr(struct vehicle *this_, struct attr *attr)
callback_list_remove(this_->cbl, attr->u.callback);
break;
default:
+ this_->attrs=attr_generic_remove_attr(this_->attrs, attr);
return 0;
}
return 1;
diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c
index 047240513..b8f09d60f 100644
--- a/navit/xmlconfig.c
+++ b/navit/xmlconfig.c
@@ -261,11 +261,11 @@ static struct object_func object_funcs[] = {
{ attr_polygon, NEW(polygon_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
{ attr_polyline, NEW(polyline_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
{ attr_roadprofile,NEW(roadprofile_new), GET(roadprofile_get_attr), NULL, NULL, SET(roadprofile_set_attr), ADD(roadprofile_add_attr) },
- { attr_route, NEW(route_new), GET(route_get_attr)},
+ { attr_route, NEW(route_new), GET(route_get_attr), NULL, NULL, SET(route_set_attr), ADD(route_add_attr), REMOVE(route_remove_attr)},
{ attr_speech, NEW(speech_new), GET(speech_get_attr), NULL, NULL, SET(speech_set_attr)},
{ attr_text, NEW(text_new)},
{ attr_tracking, NEW(tracking_new)},
- { attr_vehicle, NEW(vehicle_new), GET(vehicle_get_attr), NULL, NULL, SET(vehicle_set_attr), ADD(vehicle_add_attr) },
+ { attr_vehicle, NEW(vehicle_new), GET(vehicle_get_attr), NULL, NULL, SET(vehicle_set_attr), ADD(vehicle_add_attr), REMOVE(vehicle_remove_attr) },
{ attr_vehicleprofile, NEW(vehicleprofile_new), GET(vehicleprofile_get_attr), NULL, NULL, SET(vehicleprofile_set_attr), ADD(vehicleprofile_add_attr) },
};