SQLite

Check-in [783fa887]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove an artifical limitation on the length of columns in the "box" output mode of the command-line shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 783fa887c9ed1a7d72c310df1dd9de91c016061b05fdeec87fbb2a7eb0b952ea
User & Date: drh 2020-09-06 17:40:38
Context
2020-09-07
11:14
Fix another (harmless in practice) tsan error in shared-cache mode. (check-in: 5a74fa3f user: dan tags: trunk)
2020-09-06
17:40
Remove an artifical limitation on the length of columns in the "box" output mode of the command-line shell. (check-in: 783fa887 user: drh tags: trunk)
2020-09-05
06:21
Fix a bug in Lemon that might cause it to crash if there is a multi-terminal token with a space following the "|" separator. This does not affect SQLite. (check-in: 430c5d1d user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
** in bytes.  This is different from the %*.*s specification in printf
** since with %*.*s the width is measured in bytes, not characters.
*/
static void utf8_width_print(FILE *pOut, int w, const char *zUtf){
  int i;
  int n;
  int aw = w<0 ? -w : w;
  char zBuf[1000];
  if( aw>(int)sizeof(zBuf)/3 ) aw = (int)sizeof(zBuf)/3;
  for(i=n=0; zUtf[i]; i++){
    if( (zUtf[i]&0xc0)!=0x80 ){
      n++;
      if( n==aw ){
        do{ i++; }while( (zUtf[i]&0xc0)==0x80 );
        break;
      }







<
<







549
550
551
552
553
554
555


556
557
558
559
560
561
562
** in bytes.  This is different from the %*.*s specification in printf
** since with %*.*s the width is measured in bytes, not characters.
*/
static void utf8_width_print(FILE *pOut, int w, const char *zUtf){
  int i;
  int n;
  int aw = w<0 ? -w : w;


  for(i=n=0; zUtf[i]; i++){
    if( (zUtf[i]&0xc0)!=0x80 ){
      n++;
      if( n==aw ){
        do{ i++; }while( (zUtf[i]&0xc0)==0x80 );
        break;
      }