]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-stream.cc
* input/regression/hairpin-dashed.ly: new file.
[lilypond.git] / lily / midi-stream.cc
index 95f956dea51ce5bb9a7367f07d41a7d6772b3eb9..1013a5068ac8a081121fea03969d2b4ed87f7066 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c)  1997--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 
 Midi_stream::Midi_stream (String filename)
 {
   filename_string_ = filename;
-  os_ = open_file_stream (filename, std::ios::out|std::ios::binary);
+  out_file_ = fopen (filename.to_str0(), "wb");
 }
 
 Midi_stream::~Midi_stream ()
 {
-  close_file_stream (os_);
+  fclose (out_file_);
 }
 
 Midi_stream&
@@ -33,14 +33,17 @@ Midi_stream::operator << (String str)
 {
   Byte * b = str.get_bytes ();
   for (int sz = str.length (); sz--;)
-    *os_ << *b ++;
+    {
+      fputc (*b, out_file_);
+      b++;
+    }
   return *this;
 }
 
 Midi_stream&
 Midi_stream::operator << (Midi_item const& midi_c_r)
 {
-  String str = midi_c_r.string ();
+  String str = midi_c_r.to_string ();
 
 
   if (midi_debug_global_b)
@@ -59,7 +62,10 @@ Midi_stream::operator << (Midi_item const& midi_c_r)
     {
       Byte * b = str.get_bytes ();
       for (int sz = str.length (); sz--;)
-       *os_ << *b++;
+       {
+         fputc (*b, out_file_);
+         b++;
+       }
     }
   
   return *this;