ruby_odeum 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +504 -0
- data/LICENSE +504 -0
- data/README +50 -0
- data/bin/odeum_mgr +106 -0
- data/doc/rdoc/classes/Odeum.html +235 -0
- data/doc/rdoc/classes/Odeum.src/M000010.html +25 -0
- data/doc/rdoc/classes/Odeum.src/M000011.html +22 -0
- data/doc/rdoc/classes/Odeum.src/M000012.html +27 -0
- data/doc/rdoc/classes/Odeum.src/M000013.html +27 -0
- data/doc/rdoc/classes/Odeum.src/M000014.html +28 -0
- data/doc/rdoc/classes/Odeum/Document.html +382 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000040.html +25 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000041.html +22 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000042.html +23 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000043.html +23 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000044.html +24 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000045.html +32 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000046.html +22 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000047.html +22 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000048.html +22 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000049.html +22 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000050.html +24 -0
- data/doc/rdoc/classes/Odeum/Document.src/M000051.html +27 -0
- data/doc/rdoc/classes/Odeum/Index.html +662 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000015.html +46 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000016.html +33 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000017.html +35 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000018.html +23 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000019.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000020.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000021.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000022.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000023.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000024.html +29 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000025.html +23 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000026.html +24 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000027.html +23 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000028.html +26 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000029.html +24 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000030.html +20 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000031.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000032.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000033.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000034.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000035.html +20 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000036.html +20 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000037.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000038.html +22 -0
- data/doc/rdoc/classes/Odeum/Index.src/M000039.html +22 -0
- data/doc/rdoc/classes/OdeumTest.html +257 -0
- data/doc/rdoc/classes/OdeumTest.src/M000001.html +18 -0
- data/doc/rdoc/classes/OdeumTest.src/M000002.html +19 -0
- data/doc/rdoc/classes/OdeumTest.src/M000003.html +27 -0
- data/doc/rdoc/classes/OdeumTest.src/M000004.html +25 -0
- data/doc/rdoc/classes/OdeumTest.src/M000005.html +44 -0
- data/doc/rdoc/classes/OdeumTest.src/M000006.html +20 -0
- data/doc/rdoc/classes/OdeumTest.src/M000007.html +39 -0
- data/doc/rdoc/classes/OdeumTest.src/M000008.html +59 -0
- data/doc/rdoc/classes/OdeumTest.src/M000009.html +41 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +756 -0
- data/doc/rdoc/files/LICENSE.html +756 -0
- data/doc/rdoc/files/README.html +175 -0
- data/doc/rdoc/files/ext/odeum_index/odeum_index_c.html +101 -0
- data/doc/rdoc/files/test/test_odeum_rb.html +109 -0
- data/doc/rdoc/fr_class_index.html +30 -0
- data/doc/rdoc/fr_file_index.html +31 -0
- data/doc/rdoc/fr_method_index.html +77 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/odeum_index/cabin.c +2735 -0
- data/ext/odeum_index/cabin.h +1040 -0
- data/ext/odeum_index/curia.c +1114 -0
- data/ext/odeum_index/curia.h +430 -0
- data/ext/odeum_index/depot.c +1910 -0
- data/ext/odeum_index/depot.h +439 -0
- data/ext/odeum_index/extconf.rb +10 -0
- data/ext/odeum_index/myconf.c +668 -0
- data/ext/odeum_index/myconf.h +523 -0
- data/ext/odeum_index/odeum.c +1743 -0
- data/ext/odeum_index/odeum.h +541 -0
- data/ext/odeum_index/odeum_index.c +991 -0
- data/ext/odeum_index/villa.c +1923 -0
- data/ext/odeum_index/villa.h +470 -0
- data/ext/odeum_index/vista.c +159 -0
- data/ext/odeum_index/vista.h +111 -0
- data/test/test_odeum.rb +174 -0
- metadata +138 -0
@@ -0,0 +1,523 @@
|
|
1
|
+
/*************************************************************************************************
|
2
|
+
* System configurations for QDBM
|
3
|
+
* Copyright (C) 2000-2005 Mikio Hirabayashi
|
4
|
+
* This file is part of QDBM, Quick Database Manager.
|
5
|
+
* QDBM is free software; you can redistribute it and/or modify it under the terms of the GNU
|
6
|
+
* Lesser General Public License as published by the Free Software Foundation; either version
|
7
|
+
* 2.1 of the License or any later version. QDBM is distributed in the hope that it will be
|
8
|
+
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
9
|
+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
10
|
+
* details.
|
11
|
+
* You should have received a copy of the GNU Lesser General Public License along with QDBM; if
|
12
|
+
* not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
13
|
+
* 02111-1307 USA.
|
14
|
+
*************************************************************************************************/
|
15
|
+
|
16
|
+
|
17
|
+
#ifndef _MYCONF_H /* duplication check */
|
18
|
+
#define _MYCONF_H
|
19
|
+
|
20
|
+
#if defined(__cplusplus) /* export for C++ */
|
21
|
+
extern "C" {
|
22
|
+
#endif
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
/*************************************************************************************************
|
27
|
+
* system discrimination
|
28
|
+
*************************************************************************************************/
|
29
|
+
|
30
|
+
|
31
|
+
#if defined(__linux__)
|
32
|
+
|
33
|
+
#define _SYS_LINUX_
|
34
|
+
#define _QDBM_SYSNAME "Linux"
|
35
|
+
|
36
|
+
#elif defined(__FreeBSD__)
|
37
|
+
|
38
|
+
#define _SYS_FREEBSD_
|
39
|
+
#define _QDBM_SYSNAME "FreeBSD"
|
40
|
+
|
41
|
+
#elif defined(__NetBSD__)
|
42
|
+
|
43
|
+
#define _SYS_NETBSD_
|
44
|
+
#define _QDBM_SYSNAME "NetBSD"
|
45
|
+
|
46
|
+
#elif defined(__OpenBSD__)
|
47
|
+
|
48
|
+
#define _SYS_OPENBSD_
|
49
|
+
#define _QDBM_SYSNAME "OpenBSD"
|
50
|
+
|
51
|
+
#elif defined(__sun__)
|
52
|
+
|
53
|
+
#define _SYS_SUNOS_
|
54
|
+
#define _QDBM_SYSNAME "SunOS"
|
55
|
+
|
56
|
+
#elif defined(__hpux)
|
57
|
+
|
58
|
+
#define _SYS_HPUX_
|
59
|
+
#define _QDBM_SYSNAME "HP-UX"
|
60
|
+
|
61
|
+
#elif defined(__APPLE__) && defined(__MACH__)
|
62
|
+
|
63
|
+
#define _SYS_MACOSX_
|
64
|
+
#define _QDBM_SYSNAME "Mac OS X"
|
65
|
+
|
66
|
+
#elif defined(_MSC_VER)
|
67
|
+
|
68
|
+
#define _SYS_MSVC_
|
69
|
+
#define _QDBM_SYSNAME "Windows (VC++)"
|
70
|
+
|
71
|
+
#elif defined(_WIN32)
|
72
|
+
|
73
|
+
#define _SYS_MINGW_
|
74
|
+
#define _QDBM_SYSNAME "Windows (MinGW)"
|
75
|
+
|
76
|
+
#elif defined(__CYGWIN__)
|
77
|
+
|
78
|
+
#define _SYS_CYGWIN_
|
79
|
+
#define _QDBM_SYSNAME "Windows (Cygwin)"
|
80
|
+
|
81
|
+
#elif defined(__riscos__) || defined(__riscos)
|
82
|
+
|
83
|
+
#define _SYS_RISCOS_
|
84
|
+
#define _QDBM_SYSNAME "RISC OS"
|
85
|
+
|
86
|
+
#else
|
87
|
+
|
88
|
+
#define _SYS_GENERIC_
|
89
|
+
#define _QDBM_SYSNAME "Generic"
|
90
|
+
|
91
|
+
#endif
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
/*************************************************************************************************
|
96
|
+
* general headers
|
97
|
+
*************************************************************************************************/
|
98
|
+
|
99
|
+
|
100
|
+
#if defined(_SYS_MSVC_)
|
101
|
+
|
102
|
+
#include <stdio.h>
|
103
|
+
#include <stdlib.h>
|
104
|
+
#include <string.h>
|
105
|
+
#include <limits.h>
|
106
|
+
#include <time.h>
|
107
|
+
#include <assert.h>
|
108
|
+
#include <stdarg.h>
|
109
|
+
#include <errno.h>
|
110
|
+
#include <sys/types.h>
|
111
|
+
#include <sys/stat.h>
|
112
|
+
#include <fcntl.h>
|
113
|
+
#include <direct.h>
|
114
|
+
#include <windows.h>
|
115
|
+
#include <io.h>
|
116
|
+
|
117
|
+
#elif defined(_SYS_MINGW_)
|
118
|
+
|
119
|
+
#include <stdio.h>
|
120
|
+
#include <stdlib.h>
|
121
|
+
#include <string.h>
|
122
|
+
#include <limits.h>
|
123
|
+
#include <time.h>
|
124
|
+
#include <assert.h>
|
125
|
+
#include <stdarg.h>
|
126
|
+
#include <errno.h>
|
127
|
+
#include <unistd.h>
|
128
|
+
#include <sys/types.h>
|
129
|
+
#include <sys/stat.h>
|
130
|
+
#include <fcntl.h>
|
131
|
+
#include <dirent.h>
|
132
|
+
#include <windows.h>
|
133
|
+
#include <io.h>
|
134
|
+
|
135
|
+
#elif defined(_SYS_CYGWIN_)
|
136
|
+
|
137
|
+
#include <stdio.h>
|
138
|
+
#include <stdlib.h>
|
139
|
+
#include <string.h>
|
140
|
+
#include <limits.h>
|
141
|
+
#include <time.h>
|
142
|
+
#include <assert.h>
|
143
|
+
#include <stdarg.h>
|
144
|
+
#include <errno.h>
|
145
|
+
#include <unistd.h>
|
146
|
+
#include <sys/types.h>
|
147
|
+
#include <sys/stat.h>
|
148
|
+
#include <sys/mman.h>
|
149
|
+
#include <sys/times.h>
|
150
|
+
#include <fcntl.h>
|
151
|
+
#include <dirent.h>
|
152
|
+
#include <windows.h>
|
153
|
+
#include <io.h>
|
154
|
+
|
155
|
+
#else
|
156
|
+
|
157
|
+
#include <stdio.h>
|
158
|
+
#include <stdlib.h>
|
159
|
+
#include <string.h>
|
160
|
+
#include <limits.h>
|
161
|
+
#include <time.h>
|
162
|
+
#include <assert.h>
|
163
|
+
#include <stdarg.h>
|
164
|
+
#include <errno.h>
|
165
|
+
#include <unistd.h>
|
166
|
+
#include <sys/types.h>
|
167
|
+
#include <sys/stat.h>
|
168
|
+
#include <sys/mman.h>
|
169
|
+
#include <sys/times.h>
|
170
|
+
#include <fcntl.h>
|
171
|
+
#include <dirent.h>
|
172
|
+
|
173
|
+
#endif
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
/*************************************************************************************************
|
178
|
+
* notation of filesystems
|
179
|
+
*************************************************************************************************/
|
180
|
+
|
181
|
+
|
182
|
+
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_)
|
183
|
+
|
184
|
+
#define MYPATHCHR '\\'
|
185
|
+
#define MYPATHSTR "\\"
|
186
|
+
#define MYEXTCHR '.'
|
187
|
+
#define MYEXTSTR "."
|
188
|
+
#define MYCDIRSTR "."
|
189
|
+
#define MYPDIRSTR ".."
|
190
|
+
|
191
|
+
#elif defined(_SYS_RISCOS_)
|
192
|
+
|
193
|
+
#define MYPATHCHR '.'
|
194
|
+
#define MYPATHSTR "."
|
195
|
+
#define MYEXTCHR '/'
|
196
|
+
#define MYEXTSTR "/"
|
197
|
+
#define MYCDIRSTR "@"
|
198
|
+
#define MYPDIRSTR "^"
|
199
|
+
|
200
|
+
#else
|
201
|
+
|
202
|
+
#define MYPATHCHR '/'
|
203
|
+
#define MYPATHSTR "/"
|
204
|
+
#define MYEXTCHR '.'
|
205
|
+
#define MYEXTSTR "."
|
206
|
+
#define MYCDIRSTR "."
|
207
|
+
#define MYPDIRSTR ".."
|
208
|
+
|
209
|
+
#endif
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
/*************************************************************************************************
|
214
|
+
* for dosish filesystems
|
215
|
+
*************************************************************************************************/
|
216
|
+
|
217
|
+
|
218
|
+
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_) || defined(_SYS_CYGWIN_)
|
219
|
+
|
220
|
+
#undef open
|
221
|
+
|
222
|
+
#define \
|
223
|
+
open(pathname, flags, mode) \
|
224
|
+
open(pathname, flags | O_BINARY, mode)
|
225
|
+
|
226
|
+
#else
|
227
|
+
|
228
|
+
#undef O_BINARY
|
229
|
+
#undef O_TEXT
|
230
|
+
#undef setmode
|
231
|
+
|
232
|
+
#define O_BINARY 0
|
233
|
+
#define O_TEXT 1
|
234
|
+
|
235
|
+
#define \
|
236
|
+
setmode(fd, mode) \
|
237
|
+
(O_BINARY)
|
238
|
+
|
239
|
+
#endif
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
/*************************************************************************************************
|
244
|
+
* for POSIX thread
|
245
|
+
*************************************************************************************************/
|
246
|
+
|
247
|
+
|
248
|
+
#if defined(MYPTHREAD)
|
249
|
+
|
250
|
+
#define _qdbm_ptsafe TRUE
|
251
|
+
|
252
|
+
void *_qdbm_settsd(void *ptr, int size, const void *initval);
|
253
|
+
|
254
|
+
#else
|
255
|
+
|
256
|
+
#define _qdbm_ptsafe FALSE
|
257
|
+
|
258
|
+
#define \
|
259
|
+
_qdbm_settsd(ptr, size, initval) \
|
260
|
+
(NULL)
|
261
|
+
|
262
|
+
#endif
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
/*************************************************************************************************
|
267
|
+
* for systems without file locking
|
268
|
+
*************************************************************************************************/
|
269
|
+
|
270
|
+
|
271
|
+
#if defined(_SYS_RISCOS_) || defined(MYNOLOCK)
|
272
|
+
|
273
|
+
#undef fcntl
|
274
|
+
|
275
|
+
#define \
|
276
|
+
fcntl(fd, cmd, lock) \
|
277
|
+
(0)
|
278
|
+
|
279
|
+
#endif
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
/*************************************************************************************************
|
284
|
+
* for systems without mmap
|
285
|
+
*************************************************************************************************/
|
286
|
+
|
287
|
+
|
288
|
+
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_) || \
|
289
|
+
defined(_SYS_FREEBSD_) || defined(_SYS_NETBSD_) || defined(_SYS_OPENBSD_) || \
|
290
|
+
defined(_SYS_RISCOS_) || defined(MYNOMMAP)
|
291
|
+
|
292
|
+
#undef PROT_EXEC
|
293
|
+
#undef PROT_READ
|
294
|
+
#undef PROT_WRITE
|
295
|
+
#undef PROT_NONE
|
296
|
+
#undef MAP_FIXED
|
297
|
+
#undef MAP_SHARED
|
298
|
+
#undef MAP_PRIVATE
|
299
|
+
#undef MAP_FAILED
|
300
|
+
#undef MS_ASYNC
|
301
|
+
#undef MS_SYNC
|
302
|
+
#undef MS_INVALIDATE
|
303
|
+
#undef mmap
|
304
|
+
#undef munmap
|
305
|
+
#undef msync
|
306
|
+
|
307
|
+
#define PROT_EXEC (1 << 0)
|
308
|
+
#define PROT_READ (1 << 1)
|
309
|
+
#define PROT_WRITE (1 << 2)
|
310
|
+
#define PROT_NONE (1 << 3)
|
311
|
+
#define MAP_FIXED 1
|
312
|
+
#define MAP_SHARED 2
|
313
|
+
#define MAP_PRIVATE 3
|
314
|
+
#define MAP_FAILED ((void *)-1)
|
315
|
+
#define MS_ASYNC (1 << 0)
|
316
|
+
#define MS_SYNC (1 << 1)
|
317
|
+
#define MS_INVALIDATE (1 << 2)
|
318
|
+
|
319
|
+
#define \
|
320
|
+
mmap(start, length, prot, flags, fd, offset) \
|
321
|
+
_qdbm_mmap(start, length, prot, flags, fd, offset)
|
322
|
+
|
323
|
+
#define \
|
324
|
+
munmap(start, length) \
|
325
|
+
_qdbm_munmap(start, length)
|
326
|
+
|
327
|
+
#define \
|
328
|
+
msync(start, length, flags) \
|
329
|
+
_qdbm_msync(start, length, flags)
|
330
|
+
|
331
|
+
void *_qdbm_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
|
332
|
+
int _qdbm_munmap(void *start, size_t length);
|
333
|
+
int _qdbm_msync(const void *start, size_t length, int flags);
|
334
|
+
|
335
|
+
#endif
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
/*************************************************************************************************
|
340
|
+
* for reentrant time routines
|
341
|
+
*************************************************************************************************/
|
342
|
+
|
343
|
+
|
344
|
+
struct tm *_qdbm_gmtime(const time_t *timep, struct tm *result);
|
345
|
+
struct tm *_qdbm_localtime(const time_t *timep, struct tm *result);
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
/*************************************************************************************************
|
350
|
+
* for systems without times
|
351
|
+
*************************************************************************************************/
|
352
|
+
|
353
|
+
|
354
|
+
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_)
|
355
|
+
|
356
|
+
#undef times
|
357
|
+
#undef sysconf
|
358
|
+
|
359
|
+
struct tms {
|
360
|
+
clock_t tms_utime;
|
361
|
+
clock_t tms_stime;
|
362
|
+
clock_t tms_cutime;
|
363
|
+
clock_t tms_cstime;
|
364
|
+
};
|
365
|
+
|
366
|
+
#define \
|
367
|
+
times(buf) \
|
368
|
+
_qdbm_times(buf)
|
369
|
+
|
370
|
+
#define \
|
371
|
+
sysconf(name) \
|
372
|
+
(CLOCKS_PER_SEC)
|
373
|
+
|
374
|
+
clock_t _qdbm_times(struct tms *buf);
|
375
|
+
|
376
|
+
#endif
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
/*************************************************************************************************
|
381
|
+
* for Win32
|
382
|
+
*************************************************************************************************/
|
383
|
+
|
384
|
+
|
385
|
+
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_)
|
386
|
+
|
387
|
+
#undef F_WRLCK
|
388
|
+
#undef F_RDLCK
|
389
|
+
#undef F_SETLK
|
390
|
+
#undef F_SETLKW
|
391
|
+
#undef fcntl
|
392
|
+
#undef ftruncate
|
393
|
+
#undef fsync
|
394
|
+
#undef mkdir
|
395
|
+
|
396
|
+
#define F_WRLCK 0
|
397
|
+
#define F_RDLCK 1
|
398
|
+
#define F_SETLK 0
|
399
|
+
#define F_SETLKW 0
|
400
|
+
|
401
|
+
struct flock {
|
402
|
+
int l_type;
|
403
|
+
int l_whence;
|
404
|
+
int l_start;
|
405
|
+
int l_len;
|
406
|
+
int l_pid;
|
407
|
+
};
|
408
|
+
|
409
|
+
#define \
|
410
|
+
fcntl(fd, cmd, lock) \
|
411
|
+
_qdbm_win32_fcntl(fd, cmd, lock)
|
412
|
+
|
413
|
+
#define \
|
414
|
+
ftruncate(fd, length) \
|
415
|
+
_chsize(fd, length)
|
416
|
+
|
417
|
+
#define \
|
418
|
+
fsync(fd) \
|
419
|
+
(0)
|
420
|
+
|
421
|
+
#define \
|
422
|
+
mkdir(pathname, mode) \
|
423
|
+
mkdir(pathname)
|
424
|
+
|
425
|
+
int _qdbm_win32_fcntl(int fd, int cmd, struct flock *lock);
|
426
|
+
|
427
|
+
#endif
|
428
|
+
|
429
|
+
|
430
|
+
#if defined(_SYS_MSVC_)
|
431
|
+
|
432
|
+
#undef S_ISDIR
|
433
|
+
#undef S_ISREG
|
434
|
+
#undef opendir
|
435
|
+
#undef closedir
|
436
|
+
#undef readdir
|
437
|
+
|
438
|
+
#define S_ISDIR(x) (x & _S_IFDIR)
|
439
|
+
#define S_ISREG(x) (x & _S_IFREG)
|
440
|
+
|
441
|
+
struct dirent {
|
442
|
+
char d_name[1024];
|
443
|
+
};
|
444
|
+
|
445
|
+
typedef struct {
|
446
|
+
HANDLE fh;
|
447
|
+
WIN32_FIND_DATA data;
|
448
|
+
struct dirent de;
|
449
|
+
int first;
|
450
|
+
} DIR;
|
451
|
+
|
452
|
+
#define \
|
453
|
+
opendir(name) \
|
454
|
+
_qdbm_win32_opendir(name)
|
455
|
+
|
456
|
+
#define \
|
457
|
+
closedir(dir) \
|
458
|
+
_qdbm_win32_closedir(dir)
|
459
|
+
|
460
|
+
#define \
|
461
|
+
readdir(dir) \
|
462
|
+
_qdbm_win32_readdir(dir)
|
463
|
+
|
464
|
+
DIR *_qdbm_win32_opendir(const char *name);
|
465
|
+
|
466
|
+
int _qdbm_win32_closedir(DIR *dir);
|
467
|
+
|
468
|
+
struct dirent *_qdbm_win32_readdir(DIR *dir);
|
469
|
+
|
470
|
+
#endif
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
/*************************************************************************************************
|
475
|
+
* for ZLIB
|
476
|
+
*************************************************************************************************/
|
477
|
+
|
478
|
+
|
479
|
+
extern char *(*_qdbm_deflate)(const char *, int, int *);
|
480
|
+
|
481
|
+
extern char *(*_qdbm_inflate)(const char *, int, int *);
|
482
|
+
|
483
|
+
extern unsigned int (*_qdbm_getcrc)(const char *, int);
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
/*************************************************************************************************
|
488
|
+
* for ICONV
|
489
|
+
*************************************************************************************************/
|
490
|
+
|
491
|
+
|
492
|
+
extern char *(*_qdbm_iconv)(const char *, int, const char *, const char *, int *, int *);
|
493
|
+
|
494
|
+
extern const char *(*_qdbm_encname)(const char *, int);
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
/*************************************************************************************************
|
499
|
+
* common settings
|
500
|
+
*************************************************************************************************/
|
501
|
+
|
502
|
+
|
503
|
+
#define _QDBM_VERSION "1.8.22"
|
504
|
+
|
505
|
+
#undef TRUE
|
506
|
+
#define TRUE 1
|
507
|
+
#undef FALSE
|
508
|
+
#define FALSE 0
|
509
|
+
|
510
|
+
#define sizeof(a) ((int)sizeof(a))
|
511
|
+
|
512
|
+
int _qdbm_dummyfunc(void);
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
#if defined(__cplusplus) /* export for C++ */
|
517
|
+
}
|
518
|
+
#endif
|
519
|
+
|
520
|
+
#endif /* duplication check */
|
521
|
+
|
522
|
+
|
523
|
+
/* END OF FILE */
|