Bugfix to allow #PQF and #CCL anchors to work in generated HTML
[yaz-moved-to-github.git] / retrieval / d1_marc.c
index f485ffb..e410b7c 100644 (file)
@@ -3,7 +3,7 @@
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
- * $Id: d1_marc.c,v 1.25 2002-08-28 12:44:35 adam Exp $
+ * $Id: d1_marc.c,v 1.27 2002-08-28 19:34:50 adam Exp $
  */
 
 
@@ -152,7 +152,6 @@ data1_marctab *data1_read_marctab (data1_handle dh, const char *file)
 static char *get_data(data1_node *n, int *len)
 {
     char *r;
-    data1_node *np = 0;
 
     while (n)
     {
@@ -172,6 +171,10 @@ static char *get_data(data1_node *n, int *len)
         }
         if (n->which == DATA1N_tag)
             n = n->child;
+       else if (n->which == DATA1N_data)
+            n = n->next;
+       else
+            break;     
     }
     r = "";
     *len = strlen(r);