lilypond-1.3.100
[lilypond.git] / flower / lib / text-db.cc
blobebfc992ff2d961a498dfc509a08412c655815b94
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) {
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());