projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ZOOM-C async reconnection.
[yaz-moved-to-github.git]
/
util
/
marcdump.c
diff --git
a/util/marcdump.c
b/util/marcdump.c
index
8e9c4d8
..
c4b75ff
100644
(file)
--- a/
util/marcdump.c
+++ b/
util/marcdump.c
@@
-1,8
+1,8
@@
/*
/*
- * Copyright (C) 1995-2006, Index Data ApS
+ * Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* See the file LICENSE for details.
*
- * $Id: marcdump.c,v 1.46 2006-12-18 10:33:52 adam Exp $
+ * $Id: marcdump.c,v 1.49 2007-03-08 12:45:02 adam Exp $
*/
#define _FILE_OFFSET_BITS 64
*/
#define _FILE_OFFSET_BITS 64
@@
-235,6
+235,15
@@
static void dump(const char *fname, const char *from, const char *to,
r = fread (buf + 5, 1, rlen, inf);
if (r < rlen)
break;
r = fread (buf + 5, 1, rlen, inf);
if (r < rlen)
break;
+ while (buf[len-1] != ISO2709_RS)
+ {
+ if (len > sizeof(buf)-2)
+ break;
+ r = fread (buf + len, 1, 1, inf);
+ if (r != 1)
+ break;
+ len++;
+ }
if (split_fname)
{
char fname[256];
if (split_fname)
{
char fname[256];
@@
-341,6
+350,15
@@
int main (int argc, char **argv)
fprintf(stderr, "%s: bad input format: %s\n", prog, arg);
exit(1);
}
fprintf(stderr, "%s: bad input format: %s\n", prog, arg);
exit(1);
}
+#if YAZ_HAVE_XML2
+#else
+ if (input_format == YAZ_MARC_MARCXML
+ || input_format == YAZ_MARC_XCHANGE)
+ {
+ fprintf(stderr, "%s: Libxml2 support not enabled\n", prog);
+ exit(3);
+ }
+#endif
break;
case 'o':
/* dirty hack so we can make Libxml2 do the writing ..
break;
case 'o':
/* dirty hack so we can make Libxml2 do the writing ..