struct osm_object *osm_obj_find_by_id(enum osm_object_type type, osm_id_t id);
void osm_obj_add_tag(struct osm_object *o, const char *key, const char *val);
void osm_obj_add_tag_raw(struct osm_object *o, osm_key_t key, osm_val_t val);
+void osm_obj_set_tag(struct osm_object *o, const char *key, const char *val);
+void osm_obj_set_tag_raw(struct osm_object *o, osm_key_t key, osm_val_t val);
osm_val_t osm_obj_find_tag(struct osm_object *o, osm_val_t key);
void osm_obj_dump(struct osm_object *o);
void osm_obj_warn(struct osm_object *o, const char *msg, ...);
#define OSM_FOR_EACH_BEGIN(_type, _var, _list) CLIST_FOR_EACH(struct osm_ref *, _ref, _list) { _type _var = (_type) _ref->o;
#define OSM_FOR_EACH_END }
+static inline struct osm_object *osm_ref_head(clist *list)
+{
+ struct osm_ref *r = clist_head(list);
+ return r ? r->o : NULL;
+}
+
+static inline struct osm_object *osm_ref_tail(clist *list)
+{
+ struct osm_ref *r = clist_tail(list);
+ return r ? r->o : NULL;
+}
+
struct osm_node *osm_node_new(osm_id_t id);
void osm_node_dump(struct osm_node *n);
void osm_node_dump_all(void);