diff options
author | mistachkin <mistachkin@noemail.net> | 2015-01-12 18:52:57 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2015-01-12 18:52:57 +0000 |
commit | 9b97b8fed970afe1edcae8b49281c072b92c93d0 (patch) | |
tree | 5e933832179cd56eb86c79d942f73df4d9c36dcc /src/shell.c | |
parent | 7bb6e8e16962d2201a5d61d5e02a52b4d453786c (diff) | |
parent | 8d9da63dacde128e546f84cb34392188aab1be83 (diff) | |
download | sqlite-9b97b8fed970afe1edcae8b49281c072b92c93d0.tar.gz sqlite-9b97b8fed970afe1edcae8b49281c072b92c93d0.zip |
Merge updates from trunk.
FossilOrigin-Name: ca5f2c545216c82486e66d26f55b49cbf351ffdc
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/shell.c b/src/shell.c index b7a8fa8b0..9c0481c0d 100644 --- a/src/shell.c +++ b/src/shell.c @@ -55,17 +55,16 @@ # include <sys/types.h> #endif -#if defined(HAVE_READLINE) && HAVE_READLINE!=0 +#if HAVE_READLINE # include <readline/readline.h> # include <readline/history.h> -#else -# undef HAVE_READLINE #endif -#if defined(HAVE_EDITLINE) && !defined(HAVE_READLINE) +#if HAVE_EDITLINE +# undef HAVE_READLINE # define HAVE_READLINE 1 # include <editline/readline.h> #endif -#if !defined(HAVE_READLINE) +#if !HAVE_READLINE # define add_history(X) # define read_history(X) # define write_history(X) @@ -432,7 +431,7 @@ static char *one_input_line(FILE *in, char *zPrior, int isContinuation){ zResult = local_getline(zPrior, in); }else{ zPrompt = isContinuation ? continuePrompt : mainPrompt; -#if defined(HAVE_READLINE) +#if HAVE_READLINE free(zPrior); zResult = readline(zPrompt); if( zResult && *zResult ) add_history(zResult); @@ -4489,7 +4488,7 @@ int main(int argc, char **argv){ sqlite3_snprintf(nHistory, zHistory,"%s/.sqlite_history", zHome); } } -#if defined(HAVE_READLINE) +#if HAVE_READLINE if( zHistory ) read_history(zHistory); #endif rc = process_input(&data, 0); |