X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmain.cc;h=ae4c86dd2ae9b8f339eb4ce132f5192f0a52f0e3;hb=455116c39466c026839f1bf728c05ecaa6015a9c;hp=8fb2ab27e51ec68af69c4f8e12166931ab422705;hpb=51805662a1a967b79469efe05a5a73ffa55fc5e8;p=lilypond.git diff --git a/lily/main.cc b/lily/main.cc index 8fb2ab27e5..ae4c86dd2a 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -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 @@ -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"); } } @@ -303,8 +305,8 @@ do_chroot_jail () vector 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 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) {