2214 |
} |
} |
2215 |
} |
} |
2216 |
|
|
2217 |
tag_t *osm_tags_copy(tag_t *src_tag, gboolean update_creator) { |
tag_t *osm_tags_copy(tag_t *src_tag) { |
2218 |
tag_t *new_tags = NULL; |
tag_t *new_tags = NULL; |
2219 |
tag_t **dst_tag = &new_tags; |
tag_t **dst_tag = &new_tags; |
2220 |
|
|
2221 |
while(src_tag) { |
while(src_tag) { |
2222 |
*dst_tag = g_new0(tag_t, 1); |
if(!osm_is_creator_tag(src_tag)) { |
2223 |
(*dst_tag)->key = g_strdup(src_tag->key); |
*dst_tag = g_new0(tag_t, 1); |
2224 |
if(update_creator && (strcasecmp(src_tag->key, "created_by") == 0)) |
(*dst_tag)->key = g_strdup(src_tag->key); |
|
(*dst_tag)->value = g_strdup(PACKAGE " v" VERSION); |
|
|
else |
|
2225 |
(*dst_tag)->value = g_strdup(src_tag->value); |
(*dst_tag)->value = g_strdup(src_tag->value); |
2226 |
|
dst_tag = &(*dst_tag)->next; |
2227 |
dst_tag = &(*dst_tag)->next; |
} |
2228 |
src_tag = src_tag->next; |
src_tag = src_tag->next; |
2229 |
} |
} |
2230 |
|
|
2231 |
return new_tags; |
return new_tags; |
2232 |
} |
} |
2233 |
|
|