/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2005--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2005--2014 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
#define FRAMEWORKDIR ".."
int
-sane_putenv (char const *key, string value, bool overwrite)
+sane_putenv (char const *key, const string &value, bool overwrite)
{
if (overwrite || !getenv (key))
{
}
static int
-set_env_file (char const *key, string value, bool overwrite = false)
+set_env_file (char const *key, const string &value, bool overwrite = false)
{
if (is_file (value))
return sane_putenv (key, value, overwrite);
}
static int
-set_env_dir (char const *key, string value)
+set_env_dir (char const *key, const string &value)
{
if (is_dir (value))
return sane_putenv (key, value, false);
#endif
static void
-prefix_relocation (string prefix)
+prefix_relocation (const string &prefix)
{
string bindir = prefix + "/bin";
string datadir = prefix + "/share";
*/
static void
-framework_relocation (string prefix)
+framework_relocation (const string &prefix)
{
debug_output (_f ("Relocation: framework_prefix=%s", prefix));
prefix_directory = bindir + "/" + FRAMEWORKDIR;
}
-
lilypond_datadir = prefix_directory
- + "/share/lilypond/" TOPLEVEL_VERSION;
+ + "/share/lilypond/" TOPLEVEL_VERSION;
}
if (getenv ("LILYPONDPREFIX"))
}
string
-expand_environment_variables (string orig)
+expand_environment_variables (const string &orig)
{
char const *start_ptr = orig.c_str ();
char const *ptr = orig.c_str ();
}
void
-read_relocation_file (string filename)
+read_relocation_file (const string &filename)
{
debug_output (_f ("Relocation file: %s", filename.c_str ()) + "\n");
char const *cname = filename.c_str ();
}
void
-read_relocation_dir (string dirname)
+read_relocation_dir (const string &dirname)
{
if (DIR *dir = opendir (dirname.c_str ()))
while (struct dirent *ent = readdir (dir))