From: Han-Wen Nienhuys Date: Tue, 5 Apr 2005 10:22:50 +0000 (+0000) Subject: * lily/time-signature-performer.cc (derived_mark): new function. X-Git-Tag: release/2.5.18~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1ec8c86973885b0bd6c1bc84662606e7563f2ab3;p=lilypond.git * lily/time-signature-performer.cc (derived_mark): new function. * scripts/lilypond-book.py (find_linestarts): new function. (find_toplevel_snippets): keep track of line numbers. --- diff --git a/ChangeLog b/ChangeLog index 4b504977fb..aa5fe5bacd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-04-05 Han-Wen Nienhuys + * lily/time-signature-performer.cc (derived_mark): new function. + * lily/lily-parser-scheme.cc: print mapped file name for progress * scripts/lilypond-book.py (find_linestarts): new function. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index b2d3a33272..e540e55615 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -30,6 +30,11 @@ See user manual, \NAME\ @itemize @bullet + +@item +@file{lilypond-book} now makes @file{lilypond} print line numbers +relative to the input file for every error message. + @item A new @code{\circle} markup command allows for all kinds of circled texts diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 13760ce36a..d4c1c3bd5e 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -27,9 +27,12 @@ void Spaceable_grob::add_rod (Grob *me, Grob *p, Real d) { // printf ("rod %lf\n", d); - if (isinf (d) || d < 0) + if (d < 0) + return ; + + if (isinf (d)) { - programming_error ("Weird rod"); + programming_error ("Infinite rod"); } SCM mins = get_minimum_distances (me); diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index b02a15bfa7..397b3cf653 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -8,6 +8,7 @@ #include "audio-item.hh" #include "performer.hh" +#include "protected-scm.hh" class Time_signature_performer : public Performer { @@ -19,13 +20,19 @@ protected: virtual void stop_translation_timestep (); virtual void create_audio_elements (); - + virtual void derived_mark () const; SCM prev_fraction_; private: Audio_time_signature *audio_; }; +void +Time_signature_performer::derived_mark () const +{ + scm_gc_mark (prev_fraction_); +} + Time_signature_performer::Time_signature_performer () { prev_fraction_ = SCM_BOOL_F; diff --git a/scm/backend-library.scm b/scm/backend-library.scm index f162ea97d7..55d19f28d9 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -90,7 +90,7 @@ (if (member x formats) (set! new-fmts (cons x new-fmts)))) '("tex" "dvi" "ps" "pdf" "png")) - (reverse new-fmts)) + (uniq-list (reverse new-fmts))) (define (header-to-file file-name key value) (set! key (symbol->string key)) diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 1e0deba205..ee072d05ac 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -281,7 +281,8 @@ (display "%%Trailer\n%%EOF\n" port) (ly:outputter-close outputter) - (postprocess-output book framework-ps-module filename (ly:output-formats)) + (postprocess-output book framework-ps-module filename + (completize-formats (ly:output-formats))) )) (if (not (defined? 'nan?)) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 5b24c8e0a6..bb90debaf7 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1088,13 +1088,14 @@ def find_toplevel_snippets (s, types): if snippet_type_to_class.has_key (type): cl = snippet_type_to_class[type] + + start = index + m.start ('match') line_number = line_start_idx - while (line_starts[line_number] < index): + while (line_starts[line_number] < start): line_number += 1 line_number += 1 snip = cl (type, m, format, line_number) - start = index + m.start ('match') found[type] = (start, snip) if found[type] \