1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Remove some unused macros and types from fts3.c.

FossilOrigin-Name: 83a80efe8a6c3d53a7f80b4c5f4e0f40aa0aa52f
This commit is contained in:
dan
2009-12-10 18:38:54 +00:00
parent 0502e56415
commit dcf3cc1f91
3 changed files with 7 additions and 71 deletions

View File

@ -292,70 +292,6 @@
SQLITE_EXTENSION_INIT1
#endif
/* TODO(shess) MAN, this thing needs some refactoring. At minimum, it
** would be nice to order the file better, perhaps something along the
** lines of:
**
** - utility functions
** - table setup functions
** - table update functions
** - table query functions
**
** Put the query functions last because they're likely to reference
** typedefs or functions from the table update section.
*/
#if 0
# define FTSTRACE(A) printf A; fflush(stdout)
#else
# define FTSTRACE(A)
#endif
typedef enum DocListType {
DL_DOCIDS, /* docids only */
DL_POSITIONS, /* docids + positions */
DL_POSITIONS_OFFSETS /* docids + positions + offsets */
} DocListType;
/*
** By default, only positions and not offsets are stored in the doclists.
** To change this so that offsets are stored too, compile with
**
** -DDL_DEFAULT=DL_POSITIONS_OFFSETS
**
** If DL_DEFAULT is set to DL_DOCIDS, your table can only be inserted
** into (no deletes or updates).
*/
#ifndef DL_DEFAULT
# define DL_DEFAULT DL_POSITIONS
#endif
enum {
POS_END = 0, /* end of this position list */
POS_COLUMN, /* followed by new column number */
POS_BASE
};
/* utility functions */
/* CLEAR() and SCRAMBLE() abstract memset() on a pointer to a single
** record to prevent errors of the form:
**
** my_function(SomeType *b){
** memset(b, '\0', sizeof(b)); // sizeof(b)!=sizeof(*b)
** }
*/
/* TODO(shess) Obvious candidates for a header file. */
#define CLEAR(b) memset(b, '\0', sizeof(*(b)))
#ifndef NDEBUG
# define SCRAMBLE(b) memset(b, 0x55, sizeof(*(b)))
#else
# define SCRAMBLE(b)
#endif
/*
** Write a 64-bit variable-length integer to memory starting at p[0].
** The length of data written will be between 1 and FTS3_VARINT_MAX bytes.