]> mj.ucw.cz Git - libucw.git/blob - lib/sorter.c
configuration reader:
[libucw.git] / lib / sorter.c
1 /*
2  *      UCW Library -- Universal Sorter
3  *
4  *      (c) 2001--2002 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
14 #include <unistd.h>
15 #include <sys/fcntl.h>
16
17 #define SORT_DECLARE_ONLY
18 #include "lib/sorter.h"
19
20 uns sorter_trace;
21 uns sorter_presort_bufsize = 65536;
22 uns sorter_stream_bufsize = 65536;
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_END
30   }
31 };
32
33 static void CONSTRUCTOR sorter_init_config(void)
34 {
35   cf_declare_section("Sorter", &sorter_config, 0);
36 }
37
38 uns sorter_pass_counter;