X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=data1%2Fd1_utils.c;h=6484c50fb7220b0eb0f1ae5e525f8152b0f5e570;hb=585e87e5a6b274a8ee13b5432a462afd95c04096;hp=b714d87000d0bcc8bb8e2337dfe0c8c1e7fe0931;hpb=ac13dceecd5f75669820819575daf88e0add5c8d;p=idzebra-moved-to-github.git diff --git a/data1/d1_utils.c b/data1/d1_utils.c index b714d87..6484c50 100644 --- a/data1/d1_utils.c +++ b/data1/d1_utils.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2011 Index Data + Copyright (C) 2004-2013 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -37,20 +37,20 @@ void data1_remove_node (data1_handle dh, data1_node *n) /* n is the only child */ if(! n->next){ - n->parent->last_child = 0; + n->parent->last_child = 0; } - } + } /* n is one of the following childrens */ else { data1_node * before; - + /* need to find sibling before me */ before = n->parent->child; while (before->next != n) before = before->next; - + before->next = n->next; - + /* n is last child of many */ if ( n->parent->last_child == n){ n->parent->last_child = before; @@ -74,16 +74,16 @@ void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n) if (!strcmp(n->u.tag.tag, "idzebra")){ if (n->u.tag.attributes){ data1_xattr *xattr = n->u.tag.attributes; - + for (; xattr; xattr = xattr->next){ - if (!strcmp(xattr->name, "xmlns") - & !strcmp(xattr->value, + if (!strcmp(xattr->name, "xmlns") + & !strcmp(xattr->value, "http://www.indexdata.dk/zebra/")) data1_remove_node (dh, n); } } } - + break; /* case DATA1N_data: @@ -110,7 +110,7 @@ void data1_remove_idzebra_subtree (data1_handle dh, data1_node *n) n->parent->last_child, n); } */ - + }