]> git.donarmstrong.com Git - lilypond.git/commitdiff
small backport fixes.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Jan 2007 15:12:57 +0000 (16:12 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 17 Jan 2007 15:12:57 +0000 (16:12 +0100)
lily/include/lily-guile.hh
lily/include/smobs.hh
lily/lily-guile.cc
scm/output-ps.scm

index 02cdf7ddca2f61180961ff641fb7bb14742870ca..c99f452c05a16a8fd4d71a54c0bb8d5a3f73d7c1 100644 (file)
@@ -44,6 +44,7 @@ extern SCM global_lily_module;
 string gulp_file_to_string (string fn, bool must_exist, int size);
 
 string ly_scm2string (SCM s);
+SCM ly_string2scm (string const &str);
 string ly_symbol2string (SCM);
 SCM ly_offset2scm (Offset);
 Offset ly_scm2offset (SCM);
index a2dcdb613d31dd442cb3ce15464aeb4b91c688a0..6618a87d6583111555993be966d71107dfdf8cf8 100644 (file)
@@ -146,7 +146,7 @@ extern bool parsed_objects_should_be_dead;
 #define ASSERT_LIVE_IS_ALLOWED()     \
   static bool passed_here_once;\
   if (parsed_objects_should_be_dead && !passed_here_once) { \
-    programming_error (string ("Parsed object should be dead: ")  + __PRETTY_FUNCTION__ ); \
+    ::programming_error (string ("Parsed object should be dead: ")  + __PRETTY_FUNCTION__ ); \
     passed_here_once = true;\
   }    
 
index e1a0e9bffdc059fde75766d07b559dff3393bd2e..99e8cb307b442a16696013c53109a4314ad50abc 100644 (file)
@@ -132,6 +132,13 @@ ly_scm2string (SCM str)
                 (int) scm_i_string_length (str));
 }
 
+SCM
+ly_string2scm (string const &str)
+{
+  return scm_from_locale_stringn (str.c_str(),
+                                 str.length ());
+}
+
 char *
 ly_scm2newstr (SCM str, size_t *lenp)
 {
index a5abcf207964fe1d72bc07ec2d8de0dd5982fa32..8af5b3fa3dd47d1164f2148fd51e90236a7ffcdd 100644 (file)
@@ -69,7 +69,9 @@
       (ly:number->string num)))
 
 (define (number-pair->string4 numpair)
-  (format #f "~f ~f" (round4 (car numpair)) (round4 (cdr numpair))))
+  (string-append (str4 (car numpair))
+                " "
+                (str4 (cdr numpair))))
 
 (define (numbers->string4 numlist)
   (string-join (map str4 numlist) " "))