]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/text-db.cc
release: 1.5.10
[lilypond.git] / flower / text-db.cc
index e59748f665629698ff945a7ee210ed980650e5d2..6acfa9eeef89da5530fd71f604bf4f66e5af8451 100644 (file)
@@ -1,21 +1,23 @@
+#include <iostream.h>
 #include "text-db.hh"
+
 bool
 Text_db::eof_b ()
 {
-  Data_file::gobble_leading_white();
-  return  Data_file::eof_b();
+  Data_file::gobble_leading_white ();
+  return  Data_file::eof_b ();
 }
 
 void
-Text_db::gobble_leading_white()
+Text_db::gobble_leading_white ()
 {
   while (1) 
     {
-      Data_file::gobble_leading_white();
+      Data_file::gobble_leading_white ();
       if (eof_b ())
        return ;
       char c;
-      if  ((c = data_get()) !='\n')
+      if ((c = data_get ()) !='\n')
        {
          data_unget (c);
          return ;
@@ -25,7 +27,7 @@ Text_db::gobble_leading_white()
 
 
 Text_record
-Text_db::get_record() 
+Text_db::get_record () 
 {
   while (1) 
     {
@@ -33,19 +35,24 @@ Text_db::get_record()
       Array<String> fields;
       assert (!eof_b ());
        
-      while ((s = get_word()) != "")
+      while ((s = get_word ()) != "")
        {
          fields.push (s);      
-         gobble_white();
+         gobble_white ();
        }
             
 
-      if (get_line() != "")
+      if (get_line () != "")
        assert (false);
     
-      assert (fields.size());
-      return Text_record (fields, get_name(), line ());
+      assert (fields.size ());
+      return Text_record (fields, get_name (), line ());
     }
 }
 
 
+void
+Text_record::message (String s)
+{
+  cerr << '\n'<< filename << ": "<< line_no << s << "\n";
+}