-/* $Id: config.c,v 1.5 2007-01-08 18:32:35 quinn Exp $ */
+/* $Id: config.c,v 1.9 2007-01-10 10:15:23 adam Exp $ */
#include <string.h>
xmlChar *merge = xmlGetProp(n, "merge");
xmlChar *type = xmlGetProp(n, "type");
xmlChar *termlist = xmlGetProp(n, "termlist");
+ xmlChar *rank = xmlGetProp(n, "rank");
if (!name)
{
else
md->termlist = 0;
+ if (rank)
+ md->rank = atoi(rank);
+ else
+ md->rank = 0;
+
if (type)
{
if (!strcmp(type, "generic"))
return 0;
}
}
- md->type = Metadata_type_generic;
+ else
+ md->type = Metadata_type_generic;
if (sortkey)
{
xmlFree(sortkey);
xmlFree(merge);
xmlFree(termlist);
+ xmlFree(rank);
md_node++;
}
else
xmlChar *charset = xmlGetProp(n, "charset");
xmlChar *format = xmlGetProp(n, "format");
xmlChar *stylesheet = xmlGetProp(n, "stylesheet");
- bzero(m, sizeof(*m));
+ memset(m, 0, sizeof(*m));
if (type)
{
if (!strcmp(type, "xslt"))
yaz_log(YLOG_FATAL, "Failed to read %s", fname);
exit(1);
}
- if ((p = rindex(fname, '/')))
+ if ((p = strrchr(fname, '/')))
{
int len = p - fname;
strncpy(confdir, fname, len);