summaryrefslogtreecommitdiff
path: root/navit/attr.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-01-20 15:01:00 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-01-20 15:01:00 +0000
commitaf57165504eedecdefcd49c8123814626f4f0dde (patch)
treee61e6c3c6e55eac189a4437b01cb0fbc10f9e2e1 /navit/attr.c
parent275a394a7cda4c24b85038d66de4a09bfd4effcf (diff)
downloadnavit-af57165504eedecdefcd49c8123814626f4f0dde.tar.gz
Fix:Core:Improved config object handling
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5344 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/attr.c')
-rw-r--r--navit/attr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c
index ffe0f1add..cac5ae249 100644
--- a/navit/attr.c
+++ b/navit/attr.c
@@ -462,6 +462,24 @@ attr_generic_add_attr(struct attr **attrs, struct attr *attr)
}
struct attr **
+attr_generic_prepend_attr(struct attr **attrs, struct attr *attr)
+{
+ struct attr **curr=attrs;
+ int i,count=0;
+ while (curr && *curr) {
+ curr++;
+ count++;
+ }
+ curr=g_new0(struct attr *, count+2);
+ for (i = 0 ; i < count ; i++)
+ curr[i+1]=attrs[i];
+ curr[0]=attr_dup(attr);
+ curr[count+1]=NULL;
+ g_free(attrs);
+ return curr;
+}
+
+struct attr **
attr_generic_remove_attr(struct attr **attrs, struct attr *attr)
{
struct attr **curr=attrs;