From: Martin Mares Date: Mon, 3 Nov 2008 22:39:03 +0000 (+0100) Subject: Bring interface of sorter/array-simple.h in line with sorter/array.h. X-Git-Tag: holmes-import~207 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=75aef35d7e88770e461f8f683f970192012583e3;p=libucw.git Bring interface of sorter/array-simple.h in line with sorter/array.h. ASORT_ELT is no longer mandatory; if it is not used, the sorting function gets a pointer of an array to be sorted as its first argument. --- diff --git a/ucw/sorter/array-simple.h b/ucw/sorter/array-simple.h index d5a9c787..393ebd93 100644 --- a/ucw/sorter/array-simple.h +++ b/ucw/sorter/array-simple.h @@ -1,7 +1,7 @@ /* - * UCW Library -- Universal Array Sorter + * UCW Library -- Universal Simple Array Sorter * - * (c) 2003 Martin Mares + * (c) 2003--2008 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -25,7 +25,8 @@ * ASORT_PREFIX(x) [*] add a name prefix (used on all global names * defined by the sorter) * ASORT_KEY_TYPE [*] data type of a single array entry key - * ASORT_ELT(i) [*] returns the key of i-th element + * ASORT_ELT(i) returns the key of i-th element; if this macro is not + * defined, the function gets a pointer to an array to be sorted * ASORT_LT(x,y) x < y for ASORT_TYPE (default: "xcnt); m += keys[i]->cnt; } - s5m_sort(m, a); + s5m_sort(a, m); keys[0]->cnt = m; bwrite(f, keys[0], sizeof(struct key5)); bwrite(f, a, 4*m);