XML reader for data1 (EXPAT)
[yaz-moved-to-github.git] / retrieval / d1_marc.c
index 84c6569..2f06142 100644 (file)
@@ -4,7 +4,16 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: d1_marc.c,v $
- * Revision 1.14  1999-08-27 09:40:32  adam
+ * Revision 1.17  2002-04-04 20:49:46  adam
+ * New functions yaz_is_abspath, yaz_path_fopen_base
+ *
+ * Revision 1.16  1999/11/30 13:47:12  adam
+ * Improved installation. Moved header files to include/yaz.
+ *
+ * Revision 1.15  1999/10/21 12:06:29  adam
+ * Retrieval module no longer uses ctype.h - functions.
+ *
+ * Revision 1.14  1999/08/27 09:40:32  adam
  * Renamed logf function to yaz_log. Removed VC++ project files.
  *
  * Revision 1.13  1998/10/13 16:09:52  adam
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
 
-#include <oid.h>
-#include <log.h>
-#include <marcdisp.h>
-#include <readconf.h>
-#include <xmalloc.h>
-#include <data1.h>
-#include <tpath.h>
+#include <yaz/oid.h>
+#include <yaz/log.h>
+#include <yaz/marcdisp.h>
+#include <yaz/readconf.h>
+#include <yaz/xmalloc.h>
+#include <yaz/data1.h>
+#include <yaz/tpath.h>
 
 data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
 {
@@ -78,7 +86,7 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
     int lineno = 0;
     int argc;
     
-    if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r")))
+    if (!(f = data1_path_fopen(dh, file, "r")))
     {
        yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
        return 0;
@@ -213,7 +221,7 @@ static char *get_data(data1_node *n, int *len)
     }
 
     *len = n->u.data.len;
-    while (*len && isspace(n->u.data.data[*len - 1]))
+    while (*len && d1_isspace(n->u.data.data[*len - 1]))
        (*len)--;
     return n->u.data.data;
 }