]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/memory-stream.cc
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / flower / memory-stream.cc
index 3d29993486f8651f3a7a86f1c6a68174f7d6d2c1..863f4bd4def2de6fb785178de84d495ed70e9937 100644 (file)
@@ -3,12 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstring>
+#include <cstdlib>
+using namespace std;
 
 #include "memory-stream.hh"
 
@@ -17,7 +18,7 @@
 */
 const int Memory_out_stream::block_size_ = 1024;
 
-cookie_io_functions_t
+lily_cookie_io_functions_t
 Memory_out_stream::functions_
 = {
   Memory_out_stream::reader,
@@ -40,7 +41,11 @@ Memory_out_stream::Memory_out_stream ()
   size_ = 0;
   buffer_ = 0;
   buffer_blocks_ = 0;
+  file_ = 0;
+
+#if 0
   file_ = fopencookie ((void *) this, "w", functions_);
+#endif
 }
 
 Memory_out_stream::~Memory_out_stream ()
@@ -63,7 +68,7 @@ Memory_out_stream::get_length () const
   return size_;
 }
 
-const char *
+char const *
 Memory_out_stream::get_string () const
 {
   return buffer_;
@@ -71,7 +76,7 @@ Memory_out_stream::get_string () const
 
 ssize_t
 Memory_out_stream::writer (void *cookie,
-                          const char *buffer,
+                          char const *buffer,
                           size_t size)
 {
   Memory_out_stream *stream = (Memory_out_stream *) cookie;