From 9a9466f1fdad6fb6c94c5ef8ddb1a687a7bcd874 Mon Sep 17 00:00:00 2001 From: Chris Hall Date: Thu, 31 Mar 2011 00:37:47 +0100 Subject: Small improvements to speed of reading of configuration file. Tidy up signalling of "ready" to command loop, and checking of appropriate state to close written configuration file. --- lib/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/command.c') diff --git a/lib/command.c b/lib/command.c index 4057bcfc..f9747a33 100644 --- a/lib/command.c +++ b/lib/command.c @@ -2159,6 +2159,8 @@ cmd_init (bool terminal) { srand(time(NULL)) ; + cmd_parser_init() ; + if (host.cwd == NULL) /* in case cmd_cwd() not called, yet */ cmd_getcwd() ; @@ -2333,7 +2335,6 @@ cmd_terminate () cmd->items = NULL ; /* gone */ - XFREE (MTYPE_CMD_STRING, cmd->r_string) ; /* sets NULL */ XFREE (MTYPE_CMD_STRING, cmd->r_doc) ; } ; } -- cgit v1.2.3