-/* $Id: zeerex.c,v 1.1 2007-01-29 03:19:25 quinn Exp $ */
+/* $Id: zeerex.c,v 1.3 2007-02-08 19:26:33 adam Exp $ */
#include <string.h>
struct zr_databaseInfo *databaseInfo(NMEM m, xmlNode *node)
{
+ xmlNode *n;
struct zr_databaseInfo *r = nmem_malloc(m, sizeof(*r));
memset(r, 0, sizeof(*r));
- xmlNode *n;
r->title = findlangstr(m, node, "title");
r->description = findlangstr(m, node, "description");
return r;
}
-static struct zr_index *index(NMEM m, xmlNode *node)
+static struct zr_index *parse_index(NMEM m, xmlNode *node)
{
xmlNode *n;
struct zr_index *r = nmem_malloc(m, sizeof(*r));
}
else if (!strcmp(n->name, "index"))
{
- struct zr_index *new = index(m, n);
+ struct zr_index *new = parse_index(m, n);
if (!new)
return 0;
new->next = r->indexes;
{
xmlNode *n;
struct zr_recordSyntax *r = nmem_malloc(m, sizeof(*r));
- memset(r, 0, sizeof(*r));
struct zr_elementSet **elementp = &r->elementSets;
+ memset(r, 0, sizeof(*r));
r->name = attrtostr(m, node, "name");
r->identifier = attrtostr(m, node, "identifier");
for (n = node->children; n; n = n->next)
{
xmlNode *n;
struct zr_recordInfo *r = nmem_malloc(m, sizeof(*r));
- memset(r, 0, sizeof(*r));
struct zr_recordSyntax **syntaxp = &r->recordSyntaxes;
+ memset(r, 0, sizeof(*r));
for (n = node->children; n; n = n->next)
{
if (n->type != XML_ELEMENT_NODE)
{
xmlNode *n;
struct zr_schemaInfo *r = nmem_malloc(m, sizeof(*r));
- memset(r, 0, sizeof(*r));
struct zr_schema **schemap = &r->schemas;
+ memset(r, 0, sizeof(*r));
for (n = node->children; n; n = n->next)
{
if (n->type != XML_ELEMENT_NODE)