source file of the GNU LilyPond music typesetter
- (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2008 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"
*/
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,
size_ = 0;
buffer_ = 0;
buffer_blocks_ = 0;
+ file_ = 0;
+
+#if 0
file_ = fopencookie ((void *) this, "w", functions_);
+#endif
}
Memory_out_stream::~Memory_out_stream ()
return size_;
}
-const char *
+char const *
Memory_out_stream::get_string () const
{
return buffer_;
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;