Commit 0f2fc18a 0f2fc18ab5ef3bc518e9d37d422db0484b4cc8d3 by Sergey Poznyakoff

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.
1 parent c8abc2b1
......@@ -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_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("aliases ...");
......@@ -43,8 +42,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 }
};
......@@ -68,10 +65,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;
......@@ -194,7 +187,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);
......
......@@ -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 }
};
......@@ -94,10 +91,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;
}
......@@ -121,7 +114,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);
......
......@@ -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);
......
......@@ -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 }
};
......@@ -195,7 +192,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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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},
};
......@@ -429,7 +425,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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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[],
......
......@@ -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);
......
......@@ -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}
};
......@@ -398,10 +395,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;
......@@ -2691,7 +2684,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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[messages]");
......@@ -90,8 +89,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},
};
......@@ -285,10 +282,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;
}
......@@ -348,7 +341,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))
......
......@@ -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 }
};
......@@ -180,10 +177,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;
}
......@@ -233,7 +226,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);
......
......@@ -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 }
};
......@@ -409,7 +406,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);
......
......@@ -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);
......
......@@ -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 }
};
......@@ -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;
}
......@@ -78,7 +71,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);
......
......@@ -28,7 +28,6 @@
#include <time.h>
#include <mailutils/observer.h>
const char *program_version = "scan (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH scan")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[+folder] [msgs]");
......@@ -54,9 +53,6 @@ static struct argp_option options[] = {
{"file", ARG_FILE, N_("FILE"), 0,
N_("[not yet implemented]")},
{"license", ARG_LICENSE, 0, 0,
N_("display software license"), -1},
{ 0 }
};
......@@ -137,10 +133,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
mh_opt_notimpl ("-file");
break;
case ARG_LICENSE:
mh_license (argp_program_version);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -178,7 +170,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);
......
......@@ -25,7 +25,6 @@
#include <stdarg.h>
#include <pwd.h>
const char *program_version = "send (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH send")"\v"
N_("Options marked with `*' are not yet implemented.\n\
Use -help to obtain the list of traditional MH options.");
......@@ -77,8 +76,6 @@ static struct argp_option options[] = {
{"nowatch", ARG_NOWATCH, NULL, OPTION_HIDDEN, "" },
{"width", ARG_WIDTH, N_("NUMBER"), 0,
N_("* make header fields no longer than NUMBER columns") },
{"license", ARG_LICENSE, 0, 0,
N_("display software license"), -1},
{ 0 }
};
......@@ -263,10 +260,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
}
break;
case ARG_LICENSE:
mh_license (argp_program_version);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -758,7 +751,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);
......
......@@ -24,7 +24,6 @@
#include <unistd.h>
#include <signal.h>
const char *program_version = "sortm (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH sortm")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = N_("[msgs]");
......@@ -76,9 +75,6 @@ static struct argp_option options[] = {
{"quicksort", ARG_QUICKSORT, 0, 0,
N_("use quicksort algorithm (default)"), 40 },
{"license", ARG_LICENSE, 0, 0,
N_("display software license"), -1},
{ NULL },
};
......@@ -191,10 +187,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
algorithm = key;
break;
case ARG_LICENSE:
mh_license (argp_program_version);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -558,7 +550,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);
if (!oplist)
......
......@@ -20,7 +20,6 @@
#include <mh.h>
const char *program_version = "whatnow (" PACKAGE_STRING ")";
static char doc[] = "GNU MH whatnow";
static char args_doc[] = N_("[FILE]");
......@@ -36,9 +35,6 @@ static struct argp_option options[] = {
{"noedit", ARG_NOEDIT, 0, 0, N_("suppress the initial edit")},
{"prompt", ARG_PROMPT, N_("STRING"), 0, N_("set the prompt")},
{"license", ARG_LICENSE, 0, 0,
N_("display software license"), -1},
{ NULL }
};
......@@ -91,10 +87,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
wh_env.prompt = arg;
break;
case ARG_LICENSE:
mh_license (argp_program_version);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -108,7 +100,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);
argc -= index;
......
......@@ -19,7 +19,6 @@
#include <mh.h>
const char *program_version = "whom (" PACKAGE_STRING ")";
static char doc[] = N_("GNU MH whom")"\v"
N_("Use -help to obtain the list of traditional MH options.");
static char args_doc[] = "[file]";
......@@ -40,9 +39,6 @@ static struct argp_option options[] = {
N_("check if addresses are deliverable") },
{"nocheck", ARG_NOCHECK, NULL, OPTION_HIDDEN, "" },
{"license", ARG_LICENSE, 0, 0,
N_("display software license"), -1},
{NULL}
};
......@@ -96,10 +92,6 @@ opt_handler (int key, char *arg, struct argp_state *state)
check_recipients = 0;
break;
case ARG_LICENSE:
mh_license (argp_program_version);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -114,7 +106,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);
......