]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/command-request.cc
catch GUILE errors
[lilypond.git] / lily / command-request.cc
index 93e191401083f9bf3d71d3d19dda00e7ed22c6ca..9bcd708a0673b4ee4d3680bb6b4177e2de3ef252 100644 (file)
@@ -3,19 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "command-request.hh"
-#include "debug.hh"
-#include "musical-request.hh"
 
-bool
-Barcheck_req::do_equal_b (Request const *r) const
-{
-  Barcheck_req  const*b = dynamic_cast<Barcheck_req const*> (r);
-  return b;
-}
+#include "musical-request.hh"
 
 Tempo_req::Tempo_req ()
 {
@@ -29,8 +22,8 @@ Key_change_req::transpose (Pitch p)
   SCM pa = get_mus_property ("pitch-alist");
   for (SCM s = pa; gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM key = gh_caar (s);
-      SCM alter = gh_cdar (s);
+      SCM key = ly_caar (s);
+      SCM alter = ly_cdar (s);
       if (gh_pair_p (key))
        {
          Pitch orig (gh_scm2int (ly_car (key)),
@@ -39,10 +32,10 @@ Key_change_req::transpose (Pitch p)
 
          orig.transpose (p);
 
-         SCM key = gh_cons (gh_int2scm (orig.octave_i ()),
-                            gh_int2scm (orig.notename_i_));
+         SCM key = gh_cons (gh_int2scm (orig.get_octave ()),
+                            gh_int2scm (orig.notename_));
 
-         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_i_)),
+         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_)),
                             newlist);
        }
       else if (gh_number_p (key))
@@ -50,13 +43,13 @@ Key_change_req::transpose (Pitch p)
          Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
          orig.transpose (p);
 
-         key =gh_int2scm (orig.notename_i_);
-         alter = gh_int2scm (orig.alteration_i_);
+         key =gh_int2scm (orig.notename_);
+         alter = gh_int2scm (orig.alteration_);
          newlist = gh_cons (gh_cons (key, alter), newlist);
        }
     }
 
-  set_mus_property ("pitch-alist", newlist);
+  set_mus_property ("pitch-alist", gh_reverse (newlist));
 }
 
 
@@ -66,8 +59,8 @@ alist_equal_p (SCM a, SCM b)
   for (SCM s = a;
        gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM key = gh_caar (s);
-      SCM val = gh_cdar (s);
+      SCM key = ly_caar (s);
+      SCM val = ly_cdar (s);
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
@@ -99,9 +92,8 @@ Mark_req::do_equal_b (Request const * r) const
                               get_mus_property ("label")) == SCM_BOOL_T;
 }
 
-
+ADD_MUSIC(Bass_figure_req);
 ADD_MUSIC (Articulation_req);
-ADD_MUSIC (Barcheck_req);
 ADD_MUSIC (Break_req);
 ADD_MUSIC (Breathing_sign_req);
 ADD_MUSIC (Busy_playing_req);