/ Check-in [f2310f36]
Login
Overview
Comment:Fix a bug in the quoting of .dump output. By Rajit Singh. (CVS 394)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f2310f36d53e9176be7af620ecdf1e5a1dfd4388
User & Date: drh 2002-02-26 23:24:27
Context
2002-02-26
23:55
Comment changes only. (CVS 395) check-in: 63b87f2e user: drh tags: trunk
23:24
Fix a bug in the quoting of .dump output. By Rajit Singh. (CVS 394) check-in: f2310f36 user: drh tags: trunk
2002-02-24
17:12
Added a "stddev()" aggregate function for testing the new user aggregate function interface. (CVS 393) check-in: 21981097 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
193
194
195
196
197
198
199
200
201
202
203

204
205
206
207
208
209
210
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.45 2002/02/21 02:25:03 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#if !defined(_WIN32) && !defined(WIN32)
................................................................................
      if( i==0 ){
        fprintf(out,"''");
        z++;
      }else if( z[i]=='\'' ){
        fprintf(out,"%.*s''",i,z);
        z += i+1;
      }else{
        fprintf(out,"%s'",z);
        break;
      }
    }

  }
}

/*
** Output the given string with characters that are special to
** HTML escaped.
*/







|







 







|



>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.46 2002/02/26 23:24:27 drh Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#if !defined(_WIN32) && !defined(WIN32)
................................................................................
      if( i==0 ){
        fprintf(out,"''");
        z++;
      }else if( z[i]=='\'' ){
        fprintf(out,"%.*s''",i,z);
        z += i+1;
      }else{
        fprintf(out,"%s",z);
        break;
      }
    }
    fprintf(out,"'");
  }
}

/*
** Output the given string with characters that are special to
** HTML escaped.
*/