mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
Remove functions from ardour/ardour.h that are now unused
git-svn-id: svn://localhost/ardour2/trunk@2068 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bf84f3e11e
commit
d7afe01c30
2 changed files with 0 additions and 110 deletions
|
|
@ -51,11 +51,6 @@ namespace ARDOUR {
|
||||||
|
|
||||||
std::string get_ardour_revision ();
|
std::string get_ardour_revision ();
|
||||||
|
|
||||||
std::string get_user_ardour_path ();
|
|
||||||
std::string get_system_data_path ();
|
|
||||||
|
|
||||||
std::string find_data_file (std::string name, std::string subdir = "" );
|
|
||||||
|
|
||||||
const layer_t max_layer = UCHAR_MAX;
|
const layer_t max_layer = UCHAR_MAX;
|
||||||
|
|
||||||
microseconds_t get_microseconds ();
|
microseconds_t get_microseconds ();
|
||||||
|
|
|
||||||
|
|
@ -366,111 +366,6 @@ ARDOUR::get_ardour_revision ()
|
||||||
return "$Rev$";
|
return "$Rev$";
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
|
||||||
ARDOUR::get_user_ardour_path ()
|
|
||||||
{
|
|
||||||
string path;
|
|
||||||
char* envvar;
|
|
||||||
|
|
||||||
if ((envvar = getenv ("HOME")) == 0 || strlen (envvar) == 0) {
|
|
||||||
return "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
path = envvar;
|
|
||||||
path += "/.ardour2/";
|
|
||||||
|
|
||||||
/* create it if necessary */
|
|
||||||
|
|
||||||
if (g_mkdir_with_parents (path.c_str (), 0755)) {
|
|
||||||
throw exception ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
|
||||||
ARDOUR::get_system_data_path ()
|
|
||||||
{
|
|
||||||
string path;
|
|
||||||
|
|
||||||
char *envvar;
|
|
||||||
|
|
||||||
if ((envvar = getenv ("ARDOUR_DATA_PATH")) != 0) {
|
|
||||||
path = envvar;
|
|
||||||
} else {
|
|
||||||
path += DATA_DIR;
|
|
||||||
path += "/ardour2/";
|
|
||||||
}
|
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
static string
|
|
||||||
find_file (string name, string dir, string subdir = "")
|
|
||||||
{
|
|
||||||
string path;
|
|
||||||
char* envvar = getenv("ARDOUR_PATH");
|
|
||||||
|
|
||||||
/* 1st attempt: any directory in ARDOUR_PATH */
|
|
||||||
|
|
||||||
if (envvar != 0) {
|
|
||||||
|
|
||||||
vector<string> split_path;
|
|
||||||
|
|
||||||
split (envvar, split_path, ':');
|
|
||||||
|
|
||||||
for (vector<string>::iterator i = split_path.begin(); i != split_path.end(); ++i) {
|
|
||||||
path = *i;
|
|
||||||
path += "/" + name;
|
|
||||||
if (access (path.c_str(), R_OK) == 0) {
|
|
||||||
// cerr << "Using file " << path << " found in ARDOUR_PATH." << endl;
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 2nd attempt: ~/.ardour/ */
|
|
||||||
|
|
||||||
path = get_user_ardour_path();
|
|
||||||
|
|
||||||
if (subdir.length()) {
|
|
||||||
path += subdir + "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
path += name;
|
|
||||||
if (access (path.c_str(), R_OK) == 0) {
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 3rd attempt: dir/... */
|
|
||||||
|
|
||||||
path = dir;
|
|
||||||
path += "/ardour2/";
|
|
||||||
|
|
||||||
if (subdir.length()) {
|
|
||||||
path += subdir + "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
path += name;
|
|
||||||
|
|
||||||
if (access (path.c_str(), R_OK) == 0) {
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
|
||||||
ARDOUR::find_data_file (string name, string subdir)
|
|
||||||
{
|
|
||||||
char* envvar;
|
|
||||||
if ((envvar = getenv("ARDOUR_DATA_PATH")) == 0) {
|
|
||||||
envvar = DATA_DIR;
|
|
||||||
}
|
|
||||||
|
|
||||||
return find_file (name, envvar, subdir);
|
|
||||||
}
|
|
||||||
|
|
||||||
ARDOUR::LocaleGuard::LocaleGuard (const char* str)
|
ARDOUR::LocaleGuard::LocaleGuard (const char* str)
|
||||||
{
|
{
|
||||||
old = strdup (setlocale (LC_NUMERIC, NULL));
|
old = strdup (setlocale (LC_NUMERIC, NULL));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue