]> mj.ucw.cz Git - libucw.git/blob - lib/sorter/config.c
format_size() no longer exists.
[libucw.git] / lib / sorter / config.c
1 /*
2  *      UCW Library -- Universal Sorter: Configuration
3  *
4  *      (c) 2007 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "lib/lib.h"
11 #include "lib/conf.h"
12 #include "lib/fastbuf.h"
13 #include "lib/sorter/common.h"
14
15 uns sorter_trace;
16 uns sorter_presort_bufsize = 65536;             /* FIXME: kill after removing the old sorter */
17 uns sorter_stream_bufsize = 65536;
18 u64 sorter_bufsize = 65536;
19 uns sorter_debug;
20 uns sorter_min_radix_bits;
21 uns sorter_max_radix_bits;
22 struct fb_params sorter_fb_params;
23
24 static struct cf_section sorter_config = {
25   CF_ITEMS {
26     CF_UNS("Trace", &sorter_trace),
27     CF_UNS("PresortBuffer", &sorter_presort_bufsize),
28     CF_UNS("StreamBuffer", &sorter_stream_bufsize),
29     CF_SECTION("FileAccess", &sorter_fb_params, &fbpar_cf),
30     CF_U64("SortBuffer", &sorter_bufsize),
31     CF_UNS("Debug", &sorter_debug),
32     CF_UNS("MinRadixBits", &sorter_min_radix_bits),
33     CF_UNS("MaxRadixBits", &sorter_max_radix_bits),
34     CF_END
35   }
36 };
37
38 static void CONSTRUCTOR sorter_init_config(void)
39 {
40   cf_declare_section("Sorter", &sorter_config, 0);
41 }