]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/main.cc
* SConstruct: Further development.
[lilypond.git] / lily / main.cc
index 0c8ce247e360e05bd0288431e327424e3cd32b63..e171dfff822f7aebbe11e757745c4b44ca7fd60e 100644 (file)
 #include <locale.h>
 #include <string.h>
 
-#include "config.h"
+#include "config.hh"
 
 #if HAVE_GETTEXT
 #include <libintl.h>
 #endif
 
-#include "lily-guile.hh"
-#include "lily-version.hh"
 #include "all-font-metrics.hh"
+#include "file-name.hh"
+#include "file-path.hh"
 #include "getopt-long.hh"
+#include "global-ctor.hh"
+#include "kpath.hh"
+#include "lily-guile.hh"
+#include "lily-version.hh"
+#include "main.hh"
 #include "misc.hh"
+#include "output-def.hh"
 #include "string.hh"
-#include "main.hh"
-#include "file-path.hh"
 #include "warn.hh"
-#include "lily-guile.hh"
-#include "paper-def.hh"
-#include "midi-def.hh"
-#include "global-ctor.hh"
-#include "kpath.hh"
 
 /*
  * Global options that can be overridden through command line.
@@ -141,12 +140,12 @@ static void
 dir_info (FILE *out)
 {
   fputs ("\n", out);
-  fprintf (out, "lilypond_datadir: `%s'\n", LILYPOND_DATADIR);
-  fprintf (out, "local_lilypond_datadir: `%s'\n", LOCAL_LILYPOND_DATADIR);
-  fprintf (out, "localedir: `%s'\n", LOCALEDIR);
+  fprintf (out, "LILYPOND_DATADIR=\"%s\"\n", LILYPOND_DATADIR);
+  fprintf (out, "LOCAL_LILYPOND_DATADIR=\%s\"\n", LOCAL_LILYPOND_DATADIR);
+  fprintf (out, "LOCALEDIR=\"%s\"\n", LOCALEDIR);
 
   char *lilypond_prefix = getenv ("LILYPONDPREFIX");
-  fprintf (out, "LILYPONDPREFIX: `%s'\n",
+  fprintf (out, "LILYPONDPREFIX=\"%s\"\n",
           (lilypond_prefix ? lilypond_prefix : ""));
 }
 
@@ -212,7 +211,7 @@ setup_paths ()
   if (char const *lilypond_prefix = getenv ("LILYPONDPREFIX"))
     prefix_directory[1] = lilypond_prefix;
 
-  global_path.add ("");
+  global_path.append ("");
 
   /* Adding mf/out make lilypond unchanged source directory, when setting
      LILYPONDPREFIX to lilypond-x.y.z */
@@ -227,7 +226,7 @@ setup_paths ()
 #if !KPATHSEA
        /* Urg: GNU make's $ (word) index starts at 1 */
        int i  = 1;
-       while (global_path.try_add (p + to_string (".") + to_string (i)))
+       while (global_path.try_append (p + to_string (".") + to_string (i)))
          i++;
 #endif
       }
@@ -318,7 +317,7 @@ parse_argv (int argc, char **argv)
 {
   bool help_b = false;
   option_parser = new Getopt_long (argc, argv, options_static);
-  while (Long_option_init const * opt = (*option_parser) ())
+  while (Long_option_init const *opt = (*option_parser) ())
     {
       switch (opt->shortname_char_)
        {
@@ -329,10 +328,8 @@ parse_argv (int argc, char **argv)
        case 'o':
          {
            String s = option_parser->optional_argument_str0_;
-           Path p = split_path (s);
-           if (s != "-" && p.ext.is_empty ())
-             p.ext = output_format_global;
-           output_name_global = p.to_string ();
+           File_name file_name (s);
+           output_name_global = file_name.to_string ();
          }
          break;
        case 'e':
@@ -356,7 +353,7 @@ parse_argv (int argc, char **argv)
            .push (option_parser->optional_argument_str0_);
          break;
        case 'I':
-         global_path.push (option_parser->optional_argument_str0_);
+         global_path.append (option_parser->optional_argument_str0_);
          break;
        case 'i':
          init_name_global = option_parser->optional_argument_str0_;