Fix sample PQF
[yaz-moved-to-github.git] / util / marcdisp.c
index 3259d6c..b728872 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1995-2002, Index Data
+ * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: marcdisp.c,v 1.27 2002-12-17 13:32:04 adam Exp $
+ * $Id: marcdisp.c,v 1.30 2003-07-14 12:59:23 adam Exp $
  */
 
 #if HAVE_CONFIG_H
@@ -24,7 +24,7 @@ struct yaz_marc_t_ {
 
 yaz_marc_t yaz_marc_create(void)
 {
-    yaz_marc_t mt = xmalloc(sizeof(*mt));
+    yaz_marc_t mt = (yaz_marc_t) xmalloc(sizeof(*mt));
     mt->xml = YAZ_MARC_LINE;
     mt->debug = 0;
     mt->m_wr = wrbuf_alloc();
@@ -56,6 +56,12 @@ static void marc_cdata (yaz_marc_t mt, const char *buf, size_t len, WRBUF wr)
             case '&':
                 wrbuf_puts(wr, "&");
                 break;
+           case '"':
+               wrbuf_puts(wr, """);
+               break;
+           case '\'':
+               wrbuf_puts(wr, "'");
+               break;
             default:
                 wrbuf_putc(wr, buf[i]);
             }