]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.40
authorfred <fred>
Wed, 27 Mar 2002 02:06:41 +0000 (02:06 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:06:41 +0000 (02:06 +0000)
flower/include/interval.hh
flower/include/interval.tcc
lily/grob.cc

index 8d4d83a5dc7381960a169cb83c971897f658f2ec..12d940c048cab3a132476ccd795a2c96a51e6edf 100644 (file)
@@ -42,6 +42,7 @@ struct Interval_t : public Drul_array<T> {
   void intersect (Interval_t<T> h);
 
   T length () const;
+  T delta () const;
   void set_empty () ;
   bool empty_b () const { return elem (LEFT) > elem (RIGHT); }
   bool contains_b (Interval_t<T> const&) const;
@@ -85,8 +86,7 @@ struct Interval_t : public Drul_array<T> {
     elem (LEFT) = l;
     elem (RIGHT) =r;
   }
-private:
-
+  
   void swap ()
   {
     T t = elem (LEFT);
index 7e773e2579c5829a758877f5532656067a998a6b..94ad71f5785081d892b8ba23f06755d1a1b04dfc 100644 (file)
@@ -70,6 +70,13 @@ Interval_t<T>::length () const
     return elem (RIGHT)-elem (LEFT);
 }
 
+template<class T>
+T
+Interval_t<T>::delta () const 
+{
+  return elem (RIGHT) - elem (LEFT);
+}
+
 /**
   smallest Interval which includes *this and #h#
  */
index c901e95cac8ef26bb86e94d786050c135e18d174..c6088ff5f197b9e53d92acb2e539a640a09c14e5 100644 (file)
@@ -239,7 +239,8 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   
   status_c_= busy;
 
-  for (SCM d=  get_grob_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d))
+  for (SCM d = get_grob_property ("dependencies"); gh_pair_p (d);
+       d = ly_cdr (d))
     {
       unsmob_grob (ly_car (d))
        ->calculate_dependencies (final, busy, funcname);
@@ -250,9 +251,11 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   SCM proc = get_grob_property (s.ch_C ());
   if (gh_procedure_p (proc))
     gh_call1 (proc, this->self_scm ());
+  else if (gh_list_p (proc))
+    for (SCM i = proc; gh_pair_p (i); i = ly_cdr (i))
+      gh_call1 (ly_car (i), this->self_scm ());
   
   status_c_= final;
-
 }
 
 Molecule *