diff options
Diffstat (limited to 'navit/attr.c')
-rw-r--r-- | navit/attr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c index 478c44fd4..78e2a683c 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -43,6 +43,7 @@ #include "util.h" #include "types.h" #include "xmlconfig.h" +#include "layout.h" struct attr_name { enum attr_type attr; @@ -471,6 +472,9 @@ char *attr_to_text_ext(struct attr *attr, char *sep, enum attr_format fmt, enum if (type == attr_nav_status) { return nav_status_to_text(attr->u.num); } + if (type == attr_poly_hole) { + return g_strdup_printf("count=%d", attr->u.poly_hole->coord_count); + } return g_strdup_printf("(no text[%s])", attr_to_name(type)); } @@ -770,6 +774,9 @@ int attr_data_size(struct attr *attr) { while (attr->u.attr_types[i++] != attr_none); return i*sizeof(enum attr_type); } + if (attr->type == attr_poly_hole) { + return (sizeof(attr->u.poly_hole->coord_count) + (attr->u.poly_hole->coord_count * sizeof(*attr->u.poly_hole->coord))); + } dbg(lvl_error,"size for %s unknown", attr_to_name(attr->type)); return 0; } |