1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Fix the command-line shell so that the ".schema --indent" command does a better

job of dealing with \r\n in the middle of a CREATE statement in the schema.

FossilOrigin-Name: 4258fb578a6e75590c7314fe511ca8dc6659e5f2d3a54d8f60ff705fe51ccc92
This commit is contained in:
drh
2017-10-05 19:12:10 +00:00
parent 5aa1e7cd30
commit c3cbd678a1
4 changed files with 10 additions and 8 deletions

View File

@@ -2773,6 +2773,7 @@ static int shell_callback(
for(i=0; IsSpace(z[i]); i++){}
for(; (c = z[i])!=0; i++){
if( IsSpace(c) ){
if( z[j-1]=='\r' ) z[j-1] = '\n';
if( IsSpace(z[j-1]) || z[j-1]=='(' ) continue;
}else if( (c=='(' || c==')') && j>0 && IsSpace(z[j-1]) ){
j--;