🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Doug Gwyn Mon, 23 Jan 1989 04:44
System V tsearch snafu
#961
Author: 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 *.
Re: System V tsearch snafu
#962
Author: Doug Gwyn
Date: Mon, 23 Jan 1989 08:11
14 lines
1042 bytes
In article <9481@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn ) writes:
> 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.

I'm told that this is fixed in SVID Issue 3.

Meanwhile, I've noticed that the return type from these functions
is a NODE *, where NODE is a completely undocumented internal type.
It really ought to have been the "key" member of the NODE, as indicated
by the documentation.

I think I've figured out why we didn't try to include these in the
ANSI C Standard.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads