Update headers and omit CVS Ids.
[yaz-moved-to-github.git] / client / fhistory.c
index b75c03d..21f9b6f 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: fhistory.c,v 1.2 2007-01-24 23:09:48 adam Exp $
  */
 /** \file fhistory.c
  *  \brief file history implementation
@@ -26,7 +24,7 @@ struct file_history {
 
 file_history_t file_history_new()
 {
-    file_history_t fh = xmalloc(sizeof(*fh));
+    file_history_t fh = (file_history_t) xmalloc(sizeof(*fh));
     fh->wr = wrbuf_alloc();
     return fh;
 }
@@ -111,7 +109,7 @@ int file_history_trav(file_history_t fh, void *client_data,
             if (wrbuf_buf(fh->wr)[i] == '\n')
             {
                 wrbuf_buf(fh->wr)[i] = '\0';
-                callback(client_data, wrbuf_buf(fh->wr) + off);
+                callback(client_data, wrbuf_cstr(fh->wr) + off);
                 wrbuf_buf(fh->wr)[i] = '\n';
                 i++;
                 break;