From 2ca96c58673afb1df494ae5b5b00256c140ce3d6 Mon Sep 17 00:00:00 2001 From: jaortega Date: Thu, 22 Mar 2001 02:33:58 +0000 Subject: minor changes --- mixutils/mixvm_command.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'mixutils/mixvm_command.c') diff --git a/mixutils/mixvm_command.c b/mixutils/mixvm_command.c index 516bd68..e1c03bf 100644 --- a/mixutils/mixvm_command.c +++ b/mixutils/mixvm_command.c @@ -24,8 +24,15 @@ #include #include #include -#include -#include + +#include + +#ifdef HAVE_LIBREADLINE +# include +# include +#else + typedef int Function (); +#endif /* HAVE_LIBREADLINE */ #include #include @@ -70,6 +77,7 @@ static const char *mix_commands_[ALL_COMMANDS_NO_] = {NULL}; +#ifdef HAVE_LIBREADLINE /* readline functions */ static char * mixvm_cmd_generator_ (char *text, int state); @@ -125,6 +133,7 @@ mixvm_cmd_generator_ (char *text, int state) /* If no names matched, then return NULL. */ return ((char *)NULL); } +#endif /* HAVE_LIBREADLINE */ /* command functions */ static COMMAND * @@ -281,8 +290,12 @@ mixvm_cmd_init (char *arg, gboolean use_emacs) for (k = 0; k < MIX_CMD_INVALID; ++k) mix_commands_[k + LOCAL_COMANDS_NO_] = mix_vm_command_to_string (k); mix_commands_[ALL_COMMANDS_NO_ - 1] = NULL; + +#ifdef HAVE_LIBREADLINE /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = (CPPFunction *)mixvm_cmd_completion_; +#endif /* HAVE_LIBREADLINE */ + /* initialise the dispatcher */ dis_ = mix_vm_cmd_dispatcher_new (stdout, stderr); -- cgit v1.2.3