From owner-freebsd-arch Sat Jul 1 4:12:19 2000 Delivered-To: freebsd-arch@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 603A637BA39 for ; Sat, 1 Jul 2000 04:12:16 -0700 (PDT) (envelope-from julian@elischer.org) Received: from bissau-52.budapest.interware.hu ([195.70.53.180] helo=jules.elischer.org) by mail.interware.hu with smtp (Exim 3.12 #1 (Debian)) id 138LRJ-0002tx-00; Sat, 01 Jul 2000 13:28:02 +0200 Message-ID: <395DD1FF.41C67EA6@elischer.org> Date: Sat, 01 Jul 2000 04:11:59 -0700 From: Julian Elischer X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 5.0-CURRENT i386) MIME-Version: 1.0 To: Jeroen Ruigrok/Asmodai Cc: Alfred Perlstein , arch@freebsd.org Subject: Re: Importing tsearch routines. References: <20000630153151.J275@fw.wintelcom.net> <20000701111344.S307@daemon.ninth-circle.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG There's a PD tsearch library available from comp.sources.{misc,unix?} from 1990 or there-abouts (from memory). If you want to look at it, it's also available on http://www.freebsd.org/~julian/ under the heading "CBASIC-to-C translator" because I originally used tsearch and needed it to get the translator working under FreeBSD. It includes man pages but I suspect they may be from sun or somewhere. Jeroen Ruigrok/Asmodai wrote: > > -On [20000701 04:01], Alfred Perlstein (bright@wintelcom.net) wrote: > >I would like to import Open/NetBSD's tsearch routines into libc: > > > >http://www.flame.org/cgi-bin/uncgi/hman?page=tsearch§=&arch=i386 > > > >tsearch seems to be in most every other libc out there and is quite > >handy. > > > >I have it ready for inclusion, and would like to backport to 4.0 > >asap, any objections? > > No. > > SUSv2 search.h: > > int hcreate(size_t); > void hdestroy(void); > ENTRY *hsearch(ENTRY, ACTION); > void insque(void *, void *); > void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); > void *lsearch(const void *, void *, size_t *, size_t, int (*)(const void *, const void *)); > void remque(void *); > void *tdelete(const void *, void **, int(*)(const void *, const void *)); > void *tfind(const void *, void *const *, int(*)(const void *, const void *)); > void *tsearch(const void *, void **, int(*)(const void *, const void *)); > void twalk(const void *, void (*)(const void *, VISIT, int )); > > Any chance of implementing the rest as well? =) > > Obtw, still waiting for the kblob/filter manpages. *ducks 'n runs* > > -- > Jeroen Ruigrok vd Werven/Asmodai asmodai@[wxs.nl|bart.nl|freebsd.org] > Documentation nutter/C-rated Coder BSD: Technical excellence at its best > The BSD Programmer's Documentation Project > I believe because it is impossible... > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 )_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message