mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Get SQLite to build
* changed headers * removed redundant declarations * ran clang-format * added sqlite3.mk
This commit is contained in:
parent
644f290035
commit
919b6fec10
156 changed files with 2847 additions and 6772 deletions
28
third_party/sqlite3/fts3.c
vendored
28
third_party/sqlite3/fts3.c
vendored
|
@ -61,7 +61,7 @@
|
|||
** A doclist (document list) holds a docid-sorted list of hits for a
|
||||
** given term. Doclists hold docids and associated token positions.
|
||||
** A docid is the unique integer identifier for a single document.
|
||||
** A position is the index of a word within the document. The first
|
||||
** A position is the index of a word within the document. The first
|
||||
** word of the document has a position of 0.
|
||||
**
|
||||
** FTS3 used to optionally store character offsets using a compile-time
|
||||
|
@ -86,7 +86,7 @@
|
|||
**
|
||||
** Here, array { X } means zero or more occurrences of X, adjacent in
|
||||
** memory. A "position" is an index of a token in the token stream
|
||||
** generated by the tokenizer. Note that POS_END and POS_COLUMN occur
|
||||
** generated by the tokenizer. Note that POS_END and POS_COLUMN occur
|
||||
** in the same logical place as the position element, and act as sentinals
|
||||
** ending a position list array. POS_END is 0. POS_COLUMN is 1.
|
||||
** The positions numbers are not stored literally but rather as two more
|
||||
|
@ -110,7 +110,7 @@
|
|||
** a document record consists of a docid followed by a position-list and
|
||||
** a doclist consists of one or more document records.
|
||||
**
|
||||
** A bare doclist omits the position information, becoming an
|
||||
** A bare doclist omits the position information, becoming an
|
||||
** array of varint-encoded docids.
|
||||
**
|
||||
**** Segment leaf nodes ****
|
||||
|
@ -287,25 +287,23 @@
|
|||
** query logic likewise merges doclists so that newer data knocks out
|
||||
** older data.
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
#include "fts3Int.h"
|
||||
#include "third_party/sqlite3/fts3Int.h"
|
||||
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
|
||||
|
||||
#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
|
||||
# define SQLITE_CORE 1
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "fts3.h"
|
||||
#ifndef SQLITE_CORE
|
||||
# include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include "libc/assert.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/sqlite3/fts3.h"
|
||||
#ifndef SQLITE_CORE
|
||||
#include "third_party/sqlite3/sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#endif
|
||||
|
||||
static int fts3EvalNext(Fts3Cursor *pCsr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue