]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
(LY_DEFINE): move
[lilypond.git] / lily / main.cc
index 7e9927e34d2c64ea4c3ee63753f7666b4d47c239..4e72121d122c8546a0c94f93ab6094bd31ece499 100644 (file)
@@ -57,6 +57,7 @@ string init_name_global;
 /* Selected output backend
    One of (gnome, ps [default], eps, scm, svg, tex, texstr)") */
 string output_backend_global = "ps";
+
 /* Output formats to generate.  */
 string output_format_global = "";
 
@@ -88,7 +89,7 @@ bool make_print = true;
 
 
 bool relocate_binary =
-#if ARGV0_RELOCATION
+#if 1
   true;
 #else
   false
@@ -128,7 +129,7 @@ static char const *WARRANTY
       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
       "General Public License for more details.\n"
       "\n"
-      "    You should have received a copy (refer to the file COPYING) of the\n"
+      "    You should have received a copy of the\n"
       "GNU General Public License along with this program; if not, write to\n"
       "the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
       "Boston, MA 02111-1307, USA.\n");
@@ -184,7 +185,7 @@ static Long_option_init options_static[]
   {0, 0, 0, 0}
 };
 
-const char *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
+char const *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
 
 static void
 env_var_info (FILE *out, char const *key)
@@ -211,6 +212,7 @@ dir_info (FILE *out)
       env_var_info (out, "GS_LIB");
       env_var_info (out, "GUILE_LOAD_PATH");
       env_var_info (out, "PANGO_RC_FILE");
+      env_var_info (out, "PANGO_PREFIX");
       env_var_info (out, "PATH");
     }
 }
@@ -300,11 +302,11 @@ do_chroot_jail ()
       USER_NAME, GROUP_NAME, JAIL, DIR, JAIL_MAX
     };
 
-  vector<string> components = String_convert::split (jail_spec, ',');
+  vector<string> components = string_split (jail_spec, ',');
   if (components.size () != JAIL_MAX)
     {
-      error (_f ("expected %d arguments with jail, found: %d", JAIL_MAX,
-                components.size ()));
+      error (_f ("expected %d arguments with jail, found: %u", JAIL_MAX,
+                (unsigned) components.size ()));
       exit (2);
     }
 
@@ -402,7 +404,7 @@ main_with_guile (void *, int, char **)
        + init_scheme_variables + "))";
 
       init_scheme_code_string
-       += "(begin #t "
+       = "(begin #t "
        + init_scheme_variables
        + init_scheme_code_string
        + ")";
@@ -425,6 +427,7 @@ main_with_guile (void *, int, char **)
       *tail = scm_cons (scm_makfrom0str (arg), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
+  
   delete option_parser;
   option_parser = 0;
 
@@ -538,7 +541,12 @@ parse_argv (int argc, char **argv)
          break;
 
        case 'f':
-         output_format_global = option_parser->optional_argument_str0_;
+         {
+           vector<string> components
+             = string_split (option_parser->optional_argument_str0_, ',');
+           for (vsize i = 0; i < components.size (); i++)
+             add_output_format (components[i]);
+         }
          break;
 
        case 'H':
@@ -590,7 +598,7 @@ parse_argv (int argc, char **argv)
 void
 setup_guile_env ()
 {
-  char *yield = getenv ("LILYPOND_GC_YIELD");
+  const char *yield = getenv ("LILYPOND_GC_YIELD");
   bool overwrite = true;
   if (!yield)
     {
@@ -603,6 +611,9 @@ setup_guile_env ()
   sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
 }
 
+void
+read_relocation_dir (string);
+
 int
 main (int argc, char **argv)
 {