]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/memory-stream.hh
Run `make grand-replace'.
[lilypond.git] / flower / include / memory-stream.hh
index 822c4470d2416c29f4f4be4fed24db47e79be478..ab8a183a6faf3ac1a6044a9f695053017f7fb7fa 100644 (file)
@@ -1,22 +1,21 @@
 /*
-  memory-stream.hh -- declare
+  memory-stream.hh -- declare Memory_out_stream
 
   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>
 */
 
 #ifndef MEMORY_STREAM_HH
 #define MEMORY_STREAM_HH
 
-#include <stdio.h>
+#include <cstdio>
 #include <unistd.h>
+using namespace std;
 
+#include "libc-extension.hh"
+#include "file-cookie.hh"
 
-/*
-  TODO: read support as well.
- */
 class Memory_out_stream
 {
   char *buffer_;
@@ -24,20 +23,19 @@ class Memory_out_stream
   int buffer_blocks_;
   FILE *file_;
 
-  static cookie_io_functions_t functions_;
+  static lily_cookie_io_functions_t functions_;
   static const int block_size_;
 
-  static ssize_t reader (void*, char*,  size_t);
-  static ssize_t writer (void*, const char*,  size_t);
-  static int seeker (void*, off64_t *, int whence);
-  static int cleaner (void*);
-
-
 public:
-  ~Memory_out_stream ();
+  static ssize_t reader (void *, char *, size_t);
+  static ssize_t writer (void *, char const *, size_t);
+  static int seeker (void *, off64_t *, int);
+  static int cleaner (void *);
+
   Memory_out_stream ();
+  ~Memory_out_stream ();
   FILE *get_file () const;
-  char const *get_string() const;
+  char const *get_string () const;
   ssize_t get_length () const;
 };