aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-12 12:24:44 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-12 12:24:44 +0000
commit714821b9d137479b8ddfe0f3611f68dfec91bf0f (patch)
tree1f925355e6a30dc27b034f2488de872fa00d661e
parent[w3m-dev 03413] Re: setting form on loading (diff)
downloadw3m-714821b9d137479b8ddfe0f3611f68dfec91bf0f.tar.gz
w3m-714821b9d137479b8ddfe0f3611f68dfec91bf0f.zip
[w3m-dev 03414] Re: show parameter
* main.c (fusage): add -show-option (MAIN): check -show-option From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog8
-rw-r--r--main.c13
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a8cc6e0..7b7fbb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2002-11-12 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03414] Re: show parameter
+ * main.c (fusage): add -show-option
+ (MAIN): check -show-option
+
+2002-11-12 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03413] Re: setting form on loading
* form.c (loadPreForm): add textarea
(preFormUpdateBuffer): submit if value is matched as well
@@ -4555,4 +4561,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.500 2002/11/12 12:22:59 ukai Exp $
+$Id: ChangeLog,v 1.501 2002/11/12 12:24:44 ukai Exp $
diff --git a/main.c b/main.c
index e63ccba..138d4aa 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.127 2002/11/11 15:33:36 ukai Exp $ */
+/* $Id: main.c,v 1.128 2002/11/12 12:24:44 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -239,6 +239,7 @@ fusage(FILE * f, int err)
fprintf(f,
" -title[=TERM] set buffer name to terminal title string\n");
fprintf(f, " -o opt=value assign value to config option\n");
+ fprintf(f, " -show-option print all config options\n");
fprintf(f, " -config file specify config file\n");
fprintf(f, " -help print this usage message\n");
fprintf(f, " -version print w3m version\n");
@@ -654,10 +655,12 @@ MAIN(int argc, char **argv, char **envp)
displayTitleTerm = getenv("TERM");
else if (!strncmp("-title=", argv[i], 7))
displayTitleTerm = argv[i] + 7;
- else if (!strcmp("-o", argv[i])) {
- if (++i >= argc || !strcmp(argv[i], "?")) {
- show_params_p = 1;
- usage();
+ else if (!strcmp("-o", argv[i]) ||
+ !strcmp("-show-option", argv[i])) {
+ if (!strcmp("-show-option", argv[i]) || ++i >= argc ||
+ !strcmp(argv[i], "?")) {
+ show_params(stdout);
+ exit(0);
}
if (!set_param_option(argv[i])) {
/* option set failed */