Omit CVS Id. Update copyright year.
[idzebra-moved-to-github.git] / include / sortidx.h
1 /* This file is part of the Zebra server.
2    Copyright (C) 1995-2008 Index Data
3
4 Zebra is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8
9 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18 */
19
20 #ifndef SORTIDX_H
21 #define SORTIDX_H
22
23 #include <yaz/yconfig.h>
24 #include <idzebra/version.h>
25 #include <idzebra/bfile.h>
26
27 YAZ_BEGIN_CDECL
28
29 #define SORT_IDX_ENTRYSIZE 64
30
31 typedef struct zebra_sort_index *zebra_sort_index_t;
32
33 #define ZEBRA_SORT_TYPE_FLAT 1
34 #define ZEBRA_SORT_TYPE_ISAMB 2
35
36 zebra_sort_index_t zebra_sort_open(BFiles bfs, int write_flag, int sort_type);
37 void zebra_sort_close(zebra_sort_index_t si);
38 int zebra_sort_type(zebra_sort_index_t si, int type);
39 void zebra_sort_sysno(zebra_sort_index_t si, zint sysno);
40 void zebra_sort_add(zebra_sort_index_t si, const char *buf, int len);
41 void zebra_sort_delete(zebra_sort_index_t si);
42 void zebra_sort_read(zebra_sort_index_t si, char *buf);
43
44 YAZ_END_CDECL
45
46 #endif
47 /*
48  * Local variables:
49  * c-basic-offset: 4
50  * indent-tabs-mode: nil
51  * End:
52  * vim: shiftwidth=4 tabstop=8 expandtab
53  */
54