From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Trickey, Howard W (Howard)" To: "'9fans@cse.psu.edu'" <9fans@cse.psu.edu> Subject: RE: [9fans] bsearch ? MIME-Version: 1.0 Content-Type: text/plain Date: Mon, 30 Jun 2003 10:15:43 -0400 Topicbox-Message-UUID: e18b22ce-eacb-11e9-9e20-41e7f4b1d025 > bsearch(2) is not in libc. > > I am sure it will not be for a good reason, but why? > qsort is there so why not its friend? bsearch was not in the standard C library in our research Unix; it must have been added to the standard by someone outside the Labs. So since we weren't using it, noone felt the need to put it into the Plan 9 libc. When I did APE, I needed to do a bsearch, so there is one in /sys/src/ape/lib/ap/gen/bsearch.c, pretty much isomorphic to the one just posted by Dan Cross. - Howard