]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-stream.cc
patch::: 1.3.107.mb1: Re: lily 1.3.107
[lilypond.git] / lily / paper-stream.cc
index 2f791019ad5c7550a1bbd3669a0d1d7d40e9b2a4..caab11e504165cba9cb576816bed4422407a7e35 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <fstream.h>
@@ -22,10 +22,10 @@ Paper_stream::Paper_stream (String filename)
     //    os = new ostream (cout.ostreambuf ());
     os = new ostream (cout._strbuf);
   if (!*os)
-    error (_f ("Can't open file: `%s'", filename));
+    error (_f ("can't open file: `%s'", filename));
   nest_level = 0;
   line_len_i_ = 0;
-  outputting_comment=false;
+  outputting_comment_b_=false;
 }
 
 Paper_stream::~Paper_stream ()
@@ -42,17 +42,17 @@ Paper_stream::~Paper_stream ()
 
 // print string. don't forget indent.
 Paper_stream&
-Paper_stream::operator << (Scalar s)
+Paper_stream::operator << (String s)
 {
   for (char const *cp = s.ch_C (); *cp; cp++)
     {
-      if (outputting_comment)
+      if (outputting_comment_b_)
        {
          *os << *cp;
          if (*cp == '\n')
            {
-             outputting_comment=false;
-
+             outputting_comment_b_=false;
+             line_len_i_ =0;
            }
          continue;
        }
@@ -60,7 +60,7 @@ Paper_stream::operator << (Scalar s)
       switch (*cp)
        {
        case '%':
-         outputting_comment = true;
+         outputting_comment_b_ = true;
          *os << *cp;
          break;
        case '{':
@@ -108,6 +108,7 @@ Paper_stream::break_line ()
 {
   *os << '\n';
   *os << to_str (' ', nest_level);
+  outputting_comment_b_ = false;
   line_len_i_ = 0;
 }