lilypond-0.1.48
authorfred <fred>
Sun, 24 Mar 2002 20:06:39 +0000 (20:06 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:06:39 +0000 (20:06 +0000)
flower/string-convert.cc

index 659bf769212913a715044ce70f9c506db5c0a31b..79fbe1829ea6a3d6d99e7bd4f3d114942e73bb98 100644 (file)
@@ -4,12 +4,13 @@
 
 --*/
 
-
+#include <stdio.h>
 #include <assert.h>
 #include <limits.h>
 #include "libc-extension.hh"
 #include "string.hh"
 #include "string-convert.hh"
+#include "rational.hh"
 
 /**
    a safe length for stringconversion buffers
@@ -240,18 +241,7 @@ String_convert::char_str (char c, int n)
 String
 String_convert::rational_str (Rational r)
 {
-  char * n = Itoa (r.numerator()); // LEAK????
-  
-  String s = n;
-  if (r.denominator() != 1) 
-    {
-      char * d = Itoa (r.denominator());
-      s +=  String ('/') + String (d);
-      //delete d;
-    }
-  /*    delete n;
-   */
-  return s;
+       return r.str ();
 }
 
 String