]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lily-guile.cc: Use scm_from_locale_stringn.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 12 Dec 2004 20:51:20 +0000 (20:51 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 12 Dec 2004 20:51:20 +0000 (20:51 +0000)
* lily/include/guile-compatibility.hh (scm_from_locale_stringn): Add
compatibility.

ChangeLog
lily/include/guile-compatibility.hh
lily/lily-guile.cc
scm/framework-ps.scm
scm/lily-library.scm
scm/output-gnome.scm

index 6adda6f98f487da9321052c61c4db1e35fec309b..3026e59237335ec3e8ae6a28c8601f2110711feb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-12  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/lily-guile.cc: Use scm_from_locale_stringn.
+
+       * lily/include/guile-compatibility.hh (scm_from_locale_stringn): Add
+       compatibility.
+
 2004-12-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/open-type-font.cc (get_indexed_char): scale metrics by
index 581124d62a2f77d8ae8ea67135b355755fdd0472..161ba4e6e490a8ff034b441cb6a36516115c2933 100644 (file)
@@ -41,6 +41,7 @@ inline SCM scm_cadar (SCM x) { return SCM_CADAR (x); }
 #define scm_is_integer(x) SCM_INUMP (x)
 #define scm_is_string(x) SCM_STRINGP (x)
 #define scm_hash_table_p scm_vector_p
+#define scm_from_locale_stringn(s, n) scm_mem2string (s, n)
 #define scm_i_string_chars(x) SCM_STRING_CHARS (x)
 #define scm_i_string_length(x) SCM_STRING_LENGTH (x)
 inline bool ly_c_number_p (SCM x) { return SCM_NUMBERP (x); }
index 9250bc956d3e0f1e1b3899224c4f5f82656fbafc..f418df157d8e5076bb00fea350911a21fb932bc4 100644 (file)
@@ -127,12 +127,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
 {
   SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   String contents = gulp_file_to_string (ly_scm2string (name), true);
-
-  char * data ;
-  SCM scm_str = scm_i_make_string (contents.length(), &data);
-  memcpy (data, contents.get_bytes(),  contents.length());
-  
-  return scm_str;
+  return scm_from_locale_stringn (contents.get_str0 (), contents.length ());
 }
 
 
index be7e7c5a1db18338d940d3db4f9b560e519c2bb8..114be63aa91da86858ae8479c896f7df5a666355 100644 (file)
@@ -71,7 +71,6 @@
    ))
 
 
-
 (define (load-fonts paper)
   (let* ((fonts (ly:paper-fonts paper))
         (font-names (uniq-list (sort (map ly:font-file-name fonts) string<?)))
index 1124f65f14aab74167d241edd5839940c35ed01c..29e3f476fc5ee9541e8de187ab37037b00da6693 100644 (file)
@@ -354,9 +354,12 @@ possibly turned off."
        ;; FIXME: bigcheese says FontSpecific
        (else (if (string=? (font-family font) "bigcheese20")
                 ;;#xf000 0)))
+                ;; FIXME: hmm, why does name_to_index not return actual
+                ;; unicode mapping?
+
                 ;; ugh, we must know which font from bigcheese;
-                ;; feta-proper starts at 0xe0e3
+                ;; feta-proper starts at 0xefc
                 ;; but we cannot display feta-nummer or feta-din characters
                 ;; this way
-                #xe0e3 0)))
+                #xe0fc 0)))
      (char->integer char)))
index c5689033aa156e3615ba08965bd83acabe05ee11..217640a0da171009279507934c5a1cda130f0425 100644 (file)
@@ -285,19 +285,6 @@ lilypond -fgnome input/simple-song.ly
   (filledbox (- x1) (- x2 x1) (* .5 thickness) (* .5 thickness)))
 
 (define (placebox x y expr)
-
-  (debugf "x,y: ~S,~S\n" x y)
-  ;; FIXME: dimensions with bigcheese are broken
-  ;;;       help hello-world of bigcheese a bit to figure out what's
-  ;;;       wrong
-  (set! x (+ 10 (/ x 50)))
-  (if (< y -800)
-      (set! y (+ y 700)))
-  (if (< y -250)
-      (set! y (+ y 250)))
-  
-  (debugf "item: ~S\n" expr)
-  (debugf "x,y: ~S,~S\n" x y)
   (let ((item expr))
     ;;(if item
     ;; FIXME ugly hack to skip #unspecified ...
@@ -411,7 +398,6 @@ lilypond -fgnome input/simple-song.ly
       ;; ugh, experimental placement corections
       ;; #:x 0.0 #:y 0.0
       #:x 0.0 #:y (if (memq encoding '(fetaMusic fetaBraces)) 0.15 0.69)
-
       #:anchor (if (memq encoding '(fetaMusic fetaBraces)) 'west 'south-west)
       #:font (pango-font-name font)
       #:size-points (pango-font-size font)