1 diff -Nru althea-0.5.7/load_config.cpp althea-0.5.7.new/load_config.cpp
2 --- althea-0.5.7/load_config.cpp Tue Jan 22 17:30:15 2002
3 +++ althea-0.5.7.new/load_config.cpp Sat Mar 22 20:30:52 2003
6 bool savepassword=1, usessl=0, usesmtps=0;
8 - // Get the environment variable HOME, this is POSIX and Windows Compliant
9 - home_directory=(char *)malloc(255);
10 - strcpy(home_directory,getenv ("HOME"));
11 - strcat(home_directory, "/");
12 - strcat(home_directory, LOCAL_CONFIG_FILE);
13 + char *etc_dir = getenv("ETC_DIR");
16 + home_directory=(char *)malloc(255);
17 + strcpy(home_directory,etc_dir);
18 + strcat(home_directory, "/");
19 + strcat(home_directory, ETC_DIR_CONFIG_FILE);
21 - local_config_in.open(home_directory);
22 - free(home_directory);
23 + local_config_in.open(home_directory);
24 + free(home_directory);
28 + // Get the environment variable HOME, this is POSIX and Windows Compliant
29 + home_directory=(char *)malloc(255);
30 + strcpy(home_directory,getenv ("HOME"));
31 + strcat(home_directory, "/");
32 + strcat(home_directory, LOCAL_CONFIG_FILE);
34 + local_config_in.open(home_directory);
35 + free(home_directory);
37 rc_config_in.open(RC_CONFIG_FILE);
40 diff -Nru althea-0.5.7/load_config.h althea-0.5.7.new/load_config.h
41 --- althea-0.5.7/load_config.h Tue Jan 22 17:30:15 2002
42 +++ althea-0.5.7.new/load_config.h Sat Mar 22 20:28:33 2003
44 #include "promptwindow.h"
46 #define LOCAL_CONFIG_FILE ".althearc"
47 +#define ETC_DIR_CONFIG_FILE "althearc"
48 #define RC_CONFIG_FILE "/etc/althearc"
50 extern Althea gAlthea;
51 diff -Nru althea-0.5.7/save_config.cpp althea-0.5.7.new/save_config.cpp
52 --- althea-0.5.7/save_config.cpp Tue Jan 22 17:30:15 2002
53 +++ althea-0.5.7.new/save_config.cpp Sat Mar 22 20:33:17 2003
56 Configuration *config;
58 - // Get the environment variable HOME, this is POSIX and Windows Compliant
59 - file_name=(char *)malloc (255);
60 - strcpy(file_name, getenv ("HOME"));
61 - strcat(file_name, "/");
62 - strcat(file_name,LOCAL_CONFIG_FILE);
63 - config_file.open(file_name);
64 + char *etc_dir = getenv("ETC_DIR");
67 + file_name=(char *)malloc (255);
68 + strcpy(file_name, etc_dir);
69 + strcat(file_name, "/");
70 + strcat(file_name,ETC_DIR_CONFIG_FILE);
71 + config_file.open(file_name);
75 + // Get the environment variable HOME, this is POSIX and Windows Compliant
76 + file_name=(char *)malloc (255);
77 + strcpy(file_name, getenv ("HOME"));
78 + strcat(file_name, "/");
79 + strcat(file_name,LOCAL_CONFIG_FILE);
80 + config_file.open(file_name);
82 if (gAlthea.get_Verbose())
83 cout << "Saveing to " << file_name << endl;
85 diff -Nru althea-0.5.7/save_config.h althea-0.5.7.new/save_config.h
86 --- althea-0.5.7/save_config.h Tue Jan 22 17:30:15 2002
87 +++ althea-0.5.7.new/save_config.h Sat Mar 22 20:31:26 2003
91 #define LOCAL_CONFIG_FILE ".althearc"
92 +#define ETC_DIR_CONFIG_FILE "althearc"
93 #define RC_CONFIG_FILE "/etc/althearc"
95 // The master function that saves the config in memory to disk