From: Martin Mares Date: Thu, 5 Oct 2006 17:41:56 +0000 (+0200) Subject: Replaced the SORTER_DECLARE_ONLY hack by lib/sorter-globals.h. X-Git-Tag: holmes-import~511^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b72ebc7dc62d0914dce01487cf1408504a94ef1f;p=libucw.git Replaced the SORTER_DECLARE_ONLY hack by lib/sorter-globals.h. --- diff --git a/lib/sorter-globals.h b/lib/sorter-globals.h new file mode 100644 index 00000000..a2dae0f4 --- /dev/null +++ b/lib/sorter-globals.h @@ -0,0 +1,20 @@ +/* + * UCW Library -- Universal Sorter: Global Variables + * + * (c) 2001--2004 Martin Mares + * (c) 2004 Robert Spalek + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. + */ + +#ifndef _UCW_SORTER_GLOBALS_H +#define _UCW_SORTER_GLOBALS_H + +extern uns sorter_trace; +extern uns sorter_presort_bufsize; +extern uns sorter_stream_bufsize; + +extern uns sorter_pass_counter; + +#endif diff --git a/lib/sorter.c b/lib/sorter.c index 2424bf46..55d242a5 100644 --- a/lib/sorter.c +++ b/lib/sorter.c @@ -10,13 +10,11 @@ #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; diff --git a/lib/sorter.h b/lib/sorter.h index 15ff9bf7..64092d6c 100644 --- a/lib/sorter.h +++ b/lib/sorter.h @@ -85,23 +85,7 @@ * undef'd. */ -/* Declarations of externals from sorter.c */ - -#ifndef SORT_DECLS_READ -#define SORT_DECLS_READ - -extern uns sorter_trace; -extern uns sorter_presort_bufsize; -extern uns sorter_stream_bufsize; - -extern uns sorter_pass_counter; - -#endif /* !SORT_DECLS_READ */ - -/* The sorter proper */ - -#ifndef SORT_DECLARE_ONLY - +#include "lib/sorter-globals.h" #include "lib/fastbuf.h" #include #include @@ -579,5 +563,3 @@ struct fastbuf *fb1, struct fastbuf *fb2 #undef SORT_OUTPUT_FB #undef SORT_PRESORT #undef SORT_UP_TO - -#endif /* !SORT_DECLARE_ONLY */