/ Check-in [2b3fed09]
Login

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

Overview
Comment:Update MSVC makefile for the fts3tokenize virtual table. Clear some harmless compiler warnings in the fts3tokenize code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2b3fed09eb89f1e9d6a5f7487ef526b46eb51490
User & Date: drh 2013-04-22 17:07:56
Original Comment: Update MSCV makefile for the fts3tokenize virtual table. Clear some harmless compiler warnings in the fts3tokenize code.
Context
2013-04-22
19:56
Do not allow a virtual table to cancel the ORDER BY clause unless all outer loops are guaranteed to return no more than one row result. Candidate fix for ticket [ba82a4a41eac1]. check-in: 49cfa14f user: drh tags: trunk
17:07
Update MSVC makefile for the fts3tokenize virtual table. Clear some harmless compiler warnings in the fts3tokenize code. check-in: 2b3fed09 user: drh tags: trunk
15:30
Add virtual table module 'fts3tokenize' to fts3. fts3tokenize provides SQL access to FTS tokenizer implementations. check-in: c5a4b21a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

   474    474   #
   475    475   LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \
   476    476            backup.lo bitvec.lo btmutex.lo btree.lo build.lo \
   477    477            callback.lo complete.lo ctime.lo date.lo delete.lo \
   478    478            expr.lo fault.lo fkey.lo \
   479    479            fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \
   480    480            fts3_porter.lo fts3_snippet.lo fts3_tokenizer.lo fts3_tokenizer1.lo \
   481         -         fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
          481  +         fts3_tokenize_vtab.lo fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \
   482    482            func.lo global.lo hash.lo \
   483    483            icu.lo insert.lo journal.lo legacy.lo loadext.lo \
   484    484            main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \
   485    485            memjournal.lo \
   486    486            mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \
   487    487            notify.lo opcodes.lo os.lo os_unix.lo os_win.lo \
   488    488            pager.lo parse.lo pcache.lo pcache1.lo pragma.lo prepare.lo printf.lo \
................................................................................
   634    634     $(TOP)\ext\fts3\fts3_hash.h \
   635    635     $(TOP)\ext\fts3\fts3_icu.c \
   636    636     $(TOP)\ext\fts3\fts3_porter.c \
   637    637     $(TOP)\ext\fts3\fts3_snippet.c \
   638    638     $(TOP)\ext\fts3\fts3_tokenizer.h \
   639    639     $(TOP)\ext\fts3\fts3_tokenizer.c \
   640    640     $(TOP)\ext\fts3\fts3_tokenizer1.c \
          641  +  $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
   641    642     $(TOP)\ext\fts3\fts3_unicode.c \
   642    643     $(TOP)\ext\fts3\fts3_unicode2.c \
   643    644     $(TOP)\ext\fts3\fts3_write.c
   644    645   SRC = $(SRC) \
   645    646     $(TOP)\ext\icu\sqliteicu.h \
   646    647     $(TOP)\ext\icu\icu.c
   647    648   SRC = $(SRC) \
................................................................................
   744    745     $(TOP)\src\vdbetrace.c \
   745    746     $(TOP)\src\where.c \
   746    747     parse.c \
   747    748     $(TOP)\ext\fts3\fts3.c \
   748    749     $(TOP)\ext\fts3\fts3_aux.c \
   749    750     $(TOP)\ext\fts3\fts3_expr.c \
   750    751     $(TOP)\ext\fts3\fts3_tokenizer.c \
          752  +  $(TOP)\ext\fts3\fts3_tokenize_vtab.c \
   751    753     $(TOP)\ext\fts3\fts3_unicode.c \
   752    754     $(TOP)\ext\fts3\fts3_unicode2.c \
   753    755     $(TOP)\ext\fts3\fts3_write.c \
   754    756     $(TOP)\ext\async\sqlite3async.c
   755    757   
   756    758   # Header files used by all library source files.
   757    759   #
................................................................................
  1171   1173   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_porter.c
  1172   1174   
  1173   1175   fts3_tokenizer.lo:	$(TOP)\ext\fts3\fts3_tokenizer.c $(HDR) $(EXTHDR)
  1174   1176   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer.c
  1175   1177   
  1176   1178   fts3_tokenizer1.lo:	$(TOP)\ext\fts3\fts3_tokenizer1.c $(HDR) $(EXTHDR)
  1177   1179   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenizer1.c
         1180  +
         1181  +fts3_tokenize_vtab.lo:	$(TOP)\ext\fts3\fts3_tokenize_vtab.c $(HDR) $(EXTHDR)
         1182  +	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_tokenize_vtab.c
  1178   1183   
  1179   1184   fts3_unicode.lo:	$(TOP)\ext\fts3\fts3_unicode.c $(HDR) $(EXTHDR)
  1180   1185   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode.c
  1181   1186   
  1182   1187   fts3_unicode2.lo:	$(TOP)\ext\fts3\fts3_unicode2.c $(HDR) $(EXTHDR)
  1183   1188   	$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)\ext\fts3\fts3_unicode2.c
  1184   1189   

Changes to ext/fts3/fts3Int.h.

   545    545       Fts3Table*, Fts3MultiSegReader*, int, const char*, int);
   546    546   int sqlite3Fts3MsrIncrNext(
   547    547       Fts3Table *, Fts3MultiSegReader *, sqlite3_int64 *, char **, int *);
   548    548   int sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iCol, char **); 
   549    549   int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);
   550    550   int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
   551    551   
          552  +/* fts3_tokenize_vtab.c */
          553  +int sqlite3Fts3InitTok(sqlite3*);
          554  +
   552    555   /* fts3_unicode2.c (functions generated by parsing unicode text files) */
   553    556   #ifdef SQLITE_ENABLE_FTS4_UNICODE61
   554    557   int sqlite3FtsUnicodeFold(int, int);
   555    558   int sqlite3FtsUnicodeIsalnum(int);
   556    559   int sqlite3FtsUnicodeIsdiacritic(int);
   557    560   #endif
   558    561   
   559    562   #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
   560    563   #endif /* _FTSINT_H */

Changes to ext/fts3/fts3_tokenize_vtab.c.

    88     88     if( rc!=SQLITE_OK ){
    89     89       return rc;
    90     90     }
    91     91   
    92     92     sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
    93     93     if( SQLITE_ROW==sqlite3_step(pStmt) ){
    94     94       if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
    95         -      memcpy(pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
           95  +      memcpy((void*)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
    96     96       }
    97     97     }
    98     98   
    99     99     return sqlite3_finalize(pStmt);
   100    100   }
   101    101   
   102    102   /*
................................................................................
   121    121       *pazDequote = 0;
   122    122     }else{
   123    123       int i;
   124    124       int nByte;
   125    125       char **azDequote;
   126    126   
   127    127       for(i=0; i<argc; i++){
   128         -      nByte += (strlen(argv[i]) + 1);
          128  +      nByte += (int)(strlen(argv[i]) + 1);
   129    129       }
   130    130   
   131    131       *pazDequote = azDequote = sqlite3_malloc(sizeof(char *)*argc + nByte);
   132    132       if( azDequote==0 ){
   133    133         rc = SQLITE_NOMEM;
   134    134       }else{
   135    135         char *pSpace = (char *)&azDequote[argc];
   136    136         for(i=0; i<argc; i++){
   137         -        int n = strlen(argv[i]);
          137  +        int n = (int)strlen(argv[i]);
   138    138           azDequote[i] = pSpace;
   139    139           memcpy(pSpace, argv[i], n+1);
   140    140           sqlite3Fts3Dequote(pSpace);
   141    141           pSpace += (n+1);
   142    142         }
   143    143       }
   144    144     }