Commit a0cad499 a0cad4991408f9b426a92d5ef3da2e1678f70315 by Sergey Poznyakoff

(parse_opt): Bugfix. Was using optarg instead of arg

1 parent e087da3a
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2003,
2004 Free Software Foundation, Inc.
2004, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -227,7 +227,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
case 's':
select_attribute = decode_attr (optarg);
select_attribute = decode_attr (arg);
break;
case 't':
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -166,20 +166,20 @@ parse_opt (int key, char *arg, struct argp_state *state)
#ifdef WITH_GUILE
case 's':
progfile_pattern = optarg;
progfile_pattern = arg;
break;
#endif
case 'S':
sieve_pattern = optarg;
sieve_pattern = arg;
break;
case 'x':
do
{
if (!optarg)
optarg = D_DEFAULT;
switch (*optarg)
if (!arg)
arg = D_DEFAULT;
switch (*arg)
{
case 'g':
#ifdef WITH_GUILE
......@@ -208,14 +208,14 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
default:
if (isdigit (*optarg))
debug_level = *optarg - '0';
if (isdigit (*arg))
debug_level = *arg - '0';
else
argp_error (state, _("%c is not a valid debug flag"), *arg);
break;
}
}
while (*++optarg);
while (*++arg);
break;
default:
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -151,7 +151,7 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate)
break;
case 'p':
ap->passwd = optarg;
ap->passwd = arg;
break;
case 'm':
......@@ -160,19 +160,19 @@ popauth_parse_opt (int key, char *arg, struct argp_state *astate)
break;
case 'f':
ap->input_name = optarg;
ap->input_name = arg;
break;
case 'o':
ap->output_name = optarg;
ap->output_name = arg;
break;
case 'u':
ap->username = optarg;
ap->username = arg;
break;
case 'P':
set_db_perms (astate, optarg, &permissions);
set_db_perms (astate, arg, &permissions);
break;
case ARGP_KEY_FINI:
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002, 2003,
2004 Free Software Foundation, Inc.
2004, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -88,11 +88,11 @@ readmsg_parse_opt (int key, char *arg, struct argp_state *astate)
break;
case 'f':
mailbox_name = optarg;
mailbox_name = arg;
break;
case 'w':
weedlist = optarg;
weedlist = arg;
break;
case 'n':
......