]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/accidental-engraver.cc
* lily/include/event.hh: remove file.
[lilypond.git] / lily / accidental-engraver.cc
index ce05662b509587e916b539b35c3e8a63c6e740b8..9dc3010382af821df5c91153e73eff355736ac96 100644 (file)
@@ -16,6 +16,8 @@
 #include "side-position-interface.hh"
 #include "tie.hh"
 #include "warn.hh"
+#include "music.hh"
+#include "pitch.hh"
 
 class Accidental_entry
 {
@@ -232,7 +234,7 @@ number_accidentals (bool *different,
 
   *different = false;
   if (scm_is_pair (accidentals) && !scm_is_symbol (scm_car (accidentals)))
-    warning (_f ("Accidental typesetting list must begin with context-name: %s",
+    warning (_f ("accidental typesetting list must begin with context-name: %s",
                 ly_scm2string (scm_car (accidentals)).to_str0 ()));
 
   for (; scm_is_pair (accidentals) && origin;
@@ -264,9 +266,8 @@ number_accidentals (bool *different,
                         ly_symbol2string (type).to_str0 ()));
        }
 
-      /*
-       if symbol then it is a context name. Scan parent contexts to find it.
-      */
+      /* if symbol then it is a context name.  Scan parent contexts to
+        find it. */
       else if (scm_is_symbol (rule))
        {
          Context *dad = origin;
@@ -276,8 +277,9 @@ number_accidentals (bool *different,
          if (dad)
            origin = dad;
        }
-      else warning (_f ("Accidental rule must be pair or context-name; Found %s",
-                       ly_scm2string (rule).to_str0 ()));
+      else
+       warning (_f ("pair or context-name expected for accidental rule, found %s",
+                    ly_scm2string (rule).to_str0 ()));
     }
 
   return number;
@@ -343,11 +345,8 @@ Accidental_engraver::process_acknowledged_grobs ()
          if (num == 0 && to_boolean (note->get_property ("force-accidental")))
            num = 1;
 
-         /*
-           Can not look for ties: it's not guaranteed that they reach
-           us before the notes
-         */
-
+         /* Cannot look for ties: it's not guaranteed that they reach
+            us before the notes. */
          if (num)
            {
              /*
@@ -486,29 +485,28 @@ Accidental_engraver::acknowledge_grob (Grob_info info)
 
   if (note
       && note->is_mus_type ("note-event")
-      && Rhythmic_head::has_interface (info.grob_))
+      && Rhythmic_head::has_interface (info.grob ()))
     {
       if (to_boolean (get_property ("harmonicAccidentals"))
-         || !ly_c_equal_p (info.grob_->get_property ("style"),
+         || !ly_is_equal (info.grob ()->get_property ("style"),
                            ly_symbol2scm ("harmonic")))
        {
-
          Accidental_entry entry;
-         entry.head_ = info.grob_;
-         entry.origin_trans_ = dynamic_cast<Engraver *> (info.origin_trans_);
-         entry.origin_ = info.origin_trans_->context ();
+         entry.head_ = info.grob ();
+         entry.origin_trans_ = dynamic_cast<Engraver *> (info.origin_translator ());
+         entry.origin_ = entry.origin_trans_->context ();
          entry.melodic_ = note;
 
          accidentals_.push (entry);
        }
     }
-  else if (Tie::has_interface (info.grob_))
-    ties_.push (dynamic_cast<Spanner *> (info.grob_));
-  else if (Arpeggio::has_interface (info.grob_))
-    left_objects_.push (info.grob_);
-  else if (info.grob_
+  else if (Tie::has_interface (info.grob ()))
+    ties_.push (dynamic_cast<Spanner *> (info.grob ()));
+  else if (Arpeggio::has_interface (info.grob ()))
+    left_objects_.push (info.grob ());
+  else if (info.grob ()
           ->internal_has_interface (ly_symbol2scm ("finger-interface")))
-    left_objects_.push (info.grob_);
+    left_objects_.push (info.grob ());
 }
 
 void