lilypond-1.3.69
[lilypond.git] / flower / text-db.cc
blob61fb0529d60d3fce2930b96774d3fe9417ab7a88
1 #include <iostream.h>
2 #include "text-db.hh"
4 bool
5 Text_db::eof_b ()
7 Data_file::gobble_leading_white();
8 return Data_file::eof_b();
11 void
12 Text_db::gobble_leading_white()
14 while (1)
16 Data_file::gobble_leading_white();
17 if (eof_b ())
18 return ;
19 char c;
20 if ((c = data_get()) !='\n')
22 data_unget (c);
23 return ;
29 Text_record
30 Text_db::get_record()
32 while (1)
34 String s;
35 Array<String> fields;
36 assert (!eof_b ());
38 while ((s = get_word()) != "")
40 fields.push (s);
41 gobble_white();
45 if (get_line() != "")
46 assert (false);
48 assert (fields.size());
49 return Text_record (fields, get_name(), line ());
54 void
55 Text_record::message (String s)
57 cerr << '\n'<< filename << ": "<< line_no << s << "\n";