CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/05/29 09:56:01

Modified files:
        .              : ChangeLog 
        lily           : context-def.cc timing-engraver.cc 

Log message:
        * lily/timing-engraver.cc (process_music): robustness fix.
        
        * lily/context-def.cc (filter_engravers): bugfix.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3673&tr2=1.3674&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/context-def.cc.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/timing-engraver.cc.diff?tr1=1.59&tr2=1.60&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3673 lilypond/ChangeLog:1.3674
--- lilypond/ChangeLog:1.3673   Sat May 28 20:01:54 2005
+++ lilypond/ChangeLog  Sun May 29 09:56:00 2005
@@ -1,3 +1,9 @@
+2005-05-29  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
+
+       * lily/timing-engraver.cc (process_music): robustness fix.
+
+       * lily/context-def.cc (filter_engravers): bugfix.
+
 2005-05-28  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * lily/lilypond.rc.in: Add ly-icon.
@@ -6,7 +12,6 @@
        * Documentation/pictures/GNUmakefile (OUT_DIST_FILES): Add ly-icon
        rules.
 
-       
 2005-05-28  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
        * lily/stencil-scheme.cc (LY_DEFINE): ly:stencil-in-color
Index: lilypond/lily/context-def.cc
diff -u lilypond/lily/context-def.cc:1.39 lilypond/lily/context-def.cc:1.40
--- lilypond/lily/context-def.cc:1.39   Tue May  3 22:22:56 2005
+++ lilypond/lily/context-def.cc        Sun May 29 09:56:00 2005
@@ -265,14 +265,13 @@
 SCM
 filter_performers (SCM ell)
 {
-  for (SCM *tail = &ell; scm_is_pair (*tail); tail = SCM_CDRLOC (*tail))
+  SCM *tail = &ell;
+  for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
       if (dynamic_cast<Performer *> (unsmob_translator (scm_car (*tail))))
-       {
-         *tail = scm_cdr (*tail);
-         if (!scm_is_pair (*tail))
-           break;
-       }
+       *tail = scm_cdr (*tail);
+      else
+       tail = SCM_CDRLOC(*tail);
     }
   return ell;
 }
@@ -281,14 +280,12 @@
 filter_engravers (SCM ell)
 {
   SCM *tail = &ell;
-  for (; scm_is_pair (*tail); tail = SCM_CDRLOC (*tail))
+  for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
       if (dynamic_cast<Engraver *> (unsmob_translator (scm_car (*tail))))
-       {
-         *tail = scm_cdr (*tail);
-         if (!scm_is_pair (*tail))
-           break;
-       }
+       *tail = scm_cdr (*tail);
+      else
+       tail = SCM_CDRLOC(*tail);
     }
   return ell;
 }
Index: lilypond/lily/timing-engraver.cc
diff -u lilypond/lily/timing-engraver.cc:1.59 
lilypond/lily/timing-engraver.cc:1.60
--- lilypond/lily/timing-engraver.cc:1.59       Thu May  5 23:45:30 2005
+++ lilypond/lily/timing-engraver.cc    Sun May 29 09:56:01 2005
@@ -6,12 +6,13 @@
   (c) 1997--2005 Han-Wen Nienhuys <[EMAIL PROTECTED]>
 */
 
-#include "context.hh"
-#include "multi-measure-rest.hh"
 #include "timing-translator.hh"
 #include "engraver.hh"
-#include "grob.hh"
 
+#include "context.hh"
+#include "multi-measure-rest.hh"
+#include "grob.hh"
+#include "warn.hh"
 
 
 class Timing_engraver : public Timing_translator, public Engraver
@@ -62,8 +63,11 @@
   if (start_of_measure)
     {
       Moment mlen = Moment (measure_length ());
-      unsmob_grob (get_property ("currentCommandColumn"))
-       ->set_property ("measure-length", mlen.smobbed_copy ());
+      Grob * column = unsmob_grob (get_property ("currentCommandColumn"));
+      if (column)
+       column->set_property ("measure-length", mlen.smobbed_copy ());
+      else
+       programming_error("No command column?");
     }
 }
 


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to