aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/shell.c b/src/shell.c
index cca11a019..08ba508df 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.93 2004/03/17 23:42:13 drh Exp $
+** $Id: shell.c,v 1.94 2004/05/08 08:23:32 danielk1977 Exp $
*/
#include <stdlib.h>
#include <string.h>
@@ -80,7 +80,7 @@ static char continuePrompt[20]; /* Continuation prompt. default: " ...> " */
/*
** Determines if a string is a number of not.
*/
-extern int sqliteIsNumber(const char*);
+extern int sqlite3IsNumber(const char*);
/*
** This routine reads a line of text from standard input, stores
@@ -392,7 +392,7 @@ static int callback(void *pArg, int nArg, char **azArg, char **azCol){
char *zSep = i>0 ? ",": "";
if( azArg[i]==0 ){
fprintf(p->out,"%sNULL",zSep);
- }else if( sqliteIsNumber(azArg[i]) ){
+ }else if( sqlite3IsNumber(azArg[i]) ){
fprintf(p->out,"%s%s",zSep, azArg[i]);
}else{
if( zSep[0] ) fprintf(p->out,"%s",zSep);
@@ -812,8 +812,8 @@ static int do_meta_command(char *zLine, struct callback_data *p){
data.showHeader = 0;
data.mode = MODE_Semi;
if( nArg>1 ){
- extern int sqliteStrICmp(const char*,const char*);
- if( sqliteStrICmp(azArg[1],"sqlite_master")==0 ){
+ extern int sqlite3StrICmp(const char*,const char*);
+ if( sqlite3StrICmp(azArg[1],"sqlite_master")==0 ){
char *new_argv[2], *new_colv[2];
new_argv[0] = "CREATE TABLE sqlite_master (\n"
" type text,\n"
@@ -826,7 +826,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){
new_colv[0] = "sql";
new_colv[1] = 0;
callback(&data, 1, new_argv, new_colv);
- }else if( sqliteStrICmp(azArg[1],"sqlite_temp_master")==0 ){
+ }else if( sqlite3StrICmp(azArg[1],"sqlite_temp_master")==0 ){
char *new_argv[2], *new_colv[2];
new_argv[0] = "CREATE TEMP TABLE sqlite_temp_master (\n"
" type text,\n"
@@ -997,10 +997,10 @@ static int _all_whitespace(const char *z){
** as is the Oracle "/".
*/
static int _is_command_terminator(const char *zLine){
- extern int sqliteStrNICmp(const char*,const char*,int);
+ extern int sqlite3StrNICmp(const char*,const char*,int);
while( isspace(*zLine) ){ zLine++; };
if( zLine[0]=='/' && _all_whitespace(&zLine[1]) ) return 1; /* Oracle */
- if( sqliteStrNICmp(zLine,"go",2)==0 && _all_whitespace(&zLine[2]) ){
+ if( sqlite3StrNICmp(zLine,"go",2)==0 && _all_whitespace(&zLine[2]) ){
return 1; /* SQL Server */
}
return 0;
@@ -1210,7 +1210,7 @@ int main(int argc, char **argv){
const char *zInitFile = 0;
char *zFirstCmd = 0;
int i;
- extern int sqliteOsFileExists(const char*);
+ extern int sqlite3OsFileExists(const char*);
#ifdef __MACOS__
argc = ccommand(&argv);
@@ -1257,7 +1257,7 @@ int main(int argc, char **argv){
** files from being created if a user mistypes the database name argument
** to the sqlite command-line tool.
*/
- if( sqliteOsFileExists(data.zDbFilename) ){
+ if( sqlite3OsFileExists(data.zDbFilename) ){
open_db(&data);
}
@@ -1352,3 +1352,6 @@ int main(int argc, char **argv){
if( db ) sqlite_close(db);
return 0;
}
+
+
+