diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-12-14 22:01:32 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-12-14 22:01:32 +0000 |
commit | f4b251d76193820303efe2a02eab486a00b6c075 (patch) | |
tree | a352d3df8330ca242aa579ad2db65bf99906cf23 /navit/attr.c | |
parent | 00f9b4e40a3637235d53605fbcee27a861c5c245 (diff) | |
download | navit-f4b251d76193820303efe2a02eab486a00b6c075.tar.gz |
Add:Core:Made item_types displayable
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5291 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/attr.c')
-rw-r--r-- | navit/attr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c index 58c4dda40..6fd5edfe6 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -333,6 +333,15 @@ attr_to_text(struct attr *attr, struct map *map, int pretty) int *data=attr->u.data; return g_strdup_printf("0x%x,0x%x",data[0],data[1]); } + if (type == attr_item_types) { + enum item_type *item_types=attr->u.item_types; + char *sep="",*ret=NULL; + while (item_types && *item_types) { + ret=g_strconcat_printf(ret,"%s%s",sep,item_to_name(*item_types++)); + sep=","; + } + return ret; + } if (type >= attr_type_group_begin && type <= attr_type_group_end) { int i=0; char *ret=g_strdup(""); |