Remove redundant dependency to readline in fluid_cmd.c

Libreadline is already used into fluid_istream_readline().
In my opinion, there is no need to have this duplicated code, so I would suggest to move the call to add_history() into fluid_sys.h

Closes #460.
This commit is contained in:
carlo-bramini 2018-11-07 19:49:13 +01:00 committed by derselbst
parent 0bf5c28275
commit bd41795263
2 changed files with 1 additions and 14 deletions

View file

@ -28,11 +28,6 @@
#include "fluid_sfont.h"
#include "fluid_chan.h"
#if WITH_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
/* FIXME: LADSPA used to need a lot of parameters on a single line. This is not
* necessary anymore, so the limits below could probably be reduced */
#define MAX_TOKENS 100
@ -522,15 +517,6 @@ fluid_shell_run(void *data)
break;
}
#if WITH_READLINE
if(shell->in == fluid_get_stdin())
{
add_history(workline);
}
#endif
/* handle the command */
switch(fluid_command(shell->handler, workline, shell->out))
{

View file

@ -1279,6 +1279,7 @@ fluid_istream_readline(fluid_istream_t in, fluid_ostream_t out, char *prompt,
FLUID_SNPRINTF(buf, len, "%s", line);
buf[len - 1] = 0;
add_history(buf);
free(line);
return 1;