mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-03 17:42:21 +00:00
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:
parent
0bf5c28275
commit
bd41795263
2 changed files with 1 additions and 14 deletions
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue