]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / main.cc
index 7fb2f324572db0b434fae0155103ab3d7fe611ee..d84f90ebd8ab55c85395adbdd6b750bb0d334f19 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@
 */
 
 #include "main.hh"
+#include "lily-guile.hh"
 
 #include <cassert>
 #include <clocale>
@@ -54,6 +55,7 @@ using namespace std;
 #include "string-convert.hh"
 #include "version.hh"
 #include "warn.hh"
+#include "lily-imports.hh"
 
 /*
  * Global options that can be overridden through command line.
@@ -157,6 +159,7 @@ static Long_option_init options_static[]
   {0, "pdf", 0, _i ("generate PDF (default)")},
   {0, "png", 0, _i ("generate PNG")},
   {0, "ps", 0, _i ("generate PostScript")},
+  {0, "bigpdfs", 'b', _i("generate big PDF files")},
   {0, "help", 'h', _i ("show this help and exit")},
   {
     _i ("FIELD"), "header", 'H', _i ("dump header field FIELD to file\n"
@@ -258,7 +261,7 @@ copyright ()
  */
 {
   /* Do not update the copyright years here, run `make grand-replace'  */
-  printf ("%s", (_f ("Copyright (c) %s by\n%s  and others.", "1996--2014",
+  printf ("%s", (_f ("Copyright (c) %s by\n%s  and others.", "1996--2015",
                      AUTHORS).c_str ()));
   printf ("\n");
 }
@@ -478,8 +481,8 @@ main_with_guile (void *, int, char **)
    //  " \"" + lilypond_datadir + "/scm/out\")";
    //scm_c_eval_string (scm_pct_set_fallback.c_str() );
    scm_primitive_eval
-     (scm_list_3 (scm_from_locale_symbol ("set!"),
-                  scm_from_locale_symbol ("%compile-fallback-path"),
+     (scm_list_3 (scm_from_latin1_symbol ("set!"),
+                  scm_from_latin1_symbol ("%compile-fallback-path"),
                   scm_from_locale_string (ly_scm_go_dir.c_str())));
 #endif
 
@@ -530,8 +533,8 @@ main_with_guile (void *, int, char **)
   // SCM result = scm_call_1 (
   //                      scm_variable_ref (call_with_error_handling),
   //                      scm_call_1 (ly_lily_module_constant ("lilypond-main"), files));
-  SCM result = scm_call_1 (ly_lily_module_constant ("lilypond-main"), files);
-  (void) result;
+
+  Lily::lilypond_main (files);
 
   /* Unreachable.  */
   exit (0);
@@ -553,6 +556,20 @@ setup_localisation ()
      Disable localisation of float values. */
   setlocale (LC_NUMERIC, "C");
 
+#if GUILEV2
+  // In order not to have this porting aid backfire to GUILE1 usage,
+  // this is only compiled in the GUILEV2 version.  It should
+  // eventually be replaced with proper multibyte communication with
+  // GUILE2, but in the mean time it seems that this is the least
+  // invasive path to get comparable results between the
+  // not-really-multibyte-supporting GUILE1 and GUILE2
+
+  /* Disable character sets */
+  setlocale (LC_CTYPE, "C");
+  /* But our text domain is in UTF-8 */
+  bind_textdomain_codeset ("lilypond", "UTF-8");
+#endif
+
   string localedir = LOCALEDIR;
   if (char const *env = getenv ("LILYPOND_LOCALEDIR"))
     localedir = env;
@@ -598,6 +615,10 @@ parse_argv (int argc, char **argv)
             relocate_binary = true;
           break;
 
+        case 'b':
+          bigpdfs = true;
+          break;
+
         case 'd':
           {
             string arg (option_parser->optional_argument_str0_);