summaryrefslogtreecommitdiff
path: root/mh
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-03-15 23:24:36 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-03-15 23:24:36 +0000
commitbbe0e3520ff6bda54eb9ca92ee1b47c099049da1 (patch)
tree266d6df4642174273f3afa2e97425abb8975c811 /mh
parentc78a92659a1ae097bd92947aeb68efd88e26d3e4 (diff)
downloadmailutils-bbe0e3520ff6bda54eb9ca92ee1b47c099049da1.tar.gz
mailutils-bbe0e3520ff6bda54eb9ca92ee1b47c099049da1.tar.bz2
Updated invocations of mhl_format_run().
Diffstat (limited to 'mh')
-rw-r--r--mh/mhl.c18
-rw-r--r--mh/repl.c2
2 files changed, 11 insertions, 9 deletions
diff --git a/mh/mhl.c b/mh/mhl.c
index 9711a06a8..35f91f7d4 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -62,8 +62,8 @@ struct mh_option mh_option[] = {
};
static int interactive; /* Using interactive output */
-static int bell = 1; /* Ring the bell after each page of output */
-static int clear = 0; /* Clear the screen after each page of output */
+static int mhl_fmt_flags; /* MHL format flags. Controlled by --bell
+ and --clear */
static int length = 40; /* Length of output page */
static int width = 80; /* Width of output page */
static char *formfile = MHLIBDIR "/mhl.format";
@@ -82,19 +82,21 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
break;
case ARG_BELL:
- bell = is_true (arg);
+ if (is_true (arg))
+ mhl_fmt_flags |= MHL_BELL;
break;
case ARG_NOBELL:
- bell = 0;
+ mhl_fmt_flags &= ~MHL_BELL;
break;
case ARG_CLEAR:
- clear = is_true (arg);
+ if (is_true (arg))
+ mhl_fmt_flags |= MHL_CLEARSCREEN;
break;
case ARG_NOCLEAR:
- clear = 0;
+ mhl_fmt_flags &= ~MHL_CLEARSCREEN;
break;
case ARG_FORM:
@@ -197,7 +199,7 @@ list_message (char *name, stream_t output)
}
else
{
- mhl_format_run (format, width, length, clear, bell, msg, output);
+ mhl_format_run (format, width, length, mhl_fmt_flags, msg, output);
message_unref (msg);
}
}
@@ -225,7 +227,7 @@ main (int argc, char **argv)
nomoreproc = 1;
if (!interactive)
- bell = 0;
+ mhl_fmt_flags &= ~MHL_BELL;
output = open_output ();
diff --git a/mh/repl.c b/mh/repl.c
index 545bd0d78..088a1ffaf 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -282,7 +282,7 @@ make_draft (mailbox_t mbox, int disp, struct mh_whatnow_env *wh)
list_t filter = mhl_format_compile (mhl_filter);
if (!filter)
exit (1);
- mhl_format_run (filter, width, 0, 0, 0, msg, str);
+ mhl_format_run (filter, width, 0, 0, msg, str);
mhl_format_destroy (&filter);
}

Return to:

Send suggestions and report system problems to the System administrator.