summaryrefslogtreecommitdiff
path: root/guimb
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-03-08 22:41:31 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-03-08 22:41:31 +0000
commit860ac637bf56553a324f10491346c882a0dfeb1c (patch)
tree2a41db8b797d65d4486fa34c9ddbbda1bb15fd72 /guimb
parent955b5b09402ccd01b389ebf9951e8289745e6633 (diff)
downloadmailutils-860ac637bf56553a324f10491346c882a0dfeb1c.tar.gz
mailutils-860ac637bf56553a324f10491346c882a0dfeb1c.tar.bz2
Use mu_argp_parse.
Diffstat (limited to 'guimb')
-rw-r--r--guimb/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/guimb/main.c b/guimb/main.c
index 147c01971..43a3ca9b2 100644
--- a/guimb/main.c
+++ b/guimb/main.c
@@ -77,11 +77,13 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
case 'c':
program_expr = optarg;
+ *(int *)state->input = state->next;
state->next = state->argc;
break;
case 's':
program_file = optarg;
+ *(int *)state->input = state->next;
state->next = state->argc;
break;
@@ -127,10 +129,11 @@ static struct argp argp = {
parse_opt,
args_doc,
doc,
- mu_common_argp_child,
+ NULL,
NULL, NULL
};
+static const char *guimb_argp_capa[] = {"mailutils", NULL};
int
main (int argc, char *argv[])
@@ -140,9 +143,8 @@ main (int argc, char *argv[])
struct guimb_data gd;
append_arg ("");
- mu_create_argcv (argc, argv, &argc, &argv);
- argp_parse (&argp, argc, argv, 0, &c, NULL);
-
+ mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, NULL, &c);
+
for (; c < argc; c++)
append_arg (argv[c]);

Return to:

Send suggestions and report system problems to the System administrator.