]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/dstream.cc
patch::: 1.3.31: Re: Problems with LilyPond
[lilypond.git] / flower / dstream.cc
index 0b7be148c803acfda01d170a86fecca18006b9ac..72b3d248db2c408648c87b4b1d8c6852353c0597 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the Flower Library
 
-  (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996, 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <fstream.h>
 #include "dictionary-iter.hh"
 #include "dstream.hh"
-#include "scalar.hh"
+
 #include "text-db.hh"
 #include "string-convert.hh"
 #include "rational.hh"
@@ -86,7 +86,7 @@ Dstream::operator<<(void const *v_l)
 }
 
 Dstream &
-Dstream::operator <<(Scalar s)
+Dstream::operator <<(String s)
 {
   output (s);
   return *this;
@@ -99,6 +99,32 @@ Dstream::operator <<(const char * s)
   return *this;
 }
 
+Dstream &
+Dstream::operator <<(char c)
+{
+  output (to_str (c));
+  return *this;
+}
+
+Dstream&
+Dstream::operator << (Real r)
+{
+  output (to_str  (r));
+  return *this;
+}
+Dstream &
+Dstream::operator <<(Rational c)
+{
+  output (c.str ());
+  return *this;
+}
+Dstream &
+Dstream::operator <<(int i)
+{
+  output (to_str(i));
+  return *this;
+}
+  
 void
 Dstream::output (String s)
 {
@@ -155,10 +181,10 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
     Text_record  r (cfg++);
     if (r.size() != 2)
       {
-       r.message (_ ("Not enough fields in Dstream init."));
+       r.message (_ ("not enough fields in Dstream init"));
        continue;
       }
-    (*silent_dict_p_)[r[0]] = (bool)(int)(Scalar (r[1]));
+    (*silent_dict_p_)[r[0]] = r[1] == "1";
   }
 
   if ((*silent_dict_p_).elem_b ("Dstream_default_silence"))