]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-interface.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / text-interface.cc
index cb0b6e1ab2ab70a2ae3ac21ff5812a064cdee637..62375fbb9c72f96bca69b7c24b28d82aad23390d 100644 (file)
@@ -3,13 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "text-interface.hh"
 
-#include <math.h>
 
 #include "main.hh"
 #include "config.hh"
@@ -33,7 +32,7 @@ Text_interface::interpret_string (SCM layout_smob,
   SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
                   __FUNCTION__, "string");
 
-  String str = ly_scm2string (markup);
+  string str = ly_scm2string (markup);
 
   Font_metric *fm = select_encoded_font (layout, props);
   return fm->text_stencil (str).smobbed_copy ();
@@ -56,9 +55,11 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
     }
   else
     {
-      programming_error ("not a markup: ");
+      programming_error ("Object is not a markup. ");
+      scm_puts ("This object should be a markup: ", scm_current_error_port ());
       scm_display (markup, scm_current_error_port ());
-      assert (false);
+      scm_puts ("\n", scm_current_error_port ());
+
       Box b;
       b[X_AXIS].set_empty ();
       b[Y_AXIS].set_empty ();
@@ -76,7 +77,7 @@ Text_interface::print (SCM grob)
 
   SCM t = me->get_property ("text");
   SCM chain = Font_interface::text_font_alist_chain (me);
-  return interpret_markup (me->get_layout ()->self_scm (), chain, t);
+  return interpret_markup (me->layout ()->self_scm (), chain, t);
 }
 
 /* Ugh. Duplicated from Scheme.  */