]> git.pld-linux.org Git - packages/adonthell.git/commitdiff
- CONFIG_DIR support
authorjuandon <witekfl@pld-linux.org>
Sat, 22 Mar 2003 20:05:18 +0000 (20:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adonthell-home_etc.patch -> 1.1

adonthell-home_etc.patch [new file with mode: 0644]

diff --git a/adonthell-home_etc.patch b/adonthell-home_etc.patch
new file mode 100644 (file)
index 0000000..28439f6
--- /dev/null
@@ -0,0 +1,36 @@
+diff -Nru adonthell-0.3.3/src/game.cc adonthell-0.3.3.new/src/game.cc
+--- adonthell-0.3.3/src/game.cc        Mon Sep 30 15:05:41 2002
++++ adonthell-0.3.3.new/src/game.cc    Sat Mar 22 16:26:40 2003
+@@ -39,8 +39,14 @@
+ {
+     Global_data_dir = game_dir;
+ #ifndef WIN32
+-    User_data_dir = getenv ("HOME");
+-    User_data_dir += "/.adonthell";
++    char *config_dir = getenv("CONFIG_DIR");
++    if (config_dir) {
++        User_data_dir = config_dir;
++        User_data_dir += "/adonthell";
++    } else {
++        User_data_dir = getenv ("HOME");
++        User_data_dir += "/.adonthell";
++    }
+ #else
+     User_data_dir = Global_data_dir;
+ #endif
+diff -Nru adonthell-0.3.3/src/prefs.cc adonthell-0.3.3.new/src/prefs.cc
+--- adonthell-0.3.3/src/prefs.cc       Mon Sep 30 15:05:41 2002
++++ adonthell-0.3.3.new/src/prefs.cc   Sat Mar 22 16:28:26 2003
+@@ -62,7 +62,11 @@
+     // set the path to the adonthellrc file:
+ #ifndef WIN32
+-    adonthellrc = string (getenv ("HOME")) + "/.adonthell";
++    char *config_dir = getenv("CONFIG_DIR");
++    if (config_dir)
++        adonthellrc = string (config_dir) + "/adonthell";
++    else        
++        adonthellrc = string (getenv ("HOME")) + "/.adonthell";
+ #else
+     adonthellrc = string (".");
+ #endif
This page took 0.077376 seconds and 4 git commands to generate.