aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-07-17 14:18:25 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-07-17 14:18:25 +0200
commit4c592759a29702b8daa9e92028a5ecef95b9a393 (patch)
tree8d0898ecd27baf7a4a2176a8355e4b1fa6599105
parent31d1cb7bc63d3d30f4875720d51f7dcda04d9d25 (diff)
downloadmblaze-4c592759a29702b8daa9e92028a5ecef95b9a393.tar.gz
mseq: use first message of range for -c and -C.
-rw-r--r--mseq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mseq.c b/mseq.c
index 1b27104..efe8ec0 100644
--- a/mseq.c
+++ b/mseq.c
@@ -251,6 +251,9 @@ stdinmode()
void
overridecur(char *file)
{
+ static int once = 0;
+ if (once++)
+ return;
while (*file == ' ')
file++;
setenv("MAILDOT", file, 1);
@@ -259,6 +262,9 @@ overridecur(char *file)
void
setcur(char *file)
{
+ static int once = 0;
+ if (once++)
+ return;
while (*file == ' ')
file++;
unsetenv("MAILDOT");