mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Modification to shell.c to avoid a compiler warning on some compilers. (CVS 2268)
FossilOrigin-Name: 0778383b6f9e6f58202ca20e74b399f8dce90ec4
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user