- tabs in preamble
[packages/irssi.git] / irssi-home_etc.patch
CommitLineData
5a521683 1diff -Nru irssi-0.8.6.orig/src/core/core.c irssi-0.8.6/src/core/core.c
2--- irssi-0.8.6.orig/src/core/core.c 2002-10-19 20:00:06.000000000 +0200
3+++ irssi-0.8.6/src/core/core.c 2003-11-09 12:46:25.000000000 +0100
4@@ -193,7 +193,9 @@
5 args_register(options);
6
7 if (irssi_dir == NULL) {
8- home = g_get_home_dir();
9+ home = getenv("HOME_ETC");
10+ if (home == NULL)
11+ home = g_get_home_dir();
12 if (home == NULL)
13 home = ".";
14
60ee30af 15diff -Nru irssi-0.8.9/src/core/log-away.c.orig irssi-0.8.9/src/core/log-away.c
16--- irssi-0.8.9/src/core/log-away.c.orig 2002-12-28 19:00:03.000000000 +0100
17+++ irssi-0.8.9/src/core/log-away.c 2003-12-19 19:34:08.000000000 +0100
18@@ -102,7 +102,15 @@
5a521683 19 away_filepos = 0;
20 away_msgs = 0;
60ee30af 21
5a521683 22- settings_add_str("log", "awaylog_file", IRSSI_DIR_SHORT"/away.log");
23+ char *home_etc = getenv("HOME_ETC");
24+
25+ if (home_etc) {
60ee30af 26+ char *log = g_strdup_printf("%s/.irssi/away.log", home_etc);
5a521683 27+
28+ settings_add_str("log", "awaylog_file", log);
29+ } else
30+ settings_add_str("log", "awaylog_file", IRSSI_DIR_SHORT"/away.log");
60ee30af 31+
32 settings_add_level("log", "awaylog_level", "msgs hilight");
5a521683 33
34 signal_add("log written", (SIGNAL_FUNC) sig_log_written);
35diff -Nru irssi-0.8.6.orig/src/lib-popt/poptconfig.c irssi-0.8.6/src/lib-popt/poptconfig.c
36--- irssi-0.8.6.orig/src/lib-popt/poptconfig.c 2002-01-27 21:45:58.000000000 +0100
37+++ irssi-0.8.6/src/lib-popt/poptconfig.c 2003-11-09 12:36:55.000000000 +0100
38@@ -130,7 +130,9 @@
39 if (getuid() != geteuid()) return 0;
40 #endif
41
42- if ((home = getenv("HOME"))) {
43+ home = getenv("HOME_ETC");
44+ if (!home) home = getenv("HOME");
45+ if (home) {
46 fn = malloc(strlen(home) + 20);
47 strcpy(fn, home);
48 strcat(fn, "/.popt");
This page took 0.133288 seconds and 4 git commands to generate.