summaryrefslogtreecommitdiff
path: root/src/fe-text/irssi.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-07-15 00:39:48 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-07-15 00:39:48 +0000
commit79d1d7089a699cf8a09bd5227f9033282001b0b3 (patch)
tree11a2e10bce84587e2b5a13029c43354a185e846c /src/fe-text/irssi.c
parentbcbb55dd1e0ecf828942dcc91d5661e9a44ab841 (diff)
downloadirssi-79d1d7089a699cf8a09bd5227f9033282001b0b3.zip
Added --home and --config command line parameters to irssi to specify
locations for ~/.irssi and ~/.irssi/config git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1626 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/irssi.c')
-rw-r--r--src/fe-text/irssi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c
index ec55f10f..a2dc04a0 100644
--- a/src/fe-text/irssi.c
+++ b/src/fe-text/irssi.c
@@ -38,6 +38,7 @@
#include "gui-readline.h"
#include "statusbar.h"
#include "gui-windows.h"
+#include "textbuffer-reformat.h"
#include <signal.h>
@@ -117,6 +118,7 @@ static void textui_finish_init(void)
textbuffer_init();
textbuffer_view_init();
textbuffer_commands_init();
+ textbuffer_reformat_init();
gui_entry_init();
gui_expandos_init();
gui_printtext_init();
@@ -166,6 +168,7 @@ static void textui_deinit(void)
mainwindows_deinit();
gui_expandos_deinit();
gui_entry_deinit();
+ textbuffer_reformat_deinit();
textbuffer_commands_deinit();
textbuffer_view_deinit();
textbuffer_deinit();
@@ -192,7 +195,7 @@ static void check_oldcrap(void)
int found;
/* check that default.theme is up-to-date */
- path = g_strdup_printf("%s/.irssi/default.theme", g_get_home_dir());
+ path = g_strdup_printf("%s/default.theme", get_irssi_dir());
f = fopen(path, "r+");
if (f == NULL) {
g_free(path);
@@ -208,7 +211,7 @@ static void check_oldcrap(void)
return;
}
- printf("\nYou seem to have old default.theme in ~/.irssi/ directory.\n");
+ printf("\nYou seem to have old default.theme in "IRSSI_DIR_SHORT"/ directory.\n");
printf("Themeing system has changed a bit since last irssi release,\n");
printf("you should either delete your old default.theme or manually\n");
printf("merge it with the new default.theme.\n\n");
@@ -224,16 +227,13 @@ static void check_oldcrap(void)
static void check_files(void)
{
struct stat statbuf;
- char *path;
- path = g_strdup_printf("%s/.irssi", g_get_home_dir());
- if (stat(path, &statbuf) != 0) {
+ if (stat(get_irssi_dir(), &statbuf) != 0) {
/* ~/.irssi doesn't exist, first time running irssi */
display_firsttimer = TRUE;
} else {
check_oldcrap();
}
- g_free(path);
}
#ifdef WIN32
@@ -253,6 +253,8 @@ static void winsock_init(void)
int main(int argc, char **argv)
{
+ core_init_paths(argc, argv);
+
check_files();
#ifdef WIN32
winsock_init();