]> mj.ucw.cz Git - libucw.git/commitdiff
Replaced the SORTER_DECLARE_ONLY hack by lib/sorter-globals.h.
authorMartin Mares <mj@ucw.cz>
Thu, 5 Oct 2006 17:41:56 +0000 (19:41 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 5 Oct 2006 17:41:56 +0000 (19:41 +0200)
lib/sorter-globals.h [new file with mode: 0644]
lib/sorter.c
lib/sorter.h

diff --git a/lib/sorter-globals.h b/lib/sorter-globals.h
new file mode 100644 (file)
index 0000000..a2dae0f
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ *     UCW Library -- Universal Sorter: Global Variables
+ *
+ *     (c) 2001--2004 Martin Mares <mj@ucw.cz>
+ *     (c) 2004 Robert Spalek <robert@ucw.cz>
+ *
+ *     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
index 2424bf46dcabfb30d90f06d24dfd325f486479b8..55d242a5d012e0ab87af5fa3a92743599ca0eaac 100644 (file)
 #include "lib/lib.h"
 #include "lib/conf.h"
 #include "lib/fastbuf.h"
+#include "lib/sorter-globals.h"
 
 #include <unistd.h>
 #include <sys/fcntl.h>
 
-#define SORT_DECLARE_ONLY
-#include "lib/sorter.h"
-
 uns sorter_trace;
 uns sorter_presort_bufsize = 65536;
 uns sorter_stream_bufsize = 65536;
index 15ff9bf7b16bc0378b8231a579cd7035ea8dd088..64092d6cafcc46f0bd9663ac9312c8c91b9a88a2 100644 (file)
  *  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 <unistd.h>
 #include <fcntl.h>
@@ -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 */