]> git.donarmstrong.com Git - lilypond.git/commitdiff
cleanups
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Aug 2002 17:20:11 +0000 (17:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Aug 2002 17:20:11 +0000 (17:20 +0000)
ChangeLog
input/bugs/melisma-tie-rest.ly
lily/include/lily-guile.hh
lily/include/translator.hh
lily/lily-guile.cc
lily/parse-scm.cc
lily/tab-note-heads-engraver.cc

index e15c768941be9acdc04496f155a3f000bdbff0f8..f8974f3c99725c235f8c653070ed00bfd554e436 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2002-08-04  Han-Wen  <hanwen@cs.uu.nl>
 
-       * lily/lily-guile.cc: change gh_str02scm scm_makfrom0str.
+       * lily/lily-guile.cc: change gh_str02scm to scm_makfrom0str.
 
 2002-08-04  Werner Lemberg  <wl@gnu.org>
 
index 08a832bb2de4742e74839568f7ef4c87bc9c3757..435048354cb0c9d901a2bad7ee69f23f9cefb494 100644 (file)
@@ -15,7 +15,7 @@ extend during a subsequent rest, and cannot be forced to stop."
                r2 r1 c
            }
        }
-       \context Lyrics = "soprano" \lyrics {
+       \context Lyrics = "soprano-1" \lyrics {
            hey __ stop?
            hey __ STOP!!!
        }
index 0abbedf613b0dd555bd3e3ddafe3da142bae363b..30ccc4cfb11bce872058fbed8353b4aa3de46b56 100644 (file)
@@ -99,7 +99,6 @@ inline SCM scm_c_make_vector  (int k, SCM val) {
  */
 
 SCM ly_last (SCM list);
-SCM ly_str02scm (char const*c);
 SCM ly_write2scm (SCM s);
 SCM ly_deep_copy (SCM);
 SCM ly_truncate_list (int k, SCM l );
@@ -152,7 +151,6 @@ SCM ly_interval2scm (Drul_array<Real>);
 
 
 SCM ly_quote_scm (SCM s);
-SCM ly_type (SCM);
 bool type_check_assignment (SCM val, SCM sym,  SCM type_symbol) ;
 String print_scm_val (SCM val);
 SCM ly_number2string (SCM s);
index bcfc75b91fc4b54154eccd2d8b560848daf350ef..97784a82a980136b90e27b5bc44c2cc6e97fb407 100644 (file)
@@ -120,7 +120,7 @@ classname::static_translator_description () const \
                              parse_symbol_list (grobs), static_properties);    \
                                                                                                \
   static_properties= scm_acons (ly_symbol2scm ("description"),                                 \
-                             ly_str02scm (desc), static_properties);                           \
+                             scm_makfrom0str (desc), static_properties);                               \
                                                                                                \
   static_properties= scm_acons (ly_symbol2scm ("interfaces-acked"),                            \
                              parse_symbol_list (acked), static_properties);                    \
index 6688d5bef86652c5ccd418e09450511f9abc0679..37eaf37dd6431458c0e610f102513293efcda82d 100644 (file)
@@ -145,6 +145,7 @@ ly_scm2string (SCM s)
 SCM
 index_get_cell (SCM s, Direction d)
 {
+  
   assert (d);
   return (d == LEFT) ? ly_car (s) : ly_cdr (s);
 }
@@ -160,10 +161,9 @@ index_set_cell (SCM s, Direction d, SCM v)
 }
   
 LY_DEFINE(ly_warning,"ly-warn", 1, 0, 0,
-  (SCM str),"Scheme callable function to issue the warning @code{msg}.
-")
+  (SCM str),"Scheme callable function to issue the warning @code{msg}.")
 {
-  assert (gh_string_p (str));
+  SCM_ASSERT_TYPE (gh_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
   warning ("lily-guile: " + ly_scm2string (str));
   return SCM_BOOL_T;
 }
@@ -316,33 +316,6 @@ ly_scm2offset (SCM s)
                 gh_scm2double (ly_cdr (s)));
 }
 
-SCM
-ly_type (SCM exp)
-{
-  char const  * cp = "unknown";
-  if (gh_number_p (exp))
-    {
-      cp = "number";
-    }
-  else if (gh_string_p (exp))
-    {
-      cp = "string";
-    }
-  else if (gh_procedure_p (exp))
-    {
-      cp = "procedure";
-    }
-  else if (gh_boolean_p (exp))
-    {
-      cp = "boolean";
-    }
-  else if (gh_pair_p (exp))
-    {
-      cp = "list";
-    }
-
-  return scm_makfrom0str (cp);
-}
 
 /*
   convert without too many decimals, and leave  a space at the end.
@@ -355,7 +328,7 @@ LY_DEFINE(ly_number2string,  "ly-number->string", 1, 0,0,
 leaves a space at the end.
 ")
 {
-  assert (gh_number_p (s));
+  SCM_ASSERT_TYPE (gh_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
 
   char str[400];                       // ugh.
 
index aaf3b5d35badcb2e717a79dff93a859a995c03bc..858c757f5d51bc8586171ac5e87d1b7f1e8f524b 100644 (file)
@@ -16,10 +16,14 @@ SCM
 internal_ly_parse_scm (Parse_start * ps)
 {
   /*
+    
     This is actually pretty wasteful: we stuff the rest of the entire
     file down GUILE, while we usually need only a bit of it.
+
+    TODO: implement read_only_string_port(), (preferably in GUILE ?)
+    
    */
-  SCM str = ly_str02scm (ps->str);
+  SCM str = scm_makfrom0str (ps->str);
   SCM port = scm_mkstrport (SCM_INUM0, str, SCM_OPN | SCM_RDNG,
                             "ly_eval_scm_0str");
 
index 6c454a8cb5940d33d3730802e4cb2c60a2a71aee..28bd4b298b6f453773bf9e2332056ace6b456275 100644 (file)
@@ -71,15 +71,6 @@ Tab_note_heads_engraver::try_music (Music *m)
 void
 Tab_note_heads_engraver::process_music ()
 {
-  /*
-  for (int i=0; i < tabstring_reqs_.size (); i++) {
-      Music * tabstring_req = tabstring_reqs_[i];
-      
-      size_t lenp;
-      char* tab_string_as_string = gh_scm2newstr(tabstring_req->get_mus_property ("text"), &lenp);
-  }
-  */
-  
   for (int i=0; i < note_reqs_.size (); i++)
     {
       SCM stringTunings = get_property ("stringTunings");