]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/relative-octave-music.cc
input/test fixes
[lilypond.git] / lily / relative-octave-music.cc
index 15c9c54566945626afad332e67501100e3069d49..fde9c2f8351155f1ec1e1f4abf8392d1f1764e28 100644 (file)
@@ -3,13 +3,12 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
-
 #include "relative-music.hh"
 #include "warn.hh"
-
+#include "scm-option.hh"
 
 
 Pitch
@@ -17,17 +16,15 @@ Relative_octave_music::to_relative_octave (Pitch p)
 {
   if (lily_1_8_relative)
     {
-      
-  /*
-    ugh: last-pitch should  be junked.
-
-    Change this for lilypond 2.0. When you do,
-    then B should start where A left off.
+      lily_1_8_compatibility_used = true;
+      /*  last-pitch should be junked some time, when
+         we ditch 1.8 compat too.
 
-    \relative { A \relative { ...} B }
+        When you do, B should start where A left off.
 
-  */
-      return * unsmob_pitch (get_mus_property ("last-pitch"));
+       \relative { A \relative { ...} B }  */
+      Pitch *ptr = unsmob_pitch (get_property ("last-pitch"));
+      return (ptr) ?  *ptr : p;
     }
   else
     return p;
@@ -39,3 +36,5 @@ Relative_octave_music::Relative_octave_music ()
 }
 
 ADD_MUSIC (Relative_octave_music);
+
+