yaz-ztest returns dummy OPAC records.
[yaz-moved-to-github.git] / ztest / read-marc.c
index 82abe54..afd6272 100644 (file)
@@ -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.
- *
- * $Id: read-marc.c,v 1.9 2007-03-19 14:40:08 adam Exp $
  */
 
 /*
@@ -1574,12 +1572,6 @@ char *dummy_marc_record (int num, ODR odr)
     FILE *inf;
     char *buf = 0;
 
-    if (num == 98) 
-    {   /* this will generate a very bad MARC record (testing only) */
-        buf = (char*) odr_malloc(odr, 2101);
-        memset(buf, '7', 2100);
-        buf[2100] = '\0';
-    }
     inf = fopen ("dummy-records", "r");
     if (!inf) 
     { /* file not there. Get them from fixed array */
@@ -1614,7 +1606,7 @@ char *dummy_xml_record (int num, ODR odr)
     len = yaz_marc_decode_buf (mt, rec, -1, &result, &rlen);
     if (len > 1)
     {
-        rec = odr_malloc(odr, rlen+1);
+        rec = (char *) odr_malloc(odr, rlen+1);
         memcpy(rec, result, rlen);
         rec[rlen] = '\0';
     }