]> git.donarmstrong.com Git - lilypond.git/commitdiff
* buildscripts/analyse-cxx-log.py: new file. Read compile log to
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 24 Jan 2006 01:42:15 +0000 (01:42 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 24 Jan 2006 01:42:15 +0000 (01:42 +0000)
substitute appropriate functions.

* flower/include/string.hh (class String): remove to_str0 and
is_empty(). S&R everywhere.

91 files changed:
ChangeLog
buildscripts/analyse-cxx-log.py [new file with mode: 0644]
flower/include/file-storage.hh
flower/include/string-data.hh
flower/include/string-data.icc
flower/include/string-handle.hh
flower/include/string-handle.icc
flower/include/string.hh
flower/include/string.icc
flower/string-convert.cc
flower/string.cc
flower/warn.cc
lily/accidental-engraver.cc
lily/all-font-metrics.cc
lily/beam-quanting.cc
lily/binary-source-file.cc
lily/break-align-interface.cc
lily/clef.cc
lily/cluster.cc
lily/context-def.cc
lily/context-scheme.cc
lily/context.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/font-config-scheme.cc
lily/font-config.cc
lily/font-metric-scheme.cc
lily/font-metric.cc
lily/function-documentation.cc
lily/general-scheme.cc
lily/gregorian-ligature.cc
lily/grob-interface.cc
lily/grob-smob.cc
lily/hairpin.cc
lily/includable-lexer.cc
lily/include/source-file.hh
lily/input-scheme.cc
lily/input-smob.cc
lily/lexer.ll
lily/lily-guile.cc
lily/lily-lexer.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/lilypond-key.cc
lily/main.cc
lily/midi-item.cc
lily/midi-stream.cc
lily/modified-font-metric.cc
lily/moment.cc
lily/music-function.cc
lily/new-lyric-combine-music-iterator.cc
lily/note-head.cc
lily/note-name-engraver.cc
lily/open-type-font-scheme.cc
lily/open-type-font.cc
lily/output-def.cc
lily/pango-font.cc
lily/pango-select.cc
lily/paper-book.cc
lily/paper-column.cc
lily/paper-outputter-scheme.cc
lily/paper-outputter.cc
lily/paper-system.cc
lily/parse-scm.cc
lily/parser.yy
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch.cc
lily/program-option.cc
lily/relocate.cc
lily/repeat-acknowledge-engraver.cc
lily/rest.cc
lily/side-position-interface.cc
lily/simultaneous-music-iterator.cc
lily/slur-scoring.cc
lily/source-file.cc
lily/span-bar.cc
lily/spanner.cc
lily/staff-performer.cc
lily/stem.cc
lily/system-start-delimiter-engraver.cc
lily/text-metrics.cc
lily/tfm-reader.cc
lily/time-signature.cc
lily/translator-ctors.cc
lily/translator.cc
lily/ttf.cc
lily/vaticana-ligature-engraver.cc
lily/vertical-align-engraver.cc
lily/vertically-spaced-context-engraver.cc
lily/volta-repeat-iterator.cc

index dff1db7b945195d50b105a954eaf7abb221c5cbc..8568c031df77a988daf8c4cbdc59dab59ded7f42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-24  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * buildscripts/analyse-cxx-log.py: new file. Read compile log to
+       substitute appropriate functions.
+
+       * flower/include/string.hh (class String): remove to_str0 and
+       is_empty(). S&R everywhere.
+
 2006-01-23  Graham Percival  <gpermus@gmail.com>
 
        * Documentation/user/basic-notation.itely: add hairpin
 
 2006-01-22  Nicolas Sceaux  <nicolas.sceaux@free.fr>
 
-       * ly/music-functions-init.ly (parallelMusic): new music function for parallel
-       music entry.
+       * ly/music-functions-init.ly (parallelMusic): new music function
+       for parallel music entry.
 
-       * scm/define-music-properties.scm (all-music-properties): new 'void music property
+       * scm/define-music-properties.scm (all-music-properties): new
+       'void music property
 
        * scm/music-functions.scm (ly:music-message): make public, to be
        used in music function definitions
diff --git a/buildscripts/analyse-cxx-log.py b/buildscripts/analyse-cxx-log.py
new file mode 100644 (file)
index 0000000..e0872f0
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+import sys
+import os
+import re
+import string
+
+if len (sys.argv) < 5:
+       print 'args: LOGFILE CLASS FUNC NEW_FUNC'
+       
+func = sys.argv[3]
+new_func = sys.argv[4]
+klazz = sys.argv[2]
+log_ls = open (sys.argv[1]).readlines ()
+regex = re.compile ("([^:]+):([0-9]+): error: .class ([_a-zA-Z]+). has no member named .%s." % func)
+
+files = {}
+
+for l in log_ls:
+       m =  regex.search (l)
+       if not m:
+               continue
+       print l
+
+       file = m.group (1)
+       line_no = string.atoi (m.group (2))
+       klass = m.group (3)
+       
+       if klass <> klazz:
+               continue
+
+       if not files.has_key (file):
+               files[file] = open (file).read ().split ('\n')
+
+       line_no -= 1 
+       files[file][line_no] = re.sub (func, new_func, files[file][line_no])
+
+
+for (f,ls) in files.items():
+       print 'writing ', f 
+       os.rename (f, f + '~')
+       open (f, 'w').write ('\n'.join (ls))
+
index 80a832ab956c843cafb69ca3ca71450c54ccec9c..f13cc47173dd4c6d13f9cdd518f9998811aece8c 100644 (file)
@@ -17,7 +17,7 @@
 class File_storage
 {
 public:
-  virtual char const *to_str0 () const = 0;
+  virtual char const *c_str () const = 0;
   virtual int length () const = 0;
   virtual ~File_storage (){}
 };
index da528ef77bc466f20e58831bd7f86c3da78faf4e..43d145af6c278d02ede9198c89ba2ac09cb9134d 100644 (file)
@@ -64,7 +64,7 @@ class String_data
 
   void operator += (char const *str0);
 
-  char const *to_str0 () const;
+  char const *c_str () const;
 
   char *get_str0 ();
 
index fd603d532fe21edf8f2313ae2c4b8a6c8bfaf0e5..3e6e0d546d61f8e7bb2176c3fa594076fd4a4b29 100644 (file)
@@ -152,7 +152,7 @@ String_data::operator += (char const *str0)
 
 INLINE
 char const *
-String_data::to_str0 () const
+String_data::c_str () const
 {
   return (char const *)data_byte_;
 }
index ac951e756fc1409fa33935051a25930d87fc7c23..7527a2de5076fdcc87419b545d27a466ee774cf4 100644 (file)
@@ -37,7 +37,7 @@ public:
   String_handle (String_handle const &src);
 
   Byte const *to_bytes () const;
-  char const *to_str0 () const;
+  char const *c_str () const;
   Byte *get_bytes ();
   char *get_str0 ();
   bool is_binary_bo () const;
index d560c1cfc2cdcb4f872855910de3d42500dbca30..10314f441c822ba2acaff4b959eb04374b2365a7 100644 (file)
@@ -87,7 +87,7 @@ const *String_handle::to_bytes () const
 }
 
 INLINE char const *
-String_handle::to_str0 () const
+String_handle::c_str () const
 {
   return (char const *)data->to_bytes ();
 }
index af4ea7932fb29fa5d90c41cd99247520d192da66..93f83f234fba88af43462015a8d0d56cf5cafe5c 100644 (file)
@@ -95,7 +95,6 @@ public:
   Byte *get_copy_byte () const;
   char *get_copy_str0 () const;
 
-  char const *to_str0 () const;
   Byte const *to_bytes () const;
   char *get_str0 ();
   Byte *get_bytes ();
@@ -105,9 +104,7 @@ public:
   /// concatenate s
   void operator += (char const *s) { strh_ += s; }
   void operator += (String s);
-
-  bool is_empty () const;
-
+  
   void append (String);
   void prepend (String);
 
@@ -135,12 +132,11 @@ public:
   /// signed comparison,  analogous to memcmp;
   static int compare (String const &s1, const String &s2);
 
-  /// index of rightmost c 
-  int index_last (char c) const;
-
   /// index of rightmost element of string (???)
   int index_last (char const *string) const;
 
+  int index_last (char c) const;
+  
   int index (char c) const;
 
   /// index of leftmost occurance of STRING
index 52d221b5a0d74abbda527027569729fcafad731b..5da4b573f4ea717b672491aa26c4417f33013281 100644 (file)
@@ -19,9 +19,9 @@ to_string (String s)
 
 INLINE
 char const *
-String::to_str0 () const
+String::c_str () const
 {
-  return strh_.to_str0 ();
+  return strh_.c_str ();
 }
 
 // because char const* also has an operator ==, this is for safety:
index 7e771c8e73c7b510079ea68fe7679bd3bf5f524a..91ef7e7f93efd5da472585b4f1e0000fe476a946 100644 (file)
@@ -74,7 +74,7 @@ String_convert::dec2int (String dec_string)
     return 0;
 
   long l = 0;
-  int conv = sscanf (dec_string.to_str0 (), "%ld", &l);
+  int conv = sscanf (dec_string.c_str (), "%ld", &l);
   assert (conv);
 
   return (int)l;
@@ -95,7 +95,7 @@ String_convert::dec2double (String dec_string)
   if (!dec_string.length ())
     return 0;
   double d = 0;
-  int conv = sscanf (dec_string.to_str0 (), "%lf", &d);
+  int conv = sscanf (dec_string.c_str (), "%lf", &d);
   assert (conv);
   return d;
 }
@@ -287,7 +287,7 @@ String
 String_convert::precision_string (double x, int n)
 {
   String format = "%." + to_string (max (0, n - 1)) + "e";
-  String str = double_string (abs (x), format.to_str0 ());
+  String str = double_string (abs (x), format.c_str ());
 
   int exp = str.right_string (3).to_int ();
   str = str.left_string (str.length () - 4);
index 7b4620906a595ac07eaf430ec193344788c83989..1c23618f39d61d30c622c1efeaae239cc1a6153c 100644 (file)
@@ -56,16 +56,11 @@ String::String (int n, char c)
   *this = String_convert::char_string (c, n);
 }
 
-char const *
-String::c_str () const
-{
-  return to_str0 ();
-}
 
 bool
 String::empty () const
 {
-  return is_empty ();
+  return !length ();
 }
 
 int
@@ -225,11 +220,15 @@ String::get_str0 ()
   return strh_.get_str0 ();
 }
 
+#ifndef DISALLOW_OLD_STRING
 bool
 String::is_empty () const
 {
   return !length ();
 }
+#endif
+
+
 /**
    Do a signed comparison,  analogous to memcmp;
 */
@@ -257,7 +256,7 @@ String::index_last (char const c) const
   if (!length ())
     return -1;
 
-  char const *me = strh_.to_str0 ();
+  char const *me = strh_.c_str ();
   char const *p = (char const *)memrchr ((Byte *)me, length (), c);
   if (p)
     return p - me;
@@ -296,7 +295,7 @@ or   -1 if not found.
 int
 String::index (char c) const
 {
-  char const *me = strh_.to_str0 ();
+  char const *me = strh_.c_str ();
   char const *p = (char const *) memchr (me, c, length ());
   if (p)
     return p - me;
@@ -312,11 +311,11 @@ String::index (char c) const
 int
 String::index (String searchfor) const
 {
-  char const *me = strh_.to_str0 ();
+  char const *me = strh_.c_str ();
 
   char const *p
     = (char const *) memmem (me, length (),
-                            searchfor.to_str0 (), searchfor.length ());
+                            searchfor.c_str (), searchfor.length ());
 
   if (p)
     return p - me;
@@ -338,7 +337,7 @@ String::index_any (String set) const
   if (!n)
     return -1;
 
-  void const *me = (void const *) strh_.to_str0 ();
+  void const *me = (void const *) strh_.c_str ();
   for (int i = 0; i < set.length (); i++)
     {
       char *found = (char *) memchr (me, set[i], n);
@@ -450,7 +449,7 @@ void
 String::print_on (ostream &os) const
 {
   if (!strh_.is_binary_bo ())
-    os << to_str0 ();
+    os << c_str ();
   else
     for (int i = 0; i < length (); i++)
       os << (Byte) (*this)[ i ];
index 24117d7ec4d9632270aa16b576066482cd16c8c8..c911526c97c5e012c770617796ca6995056413c5 100644 (file)
@@ -23,7 +23,7 @@ progress_indication (String s)
   if (s == "\n")
     return;
 
-  fputs (s.to_str0 (), stderr);
+  fputs (s.c_str (), stderr);
   fflush (stderr);
   if (s.length ())
     progress_newline = s[s.length () - 1] == '\n';
@@ -42,13 +42,13 @@ message (String s)
 void
 warning (String s)
 {
-  message (_f ("warning: %s", s.to_str0 ()) + "\n");
+  message (_f ("warning: %s", s.c_str ()) + "\n");
 }
 
 void
 non_fatal_error (String s)
 {
-  message (_f ("error: %s", s.to_str0 ()) + "\n");
+  message (_f ("error: %s", s.c_str ()) + "\n");
 }
 
 /* Display an error message.  Always starts on a new line.  */
index 4558ff33939bbf87e411f87a2279acba5a5b4468..62329c6dc08fb87efdf8b12d30aa9e340d9c80ad 100644 (file)
@@ -235,7 +235,7 @@ number_accidentals (bool *different,
   *different = false;
   if (scm_is_pair (accidentals) && !scm_is_symbol (scm_car (accidentals)))
     warning (_f ("accidental typesetting list must begin with context-name: %s",
-                ly_scm2string (scm_car (accidentals)).to_str0 ()));
+                ly_scm2string (scm_car (accidentals)).c_str ()));
 
   for (; scm_is_pair (accidentals) && origin;
        accidentals = scm_cdr (accidentals))
@@ -263,7 +263,7 @@ number_accidentals (bool *different,
            }
          else
            warning (_f ("ignoring unknown accidental: %s",
-                        ly_symbol2string (type).to_str0 ()));
+                        ly_symbol2string (type).c_str ()));
        }
 
       /* if symbol then it is a context name.  Scan parent contexts to
@@ -279,7 +279,7 @@ number_accidentals (bool *different,
        }
       else
        warning (_f ("pair or context-name expected for accidental rule, found %s",
-                    ly_scm2string (rule).to_str0 ()));
+                    ly_scm2string (rule).c_str ()));
     }
 
   return number;
index 6882651b8b0f591bcd9c4df1bdfa2fbdfc92084c..9dc7691c6a9fdfa363eb7a6408d9032d37cfb9d9 100644 (file)
@@ -114,7 +114,7 @@ kpathsea_find_file (String name, String ext)
 
   if (ly_is_procedure (proc))
     {
-      SCM kp_result = scm_call_1 (proc, scm_makfrom0str (name.to_str0 ()));
+      SCM kp_result = scm_call_1 (proc, scm_makfrom0str (name.c_str ()));
       if (scm_is_string (kp_result))
        return ly_scm2string (kp_result);
     }
@@ -125,16 +125,16 @@ kpathsea_find_file (String name, String ext)
 Open_type_font *
 All_font_metrics::find_otf (String name)
 {
-  SCM sname = ly_symbol2scm (name.to_str0 ());
-  SCM name_string = scm_makfrom0str (name.to_str0 ());
+  SCM sname = ly_symbol2scm (name.c_str ());
+  SCM name_string = scm_makfrom0str (name.c_str ());
   SCM val;
   if (!otf_dict_->try_retrieve (sname, &val))
     {
       String file_name;
 
-      if (file_name.is_empty ())
+      if (file_name.empty ())
        file_name = search_path_.find (name + ".otf");
-      if (file_name.is_empty ())
+      if (file_name.empty ())
        return 0;
 
       if (be_verbose_global)
@@ -158,14 +158,14 @@ All_font_metrics::find_otf (String name)
 Tex_font_metric *
 All_font_metrics::find_tfm (String name)
 {
-  SCM sname = ly_symbol2scm (name.to_str0 ());
-  SCM name_string = scm_makfrom0str (name.to_str0 ());
+  SCM sname = ly_symbol2scm (name.c_str ());
+  SCM name_string = scm_makfrom0str (name.c_str ());
   SCM val;
   if (!tfm_dict_->try_retrieve (sname, &val))
     {
       String file_name;
 
-      if (file_name.is_empty ())
+      if (file_name.empty ())
        {
          /* FIXME: should add "cork-" prefix to lm* fonts.  How to do
             that, cleanly?  */
@@ -174,9 +174,9 @@ All_font_metrics::find_tfm (String name)
            file_name = p;
        }
 
-      if (file_name.is_empty ())
+      if (file_name.empty ())
        file_name = search_path_.find (name + ".tfm");
-      if (file_name.is_empty ())
+      if (file_name.empty ())
        return 0;
 
       if (be_verbose_global)
@@ -209,7 +209,7 @@ All_font_metrics::find_font (String name)
 
   if (!f)
     {
-      warning (_f ("can't find font: `%s'", name.to_str0 ()));
+      warning (_f ("can't find font: `%s'", name.c_str ()));
       warning (_ ("loading default font"));
     }
 
@@ -220,7 +220,7 @@ All_font_metrics::find_font (String name)
 
   if (!f)
     {
-      error (_f ("can't find default font: `%s'", def_name.to_str0 ()));
+      error (_f ("can't find default font: `%s'", def_name.c_str ()));
       error (_f ("(search path: `%s')", search_path_.to_string ()));
       error (_ ("giving up"));
     }
index 90ace1f4012a5dbd2dc2ea71943c21dce1127b2d..6ce2b7736ae9cc23affef172efb6fd93a24cc32c 100644 (file)
@@ -320,7 +320,7 @@ Beam::quanting (SCM smob, SCM posns)
 
       // debug quanting
       me->set_property ("quant-score",
-                       scm_makfrom0str (qscores[best_idx].score_card_.to_str0 ()));
+                       scm_makfrom0str (qscores[best_idx].score_card_.c_str ()));
     }
 #endif
 
index 0be17f601d319b48f02ad4aea0b8d64e9e161e42..270d8191641e015238f4cc8ca7d9159358e9c5a1 100644 (file)
@@ -28,8 +28,8 @@ Binary_source_file::quote_input (char const *pos_str0) const
   if (!contains (pos_str0))
     return "";
 
-  char const *begin_str0 = max (pos_str0 - 8, to_str0 ());
-  char const *end_str0 = min (pos_str0 + 7, to_str0 () + length ());
+  char const *begin_str0 = max (pos_str0 - 8, c_str ());
+  char const *end_str0 = min (pos_str0 + 7, c_str () + length ());
 
   String pre_string ((Byte const *)begin_str0, pos_str0 - begin_str0);
   pre_string = String_convert::bin2hex (pre_string);
@@ -55,7 +55,7 @@ Binary_source_file::get_line (char const *pos_str0) const
   if (!contains (pos_str0))
     return 0;
 
-  return pos_str0 - to_str0 ();
+  return pos_str0 - c_str ();
 }
 
 U8
index b5a2aa737723aa91f46c0bd6e9857ea856ef499a..e68453a34c2b16c4790554b31cffe7da6ade8e98 100644 (file)
@@ -191,8 +191,8 @@ Break_align_interface::calc_positioning_done (SCM smob)
            orig_string = unsmob_grob (l->get_property ("cause"))->name ();
 
          programming_error (_f ("No spacing entry from %s to `%s'",
-                                orig_string.to_str0 (),
-                                sym_string.to_str0 ()));
+                                orig_string.c_str (),
+                                sym_string.c_str ()));
        }
 
       Real distance = 1.0;
index a32a623df73298c05a5632b4f1dea021c94a17b8..04a5537a22f2464500f92ce2ffc35753933df592 100644 (file)
@@ -31,7 +31,7 @@ Clef::calc_glyph_name (SCM smob)
          str += "_change";
        }
 
-      return scm_makfrom0str (str.to_str0 ());
+      return scm_makfrom0str (str.c_str ());
     }
 
   s->suicide ();
@@ -51,7 +51,7 @@ Clef::print (SCM smob)
   Font_metric *fm = Font_interface::get_default_font (me);
   Stencil out = fm->find_by_name (glyph);
   if (out.is_empty ())
-    me->warning (_f ("clef `%s' not found", glyph.to_str0 ()));
+    me->warning (_f ("clef `%s' not found", glyph.c_str ()));
   return out.smobbed_copy ();
 }
 
index d370a65030dfe489a4996e00ae7782314b3d0e7b..7f4001007bfecbb29707c2367a9a51c9d6a12c64 100644 (file)
@@ -110,7 +110,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
       out.add_stencil (Lookup::round_filled_polygon (points, blotdiameter));
     }
   else
-    me->warning (_f ("unknown cluster style `%s'", shape.to_str0 ()));
+    me->warning (_f ("unknown cluster style `%s'", shape.c_str ()));
   return out;
 }
 
index 2f5362a0522797c990057fb7c8d311a8becafbbc..6f91d8292a58a0189e0be3dd9b57fc69bf3b61e7 100644 (file)
@@ -121,7 +121,7 @@ Context_def::add_context_mod (SCM mod)
     {
       if (!get_translator (sym))
        error (_f ("program has no such type: `%s'",
-                  ly_symbol2string (sym).to_str0 ()));
+                  ly_symbol2string (sym).c_str ()));
       else
        translator_mods_ = scm_cons (scm_list_2 (tag, sym), translator_mods_);
     }
index da50d012cb4cca8eac15fa24511570230b23e7a2..51b49b7d8fe606d5107af20fd5850331fa98e2af 100644 (file)
@@ -19,7 +19,7 @@ LY_DEFINE (ly_context_id, "ly:context-id",
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
 
-  return scm_makfrom0str (tr->id_string ().to_str0 ());
+  return scm_makfrom0str (tr->id_string ().c_str ());
 }
 
 LY_DEFINE (ly_context_name, "ly:context-name",
@@ -30,7 +30,7 @@ LY_DEFINE (ly_context_name, "ly:context-name",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  return ly_symbol2scm (tr->context_name ().to_str0 ());
+  return ly_symbol2scm (tr->context_name ().c_str ());
 }
 
 LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
index 07bc051024398236cf9094a286c37b9d613e1f96..852303f25de174c52f74eb8b97e51927559ca750 100644 (file)
@@ -153,7 +153,7 @@ Context::create_unique_context (SCM n, SCM operations)
   else
     {
       warning (_f ("can't find or create new `%s'",
-                  ly_symbol2string (n).to_str0 ()));
+                  ly_symbol2string (n).c_str ()));
       ret = 0;
     }
   return ret;
@@ -215,7 +215,7 @@ Context::find_create_context (SCM n, String id, SCM operations)
   else
     {
       warning (_f ("can't find or create `%s' called `%s'",
-                  ly_symbol2string (n).to_str0 (), id));
+                  ly_symbol2string (n).c_str (), id));
       ret = 0;
     }
   return ret;
@@ -307,7 +307,7 @@ Context::get_default_interpreter ()
       Context_def *t = unsmob_context_def (st);
       if (!t)
        {
-         warning (_f ("can't find or create: `%s'", name.to_str0 ()));
+         warning (_f ("can't find or create: `%s'", name.c_str ()));
          t = unsmob_context_def (this->definition_);
        }
 
@@ -497,10 +497,10 @@ Context::print_smob (SCM s, SCM port, scm_print_state *)
       scm_display (d->get_context_name (), port);
     }
 
-  if (!sc->id_string_.is_empty ())
+  if (!sc->id_string_.empty ())
     {
       scm_puts ("=", port);
-      scm_puts (sc->id_string_.to_str0 (), port);
+      scm_puts (sc->id_string_.c_str (), port);
     }
 
   scm_puts (" ", port);
index f2d79799dee81707d0e304b4536787b6b38d7ecc..f01d82462183a9ffb38bc2b688006155aae13d6b 100644 (file)
@@ -91,7 +91,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *)
   Duration *r = (Duration *) SCM_CELL_WORD_1 (s);
 
   scm_puts ("#<Duration ", port);
-  scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port);
+  scm_display (scm_makfrom0str (r->to_string ().c_str ()), port);
   scm_puts (" >", port);
 
   return 1;
index 04bae193165c877a8bcaaf33095873c08ebb65a2..5f5559110a4e92ca5bf90305b9e0c432f112ba55 100644 (file)
@@ -215,7 +215,7 @@ Dynamic_engraver::process_music ()
          else if (start_type == "CrescendoEvent")
            start_type = "crescendo";
 
-         SCM s = get_property ((start_type + "Spanner").to_str0 ());
+         SCM s = get_property ((start_type + "Spanner").c_str ());
          if (!scm_is_symbol (s) || s == ly_symbol2scm ("hairpin"))
            {
              cresc_ = make_spanner ("Hairpin", accepted_spanevents_drul_[START]->self_scm ());
@@ -244,8 +244,8 @@ Dynamic_engraver::process_music ()
              cresc_ = make_spanner ("DynamicTextSpanner", accepted_spanevents_drul_[START]->self_scm ());
              cresc_->set_property ("style", s);
              context ()->set_property ((start_type
-                                        + "Spanner").to_str0 (), SCM_EOL);
-             s = get_property ((start_type + "Text").to_str0 ());
+                                        + "Spanner").c_str (), SCM_EOL);
+             s = get_property ((start_type + "Text").c_str ());
              /*
                FIXME: use get_markup () to check type.
              */
@@ -253,7 +253,7 @@ Dynamic_engraver::process_music ()
                {
                  cresc_->set_property ("edge-text",
                                        scm_cons (s, scm_makfrom0str ("")));
-                 context ()->set_property ((start_type + "Text").to_str0 (),
+                 context ()->set_property ((start_type + "Text").c_str (),
                                            SCM_EOL);
                }
            }
index a31bfa6e696dbf5ca98cce471d9447cf5d29eacc..65349e87c22016de8ce487363b365c0f4faa0c77 100644 (file)
@@ -86,7 +86,7 @@ LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0
   FcValue val;
   
   val.type = FcTypeString;
-  val.u.s = (const FcChar8*)ly_scm2string (name).to_str0 (); // FC_SLANT_ITALIC;
+  val.u.s = (const FcChar8*)ly_scm2string (name).c_str (); // FC_SLANT_ITALIC;
   FcPatternAdd(pat, FC_FAMILY, val, FcFalse);
 
   FcResult result;
index 1e39ecbffbec15020894617d1da497e5651046f5..f91916adbaa40dc166bebbb9e6972c6f27ab9a1e 100644 (file)
@@ -44,10 +44,10 @@ init_fontconfig ()
   for (int i = 0; i < dirs.size (); i++)
     {
       String dir = dirs[i];
-      if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.to_str0 ()))
-       error (_f ("adding font directory: %s", dir.to_str0 ()));
+      if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.c_str ()))
+       error (_f ("adding font directory: %s", dir.c_str ()));
       else if (be_verbose_global)
-       message (_f ("adding font directory: %s", dir.to_str0 ()));
+       message (_f ("adding font directory: %s", dir.c_str ()));
     }
 
   FcConfigBuildFonts (font_config_global);
index 05e69a9de9a5ef0d01d90d8babd6cd3d50bce039..b24a94c3dbd4c3ad03b9a9bb405d473c9b93188d 100644 (file)
@@ -117,7 +117,7 @@ LY_DEFINE (ly_font_name, "ly:font-name",
   Font_metric *fm = unsmob_metrics (font);
 
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return scm_makfrom0str (fm->font_name ().to_str0 ());
+  return scm_makfrom0str (fm->font_name ().c_str ());
 }
 
 LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
index 5d472bcc2c62b98dcf21fe0e5dc0e2014c0e8807..9d90c62b7f7eafabd064c4b3a3850011d4576263 100644 (file)
@@ -41,7 +41,7 @@ Font_metric::find_by_name (String s) const
     {
       expr = scm_list_3 (ly_symbol2scm ("named-glyph"),
                         self_scm (),
-                        scm_makfrom0str (s.to_str0 ()));
+                        scm_makfrom0str (s.c_str ()));
       b = get_indexed_char (idx);
     }
 
@@ -183,7 +183,7 @@ Font_metric::text_stencil (String str) const
 {
   SCM lst = scm_list_3 (ly_symbol2scm ("text"),
                        this->self_scm (),
-                       scm_makfrom0str (str.to_str0 ()));
+                       scm_makfrom0str (str.c_str ()));
 
   Box b = text_dimension (str);
   return Stencil (b, lst);
index d1eacb357dceffe6e88bf7530d846f254fa6bae2..cb04138ac10620077324c122d2376c435a2000a5 100644 (file)
@@ -29,7 +29,7 @@ void ly_add_function_documentation (SCM func,
     + "\n" + doc;
 
   scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
-                               scm_makfrom0str (s.to_str0 ()));
+                               scm_makfrom0str (s.c_str ()));
   SCM entry = scm_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
   scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
 }
index fca5c81732cfc462e6c7086081e4bfa4757cd327..3ecb45fbd554e285fad30c13b839fc108d128c9b 100644 (file)
@@ -33,10 +33,10 @@ LY_DEFINE (ly_find_file, "ly:find-file",
 
   String nm = ly_scm2string (name);
   String file_name = global_path.find (nm);
-  if (file_name.is_empty ())
+  if (file_name.empty ())
     return SCM_BOOL_F;
 
-  return scm_makfrom0str (file_name.to_str0 ());
+  return scm_makfrom0str (file_name.c_str ());
 }
 
 /*
@@ -216,7 +216,7 @@ LY_DEFINE (ly_output_backend, "ly:output-backend",
           0, 0, 0, (),
           "Return name of output backend.")
 {
-  return scm_makfrom0str (output_backend_global.to_str0 ());
+  return scm_makfrom0str (output_backend_global.c_str ());
 }
 
 LY_DEFINE (ly_output_formats, "ly:output-formats",
@@ -229,7 +229,7 @@ LY_DEFINE (ly_output_formats, "ly:output-formats",
   SCM lst = SCM_EOL;
   int output_formats_count = output_formats.size ();
   for (int i = 0; i < output_formats_count; i++)
-    lst = scm_cons (scm_makfrom0str (output_formats[i].to_str0 ()), lst);
+    lst = scm_cons (scm_makfrom0str (output_formats[i].c_str ()), lst);
 
   return lst;
 }
@@ -273,7 +273,7 @@ LY_DEFINE (ly_effective_prefix, "ly:effective-prefix",
           0, 0, 0, (),
           "Return effective prefix.")
 {
-  return scm_makfrom0str (prefix_directory.to_str0 ());
+  return scm_makfrom0str (prefix_directory.c_str ());
 }
 
 LY_DEFINE (ly_chain_assoc_get, "ly:chain-assoc-get",
index 15a488b3b0840e4efe1c884a38569bc2b6d5b997..747a97bb1de4140ec988f2680ac36ce813f1bd92 100644 (file)
@@ -15,7 +15,7 @@ void check_prefix (String name, int mask, int prefix_set, String *str)
 {
   if (prefix_set & mask)
     {
-      if (!str->is_empty ())
+      if (!str->empty ())
        *str += ", ";
       *str += name;
     }
index 4a46652b71573950322864a94f6134f608bb9556..8a990cfb43b6f5ec1632e18ba2eb1e4804edcab0 100644 (file)
@@ -44,7 +44,7 @@ check_interfaces_for_property (Grob const *me, SCM sym)
       if (iface == SCM_BOOL_F)
        {
          String msg = to_string (_f ("Unknown interface `%s'",
-                                     ly_symbol2string (scm_car (ifs)).to_str0 ()));
+                                     ly_symbol2string (scm_car (ifs)).c_str ()));
          programming_error (msg);
          continue;
        }
@@ -55,8 +55,8 @@ check_interfaces_for_property (Grob const *me, SCM sym)
   if (!found)
     {
       String str = to_string (_f ("Grob `%s' has no interface for property `%s'",
-                                 me->name ().to_str0 (),
-                                 ly_symbol2string (sym).to_str0 ()));
+                                 me->name ().c_str (),
+                                 ly_symbol2string (sym).c_str ()));
       programming_error (str);
     }
 }
index ad13ecf7c59e3b801190f9e6645b1bfb45990af8..4fb42c9237d2a707fc0e0460d720e0de3cc57bc8 100644 (file)
@@ -48,7 +48,7 @@ Grob::print_smob (SCM s, SCM port, scm_print_state *)
   Grob *sc = (Grob *) SCM_CELL_WORD_1 (s);
 
   scm_puts ("#<Grob ", port);
-  scm_puts ((char *) sc->name ().to_str0 (), port);
+  scm_puts ((char *) sc->name ().c_str (), port);
 
   /* Do not print properties, that is too much hassle.  */
   scm_puts (" >", port);
index 26669fdbecd66f6c83b166912c9626546a1783be..5a9a885b231a3020c2c1c3c02852c193b70bd00f 100644 (file)
@@ -7,7 +7,6 @@
 */
 
 #include "hairpin.hh"
-
 #include "staff-symbol-referencer.hh"
 #include "line-interface.hh"
 #include "spanner.hh"
index 1ec8bcbbad103f557dc0b2bf4505a3fc9b00eaf5..9bcfbd23922434effed236a3bbeef4ec41a96a2a 100644 (file)
@@ -59,7 +59,7 @@ Includable_lexer::new_input (String name, Sources *sources)
       msg += "\n";
       msg += _f ("(search path: `%s')",
                 sources->path_->to_string ().c_str ());
-      LexerError (msg.to_str0 ());
+      LexerError (msg.c_str ());
       return;
     }
   file_name_strings_.push (file->name_string ());
@@ -128,7 +128,7 @@ Includable_lexer::here_str0 () const
 {
   if (include_stack_.is_empty ())
     return 0;
-  return include_stack_.top ()->to_str0 () + char_count_stack_.top ();
+  return include_stack_.top ()->c_str () + char_count_stack_.top ();
 }
 
 Includable_lexer::~Includable_lexer ()
index d3c5ab0aa5dfdcb2cfdd26d8d526e3fc556a71c3..161c8e3b8b4b96037f587f8fe272dfdd3de14ecc 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   virtual ~Source_file ();
 
-  char const *to_str0 () const;
+  char const *c_str () const;
   virtual String quote_input (char const *pos_str0) const;
   istream *get_istream ();
   bool contains (char const *pos_str0) const;
index 70a959c865b8c33df13ef84ad03c9c6fd17cf0d9..6923a8b1049b3494bfce46e912e70c9c2e301988 100644 (file)
@@ -42,7 +42,7 @@ LY_DEFINE (ly_input_file_line_column, "ly:input-file-line-char-column", 1, 0, 0,
 
   int l, ch, col;
   ip->get_counts (&l, &ch, &col);
-  return scm_list_4 (scm_makfrom0str (ip->file_string ().to_str0 ()),
+  return scm_list_4 (scm_makfrom0str (ip->file_string ().c_str ()),
                     scm_from_int (l),
                     scm_from_int (ch),
                     scm_from_int (col));
@@ -53,7 +53,7 @@ LY_DEFINE (ly_input_both_locations, "ly:input-both-locations", 1, 0, 0, (SCM sip
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
-  return scm_list_5 (scm_makfrom0str (ip->file_string ().to_str0 ()),
+  return scm_list_5 (scm_makfrom0str (ip->file_string ().c_str ()),
                     scm_from_int (ip->line_number ()),
                     scm_from_int (ip->column_number ()),
                     scm_from_int (ip->end_line_number ()),
index 03c9da46b0d9f2f06963deca275b964bfe3719e3..00c93305e783949c9cae23263ecb0d68c829669e 100644 (file)
@@ -27,7 +27,7 @@ static int
 print_smob (SCM s, SCM port, scm_print_state *)
 {
   String str = "#<location " + unsmob_input (s)->location_string () + ">";
-  scm_puts (str.to_str0 (), port);
+  scm_puts (str.c_str (), port);
   return 1;
 }
 
index 2aa5551d7d67bcb84f784580500afbdc2cd9d0b8..92bbdc5e623c9d2a05ecc0130c8c5b8e6e87e08e 100644 (file)
@@ -201,11 +201,11 @@ BOM_UTF8  \357\273\277
 
        yy_pop_state ();
        this->here_input().get_source_file ()->name_ = s;
-       message (_f ("Renaming input to: `%s'", s.to_str0 ()));
+       message (_f ("Renaming input to: `%s'", s.c_str ()));
        progress_indication ("\n");
        scm_module_define (scm_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
-                    scm_makfrom0str (s.to_str0 ()));
+                    scm_makfrom0str (s.c_str ()));
 
 }
 <version>.     {
@@ -267,7 +267,7 @@ BOM_UTF8    \357\273\277
        } else { 
            String msg (_f ("wrong or undefined identifier: `%s'", s ));
 
-           LexerError (msg.to_str0 ());
+           LexerError (msg.c_str ());
            SCM err = scm_current_error_port ();
            scm_puts ("This value was found in the table: ", err);
            scm_display (sid, err);
@@ -379,7 +379,7 @@ BOM_UTF8    \357\273\277
 
                /* yylval is union. Must remember STRING before setting SCM*/
                String *sp = yylval.string;
-               yylval.scm = scm_makfrom0str (sp->to_str0 ());
+               yylval.scm = scm_makfrom0str (sp->c_str ());
                delete sp;
                return STRING;
        }
@@ -400,7 +400,7 @@ BOM_UTF8    \357\273\277
 
                /* yylval is union. Must remember STRING before setting SCM*/
                String *sp = yylval.string;
-               yylval.scm = scm_makfrom0str (sp->to_str0 ());
+               yylval.scm = scm_makfrom0str (sp->c_str ());
                delete sp;
                return LYRICS_STRING;
        }
@@ -437,7 +437,7 @@ BOM_UTF8    \357\273\277
                if (c == '{' ||  c == '}') // brace open is for not confusing dumb tools.
                        here_input ().warning (
                                _ ("Brace found at end of lyric.  Did you forget a space?"));
-               yylval.scm = scm_makfrom0str (s.to_str0 ());
+               yylval.scm = scm_makfrom0str (s.c_str ());
 
 
                return LYRICS_STRING;
@@ -536,7 +536,7 @@ BOM_UTF8    \357\273\277
                if (c == '{' ||  c == '}')
                        here_input ().warning (
                                _ ("Brace found at end of markup.  Did you forget a space?"));
-               yylval.scm = scm_makfrom0str (s.to_str0 ());
+               yylval.scm = scm_makfrom0str (s.c_str ());
 
 
                return STRING;
@@ -628,7 +628,7 @@ BOM_UTF8    \357\273\277
 
 <*>.           {
        String msg = _f ("invalid character: `%c'", YYText ()[0]);
-       LexerError (msg.to_str0 ());
+       LexerError (msg.c_str ());
        return YYText ()[0];
 }
 
@@ -693,7 +693,7 @@ Lily_lexer::scan_escaped_word (String str)
 {
        // use more SCM for this.
 
-//     SCM sym = ly_symbol2scm (str.to_str0 ());
+//     SCM sym = ly_symbol2scm (str.c_str ());
 
        int i = lookup_keyword (str);
        if (i == MARKUP && is_lyric_state ())
@@ -715,9 +715,9 @@ Lily_lexer::scan_escaped_word (String str)
        }
 
        String msg (_f ("unknown escaped string: `\\%s'", str));        
-       LexerError (msg.to_str0 ());
+       LexerError (msg.c_str ());
 
-       yylval.scm = scm_makfrom0str (str.to_str0 ());
+       yylval.scm = scm_makfrom0str (str.c_str ());
 
        return STRING;
 }
@@ -725,7 +725,7 @@ Lily_lexer::scan_escaped_word (String str)
 int
 Lily_lexer::scan_bare_word (String str)
 {
-       SCM sym = ly_symbol2scm (str.to_str0 ());
+       SCM sym = ly_symbol2scm (str.c_str ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
                SCM handle = SCM_BOOL_F;
                if (scm_is_pair (pitchname_tab_stack_))
@@ -745,7 +745,7 @@ Lily_lexer::scan_bare_word (String str)
                }
        }
 
-       yylval.scm = scm_makfrom0str (str.to_str0 ());
+       yylval.scm = scm_makfrom0str (str.c_str ());
        return STRING;
 }
 
@@ -867,7 +867,7 @@ SCM
 lookup_markup_command (String s)
 {
        SCM proc = ly_lily_module_constant ("lookup-markup-command");
-       return scm_call_1 (proc, scm_makfrom0str (s.to_str0 ()));
+       return scm_call_1 (proc, scm_makfrom0str (s.c_str ()));
 }
 
 
index 4a237d7440a655118516012ebbe4440cac5516a2..f1c0488e3fc1121929223a4ed14b65a81f677f0e 100644 (file)
@@ -360,7 +360,7 @@ ly_string_array_to_scm (Array<String> a)
 {
   SCM s = SCM_EOL;
   for (int i = a.size () - 1; i >= 0; i--)
-    s = scm_cons (ly_symbol2scm (a[i].to_str0 ()), s);
+    s = scm_cons (ly_symbol2scm (a[i].c_str ()), s);
   return s;
 }
 
@@ -439,8 +439,8 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol)
   if (type != SCM_EOL && !ly_is_procedure (type))
     {
       warning (_f ("can't find property type-check for `%s' (%s).",
-                  ly_symbol2string (sym).to_str0 (),
-                  ly_symbol2string (type_symbol).to_str0 ())
+                  ly_symbol2string (sym).c_str (),
+                  ly_symbol2string (type_symbol).c_str ())
               + "  " + _ ("perhaps a typing error?"));
 
       /* Be strict when being anal :) */
@@ -460,9 +460,9 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol)
          SCM type_name = scm_call_1 (typefunc, type);
 
          warning (_f ("type check for `%s' failed; value `%s' must be of type `%s'",
-                      ly_symbol2string (sym).to_str0 (),
+                      ly_symbol2string (sym).c_str (),
                       print_scm_val (val),
-                      ly_scm2string (type_name).to_str0 ()));
+                      ly_scm2string (type_name).c_str ()));
          progress_indication ("\n");
        }
     }
index dd4c5e1b1d3cefec46ecd1c6baa8cc8150dc81e2..9117decb5f2f84db46929f13207afe894a22ef67 100644 (file)
@@ -173,7 +173,7 @@ Lily_lexer::set_current_scope ()
 int
 Lily_lexer::lookup_keyword (String s)
 {
-  return keytable_->lookup (s.to_str0 ());
+  return keytable_->lookup (s.c_str ());
 }
 
 SCM
@@ -192,7 +192,7 @@ Lily_lexer::lookup_identifier_symbol (SCM sym)
 SCM
 Lily_lexer::lookup_identifier (String name)
 {
-  return lookup_identifier_symbol (ly_symbol2scm (name.to_str0 ()));
+  return lookup_identifier_symbol (ly_symbol2scm (name.c_str ()));
 }
 
 void
@@ -206,7 +206,7 @@ Lily_lexer::start_main_input ()
 
   scm_module_define (scm_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
-                    scm_makfrom0str (main_input_name_.to_str0 ()));
+                    scm_makfrom0str (main_input_name_.c_str ()));
 }
 
 void
@@ -221,7 +221,7 @@ Lily_lexer::set_identifier (SCM name, SCM s)
       if (lookup_keyword (ly_symbol2string (sym)) >= 0)
        {
          String symstr = ly_symbol2string (sym);
-         warning (_f ("identifier name is a keyword: `%s'", symstr.to_str0 ()));
+         warning (_f ("identifier name is a keyword: `%s'", symstr.c_str ()));
        }
 
       SCM mod = scm_car (scopes_);
index f7eac0e9f19f6c02a223de3cbe98dc16a4325432..e9d533e91e62b4d4b8bd257e57b5df67ee5d5fc3 100644 (file)
@@ -52,7 +52,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
   out_file_name.dir_ = "";
 
   /* When running from gui, generate output in .ly source directory.  */
-  if (output_name_global.is_empty ()
+  if (output_name_global.empty ()
       && ly_get_option (ly_symbol2scm ("gui")) == SCM_BOOL_T)
     {
       File_name f (file);
@@ -61,7 +61,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       output_name_global = f.to_string ();
     }
 
-  if (!output_name_global.is_empty ())
+  if (!output_name_global.empty ())
     {
       /* Interpret --output=DIR to mean --output=DIR/BASE.  */
       if (is_dir (output_name_global))
@@ -73,8 +73,8 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
            {
              global_path.prepend (cwd);
              message (_f ("Changing working directory to `%s'",
-                          output_name_global.to_str0 ()));
-             chdir (output_name_global.to_str0 ());
+                          output_name_global.c_str ()));
+             chdir (output_name_global.c_str ());
            }
          output_name_global = "";
        }
@@ -83,7 +83,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
     }
 
   String init;
-  if (!init_name_global.is_empty ())
+  if (!init_name_global.empty ())
     init = init_name_global;
   else
     init = "init.ly";
@@ -110,7 +110,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       sources.set_path (&global_path);
 
       String mapped_fn = map_file_name (file_name);
-      message (_f ("Processing `%s'", mapped_fn.to_str0 ()));
+      message (_f ("Processing `%s'", mapped_fn.c_str ()));
       progress_indication ("\n");
 
       Lily_parser *parser = new Lily_parser (&sources);
@@ -123,7 +123,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       if (error)
        /* TODO: pass renamed input file too.  */
        scm_throw (ly_symbol2scm ("ly-file-failed"),
-                  scm_list_1 (scm_makfrom0str (file_name.to_str0 ())));
+                  scm_list_1 (scm_makfrom0str (file_name.c_str ())));
     }
   return SCM_UNSPECIFIED;
 }
@@ -224,6 +224,6 @@ LY_DEFINE (ly_parser_output_name, "ly:parser-output-name",
   Lily_parser *p = unsmob_lily_parser (parser);
   SCM_ASSERT_TYPE (p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
 
-  return scm_makfrom0str (p->output_basename_.to_str0 ());
+  return scm_makfrom0str (p->output_basename_.c_str ());
 }
 
index 00d68102e62ea38adb567c9ac65938db6f881c4e..5e4aede18c6ad24ac151f31cf045d4b7b1fd9c74 100644 (file)
@@ -102,7 +102,7 @@ Lily_parser::parse_file (String init, String name, String out_name)
   File_name f (name);
   String s = global_path.find (f.base_ + ".twy");
   s = gulp_file_to_string (s, false, -1);
-  scm_eval_string (scm_makfrom0str (s.to_str0 ()));
+  scm_eval_string (scm_makfrom0str (s.c_str ()));
 
   /* Read .ly IN_FILE, lex, parse, write \score blocks from IN_FILE to
      OUT_FILE (unless IN_FILE redefines output file name).  */
@@ -165,7 +165,7 @@ Lily_parser::here_str0 () const
 void
 Lily_parser::parser_error (String s)
 {
-  lexer_->here_input ().error (_ (s.to_str0 ()));
+  lexer_->here_input ().error (_ (s.c_str ()));
   error_level_ = 1;
 }
 
index be4c00b50eb75423b47d4796dc0346ed771a6f9d..d9833307afe1679caed24e835661f766e7c49f1d 100644 (file)
@@ -62,7 +62,7 @@ Lilypond_grob_key::as_scheme () const
 {
   return scm_list_4 (context_ ? context_->self_scm () : SCM_BOOL_F,
                     creation_moment_.smobbed_copy (),
-                    scm_makfrom0str (grob_name_.to_str0 ()),
+                    scm_makfrom0str (grob_name_.c_str ()),
                     scm_from_int (disambiguation_count_));
 }
 
@@ -145,8 +145,8 @@ Lilypond_context_key::as_scheme () const
 {
   return scm_list_5 (parent_context_ ? parent_context_->self_scm () : SCM_BOOL_F,
                     start_moment_.smobbed_copy (),
-                    scm_makfrom0str (context_name_.to_str0 ()),
-                    scm_makfrom0str (id_.to_str0 ()),
+                    scm_makfrom0str (context_name_.c_str ()),
+                    scm_makfrom0str (id_.c_str ()),
                     scm_from_int (disambiguation_count_));
 }
 
@@ -212,7 +212,7 @@ SCM
 Lilypond_general_key::as_scheme () const
 {
   return scm_list_3 (parent_ ? parent_->self_scm () : SCM_BOOL_F,
-                    scm_makfrom0str (name_.to_str0 ()),
+                    scm_makfrom0str (name_.c_str ()),
                     scm_from_int (disambiguation_count_));
 }
 
index e2a0ea20e9a0cc7f18d2323f5d5b8053d5c99855..daac5b01c05d63288beb5e87e06483d162ceadf8 100644 (file)
@@ -200,7 +200,7 @@ dir_info (FILE *out)
   env_var_info (out, "LILYPONDPREFIX");
   fprintf (out, "LOCALEDIR=\"%s\"\n", LOCALEDIR);
 
-  fprintf (out, "\nEffective prefix: \"%s\"\n", prefix_directory.to_str0 ());
+  fprintf (out, "\nEffective prefix: \"%s\"\n", prefix_directory.c_str ());
 
   if (relocate_binary)
     {
@@ -394,8 +394,8 @@ main_with_guile (void *, int, char **)
 
   all_fonts_global = new All_font_metrics (global_path.to_string ());
 
-  if (!init_scheme_variables.is_empty ()
-      || !init_scheme_code_string.is_empty ())
+  if (!init_scheme_variables.empty ()
+      || !init_scheme_code_string.empty ())
     {
       init_scheme_variables = "(map (lambda (x) (ly:set-option (car x) (cdr x))) (list "
        + init_scheme_variables + "))";
@@ -428,7 +428,7 @@ main_with_guile (void *, int, char **)
   option_parser = 0;
 
 #if HAVE_CHROOT
-  if (!jail_spec.is_empty ())
+  if (!jail_spec.empty ())
     do_chroot_jail ();
 #endif
 
index 6b372e94728e5e3813a06868253fb73de6175cdb..d094899dc31e3b0840fd0075bcf260aa6587e9f2 100644 (file)
@@ -145,12 +145,12 @@ Midi_instrument::to_string () const
     UGH. don't use eval.
   */
   SCM proc = ly_lily_module_constant ("midi-program");
-  SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
+  SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.c_str ()));
   found = (program != SCM_BOOL_F);
   if (found)
     program_byte = scm_to_int (program);
   else
-    warning (_f ("no such MIDI instrument: `%s'", audio_->str_.to_str0 ()));
+    warning (_f ("no such MIDI instrument: `%s'", audio_->str_.c_str ()));
 
   String str = ::to_string ((char) (0xc0 + channel_)); //YIKES! FIXME : Should be track. -rz
   str += ::to_string ((char)program_byte);
index c93aed53240858c69b8fca7a0e60475476160696..7af7a10649389afaf6fda77953c7a598319e8b41 100644 (file)
@@ -22,7 +22,7 @@ using namespace std;
 Midi_stream::Midi_stream (String file_name)
 {
   file_name_string_ = file_name;
-  out_file_ = fopen (file_name.to_str0 (), "wb");
+  out_file_ = fopen (file_name.c_str (), "wb");
   if (!out_file_)
     error (_f ("can't open for write: %s: %s", file_name, strerror (errno)));
 }
index e23323a8290ef8d38baab407ba8c4b60823ced47..74f744d87240359fbb13a4a747fedf2270a1679e 100644 (file)
@@ -179,7 +179,7 @@ Modified_font_metric::text_stencil (String text) const
 Box
 Modified_font_metric::text_dimension (String text) const
 {
-  SCM stext = scm_makfrom0str (text.to_str0 ());
+  SCM stext = scm_makfrom0str (text.c_str ());
   Box b = lookup_tex_text_dimension (orig_, stext);
   if (!b[Y_AXIS].is_empty ())
     {
index 5897f9163d01bbf70eed8ef046f715597bb26e2a..f0d34b8bc1562b719fc37d6f132027125a8afa87 100644 (file)
@@ -50,7 +50,7 @@ Moment::print_smob (SCM s, SCM port, scm_print_state *)
 
   scm_puts ("#<Mom ", port);
   String str = r->to_string ();
-  scm_puts ((char *)str.to_str0 (), port);
+  scm_puts ((char *)str.c_str (), port);
   scm_puts (">", port);
 
   return 1;
index 36a86a7688602e869dc120a1dc0586f67825e78b..e077624fe60f26df5d4618a5cc9173c85335480a 100644 (file)
@@ -51,7 +51,7 @@ LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
                             signature);
 
   scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature-keyword"),
-                            ly_symbol2scm (str.to_str0 ()));
+                            ly_symbol2scm (str.c_str ()));
 
   SCM_RETURN_NEWSMOB (music_function_tag, func);
 }
index d3521c74a99ba2fe67cab4eab11d2f9211d05178..0603ea7ea56899ec03b80fd7b91d7529687e7f48 100644 (file)
@@ -241,7 +241,7 @@ Lyric_combine_music_iterator::do_quit ()
        name = ly_scm2string (voice_name);
 
       get_music ()->origin ()->warning (_f ("cannot find Voice `%s'",
-                                           name.to_str0 ()) + "\n");
+                                           name.c_str ()) + "\n");
     }
 
   if (lyric_iter_)
index ddbc6d0962734309d879c8ad2fbb874499f373e8..b1cbf0d7caa409c60aefac528ab3f33bc76e6dcf 100644 (file)
@@ -63,7 +63,7 @@ internal_print (Grob *me, String *font_char)
 
   if (out.is_empty ())
     {
-      me->warning (_f ("note head `%s' not found", idx.to_str0 ()));
+      me->warning (_f ("note head `%s' not found", idx.c_str ()));
       out = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
     }
   else
index 4b63b4f32dcb74bde037f026252178cc44c96f5b..8946a43a82a8c54f79b432487e8c690d373653bf 100644 (file)
@@ -50,7 +50,7 @@ Note_name_engraver::process_music ()
   if (s.length ())
     {
       Item *t = make_item ("NoteName", events_[0]->self_scm ());
-      t->set_property ("text", scm_makfrom0str (s.to_str0 ()));
+      t->set_property ("text", scm_makfrom0str (s.c_str ()));
       texts_.push (t);
     }
 }
index 43f8c32f8d884d56d81393db8f0874a49cffde4f..5eb45a76a8adc2596116f84856ff229dd3064f02 100644 (file)
@@ -52,7 +52,7 @@ LY_DEFINE (ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
   char ctag [5] = "    ";
 
   String tag_string = ly_scm2string (tag);
-  strncpy (ctag, tag_string.to_str0 (), tag_string.length ());
+  strncpy (ctag, tag_string.c_str (), tag_string.length ());
 
   String tab = otf->get_otf_table (String (ctag));
 
index 85e38042f4fb3c3f1d62927e2736233af69e9102..7f165ce8fcd4fa2aa71662ccb5f4478ab922dc0c 100644 (file)
@@ -61,7 +61,7 @@ load_scheme_table (char const *tag_str, FT_Face face)
       String contents ((Byte const *)buffer, length);
       contents = "(quote (" + contents + "))";
 
-      tab = scm_c_eval_string (contents.to_str0 ());
+      tab = scm_c_eval_string (contents.c_str ());
       free (buffer);
     }
   return tab;
@@ -92,7 +92,7 @@ String
 get_otf_table (FT_Face face, String tag)
 {
   FT_ULong len;
-  FT_Byte *tab = load_table (tag.to_str0 (), face, &len);
+  FT_Byte *tab = load_table (tag.c_str (), face, &len);
 
   return String (tab, len);
 }
@@ -101,13 +101,13 @@ FT_Face
 open_ft_face (String str)
 {
   FT_Face face;
-  int error_code = FT_New_Face (freetype2_library, str.to_str0 (), 0, &face);
+  int error_code = FT_New_Face (freetype2_library, str.c_str (), 0, &face);
 
   if (error_code == FT_Err_Unknown_File_Format)
-    error (_f ("unsupported font format: %s", str.to_str0 ()));
+    error (_f ("unsupported font format: %s", str.c_str ()));
   else if (error_code)
     error (_f ("unknown error: %d reading font file: %s", error_code,
-              str.to_str0 ()));
+              str.c_str ()));
   return face;
 }
 
@@ -148,7 +148,7 @@ Open_type_font::derived_mark () const
 Offset
 Open_type_font::attachment_point (String glyph_name) const
 {
-  SCM sym = ly_symbol2scm (glyph_name.to_str0 ());
+  SCM sym = ly_symbol2scm (glyph_name.c_str ());
   SCM entry = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
 
   Offset o;
@@ -224,7 +224,7 @@ Open_type_font::get_indexed_char (int signed_idx) const
 int
 Open_type_font::name_to_index (String nm) const
 {
-  char *nm_str = (char *) nm.to_str0 ();
+  char *nm_str = (char *) nm.c_str ();
   if (int idx = FT_Get_Name_Index (face_, nm_str))
     return idx;
   return -1;
index b87dd470b26bd8647548aad75c0eb6fa9acb7a5f..bb40a4d72c9770f4158792fb0f8f36e3a92b75f4 100644 (file)
@@ -120,7 +120,7 @@ Output_def::lookup_variable (SCM sym) const
 SCM
 Output_def::c_variable (String s) const
 {
-  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
+  return lookup_variable (ly_symbol2scm (s.c_str ()));
 }
 
 void
index cdfd744782fe0bd8fcc63f116bca63aec38b5de5..35eb6cb01ccb78e642f7b27b3549e79b83433044 100644 (file)
@@ -63,8 +63,8 @@ void
 Pango_font::register_font_file (String filename, String ps_name)
 {
   scm_hash_set_x (physical_font_tab_,
-                 scm_makfrom0str (ps_name.to_str0 ()),
-                 scm_makfrom0str (filename.to_str0 ()));
+                 scm_makfrom0str (ps_name.c_str ()),
+                 scm_makfrom0str (filename.c_str ()));
 }
 
 void
@@ -81,7 +81,7 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, String str) const
   PangoAnalysis const *pa = &(item->analysis);
   PangoGlyphString *pgs = pango_glyph_string_new ();
 
-  pango_shape (str.to_str0 () + item->offset,
+  pango_shape (str.c_str () + item->offset,
               item->length, (PangoAnalysis*) pa, pgs);
 
   PangoRectangle logical_rect;
@@ -187,7 +187,7 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, String str) const
       pango_fc_font_unlock_face (fcfont);
 
       SCM expr = scm_list_5 (ly_symbol2scm ("glyph-string"),
-                            scm_makfrom0str (ps_name.to_str0 ()),
+                            scm_makfrom0str (ps_name.c_str ()),
                             scm_from_double (size),
                             scm_from_bool (cid_keyed),
                             ly_quote_scm (glyph_exprs));
@@ -210,7 +210,7 @@ Pango_font::text_stencil (String str) const
 {
   GList *items
     = pango_itemize (context_,
-                    str.to_str0 (),
+                    str.c_str (),
                     0, str.length (), attribute_list_,
                     NULL);
 
@@ -270,7 +270,7 @@ Pango_font::text_stencil (String str) const
       SCM exp
        = scm_list_3 (ly_symbol2scm ("utf-8-string"),
                      scm_makfrom0str (descr_string),
-                     scm_makfrom0str (str.to_str0 ()));
+                     scm_makfrom0str (str.c_str ()));
 
       g_free (descr_string);
 
index 6cb4285056b489252d31398c6b9ab4a60dc55986..8f7eb462a3149ab9a90780f1f108925966efe103 100644 (file)
@@ -20,7 +20,7 @@ properties_to_pango_description (SCM chain, Real text_size)
   if (scm_is_string (name))
     {
       String name_str = ly_scm2string (name);
-      description = pango_font_description_from_string (name_str.to_str0 ());
+      description = pango_font_description_from_string (name_str.c_str ());
     }
   else
     {
@@ -140,7 +140,7 @@ symbols_to_pango_font_description (SCM family,
     family_str = ly_scm2string (family);
 
   pango_font_description_set_family (description,
-                                    family_str.to_str0 ());
+                                    family_str.c_str ());
   pango_font_description_set_style (description,
                                    symbol_to_pango_style (style));
   pango_font_description_set_variant (description,
index fc344239868f5f9632e688e045fe10f9d9df0b67..032af56391a5b97a845e078f2d98eebe7ec55966 100644 (file)
@@ -67,7 +67,7 @@ dump_fields ()
   SCM fields = SCM_EOL;
   for (int i = dump_header_fieldnames_global.size (); i--;)
     fields
-      = scm_cons (ly_symbol2scm (dump_header_fieldnames_global[i].to_str0 ()),
+      = scm_cons (ly_symbol2scm (dump_header_fieldnames_global[i].c_str ()),
                  fields);
   return fields;
 }
@@ -106,7 +106,7 @@ Paper_book::output (SCM output_channel)
 
   String mod_nm = "scm framework-" + output_backend_global;
 
-  SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
+  SCM mod = scm_c_resolve_module (mod_nm.c_str ());
   if (make_print)
     {
       SCM func = scm_c_module_lookup (mod, "output-framework");
@@ -147,7 +147,7 @@ Paper_book::classic_output (SCM output)
   String format = output_backend_global;
   String mod_nm = "scm framework-" + format;
 
-  SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
+  SCM mod = scm_c_resolve_module (mod_nm.c_str ());
   SCM func = scm_c_module_lookup (mod, "output-classic-framework");
 
   func = scm_variable_ref (func);
index f7cd30334c1a5eed226e03c4d78e39e154c638d0..188b24f12b0f212a1f47ed40808312280e5d2e38 100644 (file)
@@ -122,10 +122,10 @@ Paper_column::print (SCM p)
 
   SCM scm_mol = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                  properties,
-                                                 scm_makfrom0str (r.to_str0 ()));
+                                                 scm_makfrom0str (r.c_str ()));
   SCM when_mol = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                   properties,
-                                                  scm_makfrom0str (when.to_str0 ()));
+                                                  scm_makfrom0str (when.c_str ()));
   Stencil t = *unsmob_stencil (scm_mol);
   t.add_at_edge (Y_AXIS, DOWN, *unsmob_stencil (when_mol), 0.1, 0.1);
   t.align_to (X_AXIS, CENTER);
index d5b52e0998f198483376506d9283c0c31e6ad466..2bfdde5bc4034b66c1d2b717c3c1a1c848d7f494 100644 (file)
@@ -29,7 +29,7 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
     output_name = ly_scm2string (port_name);
 
   message (_f ("Layout output to `%s'...",
-              output_name.to_str0 ()));
+              output_name.c_str ()));
 
   progress_indication ("\n");
   Paper_outputter *po = new Paper_outputter (port, f);
index 41a941884dc5ef7c763899da48f544195c1ebc3b..7a39af91d57e141b4359de8a6911d647c764616d 100644 (file)
@@ -35,7 +35,7 @@ Paper_outputter::Paper_outputter (SCM port, String format)
   smobify_self ();
 
   String module_name = "scm output-" + format;
-  output_module_ = scm_c_resolve_module (module_name.to_str0 ());
+  output_module_ = scm_c_resolve_module (module_name.c_str ());
 }
 
 Paper_outputter::~Paper_outputter ()
index ea9c0c4346f23a69776d06c6568fd9508982d705..b8fdfaa9d01b4b28c7ba3234e4abd9b443f9d860 100644 (file)
@@ -76,8 +76,6 @@ Paper_system::internal_get_property (SCM sym) const
     return scm_cdr (s);
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
-
-     
   return (s == SCM_BOOL_F) ? SCM_EOL : scm_cdr (s);
 }
 
index 834fac644955cfa01c1d9115eca9569d350ceeae..4aee3942903de7959dbb7dc5800deb99180780d6 100644 (file)
@@ -25,7 +25,7 @@ internal_ly_parse_scm (Parse_start *ps)
   Source_file *sf = ps->start_location_.get_source_file ();
   SCM port = sf->get_port ();
 
-  int off = ps->start_location_.start () - sf->to_str0 ();
+  int off = ps->start_location_.start () - sf->c_str ();
 
   scm_seek (port, scm_long2num (off), scm_long2num (SEEK_SET));
   SCM from = scm_ftell (port);
index 195daf46fbd832f3d510a0c8ea8194fd59307c33..efd69b91501d9885690fb04df14f16013f73411b 100644 (file)
@@ -2743,7 +2743,7 @@ bool
 is_regular_identifier (SCM id)
 {
   String str = ly_scm2string (id);
-  char const *s = str.to_str0 ();
+  char const *s = str.c_str ();
 
   bool v = true;
 #if 0
index 80677d7829df397627c0e494319d59a0cad17a93..5ca0d358c4ab9288384c9cf518927cea829de678 100644 (file)
@@ -152,7 +152,7 @@ Piano_pedal_engraver::try_music (Music *m)
        {
          String nm = p->name_ + String ("Event");
          if (ly_is_equal (m->get_property ("name"),
-                          scm_str2symbol (nm.to_str0 ())))
+                          scm_str2symbol (nm.c_str ())))
            {
              Direction d = to_dir (m->get_property ("span-direction"));
              p->event_drul_[d] = m;
@@ -174,7 +174,7 @@ Piano_pedal_engraver::process_music ()
            {
              String name = String (p->name_) + "PedalLineSpanner";
              Music *rq = (p->event_drul_[START] ? p->event_drul_[START] : p->event_drul_[STOP]);
-             p->line_spanner_ = make_spanner (name.to_str0 (), rq->self_scm ());
+             p->line_spanner_ = make_spanner (name.c_str (), rq->self_scm ());
            }
 
          /* Choose the appropriate grobs to add to the line spanner
@@ -191,7 +191,7 @@ Piano_pedal_engraver::process_music ()
          */
 
          String prop = String ("pedal") + p->name_ + "Style";
-         SCM style = get_property (prop.to_str0 ());
+         SCM style = get_property (prop.c_str ());
 
          bool mixed = style == ly_symbol2scm ("mixed");
          bool bracket = (mixed
@@ -211,7 +211,7 @@ void
 Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
 {
   SCM s = SCM_EOL;
-  SCM strings = get_property (("pedal" + String (p->name_) + "Strings").to_str0 ());
+  SCM strings = get_property (("pedal" + String (p->name_) + "Strings").c_str ());
 
   if (scm_ilength (strings) < 3)
     {
@@ -271,7 +271,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
     {
       String propname = String (p->name_) + "Pedal";
 
-      p->item_ = make_item (propname.to_str0 (), (p->event_drul_[START]
+      p->item_ = make_item (propname.c_str (), (p->event_drul_[START]
                                                  ? p->event_drul_[START]
                                                  : p->event_drul_[STOP])->self_scm ());
 
index 1dfa092bca3c885c35c34b9fcb1d9ab20e7fe4ce..e19feb9e42c2415c8a01d5b7a7c93d3440ac297b 100644 (file)
@@ -132,7 +132,7 @@ Piano_pedal_performer::try_music (Music *r)
        {
          String nm = p->name_ + String ("Event");
          if (ly_is_equal (r->get_property ("name"),
-                          scm_str2symbol (nm.to_str0 ())))
+                          scm_str2symbol (nm.c_str ())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
              p->event_drul_[d] = r;
index 245c8660304a9ad7c300b21e38239863cd73c397..6f5ea965eea5225bbf40811d54cd3c253543bbc0 100644 (file)
@@ -245,7 +245,7 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Pitch *r = (Pitch *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Pitch ", port);
-  scm_display (scm_makfrom0str (r->to_string ().to_str0 ()), port);
+  scm_display (scm_makfrom0str (r->to_string ().c_str ()), port);
   scm_puts (" >", port);
   return 1;
 }
index a9d2329b3cd2dc5c20023245de88f44e949db359..00e0fc998093c0a9d191609a4153e234a1d34cd4 100644 (file)
@@ -136,7 +136,7 @@ LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
           "Print ly:set-option usage")
 {
   String help = get_help_string ();
-  fputs (help.to_str0 (), stdout);
+  fputs (help.c_str (), stdout);
 
   exit (0);
   return SCM_UNSPECIFIED;
@@ -177,13 +177,13 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
   String varstr = ly_scm2string (scm_symbol_to_string (var));
   if (varstr.left_string (3) == String ("no-"))
     {
-      var = ly_symbol2scm (varstr.nomid_string (0, 3).to_str0 ());
+      var = ly_symbol2scm (varstr.nomid_string (0, 3).c_str ());
       val = scm_from_bool (!to_boolean (val));
     }
 
   SCM handle = scm_hashq_get_handle (option_hash, var);
   if (handle == SCM_BOOL_F)
-    warning (_f ("no such internal option: %s", varstr.to_str0 ()));
+    warning (_f ("no such internal option: %s", varstr.c_str ()));
 
   internal_set_option (var, val);
   return SCM_UNSPECIFIED;
index fec75ee470cc7012ede1e979a78ba6e77b467e88..d511d21be1d455e0a06d9487ba1b9236b87529b6 100644 (file)
@@ -33,7 +33,7 @@ sane_putenv (char const *key, String value, bool overwrite)
   if (overwrite || !getenv (key))
     {
       String combine = String (key) + "=" + value;
-      char *s = strdup (combine.to_str0 ());
+      char *s = strdup (combine.c_str ());
       return putenv (s);
     }
   
@@ -66,12 +66,12 @@ prepend_env_path (char const *key, String value)
   if (is_dir (value))
     {
       if (be_verbose_global)
-       progress_indication (_f ("%s=%s\n", key, value.to_str0 ())); 
+       progress_indication (_f ("%s=%s\n", key, value.c_str ())); 
 
       if (char const *cur = getenv (key))
        value += to_string (PATHSEP) + cur;
 
-      return sane_putenv (key, value.to_str0 (), true);
+      return sane_putenv (key, value.c_str (), true);
     }
   else if (be_verbose_global)
     warning (_f ("no such directory: %s for %s", value, key));
@@ -100,7 +100,7 @@ prefix_relocation (String prefix)
   if (be_verbose_global)
     warning (_f ("Relocation: compile prefix=%s, new prefix=%s",
                 prefix_directory,
-                prefix.to_str0 ()));
+                prefix.c_str ()));
   
   String bindir = prefix + "/bin";
   String datadir = prefix + "/share";
@@ -112,7 +112,7 @@ prefix_relocation (String prefix)
 
 #if HAVE_GETTEXT
   if (is_dir (localedir))
-    bindtextdomain ("lilypond", localedir.to_str0 ());
+    bindtextdomain ("lilypond", localedir.c_str ());
 #endif
 
   prepend_env_path ("PATH", bindir);
@@ -220,7 +220,7 @@ setup_paths (char const *argv0_ptr)
          argv0_abs = path.find (argv0_filename.to_string (), ext);
 #endif /* __MINGW32__ */
 
-         if (argv0_abs.is_empty ())
+         if (argv0_abs.empty ())
            programming_error ("can't find absolute argv0.");
        }
 
@@ -259,7 +259,7 @@ setup_paths (char const *argv0_ptr)
   
   struct stat statbuf;
   String build_prefix = prefix_directory + "/share/lilypond/" TOPLEVEL_VERSION;
-  if (stat (build_prefix.to_str0 (), &statbuf) == 0)
+  if (stat (build_prefix.c_str (), &statbuf) == 0)
     prefix_directory = build_prefix;
 
   
index 1a227022417e84a0ca4ce1f2c5e9dbdcb0de4ed0..6de07648c185698adf07d6dae6b3b6579093854b 100644 (file)
@@ -102,7 +102,7 @@ Repeat_acknowledge_engraver::process_music ()
   if (!scm_is_string (wb) || ly_is_equal (db, wb))
     {
       if (s != "" || (volta_found && !scm_is_string (wb)))
-       context ()->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
+       context ()->set_property ("whichBar", scm_makfrom0str (s.c_str ()));
     }
 }
 
index 552f881109c88135763ae36b35cef98bf6990b59..bc81554df383909f1c704242fea0a3b19ac0dbda 100644 (file)
@@ -74,7 +74,7 @@ Rest::glyph_name (Grob *me, int balltype, String style, bool try_ledgers)
       is_ledgered |= (balltype == 1) && (pos <= -rad - 2 || pos > +rad);
     }
 
-  String actual_style (style.to_str0 ());
+  String actual_style (style.c_str ());
 
   if ((style == "mensural") || (style == "neomensural"))
     {
@@ -136,7 +136,7 @@ Rest::brew_internal_stencil (Grob *me, bool ledgered)
   String font_char = glyph_name (me, balltype, style, ledgered);
   Stencil out = fm->find_by_name (font_char);
   if (out.is_empty ())
-    me->warning (_f ("rest `%s' not found", font_char.to_str0 ()));
+    me->warning (_f ("rest `%s' not found", font_char.c_str ()));
 
   return out.smobbed_copy ();
 }
index 9decfed4054484cfaa8dafb4fa7d084844cd099d..6acdc3977c15279ae662b107cd8a2e1b31ddfba5 100644 (file)
@@ -108,7 +108,7 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
     {
       String msg
        = String_convert::form_string ("Improbable offset for grob %s: %f%s",
-                                      me->name ().to_str0 (), total_off,
+                                      me->name ().c_str (), total_off,
                                       INTERNAL_UNIT);
 
       programming_error (msg);
index 33b5bc04728578be39b6bef05292c4228aa78bb5..16691c3e63170de25d9dfb7a5d7cc6d56fb115f2 100644 (file)
@@ -50,7 +50,7 @@ Simultaneous_music_iterator::construct_children ()
       /* if create_separate_contexts_ is set, create a new context with the
         number number as name */
 
-      SCM name = ly_symbol2scm (get_outlet ()->context_name ().to_str0 ());
+      SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ());
       Context *t = (j && create_separate_contexts_)
        ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
        : get_outlet ();
index 6005bc076ba3095faad119bb2318f7abbf4b1463..d842abfc09b5841bd7da6a763a6039f575af5a4f 100644 (file)
@@ -435,7 +435,7 @@ Slur_score_state::get_best_curve ()
 
   // debug quanting
   slur_->set_property ("quant-score",
-                      scm_makfrom0str (configurations_[opt_idx]->score_card_.to_str0 ()));
+                      scm_makfrom0str (configurations_[opt_idx]->score_card_.c_str ()));
 
 #endif
 
index f6537edddb01c5c9a221fb564433060a1b6ac820..334d10d40f509b38ccda2ea0bb5f150be0cecf24 100644 (file)
@@ -50,10 +50,10 @@ gulp_file (String filename, int *filesize)
 {
   /* "b" must ensure to open literally, avoiding text (CR/LF)
      conversions.  */
-  FILE *f = fopen (filename.to_str0 (), "rb");
+  FILE *f = fopen (filename.c_str (), "rb");
   if (!f)
     {
-      warning (_f ("can't open file: `%s'", filename.to_str0 ()));
+      warning (_f ("can't open file: `%s'", filename.c_str ()));
       return 0;
     }
 
@@ -84,7 +84,7 @@ Source_file::Source_file (String filename, String data)
   istream_ = 0;
   contents_str0_ = data.get_copy_str0 ();
   length_ = data.length ();
-  pos_str0_ = to_str0 ();
+  pos_str0_ = c_str ();
   init_port ();
 
   for (int i = 0; i < length_; i++)
@@ -106,7 +106,7 @@ Source_file::Source_file (String filename_string)
       contents_str0_ = gulp_file (filename_string, &length_);
     }
   
-  pos_str0_ = to_str0 ();
+  pos_str0_ = c_str ();
 
   init_port ();
 
@@ -135,7 +135,7 @@ Source_file::get_istream ()
   if (!istream_)
     {
       if (length ()) // can-t this be done without such a hack?
-       istream_ = new istringstream (to_str0 ());
+       istream_ = new istringstream (c_str ());
       else
        {
          istream_ = new istringstream ("");
@@ -149,7 +149,7 @@ Source_file::get_istream ()
 String
 Source_file::file_line_column_string (char const *context_str0) const
 {
-  if (!to_str0 ())
+  if (!c_str ())
     return " (" + _ ("position unknown") + ")";
   else
     {
@@ -196,7 +196,7 @@ Source_file::line_slice (char const *pos_str0) const
   if (!contains (pos_str0))
     return Slice (0, 0);
 
-  char const *data_str0 = to_str0 ();
+  char const *data_str0 = c_str ();
   char const *eof_C_ = data_str0 + length ();
 
   if (pos_str0 == eof_C_)
@@ -227,7 +227,7 @@ Source_file::line_string (char const *pos_str0) const
     return "";
 
   Slice line = line_slice (pos_str0);
-  char const *data_str0 = to_str0 ();
+  char const *data_str0 = c_str ();
   return String ((Byte const *)data_str0 + line[LEFT], line.length ());
 }
 
@@ -247,12 +247,12 @@ Source_file::get_counts (char const *pos_str0,
   *line_number = get_line (pos_str0);
 
   Slice line = line_slice (pos_str0);
-  char const *data = to_str0 ();
+  char const *data = c_str ();
   Byte const *line_start = (Byte const *)data + line[LEFT];
 
   int left = (Byte const *) pos_str0 - line_start;
   String line_begin (line_start, left);
-  char const *line_chars = line_begin.to_str0 ();
+  char const *line_chars = line_begin.c_str ();
 
   *column = 0;
   *line_char = 0;
@@ -301,7 +301,7 @@ Source_file::get_counts (char const *pos_str0,
 bool
 Source_file::contains (char const *pos_str0) const
 {
-  return (pos_str0 && (pos_str0 >= to_str0 ()) && (pos_str0 <= to_str0 () + length ()));
+  return (pos_str0 && (pos_str0 >= c_str ()) && (pos_str0 <= c_str () + length ()));
 }
 
 int
@@ -339,7 +339,7 @@ Source_file::length () const
 }
 
 char const *
-Source_file::to_str0 () const
+Source_file::c_str () const
 {
   return contents_str0_;
 }
@@ -356,7 +356,7 @@ Source_file::set_pos (char const *pos_str0)
 char const *
 Source_file::seek_str0 (int n)
 {
-  char const *new_str0 = to_str0 () + n;
+  char const *new_str0 = c_str () + n;
   if (n < 0)
     new_str0 += length ();
   if (contains (new_str0))
index 7d1dd3fa6b5d6afba680fb4f668b215cd8363b92..9a3a5c1e15d6b0f1d632e5a5ed4f5d5a65a72c97 100644 (file)
@@ -185,7 +185,7 @@ Span_bar::calc_glyph_name (SCM smob)
   else if (type == ":|:")
     type = ".|.";
 
-  return scm_makfrom0str (type.to_str0 ());
+  return scm_makfrom0str (type.c_str ());
 }
 
 Interval
index 967fc62179dbaed6384acbaeb617b0168840da52..0e3d0fc559d98f5d4597d80c33cf885a7a1a4542 100644 (file)
@@ -45,8 +45,8 @@ Spanner::do_break_processing ()
          if (!parent->spanned_rank_iv ().superset (this->spanned_rank_iv ()))
            {
              programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner `%s'.",
-                                           name ().to_str0 (),
-                                           parent->name ().to_str0 ()));
+                                           name ().c_str (),
+                                           parent->name ().c_str ()));
            }
        }
     }
index e6ea5567d9b0dca6e0e33c96ac31e733e7d281d6..77770cab3cc3c47f3f1095f2aff6c177e32a7144 100644 (file)
@@ -101,7 +101,7 @@ Staff_performer::stop_translation_timestep ()
 {
   SCM proc = ly_lily_module_constant ("percussion?");
 
-  SCM drums = scm_call_1 (proc, ly_symbol2scm (instrument_string_.to_str0 ()));
+  SCM drums = scm_call_1 (proc, ly_symbol2scm (instrument_string_.c_str ()));
   audio_staff_->channel_ = (drums == SCM_BOOL_T ? 9 : -1);
   if (name_)
     {
index 18314f1b193c46fae31ffc05b2cbdbce05db0a9b..6829af1a358d66f6b155f0b8577151973a14a709 100644 (file)
@@ -592,7 +592,7 @@ Stem::flag (Grob *me)
   if (scm_is_string (stroke_style_scm))
     {
       String stroke_style = ly_scm2string (stroke_style_scm);
-      if (!stroke_style.is_empty ())
+      if (!stroke_style.empty ())
        {
          String font_char = to_string (dir) + stroke_style;
          Stencil stroke = fm->find_by_name ("flags." + font_char);
index d5adf8ecb959fb0865a0b2d0c4cb9aa291216cf4..a8dde07527369ab098c064433c25a0758ca54e8d 100644 (file)
@@ -77,7 +77,7 @@ Bracket_nesting_group::create_grobs (Engraver *engraver, SCM default_type)
 {
   SCM type = scm_is_symbol (symbol_) ? symbol_ : default_type;
   delimiter_ = make_spanner_from_properties (engraver, type,
-                                            SCM_EOL, ly_symbol2string (type).to_str0 ());
+                                            SCM_EOL, ly_symbol2string (type).c_str ());
 
   for (int i = 0 ; i < children_.size (); i++)
     {
index 84f4210cabde0ef5a395c168166dba97fd992156..89dbfbd1cbfe34468206384b15fd1a7b603e5439 100644 (file)
@@ -27,7 +27,7 @@ lookup_tex_text_dimension (Font_metric *font, SCM text)
   if (text_dimension_hash_tab)
     {
       scm_hash_ref (text_dimension_hash_tab,
-                   scm_makfrom0str (key_str.to_str0 ()),
+                   scm_makfrom0str (key_str.c_str ()),
                    SCM_BOOL_F);
     }
   if (scm_is_pair (val))
@@ -78,7 +78,7 @@ try_load_text_metrics (String basename)
       String contents (gulp_file_to_string (path, true, -1));
       contents = "(quote (" + contents + "))";
 
-      SCM lst = scm_c_eval_string (contents.to_str0 ());
+      SCM lst = scm_c_eval_string (contents.c_str ());
       ly_load_text_dimensions (lst);
     }
 }
index 1ab0fecf71bc09ff5b65e12438536c9f785b85b1..bd45cecc7e5037dfe971ed955354a74d9f3c5cc9 100644 (file)
@@ -104,7 +104,7 @@ Tex_font_metric_reader::read_header ()
     /* Not using ngettext's plural feature here, as this message is
        more of a programming error.  */
     error (_f ("TFM header of `%s' has only %u word (s)",
-              input_.name_string ().to_str0 (), header_length));
+              input_.name_string ().c_str (), header_length));
 
   info_.checksum = input_.get_U32 ();
   info_.design_size = get_U32_fix ();
@@ -137,7 +137,7 @@ Tex_font_metric_reader::read_params ()
   if (header_.param_word_count > TFM_MAX_FONTDIMENS)
     {
       warning (_f ("%s: TFM file has %u parameters, which is more than the %u I can handle",
-                  input_.name_string ().to_str0 (),
+                  input_.name_string ().c_str (),
                   header_.param_word_count,
                   TFM_MAX_FONTDIMENS));
       header_.param_word_count = TFM_MAX_FONTDIMENS;
index a0f26e6c859201fe8431434b7776808f24161b73..acc057e6713033917461e101545f745e824c3f13 100644 (file)
@@ -92,9 +92,9 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den)
                    chain);
 
   SCM sn = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                            scm_makfrom0str (to_string (num).to_str0 ()));
+                                            scm_makfrom0str (to_string (num).c_str ()));
   SCM sd = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
-                                            scm_makfrom0str (to_string (den).to_str0 ()));
+                                            scm_makfrom0str (to_string (den).c_str ()));
 
   Stencil n = *unsmob_stencil (sn);
   Stencil d = *unsmob_stencil (sd);
index ff5e3823f7c8062649c2cb818fe088af3249aba4..65bfa015fe5984b7057d56ab6b196c43425a55a2 100644 (file)
@@ -47,7 +47,7 @@ get_translator (SCM sym)
     global_translator_dict->try_retrieve (sym, &v);
 
   if (v == SCM_BOOL_F)
-    error (_f ("unknown translator: `%s'", ly_symbol2string (sym).to_str0 ()));
+    error (_f ("unknown translator: `%s'", ly_symbol2string (sym).c_str ()));
 
   return unsmob_translator (v);
 }
index 3ab8a1c34c3b555f3689f841e77d20f081a8f1e1..56d49add4697d52eac4a682d5e5d6ac7d57d6191 100644 (file)
@@ -169,7 +169,7 @@ add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
   interface_name = interface_name.substitute ('_', '-');
   interface_name += "-interface";
 
-  inf.symbol_ = scm_gc_protect_object (ly_symbol2scm (interface_name.to_str0 ()));
+  inf.symbol_ = scm_gc_protect_object (ly_symbol2scm (interface_name.c_str ()));
   ack_array->push (inf);
 }
 
index 677f4d0179eaa3e82163a576d924224ff3681644..9cbfd730fc36e9bec8f6bc2f9305c92e688bf74a 100644 (file)
@@ -88,7 +88,7 @@ print_header (void *out, FT_Face face)
 static void
 print_body (void *out, String name)
 {
-  FILE *fd = fopen (name.to_str0 (), "rb");
+  FILE *fd = fopen (name.c_str (), "rb");
 
   static char xdigits[] = "0123456789ABCDEF";
 
index ca8d042ce27947aff73a61fd58a32e0211b9bd15..31005fac31d6a123a5c94ec0215ac2b778213004 100644 (file)
@@ -345,7 +345,7 @@ check_for_prefix_loss (Item *primitive)
       String prefs = Gregorian_ligature::prefixes_to_str (primitive);
       primitive->warning (_f ("ignored prefix (es) `%s' of this head according "
                              "to restrictions of the selected ligature style",
-                             prefs.to_str0 ()));
+                             prefs.c_str ()));
     }
 }
 
@@ -553,7 +553,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 
       if (prev_primitive)
        prev_primitive->set_property ("glyph-name",
-                                     scm_makfrom0str (prev_glyph_name.to_str0 ()));
+                                     scm_makfrom0str (prev_glyph_name.c_str ()));
 
       /*
        * In the backend, flexa shapes and joins need to know about line
@@ -571,7 +571,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     }
 
   prev_primitive->set_property ("glyph-name",
-                               scm_makfrom0str (prev_glyph_name.to_str0 ()));
+                               scm_makfrom0str (prev_glyph_name.c_str ()));
 
   align_heads (primitives, flexa_width, thickness);
 
index 697c0fea9a0d234b36a4208c9554f015580f7afa..ad316bd5e268f9cb13f30785be2c5cd325cb5676 100644 (file)
@@ -100,7 +100,7 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
     {
       String id = i.context ()->id_string ();
 
-      scm_hash_set_x (id_to_group_hashtab_, scm_makfrom0str (id.to_str0 ()),
+      scm_hash_set_x (id_to_group_hashtab_, scm_makfrom0str (id.c_str ()),
                      i.grob ()->self_scm ());
 
       SCM before_id = i.context ()->get_property ("alignAboveContext");
index 863f902df91d5ba77023538e9ac1562184a109c2..9fa0f172f1800894e97d6026a06a74ef63d5d665 100644 (file)
@@ -42,7 +42,7 @@ Vertically_spaced_contexts_engraver::acknowledge_vertically_spaceable (Grob_info
       SCM spaceable = get_property ("verticallySpacedContexts");
       Context *orig = gi.origin_contexts (this)[0];
 
-      if (scm_memq (ly_symbol2scm (orig->context_name ().to_str0 ()),
+      if (scm_memq (ly_symbol2scm (orig->context_name ().c_str ()),
                    spaceable) != SCM_BOOL_F)
        {
          Pointer_group_interface::add_grob (system_,
index b652d81c583c55e5b7080bd4168ad8172da636e9..d7399493943d5be3f507515f3e07facaf9ad800e 100644 (file)
@@ -98,7 +98,7 @@ Volta_repeat_iterator::next_element (bool side_effect)
 
          if (done_count_ <= alt_count_)
            add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
-                                           scm_makfrom0str (repstr.to_str0 ()), SCM_UNDEFINED));
+                                           scm_makfrom0str (repstr.c_str ()), SCM_UNDEFINED));
        }
       else
        add_repeat_command (ly_symbol2scm ("end-repeat"));