sort: Add support for combining cases with identical sort criteria.
[pspp] / src / math / merge.h
index 8bd3384a401818e1352bd7cd94a2a61cc9371695..45c84937832d12f7f36e18986a115b17a0777018 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef MATH_MERGE_H
 #define MATH_MERGE_H 1
 
-#include <stdbool.h>
-#include <stddef.h>
-
-struct subcase;
+struct caseproto;
 struct casereader;
+struct subcase;
+
+typedef struct ccase *merge_distinct_combine_func (struct ccase *first,
+                                                   struct ccase *second,
+                                                   void *aux);
 
-struct merge *merge_create (const struct subcase *, size_t);
+struct merge *merge_create (const struct subcase *, const struct caseproto *,
+                            merge_distinct_combine_func *, void *aux);
 void merge_destroy (struct merge *);
 void merge_append (struct merge *, struct casereader *);
 struct casereader *merge_make_reader (struct merge *);