🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2890

Re: bsearch of empty array

#2890
From: Chris Dollin
Date: Thu, 16 May 1991 11:20
17 lines
1375 bytes
Doug Gwyn says (replying to my bsearch question):

   In general, when the C standard requires an argument to a library function
   to be a pointer to an array of XXX, it means it.  Null pointers are allowed
   only where specified.

Thanks, Doug. I don't like it (in the case I described), but I can live with
it. I've now read 4.1.6 and found the bit that outlaws $NULL$.

Now, which implementations have better ``quality'' - those that are happy with
a null pointer and no elements (where the meaning is ``obvious''), or those
that object (and hence force your code to be more portable) .... :-)
--

Regards, Kers.      | "You're better off  not dreaming of  the things to come;
Caravan:            | Dreams  are always ending  far too soon."
Technical Details
Message-ID: <KERS.91May16122021@cdollin.hpl.hp.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers
References: <KERS.91May15154937@cdollin.hpl.hp.com> <16167@smoke.brl.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers
From: kers@hplb.hpl.hp.com (Chris Dollin)
Newsgroups: comp.std.c
Subject: Re: bsearch of empty array
Message-ID: <KERS.91May16122021@cdollin.hpl.hp.com>
Date: 16 May 91 11:20:21 GMT
References: <KERS.91May15154937@cdollin.hpl.hp.com> <16167@smoke.brl.mil>
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 17
In-Reply-To: gwyn@smoke.brl.mil's message of 15 May 91 22:59:36 GMT
Nntp-Posting-Host: cdollin.hpl.hp.com