]> gitweb.factorcode.org Git - factor.git/blob - extra/tokyo/alien/tcfdb/tcfdb.factor
factor: trim using lists
[factor.git] / extra / tokyo / alien / tcfdb / tcfdb.factor
1 ! Copyright (C) 2009 Bruno Deferrari
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.syntax tokyo.alien.tchdb
4 tokyo.alien.tcutil ;
5 IN: tokyo.alien.tctdb
6
7 TYPEDEF: void* TCFDB
8
9 CONSTANT: FDBFOPEN  1
10 CONSTANT: FDBFFATAL 2
11
12 CONSTANT: FDBOREADER 1
13 CONSTANT: FDBOWRITER 2
14 CONSTANT: FDBOCREAT  4
15 CONSTANT: FDBOTRUNC  8
16 CONSTANT: FDBONOLCK  16
17 CONSTANT: FDBOLCKNB  32
18 CONSTANT: FDBOTSYNC  64
19
20 CONSTANT: FDBIDMIN  -1
21 CONSTANT: FDBIDPREV -2
22 CONSTANT: FDBIDMAX  -3
23 CONSTANT: FDBIDNEXT -4
24
25 FUNCTION: c-string tcfdberrmsg ( int ecode )
26 FUNCTION: TCFDB* tcfdbnew ( )
27 FUNCTION: void tcfdbdel ( TCFDB* fdb )
28 FUNCTION: int tcfdbecode ( TCFDB* fdb )
29 FUNCTION: bool tcfdbsetmutex ( TCFDB* fdb )
30 FUNCTION: bool tcfdbtune ( TCFDB* fdb, int width, longlong limsiz )
31 FUNCTION: bool tcfdbopen ( TCFDB* fdb, c-string path, int omode )
32 FUNCTION: bool tcfdbclose ( TCFDB* fdb )
33 FUNCTION: bool tcfdbput ( TCFDB* fdb, longlong id, void* vbuf, int vsiz )
34 FUNCTION: bool tcfdbput2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz )
35 FUNCTION: bool tcfdbput3 ( TCFDB* fdb, c-string kstr, void* vstr )
36 FUNCTION: bool tcfdbputkeep ( TCFDB* fdb, longlong id, void* vbuf, int vsiz )
37 FUNCTION: bool tcfdbputkeep2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz )
38 FUNCTION: bool tcfdbputkeep3 ( TCFDB* fdb, c-string kstr, void* vstr )
39 FUNCTION: bool tcfdbputcat ( TCFDB* fdb, longlong id, void* vbuf, int vsiz )
40 FUNCTION: bool tcfdbputcat2 ( TCFDB* fdb, void* kbuf, int ksiz, void* vbuf, int vsiz )
41 FUNCTION: bool tcfdbputcat3 ( TCFDB* fdb, c-string kstr, void* vstr )
42 FUNCTION: bool tcfdbout ( TCFDB* fdb, longlong id )
43 FUNCTION: bool tcfdbout2 ( TCFDB* fdb, void* kbuf, int ksiz )
44 FUNCTION: bool tcfdbout3 ( TCFDB* fdb, c-string kstr )
45 FUNCTION: void* tcfdbget ( TCFDB* fdb, longlong id, int* sp )
46 FUNCTION: void* tcfdbget2 ( TCFDB* fdb, void* kbuf, int ksiz, int* sp )
47 FUNCTION: c-string tcfdbget3 ( TCFDB* fdb, c-string kstr )
48 FUNCTION: int tcfdbget4 ( TCFDB* fdb, longlong id, void* vbuf, int max )
49 FUNCTION: int tcfdbvsiz ( TCFDB* fdb, longlong id )
50 FUNCTION: int tcfdbvsiz2 ( TCFDB* fdb, void* kbuf, int ksiz )
51 FUNCTION: int tcfdbvsiz3 ( TCFDB* fdb, c-string kstr )
52 FUNCTION: bool tcfdbiterinit ( TCFDB* fdb )
53 FUNCTION: ulonglong tcfdbiternext ( TCFDB* fdb )
54 FUNCTION: void* tcfdbiternext2 ( TCFDB* fdb, int* sp )
55 FUNCTION: c-string tcfdbiternext3 ( TCFDB* fdb )
56 FUNCTION: ulonglong* tcfdbrange ( TCFDB* fdb, longlong lower, longlong upper, int max, int* np )
57 FUNCTION: TCLIST* tcfdbrange2 ( TCFDB* fdb, void* lbuf, int lsiz, void* ubuf, int usiz, int max )
58 FUNCTION: TCLIST* tcfdbrange3 ( TCFDB* fdb, c-string lstr, c-string ustr, int max )
59 FUNCTION: TCLIST* tcfdbrange4 ( TCFDB* fdb, void* ibuf, int isiz, int max )
60 FUNCTION: TCLIST* tcfdbrange5 ( TCFDB* fdb, void* istr, int max )
61 FUNCTION: int tcfdbaddint ( TCFDB* fdb, longlong id, int num )
62 FUNCTION: double tcfdbadddouble ( TCFDB* fdb, longlong id, double num )
63 FUNCTION: bool tcfdbsync ( TCFDB* fdb )
64 FUNCTION: bool tcfdboptimize ( TCFDB* fdb, int width, longlong limsiz )
65 FUNCTION: bool tcfdbvanish ( TCFDB* fdb )
66 FUNCTION: bool tcfdbcopy ( TCFDB* fdb, c-string path )
67 FUNCTION: bool tcfdbtranbegin ( TCFDB* fdb )
68 FUNCTION: bool tcfdbtrancommit ( TCFDB* fdb )
69 FUNCTION: bool tcfdbtranabort ( TCFDB* fdb )
70 FUNCTION: c-string tcfdbpath ( TCFDB* fdb )
71 FUNCTION: ulonglong tcfdbrnum ( TCFDB* fdb )
72 FUNCTION: ulonglong tcfdbfsiz ( TCFDB* fdb )
73
74 ! --------
75
76 FUNCTION: void tcfdbsetecode ( TCFDB* fdb, int ecode, c-string filename, int line, c-string func )
77 FUNCTION: void tcfdbsetdbgfd ( TCFDB* fdb, int fd )
78 FUNCTION: int tcfdbdbgfd ( TCFDB* fdb )
79 FUNCTION: bool tcfdbhasmutex ( TCFDB* fdb )
80 FUNCTION: bool tcfdbmemsync ( TCFDB* fdb, bool phys )
81 FUNCTION: ulonglong tcfdbmin ( TCFDB* fdb )
82 FUNCTION: ulonglong tcfdbmax ( TCFDB* fdb )
83 FUNCTION: uint tcfdbwidth ( TCFDB* fdb )
84 FUNCTION: ulonglong tcfdblimsiz ( TCFDB* fdb )
85 FUNCTION: ulonglong tcfdblimid ( TCFDB* fdb )
86 FUNCTION: ulonglong tcfdbinode ( TCFDB* fdb )
87 FUNCTION: tokyo_time_t tcfdbmtime ( TCFDB* fdb )
88 FUNCTION: int tcfdbomode ( TCFDB* fdb )
89 FUNCTION: uchar tcfdbtype ( TCFDB* fdb )
90 FUNCTION: uchar tcfdbflags ( TCFDB* fdb )
91 FUNCTION: c-string tcfdbopaque ( TCFDB* fdb )
92 FUNCTION: bool tcfdbputproc ( TCFDB* fdb, longlong id, void* vbuf, int vsiz, TCPDPROC proc, void* op )
93 FUNCTION: bool tcfdbforeach ( TCFDB* fdb, TCITER iter, void* op )
94 FUNCTION: longlong tcfdbkeytoid ( c-string kbuf, int ksiz )