]> git.donarmstrong.com Git - lilypond.git/commitdiff
* flower/international.cc:
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 23 Jan 2006 21:28:10 +0000 (21:28 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 23 Jan 2006 21:28:10 +0000 (21:28 +0000)
* flower/include/international.hh:

ChangeLog
flower/include/international.hh
flower/international.cc
lily/general-scheme.cc
lily/includable-lexer.cc
lily/lexer.ll
lily/main.cc

index b27db6b3b7b474797441c13dfe5199df837b90eb..1db760ac2046e8e8c1bb0b3296ed6af5843cda99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,14 @@
 2006-01-23  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * flower/include/std-string.hh: Oops, bugfix for --disable-std-string.
+       * flower/international.cc: 
+       * flower/include/international.hh: 
 
+       * flower/getopt-long.cc: 
        * flower/include/getopt-long.hh: Use std::string [interface].
        Update callers.
 
+       * flower/include/std-string.hh: Oops, bugfix for --disable-std-string.
+
        * stepmake/stepmake/executable-rules.make: Add dependency on
        module libraries.
 
index 4b37b7ecbbdce02718dddb14a7671c2669435496..bba4a5a3305c0303f54810b14594e0b6dd544c4c 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef INTERNATIONAL_HH
 #define INTERNATIONAL_HH
 
-#include "string.hh"
+#include "std-string.hh"
 
 /**
    Internationalisation: _i ("to be translated") gets an entry in the POT file
 /**
    Internationalisation: _ ("to be translated") gets "translated" by GNU gettext
 */
-String _ (char const *ch);
+Std_string _ (char const *ch);
 
 /**
    Internationalisation: _f ("Usage: %s [FILE]", "lilypond") gets "translated" by
    GNU gettext
 */
-String _f (char const *format, ...);
-String _f (char const *format, String s, String s2 = "", String s3 = "");
+Std_string _f (char const *format, ...);
+Std_string _f (char const *format, Std_string s, Std_string s2 = "", Std_string s3 = "");
 
 #endif // INTERNATIONAL_HH
 
index 1bdc1a3b900ac85263bb3f2f455bd2040fa6cf96..9d9e824eeab7b158a43fe601e4fe818e6bf7c5bf 100644 (file)
@@ -19,25 +19,25 @@ gettext (char const *s)
 #include <libintl.h>
 #endif
 
-String
+Std_string
 _ (char const *ch)
 {
-  return String (gettext (ch));
+  return Std_string (gettext (ch));
 }
 
-String
+Std_string
 _f (char const *format, ...)
 {
   va_list args;
   va_start (args, format);
-  String str = String_convert::vform_string (gettext (format), args);
+  Std_string str = String_convert::vform_string (gettext (format), args);
   va_end (args);
   return str;
 }
 
-String
-_f (char const *format, String s, String s2, String s3)
+Std_string
+_f (char const *format, Std_string s, Std_string s2, Std_string s3)
 {
-  return String_convert::form_string (gettext (format), s.to_str0 (), s2.to_str0 (),
-                                     s3.to_str0 ());
+  return String_convert::form_string (gettext (format), s.c_str (), s2.c_str (),
+                                     s3.c_str ());
 }
index b77914dd3e9ef6c440e092a5465ce337dd5efaef..fca5c81732cfc462e6c7086081e4bfa4757cd327 100644 (file)
@@ -209,7 +209,7 @@ LY_DEFINE (ly_gettext, "ly:gettext",
 {
   SCM_ASSERT_TYPE (scm_is_string (string), string, SCM_ARG1,
                   __FUNCTION__, "string");
-  return scm_makfrom0str (_ (scm_i_string_chars (string)).to_str0 ());
+  return scm_makfrom0str (_ (scm_i_string_chars (string)).c_str ());
 }
 
 LY_DEFINE (ly_output_backend, "ly:output-backend",
index a8edb0f16d63f8df67b5911b0c7b502ce49c1625..1ec8bcbbad103f557dc0b2bf4505a3fc9b00eaf5 100644 (file)
@@ -48,7 +48,7 @@ Includable_lexer::new_input (String name, Sources *sources)
 {
   if (!allow_includes_b_)
     {
-      LexerError (_ ("include files are not allowed in safe mode").to_str0 ());
+      LexerError (_ ("include files are not allowed in safe mode").c_str ());
       return;
     }
 
index 7189daf62369c5dad9159f4fae0db0a976f5386b..2aa5551d7d67bcb84f784580500afbdc2cd9d0b8 100644 (file)
@@ -153,7 +153,7 @@ BOM_UTF8    \357\273\277
 <INITIAL,chords,lyrics,figures,notes>{BOM_UTF8} {
   if (this->lexloc->line_number () != 1 || this->lexloc->column_number () != 0)
     {
-      LexerError (_ ("stray UTF-8 BOM encountered").to_str0 ());
+      LexerError (_ ("stray UTF-8 BOM encountered").c_str ());
       exit (1);
     }
   if (be_verbose_global)
@@ -209,11 +209,11 @@ BOM_UTF8  \357\273\277
 
 }
 <version>.     {
-       LexerError (_ ("quoted string expected after \\version").to_str0 ());
+       LexerError (_ ("quoted string expected after \\version").c_str ());
        yy_pop_state ();
 }
 <sourcefilename>>.     {
-       LexerError (_ ("quoted string expected after \\sourcefilename").to_str0 ());
+       LexerError (_ ("quoted string expected after \\sourcefilename").c_str ());
        yy_pop_state ();
 }
 <longcomment>{
@@ -226,7 +226,7 @@ BOM_UTF8    \357\273\277
                yy_pop_state ();
        }
        <<EOF>>         {
-               LexerError (_ ("EOF found inside a comment").to_str0 ());
+               LexerError (_ ("EOF found inside a comment").c_str ());
                is_main_input_ = false;
                if (! close_input ()) 
                  yyterminate (); // can't move this, since it actually rets a YY_NULL
index 715a83186c6bda56e0701ac2be3fe3a9a7ee7fbe..e2a0ea20e9a0cc7f18d2323f5d5b8053d5c99855 100644 (file)
@@ -219,14 +219,14 @@ copyright ()
 {
   printf (_f ("Copyright (c) %s by\n%s  and others.",
              "1996--2006",
-             AUTHORS).to_str0 ());
+             AUTHORS).c_str ());
   printf ("\n");
 }
 
 static void
 identify (FILE *out)
 {
-  fputs (gnu_lilypond_version_string ().to_str0 (), out);
+  fputs (gnu_lilypond_version_string ().c_str (), out);
   fputs ("\n", out);
 }
 
@@ -234,7 +234,7 @@ static void
 notice ()
 {
   identify (stdout);
-  puts (_f (NOTICE, PROGRAM_NAME).to_str0 ());
+  puts (_f (NOTICE, PROGRAM_NAME).c_str ());
   printf ("\n");
   copyright ();
 }
@@ -244,21 +244,21 @@ LY_DEFINE (ly_usage, "ly:usage",
           "Print usage message.")
 {
   /* No version number or newline here.  It confuses help2man.  */
-  printf (_f ("Usage: %s [OPTION]... FILE...", PROGRAM_NAME).to_str0 ());
+  printf (_f ("Usage: %s [OPTION]... FILE...", PROGRAM_NAME).c_str ());
   printf ("\n\n");
-  printf (_ ("Typeset music and/or produce MIDI from FILE.").to_str0 ());
+  printf (_ ("Typeset music and/or produce MIDI from FILE.").c_str ());
   printf ("\n\n");
-  printf (_ ("LilyPond produces beautiful music notation.").to_str0 ());
+  printf (_ ("LilyPond produces beautiful music notation.").c_str ());
   printf ("\n");
-  printf (_f ("For more information, see %s", PROGRAM_URL).to_str0 ());
+  printf (_f ("For more information, see %s", PROGRAM_URL).c_str ());
   printf ("\n\n");
-  printf (_ ("Options:").to_str0 ());
+  printf (_ ("Options:").c_str ());
   printf ("\n");
   printf (Long_option_init::table_string (options_static).c_str ());
   printf ("\n");
   printf (_f ("Report bugs via %s",
              "http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs"
-             ).to_str0 ());
+             ).c_str ());
   printf ("\n");
   printf ("\n");
   return SCM_UNSPECIFIED;
@@ -271,14 +271,14 @@ warranty ()
   printf ("\n");
   copyright ();
   printf ("\n");
-  printf (_ (WARRANTY).to_str0 ());
+  printf (_ (WARRANTY).c_str ());
 }
 
 static void
 prepend_load_path (String dir)
 {
   String s = "(set! %load-path (cons \"" + dir + "\" %load-path))";
-  scm_c_eval_string (s.to_str0 ());
+  scm_c_eval_string (s.c_str ());
 }
 
 void init_global_tweak_registry ();
@@ -311,7 +311,7 @@ do_chroot_jail ()
   errno = 0;
 
   int uid;
-  if (passwd * passwd = getpwnam (components[USER_NAME].to_str0 ()))
+  if (passwd * passwd = getpwnam (components[USER_NAME].c_str ()))
     uid = passwd->pw_uid;
   else
     {
@@ -328,7 +328,7 @@ do_chroot_jail ()
   errno = 0;
 
   int gid;
-  if (group * group = getgrnam (components[GROUP_NAME].to_str0 ()))
+  if (group * group = getgrnam (components[GROUP_NAME].c_str ()))
     gid = group->gr_gid;
   else
     {
@@ -341,7 +341,7 @@ do_chroot_jail ()
       exit (3);
     }
 
-  if (chroot (components[JAIL].to_str0 ()))
+  if (chroot (components[JAIL].c_str ()))
     {
       error (_f ("can't chroot to: %s: %s", components[JAIL],
                 strerror (errno)));
@@ -360,7 +360,7 @@ do_chroot_jail ()
       exit (3);
     }
 
-  if (chdir (components[DIR].to_str0 ()))
+  if (chdir (components[DIR].c_str ()))
     {
       error (_f ("can't change working directory to: %s: %s", components[DIR],
                 strerror (errno)));
@@ -406,7 +406,7 @@ main_with_guile (void *, int, char **)
        + init_scheme_code_string
        + ")";
 
-      char const *str0 = init_scheme_code_string.to_str0 ();
+      char const *str0 = init_scheme_code_string.c_str ();
 
       if (be_verbose_global)
        progress_indication (_f ("Evaluating %s", str0));
@@ -454,7 +454,7 @@ setup_localisation ()
   if (char const *env = getenv ("LILYPOND_LOCALEDIR"))
     localedir = env;
 
-  bindtextdomain ("lilypond", localedir.to_str0 ());
+  bindtextdomain ("lilypond", localedir.c_str ());
   textdomain ("lilypond");
 #endif
 }