Commit 2cb1d357 2cb1d3573e8f0e8ebcf34e511d80abbee5b0dfec by Sergey Poznyakoff

Minor fixes.

* mailbox/attachment.c (MAX_HDR_LEN): Remove unused define.
* sieve/sieve.c (parser) <ARGP_KEY_NO_ARGS>: Don't check for
the script,
(main): ... do it here, instead.
1 parent 35ac66f0
......@@ -45,7 +45,6 @@
#include <mailutils/errno.h>
#include <mailutils/mutil.h>
#define MAX_HDR_LEN 256
#define BUF_SIZE 2048
struct _msg_info
......
......@@ -231,11 +231,6 @@ parser (int key, char *arg, struct argp_state *state)
script = mu_tilde_expansion (arg, "/", NULL);
break;
case ARGP_KEY_NO_ARGS:
if (!mu_help_config_mode)
argp_error (state, _("SCRIPT must be specified"));
return ARGP_ERR_UNKNOWN;
case ARGP_KEY_INIT:
mu_argp_node_list_init (&lst);
break;
......@@ -243,6 +238,7 @@ parser (int key, char *arg, struct argp_state *state)
case ARGP_KEY_FINI:
mu_argp_node_list_finish (&lst, NULL, NULL);
break;
default:
return ARGP_ERR_UNKNOWN;
}
......@@ -499,6 +495,12 @@ main (int argc, char *argv[])
argc, argv, ARGP_IN_ORDER, NULL, NULL))
exit (EX_USAGE);
if (!script)
{
mu_error (_("script must be specified"));
exit (EX_USAGE);
}
/* Sieve interpreter setup. */
rc = mu_sieve_machine_init (&mach, NULL);
if (rc)
......