#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.
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 : ""));
}
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 */
#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
}
{
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_)
{
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':
.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_;