summaryrefslogtreecommitdiff
path: root/mu
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-10-29 20:53:47 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-10-29 20:53:47 +0300
commit3a91a69baef99247b066e2c5ce4fce6bf739f1ac (patch)
treef424a72d3b1b5a5acd89231ce0f9e1fa55ad754d /mu
parentb48ac923058cb1967209ee2883d93d55932a0364 (diff)
downloadmailutils-3a91a69baef99247b066e2c5ce4fce6bf739f1ac.tar.gz
mailutils-3a91a69baef99247b066e2c5ce4fce6bf739f1ac.tar.bz2
Remove left over references to argp; other bugfixes
Diffstat (limited to 'mu')
-rw-r--r--mu/filter.c1
-rw-r--r--mu/imap.c1
-rw-r--r--mu/smtp.c1
-rw-r--r--mu/template.c32
4 files changed, 2 insertions, 33 deletions
diff --git a/mu/filter.c b/mu/filter.c
index ea23979d2..291f8cfea 100644
--- a/mu/filter.c
+++ b/mu/filter.c
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <string.h>
#include <mailutils/mailutils.h>
-#include "argp.h"
#include "mu.h"
char filter_docstring[] = N_("apply a chain of filters to the input");
diff --git a/mu/imap.c b/mu/imap.c
index 3f6481701..d19a2e34d 100644
--- a/mu/imap.c
+++ b/mu/imap.c
@@ -29,7 +29,6 @@
#include <mailutils/imaputil.h>
#include <mailutils/msgset.h>
#include "mu.h"
-#include "argp.h"
char imap_docstring[] = N_("IMAP4 client shell");
diff --git a/mu/smtp.c b/mu/smtp.c
index bc6d29204..4dbbd1f73 100644
--- a/mu/smtp.c
+++ b/mu/smtp.c
@@ -25,7 +25,6 @@
#include <mailutils/cctype.h>
#include <mailutils/mailutils.h>
#include <mailutils/smtp.h>
-#include <argp.h>
#include "mu.h"
char smtp_docstring[] = N_("run a SMTP session");
diff --git a/mu/template.c b/mu/template.c
index ed306329d..0cce06ea2 100644
--- a/mu/template.c
+++ b/mu/template.c
@@ -32,50 +32,22 @@
# include <config.h>
#endif
#include <mailutils/mailutils.h>
-#include "argp.h"
#include "mu.h"
-#warning "Replace DESCRIPTION with a short description of this module."
-static char FOO_doc[] = N_("mu FOO - DESCRIPTION");
-
#warning "Usually DESCRIPTION is the same text as the one used in FOO_doc."
char FOO_docstring[] = N_("DESCRIPTION");
#warning "Edit ARGDOC or remove this variable if module does not take arguments"
static char FOO_args_doc[] = N_("ARGDOC");
-static struct argp_option FOO_options[] = {
+static struct mu_option FOO_options[] = {
{ NULL }
};
-static error_t
-FOO_parse_opt (int key, char *arg, struct argp_state *state)
-{
- switch (key)
- {
- default:
- return ARGP_ERR_UNKNOWN;
- }
- return 0;
-}
-
-static struct argp FOO_argp = {
- FOO_options,
- FOO_parse_opt,
- FOO_args_doc,
- FOO_doc,
- NULL,
- NULL,
- NULL
-};
-
int
mutool_FOO (int argc, char **argv)
{
- int index;
-
- if (argp_parse (&FOO_argp, argc, argv, ARGP_IN_ORDER, &index, NULL))
- return 1;
+ mu_action_getopt (&argc, &argv, FOO_options, FOO_docstring, FOO_args_doc);
#warning "Add the necessary functionality here"
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.