lilypond-1.1.49
[lilypond.git] / flower / textdb.cc
blobeefea162405ca9849553805c7f53f6b2c371d12f
1 #include "textdb.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) {
13 Data_file::gobble_leading_white();
14 if (eof())
15 return ;
16 char c;
17 if ((c = data_get()) !='\n'){
18 data_unget (c);
19 return ;
25 Text_record
26 Text_db::get_record()
28 while (1) {
29 String s;
30 Array<String> fields;
31 assert(!eof());
33 while ((s = get_word()) != "")
35 fields.push(s);
36 gobble_white();
40 if (get_line() != "")
41 assert(false);
43 assert (fields.size());
44 return Text_record(fields, get_name(), line());