From 0d506d69fdf243b79ae24c9bf5fedcb3e265d3ce Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:00:40 +0000 Subject: [PATCH] lilypond-0.1.24 --- TODO | 3 +- VERSION | 2 +- flower/data-file.cc | 119 +++++++++++++++++++++++--------------------- 3 files changed, 65 insertions(+), 59 deletions(-) diff --git a/TODO b/TODO index b8615af6f3..96a9fa16a3 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,6 @@ grep for TODO and ugh/ugr * standchen: warning: Excentric column (Meter dims?) - * optimal pagebreaking. * put errorlevel in Input class @@ -69,7 +68,7 @@ PROJECTS - examples to go with it. * Spring_spacer: - - write a faster Spring_spacer ( without matrices if possible ) + - write a faster Spring_spacer (without matrices if possible) - use straight QP to find minimal "fitting force" - relate energybound to linelen unitspace fontsize etc. - used fixed point fp diff --git a/VERSION b/VERSION index b337cd5d37..5cdf9560bc 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 23 +TOPLEVEL_PATCH_LEVEL = 24 TOPLEVEL_MY_PATCH_LEVEL = # use the above to send patches, always empty for released version: diff --git a/flower/data-file.cc b/flower/data-file.cc index 251380d3c8..5a273c5dbb 100644 --- a/flower/data-file.cc +++ b/flower/data-file.cc @@ -1,97 +1,104 @@ +/* + data-file.cc -- implement Data_file + + source file of the Flower Library + + (c) '95, '96, '97 Han-Wen Nienhuys + + */ #include #include +#include "international.hh" #include "data-file.hh" -void +void Data_file::gobble_white() { char c; - + while ((c=data_get()) == ' ' ||c == '\t') - if (eof()) - break; + if (eof()) + break; data_unget (c); } String -Data_file::get_word() +Data_file::get_word() {// should handle escape seq's String s; - while (1) + while (1) + { + char c = data_get(); + + if (isspace (c) || eof()) { - char c = data_get(); - - if (isspace (c) || eof()) - { - data_unget (c); - break; - } - - - if (c == '\"') - { - rawmode= true; - - while ((c = data_get()) != '\"') - if (eof()) - error ("EOF in a string"); - else - s += c; - - - rawmode= false; - } - else - s += c; - } - - return s; + data_unget (c); + break; + } + + + if (c == '\"') + { + rawmode= true; + + while ((c = data_get()) != '\"') + if (eof()) + error (_("EOF in a string")); + else + s += c; + + + rawmode= false; + } + else + s += c; + } + + return s; } -/** get a char +/** get a char Only class member who uses text_file::get */ char Data_file::data_get() { - char c = get(); + char c = get(); if (!rawmode && c == '#') // gobble comment - { - while ((c = get()) != '\n' && !eof ()) - ; - return '\n'; - } + { + while ((c = get()) != '\n' && !eof ()) + ; + return '\n'; + } return c; } -/// read line, gobble '\n' -String Data_file::get_line() +/// read line, gobble '\n' +String Data_file::get_line() { - char c; + char c; String s; while ((c = data_get()) != '\n' && !eof ()) - s += c; - return s; + s += c; + return s; } -/// gobble stuff before first entry on a line. +/// gobble stuff before first entry on a line. void -Data_file::gobble_leading_white() +Data_file::gobble_leading_white() { // eat blank lines. - while (!eof()) + while (!eof()) { - char c = data_get(); - if (!isspace (c)) - { - data_unget (c); - break; - } + char c = data_get(); + if (!isspace (c)) + { + data_unget (c); + break; + } } } - - -- 2.39.5