-/*
- * Copyright (c) 1995-2002, Index Data.
- * See the file LICENSE for details.
- *
- * d1_if.c : A simple interface for extracting strings from data1_node
- * tree structures
- *
- * $Id: d1_if.c,v 1.1 2002-10-22 12:53:33 adam Exp $
- */
+/* $Id: d1_if.c,v 1.10 2007-01-15 15:10:14 adam Exp $
+ Copyright (C) 1995-2007
+ Index Data ApS
+
+This file is part of the Zebra server.
+
+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
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#include <data1.h>
+#include <idzebra/data1.h>
#include <yaz/log.h>
#include <string.h>
-
/*
* Search for a token in the supplied string up to the supplied list of stop characters or EOL
* At the end, return the character causing the break and fill pTokenBuffer with the token string so far
}
else
{
- yaz_log(LOG_WARN,"Attempting to lookup data for tagpath: Child node is not a data node");
+ yaz_log(YLOG_WARN,"Attempting to lookup data for tagpath: Child node is not a data node");
}
}
else
{
- yaz_log(LOG_WARN,"Found a node matching the tagpath, but it has no child data nodes");
+ yaz_log(YLOG_WARN,"Found a node matching the tagpath, but it has no child data nodes");
}
}
else
{
- yaz_log(LOG_WARN,"Unable to lookup a node on the specified tag path");
+ yaz_log(YLOG_WARN,"Unable to lookup a node on the specified tag path");
}
return "";
}
else
{
- yaz_log(LOG_FATAL,"Node does not end with a ]");
+ yaz_log(YLOG_FATAL,"Node does not end with a ]");
/* Fatal Error */
return(NULL);
}
}
- yaz_log(LOG_DEBUG,"search node for child like [%d,%d,%s,%d]",iTagType,iTagValue,StringTagVal,iOccurences);
+ yaz_log(YLOG_DEBUG,"search node for child like [%d,%d,%s,%d]",iTagType,iTagValue,StringTagVal,iOccurences);
/* OK.. We have extracted tagtype, Value and Occurence, see if we can find a node */
}
else /* Attempt to match real element */
{
- yaz_log(LOG_WARN,"Non string tag matching not yet implemented");
+ yaz_log(YLOG_WARN,"Non string tag matching not yet implemented");
}
}
current_child = current_child->next;
}
/**
-
-data1_CountOccurences
-
-Count the number of occurences of the last instance on a tagpath.
-
-@param data1_node* node : The root of the tree we wish to look for occurences in
-@param const char* pTagPath : The tagpath we want to count the occurences of...
-
+ \brief Count the number of occurences of the last instance on a tagpath.
+ \param node : The root of the tree we wish to look for occurences in
+ \param pTagPath : The tagpath we want to count the occurences of...
*/
int data1_CountOccurences(data1_node* node, char* pTagPath)
{
return iRetVal;
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+