]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/duration.cc
ly:format, a custom routine for formatting output.
[lilypond.git] / lily / duration.cc
index b21ca97a97407844590ea7b4bbd596b7fa7cf00e..1618489027dd7d74c53c9e4952fb4a6b0fce4be3 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the LilyPond music typesetter
 
-  (c) 1997--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2007 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
@@ -60,17 +60,17 @@ Duration::get_length () const
   return mom * factor_;
 }
 
-std::string
+string
 Duration::to_string () const
 {
-  std::string s;
+  string s;
 
   if (durlog_ < 0)
-    s = "log = " + std::to_string (durlog_);
+    s = "log = " + ::to_string (durlog_);
   else
-    s = std::to_string (1 << durlog_);
+    s = ::to_string (1 << durlog_);
 
-  s += std::to_string ('.', dots_);
+  s += ::to_string ('.', dots_);
   if (factor_ != Moment (Rational (1, 1)))
     s += "*" + factor_.to_string ();
   return s;
@@ -91,7 +91,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *)
   Duration *r = (Duration *) SCM_CELL_WORD_1 (s);
 
   scm_puts ("#<Duration ", port);
-  scm_display (scm_makfrom0str (r->to_string ().c_str ()), port);
+  scm_display (ly_string2scm (r->to_string ()), port);
   scm_puts (" >", port);
 
   return 1;