]> mj.ucw.cz Git - libucw.git/blob - lib/sorter.c
malloc -> xmalloc.
[libucw.git] / lib / sorter.c
1 /*
2  *      Sherlock Library -- Universal Sorter
3  *
4  *      (c) 2001--2002 Martin Mares <mj@ucw.cz>
5  */
6
7 #include "lib/lib.h"
8 #include "lib/conf.h"
9 #include "lib/fastbuf.h"
10
11 #include <unistd.h>
12 #include <sys/fcntl.h>
13
14 #define SORT_DECLARE_ONLY
15 #include "lib/sorter.h"
16
17 uns sorter_trace;
18 uns sorter_presort_bufsize = 65536;
19 uns sorter_stream_bufsize = 65536;
20
21 static struct cfitem sorter_config[] = {
22   { "Sorter",           CT_SECTION,     NULL },
23   { "Trace",            CT_INT,         &sorter_trace },
24   { "PresortBuffer",    CT_INT,         &sorter_presort_bufsize },
25   { "StreamBuffer",     CT_INT,         &sorter_stream_bufsize },
26   { NULL,               CT_STOP,        NULL }
27 };
28
29 static void CONSTRUCTOR sorter_init_config(void)
30 {
31   cf_register(sorter_config);
32 }
33
34 uns sorter_pass_counter;