diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2024-04-06 08:44:01 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2024-04-06 10:10:32 -0700 |
commit | 57581acd9559217e859fdac693145ce6399f4d70 (patch) | |
tree | 2d266e839ec76af12f055ac5114ea8f2548fce5a /dlfcn/Makefile | |
parent | 9e1f4aef865ddeffeb4b5f6578fefab606783120 (diff) | |
download | glibc-57581acd9559217e859fdac693145ce6399f4d70.tar.gz glibc-57581acd9559217e859fdac693145ce6399f4d70.tar.xz glibc-57581acd9559217e859fdac693145ce6399f4d70.zip |
Fix bsearch, qsort doc to match POSIX better
* manual/search.texi (Array Search Function): Correct the statement about lfind’s mean runtime: it is proportional to a number (not that number), and this is true only if random elements are searched for. Relax the constraint on bsearch’s array argument: POSIX says it need not be sorted, only partially sorted. Say that the first arg passed to bsearch’s comparison function is the key, and the second arg is an array element, as POSIX requires. For bsearch and qsort, say that the comparison function should not alter the array, as POSIX requires. For qsort, say that the comparison function must define a total order, as POSIX requires, that it should not depend on element addresses, that the original array index can be used for stable sorts, and that if qsort still works if memory allocation fails. Be more consistent in calling the array elements “elements” rather than “objects”. Co-authored-by: Zack Weinberg <zack@owlfolio.org>
Diffstat (limited to 'dlfcn/Makefile')
0 files changed, 0 insertions, 0 deletions