From 36d4e97e94fca4d345cdb1ce663a405b1b4a06c9 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 6 Oct 2004 14:39:06 +0000 Subject: [PATCH] Fix the ".import" command of the command-line shell so that it ignores \n and \r at the end of a line. Ticket #939. (CVS 2003) FossilOrigin-Name: dcbf4817a7a3ce18a2d5ed008346933a36acd543 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/shell.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index 601e3aaca7..dd2731d87f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Rearrange\smemory\sallocation\sin\ssqlite3VdbeMakeReady\sto\stry\sto\swork\saround\nsome\sbyte-alignment\sproblems\son\sSparc.\s(CVS\s2002) -D 2004-10-05T17:37:36 +C Fix\sthe\s".import"\scommand\sof\sthe\scommand-line\sshell\sso\sthat\sit\signores\n\\n\sand\s\\r\sat\sthe\send\sof\sa\sline.\s\sTicket\s#939.\s(CVS\s2003) +D 2004-10-06T14:39:07 F Makefile.in 78ddc9fca09ab6e3b75a79ecf8d490e34cd0519c F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -59,7 +59,7 @@ F src/pragma.c 4a071a1908aa7fb5930a9d73fd300a6aa2ac07e1 F src/printf.c 40770e1f553612d13dfc86d236086e69baa62fe1 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/select.c 96b1489111abe9b584be2f2cce26ad6f2d425b4e -F src/shell.c 0856973c2b94e22664bc43f398ba3fc22d5e080c +F src/shell.c bfd23e7293f468587c94f8375dfa969ce5dcd253 F src/sqlite.h.in 9bb76ff9e79ee72e6d529ff6ab1c252d513c3864 F src/sqliteInt.h 610f25a92c0ce5edf40d12087c643c310e1d7d05 F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9 @@ -250,7 +250,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P 0415af325739fd4e0bd4761c889719355a1ec4ff -R e89157b4e00ba8f0209c420ebd34655f +P f623d6e74fb5f6f70a22c06278b2bb1b4b7f9b85 +R 50bde6f04c39893f91c23c1114101ce8 U drh -Z 2e9077980f61e3df7d6059849a32a371 +Z 9d4f078082e7ca6946a15a06c5a6ac0b diff --git a/manifest.uuid b/manifest.uuid index e649f6a17d..47c4e953f3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f623d6e74fb5f6f70a22c06278b2bb1b4b7f9b85 \ No newline at end of file +dcbf4817a7a3ce18a2d5ed008346933a36acd543 \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index b4d0d5b3e4..0f2ae6251f 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.114 2004/09/24 12:50:03 drh Exp $ +** $Id: shell.c,v 1.115 2004/10/06 14:39:07 drh Exp $ */ #include #include @@ -1039,7 +1039,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ i = 0; lineno++; azCol[0] = zLine; - for(i=0, z=zLine; *z; z++){ + for(i=0, z=zLine; *z && *z!='\n' && *z!='\r'; z++){ if( *z==p->separator[0] && strncmp(z, p->separator, nSep)==0 ){ *z = 0; i++; -- 2.47.3