X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Farray.h;h=a06a7ca1545d6790da05d57245fd3affa39fa762;hb=a1a4228b112a6aca97fef5aaaf9ffa21271a1f72;hp=a543e5a3d4b438465df95bb2bec444cefa151762;hpb=cbdfa35f7fb46948d1ee8aee7b7438cf1a5fd44c;p=pspp-builds.git diff --git a/src/libpspp/array.h b/src/libpspp/array.h index a543e5a3..a06a7ca1 100644 --- a/src/libpspp/array.h +++ b/src/libpspp/array.h @@ -6,7 +6,8 @@ /* Compares A and B, given auxiliary data AUX, and returns a strcmp()-type result. */ -typedef int algo_compare_func (const void *a, const void *b, void *aux); + +typedef int algo_compare_func (const void *a, const void *b, const void *aux); /* Tests a predicate on DATA, given auxiliary data AUX */ typedef bool algo_predicate_func (const void *data, void *aux); @@ -46,13 +47,13 @@ size_t count_if (const void *array, size_t count, size_t size, using COMPARE for comparisons. AUX is passed to each comparison as auxiliary data. */ void sort (void *array, size_t count, size_t size, - algo_compare_func *compare, void *aux); + algo_compare_func *compare, const void *aux); /* Tests whether ARRAY, which contains COUNT elements of SIZE bytes each, is sorted in order according to COMPARE. AUX is passed to COMPARE as auxiliary data. */ bool is_sorted (const void *array, size_t count, size_t size, - algo_compare_func *compare, void *aux); + algo_compare_func *compare, const void *aux); /* Makes the elements in ARRAY unique, by moving up duplicates, and returns the new number of elements in the array. Sorted