summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-13 08:28:06 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2002-11-13 08:28:06 (GMT)
commit7930774b90e9fe211f85e7219e62feca198fe8d8 (patch) (side-by-side diff)
treedb0f209e52aa9b633a0bae690a7de69224693a65
parente2e7e806fdccbc0f9823eecae08239e9ad10915a (diff)
downloadmailutils-7930774b90e9fe211f85e7219e62feca198fe8d8.tar.gz
mailutils-7930774b90e9fe211f85e7219e62feca198fe8d8.tar.bz2
(util_do_command): Interpret empty line as "next" command only when in
interactive mode.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mail/util.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/util.c b/mail/util.c
index 2422e3e..1714eba 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -104,12 +104,17 @@ util_do_command (const char *c, ...)
return 0;
}
- /* Hitting return i.e. no command, is equivalent to next
- according to the POSIX spec. */
if (cmd[0] == '\0')
{
free (cmd);
- cmd = strdup ("next");
+
+ /* Hitting return i.e. no command, is equivalent to next
+ according to the POSIX spec. Note, that this applies
+ to interactive state only. */
+ if (interactive)
+ cmd = strdup ("next");
+ else
+ return 0;
}
if (argcv_get (cmd, delim, NULL, &argc, &argv) == 0)

Return to:

Send suggestions and report system problems to the System administrator.