diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-19 18:16:18 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-19 18:16:18 +0000 |
commit | e92622a345797c804be21c411555c5f16910771f (patch) | |
tree | 855d377f6fde606f2fe276c673650cb5005074c3 | |
parent | [w3m-dev 02672] (diff) | |
download | w3m-e92622a345797c804be21c411555c5f16910771f.tar.gz w3m-e92622a345797c804be21c411555c5f16910771f.zip |
[w3m-dev 02655] print version and compile options
Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 11 | ||||
-rwxr-xr-x | configure | 27 | ||||
-rw-r--r-- | main.c | 73 |
3 files changed, 94 insertions, 17 deletions
@@ -1,3 +1,12 @@ +2001-12-20 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 02655] print version and compile options + * configure: change order of questions + * main.c (fversion): added + * main.c (fusage): use fversion() + * main.c (fusage): add -help, -version + * main.c (MAIN): add -help, -version + 2001-12-20 Tsutomu Okada <okada@furuno.co.jp> * [w3m-dev 02672] @@ -1303,4 +1312,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.138 2001/12/19 16:24:21 ukai Exp $ +$Id: ChangeLog,v 1.139 2001/12/19 18:16:18 ukai Exp $ @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.36 2001/12/17 16:18:18 ukai Exp $ +# $Id: configure,v 1.37 2001/12/19 18:16:18 ukai Exp $ # Configuration. # @@ -555,22 +555,19 @@ else def_param system_code x fi -# editing? -ask_param "Use Lynx-like key binding as default" use_lynx_key n -if [ "$use_lynx_key" = y ]; then - keymap_file="keybind_lynx" -else - keymap_file="keybind" -fi - -# terminal capabilities if [ "$lang" = "JA" ]; then ask_param "Use 2-byte character for table border, item, etc." kanji_symbols y else kanji_symbols=n def_param kanji_symbols n fi -ask_param "ANSI color escape sequences support" use_ansi_color n + +ask_param "Use Lynx-like key binding as default" use_lynx_key n +if [ "$use_lynx_key" = y ]; then + keymap_file="keybind_lynx" +else + keymap_file="keybind" +fi if [ "$lang" = "JA" ]; then if [ "$use_lynx_key" = y ]; then @@ -694,9 +691,17 @@ fi if [ "$use_ssl" = y ]; then ask_param "SSL verification support (SSL library >= version 0.8)" use_ssl_verify n else + use_ssl_verify=n def_param "use_ssl_verify" n fi +if [ "$use_color" = y ]; then + ask_param "ANSI color escape sequences support" use_ansi_color n +else + use_ansi_color=n + def_param "use_ansi_color" n +fi + # protocols? ask_param "NNTP support" use_nntp $include_opt ask_param "Gopher support" use_gopher $include_opt @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.39 2001/12/19 16:24:21 ukai Exp $ */ +/* $Id: main.c,v 1.40 2001/12/19 18:16:18 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -85,9 +85,66 @@ static int searchKeyNum(void); #define usage() fusage(stderr, 1) static void +fversion(FILE * f) +{ + fprintf(f, "w3m version %s, options %s\n", w3m_version, +#if LANG == JA + "lang=ja" +#ifdef KANJI_SYMBOLS + ",kanji-symbols" +#endif +#else + "lang=en" +#endif +#ifdef USE_COLOR + ",color" +#ifdef USE_ANSI_COLOR + ",ansi-color" +#endif +#endif +#ifdef USE_MOUSE + ",mouse" +#ifdef USE_GPM + ",gpm" +#endif +#ifdef USE_SYSMOUSE + ",sysmouse" +#endif +#endif +#ifdef USE_MENU + ",menu" +#endif +#ifdef USE_COOKIE + ",cookie" +#endif +#ifdef USE_SSL + ",ssl" +#ifdef USE_SSL_VERIFY + ",ssl-verify" +#endif +#endif +#ifdef USE_NNTP + ",nntp" +#endif +#ifdef USE_GOPHER + ",gopher" +#endif +#ifdef USE_INET6 + ",ipv6" +#endif +#ifdef USE_ALARM + ",alarm" +#endif +#ifdef USE_MARK + ",mark" +#endif + ); +} + +static void fusage(FILE * f, int err) { - fprintf(f, "version %s\n", w3m_version); + fversion(f); fprintf(f, "usage: w3m [options] [URL or filename]\noptions:\n"); fprintf(f, " -t tab set tab width\n"); fprintf(f, " -r ignore backspace effect\n"); @@ -146,6 +203,8 @@ fusage(FILE * f, int err) fprintf(f, " -X don't use termcap init/deinit\n"); fprintf(f, " -o opt=value assign value to config option\n"); fprintf(f, " -config file specify config file\n"); + fprintf(f, " -help print this usage message\n"); + fprintf(f, " -version print w3m version\n"); fprintf(f, " -debug DO NOT USE\n"); if (show_params_p) show_params(f); @@ -172,11 +231,11 @@ wrap_GC_warn_proc(char *msg, GC_word arg) static int n = 0; static int lock = 0; int j; - + j = (i + n) % (sizeof(msg_ring) / sizeof(msg_ring[0])); msg_ring[j].msg = msg; msg_ring[j].arg = arg; - + if (n < sizeof(msg_ring) / sizeof(msg_ring[0])) ++n; else @@ -304,8 +363,12 @@ MAIN(int argc, char **argv, char **envp) config_filename = argv[i]; argv[i] = "-dummy"; } - else if (!strcmp("-h", argv[i])) + else if (!strcmp("-h", argv[i]) || !strcmp("-help", argv[i])) help(); + else if (!strcmp("-V", argv[i]) || !strcmp("-version", argv[i])) { + fversion(stdout); + exit(0); + } } } |