diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-03-25 20:45:52 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-03-25 20:45:52 +0000 |
commit | 3e43bc8ff8fbba833828122d1082d0d33c301fc0 (patch) | |
tree | a40ef561e3f1820776dae586682554ed3c8a18c3 /navit/attr.c | |
parent | 8775165821b839e1b1e4749463f092bf13770f95 (diff) | |
download | navit-3e43bc8ff8fbba833828122d1082d0d33c301fc0.tar.gz |
Add:Core:Improved commands
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2172 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/attr.c')
-rw-r--r-- | navit/attr.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c index bcd1bef98..b8a1722f2 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -297,6 +297,38 @@ attr_generic_add_attr(struct attr **attrs, struct attr *attr) return curr; } +enum attr_type +attr_type_begin(enum attr_type type) +{ + if (type < attr_type_item_begin) + return attr_none; + if (type < attr_type_int_begin) + return attr_type_item_begin; + if (type < attr_type_string_begin) + return attr_type_int_begin; + if (type < attr_type_special_begin) + return attr_type_string_begin; + if (type < attr_type_double_begin) + return attr_type_special_begin; + if (type < attr_type_coord_geo_begin) + return attr_type_double_begin; + if (type < attr_type_color_begin) + return attr_type_coord_geo_begin; + if (type < attr_type_object_begin) + return attr_type_color_begin; + if (type < attr_type_coord_begin) + return attr_type_object_begin; + if (type < attr_type_pcoord_begin) + return attr_type_coord_begin; + if (type < attr_type_callback_begin) + return attr_type_pcoord_begin; + if (type < attr_type_int64_begin) + return attr_type_callback_begin; + if (type <= attr_type_int64_end) + return attr_type_int64_begin; + return attr_none; +} + int attr_data_size(struct attr *attr) { |