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
Reformatting
[yaz-moved-to-github.git]
/
util
/
marcdump.c
diff --git
a/util/marcdump.c
b/util/marcdump.c
index
cb72a84
..
662445e
100644
(file)
--- a/
util/marcdump.c
+++ b/
util/marcdump.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: marcdump.c,v 1.55 2007-12-18 21:13:06 adam Exp $
*/
#define _FILE_OFFSET_BITS 64
*/
#define _FILE_OFFSET_BITS 64
@@
-334,7
+332,11
@@
static void dump(const char *fname, const char *from, const char *to,
r = yaz_marc_decode_buf(mt, buf, -1, &result, &len_result);
if (r > 0 && result)
{
r = yaz_marc_decode_buf(mt, buf, -1, &result, &len_result);
if (r > 0 && result)
{
- fwrite (result, len_result, 1, stdout);
+ if (fwrite(result, len_result, 1, stdout) != 1)
+ {
+ fprintf(stderr, "Write to stdout failed\n");
+ break;
+ }
}
if (r > 0 && cfile)
{
}
if (r > 0 && cfile)
{