From: Adam Dickmeiss Date: Mon, 14 Sep 2015 13:49:47 +0000 (+0200) Subject: Remove ununsed function ccl_rpn_dup X-Git-Tag: v5.14.8~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=c5b92d32f5619eae0b99c4bfb39374e8ef675e34;p=yaz-moved-to-github.git Remove ununsed function ccl_rpn_dup --- diff --git a/src/cclfind.c b/src/cclfind.c index 5ec6eef..4f24e72 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -130,54 +130,6 @@ static struct ccl_rpn_node *ccl_rpn_node_mkbool(struct ccl_rpn_node *l, return l; } -static struct ccl_rpn_node *ccl_rpn_dup(struct ccl_rpn_node *rpn) -{ - struct ccl_rpn_node *n; - struct ccl_rpn_attr *attr, **attrp; - if (!rpn) - return 0; - n = ccl_rpn_node_create(rpn->kind); - switch (rpn->kind) - { - case CCL_RPN_AND: - case CCL_RPN_OR: - case CCL_RPN_NOT: - n->u.p[0] = ccl_rpn_dup(rpn->u.p[0]); - n->u.p[1] = ccl_rpn_dup(rpn->u.p[1]); - break; - case CCL_RPN_TERM: - n->u.t.term = xstrdup(rpn->u.t.term); - n->u.t.qual = rpn->u.t.qual ? xstrdup(rpn->u.t.qual) : 0; - attrp = &n->u.t.attr_list; - for (attr = rpn->u.t.attr_list; attr; attr = attr->next) - { - *attrp = (struct ccl_rpn_attr *) xmalloc(sizeof(**attrp)); - (*attrp)->kind = attr->kind; - (*attrp)->type = attr->type; - if (attr->kind == CCL_RPN_ATTR_STRING) - (*attrp)->value.str = xstrdup(attr->value.str); - else - (*attrp)->value.numeric = attr->value.numeric; - if (attr->set) - (*attrp)->set = xstrdup(attr->set); - else - (*attrp)->set = 0; - attrp = &(*attrp)->next; - } - *attrp = 0; - break; - case CCL_RPN_SET: - n->u.setname = xstrdup(rpn->u.setname); - break; - case CCL_RPN_PROX: - n->u.p[0] = ccl_rpn_dup(rpn->u.p[0]); - n->u.p[1] = ccl_rpn_dup(rpn->u.p[1]); - n->u.p[2] = ccl_rpn_dup(rpn->u.p[2]); - break; - } - return n; -} - /** * ccl_rpn_delete: Delete RPN tree. * rpn: Pointer to tree.