projects
/
idzebra-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:
3165714
)
Fixed error for MARC field, which has fixed lenght.
author
oleg
<oleg>
Wed, 5 Mar 2003 11:12:18 +0000
(11:12 +0000)
committer
oleg
<oleg>
Wed, 5 Mar 2003 11:12:18 +0000
(11:12 +0000)
recctrl/marcread.c
patch
|
blob
|
history
diff --git
a/recctrl/marcread.c
b/recctrl/marcread.c
index
f168081
..
c112f9c
100644
(file)
--- a/
recctrl/marcread.c
+++ b/
recctrl/marcread.c
@@
-1,4
+1,4
@@
-/* $Id: marcread.c,v 1.18 2003-02-28 12:33:39 oleg Exp $
+/* $Id: marcread.c,v 1.19 2003-03-05 11:12:18 oleg Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
Index Data Aps
@@
-525,8
+525,16
@@
static data1_node *cat_field(struct grs_read_info *p, mc_field *pf, char *buf, d
if (!pf->list && subfield->which == DATA1N_data)
{
int len;
if (!pf->list && subfield->which == DATA1N_data)
{
int len;
-
- strcat(buf, get_data(field, &len));
+
+ if (pf->interval.start == -1)
+ {
+ strcat(buf, get_data(field, &len));
+ }
+ else
+ {
+ strncat(buf, get_data(field, &len)+pf->interval.start,
+ pf->interval.end-pf->interval.start+1);
+ }
#if MARCOMP_DEBUG
logf(LOG_LOG, "cat_field(): got buffer {%s}", buf);
#endif
#if MARCOMP_DEBUG
logf(LOG_LOG, "cat_field(): got buffer {%s}", buf);
#endif