From: drh Date: Thu, 9 Sep 2004 14:01:21 +0000 (+0000) Subject: Fix lemon so that inserted code always ends in a newline. Ticket #895. (CVS 1955) X-Git-Tag: version-3.6.10~4192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9db55dfb98af875b2d0a2dd3570e21a4803641c2;p=thirdparty%2Fsqlite.git Fix lemon so that inserted code always ends in a newline. Ticket #895. (CVS 1955) FossilOrigin-Name: 13fba17e3f75c08142db6acc8884a78ac0bcdfd6 --- diff --git a/manifest b/manifest index 9a284c5124..deea83bc8a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\ssegfault\sin\sthe\sauthorizer\swhen\sit\sis\sgiven\sa\sSELECT\sstatement\swith\nno\sFROM\sclause.\s\sTicket\s#896.\s(CVS\s1954) -D 2004-09-09T13:55:50 +C Fix\slemon\sso\sthat\sinserted\scode\salways\sends\sin\sa\snewline.\s\sTicket\s#895.\s(CVS\s1955) +D 2004-09-09T14:01:21 F Makefile.in 7f481bb8cdb032491df611526e6f4eb6af79691d F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -193,7 +193,7 @@ F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102 F test/view.test ca5c296989d3045f121be9a67588ff88c64874a8 F test/where.test 40dcffcb77ad0a00960cef2b5b1212c77fd02199 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b -F tool/lemon.c b64210ca04268681a74b32a830c64be523ccc859 +F tool/lemon.c f11acad4ccada6ffb30da3169a3f65a073371afe F tool/lempar.c 0b5e7a58634e0d448929b8e85f7981c2aa708d57 F tool/memleak.awk b744b6109566206c746d826f6ecdba34662216bc F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8 @@ -248,7 +248,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4 -P b12fc46dcd5aa901fc781a17d49f8f110fed5b8d -R 4e362028b1b398fb77b07e3b80575dd1 +P 97d63b9290ef88b3cd8012c71fdd5b3c74eebc8f +R bb12d257317660cd4957fb8523cdbaf5 U drh -Z ddb1e86004c5f01cb0335ceb4c0dafa3 +Z 4a8b506cdcdd708f7136563b17330d6b diff --git a/manifest.uuid b/manifest.uuid index 7a9675298e..500c056007 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -97d63b9290ef88b3cd8012c71fdd5b3c74eebc8f \ No newline at end of file +13fba17e3f75c08142db6acc8884a78ac0bcdfd6 \ No newline at end of file diff --git a/tool/lemon.c b/tool/lemon.c index 97f3dc8ef6..3ed6bd6a0c 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -2954,6 +2954,10 @@ int *lineno; putc(*str,out); str++; } + if( str[-1]!='\n' ){ + putc('\n',out); + (*lineno)++; + } tplt_linedir(out,*lineno+2,lemp->outname); (*lineno)+=2; return;