From: Adam Dickmeiss Date: Tue, 5 Dec 2006 09:26:04 +0000 (+0000) Subject: Reformat a bit. X-Git-Tag: ZEBRA.2.0.8~57 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=dd094f96179451fb9445cc33d288a0ba540dc42c Reformat a bit. --- diff --git a/index/alvis.c b/index/alvis.c index 218e6ea..da5817b 100644 --- a/index/alvis.c +++ b/index/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.6 2006-11-16 13:27:54 adam Exp $ +/* $Id: alvis.c,v 1.7 2006-12-05 09:26:04 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -161,8 +161,8 @@ static void *filter_init(Res res, RecType recType) static int attr_content(struct _xmlAttr *attr, const char *name, const char **dst_content) { - if (!XML_STRCMP(attr->name, name) && attr->children && - attr->children->type == XML_TEXT_NODE) + if (!XML_STRCMP(attr->name, name) && attr->children + && attr->children->type == XML_TEXT_NODE) { *dst_content = (const char *)(attr->children->content); return 1; @@ -193,27 +193,29 @@ static ZEBRA_RES create_schemas(struct filter_info *tinfo, const char *fname) char tmp_full_name[1024]; xmlNodePtr ptr; tinfo->fname = xstrdup(fname); - - if (yaz_filepath_resolve(tinfo->fname, tinfo->profile_path, + + if (yaz_filepath_resolve(tinfo->fname, tinfo->profile_path, NULL, tmp_full_name)) - tinfo->full_name = xstrdup(tmp_full_name); + tinfo->full_name = xstrdup(tmp_full_name); else - tinfo->full_name = xstrdup(tinfo->fname); - + tinfo->full_name = xstrdup(tinfo->fname); + yaz_log(YLOG_LOG, "alvis filter: loading config file %s", tinfo->full_name); - + tinfo->doc = xmlParseFile(tinfo->full_name); - - if (!tinfo->doc){ + + if (!tinfo->doc) + { yaz_log(YLOG_WARN, "alvis filter: could not parse config file %s", tinfo->full_name); - + return ZEBRA_FAIL; } ptr = xmlDocGetRootElement(tinfo->doc); - if (!ptr || ptr->type != XML_ELEMENT_NODE || - XML_STRCMP(ptr->name, "schemaInfo")){ + if (!ptr || ptr->type != XML_ELEMENT_NODE + || XML_STRCMP(ptr->name, "schemaInfo")) + { yaz_log(YLOG_WARN, "alvis filter: config file %s :" " expected root element ",