CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/08/18 10:58:05

Modified files:
        .              : ChangeLog 
        lily           : context-def.cc default-bar-line-engraver.cc 
                         percent-repeat-engraver.cc tie.cc 
                         timing-translator.cc 
        ly             : engraver-init.ly 

Log message:
        (instantiate): check for
        Engraver_group_engraver and Performer_group_performer not
        Engraver/Performer. Fixes crashes when doing \with { \consist .. }

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4029&tr2=1.4030&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/context-def.cc.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/default-bar-line-engraver.cc.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/percent-repeat-engraver.cc.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tie.cc.diff?tr1=1.141&tr2=1.142&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/timing-translator.cc.diff?tr1=1.94&tr2=1.95&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/engraver-init.ly.diff?tr1=1.243&tr2=1.244&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4029 lilypond/ChangeLog:1.4030
--- lilypond/ChangeLog:1.4029   Thu Aug 18 10:23:16 2005
+++ lilypond/ChangeLog  Thu Aug 18 10:58:04 2005
@@ -1,3 +1,9 @@
+2005-08-18  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * lily/context-def.cc (instantiate): check for
+       Engraver_group_engraver and Performer_group_performer not
+       Engraver/Performer. Fixes crashes when doing \with { \consist .. }
+ 
 2005-08-18  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * input/les-nereides.ly: Remove three fingering tweaks, update
@@ -33,6 +39,11 @@
        * Documentation/user/invoking.itely: update convert-ly bugs.
 
 2005-08-17  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): set timing
+       to #t.
+
+       * lily/timing-translator.cc (initialize): don't initialize timing.
 
        * input/regression/stem-spacing.ly (Module): remove file.
 
Index: lilypond/lily/context-def.cc
diff -u lilypond/lily/context-def.cc:1.46 lilypond/lily/context-def.cc:1.47
--- lilypond/lily/context-def.cc:1.46   Sat Aug 13 21:35:23 2005
+++ lilypond/lily/context-def.cc        Thu Aug 18 10:58:04 2005
@@ -336,9 +336,9 @@
   g->simple_trans_list_ = trans_list;
 
   context->implementation_ = g;
-  if (dynamic_cast<Engraver *> (g))
+  if (dynamic_cast<Engraver_group_engraver *> (g))
     g->simple_trans_list_ = filter_performers (g->simple_trans_list_);
-  else if (dynamic_cast<Performer *> (g))
+  else if (dynamic_cast<Performer_group_performer *> (g))
     g->simple_trans_list_ = filter_engravers (g->simple_trans_list_);
 
   g->context_ = context;
Index: lilypond/lily/default-bar-line-engraver.cc
diff -u lilypond/lily/default-bar-line-engraver.cc:1.5 
lilypond/lily/default-bar-line-engraver.cc:1.6
--- lilypond/lily/default-bar-line-engraver.cc:1.5      Fri Aug 12 00:04:47 2005
+++ lilypond/lily/default-bar-line-engraver.cc  Thu Aug 18 10:58:04 2005
@@ -28,14 +28,23 @@
 #include "translator.icc"
 
 ADD_TRANSLATOR (Default_bar_line_engraver,
-               "This engraver determines what kind of automatic bar lines 
should be produced, "
-               "and sets @code{whichBar} accordingly. It should be at the same 
"
+               "This engraver determines what kind of automatic bar "
+               "lines should be produced, "
+               "and sets @code{whichBar} "
+               "accordingly. It should be at the same "
                "level as @ref{Timing_translator}. ",
+               
                /* create */ "",
                /* accept */ "",
+
                /* read */
-               "measurePosition automaticBars whichBar barAlways 
defaultBarType "
-               "measureLength",
+               "automaticBars "
+               "barAlways "
+               "defaultBarType "
+               "measureLength "
+               "whichBar "
+               "measurePosition ",
+               
                /* write */ "automaticBars");
 
 Default_bar_line_engraver::Default_bar_line_engraver ()
Index: lilypond/lily/percent-repeat-engraver.cc
diff -u lilypond/lily/percent-repeat-engraver.cc:1.47 
lilypond/lily/percent-repeat-engraver.cc:1.48
--- lilypond/lily/percent-repeat-engraver.cc:1.47       Tue Aug 16 15:47:41 2005
+++ lilypond/lily/percent-repeat-engraver.cc    Thu Aug 18 10:58:04 2005
@@ -48,7 +48,8 @@
   Repeat_sign_type repeat_sign_type_;
 
   Item *double_percent_;
-  Item *double_percent_counter_; 
+  Item *double_percent_counter_;
+  
   Spanner *percent_;
   Spanner *percent_counter_;
   Spanner *finished_percent_;
@@ -95,9 +96,12 @@
       Moment now = now_mom ();
       start_mom_ = now;
       stop_mom_ = start_mom_ + Moment (total_count_) * body_length_;
-      next_moment_ = start_mom_ + body_length_;
+      next_moment_ = start_mom_;
+      next_moment_ += body_length_;
 
-      Moment meas_len (robust_scm2moment (get_property ("measureLength"), 
Moment (1)));
+      Moment meas_len (robust_scm2moment (get_property ("measureLength"),
+                                         Moment (1)));
+      
       if (meas_len == body_length_)
        repeat_sign_type_ = MEASURE;
       else if (Moment (2) * meas_len == body_length_)
Index: lilypond/lily/tie.cc
diff -u lilypond/lily/tie.cc:1.141 lilypond/lily/tie.cc:1.142
--- lilypond/lily/tie.cc:1.141  Fri Aug 12 00:04:45 2005
+++ lilypond/lily/tie.cc        Thu Aug 18 10:58:04 2005
@@ -214,8 +214,8 @@
   Bezier b = slur_shape (width, h_inf, r_0);
 
   /*
-    I think this better, particularly for small ties. It always allows the 
user to move ties if
-    they seem in the wrong place
+    I think this better, particularly for small ties. It always allows
+    the user to move ties if they seem in the wrong place
 
     TODO: what if 2 heads have different size.
 
Index: lilypond/lily/timing-translator.cc
diff -u lilypond/lily/timing-translator.cc:1.94 
lilypond/lily/timing-translator.cc:1.95
--- lilypond/lily/timing-translator.cc:1.94     Sat Aug 13 21:35:22 2005
+++ lilypond/lily/timing-translator.cc  Thu Aug 18 10:58:04 2005
@@ -19,14 +19,8 @@
 {
   Global_context *global = get_global_context ();
 
-  /* allbars == ! skipbars */
-  SCM sb = get_property ("skipBars");
-  bool allbars = !to_boolean (sb);
-
-  // urg: multi bar rests: should always process whole of first bar?
-  SCM tim = get_property ("timing");
-  bool timb = to_boolean (tim);
-  if (timb && allbars)
+  if (to_boolean (get_property ("timing"))
+      && !to_boolean (get_property ("skipBars")))
     {
       Moment barleft = (measure_length () - measure_position (context ()));
       Moment now = now_mom ();
@@ -44,12 +38,7 @@
 void
 Timing_translator::initialize ()
 {
-
-  /*
-    move this to engraver-init.ly?
-  */
   context ()->add_alias (ly_symbol2scm ("Timing"));
-  context ()->set_property ("timing", SCM_BOOL_T);
   context ()->set_property ("currentBarNumber", scm_from_int (1));
 
   context ()->set_property ("timeSignatureFraction",
@@ -58,8 +47,10 @@
     Do not init measurePosition; this should be done from global
     context.
   */
-  context ()->set_property ("measureLength", Moment (Rational 
(1)).smobbed_copy ());
-  context ()->set_property ("beatLength", Moment (Rational (1, 
4)).smobbed_copy ());
+  context ()->set_property ("measureLength",
+                           Moment (Rational (1)).smobbed_copy ());
+  context ()->set_property ("beatLength",
+                           Moment (Rational (1, 4)).smobbed_copy ());
 }
 
 Rational
Index: lilypond/ly/engraver-init.ly
diff -u lilypond/ly/engraver-init.ly:1.243 lilypond/ly/engraver-init.ly:1.244
--- lilypond/ly/engraver-init.ly:1.243  Mon Aug 15 18:28:41 2005
+++ lilypond/ly/engraver-init.ly        Thu Aug 18 10:58:04 2005
@@ -584,6 +584,8 @@
   instrumentTransposition = #(ly:make-pitch 0 0 0)
 
   verticallySpacedContexts = #'(Staff)
+
+  timing = ##t
 }
 
 


_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to