projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc7d1eb
)
Adjust marcdump so that it skips until record separator is read
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Mar 2007 12:45:02 +0000
(12:45 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 8 Mar 2007 12:45:02 +0000
(12:45 +0000)
util/marcdump.c
patch
|
blob
|
history
diff --git
a/util/marcdump.c
b/util/marcdump.c
index
b329696
..
c4b75ff
100644
(file)
--- a/
util/marcdump.c
+++ b/
util/marcdump.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: marcdump.c,v 1.48 2007-02-17 10:53:06 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];