summaryrefslogtreecommitdiffstats
path: root/lib/command_parse.c
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-09-06 23:43:26 +0100
committerChris Hall <chris.hall@highwayman.com>2011-09-06 23:43:26 +0100
commit44b5aa5ca8b8a1620478c794dae11a7d71e9211e (patch)
tree00e10e01b36e4452173ffd15c7b1a5ec42dfbc0c /lib/command_parse.c
parent1c1a79f1119c8bc898fb96ec385381f61841d7a1 (diff)
downloadquagga-ex19p.tar.bz2
quagga-ex19p.tar.xz
Further improvements to "pipework".ex19p
Version advanced to 0.99.18ex19p. Fixed occasional failure to immediately display prompt after previous command output was abandonned by ^C, particularly with "--more--". Completely removed the "~" temporary prompt, and simplified some logic. Added indication of pthread running to "show version".
Diffstat (limited to 'lib/command_parse.c')
-rw-r--r--lib/command_parse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/command_parse.c b/lib/command_parse.c
index 9204db70..54185428 100644
--- a/lib/command_parse.c
+++ b/lib/command_parse.c
@@ -3247,10 +3247,9 @@ static node_type_t cmd_auth_specials(cmd_context context, node_type_t target) ;
*
* - parsed->parts is what was found
*
- * - parsed->cmd->daemon => daemon
+ * NB: may be empty or comment only !
*
- * CMD_EMPTY => line is empty, except perhaps for comment
- * (iff parsing for execution)
+ * - parsed->cmd->daemon => daemon
*
* CMD_ERR_INCOMPLETE => "do" and nothing more
* (iff parsing for execution)
@@ -3317,13 +3316,10 @@ cmd_parse_command(cmd_parsed parsed, cmd_context context)
*/
if (((parsed->parts & cmd_part_command) == 0) && context->parse_execution)
{
- if ((parsed->parts & ~cmd_part_comment) == cmd_parts_none)
- return CMD_EMPTY ; /* accept empty */
-
if ((parsed->parts & cmd_part_do) != 0)
- return CMD_ERR_INCOMPLETE ; /* reject "do" alone */
+ return CMD_ERR_INCOMPLETE ; /* reject "do" alone */
- return CMD_SUCCESS ; /* accept pipes */
+ return CMD_SUCCESS ; /* accept pipes and empty */
} ;
/* Level 2 parsing