X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=data1%2Fd1_if.c;h=1ec54dbff8fc05df219ade490e7277ec62f806e2;hb=96f2ba71b5c9042a90ca94ea84a79cd89a2957d5;hp=1fe5a7d353114680b7fc16f5cd5d51146167e025;hpb=519fefb91135ad52134b9fc4e82b3874f5525a2b;p=idzebra-moved-to-github.git diff --git a/data1/d1_if.c b/data1/d1_if.c index 1fe5a7d..1ec54db 100644 --- a/data1/d1_if.c +++ b/data1/d1_if.c @@ -1,24 +1,35 @@ -/* - * 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.6 2005-01-15 19:38:18 adam Exp $ + Copyright (C) 1995-2005 + 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 Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ #include #include #include #include -#include +#include #include #include - /* * 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 @@ -78,17 +89,17 @@ char *data1_getNodeValue(data1_node* node, char* pTagPath) } 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 ""; @@ -162,7 +173,7 @@ data1_node *data1_LookupNode(data1_node* node, char* pTagPath) } 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); } @@ -185,7 +196,7 @@ data1_node *data1_LookupNode(data1_node* node, char* pTagPath) } - 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 */ @@ -216,7 +227,7 @@ data1_node *data1_LookupNode(data1_node* node, char* pTagPath) } 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;