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
Added turbo marcxml read and write
[yaz-moved-to-github.git]
/
ztest
/
read-marc.c
diff --git
a/ztest/read-marc.c
b/ztest/read-marc.c
index
da7f0a7
..
09fecc7
100644
(file)
--- a/
ztest/read-marc.c
+++ b/
ztest/read-marc.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-1578,6
+1578,9
@@
char *dummy_marc_record (int num, ODR odr)
inf = fopen ("dummy-records", "r");
if (!inf)
{ /* file not there. Get them from fixed array */
inf = fopen ("dummy-records", "r");
if (!inf)
{ /* file not there. Get them from fixed array */
+ if (num < 1)
+ return 0;
+ return marc_records[(num-1) % 24];
if (num < 1 || num > 24)
return 0;
return marc_records[num-1];
if (num < 1 || num > 24)
return 0;
return marc_records[num-1];
@@
-1619,6
+1622,7
@@
char *dummy_xml_record (int num, ODR odr)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab