From 9030e9cf342056c55c10cb4225e464c52e9dde0c Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:42:51 +0000 Subject: [PATCH] lilypond-0.0.62 --- flower/.version | 2 +- flower/NEWS | 46 ++++++++++++++++++++++++------------------- lily/include/break.hh | 4 ++++ lily/wordwrap.cc | 14 ++++++++----- 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/flower/.version b/flower/.version index 0801c617c1..10b5619315 100644 --- a/flower/.version +++ b/flower/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 15 +PATCH_LEVEL = 16 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/NEWS b/flower/NEWS index 2da3968aa2..727d9e2487 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,63 +1,69 @@ -pl 1.1.15 +version 1.1: + +pl 16 + - Array::get() + - P< > doco. + +pl 15 - #ifndef fixes (MB) - Dstream::clear () -pl 1.1.14 +pl 14 - interval methods -pl 1.1.13 +pl 13 - better test-bed - Heap PQueue implementation -pl 1.1.12 +pl 12 - No path search for "" and "-" -pl 1.1.11 +pl 11 - template<> class P - assoc elem() methods -pl 1.1.10 +pl 10 - Matrix_storage naming - Matrix_storage::try_right_multiply to help speed up matrix multiply routines. -pl 1.1.9 +pl 9 - _C iso _c_l - flower-debug. -pl 1.1.8 +pl 8 -pl 1.1.7 +pl 7 - PQueue blondification. - String_convert::i2hex_str fix, unsigned eqvs introduced - long long depreciated, now named I64 - type I32 introduced. should be used iso int where 32 bits are needed(or, brr, assumed...) -pl 1.1.6-2 +pl 6-2 Bugfix - silly String( int... ) -> String( (char)... ) fix really should junk ambiguous constructor overload -pl 1.1.6-1 +pl 6-1 Bugfix - small but nasty include/fversion.hh fixed -pl 1.1.6 - - all of 1.1.4-1 and 1.1.5 +pl 6 + - all of 4-1 and 5 Bugfix - null_terminated -> is_binary test -pl 1.1.5 +pl 5 - memmem interface, conditional compilation - snprintf -pl 1.1.4-1 +pl 4-1 - included in new make structure, as a library of lilypond; for compiling you-ll need ../make and ../bin dirs from lilypond... -pl 1.1.4 +pl 4 - great file-renaming. - String cleanup (binary <-> null terminate), several bugfixes - great renaming of String and String_convert interfaces @@ -65,19 +71,19 @@ pl 1.1.4 - String indexing now all base = 0, not found = -1 - renamed by to byte -pl 1.1.3 +pl 3 - String::mid - memmove test code -pl 1.1.2 +pl 2 - StringConversio::bin2int_i - dumb prioq -pl 1.1.1 +pl 1 - separated StringHandle and StringData - String::compare -1.1.0: +0: ------------------ diff --git a/lily/include/break.hh b/lily/include/break.hh index 72f0edf39b..343903313f 100644 --- a/lily/include/break.hh +++ b/lily/include/break.hh @@ -41,6 +41,10 @@ struct Break_algorithm { bool feasible(Line_of_cols)const; virtual Array solve()=0; + + /** generate a solution with no regard to idealspacings or + constraints. should always work */ + Col_hpositions stupid_solution(Line_of_cols) const; }; /// wordwrap type algorithm: move to next line if current is optimal. diff --git a/lily/wordwrap.cc b/lily/wordwrap.cc index 3738235df9..2fd2fc4e94 100644 --- a/lily/wordwrap.cc +++ b/lily/wordwrap.cc @@ -39,17 +39,21 @@ Word_wrap::solve() // try to solve if (!feasible(current.cols)) { - if (!minimum.cols.size()) - error("sorry, this measure is too long, breakpoint: " - + String(break_idx_i) ); - current.energy = INFTY; // make sure we go back + if (!minimum.cols.size()) { + warning("Ugh, this measure is too long, breakpoint: " + + String(break_idx_i) + + " (generating stupido solution)"); + current = stupid_solution(current.cols); + current.energy = - 1; // make sure we break out. + } else + current.energy = INFTY; // make sure we go back } else { current = solve_line(current.cols); current.print(); } // update minimum, or backup. - if (current.energy < minimum.energy) { + if (current.energy < minimum.energy || current.energy < 0) { minimum = current; } else { // we're one col too far. break_idx_i--; -- 2.39.5