X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_marc.c;h=e410b7c73741077b04e0ee2bd6930fe04b5d02ad;hb=6b7929b5e5663fb9a768b11aeaa3f930691e6ece;hp=5c156011c7e29f9a6b174da9ae48fa4b0e7c8dbb;hpb=9fa5e9b2a5a3ba0644178d5ed85869a31ffe59f2;p=yaz-moved-to-github.git diff --git a/retrieval/d1_marc.c b/retrieval/d1_marc.c index 5c15601..e410b7c 100644 --- a/retrieval/d1_marc.c +++ b/retrieval/d1_marc.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: d1_marc.c,v 1.24 2002-08-23 14:27:18 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) { @@ -171,13 +170,11 @@ static char *get_data(data1_node *n, int *len) return n->u.data.data + i; } if (n->which == DATA1N_tag) - np = n->child; - n = n->next; - if (!n) - { - n = np; - np = 0; - } + n = n->child; + else if (n->which == DATA1N_data) + n = n->next; + else + break; } r = ""; *len = strlen(r);