X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=data1%2Fd1_marc.c;h=a332b2a0bbbcd10e694cc332b54887c929ba2419;hp=1f9c8b8665cdcd09a3a9ade5e2e6ce4ab773d3cc;hb=85ad68ab178a261dc548284ee68aae9107cbfaaf;hpb=4884a9b3412dfd4c948c29b5f5275dfdf9b14207 diff --git a/data1/d1_marc.c b/data1/d1_marc.c index 1f9c8b8..a332b2a 100644 --- a/data1/d1_marc.c +++ b/data1/d1_marc.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + Copyright (C) 1994-2011 Index Data 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 @@ -19,6 +19,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA /* converts data1 tree to ISO2709/MARC record */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -189,7 +192,7 @@ static void get_data2(data1_node *n, int *len, char *dst, size_t max) } *len += n->u.data.len; } - if (n->which == DATA1N_tag) + if (n->which == DATA1N_tag && *len == 0) n = n->child; else if (n->which == DATA1N_data) n = n->next; @@ -477,6 +480,7 @@ char *data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab