#include "lib/getopt.h"
#include "lib/conf.h"
#include "lib/fastbuf.h"
+#include "lib/ff-binary.h"
#include "lib/hashfunc.h"
#include "lib/md5.h"
#define SORT_OUTPUT_FB
#define SORT_UNIQUE
#define SORT_INT(k) (k).x
+#define SORT_DELETE_INPUT 0
#include "lib/sorter/sorter.h"
bwrite(f, k[0], sizeof(struct key2));
}
-static inline void s2_copy_merged(struct key2 **k, struct fastbuf **d UNUSED, uns n, struct fastbuf *dest)
-{
- for (uns i=1; i<n; i++)
- k[0]->cnt += k[i]->cnt;
- bwrite(dest, k[0], sizeof(struct key2));
-}
-
#define SORT_KEY_REGULAR struct key2
#define SORT_PREFIX(x) s2_##x
#define SORT_INPUT_FB
#define SORT_PREFIX(x) s5_##x
#define SORT_DATA_SIZE(k) (4*(k).cnt)
#define SORT_UNIFY
+#define SORT_UNIFY_WORKSPACE(k) SORT_DATA_SIZE(k)
#define SORT_INPUT_PRESORT
#define SORT_OUTPUT_THIS_FB
#define SORT_INT(k) (k).x
#define SORT_PREFIX(x) s5b_##x
#define SORT_DATA_SIZE(k) (4*(k).cnt)
#define SORT_UNIFY
+#define SORT_UNIFY_WORKSPACE(k) SORT_DATA_SIZE(k)
#define SORT_INPUT_FB
#define SORT_OUTPUT_THIS_FB
#define SORT_INT(k) (k).x