/[Search-TokyoDystopia]/lib/Search/TokyoDystopia.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/Search/TokyoDystopia.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (show annotations)
Mon Aug 18 18:32:55 2008 UTC (15 years, 7 months ago) by dpavlin
File size: 2301 byte(s)
tcidbiterinit
1 package Search::TokyoDystopia;
2
3 use strict;
4 use warnings;
5
6 require Exporter;
7 require XSLoader;
8 use base qw(Exporter);
9 our $VERSION = '0.00';
10 our $debug = 0;
11 XSLoader::load('Search::TokyoDystopia', $VERSION);
12
13 our @EXPORT = qw(
14 tcidberrmsg
15 tcidbnew
16 tcidbdel
17 tcidbnew
18 tcidbecode
19 tcidbtune
20 IDBTLARGE
21 IDBTDEFLATE
22 IDBTTCBS
23 tcidbsetcache
24 tcidbsetfwmmax
25 tcidbopen
26 IDBOREADER
27 IDBOWRITER
28 IDBOCREAT
29 IDBOTRUNC
30 IDBONOLCK
31 IDBOLCKNB
32 tcidbclose
33 tcidbput
34 tcidbout
35 tcidbget
36 tcidbsearch
37 IDBSSUBSTR
38 IDBSPREFIX
39 IDBSSUFFIX
40 IDBSFULL
41 IDBSTOKEN
42 IDBSTOKPRE
43 IDBSTOKSUF
44 tcidbiterinit
45 );
46
47 =head1 NAME
48
49 Search::TokyoDystopia - XS bindings for Tokyo Dystopia
50
51 =head1 EXPORTS
52
53 If you don't prevent it, it will export all kind of stuff into your namespace to cut down on typing.
54
55 =head2 tcidberrmsg
56
57 my $message = tcidberrmsg( $ecode );
58
59 =head2 tcidbnew
60
61 my $idb = tcidbnew;
62
63 =head2 tcidbdel
64
65 tcidbdel( $idb );
66
67 =head2 tcidbecode
68
69 my $ecode = tcidbecode( $idb );
70
71 =head2 tcidbtune
72
73 my $success = tcidbtune( $idb, $ernum, $etnum, $iusiz, IDBTLARGE | IDBTDEFLATE );
74
75 =cut
76
77 use constant {
78 IDBTLARGE => 1 << 0,
79 IDBTDEFLATE => 1 << 1,
80 IDBTTCBS => 1 << 2,
81 };
82
83 =head2 tcidbsetcache
84
85 my $success = tcidbsetcache( $idb, $icsiz, $lcnum );
86
87 =head2 tcidbsetfwmmax
88
89 my $success = tcidbsetfwmmax( $idb, $fwnum );
90
91 =head2 tcidbopen
92
93 my $success = tcidbopen( $idb, 'casket', IDBOWRITER | IDBOCREAT );
94
95 =cut
96
97 use constant {
98 IDBOREADER => 1 << 0,
99 IDBOWRITER => 1 << 1,
100 IDBOCREAT => 1 << 2,
101 IDBOTRUNC => 1 << 3,
102 IDBONOLCK => 1 << 4,
103 IDBOLCKNB => 1 << 5,
104 };
105
106 =head2 tcidbclose
107
108 my $success = tcidbclose( $idb );
109
110 =head2 tcidbput
111
112 my $success = tcidbput( $idb, $id, $text );
113
114 =head2 tcidbout
115
116 my $success = tcidbout( $idb, $id );
117
118 =head2 tcidbget
119
120 my $text = tcidbget( $idb, $id );
121
122 =head2 tcidbsearch
123
124 my @ids = tcidbsearch( $idb, $word, IDBSSUBSTR )
125
126 =cut
127
128 use constant {
129 IDBSSUBSTR => 0, # substring matching
130 IDBSPREFIX => 1, # prefix matching
131 IDBSSUFFIX => 2, # suffix matching
132 IDBSFULL => 3, # full matching
133 IDBSTOKEN => 4, # token matching
134 IDBSTOKPRE => 5, # token prefix matching
135 IDBSTOKSUF => 6, # token suffix matching
136 };
137
138 =head2 tcidbiterinit
139
140 my $success = tcidbiterinit;
141
142 =cut
143
144 =head1 KNOWN BUGS
145
146 Low-level functions often just die when called on invalid (or deleted) database
147
148 =cut
149
150 1;

  ViewVC Help
Powered by ViewVC 1.1.26