summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-05-02 17:00:23 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-05-02 17:00:23 +0300
commit55e8650184dc3f03e98cd41714115dc9803610cc (patch)
treec3f849a6f4a6b319c79d83e1710a0e08291721d5
parenta5721d4bc037b7288722650cf8d6685d18c6cdfd (diff)
downloadmailutils-55e8650184dc3f03e98cd41714115dc9803610cc.tar.gz
mailutils-55e8650184dc3f03e98cd41714115dc9803610cc.tar.bz2
Make version output of the MH utilities more informative.
* mh/mh_argp.c [MU_ALPHA_RELEASE}: Include git-describe.h (mh_program_version_hook): New function. (mh_argp_init): Take no arguments. Set argp_program_version_hook. * mh/mh_getopt.h (ARG_LICENSE): Remove. (mh_argp_init): Change proto. All sources: Fix calls to mh_argp_init, remove --license option.
-rw-r--r--mh/ali.c9
-rw-r--r--mh/anno.c9
-rw-r--r--mh/burst.c9
-rw-r--r--mh/comp.c9
-rw-r--r--mh/fmtcheck.c9
-rw-r--r--mh/folder.c10
-rw-r--r--mh/forw.c10
-rw-r--r--mh/inc.c9
-rw-r--r--mh/install-mh.c9
-rw-r--r--mh/mark.c9
-rw-r--r--mh/mh_argp.c45
-rw-r--r--mh/mh_getopt.h3
-rw-r--r--mh/mhl.c9
-rw-r--r--mh/mhn.c9
-rw-r--r--mh/mhparam.c9
-rw-r--r--mh/mhpath.c9
-rw-r--r--mh/pick.c9
-rw-r--r--mh/refile.c9
-rw-r--r--mh/repl.c9
-rw-r--r--mh/rmf.c9
-rw-r--r--mh/rmm.c9
-rw-r--r--mh/scan.c10
-rw-r--r--mh/send.c9
-rw-r--r--mh/sortm.c10
-rw-r--r--mh/whatnow.c10
-rw-r--r--mh/whom.c10
26 files changed, 68 insertions, 202 deletions
diff --git a/mh/ali.c b/mh/ali.c
index 851ee1aa9..7c6964a09 100644
--- a/mh/ali.c
+++ b/mh/ali.c
@@ -26,7 +26,6 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
-const char *program_version = "ali (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH ali")"\v"
N_("Options marked with `*' are not yet implemented.\n"
"Use -help to obtain the list of traditional MH options.");
@@ -44,8 +43,6 @@ static struct argp_option options[] = {
N_("try to determine the official hostname for each address") },
{"user", ARG_USER, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("list the aliases that expand to given addresses") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -69,10 +66,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
{
switch (key)
{
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
case ARG_ALIAS:
mh_alias_read (arg, 1);
break;
@@ -195,7 +188,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/anno.c b/mh/anno.c
index 83119c3ee..d2870ff67 100644
--- a/mh/anno.c
+++ b/mh/anno.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "anno (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH anno")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -41,8 +40,6 @@ static struct argp_option options[] = {
N_("add this FIELD to the message header") },
{"text", ARG_TEXT, N_("STRING"), 0,
N_("field value for the component") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ NULL }
};
@@ -92,10 +89,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mh_quote (arg, &anno_text);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -119,7 +112,7 @@ main (int argc, char **argv)
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/burst.c b/mh/burst.c
index 0647baaf3..670ea795d 100644
--- a/mh/burst.c
+++ b/mh/burst.c
@@ -24,7 +24,6 @@
#define obstack_chunk_free free
#include <obstack.h>
-const char *program_version = "burst (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH burst")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -48,8 +47,6 @@ static struct argp_option options[] = {
{"norecursive", ARG_NORECURSIVE, 0, OPTION_HIDDEN, ""},
{"length", ARG_LENGTH, N_("NUMBER"), 0,
N_("set minimal length of digest encapsulation boundary (default 1)") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ NULL }
};
@@ -93,10 +90,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
eb_min_length = 1;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
case ARG_VERBOSE:
verbose = is_true (arg);
break;
@@ -554,7 +547,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/comp.c b/mh/comp.c
index 3ac0a41cf..71095a6fa 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -23,7 +23,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-const char *program_version = "comp (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH comp")"\v"
N_("Options marked with `*' are not yet implemented.\n"
"Use -help to obtain the list of traditional MH options.");
@@ -56,8 +55,6 @@ static struct argp_option options[] = {
{"use", ARG_USE, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("use draft file preserved after the last session") },
{"nouse", ARG_NOUSE, NULL, OPTION_HIDDEN, ""},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -143,10 +140,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
argp_error (state, _("option is not yet implemented"));
exit (1);
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -195,7 +188,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/fmtcheck.c b/mh/fmtcheck.c
index 3d50ae842..33c456aa8 100644
--- a/mh/fmtcheck.c
+++ b/mh/fmtcheck.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "fmtcheck (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH fmtcheck")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = "";
@@ -36,8 +35,6 @@ static struct argp_option options[] = {
N_("dump the listing of compiled format code")},
{ "debug", ARG_DEBUG, NULL, 0,
N_("enable parser debugging output"),},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -89,10 +86,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mh_format_debug (1);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -105,7 +98,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
diff --git a/mh/folder.c b/mh/folder.c
index b13e37311..c2baf4cee 100644
--- a/mh/folder.c
+++ b/mh/folder.c
@@ -34,7 +34,6 @@
#define obstack_chunk_free free
#include <obstack.h>
-const char *program_version = "folder (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH folder")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[action] [msg]");
@@ -81,9 +80,6 @@ static struct argp_option options[] = {
{"dry-run", ARG_DRY_RUN, NULL, 0,
N_("do nothing, print what would be done (with --pack)"), 3},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
-
{NULL},
};
@@ -225,10 +221,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mh_set_current_folder (arg);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
case ARG_VERBOSE:
verbose++;
break;
@@ -939,7 +931,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/forw.c b/mh/forw.c
index 8ec9feeac..7fbaddbbe 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "forw (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH forw")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -70,9 +69,6 @@ static struct argp_option options[] = {
N_("use draft file preserved after the last session") },
{"nouse", ARG_NOUSE, N_("BOOL"), OPTION_HIDDEN, "" },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
-
{NULL},
};
@@ -209,10 +205,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
argp_error (state, _("option is not yet implemented"));
exit (1);
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -426,7 +418,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/inc.c b/mh/inc.c
index 4dc911737..184a056c5 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "inc (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH inc")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[+folder]");
@@ -50,8 +49,6 @@ static struct argp_option options[] = {
N_("set output width")},
{"quiet", ARG_QUIET, 0, 0,
N_("be quiet")},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -142,10 +139,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
quiet = 1;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -181,7 +174,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
diff --git a/mh/install-mh.c b/mh/install-mh.c
index fd88631c6..a563c5f37 100644
--- a/mh/install-mh.c
+++ b/mh/install-mh.c
@@ -19,7 +19,6 @@
#include <mh.h>
-const char *program_version = "install-mh (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH install-mh")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = "";
@@ -28,8 +27,6 @@ static char args_doc[] = "";
static struct argp_option options[] = {
{"auto", ARG_AUTO, NULL, 0, N_("do not ask for anything")},
{"compat", ARG_COMPAT, NULL, OPTION_HIDDEN, ""},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{NULL}
};
@@ -53,10 +50,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
case ARG_COMPAT:
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -72,7 +65,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_auto_install = 0;
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
diff --git a/mh/mark.c b/mh/mark.c
index f5c6cd31d..5f67a6346 100644
--- a/mh/mark.c
+++ b/mh/mark.c
@@ -19,7 +19,6 @@
#include <mh.h>
-const char *program_version = "mark (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH mark")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = "[msgs...]";
@@ -42,8 +41,6 @@ static struct argp_option options[] = {
{"zero", ARG_ZERO, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("empty the sequence before adding messages")},
{"nozero", ARG_NOZERO, NULL, OPTION_HIDDEN, "" },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{NULL}
};
@@ -116,10 +113,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
seq_flags &= ~SEQ_ZERO;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -195,7 +188,7 @@ main (int argc, char **argv)
mu_url_t url;
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/mh_argp.c b/mh/mh_argp.c
index fa5e51422..be7ed16d9 100644
--- a/mh/mh_argp.c
+++ b/mh/mh_argp.c
@@ -28,6 +28,9 @@
#include <string.h>
#include <mailutils/argcv.h>
#include "argp.h"
+#ifdef MU_ALPHA_RELEASE
+# include <git-describe.h>
+#endif
static error_t
parse_opt (int key, char *arg, struct argp_state *state)
@@ -93,11 +96,49 @@ my_argp_parse (struct argp *argp, int argc, char **argv, int flags,
return rc;
}
+const char version_etc_copyright[] =
+ /* Do *not* mark this string for translation. %s is a copyright
+ symbol suitable for this locale, and %d is the copyright
+ year. */
+ "Copyright %s 2010 Free Software Foundation, inc.";
+
+/* This is almost the same as mu_program_version_hook from muinit.c,
+ except for different formatting of the first line. MH uses:
+
+ progname (GNU Mailutils X.Y.Z)
+
+ where X.Y.Z stands for the version number. Emacs MH-E uses this
+ to determine Mailutils presence and its version number (see
+ lisp/mh-e/mh-e.el, function mh-variant-mu-mh-info). */
+static void
+mh_program_version_hook (FILE *stream, struct argp_state *state)
+{
+#ifdef GIT_DESCRIBE
+ fprintf (stream, "%s (%s %s) [%s]\n",
+ mu_program_name, PACKAGE_NAME, PACKAGE_VERSION, GIT_DESCRIBE);
+#else
+ fprintf (stream, "%s (%s %s)\n", mu_program_name,
+ PACKAGE_NAME, PACKAGE_VERSION);
+#endif
+ /* TRANSLATORS: Translate "(C)" to the copyright symbol
+ (C-in-a-circle), if this symbol is available in the user's
+ locale. Otherwise, do not translate "(C)"; leave it as-is. */
+ fprintf (stream, version_etc_copyright, _("(C)"));
+
+ fputs (_("\
+\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n\
+\n\
+"),
+ stream);
+}
+
void
-mh_argp_init (const char *vers)
+mh_argp_init ()
{
- argp_program_version = vers ? vers : PACKAGE_STRING;
argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
+ argp_program_version_hook = mh_program_version_hook;
}
diff --git a/mh/mh_getopt.h b/mh/mh_getopt.h
index bd26f832a..767307fc3 100644
--- a/mh/mh_getopt.h
+++ b/mh/mh_getopt.h
@@ -89,7 +89,6 @@ enum mh_arg {
ARG_INTERACTIVE,
ARG_LBRACE,
ARG_LENGTH,
- ARG_LICENSE,
ARG_LIMIT,
ARG_LINK,
ARG_LIST,
@@ -184,7 +183,7 @@ enum mh_arg {
ARG_ZERO
};
-void mh_argp_init (const char *vers);
+void mh_argp_init (void);
void mh_argv_preproc (int argc, char **argv, struct mh_argp_data *data);
int mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc);
int mh_argp_parse (int *argc, char **argv[],
diff --git a/mh/mhl.c b/mh/mhl.c
index 999a3cbfd..6a7024d77 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -23,7 +23,6 @@
#include <sys/stat.h>
#include <unistd.h>
-const char *program_version = "mhl (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH mhl")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[files]");
@@ -48,8 +47,6 @@ static struct argp_option options[] = {
N_("use given PROG instead of the default") },
{"nomoreproc", ARG_NOMOREPROC, NULL, 0,
N_("disable use of moreproc program") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ NULL }
};
@@ -133,10 +130,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
nomoreproc = 1;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -224,7 +217,7 @@ main (int argc, char **argv)
interactive = isatty (1) && isatty (0);
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/mhn.c b/mh/mhn.c
index 0824134e0..29fcd9413 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -26,7 +26,6 @@
#define obstack_chunk_free free
#include <obstack.h>
-const char *program_version = "mhn (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH mhn")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -87,8 +86,6 @@ static struct argp_option options[] = {
{"noverbose", ARG_NOVERBOSE, NULL, OPTION_HIDDEN, "", 41 },
{"quiet", ARG_QUIET, 0, 0,
N_("be quiet")},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{NULL}
};
@@ -397,10 +394,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mode_options |= OPT_QUIET;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
case ARG_CHARSET:
charset = arg;
break;
@@ -2690,7 +2683,7 @@ main (int argc, char **argv)
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/mhparam.c b/mh/mhparam.c
index 85a28b2c2..f9b7a23f7 100644
--- a/mh/mhparam.c
+++ b/mh/mhparam.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "mhparam (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH mhparam")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[components]");
@@ -32,8 +31,6 @@ static struct argp_option options[] = {
N_("display all components from the MH profile. All other arguments are ignored")},
{"component", ARG_COMPONENT, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("always display the component name") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -60,10 +57,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
display_comp_name = is_true (arg);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -126,7 +119,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/mhpath.c b/mh/mhpath.c
index c222fc7c2..04d58f820 100644
--- a/mh/mhpath.c
+++ b/mh/mhpath.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "mhpath (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH mhpath")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[+folder] [msgs]");
@@ -30,8 +29,6 @@ static char args_doc[] = N_("[+folder] [msgs]");
static struct argp_option options[] = {
{"folder", ARG_FOLDER, N_("FOLDER"), 0,
N_("specify folder to operate upon")},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -49,10 +46,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mh_set_current_folder (arg);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -83,7 +76,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/pick.c b/mh/pick.c
index e88aec018..51c1366bc 100644
--- a/mh/pick.c
+++ b/mh/pick.c
@@ -27,7 +27,6 @@
#define obstack_chunk_free free
#include <obstack.h>
-const char *program_version = "pick (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH pick")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -91,8 +90,6 @@ static struct argp_option options[] = {
{"zero", ARG_ZERO, N_("BOOL"), OPTION_ARG_OPTIONAL,
N_("empty the sequence before adding messages"), 4},
{"nozero", ARG_NOZERO, NULL, OPTION_HIDDEN, "", 4 },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{NULL},
};
@@ -286,10 +283,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
pick_add_token (&lexlist, T_STRING, p);
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -349,7 +342,7 @@ main (int argc, char **argv)
flags = mh_interactive_mode_p () ? 0 : ARGP_NO_ERRS;
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, flags, options, mh_option,
args_doc, doc, opt_handler, NULL, &index);
if (pick_parse (lexlist))
diff --git a/mh/refile.c b/mh/refile.c
index 9cade4c02..8b5e82f26 100644
--- a/mh/refile.c
+++ b/mh/refile.c
@@ -26,7 +26,6 @@
#include <errno.h>
#include <fcntl.h>
-const char *program_version = "refile (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH refile")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -47,8 +46,6 @@ static struct argp_option options[] = {
N_("specify source folder; it will become the current folder after the program exits")},
{"src", 0, NULL, OPTION_ALIAS, NULL},
{"file", ARG_FILE, N_("FILE"), 0, N_("use FILE as the source message")},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -179,10 +176,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
source_file = arg;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -232,7 +225,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/repl.c b/mh/repl.c
index de6a1256c..e17e237aa 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -24,7 +24,6 @@
#include <sys/stat.h>
#include <unistd.h>
-const char *program_version = "reply (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH repl")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
@@ -68,8 +67,6 @@ static struct argp_option options[] = {
{"nowhatnowproc", ARG_NOWHATNOWPROC, NULL, 0,
N_("* ignore whatnowproc variable; use standard `whatnow' shell instead")},
{"use", ARG_USE, N_("BOOL"), OPTION_ARG_OPTIONAL, N_("use draft file preserved after the last session") },
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -261,10 +258,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
argp_error (state, _("Option is not yet implemented"));
exit (1);
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
case ARGP_KEY_FINI:
if (!format_str)
format_str = default_format_str;
@@ -406,7 +399,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
diff --git a/mh/rmf.c b/mh/rmf.c
index 3aa7c80dc..31fb44efe 100644
--- a/mh/rmf.c
+++ b/mh/rmf.c
@@ -30,7 +30,6 @@
#include <dirent.h>
-const char *program_version = "rmf (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH rmf")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[+folder]");
@@ -45,8 +44,6 @@ static struct argp_option options[] = {
{"recursive", ARG_RECURSIVE, NULL, 0,
N_("recursively delete all subfolders")},
{"norecursive", ARG_NORECURSIVE, NULL, OPTION_HIDDEN, ""},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@@ -90,10 +87,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
recurse = 0;
break;
- case ARG_LICENSE:
- mh_license (argp_program_version);
- break;
-
default:
return ARGP_ERR_UNKNOWN;
}
@@ -195,7 +188,7 @@ main (int argc, char **argv)
/* Native Language Support */
MU_APP_INIT_NLS ();
- mh_argp_init (program_version);
+ mh_argp_init ();
mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
diff --git a/mh/rmm.c b/mh/rmm.c
index 68562d630..e82ac799a 100644
--- a/mh/rmm.c
+++ b/mh/rmm.c
@@ -21,7 +21,6 @@
#include <mh.h>
-const char *program_version = "rmm (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH rmm")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[+folder] [msgs]");
@@ -30,8 +29,6 @@ static char args_doc[] = N_("[+folder] [msgs]");
static struct argp_option options[] = {
{"folder", ARG_FOLDER, N_("FOLDER"), 0,
N_("specify folder to operate upon")},
- {"license", ARG_LICENSE, 0, 0,
- N_("display software license"), -1},
{ 0 }
};
@