Back-ported the rsbetween from zebra 1.4
[idzebra-moved-to-github.git] / data1 / d1_espec.c
index fba103f..d27d530 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: d1_espec.c,v 1.2 2002-10-22 13:19:50 adam Exp $
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+/* $Id: d1_espec.c,v 1.2.2.2 2004-10-12 16:47:38 quinn Exp $
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
 This file is part of the Zebra server.
@@ -200,6 +200,8 @@ static Z_ETagUnit *read_tagunit(char *buf, NMEM nmem,
        else
            t->occurrences = 0;
     }
+    else
+       return 0;
     return u;
 }
 
@@ -216,6 +218,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
     char *argv[50], line[512];
     Z_Espec1 *res = (Z_Espec1 *)nmem_malloc(nmem, sizeof(*res));
     
+    yaz_log(LOG_DEBUG, "Espec1 reading file '%s'", file);
     if (!(f = data1_path_fopen(dh, file, "r")))
     {
        yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
@@ -298,6 +301,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
            char *ep;
            int num, i = 0;
            
+           yaz_log(LOG_DEBUG, "Simpleelemnt: '%s'", line);
            if (!res->elements)
                res->elements = (Z_ElementRequest **)
                    nmem_malloc(nmem, size_esn = 24*sizeof(er));