aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2005-01-23 23:43:21 +0000
committerdanielk1977 <danielk1977@noemail.net>2005-01-23 23:43:21 +0000
commit4af00c6ceefd63ac29544c2c855234e3e00f0adb (patch)
tree858e007a842277aa5a0e4385e8e1a7e5f077fe30 /src
parent940fac9dc58c3c219b0cab296734f7b01aa9ac38 (diff)
downloadsqlite-4af00c6ceefd63ac29544c2c855234e3e00f0adb.tar.gz
sqlite-4af00c6ceefd63ac29544c2c855234e3e00f0adb.zip
Modification to shell.c to avoid a compiler warning on some compilers. (CVS 2268)
FossilOrigin-Name: 0778383b6f9e6f58202ca20e74b399f8dce90ec4
Diffstat (limited to 'src')
-rw-r--r--src/shell.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c
index ae0f90b72..99cb62216 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -12,7 +12,7 @@
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
-** $Id: shell.c,v 1.119 2005/01/13 11:10:25 danielk1977 Exp $
+** $Id: shell.c,v 1.120 2005/01/23 23:43:22 danielk1977 Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -196,7 +196,9 @@ static char *one_input_line(const char *zPrior, FILE *in){
zPrompt = mainPrompt;
}
zResult = readline(zPrompt);
+#if defined(HAVE_READLINE) && HAVE_READLINE==1
if( zResult ) add_history(zResult);
+#endif
return zResult;
}
@@ -360,6 +362,7 @@ static void output_csv(struct callback_data *p, const char *z, int bSep){
}
}
+#ifdef SIGINT
/*
** This routine runs when the user presses Ctrl-C
*/
@@ -367,6 +370,7 @@ static void interrupt_handler(int NotUsed){
seenInterrupt = 1;
if( db ) sqlite3_interrupt(db);
}
+#endif
/*
** This is the callback routine that the SQLite library
@@ -1775,7 +1779,9 @@ int main(int argc, char **argv){
if( zHome && (zHistory = malloc(strlen(zHome)+20))!=0 ){
sprintf(zHistory,"%s/.sqlite_history", zHome);
}
+#if defined(HAVE_READLINE) && HAVE_READLINE==1
if( zHistory ) read_history(zHistory);
+#endif
process_input(&data, 0);
if( zHistory ){
stifle_history(100);