commit 0d88db67a383426c7c330ae54bbf8437f4ccb9ef
parent b6d0ffceff0432ebc89cc8cf759a85725b91560c
Author: htrb <htrb>
Date: Mon, 19 Jul 2010 12:19:54 +0000
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366284#5
* rc.c
(init_rc): check config_file is NULL or not.
(panel_set_option): check config_file instead of no_rc_dir.
Diffstat:
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,6 +1,13 @@
2010-07-19 d+w3m@vdr.jp
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
+ * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366284#5
+ * rc.c (init_rc): check config_file is NULL or not.
+ (panel_set_option): check config_file instead of no_rc_dir.
+
+2010-07-19 d+w3m@vdr.jp
+
+ * [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261174#10
* terms.c (graph_ok): check UseGraphicChar is GRAPHIC_CHAR_ALL or not.
* symbol.c (get_symbol): check UseGraphicChar.
diff --git a/rc.c b/rc.c
@@ -1256,7 +1256,7 @@ init_rc(void)
interpret_rc(f);
fclose(f);
}
- if ((f = fopen(config_file, "rt")) != NULL) {
+ if (config_file && (f = fopen(config_file, "rt")) != NULL) {
interpret_rc(f);
fclose(f);
}
@@ -1268,6 +1268,8 @@ init_rc(void)
((tmp_dir = getenv("TMP")) == NULL || *tmp_dir == '\0') &&
((tmp_dir = getenv("TEMP")) == NULL || *tmp_dir == '\0'))
tmp_dir = "/tmp";
+ create_option_search_table();
+ goto open_rc;
}
@@ -1449,8 +1451,8 @@ panel_set_option(struct parsed_tagarg *arg)
FILE *f = NULL;
char *p;
- if (no_rc_dir) {
- disp_message("There's no ~/.w3m directory... config not saved", FALSE);
+ if (config_file == NULL) {
+ disp_message("There's no config file... config not saved", FALSE);
}
else {
f = fopen(config_file, "wt");