]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/lily-guile.hh: compatibility glue for 1.6
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 1 Sep 2004 19:41:17 +0000 (19:41 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 1 Sep 2004 19:41:17 +0000 (19:41 +0000)
* lily/lily-guile.cc: remove ly_scm2str0.

54 files changed:
ChangeLog
lily/all-font-metrics.cc
lily/auto-beam-engraver.cc
lily/bar-engraver.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam.cc
lily/clef-engraver.cc
lily/clef.cc
lily/context-def.cc
lily/context-specced-music-iterator.cc
lily/custos-engraver.cc
lily/drum-note-engraver.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/font-metric.cc
lily/font-select.cc
lily/grob-interface.cc
lily/include/lily-guile.hh
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/kpath.cc
lily/lexer.ll
lily/lily-guile.cc
lily/lily-lexer.cc
lily/lily-parser.cc
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/modified-font-metric.cc
lily/multi-measure-rest-engraver.cc
lily/music.cc
lily/new-lyric-combine-music-iterator.cc
lily/ottava-engraver.cc
lily/paper-outputter.cc
lily/parser.yy
lily/pfb.cc
lily/piano-pedal-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/score-engraver.cc
lily/score.cc
lily/slur.cc
lily/span-bar.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/stanza-number-engraver.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/text-item.cc
lily/timing-engraver.cc
lily/tuplet-bracket.cc
lily/volta-bracket.cc
lily/volta-engraver.cc

index d941200f385c9f3bd096a259d75f3b8103d1493c..2cec1be1c4c5ba033bf449e0b3f517471cd5969e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-09-01  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/include/lily-guile.hh: compatibility glue for 1.6
+
+       * lily/*.cc (acknowledge_grob): ly_string_p -> scm_is_string.
+
        * lily/lily-guile.cc: remove ly_scm2str0.
 
 2004-09-01  Jan Nieuwenhuizen  <janneke@gnu.org>
index 52c4bccae20016b3c646266648842c8026d0cebb..04afa13be69971d5a7480d8ca7371044e948d6c7 100644 (file)
@@ -211,7 +211,7 @@ LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
           (SCM name),
           "Load the font @var{name}. ")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
 
   Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
 
index fda74a0cf00e8c05c92458a042aa78ae6bcb11c6..d60fdb76a6353c225f436bdc883dafbf2d42e87c 100644 (file)
@@ -75,7 +75,7 @@ private:
 void
 Auto_beam_engraver::process_music ()
 {
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (scm_is_string (get_property ("whichBar")))
     {
       consider_end (shortest_mom_);
       junk_beam ();
index e62d814c96f0353cdd3585bf3d4852e4993692f2..379b2394e17f4e01e5e85854f08629e97ace6b2e 100644 (file)
@@ -75,7 +75,7 @@ Bar_engraver::finalize ()
 void
 Bar_engraver::process_acknowledged_grobs ()
 {
-  if (!bar_ && ly_c_string_p (get_property ("whichBar")))
+  if (!bar_ && scm_is_string (get_property ("whichBar")))
     create_bar ();
 }
 
index 6d0b04dca598cdaa84c4f8eb485fcae7a1ecd925..832ab1af32b773d98b5830992f1708606770424c 100644 (file)
@@ -30,7 +30,7 @@ Bar_line::print (SCM smob)
 
   SCM s = me->get_property ("glyph");
   SCM barsiz_proc = me->get_property ("bar-size-procedure");
-  if (ly_c_string_p (s) && ly_c_procedure_p (barsiz_proc))
+  if (scm_is_string (s) && ly_c_procedure_p (barsiz_proc))
     {
       String str  =ly_scm2string (s);
       SCM siz = scm_call_1 (barsiz_proc, me->self_scm ());
@@ -166,13 +166,13 @@ Bar_line::before_line_breaking (SCM smob)
   SCM g = me->get_property ("glyph");
   SCM orig = g;
   Direction bsd = item->break_status_dir ();
-  if (ly_c_string_p (g) && bsd)
+  if (scm_is_string (g) && bsd)
     {
       SCM proc = me->get_property ("break-glyph-function");
       g = scm_call_2 (proc, g, scm_int2num (bsd));
     }
   
-  if (!ly_c_string_p (g))
+  if (!scm_is_string (g))
     {
       me->set_property ("print-function", SCM_EOL);
       me->set_extent (SCM_EOL, X_AXIS);
index 7ba942a3b37640e86c9250e7052a7b3015ee9806..7d0550c9c6d92abda137b6b46b1708ad1527fa2b 100644 (file)
@@ -45,7 +45,7 @@ Bar_number_engraver::process_music ()
 
   SCM wb = get_property ("whichBar");
   
-  if (ly_c_string_p (wb))
+  if (scm_is_string (wb))
     {
       SCM smp = get_property ("measurePosition");
       
index 7539ce8907ae55b531c500a1d2ba1170f6006b74..3a63c6df4a0af6a910baccd03fab5b5364d2a7b7 100644 (file)
@@ -509,7 +509,7 @@ Beam::print (SCM grob)
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
   if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
-      && ly_c_string_p (quant_score))
+      && scm_is_string (quant_score))
     {
       
       /*
index 7ae0c0bd2511f5349a70bf62cfbd7ff35080d405..11f1554bca3db723799aedb6f20dddc37e3982b4 100644 (file)
@@ -76,7 +76,7 @@ Clef_engraver::acknowledge_grob (Grob_info info)
   if (item)
     {
       if (Bar_line::has_interface (info.grob_)
-         && ly_c_string_p (get_property ("clefGlyph")))
+         && scm_is_string (get_property ("clefGlyph")))
        create_clef ();
     } 
 }
index 7774d1920e7e2121991d1b3d40c34c534aa55226..c7e4920a99ee0549b6b0a65e6398c25c6cd136ff 100644 (file)
@@ -23,7 +23,7 @@ Clef::before_line_breaking (SCM smob)
 
   SCM glyph = s->get_property ("glyph-name");
   
-  if (ly_c_string_p (glyph))
+  if (scm_is_string (glyph))
     {
       String str = ly_scm2string (glyph);
 
@@ -53,7 +53,7 @@ Clef::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   SCM glyph_scm = me->get_property ("glyph-name");
-  if (!ly_c_string_p (glyph_scm))
+  if (!scm_is_string (glyph_scm))
     return SCM_EOL;
 
   String glyph = String (ly_scm2string (glyph_scm));
index 797eb172b7548040954643b605e0dd97dbf660ac..5ad09112291d9bf817402794e69a153be5408234 100644 (file)
@@ -100,7 +100,7 @@ Context_def::add_context_mod (SCM mod)
     }
 
   SCM sym = ly_cadr (mod);
-  if (ly_c_string_p (sym))
+  if (scm_is_string (sym))
     sym = scm_string_to_symbol (sym);
   
   if (ly_symbol2scm ("consists") == tag
@@ -213,7 +213,7 @@ Context_def::get_translator_names (SCM user_mod) const
       SCM tag = ly_caar (s);
       SCM arg = ly_cadar (s);
 
-      if (ly_c_string_p (arg))
+      if (scm_is_string (arg))
        arg = scm_string_to_symbol (arg);
       
       if (ly_symbol2scm ("consists") == tag)
index fb5968b980bb97999d2cf9e2f42dd817abf27c4b..6583f3c6fd7d75e3c98ec61e78fa2bb8c612ec80 100644 (file)
@@ -25,7 +25,7 @@ Context_specced_music_iterator::construct_children ()
 
   String c_id;
   SCM ci = get_music ()->get_property ("context-id");
-  if (ly_c_string_p (ci))
+  if (scm_is_string (ci))
     c_id = ly_scm2string (ci);
   SCM ops = get_music ()->get_property ("property-operations");
   
index 40b2941c07f64929aa3e9855be6a1bc258b06451..0538aef4527eee03547bdc714b889272fe0439d1 100644 (file)
@@ -93,7 +93,7 @@ Custos_engraver::acknowledge_grob (Grob_info info)
 void
 Custos_engraver::process_acknowledged_grobs ()
 {
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (scm_is_string (get_property ("whichBar")))
     custos_permitted = true;
   
   if (custos_permitted)
index e26cdceebff0240656db94dca136a195c8424d4f..884f6c4de6ba648dd44dd2acd3be6944b941d9f3 100644 (file)
@@ -101,7 +101,7 @@ Drum_notes_engraver::process_music ()
          if (ly_c_symbol_p (style))
            note->set_property ("style", style);
 
-         if (ly_c_string_p (script))
+         if (scm_is_string (script))
            {
              Item *p  = make_item ("Script", ev->self_scm ());
              bool follow;
index a6d82e9785ed1728090497c8031271ee75558144..bb888f21d347995f6d3087dff98bf27af4e46dff 100644 (file)
@@ -248,7 +248,7 @@ Dynamic_engraver::process_music ()
              /*
                FIXME: use get_markup () to check type.
              */
-             if (ly_c_string_p (s) || ly_c_pair_p (s))
+             if (scm_is_string (s) || ly_c_pair_p (s))
                {
                  cresc_->set_property ("edge-text",
                                        scm_cons (s, scm_makfrom0str ("")));
index 257708de292fabf63f9b4b7b9eb8a16a5f1b56fb..e8e2bab12a527904d7e2294cac093b969ffb6937 100644 (file)
@@ -75,10 +75,10 @@ Dynamic_performer::create_audio_elements ()
          */
          SCM s = get_property ("midiInstrument");
          
-         if (!ly_c_string_p (s))
+         if (!scm_is_string (s))
            s = get_property ("instrument");
          
-         if (!ly_c_string_p (s))
+         if (!scm_is_string (s))
            s = scm_makfrom0str ("piano");
          
          
index 6c61e77fb32b79093180b2d13cb985cc33fce3a3..7bf1f39796101043ce672ae60fff51118477053d 100644 (file)
@@ -139,7 +139,7 @@ LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
 
   Stencil m = fm->find_by_name (ly_scm2string (name));
 
@@ -171,7 +171,7 @@ LY_DEFINE (ly_text_dimension,"ly:text-dimension",
   Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
     (unsmob_metrics (font));
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (text), text, SCM_ARG2, __FUNCTION__, "string");
   
   b = fm->text_dimension (ly_scm2string (text));
   
index f04da901b3d63d2d2db02a4cbe3a60b82541b6b7..1e5134a24cb8144e9d796b93fbd359b6f28397be 100644 (file)
@@ -112,7 +112,7 @@ select_encoded_font (Output_def *paper, SCM chain, SCM input_encoding)
 {
   SCM name = ly_assoc_chain (ly_symbol2scm  ("font-name"), chain);
   
-  if (!ly_c_pair_p (name) || !ly_c_string_p (ly_cdr (name)))
+  if (!ly_c_pair_p (name) || !scm_is_string (ly_cdr (name)))
     {
       SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
       name = properties_to_font_size_family (fonts, chain);
@@ -120,7 +120,7 @@ select_encoded_font (Output_def *paper, SCM chain, SCM input_encoding)
   else
     name = ly_cdr (name);
 
-  if (ly_c_string_p (name))
+  if (scm_is_string (name))
     {
       SCM mag = ly_assoc_chain (ly_symbol2scm ("font-magnification"), chain);
       Real rmag = (ly_c_pair_p (mag)
index 5a7e7d0f8d9abbd60c665b6f2fc8d5e8b2d90c78..aaa22f5fb5681fbe347fd3ff6a407384d57800d2 100644 (file)
@@ -30,7 +30,7 @@ LY_DEFINE (ly_add_interface, "ly:add-interface", 3,0,0, (SCM a, SCM b, SCM c),
          "Add an interface description.")
 {
   SCM_ASSERT_TYPE (ly_c_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (ly_c_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
+  SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");  
   SCM_ASSERT_TYPE (ly_c_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
   if (!ly_c_vector_p (all_ifaces))
     all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
index cd6ea97b87973de1d66cfbea8ef8ad9910d6024d..4576a2271d5e55a0876a505119c73bba66dd42b5 100644 (file)
 #define SCM_VECTOR_REF(v,i) (SCM_VELTS ((v))[(i)])
 #define scm_from_int(x) SCM_MAKINUM (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_i_string_chars(x) SCM_STRING_CHARS(x)
+#define scm_i_string_length(x) SCM_STRING_LENGTH(x)
 #endif /* SCM_MINOR_VERSION < 7 */
 
 #ifndef SMOB_FREE_RETURN_VAL
index 798e61d51ac9c405b0f1a4463789801a9c2ddaa1..b5b5097b62c8bc096789adba27a603c26e475d45 100644 (file)
@@ -85,7 +85,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
-  SCM_ASSERT_TYPE (ly_c_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
 
   String m = ly_scm2string (msg);
   ip->message (m);
index 0de40cf688f2ade2316e615eef528c0eb90ed569..334da9dd59b39d0e692adce9328a9e5c50a5ed8f 100644 (file)
@@ -121,7 +121,7 @@ Instrument_name_engraver::process_music ()
     Also create text if barlines in other groups. This allows
     a name to be attached to lyrics or chords. 
    */
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (scm_is_string (get_property ("whichBar")))
     create_text ();
 }
 
index 4eae83af4991b7bacc38361033fe9c8e77afa58d..1a4886f72d4fc4aaf0dad742d9ae8d848f7c3ddb 100644 (file)
@@ -154,7 +154,7 @@ LY_DEFINE (ly_kpathsea_expand_path, "ly:kpathsea-expand-path",
           "Return the expanded path of @var{name}, or"
           "@code{#f} if not found.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
 
   String nm = ly_scm2string (name);
   String filename = global_path.find (nm);
index 6ec3cf94b99a39353be4963c009ed7248336b30d..43b10a51de0755f053cb03c954581f9bd70799b2 100644 (file)
@@ -257,7 +257,7 @@ HYPHEN              --
          s = s.left_string (s.length () - 1);
 
        SCM sid = lookup_identifier (s);
-       if (ly_c_string_p (sid)) {
+       if (scm_is_string (sid)) {
                new_input (ly_scm2string (sid), sources_);
                yy_pop_state ();
        } else { 
index fb4903b7101331528a86d5e3ad5967919292cdc3..948d546f46452e65644c19bf0f53cb85e940156b 100644 (file)
@@ -110,7 +110,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
           "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
 
@@ -135,7 +135,7 @@ ly_scm2string (SCM str)
 char *
 ly_scm2newstr (SCM str, size_t *lenp)
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
 
   size_t len = SCM_STRING_LENGTH (str);
   if (char *new_str = (char *) malloc ((len + 1) * sizeof (char)))
@@ -174,7 +174,7 @@ LY_DEFINE (ly_warn, "ly:warn",
           "Scheme callable function to issue the warning @code{msg}. "
           "The message is formatted with @code{format} and @code{rest}.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
   progress_indication ("\n");
 
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -187,7 +187,7 @@ LY_DEFINE (ly_programming_error, "ly:programming-error",
           "Scheme callable function to issue the warning @code{msg}. "
           "The message is formatted with @code{format} and @code{rest}.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "string");
   progress_indication ("\n");
 
   str = scm_simple_format (SCM_BOOL_F, str, rest);
@@ -806,7 +806,7 @@ LY_DEFINE (ly_pango_add_afm_decoder, "ly:pango-add-afm-decoder",
           1, 0, 0, (SCM font_family),
           "Add pango afm decoder for FONT-FAMILY.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (font_family), font_family, SCM_ARG1,
+  SCM_ASSERT_TYPE (scm_is_string (font_family), font_family, SCM_ARG1,
                   __FUNCTION__, "font_family");
   pango_fc_afm_add_decoder (ly_scm2newstr (font_family, 0));
   return SCM_UNSPECIFIED;
@@ -818,7 +818,7 @@ LY_DEFINE (ly_gettext, "ly:gettext",
           1, 0, 0, (SCM string),
           "Gettext wrapper.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (string), string, SCM_ARG1,
+  SCM_ASSERT_TYPE (scm_is_string (string), string, SCM_ARG1,
                   __FUNCTION__, "string");
   return scm_makfrom0str (gettext (scm_i_string_chars (string)));
 }
index 9226c5440a8679bb01691402726fe4ebe0dd682e..3bb157d5fdfe95170ceef12a70022f3fa559d8f4 100644 (file)
@@ -209,7 +209,7 @@ void
 Lily_lexer::set_identifier (SCM name, SCM s)
 {
   SCM sym = name;
-  if (ly_c_string_p (name))
+  if (scm_is_string (name))
     sym =  scm_string_to_symbol (name);
   
   if (ly_c_symbol_p (sym))
index 818ae67289024cdc6c1e5c40ef7894dd3dca3cb6..3183421f39e6278b3171b57f58a4895073486dd9 100644 (file)
@@ -256,7 +256,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
           "Parse a single @code{.ly} file.  "
           "Upon failure, throw @code{ly-file-failed} key.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   char const *file = scm_i_string_chars (name);
   char const *extensions[] = {"ly", "", 0};
 
@@ -326,7 +326,7 @@ LY_DEFINE (ly_parse_string, "ly:parse-string",
           "Parse the string LY_CODE.  "
           "Upon failure, throw @code{ly-file-failed} key.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (ly_code), ly_code, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (ly_code), ly_code, SCM_ARG1, __FUNCTION__, "string");
   
   Sources sources;
   sources.set_path (&global_path);
@@ -388,7 +388,7 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
   Lily_parser *parser = unsmob_my_lily_parser (parser_smob);
 
   SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
-  SCM_ASSERT_TYPE (ly_c_string_p (ly_code), ly_code, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (ly_code), ly_code, SCM_ARG2, __FUNCTION__, "string");
   
   parser->parse_string (ly_scm2string (ly_code));
   
index e82aa698c25de21e3faaac7e8c0acf5d86cd2769..ed0bab66fc235717bd9957b1a678857ad729e881 100644 (file)
@@ -71,7 +71,7 @@ get_voice_to_lyrics (Context *lyrics)
   SCM voice_name = lyrics->get_property ("associatedVoice");
   String nm = lyrics->id_string ();
 
-  if (ly_c_string_p (voice_name))
+  if (scm_is_string (voice_name))
     nm = ly_scm2string (voice_name);
   else
     {
index 09a38f40b01f4d390147d1113cdab5ddceb3ff45..9542f222ec87981718d8198f59ea2f8e9e99013b 100644 (file)
@@ -40,7 +40,7 @@ Lyric_performer::create_audio_elements ()
 {
   // FIXME: won't work with fancy lyrics
   if (lreqs_.size ()
-      && ly_c_string_p (lreqs_[0]->get_property ("text"))
+      && scm_is_string (lreqs_[0]->get_property ("text"))
       && ly_scm2string (lreqs_[0]->get_property ("text")).length ())
     {
       audio_ = new Audio_text (Audio_text::LYRIC,
index 2b67671b2da2657a72e298c0573e3e39231cf147..6bb485fa96e236d0ffb1aea2517781a6c3df4fb4 100644 (file)
@@ -113,7 +113,7 @@ Modified_font_metric::make_scaled_font_metric (SCM coding,
   if (ly_c_symbol_p (coding))
     coding = scm_symbol_to_string (coding);
   
-  String scheme = ly_c_string_p (coding) ? ly_scm2string (coding) : ""; 
+  String scheme = scm_is_string (coding) ? ly_scm2string (coding) : ""; 
   
   Modified_font_metric *sfm = new Modified_font_metric (scheme, m, s);
   
index 33a9cfb24b4bc882f307fff099bb3e18b87cd64f..2b36fb408f40f8e1f999b422b00d65a2979fbcc8 100644 (file)
@@ -133,7 +133,7 @@ Multi_measure_rest_engraver::process_music ()
        = ly_scm2int (get_property ("currentBarNumber"));
     }
 
-  bar_seen_ = ly_c_string_p (get_property ("whichBar"));
+  bar_seen_ = scm_is_string (get_property ("whichBar"));
 }
 
 void
index 161bf21ab79caf7144ddd4771727fc13e5d2da2f..ea81bb0df67cef0561bbc48f3342006367ce18d6 100644 (file)
@@ -130,7 +130,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*)
   Music* m = unsmob_music (s);
 
   SCM nm = m->get_property ("name");
-  if (ly_c_symbol_p (nm) || ly_c_string_p (nm))
+  if (ly_c_symbol_p (nm) || scm_is_string (nm))
     scm_display (nm, p);
   else
     scm_puts (classname (m),p);
@@ -294,7 +294,7 @@ LY_DEFINE (ly_extended_make_music, "ly:make-bare-music",
          "for creating music objects. "
          )
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (type), type, SCM_ARG1, __FUNCTION__, "string");
   SCM s = make_music (ly_scm2string (type))->self_scm ();
   unsmob_music (s)->immutable_property_alist_ = props;
   scm_gc_unprotect_object (s);
index 5af6fb4c6aaa2d923eaddadb804b79624a7293b5..dd2f487bdb42cdd0601e018f211bf99f5088c497 100644 (file)
@@ -165,10 +165,10 @@ New_lyric_combine_music_iterator::find_voice ()
   SCM voice_name = lyricsto_voice_name_;
   SCM running = lyrics_context_ ? lyrics_context_->get_property ("associatedVoice") : SCM_EOL;
 
-  if (ly_c_string_p (running))
+  if (scm_is_string (running))
     voice_name = running;
 
-  if (ly_c_string_p (voice_name)
+  if (scm_is_string (voice_name)
       && (!music_context_ || ly_scm2string (voice_name) != music_context_->id_string ()))    
     {
       /*
@@ -239,7 +239,7 @@ New_lyric_combine_music_iterator::do_quit ()
       SCM voice_name = get_music ()->get_property ("associated-context");
 
       String name;
-      if (ly_c_string_p (voice_name))
+      if (scm_is_string (voice_name))
        name = ly_scm2string (voice_name);
 
       get_music ()->origin ()->warning (_f ("cannot find Voice `%s'",
index 49c2b5601540786e61703729a64559ba9407788c..99fbe7e3c6ed26b391faf3f392fca27f4328f26a 100644 (file)
@@ -46,7 +46,7 @@ Ottava_spanner_engraver::process_music ()
     {
       finished_= span_;
       span_ = 0;
-      if (ly_c_string_p (ott))
+      if (scm_is_string (ott))
        {
          span_  = make_spanner ("OttavaBracket", SCM_EOL);
          span_->set_property ("text", ott);
index 38faae2fff185934bdef7c5c81c1fc6171a14e98..5fac3f2cd9d883591978b3a59b58fad4f317dc3e 100644 (file)
@@ -137,7 +137,7 @@ LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
 {
   Paper_outputter *po = unsmob_outputter (outputter);
   SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "Paper_outputter");
+  SCM_ASSERT_TYPE (scm_is_string (str), str, SCM_ARG1, __FUNCTION__, "Paper_outputter");
   
   return po->dump_string (str);
 }
index ea56d48e60d1edcd40777562ecb1d61e3aa1c060..6b00ad61fd91a1def43f2e009d777e32d243d130 100644 (file)
@@ -1200,7 +1200,7 @@ re_rhythmed_music:
                /* FIXME: should find out uniqueXXX name from music */
                SCM name = $1->get_property ("context-id");
                //if (name == SCM_EOL)
-               if (!ly_c_string_p (name))
+               if (!scm_is_string (name))
                        name = scm_makfrom0str ("");
 
                SCM context = scm_makfrom0str ("Lyrics");
@@ -1786,7 +1786,7 @@ direction_reqd_event:
        | script_abbreviation {
                SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
                Music *a = MY_MAKE_MUSIC ("ArticulationEvent");
-               if (ly_c_string_p (s))
+               if (scm_is_string (s))
                        a->set_property ("articulation-type", s);
                else THIS->parser_error (_ ("Expecting string as script definition"));
                $$ = a;
@@ -2559,7 +2559,7 @@ otherwise, we have to import music classes into the lexer.
 int
 Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (ly_c_string_p (sid)) {
+       if (scm_is_string (sid)) {
                *destination = sid;
                return STRING_IDENTIFIER;
        } else if (ly_c_number_p (sid)) {
@@ -2665,7 +2665,7 @@ context_spec_music (SCM type, SCM id, Music *m, SCM ops)
                ly_c_symbol_p (type) ? type : scm_string_to_symbol (type));
        csm->set_property ("property-operations", ops);
 
-       if (ly_c_string_p (id))
+       if (scm_is_string (id))
                csm->set_property ("context-id", id);
        return csm;
 }
index 60dde35569f33fa97f9b085eb023b6d31438d4bb..9dbdf0f363eb888020f6ef9e6344ab31da97d31b 100644 (file)
@@ -74,7 +74,7 @@ LY_DEFINE(ly_pfb_to_pfa, "ly:pfb->pfa",
          "Convert the contents of a PFB file to PFA."
          )
 {
-  SCM_ASSERT_TYPE(ly_c_string_p (pfb_path), pfb_path,
+  SCM_ASSERT_TYPE(scm_is_string (pfb_path), pfb_path,
                  SCM_ARG1, __FUNCTION__, "string");
 
   String path = ly_scm2string (pfb_path);
index ad6741cdb26938c3d520182b467ebd27ca3e43a8..0ff11c4b58851079f2489e40f5c5a3327d80066b 100644 (file)
@@ -290,7 +290,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
        }
     }
       
-  if (ly_c_string_p (s))
+  if (scm_is_string (s))
     {
       String propname = String (p->name_) + "Pedal";
 
index dc302eca5e2e2ebf2cf3f99da0d8deffbdee7216..b70abed2203cdaece9612363781e6f977d278565 100644 (file)
@@ -101,9 +101,9 @@ Repeat_acknowledge_engraver::process_music ()
    */
   SCM wb = get_property ("whichBar");
   SCM db  = get_property ("defaultBarType");
-  if (!ly_c_string_p (wb) || ly_c_equal_p (db, wb))
+  if (!scm_is_string (wb) || ly_c_equal_p (db, wb))
     {
-      if (s != "" || (volta_found && !ly_c_string_p (wb)))
+      if (s != "" || (volta_found && !scm_is_string (wb)))
        {
          context ()->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
        }
index 6feb5be1f274f2d006cfc153ba9ce518deb3a204..881ff8958f68593f96a823e9d3264428418dfd47 100644 (file)
@@ -104,7 +104,7 @@ Score_engraver::initialize ()
           + "\n" +_ ("Music font has not been installed properly.  Aborting"));
 
   SCM pfa_path = ly_kpathsea_expand_path (scm_makfrom0str ("ecrm10.pfa"));
-  if (!ly_c_string_p (pfa_path))
+  if (!scm_is_string (pfa_path))
     error (_f ("can't find `%s'", "ecrm10.pfa")
           + "\n" +_f ("Install the ec-mftraced package from %s. Aborting",
                       "http://lilypond.org/download/fonts/"));
index 99648187603784400fddac08ee4195dc63f3e2d1..774cdba07c17c89d601044abb41348f5d549c766 100644 (file)
@@ -146,7 +146,7 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 {
   Global_context *g = dynamic_cast<Global_context*> (unsmob_context (context));
   SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
-  SCM_ASSERT_TYPE (ly_c_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
+  SCM_ASSERT_TYPE (scm_is_string (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
 
   Music_output *output = g->get_output ();
   progress_indication ("\n");
index b61522b7117956db9987e99ff643586abe5718c7..623a2397147435f5cb764e877d648eaab9b37ca7 100644 (file)
@@ -82,7 +82,7 @@ Slur::print (SCM smob)
 
   if (to_boolean (me->get_paper ()
                  ->lookup_variable (ly_symbol2scm ("debug-slur-quanting")))
-      && ly_c_string_p (quant_score))
+      && scm_is_string (quant_score))
     {
       String str;
       SCM properties = Font_interface::text_font_alist_chain (me);
index 8e87dc053010055b9d3678d73b468461d45b8c8d..97c757c82bd7d4b00e81f4994fe6cd18e408e480 100644 (file)
@@ -65,7 +65,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* glyph may not be a string, when ME is killed by Hara Kiri in
     between. */
-  if (!ly_c_string_p (glyph))
+  if (!scm_is_string (glyph))
     return SCM_EOL;
   
   String glyph_string = ly_scm2string (glyph);
@@ -179,17 +179,17 @@ Span_bar::evaluate_glyph (Grob*me)
 {
   SCM gl = me->get_property ("glyph");
 
-  if (ly_c_string_p (gl))
+  if (scm_is_string (gl))
     return ;
   
   for (SCM s = me->get_property ("elements");
-       !ly_c_string_p (gl) && ly_c_pair_p (s); s = ly_cdr (s))
+       !scm_is_string (gl) && ly_c_pair_p (s); s = ly_cdr (s))
     {
       gl = unsmob_grob (ly_car (s))
        ->get_property ("glyph");
     }
 
-  if (!ly_c_string_p (gl))
+  if (!scm_is_string (gl))
     {
       me->suicide ();
       return;
index 7cb78b53805d1130416618d2e26ee6707efac537..6a028a6f679daf41459158c4621adec8d8fda03f 100644 (file)
@@ -130,7 +130,7 @@ Staff_performer::new_instrument_string ()
   // mustn't ask Score for instrument: it will return piano!
   SCM minstr = get_property ("midiInstrument");
 
-  if (!ly_c_string_p (minstr)
+  if (!scm_is_string (minstr)
       || ly_scm2string (minstr) == instrument_string_)
     return "";
 
index cd2827297d671a0acda87c2ff61ded5a621a4c23..c8684e791a131b3c1fd70dfab9660fb6febaa8be 100644 (file)
@@ -101,7 +101,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob)
     {
       SCM glyph = bar_grob->get_property ("glyph");
       
-      String glyph_string = ly_c_string_p (glyph) ? ly_scm2string (glyph) : "";
+      String glyph_string = scm_is_string (glyph) ? ly_scm2string (glyph) : "";
       if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".")
        {
          SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ());
index 8904bdd712cc5b4536a7c1cd51f81509848ea8f9..06751e1a403a73f7b4b992f89ebd101ba92e0b2b 100644 (file)
@@ -45,7 +45,7 @@ Stanza_number_engraver::process_music ()
 {
   SCM stanza = get_property ("stanza");
   
-  if (ly_c_string_p (stanza) && stanza != last_stanza_)
+  if (scm_is_string (stanza) && stanza != last_stanza_)
     {
       last_stanza_ = stanza;
       
index 060e1255f69284ff846b5cd721733f9035810732..7b547f0cda3c12036f1f3c70c0a5f0a1d36e69b3 100644 (file)
@@ -575,7 +575,7 @@ Stem::flag (Grob *me)
     me->warning (_f ("flag `%s' not found", font_char));
 
   SCM stroke_style_scm = me->get_property ("stroke-style");
-  if (ly_c_string_p (stroke_style_scm))
+  if (scm_is_string (stroke_style_scm))
     {
       String stroke_style = ly_scm2string (stroke_style_scm);
       if (!stroke_style.is_empty ())
index f57ba09a9eb8568bbcc48898a7805cb448d2a11b..1b2fe25260b49a5aaeef086c25951461bae89c6a 100644 (file)
@@ -42,7 +42,7 @@ Sustain_pedal::print (SCM smob)
   
   Stencil mol;
   SCM glyph = e->get_property ("text");
-  if (!ly_c_string_p (glyph))
+  if (!scm_is_string (glyph))
     return mol.smobbed_copy ();
   
   String text = ly_scm2string (glyph);
index 719a5ed17d0a8cb8c91097fa49c65af8cc173650..158d201330ce1d4db9718406374f30e3aa054c67 100644 (file)
@@ -48,11 +48,11 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
       /*
        UGH UGH
        */
-      if (ly_c_string_p (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("brace"))
-         && ly_c_string_p (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      if (scm_is_string (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("brace"))
+         && scm_is_string (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        inf.grob_->translate_axis (-0.8, X_AXIS); // ugh
-      else if (ly_c_string_p (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("bracket"))
-              && ly_c_string_p (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      else if (scm_is_string (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("bracket"))
+              && scm_is_string (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        {
          inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh
          inf.grob_->set_property ("arch-height",
index aec3166bb4108894909d8de54556993ecf8844cc..2aa3da9d4cbf751da326625bd4d4619fe310319b 100644 (file)
@@ -112,7 +112,7 @@ System_start_delimiter::print (SCM smob)
     return SCM_EOL;
   
   SCM s = me->get_property ("glyph");
-  if (!ly_c_string_p (s))
+  if (!scm_is_string (s))
     return SCM_EOL;
   SCM gsym = scm_string_to_symbol (s) ;
   
index 1226c8e3b31de96c2a01fae87ca64a00f4b330a1..66c1b6d83a26ef3f7755a6a946aefd24b1c2d4b2 100644 (file)
@@ -27,7 +27,7 @@ Text_item::interpret_string (SCM paper_smob,
   
   SCM_ASSERT_TYPE (paper, paper_smob, SCM_ARG1,
                   __FUNCTION__, "Paper definition");
-  SCM_ASSERT_TYPE (ly_c_string_p (markup), markup, SCM_ARG3,
+  SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
                   __FUNCTION__, "string");
   SCM_ASSERT_TYPE (input_encoding == SCM_EOL || ly_c_symbol_p (input_encoding),
                   input_encoding, SCM_ARG2, __FUNCTION__, "symbol");
@@ -36,7 +36,7 @@ Text_item::interpret_string (SCM paper_smob,
   if (!ly_c_symbol_p (input_encoding))
     {
       SCM enc = paper->lookup_variable (ly_symbol2scm ("inputencoding"));
-      if (ly_c_string_p (enc))
+      if (scm_is_string (enc))
        input_encoding = scm_string_to_symbol (enc);
       else if (ly_c_symbol_p (enc))
        input_encoding = enc;
@@ -69,7 +69,7 @@ MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
 SCM
 Text_item::interpret_markup (SCM paper_smob, SCM props, SCM markup)
 {
-  if (ly_c_string_p (markup))
+  if (scm_is_string (markup))
     return interpret_string (paper_smob, props, SCM_EOL, markup);
   else if (ly_c_pair_p (markup))
     {
@@ -98,7 +98,7 @@ Text_item::print (SCM grob)
 bool
 Text_item::markup_p (SCM x)
 {
-  return (ly_c_string_p (x)
+  return (scm_is_string (x)
          || (ly_c_pair_p (x)
              && SCM_BOOL_F
              != scm_object_property (ly_car (x),
index eebfe748af79965b8609204e002921b94f69f353..ab5bba26c4b6d547012880e279c5f9c10239efa2 100644 (file)
@@ -45,7 +45,7 @@ Timing_engraver::initialize ()
   Moment now = now_mom ();
   
   /* Set the first bar of the score? */
-  if (!ly_c_string_p (which))
+  if (!scm_is_string (which))
     which = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
       ? SCM_EOL : scm_makfrom0str ("|");
 
@@ -63,7 +63,7 @@ Timing_engraver::start_translation_timestep ()
   SCM which = get_property ("whichBar");
 
   /* Set the first bar of the score? */
-  if (!ly_c_string_p (which))
+  if (!scm_is_string (which))
     which = SCM_EOL;
 
   Moment mp = measure_position ();
@@ -77,7 +77,7 @@ Timing_engraver::start_translation_timestep ()
        ->set_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
-  if (!ly_c_string_p (which) && to_boolean (automatic_bars))
+  if (!scm_is_string (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
index 15cc8534ec89522ce3d5da4fbee797dddfc95836..8e2aa1b249761537c30ab3b2472ce803fe4eccfe 100644 (file)
@@ -170,7 +170,7 @@ Tuplet_bracket::print (SCM smob)
 
   Output_def *pap = me->get_paper ();
   Stencil num;
- if (ly_c_string_p (number) && number_visibility)
+ if (scm_is_string (number) && number_visibility)
     {
       SCM properties = Font_interface::text_font_alist_chain (me);
       SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
index 0d2d93a491053fc2e1b5c8f0469631db01c4eb7a..22abe4babc5c254d2ff8331234a2cd988f8d28e7 100644 (file)
@@ -50,7 +50,7 @@ Volta_bracket_interface::print (SCM smob)
   SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL;
   
   String str;
-  if (ly_c_string_p (glyph))
+  if (scm_is_string (glyph))
     str = ly_scm2string (glyph);
   else
     str = "|";
index 15fe9e9c0c1e5433b4aca179f173b58868a21b45..f9443a2fb72ae364d8bf9d446d661657797a5736 100644 (file)
@@ -147,7 +147,7 @@ Volta_engraver::process_music ()
     }
 
   if (volta_span_ && 
-      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
+      (scm_is_string (start_string_) || ly_c_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -162,7 +162,7 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_ && 
-      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
+      (scm_is_string (start_string_) || ly_c_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;