CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/07/19 14:06:36
Modified files:
. : ChangeLog
buildscripts : mf-to-table.py
lily : forbid-break-engraver.cc grob-pq-engraver.cc
system.cc
Log message:
* lily/grob-pq-engraver.cc (stop_translation_timestep): save up
all acknowledged grobs, and do potentially expensive merge and
write in one go.
* buildscripts/mf-to-table.py (write_fontlist): enforce noBreak.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3894&tr2=1.3895&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/buildscripts/mf-to-table.py.diff?tr1=1.76&tr2=1.77&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/forbid-break-engraver.cc.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grob-pq-engraver.cc.diff?tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/system.cc.diff?tr1=1.110&tr2=1.111&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3894 lilypond/ChangeLog:1.3895
--- lilypond/ChangeLog:1.3894 Tue Jul 19 12:57:28 2005
+++ lilypond/ChangeLog Tue Jul 19 14:06:34 2005
@@ -1,5 +1,11 @@
2005-07-19 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * lily/grob-pq-engraver.cc (stop_translation_timestep): save up
+ all acknowledged grobs, and do potentially expensive merge and
+ write in one go.
+
+ * buildscripts/mf-to-table.py (write_fontlist): enforce noBreak.
+
* configure.in (reloc_b): add --enable-static-gxx to statically
link to libstdc++
Index: lilypond/buildscripts/mf-to-table.py
diff -u lilypond/buildscripts/mf-to-table.py:1.76
lilypond/buildscripts/mf-to-table.py:1.77
--- lilypond/buildscripts/mf-to-table.py:1.76 Tue Apr 19 17:18:10 2005
+++ lilypond/buildscripts/mf-to-table.py Tue Jul 19 14:06:36 2005
@@ -211,7 +211,9 @@
file.write (''' \\markup { \\raise #0.75 \\vcenter
\\musicglyph #"%s"
- \\typewriter " %s" } 4\n''' % (scm_string, scm_string))
+ \\typewriter " %s" } 4
+ \\noBreak
+ ''' % (scm_string, scm_string))
if (count % per_line) == 0:
file.write (' \\skip 8 \\break\n')
Index: lilypond/lily/forbid-break-engraver.cc
diff -u lilypond/lily/forbid-break-engraver.cc:1.20
lilypond/lily/forbid-break-engraver.cc:1.21
--- lilypond/lily/forbid-break-engraver.cc:1.20 Mon Jul 18 23:37:24 2005
+++ lilypond/lily/forbid-break-engraver.cc Tue Jul 19 14:06:36 2005
@@ -13,6 +13,8 @@
#include "duration.hh"
#include "moment.hh"
+#include "translator.icc"
+
class Forbid_line_break_engraver : public Engraver
{
public:
@@ -20,7 +22,9 @@
PRECOMPUTED_VIRTUAL void start_translation_timestep ();
};
-Forbid_line_break_engraver::Forbid_line_break_engraver (){}
+Forbid_line_break_engraver::Forbid_line_break_engraver ()
+{
+}
void
Forbid_line_break_engraver::start_translation_timestep ()
@@ -37,7 +41,7 @@
while (scm_is_pair (busy))
{
Grob *g = unsmob_grob (scm_cdar (busy));
- if (Rhythmic_head::has_interface (g))
+ if (g->internal_has_interface (ly_symbol2scm
("rhythmic-grob-interface")))
{
get_score_engraver ()->forbid_breaks ();
}
@@ -45,7 +49,6 @@
}
}
-#include "translator.icc"
ADD_TRANSLATOR (Forbid_line_break_engraver,
/* descr */ "Forbid line breaks when note heads are still
playing at some point.",
Index: lilypond/lily/grob-pq-engraver.cc
diff -u lilypond/lily/grob-pq-engraver.cc:1.36
lilypond/lily/grob-pq-engraver.cc:1.37
--- lilypond/lily/grob-pq-engraver.cc:1.36 Mon Jul 18 23:37:24 2005
+++ lilypond/lily/grob-pq-engraver.cc Tue Jul 19 14:06:36 2005
@@ -11,6 +11,17 @@
#include "grob.hh"
#include "warn.hh"
+struct Grob_pq_entry
+{
+ Grob *grob_;
+ Moment end_;
+ static int compare (Grob_pq_entry const &a,
+ Grob_pq_entry const &b)
+ {
+ return Moment::compare (a.end_, b.end_);
+ }
+};
+
class Grob_pq_engraver : public Engraver
{
public:
@@ -20,6 +31,8 @@
virtual void acknowledge_grob (Grob_info);
PRECOMPUTED_VIRTUAL void start_translation_timestep ();
PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
+
+ Array<Grob_pq_entry> started_now_;
};
Grob_pq_engraver::Grob_pq_engraver ()
@@ -64,13 +77,12 @@
}
Moment end = n + l;
- SCM lst = scm_acons (end.smobbed_copy (),
- gi.grob ()->self_scm (),
- SCM_EOL);
-
- SCM busy = get_property ("busyGrobs");
- busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
- context ()->set_property ("busyGrobs", busy);
+
+ Grob_pq_entry e;
+ e.grob_ = gi.grob ();
+ e.end_ = end;
+
+ started_now_.push (e);
}
}
@@ -85,8 +97,21 @@
busy = scm_cdr (busy);
}
- if (start_busy != busy)
- context ()->set_property ("busyGrobs", busy);
+ started_now_.sort (Grob_pq_entry::compare);
+ SCM lst = SCM_EOL;
+ SCM *tail = &lst;
+ for (int i = 0; i < started_now_.size (); i++)
+ {
+ *tail = scm_acons (started_now_[i].end_.smobbed_copy (),
+ started_now_[i].grob_->self_scm (),
+ SCM_EOL);
+ tail = SCM_CDRLOC(*tail);
+ }
+
+ busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
+ context ()->set_property ("busyGrobs", busy);
+
+ started_now_.clear ();
}
void
@@ -113,13 +138,9 @@
ADD_TRANSLATOR (Grob_pq_engraver,
- /* descr */ "Administrate when certain grobs (eg. note heads)
stop playing; this \
-engraver is a sort-of a failure, since it doesn't handle all sorts of \
-borderline cases very well. \
-",
-
- /* creats*/ "",\
- /* accepts */ "",\
- /* acks */ "grob-interface",\
- /* reads */ "busyGrobs",\
+ /* descr */ "Administrate when certain grobs (eg. note heads)
stop playing",
+ /* creats*/ "",
+ /* accepts */ "",
+ /* acks */ "grob-interface",
+ /* reads */ "busyGrobs",
/* write */ "busyGrobs");
Index: lilypond/lily/system.cc
diff -u lilypond/lily/system.cc:1.110 lilypond/lily/system.cc:1.111
--- lilypond/lily/system.cc:1.110 Tue Jul 19 00:41:14 2005
+++ lilypond/lily/system.cc Tue Jul 19 14:06:36 2005
@@ -310,7 +310,9 @@
Interval iv (extent (this, Y_AXIS));
if (iv.is_empty ())
- programming_error ("system with zero extent");
+ {
+ programming_error ("system with empty extent");
+ }
else
translate_axis (-iv[MAX], Y_AXIS);
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs