lilypond-0.1.57
[lilypond.git] / flower / text-db.cc
blobfef860eb31cb77de92c87d64b973130d60d0fab9
1 #include "text-db.hh"
2 bool
3 Text_db::eof()
5 Data_file::gobble_leading_white();
6 return Data_file::eof();
9 void
10 Text_db::gobble_leading_white()
12 while (1)
14 Data_file::gobble_leading_white();
15 if (eof())
16 return ;
17 char c;
18 if ((c = data_get()) !='\n')
20 data_unget (c);
21 return ;
27 Text_record
28 Text_db::get_record()
30 while (1)
32 String s;
33 Array<String> fields;
34 assert (!eof());
36 while ((s = get_word()) != "")
38 fields.push (s);
39 gobble_white();
43 if (get_line() != "")
44 assert (false);
46 assert (fields.size());
47 return Text_record (fields, get_name(), line ());