X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fyaz-record-conv.c;h=86e2eb4bcde84a737cc1f94e1b928d27bcc56721;hp=4f943b6f6ad941ae3b6c0bf388c188fbb03da770;hb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35;hpb=0bd27325c14ad88221c6909231682f0cf1e777fa diff --git a/util/yaz-record-conv.c b/util/yaz-record-conv.c index 4f943b6..86e2eb4 100644 --- a/util/yaz-record-conv.c +++ b/util/yaz-record-conv.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ @@ -7,6 +7,7 @@ #include #endif +#include #include #include @@ -30,6 +31,7 @@ int main (int argc, char **argv) case 'V': break; case 0: +#if YAZ_HAVE_XML2 if (!p) { xmlDocPtr doc = xmlParseFile(arg); @@ -92,11 +94,19 @@ int main (int argc, char **argv) fclose(f); } break; +#else + fprintf(stderr, "%s: YAZ not compiled with Libxml2 support\n", + prog); + usage(); + break; +#endif default: usage(); } - } + } +#if YAZ_HAVE_XML2 yaz_record_conv_destroy(p); +#endif if (no_errors) exit(1); exit(0);