From owner-freebsd-hackers Wed Nov 13 11:50:54 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA09851 for hackers-outgoing; Wed, 13 Nov 1996 11:50:54 -0800 (PST) Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA09835 for ; Wed, 13 Nov 1996 11:50:45 -0800 (PST) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA09533; Wed, 13 Nov 1996 14:50:12 -0500 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Wed, 13 Nov 1996 14:50 EST Received: (from rivers@localhost) by ponds.water.net (8.7.5/8.7.3) id MAA19571; Wed, 13 Nov 1996 12:25:30 -0500 (EST) Date: Wed, 13 Nov 1996 12:25:30 -0500 (EST) From: Thomas David Rivers Message-Id: <199611131725.MAA19571@ponds.water.net> To: wpaul@skynet.ctr.columbia.edu, ponds!whistle.com!julian Subject: Re: library needed to port s/w to Freebsd (tsearch,lsearch,bsearch) Cc: ponds!freebsd.org!hackers Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Bill Paul writes: > > Of all the gin joints in all the towns in all the world, Julian Elischer > had to walk into mine and say: > > > I have a package that needs the 'search' library from sysVR2 > > (and later I presume) > > it looks for "search.h" > > "search" used to allow one to build and search a tree of arbitrary items > > > > I found paul Vixie's AVL tree routines in the archive, > > and maybe I was thinking of them but I remmeber > > the docs saying "This is a drop in replacement..." > > and that's not true for the AVL stuff. > > > > does anyone know of the replacement library? > > I remember there WAS one, but I've been scanning the archives > > and haven't found it yet. > > > > julian > > Hm. The Berkeley DB hash method has what it calls an 'hsearch > compatibility interface' which is supposed to be for compatibility > with System V, though it doesn't specify any particular version > of System V. If you look in the source tree for the DB package and > check the hash directory, you'll see there's a search.h header there, > which for some reason doesn't seem to get installed. I don't know if > this is what you're after though since you didn't really say what > functions this library provides. There's only a small handfull of them > in this particular search.h header so it may not be what you're after. > Might not hurt to check it out though. > > -Bill > I _knew_ I had squirrelled these away somewhere... I finally found them. At some time, someone in the past (could be Paul Vixie?) had a POSIX library that brought POSIX functions to a non-posix system... Unfortunately, I don't know exactly when I grabbed them, or who provided them, or from where it came... However, this library does contain the tsearch, lsearch and bsearch family of functions, as implemented by Eric S. Raymond. The sources for these has the text "Totally public domain" prominently placed at the top; so it seems we could add these to FreeBSD. I suggest we grab those and make them available in 2.1.6/2.2, since they are (apparently) in the POSIX standard. To that end, I've appended the following uuencoded compressed tar file with the relavent routines. As an added bonus, these came with man pages! - Dave Rivers - ------------- uuencode of search.tar.Z --------------------- begin 644 search.tar.Z M'YV08N:4"2-G#!H7,\8`6,BPH<.'$"-*G$BQ8L48,&#-F M3IHW;D0H<#&EJY,@38HH"#BP(!H07%J`$)/&#<$\(`02-`@B3.0W+D"90I2:;L%0)B1.,Q;.J0*0."AV3#+M#XV`L%RFJT!I-R0:%" M!>')AU&@""X',7$5*4"L*9.'!8CE:(0_CRXFC$#K;LJPL6Y73YDW9JX/+SX] M3PKK8]ZT@4,PA5X78N3\KE,WS9GP;X7'Q@Y[Y?=;8W2H]UQ\\]6'`@@I$,A7 M5T04,<404B0!!15)/.'$7DEX=9M!"J0Q1V6+-?989(51QE0==#1&VQETE2%' M&&RD8=Y;9C#5!@A+N`%C)>(%@!G]CQ(@7E2Z$N`1UJX+I!ATGTI$J M"'?6\6-C1X7AQABT&;L8;976<08:"39F:*&'\AJB$-Y]]B6"Q98))6WBE=$& M70FVN2UMW0D$`GKO&AI&9V5X"X(3XI58;*%"MM%G<_2FN^ZP)VI[KKWXZCN$ M?++Z6Z]CZ\Z;WL*Q$D2K&[;BJJL;ULFYYF$F@L`F&YZ]=<>3A]%Q1ZIRG*$L MNW,H`*6[XPZ+:KT&TSSMJ1EC*2@(A/KI\5T<)WH4"%AJR:4"SJ8Y%XW->3;' MO\Y:5T8<=>"(JG68@7#&IG,U=S/'YC%5V8FBDFJ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