summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-11-13 08:28:06 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-11-13 08:28:06 +0000
commit7930774b90e9fe211f85e7219e62feca198fe8d8 (patch)
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.
-rw-r--r--mail/util.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/util.c b/mail/util.c
index 2422e3ea9..1714eba3c 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -104,12 +104,17 @@ util_do_command (const char *c, ...)
104 return 0; 104 return 0;
105 } 105 }
106 106
107 /* Hitting return i.e. no command, is equivalent to next
108 according to the POSIX spec. */
109 if (cmd[0] == '\0') 107 if (cmd[0] == '\0')
110 { 108 {
111 free (cmd); 109 free (cmd);
112 cmd = strdup ("next"); 110
111 /* Hitting return i.e. no command, is equivalent to next
112 according to the POSIX spec. Note, that this applies
113 to interactive state only. */
114 if (interactive)
115 cmd = strdup ("next");
116 else
117 return 0;
113 } 118 }
114 119
115 if (argcv_get (cmd, delim, NULL, &argc, &argv) == 0) 120 if (argcv_get (cmd, delim, NULL, &argc, &argv) == 0)

Return to:

Send suggestions and report system problems to the System administrator.