Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix harmless compiler warnings in the fts3view utility program that can occur with MSVC. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1cec1e030035e5253fb7ebbdfe5c1a30 |
User & Date: | mistachkin 2014-07-07 18:03:38.442 |
Context
2014-07-18
| ||
14:43 | Improvements to the ".fullschema" command in the command-line shell. (check-in: fa80c64caa user: drh tags: trunk) | |
2014-07-07
| ||
18:03 | Fix harmless compiler warnings in the fts3view utility program that can occur with MSVC. (check-in: 1cec1e0300 user: mistachkin tags: trunk) | |
17:57 | Add the fts3view utility program to the MSVC makefile. (check-in: b04751bd59 user: mistachkin tags: trunk) | |
Changes
Changes to ext/fts3/tool/fts3view.c.
︙ | ︙ | |||
550 551 552 553 554 555 556 | ){ sqlite3_int64 iChild; sqlite3_int64 iPrefix; sqlite3_int64 nTerm; sqlite3_int64 n; sqlite3_int64 iDocsz; int iHeight; | | | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | ){ sqlite3_int64 iChild; sqlite3_int64 iPrefix; sqlite3_int64 nTerm; sqlite3_int64 n; sqlite3_int64 iDocsz; int iHeight; sqlite3_int64 i = 0; int cnt = 0; char zTerm[1000]; i += getVarint(aData, &n); iHeight = (int)n; printf("height: %d\n", iHeight); if( iHeight>0 ){ |
︙ | ︙ | |||
572 573 574 575 576 577 578 | iPrefix = 0; } i += getVarint(aData+i, &nTerm); if( iPrefix+nTerm+1 >= sizeof(zTerm) ){ fprintf(stderr, "term to long\n"); exit(1); } | | | | 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | iPrefix = 0; } i += getVarint(aData+i, &nTerm); if( iPrefix+nTerm+1 >= sizeof(zTerm) ){ fprintf(stderr, "term to long\n"); exit(1); } memcpy(zTerm+iPrefix, aData+i, (size_t)nTerm); zTerm[iPrefix+nTerm] = 0; i += nTerm; if( iHeight==0 ){ i += getVarint(aData+i, &iDocsz); printf("term: %-25s doclist %7lld bytes offset %lld\n", zTerm, iDocsz, i); i += iDocsz; }else{ printf("term: %-25s child %lld\n", zTerm, ++iChild); } } } |
︙ | ︙ | |||
745 746 747 748 749 750 751 | ** is azExtra[2]. ** ** If the --raw option is present in azExtra, then a hex dump is provided. ** Otherwise a decoding is shown. */ static void showDoclist(sqlite3 *db, const char *zTab){ const unsigned char *aData; | | > | | | 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | ** is azExtra[2]. ** ** If the --raw option is present in azExtra, then a hex dump is provided. ** Otherwise a decoding is shown. */ static void showDoclist(sqlite3 *db, const char *zTab){ const unsigned char *aData; sqlite3_int64 offset; int nData; sqlite3_stmt *pStmt; offset = atoi64(azExtra[1]); nData = atoi(azExtra[2]); pStmt = prepareToGetSegment(db, zTab, azExtra[0]); if( sqlite3_step(pStmt)!=SQLITE_ROW ){ sqlite3_finalize(pStmt); return; } aData = sqlite3_column_blob(pStmt, 0); printf("Doclist at %s offset %lld of size %d bytes:\n", azExtra[0], offset, nData); if( findOption("raw", 0, 0)!=0 ){ printBlob(aData+offset, nData); }else{ decodeDoclist(aData+offset, nData); } sqlite3_finalize(pStmt); |
︙ | ︙ |