From: fred Date: Wed, 9 Oct 1996 11:51:27 +0000 (+0000) Subject: flower-1.0.1 X-Git-Tag: release/1.5.59~7132 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=623989387c6f610e5d418930b1341792025d929e;p=lilypond.git flower-1.0.1 --- diff --git a/flower/textdb.cc b/flower/textdb.cc index 4dfdc876b3..4c10139583 100644 --- a/flower/textdb.cc +++ b/flower/textdb.cc @@ -1,11 +1,34 @@ #include "textdb.hh" +bool +Text_db::eof() +{ + Data_file::gobble_leading_white(); + return Data_file::eof(); +} + +void +Text_db::gobble_leading_white() +{ + while (1) { + Data_file::gobble_leading_white(); + if (eof()) + return ; + char c; + if ((c = data_get()) !='\n'){ + data_unget (c); + return ; + } + } +} + Text_record Text_db::get_record() { + while (1) { String s; svec fields; - gobble_leading_white(); + assert(!eof()); while ((s = get_word()) != "") { @@ -16,8 +39,10 @@ Text_db::get_record() if (get_line() != "") assert(false); - + + assert (fields.sz()); return Text_record(fields, get_name(), line()); + } }