🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #961

System V tsearch snafu

#961
From: Doug Gwyn
Date: Mon, 23 Jan 1989 04:44
16 lines
1190 bytes
The description in the SVR3.0 PRM for the "rootp" etc. pointer types,
and the library source code, for tsearch(3C) and related functions is
all bollixed up.  This is also specified wrong in the SVID.

"root" should be of generic pointer type (char * or void *), and the
implementation of tsearch() etc. should coerce this into NODE * for
internal use.  There is no way for the application to specify NODE *
as the current implementation would technically require.

The reason these routines happen to have worked is that on most systems
AT&T "supports", all pointers have the same representation.  This is
definitely not true of all systems in existence, however, so the types
should be gotten correct.

The only pointer representation equivalence required by the proposed
ANSI C standard is between void * and char *, not NODE *.
Technical Details
Message-ID: <9481@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!cmcl2!adm!smoke!gwyn

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!cmcl2!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn )
Newsgroups: comp.bugs.sys5
Subject: System V tsearch snafu
Keywords: System V UNIX C library tsearch tree search bug
Message-ID: <9481@smoke.BRL.MIL>
Date: 23 Jan 89 04:44:52 GMT
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 16