X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fsorter.c;h=55d242a5d012e0ab87af5fa3a92743599ca0eaac;hb=d047dae8f369ac5cbc3dedf8907b2c05694bb892;hp=f53f205735c930384e35bc3a651f4bf46cca0a52;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/sorter.c b/lib/sorter.c index f53f2057..55d242a5 100644 --- a/lib/sorter.c +++ b/lib/sorter.c @@ -10,28 +10,27 @@ #include "lib/lib.h" #include "lib/conf.h" #include "lib/fastbuf.h" +#include "lib/sorter-globals.h" #include #include -#define SORT_DECLARE_ONLY -#include "lib/sorter.h" - uns sorter_trace; uns sorter_presort_bufsize = 65536; uns sorter_stream_bufsize = 65536; -static struct cfitem sorter_config[] = { - { "Sorter", CT_SECTION, NULL }, - { "Trace", CT_INT, &sorter_trace }, - { "PresortBuffer", CT_INT, &sorter_presort_bufsize }, - { "StreamBuffer", CT_INT, &sorter_stream_bufsize }, - { NULL, CT_STOP, NULL } +static struct cf_section sorter_config = { + CF_ITEMS { + CF_UNS("Trace", &sorter_trace), + CF_UNS("PresortBuffer", &sorter_presort_bufsize), + CF_UNS("StreamBuffer", &sorter_stream_bufsize), + CF_END + } }; static void CONSTRUCTOR sorter_init_config(void) { - cf_register(sorter_config); + cf_declare_section("Sorter", &sorter_config, 0); } uns sorter_pass_counter;