X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fsorter%2Fsorter.h;h=939aeb6be61734414da19656e4b59625c7c5c166;hb=6912c77a66798de162fe31f79581cd7b5c97f12c;hp=3c84c386144b33b154cb7ae8b717d67fef9330c7;hpb=46a15649d1e544dce95f76424a4870d69caa955c;p=libucw.git diff --git a/ucw/sorter/sorter.h b/ucw/sorter/sorter.h index 3c84c386..939aeb6b 100644 --- a/ucw/sorter/sorter.h +++ b/ucw/sorter/sorter.h @@ -62,17 +62,17 @@ * bits is available. A monotone hash is a function f from keys to integers * such that f(x) < f(y) implies x < y, which is approximately uniformly * distributed. It should be declared as: - * uns PREFIX_hash(SORT_KEY *a) + * uint PREFIX_hash(SORT_KEY *a) * * Unification: * * SORT_UNIFY merge items with identical keys. It requires the following functions: - * void PREFIX_write_merged(struct fastbuf *f, SORT_KEY **keys, void **data, uns n, void *buf) + * void PREFIX_write_merged(struct fastbuf *f, SORT_KEY **keys, void **data, uint n, void *buf) * takes n records in memory with keys which compare equal and writes * a single record to the given fastbuf. `buf' points to a buffer which * is guaranteed to hold the sum of workspace requirements (see below) * over all given records. The function is allowed to modify all its inputs. - * void PREFIX_copy_merged(SORT_KEY **keys, struct fastbuf **data, uns n, struct fastbuf *dest) + * void PREFIX_copy_merged(SORT_KEY **keys, struct fastbuf **data, uint n, struct fastbuf *dest) * takes n records with keys in memory and data in fastbufs and writes * a single record. Used only if SORT_DATA_SIZE or SORT_UNIFY_WORKSPACE * is defined. @@ -116,7 +116,7 @@ #include #include -#include +#include #include @@ -143,7 +143,7 @@ typedef u64 P(hash_t); #define SORT_INT SORT_INT64 #define SORT_LONG_HASH #else -typedef uns P(hash_t); +typedef uint P(hash_t); #endif #ifdef SORT_INT @@ -198,7 +198,7 @@ static inline void P(copy_data)(P(key) *key, struct fastbuf *in, struct fastbuf } #if defined(SORT_UNIFY) && !defined(SORT_VAR_DATA) && !defined(SORT_UNIFY_WORKSPACE) -static inline void P(copy_merged)(P(key) **keys, struct fastbuf **data UNUSED, uns n, struct fastbuf *dest) +static inline void P(copy_merged)(P(key) **keys, struct fastbuf **data UNUSED, uint n, struct fastbuf *dest) { P(write_merged)(dest, keys, NULL, n, NULL); }